-
Notifications
You must be signed in to change notification settings - Fork 119
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
Adds wandb example #1673
Adds wandb example #1673
Conversation
Signed-off-by: Thomas J. Fan <thomasjpfan@gmail.com>
Signed-off-by: Thomas J. Fan <thomasjpfan@gmail.com>
docs/index.md
Outdated
@@ -130,6 +130,7 @@ auto_examples/snowflake_agent/index | |||
auto_examples/k8s_spark_plugin/index | |||
auto_examples/sql_plugin/index | |||
auto_examples/kftensorflow_plugin/index | |||
auto_examples/wandb_plugin/index |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cosmicBboy From the CI issue is there another place I need to add auto_examples/wandb_plugin/index
to the toc?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, so this index.md
page actually isn't used any more (we still haven't sunsetted the old docs @ppiegaze @neverett, we need to decide when we want to do this). it's fine if it's here, but the entry needs to be added somewhere on this page: https://github.com/flyteorg/flytesnacks/blob/master/docs/integrations.md in the appropriate list-table
directive.
For context:
The sphinx dark magic that's happening here is, these list tables are being picked up in the flyte docs here and converted into {list-table-toc}
s that automatically add them to the flyte monodocs toc: https://github.com/flyteorg/flyte/blob/master/docs/_ext/import_projects.py#L59-L81
Signed-off-by: Thomas J. Fan <thomasjpfan@gmail.com>
Signed-off-by: Thomas J. Fan <thomasjpfan@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a few comments, otherwise LGTM. Mainly I changed "Weights & Biases" to "Weights and Biases" for consistency.
examples/wandb_plugin/README.md
Outdated
.. tags:: Integration, Data, Metrics, Intermediate | ||
``` | ||
|
||
The Weights & Biases MLOps platform helps AI developers streamline their ML workflow from end-to-end. This plugin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Weights & Biases MLOps platform helps AI developers streamline their ML workflow from end-to-end. This plugin | |
The Weights and Biases MLOps platform helps AI developers streamline their ML workflows from end to end. This plugin |
|
||
# %% | ||
# The `wandb_init` decorator calls `wandb.init` and configures it to use Flyte's | ||
# execution id as Weight and Biases run id. The body of the task is XGBoost training |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# execution id as Weight and Biases run id. The body of the task is XGBoost training | |
# execution id as the Weights and Biases run id. The body of the task is XGBoost training |
examples/wandb_plugin/README.md
Outdated
@@ -0,0 +1,20 @@ | |||
(wandb)= | |||
|
|||
# Weights & Biases |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# Weights & Biases | |
# Weights and Biases |
docs/integrations.md
Outdated
@@ -40,6 +40,8 @@ Flytekit functionality. These plugins can be anything and for comparison can be | |||
- Convert ML models to ONNX models seamlessly. | |||
* - {doc}`DuckDB <auto_examples/duckdb_plugin/index>` | |||
- Run analytical queries using DuckDB. | |||
* - {doc}`Weights & Biases <auto_examples/wandb_plugin/index>` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* - {doc}`Weights & Biases <auto_examples/wandb_plugin/index>` | |
* - {doc}`Weights and Biases <auto_examples/wandb_plugin/index>` |
|
||
|
||
# %% [markdown] | ||
# To enable dynamic log links add plugin to Flyte's configuration file: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# To enable dynamic log links add plugin to Flyte's configuration file: | |
# To enable dynamic log links, add the plugin to Flyte's configuration file: |
looks like we need to publish this on pypi? |
Yea, flyteorg/flytekit#2405 needs to be merged first and we need to do a release. |
To test you can replace the imagespec with: @task(
container_image="ghcr.io/thomasjpfan/wandb:0.0.4",
secret_requests=[wandb_secret],
)
@wandb_init(project=WANDB_PROJECT, entity=WANDB_ENTITY, secret=wandb_secret) If you want to use the image builder: REGISTRY = "localhost:30000"
wandb_package = "git+https://github.com/thomasjpfan/flytekit.git@925f2a3403f605f4ef018893b99ae68ec81fdae4#egg=flytekitplugins-wandb&subdirectory=plugins/flytekit-wandb"
image = ImageSpec(
name="wandb_example",
apt_packages=["git"],
python_version="3.11",
packages=["xgboost", "scikit-learn", wandb_package],
registry=REGISTRY,
) |
Signed-off-by: Thomas J. Fan <thomasjpfan@gmail.com>
Signed-off-by: Thomas J. Fan <thomasjpfan@gmail.com>
This is an wandb example associated with flyteorg/flytekit#2405
You can replace the
container_image
with:If you want to use the image builder:
Note, that we need to merge flyteorg/flytekit#2405 first before the example can run as is.