Closed anupash147 closed 11 months ago
Hi @anupash147 ,
Thank you for using Amazon SageMaker.
Can you provide details on the bug? Which error you are getting?
Hi folks, a workaround solution for that is to use the hyperparameters
instead of environment
in the Estimator API.
To don't change my estimator implementation, I added the code below in the hyperparameters code.
for k, v in estimator.environment.items():
estimator._hyperparameters[k] = v
In the entry_point
script, I added all unexpected arguments as environment variables
if len(remaining_args) > 0:
for arg in range(len(remaining_args)):
if remaining_args[arg].startswith("--"):
os.environ[remaining_args[arg].strip("--")] = remaining_args[arg+1]
I think we can close this as per https://github.com/aws/sagemaker-python-sdk/pull/3614.
Closing as resolved. Feel free to reopen/continue the discussion if needed.
Describe the bug on singleton training; i use the below code
it works well but on using the same code for hyperparameter training it fails. I don't see the reason on failing.
Also i am not able see the environment variables in debug.
Expected behavior If I hardcode the values in the training it works fine.. this code is taken from https://github.com/aws-samples/amazon-sagemaker-mlflow-fargate/blob/main/lab/2_track_experiments_hpo.ipynb
System information A description of your system. Please provide: