bash: cannot set terminal process group (-1): Inappropriate ioctl for device
bash: no job control in this shell
2020-09-13 13:20:23,180 sagemaker-training-toolkit INFO     Imported framework sagemaker_pytorch_container.training
2020-09-13 13:20:23,182 sagemaker-training-toolkit INFO     No GPUs detected (normal if no gpus installed)
2020-09-13 13:20:23,192 sagemaker_pytorch_container.training INFO     Block until all host DNS lookups succeed.
2020-09-13 13:20:26,236 sagemaker_pytorch_container.training INFO     Invoking user training script.
2020-09-13 13:20:26,500 sagemaker-training-toolkit INFO     No GPUs detected (normal if no gpus installed)
2020-09-13 13:20:26,512 sagemaker-training-toolkit INFO     No GPUs detected (normal if no gpus installed)
2020-09-13 13:20:26,524 sagemaker-training-toolkit INFO     No GPUs detected (normal if no gpus installed)
2020-09-13 13:20:26,533 sagemaker-training-toolkit INFO     Invoking user script

Training Env:

{
    "additional_framework_parameters": {},
    "channel_input_dirs": {
        "data": "/opt/ml/input/data/data"
    },
    "current_host": "algo-1",
    "framework_module": "sagemaker_pytorch_container.training:main",
    "hosts": [
        "algo-1"
    ],
    "hyperparameters": {
        "task_type": "1"
    },
    "input_config_dir": "/opt/ml/input/config",
    "channel_data_config": {
        "data": {
            "TrainingInputMode": "File",
            "S3DistributionType": "ShardedByS3Key",
            "RecordWrapperType": "None"
        }
    },
    "input_dir": "/opt/ml/input",
    "is_master": true,
    "job_name": "task1-2020-09-13-13-16-15-3uM65148",
    "log_level": 20,
    "master_hostname": "algo-1",
    "model_dir": "/opt/ml/model",
    "module_dir": "s3://sagemaker-us-east-1-667232328135/tests/simple-sagemaker-example-cli-multi_2020-09-13-13-16-10_py37/task1/task1-2020-09-13-13-16-15-3uM65148/source/sourcedir.tar.gz",
    "module_name": "worker",
    "network_interface_name": "eth0",
    "num_cpus": 2,
    "num_gpus": 0,
    "output_data_dir": "/opt/ml/output/data",
    "output_dir": "/opt/ml/output",
    "output_intermediate_dir": "/opt/ml/output/intermediate",
    "resource_config": {
        "current_host": "algo-1",
        "hosts": [
            "algo-1"
        ],
        "network_interface_name": "eth0"
    },
    "user_entry_point": "worker.py"
}

Environment variables:

