Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(PipelineJob): use name as output only field #719

Merged
merged 3 commits into from Sep 22, 2021

Conversation

ji-yaqi
Copy link
Contributor

@ji-yaqi ji-yaqi commented Sep 20, 2021

Previously, create_time is used to identify whether a job has been created. Now since we have job_id fixed, we could leave name out for output only and identify whether a job has been created using name.

@product-auto-label product-auto-label bot added the api: aiplatform Issues related to the AI Platform API. label Sep 20, 2021
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Sep 20, 2021
Copy link
Contributor

@ivanmkc ivanmkc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -178,19 +175,18 @@ def __init__(
)

pipeline_name = pipeline_job["pipelineSpec"]["pipelineInfo"]["name"]
job_id = job_id or "{pipeline_name}-{timestamp}".format(
self.job_id = job_id or "{pipeline_name}-{timestamp}".format(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know this is existing code, but why isn't there a way to get the job_id directly from the service instead of deriving it in the client SDK.

This seems like it could break if the service changes how job ID's are generated.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think job_id was provided by the user, or generated by the system and only used during run command but not the instance generation process. That's why we need to store it somewhere, since it wasn't used during the instance creation.

Name shouldn't be passed in since it was an output-only field and was wrongly passed in previously. Although the services generated the name using the same way.

@ji-yaqi
Copy link
Contributor Author

ji-yaqi commented Sep 21, 2021

/retest

@ji-yaqi ji-yaqi merged commit 1c84464 into googleapis:main Sep 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: aiplatform Issues related to the AI Platform API. cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants