C2W2 Env variable question

Where did we set the model_dir and output_dir explicitly in the whole pipeline? I didn’t find it in either train.py or the notebook. Thanks!

Hi,

It is in train.py!. See line 103 I guess(or try searching).

  • ‘model_dir’ == os.environ[‘SM_MODEL_DIR’]
  • outpur_dir==os.environ[‘SM_OUTPUT_DIR’]

These environment variables are defined automatically by SageMaker, although you can change them (if you know the consequences!)

Regards,
Muhammad.