Skip to content

Commit

Permalink
Noah's feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
mdlinville committed Feb 3, 2025
1 parent f05e3ff commit b36a0ae
Show file tree
Hide file tree
Showing 14 changed files with 206 additions and 23 deletions.
12 changes: 12 additions & 0 deletions content/guides/integrations/add-wandb-to-any-library.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,18 @@ To install the `wandb` library locally and log in:

{{% tab header="Python" value="python" %}}

```bash
pip install wandb
```
```python
import wandb
wandb.login()
```

{{% /tab %}}

{{% tab header="Python notebook" value="python-notebook" %}}

```notebook
!pip install wandb
Expand Down
19 changes: 16 additions & 3 deletions content/guides/integrations/deepchem.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ model.fit(…)

Explore the Using [W&B with DeepChem: Molecular Graph Convolutional Networks](https://wandb.ai/kshen/deepchem_graphconv/reports/Using-W-B-with-DeepChem-Molecular-Graph-Convolutional-Networks--Vmlldzo4MzU5MDc?galleryTag=) article for an example charts generated using the W&B DeepChem integration.

If you'd rather dive straight into working code, check out this [**Google Colab**](https://colab.research.google.com/github/wandb/examples/blob/master/colabs/deepchem/W%26B_x_DeepChem.ipynb).
To dive straight into working code, check out this [**Google Colab**](https://colab.research.google.com/github/wandb/examples/blob/master/colabs/deepchem/W%26B_x_DeepChem.ipynb).

## Track experiments

Setup Weights & Biases for DeepChem models of type [KerasModel](https://deepchem.readthedocs.io/en/latest/api_reference/models.html#keras-models) or [TorchModel](https://deepchem.readthedocs.io/en/latest/api_reference/models.html#pytorch-models).
Set up W&B for DeepChem models of type [KerasModel](https://deepchem.readthedocs.io/en/latest/api_reference/models.html#keras-models) or [TorchModel](https://deepchem.readthedocs.io/en/latest/api_reference/models.html#pytorch-models).

### Sign up and create an API key

Expand Down Expand Up @@ -68,6 +68,18 @@ To install the `wandb` library locally and log in:

{{% tab header="Python" value="python" %}}

```bash
pip install wandb
```
```python
import wandb
wandb.login()
```

{{% /tab %}}

{{% tab header="Python notebook" value="python-notebook" %}}

```notebook
!pip install wandb
Expand All @@ -76,11 +88,12 @@ wandb.login()
```

{{% /tab %}}

{{< /tabpane >}}

### Log your training and evaluation data to W&B

Training loss and evaluation metrics can be automatically logged to Weights & Biases. Optional evaluation can be enabled using the DeepChem [ValidationCallback](https://github.com/deepchem/deepchem/blob/master/deepchem/models/callbacks.py), the `WandbLogger` will detect ValidationCallback callback and log the metrics generated.
Training loss and evaluation metrics can be automatically logged to W&B. Optional evaluation can be enabled using the DeepChem [ValidationCallback](https://github.com/deepchem/deepchem/blob/master/deepchem/models/callbacks.py), the `WandbLogger` will detect ValidationCallback callback and log the metrics generated.

{{< tabpane text=true >}}

Expand Down
16 changes: 14 additions & 2 deletions content/guides/integrations/fastai/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,18 @@ To install the `wandb` library locally and log in:

{{% tab header="Python" value="python" %}}

```bash
pip install wandb
```
```python
import wandb
wandb.login()
```

{{% /tab %}}

{{% tab header="Python notebook" value="python-notebook" %}}

```notebook
!pip install wandb
Expand Down Expand Up @@ -148,7 +160,7 @@ $ torchrun --nproc_per_node 2 train.py
in this case, the machine has 2 GPUs.
{{% /tab %}}
{{% tab header="Notebook" value="notebook" %}}
{{% tab header="Python notebook" value="notebook" %}}
You can now run distributed training directly inside a notebook.
Expand Down Expand Up @@ -225,7 +237,7 @@ $ torchrun --nproc_per_node 2 train.py
```
{{% /tab %}}
{{% tab header="Notebook" value="notebook" %}}
{{% tab header="Python notebook" value="notebook" %}}
```python
import wandb
Expand Down
43 changes: 29 additions & 14 deletions content/guides/integrations/huggingface.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,18 @@ To install the `wandb` library locally and log in:

