Skip to content
Open
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
296 changes: 260 additions & 36 deletions docs.json

Large diffs are not rendered by default.

52 changes: 37 additions & 15 deletions models/ref/python/automations/automation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,18 @@ namespace: wandb.automations.automations
import { GitHubLink } from '/snippets/_includes/github-source-link.mdx';


<GitHubLink url="https://github.com/wandb/wandb/blob/main/wandb/automations/automations.py#L19" />
<GitHubLink compact url="https://github.com/wandb/wandb/blob/main/wandb/automations/automations.py#L19" />



## <Badge color="yellow" size="lg" shape="rounded">Class</Badge> wandb.automations.Automation



A local instance of a saved W&B automation that supports editing.



## <kbd>class</kbd> wandb.automations.Automation
```python
*,
__typename: Literal['Trigger'] = 'Trigger',
Expand All @@ -21,33 +28,48 @@ updatedAt: datetime.datetime | None = None,
name: str,
description: str | None,
enabled: bool,
scope: Annotated[Union[wandb.automations.scopes._ArtifactSequenceScope, wandb.automations.scopes._ArtifactPortfolioScope, wandb.automations.scopes.ProjectScope, Annotated[wandb.automations.scopes.TeamScope | wandb.automations.scopes.OrgScope, BeforeValidator(func=<function parse_scope>, json_schema_input_type=PydanticUndefined), Discriminator(discriminator='entity_type', custom_error_type=None, custom_error_message=None, custom_error_context=None)]], BeforeValidator(func=<function parse_scope>, json_schema_input_type=PydanticUndefined), Discriminator(discriminator='typename__', custom_error_type=None, custom_error_message=None, custom_error_context=None)],
scope: Annotated[wandb.automations.scopes._ArtifactSequenceScope | wandb.automations.scopes._ArtifactPortfolioScope | wandb.automations.scopes.ProjectScope, BeforeValidator(func=<function parse_scope>, json_schema_input_type=PydanticUndefined)],
event: wandb.automations.events.SavedEvent,
action: Annotated[wandb.automations.actions.SavedLaunchJobAction | wandb.automations.actions.SavedNotificationAction | wandb.automations.actions.SavedWebhookAction | wandb.automations.actions.SavedNoOpAction, BeforeValidator(func=<function parse_saved_action>, json_schema_input_type=PydanticUndefined)]
```

## Args

<ResponseField name="id" type="Annotated[str, Strict(strict=True)]">

A local instance of a saved W&B automation that supports editing.
</ResponseField>

<ResponseField name="createdAt" type="datetime.datetime">
The date and time when this automation was created.
</ResponseField>

<ResponseField name="updatedAt" type="datetime.datetime | None">
The date and time when this automation was last updated, if applicable.
</ResponseField>

## Args

- `id`:
- `createdAt`: The date and time when this automation was created.
- `updatedAt`: The date and time when this automation was last updated, if applicable.
- `name`: The name of this automation.
- `description`: An optional description of this automation.
- `enabled`: Whether this automation is enabled. Only enabled automations will trigger.
- `scope`: The scope in which the triggering event must occur.
- `event`: The event that will trigger this automation.
- `action`: The action that will execute when this automation is triggered.
<ResponseField name="name" type="str">
The name of this automation.
</ResponseField>

<ResponseField name="description" type="str | None">
An optional description of this automation.
</ResponseField>

<ResponseField name="enabled" type="bool">
Whether this automation is enabled. Only enabled automations will trigger.
</ResponseField>

<ResponseField name="scope" type="Annotated[wandb.automations.scopes._ArtifactSequenceScope | wandb.automations.scopes._ArtifactPortfolioScope | wandb.automations.scopes.ProjectScope, BeforeValidator(func= None, json_schema_input_type=PydanticUndefined)]">
The scope in which the triggering event must occur.
</ResponseField>

<ResponseField name="event" type="wandb.automations.events.SavedEvent">
The event that will trigger this automation.
</ResponseField>

<ResponseField name="action" type="Annotated[wandb.automations.actions.SavedLaunchJobAction | wandb.automations.actions.SavedNotificationAction | wandb.automations.actions.SavedWebhookAction | wandb.automations.actions.SavedNoOpAction, BeforeValidator(func= None, json_schema_input_type=PydanticUndefined)]">
The action that will execute when this automation is triggered.
</ResponseField>



Expand Down
27 changes: 14 additions & 13 deletions models/ref/python/automations/donothing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,34 +7,35 @@ namespace: wandb.automations.actions
import { GitHubLink } from '/snippets/_includes/github-source-link.mdx';


<GitHubLink url="https://github.com/wandb/wandb/blob/main/wandb/automations/actions.py#L208" />
<GitHubLink compact url="https://github.com/wandb/wandb/blob/main/wandb/automations/actions.py#L208" />



