f67e0f54ef3b6b253d29bf8a86c20944ec6bd7b5,tests/test_ops/test_operations.py,TestOperationsConfigs,test_param_validation_with_outputs,#TestOperationsConfigs#,65
Before Change
],
}
op = BaseOpConfig.from_dict(config_dict)
assert op.params == config_dict["params"]
def test_required_input_no_param_only_validated_on_run(self):
// Inputs
config_dict = {
After Change
outputs=None, is_template=False)
def test_param_validation_with_outputs(self):
config_dict = {
"outputs": [
{"name": "param1", "type": IOTypes.STR},
{"name": "param2", "type": IOTypes.INT},
{"name": "param3", "type": IOTypes.FLOAT},
{"name": "param4", "type": IOTypes.BOOL},
{"name": "param5", "type": IOTypes.DICT},
{"name": "param6", "type": IOTypes.LIST},
{"name": "param7", "type": IOTypes.GCS_PATH},
{"name": "param8", "type": IOTypes.S3_PATH},
{"name": "param9", "type": IOTypes.AZURE_PATH},
{"name": "param10", "type": IOTypes.PATH},
{"name": "param11", "type": IOTypes.METRIC},
{"name": "param12", "type": IOTypes.METADATA},
{"name": "param13", "type": IOTypes.METADATA},
{"name": "param14", "type": IOTypes.METADATA},
],
}
op = BaseOpConfig.from_dict(config_dict)
params = {
"param1": "text",
"param2": 12,
"param3": 13.3,
"param4": False,
"param5": {"foo": "bar"},
"param6": [1, 3, 45, 5],
"param7": "gs://bucket/path/to/blob/",
"param8": "s3://test/this/is/bad/key.txt",
"param9": "wasbs://container@user.blob.core.windows.net/",
"param10": "/foo/bar",
"param11": 124.4,
"param12": {"foo": 124.4},
"param13": {"foo": "bar"},
"param14": {"foo": ["foo", 124.4]},
}
validated_params = ops_params.validate_params(params=params, inputs=None,
outputs=op.outputs, is_template=False)
assert params == {p.name: p.value for p in validated_params}
// Passing missing params
params.pop("param1")
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances
Project Name: polyaxon/polyaxon
Commit Name: f67e0f54ef3b6b253d29bf8a86c20944ec6bd7b5
Time: 2019-09-22
Author: contact@polyaxon.com
File Name: tests/test_ops/test_operations.py
Class Name: TestOperationsConfigs
Method Name: test_param_validation_with_outputs
Project Name: polyaxon/polyaxon
Commit Name: f67e0f54ef3b6b253d29bf8a86c20944ec6bd7b5
Time: 2019-09-22
Author: contact@polyaxon.com
File Name: tests/test_ops/test_operations.py
Class Name: TestOperationsConfigs
Method Name: test_experiment_and_job_refs_params
Project Name: polyaxon/polyaxon
Commit Name: f67e0f54ef3b6b253d29bf8a86c20944ec6bd7b5
Time: 2019-09-22
Author: contact@polyaxon.com
File Name: tests/test_ops/test_operations.py
Class Name: TestOperationsConfigs
Method Name: test_param_validation_with_inputs