experiments
experiments copied to clipboard
unintuitive create_experiment api
Doesn't work:
experiment = exp.Experiment(name=name, job_template=job['spec'])
client.create_experiment(experiment)
job = client.create_job(experiment, parameters)
Does:
experiment = exp.Experiment(name=name, job_template=job['spec'])
experiment = client.create_experiment(experiment)
job = client.create_job(experiment, parameters)
The error message received in the first case doesn't make it obvious what the problem is:
HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Job.batch \"hrl-4148c399\" is invalid: metadata.ownerReferences.uid: Invalid value: \"\": uid must not be empty","reason":"Invalid","details":{"name":"hrl-4148c399","group":"batch","kind":"Job","causes":[{"reason":"FieldValueInvalid","message":"Invalid value: \"\": uid must not be empty","field":"metadata.ownerReferences.uid"}]},"code":422}