## <kbd>class</kbd> wandb.automations.DoNothing
```python
*,
no_op: Annotated[bool, BeforeValidator(func=<function default_if_none>, json_schema_input_type=PydanticUndefined)] = True,
action_type: Literal[NO_OP] = NO_OP
```
## <Badge color="yellow" size="lg" shape="rounded">Class</Badge> wandb.automations.DoNothing



Defines an automation action that intentionally does nothing.



## Args

- `no_op`: Placeholder field which exists only to satisfy backend schema requirements.

There should never be a need to set this field explicitly, as its value is ignored.
- `action_type`:
```python
*,
no_op: Annotated[bool, BeforeValidator(func=<function default_if_none>, json_schema_input_type=PydanticUndefined)] = True,
action_type: Literal[NO_OP] = NO_OP
```

## Args

<ResponseField name="no_op" type="Annotated[bool, BeforeValidator(func= None, json_schema_input_type=PydanticUndefined)]">
Placeholder field which exists only to satisfy backend schema requirements.

There should never be a need to set this field explicitly, as its value is ignored.
</ResponseField>

<ResponseField name="action_type" type="Literal[NO_OP]">

</ResponseField>



Expand Down
57 changes: 38 additions & 19 deletions models/ref/python/automations/metricchangefilter.mdx
Original file line number Diff line number Diff line change
@@ -1,55 +1,74 @@
---
title: MetricChangeFilter
kind: class
namespace: wandb.automations._run_metric_filters
namespace: wandb.automations._filters.run_metrics
---

import { GitHubLink } from '/snippets/_includes/github-source-link.mdx';


<GitHubLink url="https://github.com/wandb/wandb/blob/main/wandb/automations/_run_metric_filters.py#L153" />
<GitHubLink compact url="https://github.com/wandb/wandb/blob/main/wandb/automations/_filters/run_metrics.py#L153" />



## <Badge color="yellow" size="lg" shape="rounded">Class</Badge> wandb.automations.MetricChangeFilter



Filter that compares a **change** in a metric value to a user-defined threshold.

The change is calculated over "tumbling" windows, i.e. the difference
between the current window and the non-overlapping prior window.



## <kbd>class</kbd> wandb.automations.MetricChangeFilter
```python
*,
name: str,
agg_op: wandb.automations._run_metric_filters.Agg | None = None,
agg_op: wandb.automations._filters.run_metrics.Agg | None = None,
current_window_size: Annotated[int, Gt(gt=0)] = 1,
cmp: NoneType = None,
change_amount: Union[Annotated[int, Gt(gt=0)], Annotated[float, Gt(gt=0)]],
prior_window_size: Annotated[int, Gt(gt=0)] = <factory>,
change_type: wandb.automations._run_metric_filters.ChangeType,
change_dir: wandb.automations._run_metric_filters.ChangeDir
change_type: wandb.automations._filters.run_metrics.ChangeType,
change_dir: wandb.automations._filters.run_metrics.ChangeDir
```

## Args

<ResponseField name="name" type="str">

Filter that compares a **change** in a metric value to a user-defined threshold.
</ResponseField>

The change is calculated over "tumbling" windows, i.e. the difference
between the current window and the non-overlapping prior window.
<ResponseField name="agg_op" type="wandb.automations._filters.run_metrics.Agg | None">

</ResponseField>

<ResponseField name="current_window_size" type="Annotated[int, Gt(gt=0)]">

## Args
</ResponseField>

<ResponseField name="cmp" type="NoneType">
Ignored.
</ResponseField>

<ResponseField name="change_amount" type="Union[Annotated[int, Gt(gt=0)], Annotated[float, Gt(gt=0)]]">

- `name`:
- `agg_op`:
- `current_window_size`:
- `cmp`: Ignored.
- `change_amount`:
- `prior_window_size`: Size of the "prior" metric aggregation window (ignored if `agg` is ``None``).
</ResponseField>

If omitted, defaults to the size of the current window.
- `change_type`:
- `change_dir`:
<ResponseField name="prior_window_size" type="Annotated[int, Gt(gt=0)]">
Size of the "prior" metric aggregation window (ignored if `agg` is ``None``).

If omitted, defaults to the size of the current window.
</ResponseField>

<ResponseField name="change_type" type="wandb.automations._filters.run_metrics.ChangeType">

</ResponseField>

<ResponseField name="change_dir" type="wandb.automations._filters.run_metrics.ChangeDir">

</ResponseField>



