-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into ericakdiaz/data-test-toggle-button-group
- Loading branch information
Showing
105 changed files
with
5,621 additions
and
4,101 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,36 @@ | ||
# Microsoft Azure | ||
|
||
Weights & Biases integrates with Microsoft Azure OpenAI services, helping teams to manage, debug, and optimize their Azure AI workflows at scale. This guide introduces the W&B integration, what it means for Weave users, its key features, and how to get started. | ||
Weights & Biases (W&B) Weave integrates with Microsoft Azure OpenAI services, helping teams to optimize their Azure AI applications. Using W&B, you can | ||
|
||
:::tip | ||
For the latest tutorials, visit [Weights & Biases on Microsoft Azure](https://wandb.ai/site/partners/azure). | ||
::: | ||
|
||
## Key features | ||
|
||
- **LLM evaluations**: Evaluate and monitor LLM-powered applications using Weave, optimized for Azure infrastructure. | ||
- **Seamless integration**: Deploy W&B Models on a dedicated Azure tenant with built-in integrations for Azure AI Studio, Azure ML, Azure OpenAI Service, and other Azure AI services. | ||
- **Enhanced performance**: Use Azure’s infrastructure to train and deploy models faster, with auto-scaling clusters and optimized resources. | ||
- **Scalable experiment tracking**: Automatically log hyperparameters, metrics, and artifacts for Azure AI Studio and Azure ML runs. | ||
- **LLM fine-tuning**: Fine-tune models with W&B Models. | ||
- **Central repository for models and datasets**: Manage and version models and datasets with W&B Registry and Azure AI Studio. | ||
- **Collaborative workspaces**: Support teamwork with shared workspaces, experiment commenting, and Microsoft Teams integration. | ||
- **Governance framework**: Ensure security with fine-grained access controls, audit trails, and Microsoft Entra ID integration. | ||
|
||
## Getting started | ||
|
||
To use W&B with Azure, add the W&B integration via the [Azure Marketplace](https://azuremarketplace.microsoft.com/en-us/marketplace/apps/weightsandbiasesinc1641502883483.weights_biases_for_azure?tab=Overview). | ||
To get started using Azure with Weave, simply decorate the function(s) you want to track with `weave.op`. | ||
|
||
For a detailed guide describing how to integrate Azure OpenAI fine-tuning with W&B, see [Integrating Weights & Biases with Azure AI Services](https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/weights-and-biases-integration). | ||
```python | ||
@weave.op() | ||
def call_azure_chat(model_id: str, messages: list, max_tokens: int = 1000, temperature: float = 0.5): | ||
response = client.chat.completions.create( | ||
model=model_id, | ||
messages=messages, | ||
max_tokens=max_tokens, | ||
temperature=temperature | ||
) | ||
return {"status": "success", "response": response.choices[0].message.content} | ||
|
||
``` | ||
|
||
## Learn more | ||
|
||
- [Weights & Biases + Microsoft Azure Overview](https://wandb.ai/site/partners/azure) | ||
- [How W&B and Microsoft Azure Are Empowering Enterprises](https://techcommunity.microsoft.com/blog/azure-ai-services-blog/how-weights--biases-and-microsoft-azure-are-empowering-enterprises-to-fine-tune-/4303716) | ||
- [Microsoft Azure OpenAI Service Documentation](https://learn.microsoft.com/en-us/azure/ai-services/openai/) | ||
Learn more about advanced Azure with Weave topics using the resources below. | ||
|
||
### Use the Azure AI Model Inference API with Weave | ||
|
||
Learn how to use the [Azure AI Model Inference API] with Weave to gain insights into Azure models in [this guide](https://wandb.ai/byyoung3/ML-NEWS2/reports/A-guide-to-using-the-Azure-AI-model-inference-API--Vmlldzo4OTY1MjEy#tutorial:-implementing-azure-ai-model-inference-api-with-w&b-weave-). | ||
|
||
### Trace Azure OpenAI models with Weave | ||
|
||
Learn how to trace Azure OpenAI models using Weave in [this guide](https://wandb.ai/a-sh0ts/azure-weave-cookbook/reports/How-to-use-Azure-OpenAI-and-Azure-AI-Studio-with-W-B-Weave--Vmlldzo4MTI0NDgy). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# FAQs | ||
|
||
The following page provides answers to common questions about Weave tracing. | ||
|
||
## What information does Weave capture for a function? | ||
|
||
A function can be designated as a Weave [Op](/guides/tracking/ops) either manually through a decorator or automatically as part of an enabled integration. When an Op executes, Weave captures detailed information to support your analysis. Weave provides you with fine grained control over what is logged in case you would like something different than the default; see below for configuration examples. | ||
|
||
- **Code capture** - Weave captures a representation of the Op's source code. This includes inline comments as well as recursively capturing the value of variables or the source of non-Op functions that were called. Code capture allows you to see what your function was doing even if the change was not saved to your source control system. Code capture is used as part of Op versioning, allowing you to understand the evaluation of your code over time. If code capture is disabled, a hash value will be used instead. | ||
|
||
- **Function name, inputs, and outputs** - The name of the function will be captured but can be [overridden](/guides/tracking/tracing/#call-display-name). A JSON-based representation of the inputs and outputs will be captured. For inputs, argument name will be capture in addition to value. Weave lets you [customize the logging](/guides/tracking/ops#customize-logged-inputs-and-outputs) of inputs and outputs - you can specify a function to add/remove/modify what is logged. | ||
|
||
- **Op call hierarchy** - When an Op is called within the context of another Op executing, this relationship is captured, even in cases | ||
where there is an intermediate non-Op function executing. This relationship between Op calls is used to provide a "Trace tree". | ||
|
||
- **Execution status and exceptions** - Weave tracks whether a function is executing, finished, or errored. If an exception occurs during execution the error message and a stack track is recorded. | ||
|
||
- **System information** - Weave may capture information about which operating system the client is running on including detailed version information. | ||
|
||
- **Client information** - Weave may capture information about the Weave client itself, such as the programming language in use and detailed version information for that language and the Weave client library. | ||
|
||
- **Timing** - The execution start and end time is captured and also used for latency calculations. | ||
|
||
- **Token usage** - In some [integrations](/guides/integrations/) LLM token usage counts may be automatically logged. | ||
|
||
- **User and run context** - Logging is associated with a W&B user account. That will be captured along with any wandb Run context. | ||
|
||
- **Derived information** - Weave may compute derived information from the raw information logged, for example a cost estimate may be calculated based on token usage and knowledge of the model used. Weave also aggregates some information over calls. | ||
|
||
- **Additional information you choose** - You can choose to log [custom attributes](/guides/core-types/models#track-production-calls) as part of your call or attach [feedback](/guides/tracking/feedback#add-feedback-to-a-call) to a call. | ||
|
||
## How can I disable code capture? | ||
|
||
You can disable code capture during Weave client initialization: `weave.init("entity/project", settings={"capture_code": False})`. | ||
You can also use the [environment variable](/guides/core-types/env-vars) `WEAVE_CAPTURE_CODE=false`. | ||
|
||
## How can I disable system information capture? | ||
|
||
You can disable system information capture during Weave client initialization: `weave.init("entity/project", settings={"capture_system_info": False})`. | ||
|
||
## How can I disable client information capture? | ||
|
||
You can disable client information capture during Weave client initialization: `weave.init("entity/project", settings={"capture_client_info": False})`. | ||
|
||
## Will Weave affect my function's execution speed? | ||
|
||
The overhead of Weave logging is typically negligible compared to making a call to an LLM. | ||
To minimize Weave's impact on the speed of your Op's execution, its network activity happens on a background thread. | ||
When your program is exiting it may appear to pause while any remaining enqueued data is logged. | ||
|
||
## How is Weave data ingestion calculated? | ||
|
||
We define ingested bytes as bytes that we receive, process, and store on your behalf. This includes trace metadata, LLM inputs/outputs, and any other information you explicitly log to Weave, but does not include communication overhead (e.g., HTTP headers) or any other data that is not placed in long-term storage. We count bytes as "ingested" only once at the time they are received and stored. |
Oops, something went wrong.