Skip to content

Commit 2d4c71a

Browse files
authored
fix no attribute (#35511)
1 parent 4e51ac6 commit 2d4c71a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sdk/ml/azure-ai-ml/azure/ai/ml/entities/_job/_input_output_helpers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ def to_rest_dataset_literal_inputs(
219219
# set mode attribute manually for binding job input
220220
if input_value.mode:
221221
input_data.mode = INPUT_MOUNT_MAPPING_TO_REST[input_value.mode]
222-
if input_value.path_on_compute:
222+
if getattr(input_value, "path_on_compute", None) is not None:
223223
input_data.pathOnCompute = input_value.path_on_compute
224224
input_data.job_input_type = JobInputType.LITERAL
225225
else:
@@ -337,7 +337,7 @@ def to_rest_data_outputs(outputs: Optional[Dict]) -> Dict[str, RestJobOutput]:
337337
asset_version=output_value.version,
338338
uri=output_value.path,
339339
mode=OUTPUT_MOUNT_MAPPING_TO_REST[output_value.mode.lower()] if output_value.mode else None,
340-
pathOnCompute=output_value.path_on_compute if output_value.path_on_compute else None,
340+
pathOnCompute=getattr(output_value, "path_on_compute", None),
341341
description=output_value.description,
342342
)
343343
else:

0 commit comments

Comments
 (0)