Skip to content

feat: Import client_abc from open source Vizier in Vertex Vizier SDK. - #1619

Closed
halio-g wants to merge 78 commits into
googleapis:mainfrom
halio-g:main
Closed

halio-g wants to merge 78 commits into
googleapis:mainfrom
halio-g:main

Conversation

@halio-g

@halio-g halio-g commented Aug 29, 2022 •

Copy link
Copy Markdown
Contributor

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Fixes #<issue_number_goes_here> 🦕

halio-g and others added 30 commits April 27, 2022 13:41
@halio-g
halio-g requested a review from a team August 29, 2022 20:29
@product-auto-label product-auto-label Bot added size: l Pull request size is large. api: vertex-ai Issues related to the googleapis/python-aiplatform API. labels Aug 29, 2022
Comment thread google/cloud/aiplatform/vizier/study.py
Comment thread google/cloud/aiplatform/vizier/trial.py
@halio-g
halio-g requested a review from sasha-gitg September 6, 2022 17:42
Comment thread google/cloud/aiplatform/vizier/trial.py Outdated
@rosiezou rosiezou added do not merge Indicates a pull request not ready for merge, due to either quality or timing. and removed do not merge Indicates a pull request not ready for merge, due to either quality or timing. labels Sep 8, 2022
@sararob sararob added do not merge Indicates a pull request not ready for merge, due to either quality or timing. and removed do not merge Indicates a pull request not ready for merge, due to either quality or timing. labels Sep 15, 2022
@halio-g
halio-g requested a review from a team September 30, 2022 20:21

@classmethod
def from_uid(
def from_resource_name(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is a change to the public interface. It could potentially break existing customers' code.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We can create another function of it. If it makes more sense.

]

def materialize_study_config(self) -> vz.StudyConfig:
def materialize_problem_statement(self) -> vz.ProblemStatement:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

same comment as the one I left for def from_resource_name. I think this constitutes a breaking change.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We can create another function of it. If it makes more sense.

cls,
display_name: str,
problem: vz.ProblemStatement,
problem: vz.StudyConfig,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks like ProblemStatement is imported in pyvizier/__init__.py. Is the class no longer being used and its features are now completely replaced and/or incapsulated in StudyConfig?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The ProblemStatement is the rename of Study config.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

ProblemStatement is the base class for StudyConfig, so both can be used from a pytype perspective.
Using StudyConfig here means that we want the Vertex specific StudyConfig, and not any subclass of ProblemStatement.

We expect Vertex users to only create StudyConfig objects, not ProblemStatement objects.

def from_resource_name(
cls: Type[_T],
uid: str,
name: str,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

same comment as above. This is a breaking change for customers who use keyword arguments in their function calls

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Looks like the Vertex Vizier SDK is not used too much by the customers. I think it's fine to make the change on the API ? https://datastudio.google.com/c/u/0/reporting/d8a64931-8a91-4f07-9abc-93fece2e318d/page/p_n2odnmsgmc


def should_stop(self) -> bool:
"""Returns true if the Trial should stop."""
def check_early_stopping(self) -> bool:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

same comment as above. this is a breaking change

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Looks like the Vertex Vizier SDK is not used too much by the customers. I think it's fine to make the change on the API ? https://datastudio.google.com/c/u/0/reporting/d8a64931-8a91-4f07-9abc-93fece2e318d/page/p_n2odnmsgmc

@nayaknishant nayaknishant added the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Sep 30, 2022

@sagipe sagipe left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

halio@ this LGTM from my side. Please address other comments.

@sararob sararob removed the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Oct 4, 2022
@sararob

sararob commented Oct 7, 2022

Copy link
Copy Markdown
Contributor

We are doing maintenance on our repo starting today and need to close all open PRs. When this is done next week, you'll be able to open a new PR.

@sararob sararob closed this Oct 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: vertex-ai Issues related to the googleapis/python-aiplatform API. size: l Pull request size is large.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants