Skip to content

Commit

Permalink
chore(sdk): Update Intro_to_Weights_&_Biases.ipynb (#573)
Browse files Browse the repository at this point in the history
* Created using Colab

* Auto-clean notebooks

---------

Co-authored-by: GitHub Action <[email protected]>
  • Loading branch information
sephmard and actions-user authored Sep 10, 2024
1 parent ecf3e20 commit ed05814
Showing 1 changed file with 17 additions and 12 deletions.
29 changes: 17 additions & 12 deletions colabs/intro/Intro_to_Weights_&_Biases.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@
"<!--- @wandbcode{intro-colab} -->"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<a href=\"https://colab.research.google.com/github/wandb/examples/blob/master/colabs/intro/Intro_to_Weights_&_Biases.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>\n",
"<!--- @wandbcode{intro-colab} -->"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down Expand Up @@ -52,10 +60,7 @@
"# Log in to your W&B account\n",
"import wandb\n",
"import random\n",
"import math\n",
"\n",
"# Use wandb-core, temporary for wandb's new backend \n",
"wandb.require(\"core\")"
"import math"
]
},
{
Expand Down Expand Up @@ -123,7 +128,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"View how your machine learning peformed in your W&B project. Copy and paste the URL link that is printed from the previous cell. The URL will redirect you to a W&B project that contains a dashboard showing graphs the show how \n",
"View how your machine learning peformed in your W&B project. Copy and paste the URL link that is printed from the previous cell. The URL will redirect you to a W&B project that contains a dashboard showing graphs the show how\n",
"\n",
"The following image shows what a dashboard can look like:"
]
Expand All @@ -150,10 +155,10 @@
"[hyperparameters](https://docs.wandb.ai/ref/app/pages/run-page#overview-tab),\n",
"[terminal output](https://docs.wandb.ai/ref/app/pages/run-page#logs-tab) and\n",
"you'll see an [interactive table](https://docs.wandb.ai/guides/data-vis)\n",
"with model inputs and outputs. \n",
"with model inputs and outputs.\n",
"\n",
"### Set up PyTorch Dataloader\n",
"The following cell defines some useful functions that we will need to train our machine learning model. The functions themselves are not unique to W&B so we'll not cover them in detail here. See the PyTorch documentation for more information on how to define [forward and backward training loop](https://pytorch.org/tutorials/beginner/nn_tutorial.html), how to use [PyTorch DataLoaders](https://pytorch.org/tutorials/beginner/basics/data_tutorial.html) to load data in for training, and how define PyTorch models using the [`torch.nn.Sequential` Class](https://pytorch.org/docs/stable/generated/torch.nn.Sequential.html). "
"The following cell defines some useful functions that we will need to train our machine learning model. The functions themselves are not unique to W&B so we'll not cover them in detail here. See the PyTorch documentation for more information on how to define [forward and backward training loop](https://pytorch.org/tutorials/beginner/nn_tutorial.html), how to use [PyTorch DataLoaders](https://pytorch.org/tutorials/beginner/basics/data_tutorial.html) to load data in for training, and how define PyTorch models using the [`torch.nn.Sequential` Class](https://pytorch.org/docs/stable/generated/torch.nn.Sequential.html)."
]
},
{
Expand Down Expand Up @@ -223,9 +228,9 @@
"\n",
"The following cell is unique to W&B, so let's go over it.\n",
"\n",
"In the cell we define a function called `log_image_table`. Though technically, optional, this function creates a W&B Table object. We will use the table object to create a table that shows what the model predicted for each image. \n",
"In the cell we define a function called `log_image_table`. Though technically, optional, this function creates a W&B Table object. We will use the table object to create a table that shows what the model predicted for each image.\n",
"\n",
"More specifically, each row will conists of the image fed to the model, along with predicted value and the actual value (label). "
"More specifically, each row will conists of the image fed to the model, along with predicted value and the actual value (label)."
]
},
{
Expand All @@ -249,7 +254,7 @@
"source": [
"### Train your model and upload checkpoints\n",
"\n",
"The following code trains and saves model checkpoints to your project. Use model checkpoints like you normally would to assess how the model performed during training. \n",
"The following code trains and saves model checkpoints to your project. Use model checkpoints like you normally would to assess how the model performed during training.\n",
"\n",
"W&B also makes it easy to share your saved models and model checkpoints with other members of your team or organization. To learn how to share your model and model checkpoints with members outside of your team, see [W&B Registry](https://docs.wandb.ai/guides/registry)."
]
Expand Down Expand Up @@ -345,7 +350,7 @@
"source": [
"## (Optional) Set up a W&B Alert\n",
"\n",
"Create a [W&B Alerts](https://docs.wandb.ai/guides/track/alert) to send alerts to your Slack or email from your Python code. \n",
"Create a [W&B Alerts](https://docs.wandb.ai/guides/track/alert) to send alerts to your Slack or email from your Python code.\n",
"\n",
"There are 2 steps to follow the first time you'd like to send a Slack or email alert, triggered from your code:\n",
"\n",
Expand Down Expand Up @@ -421,5 +426,5 @@
}
},
"nbformat": 4,
"nbformat_minor": 4
"nbformat_minor": 0
}

0 comments on commit ed05814

Please sign in to comment.