aws / aws/amazon-sagemaker-examples

RL resource allocation VRP notebook does not work

Open
#1,484 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Jupyter Notebook
Stars
11k
Forks
7k
Avg merge
8h 29m
Merged PRs (30d)
8

Description

https://github.com/awslabs/amazon-sagemaker-examples/blob/master/reinforcement_learning/rl_resource_allocation_ray_customEnv/rl_vehicle_routing_problem_ray_custom.ipynb
Fails on this cell

```python
estimator = RLEstimator(entry_point= train_entry_point,
source_dir="src",
dependencies=["common/sagemaker_rl"],
toolkit=RLToolkit.RAY,
toolkit_version='0.6.5',
framework=RLFramework.TENSORFLOW,
role=role,
instance_type=instance_type,
instance_count=1,
output_path=s3_output_path,
base_job_name=job_name_prefix,
metric_definitions=metric_definitions,
train_max_run=train_job_max_duration_in_seconds,
hyperparameters={}
)
```

gets this error:

```
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
in
15 metric_definitions=metric_definitions,
16 train_max_run=train_job_max_duration_in_seconds,
---> 17 hyperparameters={}
18 )

/opt/conda/lib/python3.7/site-packages/sagemaker/rl/estimator.py in __init__(self, entry_point, toolkit, toolkit_version, framework, source_dir, hyperparameters, image_uri, metric_definitions, **kwargs)
166 image_uri=image_uri,
167 metric_definitions=metric_definitions,
--> 168 **kwargs
169 )
170

/opt/conda/lib/python3.7/site-packages/sagemaker/estimator.py in __init__(self, entry_point, source_dir, hyperparameters, container_log_level, code_location, image_uri, dependencies, enable_network_isolation, git_config, checkpoint_s3_uri, checkpoint_local_path, enable_sagemaker_metrics, **kwargs)
1647 :class:`~sagemaker.estimator.EstimatorBase`.
1648 """
-> 1649 super(Framework, self).__init__(enable_network_isolation=enable_network_isolation, **kwargs)
1650 if entry_point.startswith("s3://"):
1651 raise ValueError(

TypeError: __init__() got an unexpected keyword argument 'train_max_run'
```

Contributor guide

Open the contributing guide

Research direction

Open reinforcement_learning/rl_resource_allocation_ray_customEnv/rl_vehicle_routing_problem_ray_custom.ipynb and reproduce the failing estimator cell. Compare the RLEstimator and SageMaker estimator arguments shown in the traceback, especially train_max_run; done means the cell runs without the unexpected-keyword error.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, python, tensorflow
Domain
cloud, machine-learning
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.