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

[tune] Add hook to get project/group for W&B integration #31035

Merged
merged 7 commits into from
Dec 14, 2022

Conversation

nikitavemuri
Copy link
Contributor

@nikitavemuri nikitavemuri commented Dec 12, 2022

Why are these changes needed?

  • Allow setting the W&B project and group environment variables from an external hook if it is not already passed to the WandbLoggerCallback and setup_wandb
  • Add remaining external hooks to setup_wandb

Related issue number

Checks

  • I've signed off every commit(by using the -s flag, i.e., git commit -s) in this PR.
  • I've run scripts/format.sh to lint the changes in this PR.
  • I've included any doc changes needed for https://docs.ray.io/en/master/.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/
  • Testing Strategy
    • Unit tests
    • Release tests
    • This PR is not tested :(

Signed-off-by: Nikita Vemuri <nikitavemuri@gmail.com>
Signed-off-by: Nikita Vemuri <nikitavemuri@gmail.com>
Signed-off-by: Nikita Vemuri <nikitavemuri@gmail.com>
@nikitavemuri nikitavemuri marked this pull request as ready for review December 12, 2022 22:37
Copy link
Contributor

@krfricke krfricke 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 to me. Should this also be included in setup_wandb()?

Signed-off-by: Nikita Vemuri <nikitavemuri@gmail.com>
Signed-off-by: Nikita Vemuri <nikitavemuri@gmail.com>
@nikitavemuri nikitavemuri changed the title [tune] Add hook to get project/group for WandbLoggerCallback [tune] Add hook to get project/group for W&B integration Dec 13, 2022
@nikitavemuri
Copy link
Contributor Author

Yes, good point. I updated setup_wandb to contain all the external hooks and manually tested the e2e examples. @krfricke Could you take another look?

Copy link
Contributor

@krfricke krfricke left a comment

Choose a reason for hiding this comment

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

Just a nit

Comment on lines 1747 to 1748
os.environ["WANDB_PROJECT_NAME"] = "test_project"
os.environ["WANDB_GROUP_NAME"] = "test_group"
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we import WANDB_PROJECT_ENV_VAR and WANDB_GROUP_ENV_VAR here? (locally)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was seeing a ModuleNotFoundError: No module named 'pandas' error on the minimal install tests (https://buildkite.com/ray-project/oss-ci-build-pr/builds/7359#01850810-6f61-4017-82c0-f953782b0e9b) when I tried that previously because the test_utils files was importing various files from tune

Copy link
Contributor

Choose a reason for hiding this comment

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

Does this happen also with local imports in the function?

Signed-off-by: Nikita Vemuri <nikitavemuri@gmail.com>
Signed-off-by: Nikita Vemuri <nikitavemuri@gmail.com>
@krfricke krfricke merged commit 03f0f54 into ray-project:master Dec 14, 2022
WeichenXu123 pushed a commit to WeichenXu123/ray that referenced this pull request Dec 19, 2022
…#31035)

- Allow setting the W&B project and group environment variables from an external hook if it is not already passed to the `WandbLoggerCallback` and `setup_wandb`
- Add remaining external hooks to `setup_wandb`

Signed-off-by: Nikita Vemuri <nikitavemuri@gmail.com>
Signed-off-by: Weichen Xu <weichen.xu@databricks.com>
AmeerHajAli pushed a commit that referenced this pull request Jan 12, 2023
- Allow setting the W&B project and group environment variables from an external hook if it is not already passed to the `WandbLoggerCallback` and `setup_wandb`
- Add remaining external hooks to `setup_wandb`

Signed-off-by: Nikita Vemuri <nikitavemuri@gmail.com>
tamohannes pushed a commit to ju2ez/ray that referenced this pull request Jan 25, 2023
…#31035)

- Allow setting the W&B project and group environment variables from an external hook if it is not already passed to the `WandbLoggerCallback` and `setup_wandb`
- Add remaining external hooks to `setup_wandb`

Signed-off-by: Nikita Vemuri <nikitavemuri@gmail.com>
Signed-off-by: tmynn <hovhannes.tamoyan@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.

3 participants