Open kafka399 opened 4 years ago
If you are ok with TF 2.1 version, here is the solution:
tf_estimator = TensorFlow(entry_point='script_one.py', role=role, train_instance_count=1, train_instance_type='ml.p3.2xlarge', framework_version='2.1.0', py_version='py3', script_mode=True, train_use_spot_instances = True, train_max_wait= 36000, train_max_run =36000, hyperparameters={ 'dropout':0.22350414495308987, 'epochs': 33, 'batch-size': 657, 'learning-rate': 0.01} )
Now, the question remains why it doesn't work with TF 2.2 or 2.3
Are you using debugger callbacks ? If you do try to remove them
Thanks, @hm-haitham for the tip. I can confirm that disabling debugger callbacks fixes the issue. Using @kafka399's estimator as an example, here is how the fix will look like:
tf_estimator = TensorFlow(
entry_point='script_one.py', role=role,
train_instance_count=1,
train_instance_type='ml.p3.2xlarge',
framework_version='2.3.0',
py_version='py37',
script_mode=True,
train_use_spot_instances = True,
train_max_wait= 36000,
train_max_run =36000,
debugger_hook_config=False,
hyperparameters={
'dropout':0.22350414495308987,
'epochs': 33,
'batch-size': 657,
'learning-rate': 0.01
}
)
Notice the debugger_hook_config
setting.
Hello,
The following setup fails on model saving:
Calling script file:
Last part of the scrip file:
Both methods fail with the following error in SM, KeyError: 'callable_inputs':
KeyError: 'callable_inputs'