bash: cannot set terminal process group (-1): Inappropriate ioctl for device
bash: no job control in this shell
2020-09-13 13:23:54,502 sagemaker-training-toolkit INFO     Imported framework sagemaker_pytorch_container.training
2020-09-13 13:23:54,505 sagemaker-training-toolkit INFO     No GPUs detected (normal if no gpus installed)
2020-09-13 13:23:54,515 sagemaker_pytorch_container.training INFO     Block until all host DNS lookups succeed.
2020-09-13 13:23:56,011 sagemaker_pytorch_container.training INFO     Invoking user training script.
2020-09-13 13:24:11,555 sagemaker-training-toolkit INFO     No GPUs detected (normal if no gpus installed)
2020-09-13 13:24:11,566 sagemaker-training-toolkit INFO     No GPUs detected (normal if no gpus installed)
2020-09-13 13:24:11,578 sagemaker-training-toolkit INFO     No GPUs detected (normal if no gpus installed)
2020-09-13 13:24:11,587 sagemaker-training-toolkit INFO     Invoking user script

Training Env:

{
    "additional_framework_parameters": {},
    "channel_input_dirs": {
        "task2_data": "/opt/ml/input/data/task2_data"
    },
    "current_host": "algo-1",
    "framework_module": "sagemaker_pytorch_container.training:main",
    "hosts": [
        "algo-1"
    ],
    "hyperparameters": {
        "task_type": "2"
    },
    "input_config_dir": "/opt/ml/input/config",
    "input_data_config": {
        "task2_data": {
            "TrainingInputMode": "File",
            "S3DistributionType": "FullyReplicated",
            "RecordWrapperType": "None"
        }
    },
    "input_dir": "/opt/ml/input",
    "is_master": true,
    "job_name": "task2-2020-09-13-13-21-08-weiD9NX6",
    "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/task2/task2-2020-09-13-13-21-08-weiD9NX6/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":"2"}
SM_USER_ENTRY_POINT=worker.py
SM_FRAMEWORK_PARAMS={}
SM_RESOURCE_CONFIG={"current_host":"algo-1","hosts":["algo-1"],"network_interface_name":"eth0"}
SM_INPUT_DATA_CONFIG={"task2_data":{"RecordWrapperType":"None","S3DistributionType":"FullyReplicated","TrainingInputMode":"File"}}
SM_OUTPUT_DATA_DIR=/opt/ml/output/data
SM_CHANNELS=["task2_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/task2/task2-2020-09-13-13-21-08-weiD9NX6/source/sourcedir.tar.gz
SM_TRAINING_ENV={"additional_framework_parameters":{},"channel_input_dirs":{"task2_data":"/opt/ml/input/data/task2_data"},"current_host":"algo-1","framework_module":"sagemaker_pytorch_container.training:main","hosts":["algo-1"],"hyperparameters":{"task_type":"2"},"input_config_dir":"/opt/ml/input/config","input_data_config":{"task2_data":{"RecordWrapperType":"None","S3DistributionType":"FullyReplicated","TrainingInputMode":"File"}},"input_dir":"/opt/ml/input","is_master":true,"job_name":"task2-2020-09-13-13-21-08-weiD9NX6","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/task2/task2-2020-09-13-13-21-08-weiD9NX6/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","2"]
SM_OUTPUT_INTERMEDIATE_DIR=/opt/ml/output/intermediate
SM_CHANNEL_TASK2_DATA=/opt/ml/input/data/task2_data
SM_HP_TASK_TYPE=2
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 2


INFO:__main__:Starting worker...
INFO:task_toolkit.algo_lib:Args: Namespace(batch_size=64, channel_names=['task2_data'], current_host='algo-1', epochs=50, hosts=['algo-1'], hps={'task_type': '2'}, input_config_dir='/opt/ml/input/config', input_data='', input_data_config='{"task2_data":{"RecordWrapperType":"None","S3DistributionType":"FullyReplicated","TrainingInputMode":"File"}}', input_dir='/opt/ml/input', input_model='', input_task2_data='/opt/ml/input/data/task2_data', job_name='task2-2020-09-13-13-21-08-weiD9NX6', 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:task_toolkit.algo_lib:Unmatched: ['--task_type', '2']
INFO:task_toolkit.algo_lib:Deleting other instances' state
INFO:task_toolkit.algo_lib:Creating instance specific state dir
INFO:__main__:Hyperparams: {'task_type': '2'}
INFO:__main__:Input data files: [PosixPath('task_toolkit'), PosixPath('worker.py'), PosixPath('task_toolkit/algo_lib.py'), PosixPath('task_toolkit/__pycache__'), PosixPath('task_toolkit/__init__.py'), PosixPath('task_toolkit/__pycache__/__init__.cpython-37.pyc'), PosixPath('task_toolkit/__pycache__/algo_lib.cpython-37.pyc')]
INFO:__main__:State files: [PosixPath('/state/algo-1')]
INFO:__main__:Input task2_data: [PosixPath('/opt/ml/input/data/task2_data/model.tar.gz')]
INFO:task_toolkit.algo_lib:Marking instance algo-1 completion
INFO:__main__:finished!
2020-09-13 13:24:11,656 sagemaker-training-toolkit INFO     Reporting training SUCCESS