{{% tab header="Python" value="python" %}}

```bash
pip install wandb
```
```python
import wandb
wandb.login()
```

{{% /tab %}}

{{% tab header="Python notebook" value="python" %}}

```notebook
!pip install wandb
Expand Down Expand Up @@ -95,21 +107,24 @@ WANDB_PROJECT=amazon_sentiment_analysis
```

{{% /tab %}}
{{% tab header="Notebook" value="notebook" %}}

{{% tab header="Python" value="python" %}}

```notebook
%env WANDB_PROJECT=amazon_sentiment_analysis
import os
os.environ["WANDB_PROJECT"]="amazon_sentiment_analysis"
```

{{% /tab %}}
{{% tab header="Python" value="python" %}}

{{% tab header="Python notebook" value="notebook" %}}

```notebook
import os
os.environ["WANDB_PROJECT"]="amazon_sentiment_analysis"
%env WANDB_PROJECT=amazon_sentiment_analysis
```

{{% /tab %}}

{{< /tabpane >}}

{{% alert %}}
Expand Down Expand Up @@ -180,25 +195,25 @@ Use `WANDB_LOG_MODEL` along with `load_best_model_at_end` to upload the best mod

{{< tabpane text=true >}}

{{% tab header="Python" value="python" %}}

```python
import os
{{% tab header="Command Line" value="cli" %}}

os.environ["WANDB_LOG_MODEL"] = "checkpoint"
```bash
WANDB_LOG_MODEL="checkpoint"
```

{{% /tab %}}

{{% tab header="Command Line" value="cli" %}}
{{% tab header="Python" value="python" %}}

```bash
WANDB_LOG_MODEL="checkpoint"
```python
import os
os.environ["WANDB_LOG_MODEL"] = "checkpoint"
```

{{% /tab %}}

{{% tab header="Notebook" value="notebook" %}}
{{% tab header="Python notebook" value="notebook" %}}

```notebook
%env WANDB_LOG_MODEL="checkpoint"
Expand Down
12 changes: 12 additions & 0 deletions content/guides/integrations/kubeflow-pipelines-kfp.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,18 @@ To install the `wandb` library locally and log in:

{{% tab header="Python" value="python" %}}

```bash
pip install wandb
```
```python
import wandb
wandb.login()
```

{{% /tab %}}

{{% tab header="Python notebook" value="notebook" %}}

```notebook
!pip install wandb
Expand Down
12 changes: 12 additions & 0 deletions content/guides/integrations/lightning.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,18 @@ To install the `wandb` library locally and log in:

{{% tab header="Python" value="python" %}}

```bash
pip install wandb
```
```python
import wandb
wandb.login()
```

{{% /tab %}}

{{% tab header="Python notebook" value="notebook" %}}

```notebook
!pip install wandb
Expand Down
14 changes: 13 additions & 1 deletion content/guides/integrations/metaflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,18 @@ To install the `wandb` library locally and log in:

{{% tab header="Python" value="python" %}}

```bash
pip install -Uqqq metaflow fastcore wandb
```
```python
import wandb
wandb.login()
```

{{% /tab %}}

{{% tab header="Python notebook" value="notebook" %}}

```notebook
!pip install -Uqqq metaflow fastcore wandb
Expand Down Expand Up @@ -150,7 +162,7 @@ class WandbExampleFlow(FlowSpec):

You can access the information we've captured in three ways: inside the original Python process being logged using the [`wandb` client library]({{< relref "/ref/python/" >}}), with the [web app UI]({{< relref "/guides/models/track/workspaces.md" >}}), or programmatically using [our Public API]({{< relref "/ref/python/public-api/" >}}). `Parameter`s are saved to W&B's [`config`]({{< relref "/guides/models/track/config.md" >}}) and can be found in the [Overview tab]({{< relref "/guides/models/track/runs/#overview-tab" >}}). `datasets`, `models`, and `others` are saved to [W&B Artifacts]({{< relref "/guides/core/artifacts/" >}}) and can be found in the [Artifacts tab]({{< relref "/guides/models/track/runs/#artifacts-tab" >}}). Base python types are saved to W&B's [`summary`]({{< relref "/guides/models/track/log/" >}}) dict and can be found in the Overview tab. See our [guide to the Public API]({{< relref "/guides/models/track/public-api-guide.md" >}}) for details on using the API to get this information programmatically from outside .