Expand Down
42 changes: 26 additions & 16 deletions models/ref/python/automations/metricthresholdfilter.mdx
Original file line number Diff line number Diff line change
@@ -1,25 +1,17 @@
---
title: MetricThresholdFilter
kind: class
namespace: wandb.automations._run_metric_filters
namespace: wandb.automations._filters.run_metrics
---

import { GitHubLink } from '/snippets/_includes/github-source-link.mdx';


<GitHubLink url="https://github.com/wandb/wandb/blob/main/wandb/automations/_run_metric_filters.py#L126" />
<GitHubLink compact url="https://github.com/wandb/wandb/blob/main/wandb/automations/_filters/run_metrics.py#L126" />



## <kbd>class</kbd> wandb.automations.MetricThresholdFilter
```python
*,
name: str,
agg_op: wandb.automations._run_metric_filters.Agg | None = None,
window_size: Annotated[int, Gt(gt=0)] = 1,
cmp_op: Literal['$gte', '$gt', '$lt', '$lte'],
threshold: Union[Annotated[int, Strict(strict=True)], Annotated[float, Strict(strict=True)]]
```
## <Badge color="yellow" size="lg" shape="rounded">Class</Badge> wandb.automations.MetricThresholdFilter



Expand All @@ -30,18 +22,36 @@ multiple values.



```python
*,
name: str,
agg_op: wandb.automations._filters.run_metrics.Agg | None = None,
window_size: Annotated[int, Gt(gt=0)] = 1,
cmp_op: Literal['$gte', '$gt', '$lt', '$lte'],
threshold: Union[Annotated[int, Strict(strict=True)], Annotated[float, Strict(strict=True)]]
```

## Args

- `name`:
- `agg_op`:
- `window_size`:
- `cmp_op`: Comparison operator between the metric value (left) vs. the threshold (right).
- `threshold`:
<ResponseField name="name" type="str">

</ResponseField>

<ResponseField name="agg_op" type="wandb.automations._filters.run_metrics.Agg | None">

</ResponseField>

<ResponseField name="window_size" type="Annotated[int, Gt(gt=0)]">

</ResponseField>

<ResponseField name="cmp_op" type="Literal['$gte', '$gt', '$lt', '$lte']">
Comparison operator between the metric value (left) vs. the threshold (right).
</ResponseField>

<ResponseField name="threshold" type="Union[Annotated[int, Strict(strict=True)], Annotated[float, Strict(strict=True)]]">

</ResponseField>



Expand Down
39 changes: 23 additions & 16 deletions models/ref/python/automations/metriczscorefilter.mdx
Original file line number Diff line number Diff line change
@@ -1,42 +1,49 @@
---
title: MetricZScoreFilter
kind: class
namespace: wandb.automations._run_metric_filters
namespace: wandb.automations._filters.run_metrics
---

import { GitHubLink } from '/snippets/_includes/github-source-link.mdx';


<GitHubLink url="https://github.com/wandb/wandb/blob/main/wandb/automations/_run_metric_filters.py#L202" />
<GitHubLink compact url="https://github.com/wandb/wandb/blob/main/wandb/automations/_filters/run_metrics.py#L202" />



## <kbd>class</kbd> wandb.automations.MetricZScoreFilter
```python
*,
name: str,
window_size: Annotated[int, Gt(gt=0)] = 30,
threshold: Union[Annotated[int, Gt(gt=0)], Annotated[float, Gt(gt=0)]] = 3.0,
change_dir: wandb.automations._run_metric_filters.ChangeDir = ANY
```
## <Badge color="yellow" size="lg" shape="rounded">Class</Badge> wandb.automations.MetricZScoreFilter



Filter that compares a metric's z-score against a user-defined threshold.



## Args

- `name`: Name of the observed metric.
- `window_size`: Size of the window to calculate the metric mean and standard deviation over.
- `threshold`: Threshold for the z-score.
- `change_dir`: Direction of the z-score change to watch for.
```python
*,
name: str,
window_size: Annotated[int, Gt(gt=0)] = 30,
threshold: Union[Annotated[int, Gt(gt=0)], Annotated[float, Gt(gt=0)]] = 3.0,
change_dir: wandb.automations._filters.run_metrics.ChangeDir = ANY
```

## Args

<ResponseField name="name" type="str">
Name of the observed metric.
</ResponseField>

<ResponseField name="window_size" type="Annotated[int, Gt(gt=0)]">
Size of the window to calculate the metric mean and standard deviation over.
</ResponseField>

<ResponseField name="threshold" type="Union[Annotated[int, Gt(gt=0)], Annotated[float, Gt(gt=0)]]">
Threshold for the z-score.
</ResponseField>

<ResponseField name="change_dir" type="wandb.automations._filters.run_metrics.ChangeDir">
Direction of the z-score change to watch for.
</ResponseField>



Expand Down
Loading
Loading