sagemaker-training-toolkit icon indicating copy to clipboard operation
sagemaker-training-toolkit copied to clipboard

Hyperparameters not shell escaped

Open bstriner opened this issue 3 years ago • 0 comments

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, 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.

bstriner avatar May 23 '22 20:05 bstriner