Valohai doesn't support list typed parameters. The currently supported parameter types are string, integer, float, and flag.
There is a workaround, where you'd use a string type parameter and define the list as comma-separated values.
- name: epoch_str
type: string
default: 4,5,6,7,8
multiple-separator: ','
multiple: separate
In your python script you can then parse the parameter with argparse:
import argparse
def parse_args():
parser = argparse.ArgumentParser()
parser.add_argument('--epoch_str', type=lambda arg: arg.split(','))
return parser.parse_args()
args = parse_args()
for x in args.epoch_str:
# Use the parameters
That will result in a list with strings. Note that you will need to convert the parameter values to for example integers or floats depending on your use case.
Comments
0 comments
Please sign in to leave a comment.