aws / sagemaker-python-sdk

A library for training and deploying machine learning models on Amazon SageMaker
https://sagemaker.readthedocs.io/
Apache License 2.0
2.09k stars 1.13k forks source link

Error when running hyperparameter tuning job locally #1960

Open Srijstha opened 3 years ago

Srijstha commented 3 years ago

Describe the bug Running a hyperparameter tuning job locally using a sample code as given below produces an error: AttributeError: 'LocalSagemakerClient' object has no attribute 'create_hyper_parameter_tuning_job'.

tuner = HyperparameterTuner(estimator,
objective_metric_name,
hyperparameter_ranges,
metric_definitions,
max_jobs=4,
max_parallel_jobs=2,
objective_type=objective_type,
base_tuning_job_name="hpo-tuning-demo"
)

tuner.fit(inputs=channels)

To reproduce Use the Amazon AWS example from the link: https://github.com/aws/amazon-sagemaker-examples/tree/master/hyperparameter_tuning/keras_bring_your_own, and change instance_type to 'local'. For Hyperparameter tuning job, instead of using configurations as in the example, just use HyperparmeterTuner class as shown above.

Expected behavior I'd expect it to work without the error.

Screenshots or logs Screenshot of the error output given below. Error output

System information A description of your system. Please provide:

Additional context Instead of using the AWS instances, trying to use the SageMaker hyperparameter tuning job locally for testing purposes.

chuyang-deng commented 3 years ago

Hi @Srijstha, SageMaker Python SDK local mode currently does not provide tuning job functionalities. Sorry for the inconvenience.

Srijstha commented 3 years ago

Hi ChuyangDeng, Thank you for your quick response. I hope that the feature will be added soon so that people will benefit from using it locally.

idanmoradarthas commented 1 year ago

@chuyang-deng Any news? Even running HyperparameterTuner with only one job in local would be a great help.

espoirMur commented 1 year ago

I have the same issue here...

akshika47 commented 6 months ago

Hi guys,

Any update on this?