### Cheat sheet
### Quick reference

| Data | Client library | UI |
| ----------------------------------------------- | ----------------------------------------- | --------------------- |
Expand Down
12 changes: 12 additions & 0 deletions content/guides/integrations/paddledetection.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,18 @@ To install the `wandb` library locally and log in:

{{% tab header="Python" value="python" %}}

```bash
pip install wandb
```
```python
import wandb
wandb.login()
```

{{% /tab %}}

{{% tab header="Python notebook" value="python" %}}

```notebook
!pip install wandb
Expand Down
14 changes: 13 additions & 1 deletion content/guides/integrations/paddleocr.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,18 @@ To install the `wandb` library locally and log in:

{{% tab header="Python" value="python" %}}

```bash
pip install wandb
```
```python
import wandb
wandb.login()
```

{{% /tab %}}

{{% tab header="Python notebook" value="notebook" %}}

```notebook
!pip install wandb
Expand Down Expand Up @@ -96,6 +108,6 @@ Once you run your `train.py` file with Weights & Biases turned on, a link will b

{{< img src="/images/integrations/paddleocr_wb_dashboard3.png" alt="W&B Dashboard for the Text Detection Model" >}}

## Feedback or Issues?
## Feedback or issues

If you have any feedback or issues about the Weights & Biases integration please open an issue on the [PaddleOCR GitHub](https://github.com/PaddlePaddle/PaddleOCR) or email <a href="mailto:[email protected]">[email protected]</a>.
12 changes: 12 additions & 0 deletions content/guides/integrations/pytorch-geometric.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,18 @@ To install the `wandb` library locally and log in:

{{% tab header="Python" value="python" %}}

```bash
pip install wandb
```
```python
import wandb
wandb.login()
```

{{% /tab %}}

{{% tab header="Python notebook" value="notebook" %}}

```notebook
!pip install wandb
Expand Down
12 changes: 12 additions & 0 deletions content/guides/integrations/scikit.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,18 @@ To install the `wandb` library locally and log in:

{{% tab header="Python" value="python" %}}

```bash
pip install wandb
```
```python
import wandb
wandb.login()
```

{{% /tab %}}

{{% tab header="Python notebook" value="notebook" %}}

```notebook
!pip install wandb
Expand Down
27 changes: 25 additions & 2 deletions content/guides/integrations/spacy.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,18 @@ To install the `wandb` library locally and log in:

{{% tab header="Python" value="python" %}}

```bash
pip install wandb
```
```python
import wandb
wandb.login()
```

{{% /tab %}}

{{% tab header="Python notebook" value="notebook" %}}

```notebook
!pip install wandb
Expand Down Expand Up @@ -101,10 +113,10 @@ python -m spacy train \
{{% /tab %}}
{{% tab header="Notebook" value="notebook" %}}
{{% tab header="Python" value="python" %}}
```python
!python -m spacy train \
python -m spacy train \
config.cfg \
--output ./output \
--paths.train ./train \
Expand All @@ -113,6 +125,17 @@ python -m spacy train \
{{% /tab %}}
{{% tab header="Python notebook" value="notebook" %}}
```notebook
!python -m spacy train \
config.cfg \
--output ./output \
--paths.train ./train \
--paths.dev ./dev
```
{{% /tab %}}
{{< /tabpane >}}
When training begins, a link to your training run's [W&B page]({{< relref "/guides/models/track/runs/" >}}) will be output which will take you to this run's experiment tracking [dashboard]({{< relref "/guides/models/track/workspaces.md" >}}) in the Weights & Biases web UI.
Loading

0 comments on commit b36a0ae

Please sign in to comment.