Skip to content

Commit 524b75b

Browse files
Update reference docs to sdk@v0.20.0, core@master (#1362)
Used wandb/wandb@c0d9bf2 Co-authored-by: github-actions[bot]x <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 63c285e commit 524b75b

46 files changed

Lines changed: 316 additions & 377 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

content/ref/python/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,6 @@ For reference documentation, see https://docs.wandb.com/ref/python.
4444

4545
| Other Members | |
4646
| :--- | :--- |
47-
| `__version__`<a id="__version__"></a> | `'0.19.11'` |
47+
| `__version__`<a id="__version__"></a> | `'0.20.0'` |
4848
| `config`<a id="config"></a> | |
4949
| `summary`<a id="summary"></a> | |

content/ref/python/agent.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: agent
33
---
44

5-
{{< cta-button githubLink=https://www.github.com/wandb/wandb/tree/v0.19.11/wandb/wandb_agent.py#L532-L576 >}}
5+
{{< cta-button githubLink=https://www.github.com/wandb/wandb/tree/v0.20.0/wandb/wandb_agent.py#L529-L573 >}}
66

77
Start one or more sweep agents.
88

content/ref/python/artifact.md

Lines changed: 36 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Artifact
33
---
44

5-
{{< cta-button githubLink=https://www.github.com/wandb/wandb/tree/v0.19.11/wandb/sdk/artifacts/artifact.py#L108-L2648 >}}
5+
{{< cta-button githubLink=https://www.github.com/wandb/wandb/tree/v0.20.0/wandb/sdk/artifacts/artifact.py#L124-L2658 >}}
66

77
Flexible and lightweight building block for dataset and model versioning.
88

@@ -24,11 +24,11 @@ begin with `add`. Once the artifact has all the desired files, you can call
2424
| Args | |
2525
| :--- | :--- |
2626
| `name` | A human-readable name for the artifact. Use the name to identify a specific artifact in the W&B App UI or programmatically. You can interactively reference an artifact with the `use_artifact` Public API. A name can contain letters, numbers, underscores, hyphens, and dots. The name must be unique across a project. |
27-
| `type` | The artifact's type. Use the type of an artifact to both organize and differentiate artifacts. You can use any string that contains letters, numbers, underscores, hyphens, and dots. Common types include `dataset` or `model`. Include `model` within your type string if you want to link the artifact to the W&B Model Registry. |
27+
| `type` | The artifact's type. Use the type of an artifact to both organize and differentiate artifacts. You can use any string that contains letters, numbers, underscores, hyphens, and dots. Common types include `dataset` or `model`. Note: Some types are reserved for internal use and cannot be set by users. Such types include `job` and types that start with `wandb-`. |
2828
| `description` | A description of the artifact. For Model or Dataset Artifacts, add documentation for your standardized team model or dataset card. View an artifact's description programmatically with the `Artifact.description` attribute or programmatically with the W&B App UI. W&B renders the description as markdown in the W&B App. |
2929
| `metadata` | Additional information about an artifact. Specify metadata as a dictionary of key-value pairs. You can specify no more than 100 total keys. |
3030
| `incremental` | Use `Artifact.new_draft()` method instead to modify an existing artifact. |
31-
| `use_as` | W&B Launch specific parameter. Not recommended for general use. |
31+
| `use_as` | Deprecated. |
3232
| `is_link` | Boolean indication of if the artifact is a linked artifact(`True`) or source artifact(`False`). |
3333

3434
| Returns | |
@@ -68,13 +68,14 @@ begin with `add`. Once the artifact has all the desired files, you can call
6868
| `type` | The artifact's type. Common types include `dataset` or `model`. |
6969
| `updated_at` | The time when the artifact was last updated. |
7070
| `url` | Constructs the URL of the artifact. |
71+
| `use_as` | Deprecated. |
7172
| `version` | The artifact's version. A string with the format `v{number}`. If the artifact is a link artifact, the version will be from the linked collection. |
7273

7374
## Methods
7475

7576
### `add`
7677

77-
[View source](https://www.github.com/wandb/wandb/tree/v0.19.11/wandb/sdk/artifacts/artifact.py#L1568-L1659)
78+
[View source](https://www.github.com/wandb/wandb/tree/v0.20.0/wandb/sdk/artifacts/artifact.py#L1593-L1685)
7879

7980
```python
8081
add(
@@ -102,14 +103,15 @@ Add wandb.WBValue `obj` to the artifact.
102103

103104
### `add_dir`
104105

105-
[View source](https://www.github.com/wandb/wandb/tree/v0.19.11/wandb/sdk/artifacts/artifact.py#L1423-L1483)
106+
[View source](https://www.github.com/wandb/wandb/tree/v0.20.0/wandb/sdk/artifacts/artifact.py#L1442-L1508)
106107

107108
```python
108109
add_dir(
109110
local_path: str,
110111
name: (str | None) = None,
111112
skip_cache: (bool | None) = (False),
112-
policy: (Literal['mutable', 'immutable'] | None) = "mutable"
113+
policy: (Literal['mutable', 'immutable'] | None) = "mutable",
114+
merge: bool = (False)
113115
) -> None
114116
```
115117

@@ -121,6 +123,7 @@ Add a local directory to the artifact.
121123
| `name` | The subdirectory name within an artifact. The name you specify appears in the W&B App UI nested by artifact's `type`. Defaults to the root of the artifact. |
122124
| `skip_cache` | If set to `True`, W&B will not copy/move files to the cache while uploading |
123125
| `policy` | "mutable" | "immutable". By default, "mutable" "mutable": Create a temporary copy of the file to prevent corruption during upload. "immutable": Disable protection, rely on the user not to delete or change the file. |
126+
| `merge` | If `False` (default), throws ValueError if a file was already added in a previous add_dir call and its content has changed. If `True`, overwrites existing files with changed content. Always adds new files and never removes files. To replace an entire directory, pass a name when adding the directory using `add_dir(local_path, name=my_prefix)` and call `remove(my_prefix)` to remove the directory, then add it again. |
124127

125128
| Raises | |
126129
| :--- | :--- |
@@ -129,7 +132,7 @@ Add a local directory to the artifact.
129132

130133
### `add_file`
131134

132-
[View source](https://www.github.com/wandb/wandb/tree/v0.19.11/wandb/sdk/artifacts/artifact.py#L1370-L1421)
135+
[View source](https://www.github.com/wandb/wandb/tree/v0.20.0/wandb/sdk/artifacts/artifact.py#L1389-L1440)
133136

134137
```python
135138
add_file(
@@ -164,7 +167,7 @@ Add a local file to the artifact.
164167

165168
### `add_reference`
166169

167-
[View source](https://www.github.com/wandb/wandb/tree/v0.19.11/wandb/sdk/artifacts/artifact.py#L1485-L1566)
170+
[View source](https://www.github.com/wandb/wandb/tree/v0.20.0/wandb/sdk/artifacts/artifact.py#L1510-L1591)
168171

169172
```python
170173
add_reference(
@@ -216,7 +219,7 @@ blank.
216219

217220
### `checkout`
218221

219-
[View source](https://www.github.com/wandb/wandb/tree/v0.19.11/wandb/sdk/artifacts/artifact.py#L2129-L2157)
222+
[View source](https://www.github.com/wandb/wandb/tree/v0.20.0/wandb/sdk/artifacts/artifact.py#L2153-L2181)
220223

221224
```python
222225
checkout(
@@ -243,7 +246,7 @@ artifact.
243246

244247
### `delete`
245248

246-
[View source](https://www.github.com/wandb/wandb/tree/v0.19.11/wandb/sdk/artifacts/artifact.py#L2267-L2291)
249+
[View source](https://www.github.com/wandb/wandb/tree/v0.20.0/wandb/sdk/artifacts/artifact.py#L2289-L2313)
247250

248251
```python
249252
delete(
@@ -268,7 +271,7 @@ Use `artifact.unlink()` instead of `artifact.delete()` to remove a link between
268271

269272
### `download`
270273

271-
[View source](https://www.github.com/wandb/wandb/tree/v0.19.11/wandb/sdk/artifacts/artifact.py#L1837-L1889)
274+
[View source](https://www.github.com/wandb/wandb/tree/v0.20.0/wandb/sdk/artifacts/artifact.py#L1863-L1915)
272275

273276
```python
274277
download(
@@ -304,7 +307,7 @@ the artifact.
304307

305308
### `file`
306309

307-
[View source](https://www.github.com/wandb/wandb/tree/v0.19.11/wandb/sdk/artifacts/artifact.py#L2199-L2223)
310+
[View source](https://www.github.com/wandb/wandb/tree/v0.20.0/wandb/sdk/artifacts/artifact.py#L2221-L2245)
308311

309312
```python
310313
file(
@@ -329,7 +332,7 @@ Download a single file artifact to the directory you specify with `root`.
329332

330333
### `files`
331334

332-
[View source](https://www.github.com/wandb/wandb/tree/v0.19.11/wandb/sdk/artifacts/artifact.py#L2225-L2242)
335+
[View source](https://www.github.com/wandb/wandb/tree/v0.20.0/wandb/sdk/artifacts/artifact.py#L2247-L2264)
333336

334337
```python
335338
files(
@@ -355,7 +358,7 @@ Iterate over all files stored in this artifact.
355358

356359
### `finalize`
357360

358-
[View source](https://www.github.com/wandb/wandb/tree/v0.19.11/wandb/sdk/artifacts/artifact.py#L1041-L1049)
361+
[View source](https://www.github.com/wandb/wandb/tree/v0.20.0/wandb/sdk/artifacts/artifact.py#L1062-L1070)
359362

360363
```python
361364
finalize() -> None
@@ -370,7 +373,7 @@ when you log the artifact with `log_artifact`.
370373

371374
### `get`
372375

373-
[View source](https://www.github.com/wandb/wandb/tree/v0.19.11/wandb/sdk/artifacts/artifact.py#L1754-L1799)
376+
[View source](https://www.github.com/wandb/wandb/tree/v0.20.0/wandb/sdk/artifacts/artifact.py#L1780-L1825)
374377

375378
```python
376379
get(
@@ -394,7 +397,7 @@ Get the WBValue object located at the artifact relative `name`.
394397

395398
### `get_added_local_path_name`
396399

397-
[View source](https://www.github.com/wandb/wandb/tree/v0.19.11/wandb/sdk/artifacts/artifact.py#L1801-L1813)
400+
[View source](https://www.github.com/wandb/wandb/tree/v0.20.0/wandb/sdk/artifacts/artifact.py#L1827-L1839)
398401

399402
```python
400403
get_added_local_path_name(
@@ -414,7 +417,7 @@ Get the artifact relative name of a file added by a local filesystem path.
414417

415418
### `get_entry`
416419

417-
[View source](https://www.github.com/wandb/wandb/tree/v0.19.11/wandb/sdk/artifacts/artifact.py#L1733-L1752)
420+
[View source](https://www.github.com/wandb/wandb/tree/v0.20.0/wandb/sdk/artifacts/artifact.py#L1759-L1778)
418421

419422
```python
420423
get_entry(
@@ -439,7 +442,7 @@ Get the entry with the given name.
439442

440443
### `get_path`
441444

442-
[View source](https://www.github.com/wandb/wandb/tree/v0.19.11/wandb/sdk/artifacts/artifact.py#L1725-L1731)
445+
[View source](https://www.github.com/wandb/wandb/tree/v0.20.0/wandb/sdk/artifacts/artifact.py#L1751-L1757)
443446

444447
```python
445448
get_path(
@@ -451,7 +454,7 @@ Deprecated. Use `get_entry(name)`.
451454

452455
### `is_draft`
453456

454-
[View source](https://www.github.com/wandb/wandb/tree/v0.19.11/wandb/sdk/artifacts/artifact.py#L1051-L1056)
457+
[View source](https://www.github.com/wandb/wandb/tree/v0.20.0/wandb/sdk/artifacts/artifact.py#L1072-L1077)
455458

456459
```python
457460
is_draft() -> bool
@@ -463,7 +466,7 @@ Returns: Boolean. `False` if artifact is saved. `True` if artifact is not saved.
463466

464467
### `json_encode`
465468

466-
[View source](https://www.github.com/wandb/wandb/tree/v0.19.11/wandb/sdk/artifacts/artifact.py#L2500-L2507)
469+
[View source](https://www.github.com/wandb/wandb/tree/v0.20.0/wandb/sdk/artifacts/artifact.py#L2520-L2527)
467470

468471
```python
469472
json_encode() -> dict[str, Any]
@@ -477,7 +480,7 @@ Returns the artifact encoded to the JSON format.
477480

478481
### `link`
479482

480-
[View source](https://www.github.com/wandb/wandb/tree/v0.19.11/wandb/sdk/artifacts/artifact.py#L2318-L2362)
483+
[View source](https://www.github.com/wandb/wandb/tree/v0.20.0/wandb/sdk/artifacts/artifact.py#L2340-L2382)
481484

482485
```python
483486
link(
@@ -503,7 +506,7 @@ Link this artifact to a portfolio (a promoted collection of artifacts).
503506

504507
### `logged_by`
505508

506-
[View source](https://www.github.com/wandb/wandb/tree/v0.19.11/wandb/sdk/artifacts/artifact.py#L2456-L2498)
509+
[View source](https://www.github.com/wandb/wandb/tree/v0.20.0/wandb/sdk/artifacts/artifact.py#L2476-L2518)
507510

508511
```python
509512
logged_by() -> (Run | None)
@@ -521,7 +524,7 @@ Get the W&B run that originally logged the artifact.
521524

522525
### `new_draft`
523526

524-
[View source](https://www.github.com/wandb/wandb/tree/v0.19.11/wandb/sdk/artifacts/artifact.py#L458-L491)
527+
[View source](https://www.github.com/wandb/wandb/tree/v0.20.0/wandb/sdk/artifacts/artifact.py#L473-L506)
525528

526529
```python
527530
new_draft() -> Artifact
@@ -543,7 +546,7 @@ modified and logged as a new version.
543546

544547
### `new_file`
545548

546-
[View source](https://www.github.com/wandb/wandb/tree/v0.19.11/wandb/sdk/artifacts/artifact.py#L1327-L1368)
549+
[View source](https://www.github.com/wandb/wandb/tree/v0.20.0/wandb/sdk/artifacts/artifact.py#L1346-L1387)
547550

548551
```python
549552
@contextlib.contextmanager
@@ -572,7 +575,7 @@ Open a new temporary file and add it to the artifact.
572575

573576
### `remove`
574577

575-
[View source](https://www.github.com/wandb/wandb/tree/v0.19.11/wandb/sdk/artifacts/artifact.py#L1695-L1723)
578+
[View source](https://www.github.com/wandb/wandb/tree/v0.20.0/wandb/sdk/artifacts/artifact.py#L1721-L1749)
576579

577580
```python
578581
remove(
@@ -593,7 +596,7 @@ Remove an item from the artifact.
593596

594597
### `save`
595598

596-
[View source](https://www.github.com/wandb/wandb/tree/v0.19.11/wandb/sdk/artifacts/artifact.py#L1061-L1103)
599+
[View source](https://www.github.com/wandb/wandb/tree/v0.20.0/wandb/sdk/artifacts/artifact.py#L1082-L1122)
597600

598601
```python
599602
save(
@@ -614,7 +617,7 @@ run, a run of type "auto" is created to track this artifact.
614617

615618
### `unlink`
616619

617-
[View source](https://www.github.com/wandb/wandb/tree/v0.19.11/wandb/sdk/artifacts/artifact.py#L2364-L2379)
620+
[View source](https://www.github.com/wandb/wandb/tree/v0.20.0/wandb/sdk/artifacts/artifact.py#L2384-L2399)
618621

619622
```python
620623
unlink() -> None
@@ -629,7 +632,7 @@ Unlink this artifact if it is currently a member of a portfolio (a promoted coll
629632

630633
### `used_by`
631634

632-
[View source](https://www.github.com/wandb/wandb/tree/v0.19.11/wandb/sdk/artifacts/artifact.py#L2410-L2454)
635+
[View source](https://www.github.com/wandb/wandb/tree/v0.20.0/wandb/sdk/artifacts/artifact.py#L2430-L2474)
633636

634637
```python
635638
used_by() -> list[Run]
@@ -647,7 +650,7 @@ Get a list of the runs that have used this artifact and its linked artifacts.
647650

648651
### `verify`
649652

650-
[View source](https://www.github.com/wandb/wandb/tree/v0.19.11/wandb/sdk/artifacts/artifact.py#L2159-L2197)
653+
[View source](https://www.github.com/wandb/wandb/tree/v0.20.0/wandb/sdk/artifacts/artifact.py#L2183-L2219)
651654

652655
```python
653656
verify(
@@ -662,7 +665,7 @@ cross-referenced against the artifact's manifest. References are not verified.
662665

663666
| Args | |
664667
| :--- | :--- |
665-
| `root` | The directory to verify. If None artifact will be downloaded to './artifacts/self.name/' |
668+
| `root` | The directory to verify. If None artifact will be downloaded to './artifacts/self.name/'. |
666669

667670
| Raises | |
668671
| :--- | :--- |
@@ -671,7 +674,7 @@ cross-referenced against the artifact's manifest. References are not verified.
671674

672675
### `wait`
673676

674-
[View source](https://www.github.com/wandb/wandb/tree/v0.19.11/wandb/sdk/artifacts/artifact.py#L1113-L1137)
677+
[View source](https://www.github.com/wandb/wandb/tree/v0.20.0/wandb/sdk/artifacts/artifact.py#L1132-L1156)
675678

676679
```python
677680
wait(
@@ -691,7 +694,7 @@ If needed, wait for this artifact to finish logging.
691694

692695
### `__getitem__`
693696

694-
[View source](https://www.github.com/wandb/wandb/tree/v0.19.11/wandb/sdk/artifacts/artifact.py#L1297-L1309)
697+
[View source](https://www.github.com/wandb/wandb/tree/v0.20.0/wandb/sdk/artifacts/artifact.py#L1316-L1328)
695698

696699
```python
697700
__getitem__(
@@ -715,7 +718,7 @@ Get the WBValue object located at the artifact relative `name`.
715718

716719
### `__setitem__`
717720

718-
[View source](https://www.github.com/wandb/wandb/tree/v0.19.11/wandb/sdk/artifacts/artifact.py#L1311-L1325)
721+
[View source](https://www.github.com/wandb/wandb/tree/v0.20.0/wandb/sdk/artifacts/artifact.py#L1330-L1344)
719722

720723
```python
721724
__setitem__(

content/ref/python/controller.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: controller
33
---
44

5-
{{< cta-button githubLink=https://www.github.com/wandb/wandb/tree/v0.19.11/wandb/sdk/wandb_sweep.py#L95-L119 >}}
5+
{{< cta-button githubLink=https://www.github.com/wandb/wandb/tree/v0.20.0/wandb/sdk/wandb_sweep.py#L95-L119 >}}
66

77
Public sweep controller constructor.
88

content/ref/python/data-types/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ and upload them to the W&B server.
3232

3333
[`class Html`](./html.md): A class for logging HTML content to W&B.
3434

35-
[`class Image`](./image.md): Format images for logging to W&B.
35+
[`class Image`](./image.md): A class for logging images to W&B.
3636

3737
[`class ImageMask`](./imagemask.md): Format image masks or overlays for logging to W&B.
3838

content/ref/python/data-types/audio.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,15 @@
22
title: Audio
33
---
44

5-
{{< cta-button githubLink=https://www.github.com/wandb/wandb/tree/v0.19.11/wandb/sdk/data_types/audio.py#L13-L155 >}}
5+
{{< cta-button githubLink=https://www.github.com/wandb/wandb/tree/v0.20.0/wandb/sdk/data_types/audio.py#L17-L172 >}}
66

77
Wandb class for audio clips.
88

99
```python
1010
Audio(
11-
data_or_path, sample_rate=None, caption=None
11+
data_or_path: Union[str, pathlib.Path, list, 'np.ndarray'],
12+
sample_rate: Optional[int] = None,
13+
caption: Optional[str] = None
1214
)
1315
```
1416

@@ -22,7 +24,7 @@ Audio(
2224

2325
### `durations`
2426

25-
[View source](https://www.github.com/wandb/wandb/tree/v0.19.11/wandb/sdk/data_types/audio.py#L113-L115)
27+
[View source](https://www.github.com/wandb/wandb/tree/v0.20.0/wandb/sdk/data_types/audio.py#L130-L132)
2628

2729
```python
2830
@classmethod
@@ -33,15 +35,15 @@ durations(
3335

3436
### `resolve_ref`
3537

36-
[View source](https://www.github.com/wandb/wandb/tree/v0.19.11/wandb/sdk/data_types/audio.py#L129-L141)
38+
[View source](https://www.github.com/wandb/wandb/tree/v0.20.0/wandb/sdk/data_types/audio.py#L146-L158)
3739

3840
```python
3941
resolve_ref()
4042
```
4143

4244
### `sample_rates`
4345

44-
[View source](https://www.github.com/wandb/wandb/tree/v0.19.11/wandb/sdk/data_types/audio.py#L117-L119)
46+
[View source](https://www.github.com/wandb/wandb/tree/v0.20.0/wandb/sdk/data_types/audio.py#L134-L136)
4547

4648
```python
4749
@classmethod

0 commit comments

Comments
 (0)