Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -2494,6 +2494,10 @@
"source": "/models/hosting/:slug*",
"destination": "/platform/hosting/:slug*"
},
{
"source": "models/support/rotate_revoke_access",
"destination": "/models/support/find_api_key"
},
{
"source": "/models/track/launch/*",
"destination": "/platform/launch"
Expand Down
4 changes: 2 additions & 2 deletions inference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ client = openai.OpenAI(
# The custom base URL points to W&B Inference
base_url='https://api.inference.wandb.ai/v1',

# Get your API key from https://wandb.ai/authorize
# Create an API key at https://wandb.ai/settings
api_key="<your-api-key>",

# Optional: Team and project for usage tracking
Expand Down Expand Up @@ -53,4 +53,4 @@ print(response.choices[0].message.content)
<Info>

For information about pricing, usage limits, and credits, see [Usage Information and Limits](/inference/usage-limits/).
</Info>
</Info>
4 changes: 2 additions & 2 deletions inference/api-reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ The W&B Inference API provides OpenAI-compatible endpoints for interacting with

## Authentication

All API requests require authentication using your W&B API key. You can find your API key at [wandb.ai/authorize](https://wandb.ai/authorize).
All API requests require authentication using your W&B API key. Create an API key at [wandb.ai/settings](https://wandb.ai/settings).

Include your API key in the request headers:
- For OpenAI SDK: Set as `api_key` parameter
Expand All @@ -46,4 +46,4 @@ See [API Errors](/inference/api-reference/errors) for a complete list of error c

- Try the [usage examples](/inference/examples) to see the API in action
- Explore models in the [UI](/inference/ui-guide)
- Check [usage limits](/inference/usage-limits) for your account
- Check [usage limits](/inference/usage-limits) for your account
2 changes: 1 addition & 1 deletion inference/api-reference/chat-completions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ client = openai.OpenAI(
# The custom base URL points to W&B Inference
base_url='https://api.inference.wandb.ai/v1',

# Get your API key from https://wandb.ai/authorize
# Create an API key at https://wandb.ai/settings
# Consider setting it in the environment as OPENAI_API_KEY instead for safety
api_key="<your-api-key>",

Expand Down
4 changes: 2 additions & 2 deletions inference/examples.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ weave.init("<your-team>/<your-project>")
client = openai.OpenAI(
base_url='https://api.inference.wandb.ai/v1',

# Get your API key from https://wandb.ai/authorize
# Create an API key at https://wandb.ai/settings
api_key="<your-api-key>",

# Optional: Team and project for usage tracking
Expand Down Expand Up @@ -94,7 +94,7 @@ class WBInferenceModel(weave.Model):
def predict(self, prompt: str) -> str:
client = openai.OpenAI(
base_url="https://api.inference.wandb.ai/v1",
# Get your API key from https://wandb.ai/authorize
# Create an API key at https://wandb.ai/settings
api_key="<your-api-key>",
# Optional: Team and project for usage tracking
project="<your-team>/<your-project>",
Expand Down
7 changes: 5 additions & 2 deletions inference/prerequisites.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ description: >
Set up your environment to use W&B Inference
---

import ApiKeyCreate from "/snippets/en/_includes/api-key-create.mdx";

Complete these steps before using the W&B Inference service through the API or UI.

<Tip>
Expand All @@ -19,7 +21,8 @@ You need these items to access W&B Inference:
Sign up at [W&B](https://app.wandb.ai/login?signup=true)

2. **A W&B API key**
Get your API key at [https://wandb.ai/authorize](https://wandb.ai/authorize)

<ApiKeyCreate/>

3. **A W&B project**
Create a project in your W&B account to track usage
Expand Down Expand Up @@ -50,4 +53,4 @@ After completing the prerequisites:

- Check the [API reference](/inference/api-reference/) to learn about available endpoints
- Try the [usage examples](/inference/examples/) to see the service in action
- Use the [UI guide](/inference/ui-guide/) to access models through the web interface
- Use the [UI guide](/inference/ui-guide/) to access models through the web interface
2 changes: 1 addition & 1 deletion inference/response-settings/json-mode.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ To enable JSON mode, specify it as the "response_format" in the request:

client = openai.OpenAI(
base_url='https://api.inference.wandb.ai/v1',
api_key="<your-api-key>", # Available from https://wandb.ai/authorize
api_key="<your-api-key>", # Create an API key at https://wandb.ai/settings
)

response = client.chat.completions.create(
Expand Down
2 changes: 1 addition & 1 deletion inference/response-settings/reasoning.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ You can find reasoning information in the `reasoning_content` field of responses

client = openai.OpenAI(
base_url='https://api.inference.wandb.ai/v1',
api_key="<your-api-key>", # Available from https://wandb.ai/authorize
api_key="<your-api-key>", # Create an API key at https://wandb.ai/settings
)

response = client.chat.completions.create(
Expand Down
2 changes: 1 addition & 1 deletion inference/response-settings/streaming.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ too long before output starts.

client = openai.OpenAI(
base_url='https://api.inference.wandb.ai/v1',
api_key="<your-api-key>", # Available from https://wandb.ai/authorize
api_key="<your-api-key>", # Create an API key at https://wandb.ai/settings
)

stream = client.chat.completions.create(
Expand Down
2 changes: 1 addition & 1 deletion inference/response-settings/structured-output.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ To enable structured output, specify `json_schema` as the `response_format` type

client = openai.OpenAI(
base_url='https://api.inference.wandb.ai/v1',
api_key="<your-api-key>", # Available from https://wandb.ai/authorize
api_key="<your-api-key>", # Create an API key at https://wandb.ai/settings
)

response = client.chat.completions.create(
Expand Down
2 changes: 1 addition & 1 deletion inference/response-settings/tool-calling.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ To call functions, specify them and their arguments as part of your request to t

client = openai.OpenAI(
base_url='https://api.inference.wandb.ai/v1',
api_key="<your-api-key>", # Available from https://wandb.ai/authorize
api_key="<your-api-key>", # Create an API key at https://wandb.ai/settings
)

response = client.chat.completions.create(
Expand Down
9 changes: 0 additions & 9 deletions ja/models/support/rotate_revoke_access.mdx

This file was deleted.

10 changes: 0 additions & 10 deletions ko/models/support/rotate_revoke_access.mdx

This file was deleted.

9 changes: 4 additions & 5 deletions models/integrations/add-wandb-to-any-library.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
title: Add wandb to any library
---

import ApiKeyCreateStreamlined from "/snippets/en/_includes/api-key-create-streamlined.mdx";

## Add wandb to any library

This guide provides best practices on how to integrate W&B into your Python library to get powerful Experiment Tracking, GPU and System Monitoring, Model Checkpointing, and more for your own library.
Expand Down Expand Up @@ -75,13 +77,10 @@ dev = [

An API key authenticates a client or machine to W&B. You can generate an API key from your user profile.

<Note>
For a more streamlined approach, you can generate an API key by going directly to the [W&B authorization page](https://wandb.ai/authorize). Copy the displayed API key and save it in a secure location such as a password manager.
</Note>
<ApiKeyCreateStreamlined/>

1. Click your user profile icon in the upper right corner.
1. Select **User Settings**, then scroll to the **API Keys** section.
1. Click **Reveal**. Copy the displayed API key. To hide the API key, reload the page.

#### Install the `wandb` library and log in

Expand Down Expand Up @@ -405,4 +404,4 @@ If your library would like to leverage W&B hyper-parameter tuning, [W&B Sweeps](
You can also see what an advanced W&B integrations look like in the following integrations. Note most integrations will not be as complex as these:

* [Hugging Face Transformers `WandbCallback`](https://github.com/huggingface/transformers/blob/49629e7ba8ef68476e08b671d6fc71288c2f16f1/src/transformers/integrations.py#L639)
* [PyTorch Lightning `WandbLogger`](https://github.com/Lightning-AI/lightning/blob/18f7f2d3958fb60fcb17b4cb69594530e83c217f/src/pytorch_lightning/loggers/wandb.py#L53)
* [PyTorch Lightning `WandbLogger`](https://github.com/Lightning-AI/lightning/blob/18f7f2d3958fb60fcb17b4cb69594530e83c217f/src/pytorch_lightning/loggers/wandb.py#L53)
4 changes: 2 additions & 2 deletions models/integrations/cohere-fine-tuning.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ This [guide from Cohere](https://docs.cohere.com/page/convfinqa-finetuning-wandb

To add Cohere fine-tuning logging to your W&B workspace:

1. Create a `WandbConfig` with your W&B API key, W&B `entity` and `project` name. You can find your W&B API key at https://wandb.ai/authorize
1. Create a `WandbConfig` with your W&B API key, W&B `entity` and `project` name. Create an API key at https://wandb.ai/settings

2. Pass this config to the `FinetunedModel` object along with your model name, dataset and hyperparameters to kick off your fine-tuning run.

Expand Down Expand Up @@ -57,4 +57,4 @@ In addition, you can rename your runs, add notes or create tags to group them.

## Resources

* [Cohere Fine-tuning Example](https://github.com/cohere-ai/notebooks/blob/kkt_ft_cookbooks/notebooks/finetuning/convfinqa_finetuning_wandb.ipynb)
* [Cohere Fine-tuning Example](https://github.com/cohere-ai/notebooks/blob/kkt_ft_cookbooks/notebooks/finetuning/convfinqa_finetuning_wandb.ipynb)
8 changes: 4 additions & 4 deletions models/integrations/dagster.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ You will need the following resources to use Dagster within W&B:
2. **W&B entity (user or team)**: An entity is a username or team name where you send W&B Runs and Artifacts. Make sure to create your account or team entity in the W&B App UI before you log runs. If you do not specify ain entity, the run will be sent to your default entity, which is usually your username. Change your default entity in your settings under **Project Defaults**.
3. **W&B project**: The name of the project where [W&B Runs](/models/runs/) are stored.

Find your W&B entity by checking the profile page for that user or team in the W&B App. You can use a pre-existing W&B project or create a new one. New projects can be created on the W&B App homepage or on user/team profile page. If a project does not exist it will be automatically created when you first use it. The proceeding instructions demonstrate how to get an API key:
Find your W&B entity by checking the profile page for that user or team in the W&B App. You can use a pre-existing W&B project or create a new one. New projects can be created on the W&B App homepage or on user/team profile page. If a project does not exist it will be automatically created when you first use it.

### How to get an API key
### Set up your API key
1. [Log in to W&B](https://wandb.ai/login). Note: if you are using W&B Server ask your admin for the instance host name.
2. Collect your API key by navigating to the [authorize page](https://wandb.ai/authorize) or in your user/team settings. For a production environment we recommend using a [service account](/models/support/service_account_useful/) to own that key.
3. Set an environment variable for that API key export `WANDB_API_KEY=YOUR_KEY`.
2. Create an API key at [User Settings](https://wandb.ai/settings). For a production environment we recommend using a [service account](/models/support/service_account_useful/) to own that key.
3. Set an environment variable for that API key: `export WANDB_API_KEY=YOUR_KEY`.


The proceeding examples demonstrate where to specify your API key in your Dagster code. Make sure to specify your entity and project name within the `wandb_config` nested dictionary. You can pass different `wandb_config` values to different ops/assets if you want to use a different W&B Project. For more information about possible keys you can pass, see the Configuration section below.
Expand Down
4 changes: 2 additions & 2 deletions models/integrations/databricks.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ W&B integrates with [Databricks](https://www.databricks.com/) by customizing the
# without security add-on
databricks secrets create-scope --scope wandb --initial-manage-principal users

# Add your api_key from: https://app.wandb.ai/authorize
# Create an API key at https://wandb.ai/settings
databricks secrets put --scope wandb --key api_key
```

Expand Down Expand Up @@ -57,4 +57,4 @@ import os
# These will not be necessary in the future
os.environ["WANDB_ENTITY"] = "my-entity"
os.environ["WANDB_PROJECT"] = "my-project-that-exists"
```
```
8 changes: 4 additions & 4 deletions models/integrations/deepchem.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
description: How to integrate W&B with DeepChem library.
title: DeepChem
---

import ApiKeyCreateStreamlined from "/snippets/en/_includes/api-key-create-streamlined.mdx";

The [DeepChem library](https://github.com/deepchem/deepchem) provides open source tools that democratize the use of deep-learning in drug discovery, materials science, chemistry, and biology. This W&B integration adds simple and easy-to-use experiment tracking and model checkpointing while training models using DeepChem.

## DeepChem logging in 3 lines of code
Expand Down Expand Up @@ -30,13 +33,10 @@ Set up W&B for DeepChem models of type [KerasModel](https://deepchem.readthedocs

An API key authenticates your machine to W&B. You can generate an API key from your user profile.

<Note>
For a more streamlined approach, you can generate an API key by going directly to the [W&B authorization page](https://wandb.ai/authorize). Copy the displayed API key and save it in a secure location such as a password manager.
</Note>
<ApiKeyCreateStreamlined/>

1. Click your user profile icon in the upper right corner.
1. Select **User Settings**, then scroll to the **API Keys** section.
1. Click **Reveal**. Copy the displayed API key. To hide the API key, reload the page.

### Install the `wandb` library and log in

Expand Down
12 changes: 6 additions & 6 deletions models/integrations/fastai.mdx
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
---
title: fastai
---
If you're using **fastai** to train your models, W&B has an easy integration using the `WandbCallback`. Explore the details in[ interactive docs with examples →](https://app.wandb.ai/borisd13/demo_config/reports/Visualize-track-compare-Fastai-models--Vmlldzo4MzAyNA)

import ApiKeyCreateStreamlined from "/snippets/en/_includes/api-key-create-streamlined.mdx";

You can integrate **fastai** with W&B using the `WandbCallback` class. Check out these [interactive docs with examples](https://app.wandb.ai/borisd13/demo_config/reports/Visualize-track-compare-Fastai-models--Vmlldzo4MzAyNA) for more details.

## Sign up and create an API key

An API key authenticates your machine to W&B. You can generate an API key from your user profile.

<Note>
For a more streamlined approach, you can generate an API key by going directly to the [W&B authorization page](https://wandb.ai/authorize). Copy the displayed API key and save it in a secure location such as a password manager.
</Note>
<ApiKeyCreateStreamlined/>

1. Click your user profile icon in the upper right corner.
1. Select **User Settings**, then scroll to the **API Keys** section.
1. Click **Reveal**. Copy the displayed API key. To hide the API key, reload the page.

## Install the `wandb` library and log in

Expand Down Expand Up @@ -252,4 +252,4 @@ notebook_launcher(train, num_processes=2)
## Examples

* [Visualize, track, and compare Fastai models](https://app.wandb.ai/borisd13/demo_config/reports/Visualize-track-compare-Fastai-models--Vmlldzo4MzAyNA): A thoroughly documented walkthrough.
* [Image Segmentation on CamVid](https://bit.ly/fastai-wandb): A sample use case of the integration.
* [Image Segmentation on CamVid](https://bit.ly/fastai-wandb): A sample use case of the integration.
9 changes: 4 additions & 5 deletions models/integrations/huggingface.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
---
title: Hugging Face Transformers
---

import { ColabLink } from '/snippets/en/_includes/colab-link.mdx';
import ApiKeyCreateStreamlined from "/snippets/en/_includes/api-key-create-streamlined.mdx";

<ColabLink url="https://colab.research.google.com/github/wandb/examples/blob/master/colabs/huggingface/Optimize_Hugging_Face_models_with_Weights_&_Biases.ipynb" />

Expand Down Expand Up @@ -32,13 +34,10 @@ If you'd rather dive straight into working code, check out this [Google Colab](h

An API key authenticates your machine to W&B. You can generate an API key from your user profile.

<Note>
For a more streamlined approach, you can generate an API key by going directly to the [W&B authorization page](https://wandb.ai/authorize). Copy the displayed API key and save it in a secure location such as a password manager.
</Note>
<ApiKeyCreateStreamlined/>

1. Click your user profile icon in the upper right corner.
1. Select **User Settings**, then scroll to the **API Keys** section.
1. Click **Reveal**. Copy the displayed API key. To hide the API key, reload the page.

### Install the `wandb` library and log in

Expand Down Expand Up @@ -537,4 +536,4 @@ Read the full report [here](https://wandb.ai/ayush-thakur/huggingface/reports/Ho

## Get help or request features

For any issues, questions, or feature requests for the Hugging Face W&B integration, feel free to post in [this thread on the Hugging Face forums](https://discuss.huggingface.co/t/logging-experiment-tracking-with-w-b/498) or open an issue on the Hugging Face [Transformers GitHub repo](https://github.com/huggingface/transformers).
For any issues, questions, or feature requests for the Hugging Face W&B integration, feel free to post in [this thread on the Hugging Face forums](https://discuss.huggingface.co/t/logging-experiment-tracking-with-w-b/498) or open an issue on the Hugging Face [Transformers GitHub repo](https://github.com/huggingface/transformers).
8 changes: 3 additions & 5 deletions models/integrations/kubeflow-pipelines-kfp.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ description: How to integrate W&B with Kubeflow Pipelines.
title: Kubeflow Pipelines (kfp)
---

import ApiKeyCreateStreamlined from "/snippets/en/_includes/api-key-create-streamlined.mdx";

[Kubeflow Pipelines (kfp) ](https://www.kubeflow.org/docs/components/pipelines/overview/)is a platform for building and deploying portable, scalable machine learning (ML) workflows based on Docker containers.

Expand All @@ -14,13 +15,10 @@ This feature was enabled in `wandb==0.12.11` and requires `kfp<2.0.0`

An API key authenticates your machine to W&B. You can generate an API key from your user profile.

<Note>
For a more streamlined approach, you can generate an API key by going directly to the [W&B authorization page](https://wandb.ai/authorize). Copy the displayed API key and save it in a secure location such as a password manager.
</Note>
<ApiKeyCreateStreamlined/>

1. Click your user profile icon in the upper right corner.
1. Select **User Settings**, then scroll to the **API Keys** section.
1. Click **Reveal**. Copy the displayed API key. To hide the API key, reload the page.

## Install the `wandb` library and log in

Expand Down Expand Up @@ -191,4 +189,4 @@ def train_model(

trainer = Trainer(logger=WandbLogger())
... # do training
```
```
Loading