Skip to content

Commit

Permalink
chore(sdk): fix error 'ApiResourceReference' object has no attribute …
Browse files Browse the repository at this point in the history
…'id' (#6997)

* chore(sdk): fix error 'ApiResourceReference' object has no attribute 'id'

* fix more
  • Loading branch information
Bobgy authored Dec 3, 2021
1 parent 636503c commit bc7aad8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions sdk/python/kfp/cli/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ def _print_pipeline_versions(versions: List[kfp_server_api.ApiPipelineVersion],
version.created_at.isoformat(),
next(rr
for rr in version.resource_references
if rr.key.type == kfp_server_api.ApiResourceType.PIPELINE).id
if rr.key.type == kfp_server_api.ApiResourceType.PIPELINE).key.id
]
for version in versions]
print_output(data, headers, output_format, table_format="grid")
Expand Down Expand Up @@ -252,7 +252,7 @@ def _display_pipeline_version(version: kfp_server_api.ApiPipelineVersion,
output_format: OutputFormat):
pipeline_id = next(
rr for rr in version.resource_references
if rr.key.type == kfp_server_api.ApiResourceType.PIPELINE).id
if rr.key.type == kfp_server_api.ApiResourceType.PIPELINE).key.id
table = [["Pipeline ID", pipeline_id], ["Version name", version.name],
["Uploaded at", version.created_at.isoformat()],
["Version ID", version.id]]
Expand Down
2 changes: 1 addition & 1 deletion sdk/python/kfp/cli/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ def _print_runs(runs: List[kfp_server_api.ApiRun], output_format: OutputFormat):
run.created_at.isoformat(),
next(rr
for rr in run.resource_references
if rr.key.type == kfp_server_api.ApiResourceType.EXPERIMENT).id
if rr.key.type == kfp_server_api.ApiResourceType.EXPERIMENT).key.id
]
for run in runs]
print_output(data, headers, output_format, table_format='grid')

0 comments on commit bc7aad8

Please sign in to comment.