valohai / valohai-utils

Python helper library for Valohai
MIT License
2 stars 2 forks source link

Command-line overriding is not working if the parameter name has a '-' #81

Open JuhaKiili opened 2 years ago

JuhaKiili commented 2 years ago

Overriding parameters on the command-line doesn't work if the parameter name has a - character

hello.py

import valohai

params = {
    "my-param": "123",
}
valohai.prepare(step="foo", default_parameters=params)
print(valohai.parameters('my-param).value)

Run:

python hello.py --my-param=666
123

hello2.py

import valohai

params = {
    "myparam": "123",
}
valohai.prepare(step="foo", default_parameters=params)
print(valohai.parameters('my-param).value)

Run:

python hello2.py --myparam=666
666