Pipeline_run to_json_structure() crashes when env_var D3MCPU is set.
I encountered this error when I try storing a pipeline run, this works when I do not set the enviroment variable D3MCPU.
Failed validating 'type' in schema['properties']['environment']['properties']['resources']['properties']['cpu']['properties']['configured_available']:
{'description': 'The amount of CPU resources available to the pipeline '
'runtime in Kubernetes CPU units or equivalent. See '
'https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/#meaning-of-cpu '
'for more information.',
'type': 'string'}
On instance['environment']['resources']['cpu']['configured_available']:
3
Traceback (most recent call last):
File "/user_dev/modules/manager/workers.py", line 495, in _search_score_worker
save_pipeline_run(list(fit_pipeline_runs)+list(produce_pipeline_runs))
File "/user_dev/modules/utils/schemas_utils.py", line 325, in save_pipeline_run
save_run_path = os.path.join(Path.PIPELINE_RUNS, pipeline_run.to_json_structure()['id'] + '.yml')
File "/usr/local/lib/python3.6/dist-packages/d3m/metadata/pipeline_run/pipeline_run.py", line 96, in to_json_structure
PIPELINE_RUN_SCHEMA_VALIDATOR.validate(json_structure)
File "/usr/local/lib/python3.6/dist-packages/jsonschema/validators.py", line 130, in validate
raise error
jsonschema.exceptions.ValidationError: 3 is not of type 'string'
Failed validating 'type' in schema['properties']['environment']['properties']['resources']['properties']['cpu']['properties']['configured_available']:
{'description': 'The amount of CPU resources available to the pipeline '
'runtime in Kubernetes CPU units or equivalent. See '
'https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/#meaning-of-cpu '
'for more information.',
'type': 'string'}
On instance['environment']['resources']['cpu']['configured_available']:
3
Edited by dmartinez05