awslabs / awslabs/predictive-maintenance-using-machine-learning
NameError: name 'config' is not defined
- Dominant language
- Python
- Stars
- 110
- Forks
- 61
- PR merge metrics
- No merged PRs in 30d
Description
```
from` sagemaker.mxnet import MXNet
from time import gmtime, strftime
timestamp = strftime("%Y-%m-%d-%H-%M-%S", gmtime())
#training_job_name = "{}-{}".format(config.model_name, strftime("%Y-%m-%d-%H-%M-%S", gmtime()))
training_job_name = config.training_job_name+'-'+timestamp
train_instance_type = 'ml.p3.2xlarge'
# pass in the location of the training script, which is local to s3
# 1 training instance
# using 8 LSTM units,
# using Adam optimizer. These are just hyperparameters
m = MXNet(entry_point='sagemaker_predictive_maintenance_entry_point.py',
source_dir='sagemaker_predictive_maintenance/sagemaker_predictive_maintenance_entry_point',
py_version='py3',
role=role,
train_instance_count=1,
train_instance_type=train_instance_type,
output_path=output_location,
hyperparameters={'num-datasets' : len(train_df),
'num-gpus': 1,
'num-units': 8,
'num-layers': 2,
'epochs': 200,
'optimizer': 'adam',
'batch-size':1,
'log-interval': 100},
input_mode='File',
# use_spot_instances = True
max_run = 3600,
max_wait = 3600,
# train_max_run = 7200,
framework_version='1.6.0')
m.fit({'train': s3_data_prefix}, job_name=training_job_name)
```
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
in
5
6 #training_job_name = "{}-{}".format(config.model_name, strftime("%Y-%m-%d-%H-%M-%S", gmtime()))
----> 7 training_job_name = config.training_job_name+'-'+timestamp
8
9 train_instance_type = 'ml.p3.2xlarge'
NameError: name 'config' is not defined
Contributor guide
Assessment
This issue has not been assessed yet.