How to write automatically the model card README.md into the file model.tar.gz?
Hi,When I run notebook and script from01_getting_started_pytorchin AWS Sagemaker, I do not get in the filemodel.tar.gz(where my best model is saved in s3) the model cardREADME.mdIt’s strange as I did get it before through my training jobs in AWS Sagemaker…How can I get automatically the model cardREADME.mdfile into the filemodel.tar.gz?A code to change in the training scripttrain.py?
2022-09-19T11:25:44Z
You can additionally runtrainer.creade_model_card[Ref], which creates the model card in theoutput_dir.
2022-09-19T19:46:27Z
Thank you@philschmid.In the training scripttrain.py, it would mean the following addition from line 94?# Saves the model to s3
trainer.creade_model_card() # new
trainer.save_model(args.model_dir)And the model card would then be saved inoutput_dirofline 62(theargs.model_dir)?# define training args
training_args = TrainingArguments(
output_dir=args.model_dir,
etc.)If yes, how can I access it (thisoutput_dir) after end of training? (in s3 I guess but which link?)
2022-09-26T09:21:54Z
All training jobs should have and output s3 bucket you can check the it in the UI or via sdk
2022-10-26T12:02:03Z
Thank you for your response but I do not understand it.Please, could you pass the code to write into the training scripttrain.pyand how to access the model card after training? Thank you.