aws / aws/sagemaker-training-toolkit

Hyperparameters not shell escaped

Open
#128 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
530
Forks
140
Avg merge
1h 12m
Merged PRs (30d)
2

Description

**Describe the bug**
Hyperparameters with spaces get passed as separate command line tokens

**To reproduce**
Create a hyperparameter like "key" set it to "a b". Toolkit will invoke user script with "--key a b" instead of "--key 'a b'".

**Expected behavior**
Expect hyperparameters to be passed to script as arguments. Requiring hyperparameters to already be shlex quoted seems unexpected. The commands are correctly passed to Popen but differently parsed when asyncio is used.

**Screenshots or logs**
If applicable, add screenshots or logs to help explain your problem.

**System information**
A description of your system.
- Include the version of SageMaker Training Toolkit you are using.
- If you are using a [prebuilt Amazon SageMaker Docker image](https://docs.aws.amazon.com/sagemaker/latest/dg/pre-built-containers-frameworks-deep-learning.html), provide the URL.
- If you are using a custom Docker image, provide:
- framework name (eg. PyTorch)
- framework version
- Python version
- processing unit type (ie. CPU or GPU)

**Additional context**
Add any other context about the problem here.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.