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

Vertex AI Experiment Tracker Integration #3260

Open
wants to merge 21 commits into
base: develop
Choose a base branch
from

Conversation

nkhusainov
Copy link

@nkhusainov nkhusainov commented Dec 11, 2024

Describe changes

This PR contains implementation of Vertex AI Experiment Tracker

TO DO

  • Add docs
  • Add examples

Pre-requisites

Please ensure you have done the following:

  • I have read the CONTRIBUTING.md document.
  • I have added tests to cover my changes.
  • I have based my new branch on develop and the open PR is targeting develop. If your branch wasn't based on develop read Contribution guide on rebasing branch to develop.
  • IMPORTANT: I made sure that my changes are reflected properly in the following resources:
    • ZenML Docs
    • Dashboard: Needs to be communicated to the frontend team.
    • Templates: Might need adjustments (that are not reflected in the template tests) in case of non-breaking changes and deprecations.
    • Projects: Depending on the version dependencies, different projects might get affected.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Other (add details above)

@CLAassistant
Copy link

CLAassistant commented Dec 11, 2024

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

coderabbitai bot commented Dec 11, 2024

Important

Review skipped

Auto reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@strickvl strickvl added the enhancement New feature or request label Dec 11, 2024
@htahir1 htahir1 requested a review from schustmi December 12, 2024 08:10
Copy link
Contributor

@schustmi schustmi left a comment

Choose a reason for hiding this comment

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

This looks great already @nkhusainov!

@nkhusainov nkhusainov force-pushed the feature/vertexai-experiment-tracker branch from 8f4b2ee to a8e3d84 Compare December 13, 2024 09:12
Copy link
Contributor

@hyperlint-ai hyperlint-ai bot left a comment

Choose a reason for hiding this comment

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

The style guide flagged several spelling errors that seemed like false positives. We skipped posting inline suggestions for the following words:

  • MLOps

Note: We resolved prior Hyperlint review comments because:

We updated our inline suggestion AI.

We do this to avoid keeping outdated or irrelevant comments around. We'll leave a new review with current comments below.

Copy link
Contributor

@htahir1 htahir1 left a comment

Choose a reason for hiding this comment

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

Reviewed the docs only. Looks so great!

docs/book/component-guide/experiment-trackers/vertexai.md Outdated Show resolved Hide resolved
docs/book/component-guide/experiment-trackers/vertexai.md Outdated Show resolved Hide resolved
Copy link
Contributor

Choose a reason for hiding this comment

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

This is great - but just as a small wish I'd love to see a screenshot of how it looks like on Vertex just to show it to users.

Also there is nothing about Tensorboard, and I know that that is a parameter in the implementation. Should that maybe stand out a bit as a special case?

Copy link
Author

Choose a reason for hiding this comment

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

Thanks for the feedback, good suggestions! I'll add Tensorboard examples and several screenshots

Copy link
Author

Choose a reason for hiding this comment

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

I've added 2 examples:

  1. Logging Metrics Using Built-in Methods
This example works well.
  2. Uploading TensorBoard Logs
This example is an interesting use case as it allows uploading TensorBoard logs. However, there are several technical challenges to address, and I’d like your advice on how best to resolve them:
    1. Accessing Experiment and Run Names
The start_upload_tb_log method requires experiment and run names, which are set at runtime.
      • Code Reference 1
      • Code Reference 2
        Question:
What is the best way to access these variables?
One option is to set them as object attributes during prepare_step_run, but this approach feels suboptimal. Are there cleaner alternatives?
    2. Handling Credentials
Currently, there is no way to pass credentials explicitly to the start_upload_tb_log method. It relies on GCP default credentials, which are environment-dependent.
Question:
What would be a better approach to manage credentials for this method?

Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm good questions. I'm also not sure - probably the best way right now is to set them in the experiment tracker class and then fetch them using client.active_stack.experiment_tracker.XYZ...

In case of credentials, one could leverage service connectors, but I think its a safe assumption that the vertex execution role has the required credentials .. so i'd leave that be for now

Copy link
Author

Choose a reason for hiding this comment

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

Done

nkhusainov and others added 4 commits December 16, 2024 10:48
Copy link
Contributor

@hyperlint-ai hyperlint-ai bot left a comment

Choose a reason for hiding this comment

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

The style guide flagged several spelling errors that seemed like false positives. We skipped posting inline suggestions for the following words:

  • MLOps

@nkhusainov
Copy link
Author

@htahir1 , @schustmi Vertex AI Experiment Tracker requires google-cloud-aiplatform[tensorboard,autologging] to be installed. Should I update zenml gcp integration ?

@htahir1 htahir1 marked this pull request as ready for review December 25, 2024 14:00
@htahir1
Copy link
Contributor

htahir1 commented Dec 25, 2024

@nkhusainov i think you can check for it maybe in code and throw an error rather than having it as part of the gcp integration

@nkhusainov
Copy link
Author

@nkhusainov i think you can check for it maybe in code and throw an error rather than having it as part of the gcp integration

At which point in time do you see this check happening?

  • During the experiment tracker initialization ? (e.g., here)
  • or at prepare_step_run? prepare_step_run

Do you have a utility I can reuse (maybe this one ) Or should I create my own?

@htahir1
Copy link
Contributor

htahir1 commented Dec 26, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants