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

Update ray-tune.md #943

Merged
merged 3 commits into from
Jan 9, 2025
Merged

Update ray-tune.md #943

merged 3 commits into from
Jan 9, 2025

Conversation

ash0ts
Copy link
Contributor

@ash0ts ash0ts commented Dec 9, 2024

Description

What does the pull request do? If it fixes a bug or resolves a feature request, be sure to link to that issue.

Ticket

Does this PR fix an existing issue? If yes, provide a link to the ticket here: https://wandb.atlassian.net/browse/GROWTH2-358

Checklist

Check if your PR fulfills the following requirements. Put an X in the boxes that apply.

  • Files I edited were previewed on my local development server with yarn start. My changes did not break the local preview.
  • Build (yarn docusaurus build) was run locally and successfully without errors or warnings.
  • I merged the latest changes from main into my feature branch before submitting this PR.

@ash0ts ash0ts requested a review from a team as a code owner December 9, 2024 17:35
docs/guides/integrations/other/ray-tune.md Outdated Show resolved Hide resolved
@@ -7,7 +7,7 @@

W&B integrates with [Ray](https://github.com/ray-project/ray) by offering two lightweight integrations.

One is the `WandbLoggerCallback`, which automatically logs metrics reported to Tune to the Wandb API. The other one is the `@wandb_mixin` decorator, which can be used with the function API. It automatically initializes the Wandb API with Tunes training information. You can just use the Wandb API like you would normally do, e.g. using `wandb.log()` to log your training process.
One is the `WandbLoggerCallback`, which automatically logs metrics reported to Tune to the Wandb API. The other one is the `setup_wandb()` function, which can be used with the function API. It automatically initializes the Wandb API with Tune's training information. You can just use the Wandb API like you would normally do, e.g. using `wandb.log()` to log your training process.
Copy link

Choose a reason for hiding this comment

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

📝 [vale] reported by reviewdog 🐶
[Google.Passive] In general, use active voice instead of passive voice ('be used').

docs/guides/integrations/other/ray-tune.md Outdated Show resolved Hide resolved
docs/guides/integrations/other/ray-tune.md Outdated Show resolved Hide resolved
docs/guides/integrations/other/ray-tune.md Outdated Show resolved Hide resolved
`excludes (list)` – List of metrics that should be excluded from the `log`.
`excludes (list)` – List of metrics that should be excluded from the log.

`log_config (bool)` – Boolean indicating if the config parameter of the results dict should be logged. Defaults to False.
Copy link

Choose a reason for hiding this comment

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

📝 [vale] reported by reviewdog 🐶
[Google.Passive] In general, use active voice instead of passive voice ('be logged').

docs/guides/integrations/other/ray-tune.md Outdated Show resolved Hide resolved

`log_config (bool)` – Boolean indicating if the config parameter of the results dict should be logged. This makes sense if parameters will change during training, e.g. with `PopulationBasedTraining`. Defaults to False.
`upload_checkpoints (bool)` - If True, model checkpoints will be uploaded to Wandb as artifacts. Defaults to False.
Copy link

Choose a reason for hiding this comment

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

📝 [vale] reported by reviewdog 🐶
[Google.Passive] In general, use active voice instead of passive voice ('be uploaded').

docs/guides/integrations/other/ray-tune.md Outdated Show resolved Hide resolved
docs/guides/integrations/other/ray-tune.md Outdated Show resolved Hide resolved
Copy link

cloudflare-workers-and-pages bot commented Dec 9, 2024

Deploying docodile with  Cloudflare Pages  Cloudflare Pages

Latest commit: 97103d2
Status: ✅  Deploy successful!
Preview URL: https://cacf103a.docodile.pages.dev
Branch Preview URL: https://fix-ray-docs.docodile.pages.dev

View logs

Copy link
Contributor

@mdlinville mdlinville left a comment

Choose a reason for hiding this comment

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

A few small suggestions, and one that is a bit more involved. I'm checking on the Vale check about "WandB". If you get a chance, it might be good to improve the PR title before we merge it

docs/guides/integrations/other/ray-tune.md Outdated Show resolved Hide resolved
docs/guides/integrations/other/ray-tune.md Outdated Show resolved Hide resolved
docs/guides/integrations/other/ray-tune.md Outdated Show resolved Hide resolved
docs/guides/integrations/other/ray-tune.md Outdated Show resolved Hide resolved
docs/guides/integrations/other/ray-tune.md Outdated Show resolved Hide resolved
docs/guides/integrations/other/ray-tune.md Outdated Show resolved Hide resolved
docs/guides/integrations/other/ray-tune.md Outdated Show resolved Hide resolved
@@ -7,7 +7,8 @@ title: Ray Tune

W&B integrates with [Ray](https://github.com/ray-project/ray) by offering two lightweight integrations.

One is the `WandbLoggerCallback`, which automatically logs metrics reported to Tune to the Wandb API. The other one is the `@wandb_mixin` decorator, which can be used with the function API. It automatically initializes the Wandb API with Tune’s training information. You can just use the Wandb API like you would normally do, e.g. using `wandb.log()` to log your training process.
- The`WandbLoggerCallback` function automatically logs metrics reported to Tune to the Wandb API.
Copy link

Choose a reason for hiding this comment

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

🚫 [vale] reported by reviewdog 🐶
[Vale.Terms] Use 'wandb' instead of 'Wandb'.

@@ -7,7 +7,8 @@

W&B integrates with [Ray](https://github.com/ray-project/ray) by offering two lightweight integrations.

One is the `WandbLoggerCallback`, which automatically logs metrics reported to Tune to the Wandb API. The other one is the `@wandb_mixin` decorator, which can be used with the function API. It automatically initializes the Wandb API with Tune’s training information. You can just use the Wandb API like you would normally do, e.g. using `wandb.log()` to log your training process.
- The`WandbLoggerCallback` function automatically logs metrics reported to Tune to the Wandb API.
- The `setup_wandb()` function, which can be used with the function API, automatically initializes the Wandb API with Tune's training information. You can use the Wandb API as usual. such as by using `wandb.log()` to log your training process.
Copy link

Choose a reason for hiding this comment

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

📝 [vale] reported by reviewdog 🐶
[Google.Passive] In general, use active voice instead of passive voice ('be used').

@@ -7,7 +7,8 @@

W&B integrates with [Ray](https://github.com/ray-project/ray) by offering two lightweight integrations.

One is the `WandbLoggerCallback`, which automatically logs metrics reported to Tune to the Wandb API. The other one is the `@wandb_mixin` decorator, which can be used with the function API. It automatically initializes the Wandb API with Tune’s training information. You can just use the Wandb API like you would normally do, e.g. using `wandb.log()` to log your training process.
- The`WandbLoggerCallback` function automatically logs metrics reported to Tune to the Wandb API.
- The `setup_wandb()` function, which can be used with the function API, automatically initializes the Wandb API with Tune's training information. You can use the Wandb API as usual. such as by using `wandb.log()` to log your training process.
Copy link

Choose a reason for hiding this comment

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

🚫 [vale] reported by reviewdog 🐶
[Vale.Terms] Use 'wandb' instead of 'Wandb'.

@@ -7,7 +7,8 @@

W&B integrates with [Ray](https://github.com/ray-project/ray) by offering two lightweight integrations.

One is the `WandbLoggerCallback`, which automatically logs metrics reported to Tune to the Wandb API. The other one is the `@wandb_mixin` decorator, which can be used with the function API. It automatically initializes the Wandb API with Tune’s training information. You can just use the Wandb API like you would normally do, e.g. using `wandb.log()` to log your training process.
- The`WandbLoggerCallback` function automatically logs metrics reported to Tune to the Wandb API.
- The `setup_wandb()` function, which can be used with the function API, automatically initializes the Wandb API with Tune's training information. You can use the Wandb API as usual. such as by using `wandb.log()` to log your training process.
Copy link

Choose a reason for hiding this comment

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

🚫 [vale] reported by reviewdog 🐶
[Vale.Terms] Use 'wandb' instead of 'Wandb'.

@@ -21,101 +22,81 @@

### Parameters

`api_key_file (str)` – Path to file containing the `Wandb API KEY`.
`project (str)`: Name of the Wandb project. Mandatory.
Copy link

Choose a reason for hiding this comment

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

⚠️ [vale] reported by reviewdog 🐶
[Google.Colons] ': N' should be in lowercase.


`excludes (list)` – List of metrics that should be excluded from the `log`.
`api_key (str)`: Wandb API Key. Alternative to setting `api_key_file`.
Copy link

Choose a reason for hiding this comment

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

🚫 [vale] reported by reviewdog 🐶
[Vale.Terms] Use 'wandb' instead of 'Wandb'.


`log_config (bool)` – Boolean indicating if the config parameter of the results dict should be logged. This makes sense if parameters will change during training, e.g. with `PopulationBasedTraining`. Defaults to False.
`excludes (list)`: List of metrics to exclude from the log.
Copy link

Choose a reason for hiding this comment

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

⚠️ [vale] reported by reviewdog 🐶
[Google.Colons] ': L' should be in lowercase.

`log_config (bool)` – Boolean indicating if the config parameter of the results dict should be logged. This makes sense if parameters will change during training, e.g. with `PopulationBasedTraining`. Defaults to False.
`excludes (list)`: List of metrics to exclude from the log.

`log_config (bool)`: Whether to log the config parameter of the results dictionary. Defaults to False.
Copy link

Choose a reason for hiding this comment

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

⚠️ [vale] reported by reviewdog 🐶
[Google.Colons] ': W' should be in lowercase.


`log_config (bool)`: Whether to log the config parameter of the results dictionary. Defaults to False.

`upload_checkpoints (bool)`: If True, model checkpoints are uploaded as artifacts. Defaults to False.
Copy link

Choose a reason for hiding this comment

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

📝 [vale] reported by reviewdog 🐶
[Google.Passive] In general, use active voice instead of passive voice ('are uploaded').

This Ray Tune Trainable `mixin` helps initializing the Wandb API for use with the `Trainable` class or with `@wandb_mixin` for the function API.

For basic usage, just prepend your training function with the `@wandb_mixin` decorator:
This utility function helps initialize Wandb for use with Ray Tune. For basic usage, call `setup_wandb()` in your training function:
Copy link

Choose a reason for hiding this comment

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

🚫 [vale] reported by reviewdog 🐶
[Vale.Terms] Use 'wandb' instead of 'Wandb'.

@mdlinville mdlinville enabled auto-merge (squash) January 9, 2025 21:35
@mdlinville mdlinville merged commit 569e0a4 into main Jan 9, 2025
5 checks passed
@mdlinville mdlinville deleted the fix-ray-docs branch January 9, 2025 21:38
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