SM_HOSTS=["algo-1"]
SM_NETWORK_INTERFACE_NAME=eth0
SM_HPS={"task_type":"1"}
SM_USER_ENTRY_POINT=worker.py
SM_FRAMEWORK_PARAMS={}
SM_RESOURCE_CONFIG={"current_host":"algo-1","hosts":["algo-1"],"network_interface_name":"eth0"}
SM_channel_data_CONFIG={"data":{"RecordWrapperType":"None","S3DistributionType":"ShardedByS3Key","TrainingInputMode":"File"}}
SM_OUTPUT_DATA_DIR=/opt/ml/output/data
SM_CHANNELS=["data"]
SM_CURRENT_HOST=algo-1
SM_MODULE_NAME=worker
SM_LOG_LEVEL=20
SM_FRAMEWORK_MODULE=sagemaker_pytorch_container.training:main
SM_INPUT_DIR=/opt/ml/input
SM_INPUT_CONFIG_DIR=/opt/ml/input/config
SM_OUTPUT_DIR=/opt/ml/output
SM_NUM_CPUS=2
SM_NUM_GPUS=0
SM_MODEL_DIR=/opt/ml/model
SM_MODULE_DIR=s3://sagemaker-us-east-1-667232328135/tests/simple-sagemaker-example-cli-multi_2020-09-13-13-16-10_py37/task1/task1-2020-09-13-13-16-15-3uM65148/source/sourcedir.tar.gz
SM_TRAINING_ENV={"additional_framework_parameters":{},"channel_input_dirs":{"data":"/opt/ml/input/data/data"},"current_host":"algo-1","framework_module":"sagemaker_pytorch_container.training:main","hosts":["algo-1"],"hyperparameters":{"task_type":"1"},"input_config_dir":"/opt/ml/input/config","channel_data_config":{"data":{"RecordWrapperType":"None","S3DistributionType":"ShardedByS3Key","TrainingInputMode":"File"}},"input_dir":"/opt/ml/input","is_master":true,"job_name":"task1-2020-09-13-13-16-15-3uM65148","log_level":20,"master_hostname":"algo-1","model_dir":"/opt/ml/model","module_dir":"s3://sagemaker-us-east-1-667232328135/tests/simple-sagemaker-example-cli-multi_2020-09-13-13-16-10_py37/task1/task1-2020-09-13-13-16-15-3uM65148/source/sourcedir.tar.gz","module_name":"worker","network_interface_name":"eth0","num_cpus":2,"num_gpus":0,"output_data_dir":"/opt/ml/output/data","output_dir":"/opt/ml/output","output_intermediate_dir":"/opt/ml/output/intermediate","resource_config":{"current_host":"algo-1","hosts":["algo-1"],"network_interface_name":"eth0"},"user_entry_point":"worker.py"}
SM_USER_ARGS=["--task_type","1"]
SM_OUTPUT_INTERMEDIATE_DIR=/opt/ml/output/intermediate
SM_CHANNEL_DATA=/opt/ml/input/data/data
SM_HP_TASK_TYPE=1
PYTHONPATH=/opt/ml/code:/opt/conda/bin:/opt/conda/lib/python36.zip:/opt/conda/lib/python3.6:/opt/conda/lib/python3.6/lib-dynload:/opt/conda/lib/python3.6/site-packages

Invoking script with the following command:

/opt/conda/bin/python worker.py --task_type 1


INFO:__main__:Starting worker...
INFO:worker_toolkit.worker_lib:Args: Namespace(batch_size=64, channel_names=['data'], current_host='algo-1', epochs=50, hosts=['algo-1'], hps={'task_type': '1'}, input_config_dir='/opt/ml/input/config', channel_data='/opt/ml/input/data/data', channel_data_config='{"data":{"RecordWrapperType":"None","S3DistributionType":"ShardedByS3Key","TrainingInputMode":"File"}}', input_dir='/opt/ml/input', channel_model='', job_name='task1-2020-09-13-13-16-15-3uM65148', learning_rate=0.05, model_dir='/opt/ml/model', network_interface='eth0', num_cpus=2, num_gpus=0, output_data_dir='/opt/ml/output/data', output_dir='/opt/ml/output', resource_config='{"current_host":"algo-1","hosts":["algo-1"],"network_interface_name":"eth0"}', state='/state', use_cuda=False)
INFO:worker_toolkit.worker_lib:Unmatched: ['--task_type', '1']
INFO:worker_toolkit.worker_lib:Deleting other instances' state
INFO:worker_toolkit.worker_lib:Creating instance specific state dir
INFO:__main__:Hyperparams: {'task_type': '1'}
INFO:__main__:Input data files: [PosixPath('/opt/ml/input/data/data/sample_data1.txt'), PosixPath('/opt/ml/input/data/data/sample_data2.txt')]
INFO:__main__:State files: [PosixPath('/state/algo-1')]
INFO:worker_toolkit.worker_lib:Marking instance algo-1 completion
INFO:__main__:finished!
2020-09-13 13:20:26,601 sagemaker-training-toolkit INFO     Reporting training SUCCESS
