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

Add Comet Experiment Tracker integration #2620

Merged
merged 9 commits into from
Apr 23, 2024

Conversation

strickvl
Copy link
Contributor

@strickvl strickvl commented Apr 18, 2024

Adds a Comet Experiment Tracker.

CleanShot 2024-04-18 at 22 04 00

Functionality is basic, similar to what we have with wandb.

Basic quickstart:

zenml experiment-tracker register comet --flavor=comet --api_key="MY_KEY" --project_name="zenmltest"

and a simple pipeline:

import logging

from zenml import pipeline, step
from zenml.client import Client

logger = logging.getLogger(__name__)

# Get the Comet experiment tracker from the active stack
experiment_tracker = Client().active_stack.experiment_tracker


@step(experiment_tracker=experiment_tracker.name)
def my_even_bigger_step():
    """A step that does nothing but logs to Comet."""
    logger.info("This is an even bigger step 3!")

    # Log a metric to Comet
    experiment_tracker.log_metrics({"my_metric": 42})

    # Log a parameter to Comet
    experiment_tracker.log_params({"my_param": "hello"})

    return 2


@pipeline(enable_cache=False)
def my_big_pipeline():
    """A pipeline that does nothing but logs to Comet."""
    my_even_bigger_step()


my_big_pipeline()

Remaining Tasks

  • Read and check docs
  • Tests (if we're doing those for this)
  • CI updates (so it gets run in the CI)
  • Minimal example to run in the CI as part of integrations / examples tests?

Summary by CodeRabbit

  • New Features

    • Introduced the Comet Experiment Tracker within ZenML for tracking and visualizing experiments.
    • Added documentation for setting up and using the Comet Experiment Tracker with ZenML.
  • Documentation

    • Added a new guide for the Comet Experiment Tracker, detailing usage, configuration, and integration steps.
  • Integrations

    • Integrated Comet functionality into ZenML, allowing enhanced experiment tracking capabilities.

@strickvl strickvl added enhancement New feature or request internal To filter out internal PRs and issues labels Apr 18, 2024
Copy link
Contributor

coderabbitai bot commented Apr 18, 2024

Important

Auto 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.

Walkthrough

The update integrates Comet Experiment Tracker with ZenML, allowing users to track and visualize experiment data using CometML. This includes the setup of the integration, experiment tracker functionalities, and configuration options for enhanced experiment management and visualization within the Comet UI.

Changes

File Path Change Summary
docs/book/.../comet.md Introduced documentation for Comet Experiment Tracker in ZenML.
src/zenml/integrations/__init__.py Added CometIntegration from zenml.integrations.comet.
src/zenml/integrations/comet/__init__.py Initialized Comet integration in ZenML.
src/zenml/integrations/comet/experiment_trackers/ Introduced CometExperimentTracker class for tracking experiments.
src/zenml/integrations/comet/flavors/ Added CometExperimentTrackerFlavor class, providing specific settings for Comet experiment tracking.
src/zenml/integrations/constants.py Added COMET to constants, listing it as an integration.

🐰✨
In the burrows of code, where data streams flow,
A new tracker emerges, with a comet's glow.
Experiments align, under stars so bright,
ZenML and Comet, in the night unite.
Hop, hop, hurray, let insights take flight! 🚀
🐰✨


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>.
    • 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 generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @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.

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 as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

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
Copy link
Contributor Author

@coderabbitai review

Copy link
Contributor

@bcdurak bcdurak left a comment

Choose a reason for hiding this comment

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

Looks good! A nice addition to the experiment trackers.

The only missing part that I could see is in the docs. Could you add Comet also to the list of available experiment trackers on the main experiment tracker docs page?

@strickvl strickvl requested a review from bcdurak April 22, 2024 06:46
@zenml-io zenml-io deleted a comment from gitguardian bot Apr 22, 2024
Copy link

gitguardian bot commented Apr 22, 2024

⚠️ GitGuardian has uncovered 1 secret following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secret in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
10364910 Triggered Username Password 51bfd62 src/zenml/cli/init.py View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secret safely. Learn here the best practices.
  3. Revoke and rotate this secret.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

Our GitHub checks need improvements? Share your feedbacks!

@strickvl strickvl merged commit 469f92f into develop Apr 23, 2024
56 of 58 checks passed
@strickvl strickvl deleted the feature/comet-ml-experiment-tracker branch April 23, 2024 06:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request internal To filter out internal PRs and issues run-slow-ci
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants