Separate ${args_no_hyphens} keys and values with whitespace instead of equal sign

Hi! I’m using Wandb sweeps for a project based on Detectron2 configs

sweep_configuration = {
        'method': 'grid',
        'name': 'Bipartite',
        'command': ['python', '${program}', '--config', yaml_conf, '--eval-only', '${args_no_hyphens}'],
        'program': f"",
        'description': '',
        'parameters': {
            'MODEL.X': {
                'value': 'y'

which translates to

python --config yaml_conf --eval-only MODEL.X=y

But Detectron2 expects the following:

python --config yaml_conf --eval-only MODEL.X y

Is there any way to separate ${args_no_hyphens} keys and values with whitespace instead of =?

Hi @nialda , happy to help. In sweeps, the command substitution variable ${args_no_hyphens} automatically formats the arguments with = between keys and values. Unfortunately, there isn’t a built-in way to change this behavior to use whitespace instead of = directly within the sweep configuration.

However, you could try to work around this by using a wrapper script that reformats the arguments before passing them to the script . You would need to update your sweep configuration to use the instead of calling directly.

Hi @nialda , since we have not heard back from you we are going to close this request. If you would like to re-open the conversation, please let us know!