Skip to content

Commit

Permalink
Changed RayTune import statement. (#427)
Browse files Browse the repository at this point in the history
* Changed RayTune import statement.

* fix CB integration

---------

Co-authored-by: Thomas Capelle <tcapelle@pm.me>
  • Loading branch information
ngrayluna and tcapelle committed Jun 20, 2023
1 parent 9f68d18 commit 952d778
Showing 1 changed file with 3 additions and 14 deletions.
17 changes: 3 additions & 14 deletions colabs/raytune/RayTune_with_wandb.ipynb
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"cells": [
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
Expand Down Expand Up @@ -124,8 +123,7 @@
"import random\n",
"import numpy as np\n",
"from ray import tune\n",
"from ray.tune.logger import DEFAULT_LOGGERS\n",
"from ray.air.callbacks.wandb import WandbLoggerCallback\n",
"from ray.air.integrations.wandb import WandbLoggerCallback, wandb_setup\n",
"import torch\n",
"import torch.optim as optim\n",
"import wandb"
Expand Down Expand Up @@ -207,9 +205,9 @@
"metadata": {},
"outputs": [],
"source": [
"@wandb_mixin\n",
"def train_mnist(config):\n",
"\n",
" # Setup wandb\n",
" wandb = wandb_setup(config)\n",
" device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')\n",
" train_loader, test_loader = get_data_loaders()\n",
"\n",
Expand Down Expand Up @@ -262,15 +260,6 @@
"[the documentation for the `WandbLoggerCallback`](https://docs.ray.io/en/master/tune/tutorials/tune-wandb.html)."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"wandb.login()"
]
},
{
"attachments": {},
"cell_type": "markdown",
Expand Down

0 comments on commit 952d778

Please sign in to comment.