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

Adds neptune plugin example #1723

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

thomasjpfan
Copy link
Member

This PR adds documentation for the neptune plugin.

Signed-off-by: Thomas J. Fan <thomasjpfan@gmail.com>
Signed-off-by: Thomas J. Fan <thomasjpfan@gmail.com>
Copy link
Contributor

@neverett neverett left a comment

Choose a reason for hiding this comment

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

Requesting changes since I think there are a few references to weights & biases that should be Neptune instead (but let me know if not!)

.. tags:: Integration, Data, Metrics, Intermediate
```

Neptune is the MLOps stack component for experiment tracking. It offers a single place to log, compare, store, and collaborate on experiments and models. This plugin enables seamless use of Neptune within Flyte by configuring links between the two platforms.
Copy link
Contributor

Choose a reason for hiding this comment

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

I would link to Neptune docs here (assuming that's https://docs.neptune.ai/)

pip install flytekitplugins-neptune
```

To enable dynamic log links, add plugin to Flyte's configuration file:
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
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:

@@ -0,0 +1,29 @@
(neptune)=

# Neptune
Copy link
Contributor

Choose a reason for hiding this comment

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

I recommend formatting this README like the other agent READMEs with Installation, Example usage, Local testing, and Flyte deployment configuration sections -- see https://docs.flyte.org/en/latest/flytesnacks/examples/openai_batch_agent/index.html for an example.

# %% [markdown]
# (neptune_example)=
#
# # Neptune Example
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
# # Neptune Example
# # Neptune example

from flytekitplugins.neptune import neptune_init_run

# %% [markdown]
# First, we specify the neptune project that we will use with Neptune
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
# First, we specify the neptune project that we will use with Neptune
# First, we specify the Neptune project that we will use with Neptune.


# %% [mardkwon]
# Next, we use `ImageSpec` to construct a container with the dependencies for our
# XGBoost training task. Please set the `REGISTRY` to an registry that your cluster can access;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
# XGBoost training task. Please set the `REGISTRY` to an registry that your cluster can access;
# XGBoost training task. Please set the `REGISTRY` to a registry that your cluster can access.

# %%
# Next, we use the `neptune_init_run` decorator to configure Flyte to train an XGBoost
# model. The decorator requires an `api_key` secret to authenticate with Neptune and
# the task definition needs to requests the same `api_key` secret. In the training
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
# the task definition needs to requests the same `api_key` secret. In the training
# the task definition needs to request the same `api_key` secret. In the training

# %% [markdown]
# First, we specify the neptune project that we will use with Neptune
# Please update `NEPTUNE_PROJECT` to the value associated with your account.
WANDB_PROJECT = "username/project"
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this be NEPTUNE_PROJECT instead of WANDB_PROJECT?

secret_requests=[api_key],
requests=Resources(cpu="2", mem="4Gi"),
)
@neptune_init_run(project=WANDB_PROJECT, secret=api_key)
Copy link
Contributor

Choose a reason for hiding this comment

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

If WANDB_PROJECT is changed above, this should also be updated.



# %%
# With Flyte's dynamic workflows, we scale up multiple training jobs with different
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
# With Flyte's dynamic workflows, we scale up multiple training jobs with different
# With Flyte's dynamic workflows, we can scale up multiple training jobs with different

Signed-off-by: Thomas J. Fan <thomasjpfan@gmail.com>
Signed-off-by: Thomas J. Fan <thomasjpfan@gmail.com>
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.

2 participants