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

align with core changes #14

Merged
merged 2 commits into from
Jan 31, 2024
Merged

align with core changes #14

merged 2 commits into from
Jan 31, 2024

Conversation

avishniakov
Copy link
Contributor

@avishniakov avishniakov commented Jan 31, 2024

zenml-io/zenml#2375

Summary by CodeRabbit

  • Refactor
    • Updated the dataset loading process in pipelines for improved efficiency and maintainability.
  • Documentation
    • Revised Quickstart guide to reflect changes in dataset loading methods.

Copy link

coderabbitai bot commented Jan 31, 2024

Warning

Rate Limit Exceeded

@avishniakov has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 24 minutes and 55 seconds before requesting another review.

How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.
Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.
Please see our FAQ for further information.

Commits Files that changed from the base of the PR and between 3897c2e and 2390337.

Walkthrough

The recent update signifies a shift in how datasets are managed and retrieved within the project's infrastructure. By transitioning from the ExternalArtifact interface to utilizing the Client class from zenml.client, both the training function and the quickstart notebook now adopt a more streamlined approach for dataset artifact handling. This change enhances the efficiency and simplicity of loading datasets into pipelines, reflecting an effort to refine and optimize data operations.

Changes

File Path Change Summary
template/.../training.py Replaced ExternalArtifact with Client from zenml.client for dataset artifact retrieval.
template/quickstart.ipynb Switched from ExternalArtifact to Client().get_artifact_version for loading datasets.

🐇✨
In the world of code, where changes abide,
A rabbit hopped along, with a joyful stride.
"From artifacts old, to clients anew,
Together we leap, to vistas in view!"
🌟🐾

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-tests for this file.
  • 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 tests 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 from git and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit tests.
    • @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.
  • The JSON schema for the configuration file is available here.
  • 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/coderabbit-overrides.v2.json

CodeRabbit Discord Community

Join our Discord Community to get help, request features, and share feedback.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 6dbf10f and 3897c2e.
Files selected for processing (2)
  • template/pipelines/training.py (2 hunks)
  • template/quickstart.ipynb (4 hunks)
Additional comments: 7
template/pipelines/training.py (3)
  • 7-8: The import changes correctly reflect the transition from using ExternalArtifact to the Client class for dataset artifact retrieval. This aligns with the PR objectives.
  • 47-49: The instantiation of the Client class and the use of get_artifact_version for dataset retrieval are correctly implemented. However, ensure that name_id_or_prefix is the correct parameter name expected by get_artifact_version and that it can accept UUID objects directly, as the function is being passed train_dataset_id and test_dataset_id which are of type Optional[UUID].
  • 44-52: > 📝 NOTE

This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [50-62]

The logic for model training, evaluation, and promotion within the training function appears to be unchanged and correctly implemented. Ensure that the rest of the pipeline, including model_trainer, model_evaluator, and model_promoter steps, are compatible with the new dataset artifact objects returned by get_artifact_version.

template/quickstart.ipynb (4)
  • 145-145: The import statement correctly includes the Client class, aligning with the PR objectives to use the Client for dataset artifact retrieval in the notebook. This is a necessary change for the subsequent use of Client().get_artifact_version.
  • 145-145: The instantiation of the Client class is correctly placed at the beginning of the relevant code cell, ensuring that the client is available for artifact retrieval operations throughout the notebook. This setup is consistent with best practices for structuring code in Jupyter notebooks.
  • 631-632: The usage of client.get_artifact_version with id as the parameter for fetching dataset artifacts is correct. However, ensure that the id parameter is the correct way to reference artifacts by their UUID and that the function call matches the expected signature in the Client class. This is crucial for the correct operation of the training pipeline within the notebook.
  • 984-984: The use of client.get_artifact_version for fetching the preprocessing pipeline artifact by its ID is correctly implemented. This demonstrates a consistent approach to artifact retrieval throughout the notebook, aligning with the PR objectives. Ensure that the preprocess_pipeline_id is correctly passed and utilized in subsequent steps for preprocessing and inference.

@avishniakov avishniakov merged commit ef7cbb1 into main Jan 31, 2024
13 checks passed
@avishniakov avishniakov deleted the 2024.01.22 branch January 31, 2024 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant