From aed487f41c6ae0d6516419f9083bf33f74488d13 Mon Sep 17 00:00:00 2001 From: Noah Luna <15202580+ngrayluna@users.noreply.github.com> Date: Fri, 31 Jul 2026 17:09:44 -0700 Subject: [PATCH 1/4] demo --- docs.json | 296 +++- models/ref/python/automations/automation.mdx | 6 +- models/ref/python/automations/donothing.mdx | 4 - .../python/automations/metricchangefilter.mdx | 14 +- .../automations/metricthresholdfilter.mdx | 10 +- .../python/automations/metriczscorefilter.mdx | 10 +- .../ref/python/automations/newautomation.mdx | 10 - .../newautomation-properties.mdx | 19 + .../python/automations/onaddartifactalias.mdx | 8 +- .../python/automations/onaddartifacttag.mdx | 8 +- .../python/automations/onaddcollectiontag.mdx | 8 +- .../python/automations/oncreateartifact.mdx | 8 +- .../ref/python/automations/onlinkartifact.mdx | 8 +- .../automations/onremoveartifacttag.mdx | 8 +- .../automations/onremovecollectiontag.mdx | 8 +- models/ref/python/automations/onrunmetric.mdx | 10 +- models/ref/python/automations/onrunstate.mdx | 10 +- .../python/automations/onunlinkartifact.mdx | 8 +- .../ref/python/automations/runstatefilter.mdx | 8 +- .../python/automations/sendnotification.mdx | 27 - .../sendnotification-methods.mdx | 36 + models/ref/python/automations/sendwebhook.mdx | 23 - .../sendwebhook/sendwebhook-methods.mdx | 32 + models/ref/python/data-types/audio.mdx | 36 - .../python/data-types/audio/audio-methods.mdx | 45 + models/ref/python/data-types/histogram.mdx | 4 - models/ref/python/data-types/html.mdx | 4 - models/ref/python/data-types/image.mdx | 10 - .../data-types/image/image-properties.mdx | 19 + models/ref/python/data-types/molecule.mdx | 48 - .../data-types/molecule/molecule-methods.mdx | 57 + models/ref/python/data-types/object3d.mdx | 54 - .../data-types/object3d/object3d-methods.mdx | 63 + models/ref/python/data-types/plotly.mdx | 4 - models/ref/python/data-types/table.mdx | 156 -- .../python/data-types/table/table-methods.mdx | 155 ++ models/ref/python/data-types/video.mdx | 4 - models/ref/python/experiments/artifact.mdx | 759 --------- .../experiments/artifact/artifact-methods.mdx | 570 +++++++ .../artifact/artifact-properties.mdx | 211 +++ models/ref/python/experiments/run.mdx | 1007 ------------ .../python/experiments/run/run-methods.mdx | 890 +++++++++++ .../python/experiments/run/run-properties.mdx | 139 ++ models/ref/python/experiments/settings.mdx | 142 +- .../experiments/settings/settings-methods.mdx | 60 + .../settings/settings-properties.mdx | 102 ++ models/ref/python/functions/login.mdx | 2 +- models/ref/python/public-api/api.mdx | 1383 ----------------- .../ref/python/public-api/api/api-methods.mdx | 1374 ++++++++++++++++ .../python/public-api/api/api-properties.mdx | 27 + .../python/public-api/artifactcollection.mdx | 120 +- .../artifactcollection-methods.mdx | 85 + .../artifactcollection-properties.mdx | 55 + .../python/public-api/artifactcollections.mdx | 44 +- .../artifactcollections-methods.mdx | 51 + .../ref/python/public-api/artifactfiles.mdx | 50 +- .../artifactfiles/artifactfiles-methods.mdx | 51 + .../artifactfiles-properties.mdx | 19 + models/ref/python/public-api/artifacts.mdx | 32 +- .../artifacts/artifacts-methods.mdx | 39 + models/ref/python/public-api/artifacttype.mdx | 56 +- .../artifacttype/artifacttype-methods.mdx | 53 + .../artifacttype/artifacttype-properties.mdx | 23 + .../ref/python/public-api/artifacttypes.mdx | 44 +- .../artifacttypes/artifacttypes-methods.mdx | 51 + models/ref/python/public-api/betareport.mdx | 86 - .../betareport/betareport-methods.mdx | 53 + .../betareport/betareport-properties.mdx | 55 + .../public-api/downloadhistoryresult.mdx | 4 - models/ref/python/public-api/file.mdx | 50 - .../python/public-api/file/file-methods.mdx | 49 + .../public-api/file/file-properties.mdx | 23 + models/ref/python/public-api/files.mdx | 18 - .../python/public-api/files/files-methods.mdx | 27 + .../public-api/incompleterunhistoryerror.mdx | 38 - .../incompleterunhistoryerror-methods.mdx | 47 + models/ref/python/public-api/member.mdx | 18 - .../public-api/member/member-methods.mdx | 27 + models/ref/python/public-api/organization.mdx | 4 - models/ref/python/public-api/project.mdx | 83 +- .../public-api/project/project-methods.mdx | 71 + .../public-api/project/project-properties.mdx | 32 + .../public-api/projectartifactcollections.mdx | 44 +- .../projectartifactcollections-methods.mdx | 51 + models/ref/python/public-api/projects.mdx | 42 - .../public-api/projects/projects-methods.mdx | 51 + models/ref/python/public-api/registry.mdx | 326 ---- .../public-api/registry/registry-methods.mdx | 274 ++++ .../registry/registry-properties.mdx | 74 + models/ref/python/public-api/reports.mdx | 42 - .../public-api/reports/reports-methods.mdx | 51 + models/ref/python/public-api/run.mdx | 588 +------ .../ref/python/public-api/run/run-methods.mdx | 508 ++++++ .../python/public-api/run/run-properties.mdx | 100 ++ models/ref/python/public-api/runartifacts.mdx | 44 +- .../runartifacts/runartifacts-methods.mdx | 51 + models/ref/python/public-api/runs.mdx | 70 - .../python/public-api/runs/runs-methods.mdx | 79 + models/ref/python/public-api/sweep.mdx | 140 -- .../python/public-api/sweep/sweep-methods.mdx | 102 ++ .../public-api/sweep/sweep-properties.mdx | 60 + models/ref/python/public-api/sweeps.mdx | 30 - .../public-api/sweeps/sweeps-methods.mdx | 39 + models/ref/python/public-api/team.mdx | 59 - .../python/public-api/team/team-methods.mdx | 68 + models/ref/python/public-api/user.mdx | 86 - .../python/public-api/user/user-methods.mdx | 71 + .../public-api/user/user-properties.mdx | 37 + 108 files changed, 6534 insertions(+), 5915 deletions(-) create mode 100644 models/ref/python/automations/newautomation/newautomation-properties.mdx create mode 100644 models/ref/python/automations/sendnotification/sendnotification-methods.mdx create mode 100644 models/ref/python/automations/sendwebhook/sendwebhook-methods.mdx create mode 100644 models/ref/python/data-types/audio/audio-methods.mdx create mode 100644 models/ref/python/data-types/image/image-properties.mdx create mode 100644 models/ref/python/data-types/molecule/molecule-methods.mdx create mode 100644 models/ref/python/data-types/object3d/object3d-methods.mdx create mode 100644 models/ref/python/data-types/table/table-methods.mdx create mode 100644 models/ref/python/experiments/artifact/artifact-methods.mdx create mode 100644 models/ref/python/experiments/artifact/artifact-properties.mdx create mode 100644 models/ref/python/experiments/run/run-methods.mdx create mode 100644 models/ref/python/experiments/run/run-properties.mdx create mode 100644 models/ref/python/experiments/settings/settings-methods.mdx create mode 100644 models/ref/python/experiments/settings/settings-properties.mdx create mode 100644 models/ref/python/public-api/api/api-methods.mdx create mode 100644 models/ref/python/public-api/api/api-properties.mdx create mode 100644 models/ref/python/public-api/artifactcollection/artifactcollection-methods.mdx create mode 100644 models/ref/python/public-api/artifactcollection/artifactcollection-properties.mdx create mode 100644 models/ref/python/public-api/artifactcollections/artifactcollections-methods.mdx create mode 100644 models/ref/python/public-api/artifactfiles/artifactfiles-methods.mdx create mode 100644 models/ref/python/public-api/artifactfiles/artifactfiles-properties.mdx create mode 100644 models/ref/python/public-api/artifacts/artifacts-methods.mdx create mode 100644 models/ref/python/public-api/artifacttype/artifacttype-methods.mdx create mode 100644 models/ref/python/public-api/artifacttype/artifacttype-properties.mdx create mode 100644 models/ref/python/public-api/artifacttypes/artifacttypes-methods.mdx create mode 100644 models/ref/python/public-api/betareport/betareport-methods.mdx create mode 100644 models/ref/python/public-api/betareport/betareport-properties.mdx create mode 100644 models/ref/python/public-api/file/file-methods.mdx create mode 100644 models/ref/python/public-api/file/file-properties.mdx create mode 100644 models/ref/python/public-api/files/files-methods.mdx create mode 100644 models/ref/python/public-api/incompleterunhistoryerror/incompleterunhistoryerror-methods.mdx create mode 100644 models/ref/python/public-api/member/member-methods.mdx create mode 100644 models/ref/python/public-api/project/project-methods.mdx create mode 100644 models/ref/python/public-api/project/project-properties.mdx create mode 100644 models/ref/python/public-api/projectartifactcollections/projectartifactcollections-methods.mdx create mode 100644 models/ref/python/public-api/projects/projects-methods.mdx create mode 100644 models/ref/python/public-api/registry/registry-methods.mdx create mode 100644 models/ref/python/public-api/registry/registry-properties.mdx create mode 100644 models/ref/python/public-api/reports/reports-methods.mdx create mode 100644 models/ref/python/public-api/run/run-methods.mdx create mode 100644 models/ref/python/public-api/run/run-properties.mdx create mode 100644 models/ref/python/public-api/runartifacts/runartifacts-methods.mdx create mode 100644 models/ref/python/public-api/runs/runs-methods.mdx create mode 100644 models/ref/python/public-api/sweep/sweep-methods.mdx create mode 100644 models/ref/python/public-api/sweep/sweep-properties.mdx create mode 100644 models/ref/python/public-api/sweeps/sweeps-methods.mdx create mode 100644 models/ref/python/public-api/team/team-methods.mdx create mode 100644 models/ref/python/public-api/user/user-methods.mdx create mode 100644 models/ref/python/public-api/user/user-properties.mdx diff --git a/docs.json b/docs.json index 5a200e7dda..e04e949754 100644 --- a/docs.json +++ b/docs.json @@ -951,14 +951,44 @@ "group": "Data Types", "pages": [ "models/ref/python/data-types", - "models/ref/python/data-types/audio", + { + "group": "Audio", + "root": "models/ref/python/data-types/audio", + "pages": [ + "models/ref/python/data-types/audio/audio-methods" + ] + }, "models/ref/python/data-types/histogram", "models/ref/python/data-types/html", - "models/ref/python/data-types/image", - "models/ref/python/data-types/molecule", - "models/ref/python/data-types/object3d", + { + "group": "Image", + "root": "models/ref/python/data-types/image", + "pages": [ + "models/ref/python/data-types/image/image-properties" + ] + }, + { + "group": "Molecule", + "root": "models/ref/python/data-types/molecule", + "pages": [ + "models/ref/python/data-types/molecule/molecule-methods" + ] + }, + { + "group": "Object3D", + "root": "models/ref/python/data-types/object3d", + "pages": [ + "models/ref/python/data-types/object3d/object3d-methods" + ] + }, "models/ref/python/data-types/plotly", - "models/ref/python/data-types/table", + { + "group": "Table", + "root": "models/ref/python/data-types/table", + "pages": [ + "models/ref/python/data-types/table/table-methods" + ] + }, "models/ref/python/data-types/video" ] }, @@ -966,9 +996,30 @@ "group": "Experiments", "pages": [ "models/ref/python/experiments", - "models/ref/python/experiments/artifact", - "models/ref/python/experiments/run", - "models/ref/python/experiments/settings", + { + "group": "Artifact", + "root": "models/ref/python/experiments/artifact", + "pages": [ + "models/ref/python/experiments/artifact/artifact-properties", + "models/ref/python/experiments/artifact/artifact-methods" + ] + }, + { + "group": "Run", + "root": "models/ref/python/experiments/run", + "pages": [ + "models/ref/python/experiments/run/run-properties", + "models/ref/python/experiments/run/run-methods" + ] + }, + { + "group": "Settings", + "root": "models/ref/python/experiments/settings", + "pages": [ + "models/ref/python/experiments/settings/settings-properties", + "models/ref/python/experiments/settings/settings-methods" + ] + }, "models/ref/python/experiments/system-metrics" ] }, @@ -979,11 +1030,23 @@ "models/ref/python/automations/automation", "models/ref/python/automations/donothing", "models/ref/python/public-api/downloadhistoryresult", - "models/ref/python/public-api/incompleterunhistoryerror", + { + "group": "IncompleteRunHistoryError", + "root": "models/ref/python/public-api/incompleterunhistoryerror", + "pages": [ + "models/ref/python/public-api/incompleterunhistoryerror/incompleterunhistoryerror-methods" + ] + }, "models/ref/python/automations/metricchangefilter", "models/ref/python/automations/metriczscorefilter", "models/ref/python/automations/metricthresholdfilter", - "models/ref/python/automations/newautomation", + { + "group": "NewAutomation", + "root": "models/ref/python/automations/newautomation", + "pages": [ + "models/ref/python/automations/newautomation/newautomation-properties" + ] + }, "models/ref/python/automations/onaddartifactalias", "models/ref/python/automations/onaddartifacttag", "models/ref/python/automations/onaddcollectiontag", @@ -995,8 +1058,20 @@ "models/ref/python/automations/onrunstate", "models/ref/python/automations/onunlinkartifact", "models/ref/python/automations/runstatefilter", - "models/ref/python/automations/sendnotification", - "models/ref/python/automations/sendwebhook" + { + "group": "SendNotification", + "root": "models/ref/python/automations/sendnotification", + "pages": [ + "models/ref/python/automations/sendnotification/sendnotification-methods" + ] + }, + { + "group": "SendWebhook", + "root": "models/ref/python/automations/sendwebhook", + "pages": [ + "models/ref/python/automations/sendwebhook/sendwebhook-methods" + ] + } ] }, { @@ -1018,30 +1093,179 @@ "group": "Public API", "pages": [ "models/ref/python/public-api", - "models/ref/python/public-api/api", - "models/ref/python/public-api/artifactcollection", - "models/ref/python/public-api/artifactcollections", - "models/ref/python/public-api/artifactfiles", - "models/ref/python/public-api/artifacts", - "models/ref/python/public-api/artifacttype", - "models/ref/python/public-api/artifacttypes", - "models/ref/python/public-api/betareport", - "models/ref/python/public-api/file", - "models/ref/python/public-api/files", - "models/ref/python/public-api/member", + { + "group": "Api", + "root": "models/ref/python/public-api/api", + "pages": [ + "models/ref/python/public-api/api/api-properties", + "models/ref/python/public-api/api/api-methods" + ] + }, + { + "group": "ArtifactCollection", + "root": "models/ref/python/public-api/artifactcollection", + "pages": [ + "models/ref/python/public-api/artifactcollection/artifactcollection-properties", + "models/ref/python/public-api/artifactcollection/artifactcollection-methods" + ] + }, + { + "group": "ArtifactCollections", + "root": "models/ref/python/public-api/artifactcollections", + "pages": [ + "models/ref/python/public-api/artifactcollections/artifactcollections-methods" + ] + }, + { + "group": "ArtifactFiles", + "root": "models/ref/python/public-api/artifactfiles", + "pages": [ + "models/ref/python/public-api/artifactfiles/artifactfiles-properties", + "models/ref/python/public-api/artifactfiles/artifactfiles-methods" + ] + }, + { + "group": "Artifacts", + "root": "models/ref/python/public-api/artifacts", + "pages": [ + "models/ref/python/public-api/artifacts/artifacts-methods" + ] + }, + { + "group": "ArtifactType", + "root": "models/ref/python/public-api/artifacttype", + "pages": [ + "models/ref/python/public-api/artifacttype/artifacttype-properties", + "models/ref/python/public-api/artifacttype/artifacttype-methods" + ] + }, + { + "group": "ArtifactTypes", + "root": "models/ref/python/public-api/artifacttypes", + "pages": [ + "models/ref/python/public-api/artifacttypes/artifacttypes-methods" + ] + }, + { + "group": "BetaReport", + "root": "models/ref/python/public-api/betareport", + "pages": [ + "models/ref/python/public-api/betareport/betareport-properties", + "models/ref/python/public-api/betareport/betareport-methods" + ] + }, + { + "group": "File", + "root": "models/ref/python/public-api/file", + "pages": [ + "models/ref/python/public-api/file/file-properties", + "models/ref/python/public-api/file/file-methods" + ] + }, + { + "group": "Files", + "root": "models/ref/python/public-api/files", + "pages": [ + "models/ref/python/public-api/files/files-methods" + ] + }, + { + "group": "Member", + "root": "models/ref/python/public-api/member", + "pages": [ + "models/ref/python/public-api/member/member-methods" + ] + }, "models/ref/python/public-api/organization", - "models/ref/python/public-api/project", - "models/ref/python/public-api/projects", - "models/ref/python/public-api/projectartifactcollections", - "models/ref/python/public-api/registry", - "models/ref/python/public-api/reports", - "models/ref/python/public-api/run", - "models/ref/python/public-api/runartifacts", - "models/ref/python/public-api/runs", - "models/ref/python/public-api/sweep", - "models/ref/python/public-api/sweeps", - "models/ref/python/public-api/team", - "models/ref/python/public-api/user" + { + "group": "Project", + "root": "models/ref/python/public-api/project", + "pages": [ + "models/ref/python/public-api/project/project-properties", + "models/ref/python/public-api/project/project-methods" + ] + }, + { + "group": "Projects", + "root": "models/ref/python/public-api/projects", + "pages": [ + "models/ref/python/public-api/projects/projects-methods" + ] + }, + { + "group": "ProjectArtifactCollections", + "root": "models/ref/python/public-api/projectartifactcollections", + "pages": [ + "models/ref/python/public-api/projectartifactcollections/projectartifactcollections-methods" + ] + }, + { + "group": "Registry", + "root": "models/ref/python/public-api/registry", + "pages": [ + "models/ref/python/public-api/registry/registry-properties", + "models/ref/python/public-api/registry/registry-methods" + ] + }, + { + "group": "Reports", + "root": "models/ref/python/public-api/reports", + "pages": [ + "models/ref/python/public-api/reports/reports-methods" + ] + }, + { + "group": "Run", + "root": "models/ref/python/public-api/run", + "pages": [ + "models/ref/python/public-api/run/run-properties", + "models/ref/python/public-api/run/run-methods" + ] + }, + { + "group": "RunArtifacts", + "root": "models/ref/python/public-api/runartifacts", + "pages": [ + "models/ref/python/public-api/runartifacts/runartifacts-methods" + ] + }, + { + "group": "Runs", + "root": "models/ref/python/public-api/runs", + "pages": [ + "models/ref/python/public-api/runs/runs-methods" + ] + }, + { + "group": "Sweep", + "root": "models/ref/python/public-api/sweep", + "pages": [ + "models/ref/python/public-api/sweep/sweep-properties", + "models/ref/python/public-api/sweep/sweep-methods" + ] + }, + { + "group": "Sweeps", + "root": "models/ref/python/public-api/sweeps", + "pages": [ + "models/ref/python/public-api/sweeps/sweeps-methods" + ] + }, + { + "group": "Team", + "root": "models/ref/python/public-api/team", + "pages": [ + "models/ref/python/public-api/team/team-methods" + ] + }, + { + "group": "User", + "root": "models/ref/python/public-api/user", + "pages": [ + "models/ref/python/public-api/user/user-properties", + "models/ref/python/public-api/user/user-methods" + ] + } ] } ] @@ -7618,4 +7842,4 @@ "stylesheet": "/css/styles.css" }, "theme": "aspen" -} \ No newline at end of file +} diff --git a/models/ref/python/automations/automation.mdx b/models/ref/python/automations/automation.mdx index e774957b04..746c41aa4c 100644 --- a/models/ref/python/automations/automation.mdx +++ b/models/ref/python/automations/automation.mdx @@ -21,7 +21,7 @@ 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=, json_schema_input_type=PydanticUndefined), Discriminator(discriminator='entity_type', custom_error_type=None, custom_error_message=None, custom_error_context=None)]], BeforeValidator(func=, 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=, 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=, json_schema_input_type=PydanticUndefined)] ``` @@ -49,7 +49,3 @@ A local instance of a saved W&B automation that supports editing. - - - - diff --git a/models/ref/python/automations/donothing.mdx b/models/ref/python/automations/donothing.mdx index 88a31471d9..7bf4945703 100644 --- a/models/ref/python/automations/donothing.mdx +++ b/models/ref/python/automations/donothing.mdx @@ -36,7 +36,3 @@ Defines an automation action that intentionally does nothing. - - - - diff --git a/models/ref/python/automations/metricchangefilter.mdx b/models/ref/python/automations/metricchangefilter.mdx index 2e405651e1..b1bf9e1298 100644 --- a/models/ref/python/automations/metricchangefilter.mdx +++ b/models/ref/python/automations/metricchangefilter.mdx @@ -1,13 +1,13 @@ --- 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'; - + @@ -15,13 +15,13 @@ import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; ```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)] = , -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 ``` @@ -51,7 +51,3 @@ between the current window and the non-overlapping prior window. - - - - diff --git a/models/ref/python/automations/metricthresholdfilter.mdx b/models/ref/python/automations/metricthresholdfilter.mdx index a15f89af71..667bbf13d4 100644 --- a/models/ref/python/automations/metricthresholdfilter.mdx +++ b/models/ref/python/automations/metricthresholdfilter.mdx @@ -1,13 +1,13 @@ --- 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'; - + @@ -15,7 +15,7 @@ import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; ```python *, name: str, -agg_op: wandb.automations._run_metric_filters.Agg | None = None, +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)]] @@ -43,7 +43,3 @@ multiple values. - - - - diff --git a/models/ref/python/automations/metriczscorefilter.mdx b/models/ref/python/automations/metriczscorefilter.mdx index e0de33816c..4ab0021d16 100644 --- a/models/ref/python/automations/metriczscorefilter.mdx +++ b/models/ref/python/automations/metriczscorefilter.mdx @@ -1,13 +1,13 @@ --- 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'; - + @@ -17,7 +17,7 @@ import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; 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 +change_dir: wandb.automations._filters.run_metrics.ChangeDir = ANY ``` @@ -38,7 +38,3 @@ Filter that compares a metric's z-score against a user-defined threshold. - - - - diff --git a/models/ref/python/automations/newautomation.mdx b/models/ref/python/automations/newautomation.mdx index d32118a17f..5fadb358e5 100644 --- a/models/ref/python/automations/newautomation.mdx +++ b/models/ref/python/automations/newautomation.mdx @@ -40,13 +40,3 @@ A new automation to be created. -## Properties - -### property scope - -The scope in which the triggering event must occur. - - - - - diff --git a/models/ref/python/automations/newautomation/newautomation-properties.mdx b/models/ref/python/automations/newautomation/newautomation-properties.mdx new file mode 100644 index 0000000000..ca478abcc7 --- /dev/null +++ b/models/ref/python/automations/newautomation/newautomation-properties.mdx @@ -0,0 +1,19 @@ +--- +title: NewAutomation properties +sidebarTitle: Properties +page_kind: class-properties +parent_slug: newautomation +kind: class +namespace: wandb.automations.automations +--- + +## class wandb.automations.NewAutomation + + + +### property scope + +The scope in which the triggering event must occur. + + + diff --git a/models/ref/python/automations/onaddartifactalias.mdx b/models/ref/python/automations/onaddartifactalias.mdx index 99d1f4ca64..15e811f0a6 100644 --- a/models/ref/python/automations/onaddartifactalias.mdx +++ b/models/ref/python/automations/onaddartifactalias.mdx @@ -15,8 +15,8 @@ import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; ```python *, event_type: Literal[ADD_ARTIFACT_ALIAS] = ADD_ARTIFACT_ALIAS, -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=, json_schema_input_type=PydanticUndefined), Discriminator(discriminator='entity_type', custom_error_type=None, custom_error_message=None, custom_error_context=None)]], BeforeValidator(func=, json_schema_input_type=PydanticUndefined), Discriminator(discriminator='typename__', custom_error_type=None, custom_error_message=None, custom_error_context=None)], -filter: Annotated[wandb.automations._filters.operators.And | wandb.automations._filters.operators.Or | wandb.automations._filters.operators.Nor | wandb.automations._filters.operators.Not | wandb.automations._filters.operators.Lt | wandb.automations._filters.operators.Gt | wandb.automations._filters.operators.Lte | wandb.automations._filters.operators.Gte | wandb.automations._filters.operators.Eq | wandb.automations._filters.operators.Ne | wandb.automations._filters.operators.In | wandb.automations._filters.operators.NotIn | wandb.automations._filters.operators.Exists | wandb.automations._filters.operators.Regex | wandb.automations._filters.operators.Contains | wandb.automations._filters.operators.Size | wandb.automations._filters.operators.All | wandb.automations._filters.expressions.FilterExpr | dict[str, Any], Json, BeforeValidator(func=, json_schema_input_type=PydanticUndefined), PlainSerializer(func=, return_type=PydanticUndefined, when_used='always'), AfterValidator(func=)] = And(()) +scope: Annotated[wandb.automations.scopes._ArtifactSequenceScope | wandb.automations.scopes._ArtifactPortfolioScope | wandb.automations.scopes.ProjectScope, BeforeValidator(func=, json_schema_input_type=PydanticUndefined)], +filter: Annotated[wandb.automations._filters.operators.And | wandb.automations._filters.operators.Or | wandb.automations._filters.operators.Nor | wandb.automations._filters.operators.Not | wandb.automations._filters.operators.Lt | wandb.automations._filters.operators.Gt | wandb.automations._filters.operators.Lte | wandb.automations._filters.operators.Gte | wandb.automations._filters.operators.Eq | wandb.automations._filters.operators.Ne | wandb.automations._filters.operators.In | wandb.automations._filters.operators.NotIn | wandb.automations._filters.operators.Exists | wandb.automations._filters.operators.Regex | wandb.automations._filters.operators.Contains | wandb.automations._filters.expressions.FilterExpr | dict[str, Any], Json, BeforeValidator(func=, json_schema_input_type=PydanticUndefined), PlainSerializer(func=, return_type=PydanticUndefined, when_used='always'), AfterValidator(func=)] = And(()) ``` @@ -52,7 +52,3 @@ event = OnAddArtifactAlias( ) ``` - - - - diff --git a/models/ref/python/automations/onaddartifacttag.mdx b/models/ref/python/automations/onaddartifacttag.mdx index 2ebf658cc8..9e47ad4484 100644 --- a/models/ref/python/automations/onaddartifacttag.mdx +++ b/models/ref/python/automations/onaddartifacttag.mdx @@ -15,8 +15,8 @@ import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; ```python *, event_type: Literal[ADD_ARTIFACT_TAG] = ADD_ARTIFACT_TAG, -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=, json_schema_input_type=PydanticUndefined), Discriminator(discriminator='entity_type', custom_error_type=None, custom_error_message=None, custom_error_context=None)]], BeforeValidator(func=, json_schema_input_type=PydanticUndefined), Discriminator(discriminator='typename__', custom_error_type=None, custom_error_message=None, custom_error_context=None)], -filter: Annotated[wandb.automations._filters.operators.And | wandb.automations._filters.operators.Or | wandb.automations._filters.operators.Nor | wandb.automations._filters.operators.Not | wandb.automations._filters.operators.Lt | wandb.automations._filters.operators.Gt | wandb.automations._filters.operators.Lte | wandb.automations._filters.operators.Gte | wandb.automations._filters.operators.Eq | wandb.automations._filters.operators.Ne | wandb.automations._filters.operators.In | wandb.automations._filters.operators.NotIn | wandb.automations._filters.operators.Exists | wandb.automations._filters.operators.Regex | wandb.automations._filters.operators.Contains | wandb.automations._filters.operators.Size | wandb.automations._filters.operators.All | wandb.automations._filters.expressions.FilterExpr | dict[str, Any], Json, BeforeValidator(func=, json_schema_input_type=PydanticUndefined), PlainSerializer(func=, return_type=PydanticUndefined, when_used='always'), AfterValidator(func=)] = And(()) +scope: Annotated[wandb.automations.scopes._ArtifactSequenceScope | wandb.automations.scopes._ArtifactPortfolioScope | wandb.automations.scopes.ProjectScope, BeforeValidator(func=, json_schema_input_type=PydanticUndefined)], +filter: Annotated[wandb.automations._filters.operators.And | wandb.automations._filters.operators.Or | wandb.automations._filters.operators.Nor | wandb.automations._filters.operators.Not | wandb.automations._filters.operators.Lt | wandb.automations._filters.operators.Gt | wandb.automations._filters.operators.Lte | wandb.automations._filters.operators.Gte | wandb.automations._filters.operators.Eq | wandb.automations._filters.operators.Ne | wandb.automations._filters.operators.In | wandb.automations._filters.operators.NotIn | wandb.automations._filters.operators.Exists | wandb.automations._filters.operators.Regex | wandb.automations._filters.operators.Contains | wandb.automations._filters.expressions.FilterExpr | dict[str, Any], Json, BeforeValidator(func=, json_schema_input_type=PydanticUndefined), PlainSerializer(func=, return_type=PydanticUndefined, when_used='always'), AfterValidator(func=)] = And(()) ``` @@ -52,7 +52,3 @@ event = OnAddArtifactTag( ) ``` - - - - diff --git a/models/ref/python/automations/onaddcollectiontag.mdx b/models/ref/python/automations/onaddcollectiontag.mdx index 191d1be7d1..e400525419 100644 --- a/models/ref/python/automations/onaddcollectiontag.mdx +++ b/models/ref/python/automations/onaddcollectiontag.mdx @@ -15,8 +15,8 @@ import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; ```python *, event_type: Literal[ADD_COLLECTION_TAG] = ADD_COLLECTION_TAG, -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=, json_schema_input_type=PydanticUndefined), Discriminator(discriminator='entity_type', custom_error_type=None, custom_error_message=None, custom_error_context=None)]], BeforeValidator(func=, json_schema_input_type=PydanticUndefined), Discriminator(discriminator='typename__', custom_error_type=None, custom_error_message=None, custom_error_context=None)], -filter: Annotated[wandb.automations._filters.operators.And | wandb.automations._filters.operators.Or | wandb.automations._filters.operators.Nor | wandb.automations._filters.operators.Not | wandb.automations._filters.operators.Lt | wandb.automations._filters.operators.Gt | wandb.automations._filters.operators.Lte | wandb.automations._filters.operators.Gte | wandb.automations._filters.operators.Eq | wandb.automations._filters.operators.Ne | wandb.automations._filters.operators.In | wandb.automations._filters.operators.NotIn | wandb.automations._filters.operators.Exists | wandb.automations._filters.operators.Regex | wandb.automations._filters.operators.Contains | wandb.automations._filters.operators.Size | wandb.automations._filters.operators.All | wandb.automations._filters.expressions.FilterExpr | dict[str, Any], Json, BeforeValidator(func=, json_schema_input_type=PydanticUndefined), PlainSerializer(func=, return_type=PydanticUndefined, when_used='always'), AfterValidator(func=)] = And(()) +scope: Annotated[wandb.automations.scopes._ArtifactSequenceScope | wandb.automations.scopes._ArtifactPortfolioScope | wandb.automations.scopes.ProjectScope, BeforeValidator(func=, json_schema_input_type=PydanticUndefined)], +filter: Annotated[wandb.automations._filters.operators.And | wandb.automations._filters.operators.Or | wandb.automations._filters.operators.Nor | wandb.automations._filters.operators.Not | wandb.automations._filters.operators.Lt | wandb.automations._filters.operators.Gt | wandb.automations._filters.operators.Lte | wandb.automations._filters.operators.Gte | wandb.automations._filters.operators.Eq | wandb.automations._filters.operators.Ne | wandb.automations._filters.operators.In | wandb.automations._filters.operators.NotIn | wandb.automations._filters.operators.Exists | wandb.automations._filters.operators.Regex | wandb.automations._filters.operators.Contains | wandb.automations._filters.expressions.FilterExpr | dict[str, Any], Json, BeforeValidator(func=, json_schema_input_type=PydanticUndefined), PlainSerializer(func=, return_type=PydanticUndefined, when_used='always'), AfterValidator(func=)] = And(()) ``` @@ -36,7 +36,3 @@ A new tag is assigned to an artifact collection. - - - - diff --git a/models/ref/python/automations/oncreateartifact.mdx b/models/ref/python/automations/oncreateartifact.mdx index 350fcc7db2..a41a9dd0b4 100644 --- a/models/ref/python/automations/oncreateartifact.mdx +++ b/models/ref/python/automations/oncreateartifact.mdx @@ -15,8 +15,8 @@ import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; ```python *, event_type: Literal[CREATE_ARTIFACT] = CREATE_ARTIFACT, -scope: Annotated[wandb.automations.scopes._ArtifactSequenceScope | wandb.automations.scopes._ArtifactPortfolioScope, BeforeValidator(func=, json_schema_input_type=PydanticUndefined), Discriminator(discriminator='typename__', custom_error_type=None, custom_error_message=None, custom_error_context=None)], -filter: Annotated[wandb.automations._filters.operators.And | wandb.automations._filters.operators.Or | wandb.automations._filters.operators.Nor | wandb.automations._filters.operators.Not | wandb.automations._filters.operators.Lt | wandb.automations._filters.operators.Gt | wandb.automations._filters.operators.Lte | wandb.automations._filters.operators.Gte | wandb.automations._filters.operators.Eq | wandb.automations._filters.operators.Ne | wandb.automations._filters.operators.In | wandb.automations._filters.operators.NotIn | wandb.automations._filters.operators.Exists | wandb.automations._filters.operators.Regex | wandb.automations._filters.operators.Contains | wandb.automations._filters.operators.Size | wandb.automations._filters.operators.All | wandb.automations._filters.expressions.FilterExpr | dict[str, Any], Json, BeforeValidator(func=, json_schema_input_type=PydanticUndefined), PlainSerializer(func=, return_type=PydanticUndefined, when_used='always'), AfterValidator(func=)] = And(()) +scope: Annotated[wandb.automations.scopes._ArtifactSequenceScope | wandb.automations.scopes._ArtifactPortfolioScope, BeforeValidator(func=, json_schema_input_type=PydanticUndefined)], +filter: Annotated[wandb.automations._filters.operators.And | wandb.automations._filters.operators.Or | wandb.automations._filters.operators.Nor | wandb.automations._filters.operators.Not | wandb.automations._filters.operators.Lt | wandb.automations._filters.operators.Gt | wandb.automations._filters.operators.Lte | wandb.automations._filters.operators.Gte | wandb.automations._filters.operators.Eq | wandb.automations._filters.operators.Ne | wandb.automations._filters.operators.In | wandb.automations._filters.operators.NotIn | wandb.automations._filters.operators.Exists | wandb.automations._filters.operators.Regex | wandb.automations._filters.operators.Contains | wandb.automations._filters.expressions.FilterExpr | dict[str, Any], Json, BeforeValidator(func=, json_schema_input_type=PydanticUndefined), PlainSerializer(func=, return_type=PydanticUndefined, when_used='always'), AfterValidator(func=)] = And(()) ``` @@ -49,7 +49,3 @@ collection = api.artifact_collection(name="my-collection", type_name="model") event = OnCreateArtifact(scope=collection) ``` - - - - diff --git a/models/ref/python/automations/onlinkartifact.mdx b/models/ref/python/automations/onlinkartifact.mdx index 093eb066ff..ed8b8ce4ba 100644 --- a/models/ref/python/automations/onlinkartifact.mdx +++ b/models/ref/python/automations/onlinkartifact.mdx @@ -15,8 +15,8 @@ import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; ```python *, event_type: Literal[LINK_ARTIFACT] = LINK_ARTIFACT, -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=, json_schema_input_type=PydanticUndefined), Discriminator(discriminator='entity_type', custom_error_type=None, custom_error_message=None, custom_error_context=None)]], BeforeValidator(func=, json_schema_input_type=PydanticUndefined), Discriminator(discriminator='typename__', custom_error_type=None, custom_error_message=None, custom_error_context=None)], -filter: Annotated[wandb.automations._filters.operators.And | wandb.automations._filters.operators.Or | wandb.automations._filters.operators.Nor | wandb.automations._filters.operators.Not | wandb.automations._filters.operators.Lt | wandb.automations._filters.operators.Gt | wandb.automations._filters.operators.Lte | wandb.automations._filters.operators.Gte | wandb.automations._filters.operators.Eq | wandb.automations._filters.operators.Ne | wandb.automations._filters.operators.In | wandb.automations._filters.operators.NotIn | wandb.automations._filters.operators.Exists | wandb.automations._filters.operators.Regex | wandb.automations._filters.operators.Contains | wandb.automations._filters.operators.Size | wandb.automations._filters.operators.All | wandb.automations._filters.expressions.FilterExpr | dict[str, Any], Json, BeforeValidator(func=, json_schema_input_type=PydanticUndefined), PlainSerializer(func=, return_type=PydanticUndefined, when_used='always'), AfterValidator(func=)] = And(()) +scope: Annotated[wandb.automations.scopes._ArtifactSequenceScope | wandb.automations.scopes._ArtifactPortfolioScope | wandb.automations.scopes.ProjectScope, BeforeValidator(func=, json_schema_input_type=PydanticUndefined)], +filter: Annotated[wandb.automations._filters.operators.And | wandb.automations._filters.operators.Or | wandb.automations._filters.operators.Nor | wandb.automations._filters.operators.Not | wandb.automations._filters.operators.Lt | wandb.automations._filters.operators.Gt | wandb.automations._filters.operators.Lte | wandb.automations._filters.operators.Gte | wandb.automations._filters.operators.Eq | wandb.automations._filters.operators.Ne | wandb.automations._filters.operators.In | wandb.automations._filters.operators.NotIn | wandb.automations._filters.operators.Exists | wandb.automations._filters.operators.Regex | wandb.automations._filters.operators.Contains | wandb.automations._filters.expressions.FilterExpr | dict[str, Any], Json, BeforeValidator(func=, json_schema_input_type=PydanticUndefined), PlainSerializer(func=, return_type=PydanticUndefined, when_used='always'), AfterValidator(func=)] = And(()) ``` @@ -52,7 +52,3 @@ event = OnLinkArtifact( ) ``` - - - - diff --git a/models/ref/python/automations/onremoveartifacttag.mdx b/models/ref/python/automations/onremoveartifacttag.mdx index 118f2b442b..f6e2d944d2 100644 --- a/models/ref/python/automations/onremoveartifacttag.mdx +++ b/models/ref/python/automations/onremoveartifacttag.mdx @@ -15,8 +15,8 @@ import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; ```python *, event_type: Literal[REMOVE_ARTIFACT_TAG] = REMOVE_ARTIFACT_TAG, -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=, json_schema_input_type=PydanticUndefined), Discriminator(discriminator='entity_type', custom_error_type=None, custom_error_message=None, custom_error_context=None)]], BeforeValidator(func=, json_schema_input_type=PydanticUndefined), Discriminator(discriminator='typename__', custom_error_type=None, custom_error_message=None, custom_error_context=None)], -filter: Annotated[wandb.automations._filters.operators.And | wandb.automations._filters.operators.Or | wandb.automations._filters.operators.Nor | wandb.automations._filters.operators.Not | wandb.automations._filters.operators.Lt | wandb.automations._filters.operators.Gt | wandb.automations._filters.operators.Lte | wandb.automations._filters.operators.Gte | wandb.automations._filters.operators.Eq | wandb.automations._filters.operators.Ne | wandb.automations._filters.operators.In | wandb.automations._filters.operators.NotIn | wandb.automations._filters.operators.Exists | wandb.automations._filters.operators.Regex | wandb.automations._filters.operators.Contains | wandb.automations._filters.operators.Size | wandb.automations._filters.operators.All | wandb.automations._filters.expressions.FilterExpr | dict[str, Any], Json, BeforeValidator(func=, json_schema_input_type=PydanticUndefined), PlainSerializer(func=, return_type=PydanticUndefined, when_used='always'), AfterValidator(func=)] = And(()) +scope: Annotated[wandb.automations.scopes._ArtifactSequenceScope | wandb.automations.scopes._ArtifactPortfolioScope | wandb.automations.scopes.ProjectScope, BeforeValidator(func=, json_schema_input_type=PydanticUndefined)], +filter: Annotated[wandb.automations._filters.operators.And | wandb.automations._filters.operators.Or | wandb.automations._filters.operators.Nor | wandb.automations._filters.operators.Not | wandb.automations._filters.operators.Lt | wandb.automations._filters.operators.Gt | wandb.automations._filters.operators.Lte | wandb.automations._filters.operators.Gte | wandb.automations._filters.operators.Eq | wandb.automations._filters.operators.Ne | wandb.automations._filters.operators.In | wandb.automations._filters.operators.NotIn | wandb.automations._filters.operators.Exists | wandb.automations._filters.operators.Regex | wandb.automations._filters.operators.Contains | wandb.automations._filters.expressions.FilterExpr | dict[str, Any], Json, BeforeValidator(func=, json_schema_input_type=PydanticUndefined), PlainSerializer(func=, return_type=PydanticUndefined, when_used='always'), AfterValidator(func=)] = And(()) ``` @@ -36,7 +36,3 @@ A tag is removed from an artifact version. - - - - diff --git a/models/ref/python/automations/onremovecollectiontag.mdx b/models/ref/python/automations/onremovecollectiontag.mdx index 9de8d3240e..bc02e9eec6 100644 --- a/models/ref/python/automations/onremovecollectiontag.mdx +++ b/models/ref/python/automations/onremovecollectiontag.mdx @@ -15,8 +15,8 @@ import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; ```python *, event_type: Literal[REMOVE_COLLECTION_TAG] = REMOVE_COLLECTION_TAG, -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=, json_schema_input_type=PydanticUndefined), Discriminator(discriminator='entity_type', custom_error_type=None, custom_error_message=None, custom_error_context=None)]], BeforeValidator(func=, json_schema_input_type=PydanticUndefined), Discriminator(discriminator='typename__', custom_error_type=None, custom_error_message=None, custom_error_context=None)], -filter: Annotated[wandb.automations._filters.operators.And | wandb.automations._filters.operators.Or | wandb.automations._filters.operators.Nor | wandb.automations._filters.operators.Not | wandb.automations._filters.operators.Lt | wandb.automations._filters.operators.Gt | wandb.automations._filters.operators.Lte | wandb.automations._filters.operators.Gte | wandb.automations._filters.operators.Eq | wandb.automations._filters.operators.Ne | wandb.automations._filters.operators.In | wandb.automations._filters.operators.NotIn | wandb.automations._filters.operators.Exists | wandb.automations._filters.operators.Regex | wandb.automations._filters.operators.Contains | wandb.automations._filters.operators.Size | wandb.automations._filters.operators.All | wandb.automations._filters.expressions.FilterExpr | dict[str, Any], Json, BeforeValidator(func=, json_schema_input_type=PydanticUndefined), PlainSerializer(func=, return_type=PydanticUndefined, when_used='always'), AfterValidator(func=)] = And(()) +scope: Annotated[wandb.automations.scopes._ArtifactSequenceScope | wandb.automations.scopes._ArtifactPortfolioScope | wandb.automations.scopes.ProjectScope, BeforeValidator(func=, json_schema_input_type=PydanticUndefined)], +filter: Annotated[wandb.automations._filters.operators.And | wandb.automations._filters.operators.Or | wandb.automations._filters.operators.Nor | wandb.automations._filters.operators.Not | wandb.automations._filters.operators.Lt | wandb.automations._filters.operators.Gt | wandb.automations._filters.operators.Lte | wandb.automations._filters.operators.Gte | wandb.automations._filters.operators.Eq | wandb.automations._filters.operators.Ne | wandb.automations._filters.operators.In | wandb.automations._filters.operators.NotIn | wandb.automations._filters.operators.Exists | wandb.automations._filters.operators.Regex | wandb.automations._filters.operators.Contains | wandb.automations._filters.expressions.FilterExpr | dict[str, Any], Json, BeforeValidator(func=, json_schema_input_type=PydanticUndefined), PlainSerializer(func=, return_type=PydanticUndefined, when_used='always'), AfterValidator(func=)] = And(()) ``` @@ -36,7 +36,3 @@ A tag is removed from an artifact collection. - - - - diff --git a/models/ref/python/automations/onrunmetric.mdx b/models/ref/python/automations/onrunmetric.mdx index 4892974f65..c7306a86db 100644 --- a/models/ref/python/automations/onrunmetric.mdx +++ b/models/ref/python/automations/onrunmetric.mdx @@ -7,7 +7,7 @@ namespace: wandb.automations.events import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; - + @@ -15,7 +15,7 @@ import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; ```python *, event_type: Literal[RUN_METRIC_THRESHOLD, RUN_METRIC_CHANGE, RUN_METRIC_ZSCORE], -scope: Annotated[Union[wandb.automations.scopes.ProjectScope, Annotated[wandb.automations.scopes.TeamScope | wandb.automations.scopes.OrgScope, BeforeValidator(func=, json_schema_input_type=PydanticUndefined), Discriminator(discriminator='entity_type', custom_error_type=None, custom_error_message=None, custom_error_context=None)]], BeforeValidator(func=, json_schema_input_type=PydanticUndefined), Discriminator(discriminator='typename__', custom_error_type=None, custom_error_message=None, custom_error_context=None)], +scope: wandb.automations.scopes.ProjectScope, filter: Annotated[wandb.automations.events.RunMetricFilter, Json, BeforeValidator(func=, json_schema_input_type=PydanticUndefined), PlainSerializer(func=, return_type=PydanticUndefined, when_used='always')] ``` @@ -28,7 +28,7 @@ A run metric satisfies a user-defined condition. ## Args - `event_type`: -- `scope`: The scope of the event: must be a project or a team/org entity. +- `scope`: The scope of the event: must be a project. - `filter`: Run and/or metric condition(s) that must be satisfied for this event to trigger. @@ -52,7 +52,3 @@ event = OnRunMetric( ) ``` - - - - diff --git a/models/ref/python/automations/onrunstate.mdx b/models/ref/python/automations/onrunstate.mdx index 035d8b577e..4329e78929 100644 --- a/models/ref/python/automations/onrunstate.mdx +++ b/models/ref/python/automations/onrunstate.mdx @@ -7,7 +7,7 @@ namespace: wandb.automations.events import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; - + @@ -15,7 +15,7 @@ import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; ```python *, event_type: Literal[RUN_STATE] = RUN_STATE, -scope: Annotated[Union[wandb.automations.scopes.ProjectScope, Annotated[wandb.automations.scopes.TeamScope | wandb.automations.scopes.OrgScope, BeforeValidator(func=, json_schema_input_type=PydanticUndefined), Discriminator(discriminator='entity_type', custom_error_type=None, custom_error_message=None, custom_error_context=None)]], BeforeValidator(func=, json_schema_input_type=PydanticUndefined), Discriminator(discriminator='typename__', custom_error_type=None, custom_error_message=None, custom_error_context=None)], +scope: wandb.automations.scopes.ProjectScope, filter: Annotated[wandb.automations.events.RunStateFilter, Json, BeforeValidator(func=, json_schema_input_type=PydanticUndefined), PlainSerializer(func=, return_type=PydanticUndefined, when_used='always')] ``` @@ -28,7 +28,7 @@ A run state changes. ## Args - `event_type`: -- `scope`: The scope of the event: must be a project or a team/org entity. +- `scope`: The scope of the event: must be a project. - `filter`: Run state condition(s) that must be satisfied for this event to trigger. @@ -52,7 +52,3 @@ event = OnRunState( ) ``` - - - - diff --git a/models/ref/python/automations/onunlinkartifact.mdx b/models/ref/python/automations/onunlinkartifact.mdx index 069c92c57a..cbdbdcba65 100644 --- a/models/ref/python/automations/onunlinkartifact.mdx +++ b/models/ref/python/automations/onunlinkartifact.mdx @@ -15,8 +15,8 @@ import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; ```python *, event_type: Literal[UNLINK_ARTIFACT] = UNLINK_ARTIFACT, -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=, json_schema_input_type=PydanticUndefined), Discriminator(discriminator='entity_type', custom_error_type=None, custom_error_message=None, custom_error_context=None)]], BeforeValidator(func=, json_schema_input_type=PydanticUndefined), Discriminator(discriminator='typename__', custom_error_type=None, custom_error_message=None, custom_error_context=None)], -filter: Annotated[wandb.automations._filters.operators.And | wandb.automations._filters.operators.Or | wandb.automations._filters.operators.Nor | wandb.automations._filters.operators.Not | wandb.automations._filters.operators.Lt | wandb.automations._filters.operators.Gt | wandb.automations._filters.operators.Lte | wandb.automations._filters.operators.Gte | wandb.automations._filters.operators.Eq | wandb.automations._filters.operators.Ne | wandb.automations._filters.operators.In | wandb.automations._filters.operators.NotIn | wandb.automations._filters.operators.Exists | wandb.automations._filters.operators.Regex | wandb.automations._filters.operators.Contains | wandb.automations._filters.operators.Size | wandb.automations._filters.operators.All | wandb.automations._filters.expressions.FilterExpr | dict[str, Any], Json, BeforeValidator(func=, json_schema_input_type=PydanticUndefined), PlainSerializer(func=, return_type=PydanticUndefined, when_used='always'), AfterValidator(func=)] = And(()) +scope: Annotated[wandb.automations.scopes._ArtifactSequenceScope | wandb.automations.scopes._ArtifactPortfolioScope | wandb.automations.scopes.ProjectScope, BeforeValidator(func=, json_schema_input_type=PydanticUndefined)], +filter: Annotated[wandb.automations._filters.operators.And | wandb.automations._filters.operators.Or | wandb.automations._filters.operators.Nor | wandb.automations._filters.operators.Not | wandb.automations._filters.operators.Lt | wandb.automations._filters.operators.Gt | wandb.automations._filters.operators.Lte | wandb.automations._filters.operators.Gte | wandb.automations._filters.operators.Eq | wandb.automations._filters.operators.Ne | wandb.automations._filters.operators.In | wandb.automations._filters.operators.NotIn | wandb.automations._filters.operators.Exists | wandb.automations._filters.operators.Regex | wandb.automations._filters.operators.Contains | wandb.automations._filters.expressions.FilterExpr | dict[str, Any], Json, BeforeValidator(func=, json_schema_input_type=PydanticUndefined), PlainSerializer(func=, return_type=PydanticUndefined, when_used='always'), AfterValidator(func=)] = And(()) ``` @@ -36,7 +36,3 @@ An artifact version is unlinked from a collection. - - - - diff --git a/models/ref/python/automations/runstatefilter.mdx b/models/ref/python/automations/runstatefilter.mdx index 12c0702d93..aaa8873d98 100644 --- a/models/ref/python/automations/runstatefilter.mdx +++ b/models/ref/python/automations/runstatefilter.mdx @@ -14,8 +14,8 @@ import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; ## class wandb.automations.RunStateFilter ```python *, -run_filter: Annotated[wandb.automations._filters.operators.And | wandb.automations._filters.operators.Or | wandb.automations._filters.operators.Nor | wandb.automations._filters.operators.Not | wandb.automations._filters.operators.Lt | wandb.automations._filters.operators.Gt | wandb.automations._filters.operators.Lte | wandb.automations._filters.operators.Gte | wandb.automations._filters.operators.Eq | wandb.automations._filters.operators.Ne | wandb.automations._filters.operators.In | wandb.automations._filters.operators.NotIn | wandb.automations._filters.operators.Exists | wandb.automations._filters.operators.Regex | wandb.automations._filters.operators.Contains | wandb.automations._filters.operators.Size | wandb.automations._filters.operators.All | wandb.automations._filters.expressions.FilterExpr | dict[str, Any], Json, BeforeValidator(func=, json_schema_input_type=PydanticUndefined), PlainSerializer(func=, return_type=PydanticUndefined, when_used='always'), AfterValidator(func=)] = And(()), -run_state_filter: wandb.automations._run_state_filters.StateFilter +run_filter: Annotated[wandb.automations._filters.operators.And | wandb.automations._filters.operators.Or | wandb.automations._filters.operators.Nor | wandb.automations._filters.operators.Not | wandb.automations._filters.operators.Lt | wandb.automations._filters.operators.Gt | wandb.automations._filters.operators.Lte | wandb.automations._filters.operators.Gte | wandb.automations._filters.operators.Eq | wandb.automations._filters.operators.Ne | wandb.automations._filters.operators.In | wandb.automations._filters.operators.NotIn | wandb.automations._filters.operators.Exists | wandb.automations._filters.operators.Regex | wandb.automations._filters.operators.Contains | wandb.automations._filters.expressions.FilterExpr | dict[str, Any], Json, BeforeValidator(func=, json_schema_input_type=PydanticUndefined), PlainSerializer(func=, return_type=PydanticUndefined, when_used='always'), AfterValidator(func=)] = And(()), +run_state_filter: wandb.automations._filters.run_states.StateFilter ``` @@ -34,7 +34,3 @@ Represents a filter for triggering events based on changes in run states. - - - - diff --git a/models/ref/python/automations/sendnotification.mdx b/models/ref/python/automations/sendnotification.mdx index 3383f96ce5..6a36dcf0e3 100644 --- a/models/ref/python/automations/sendnotification.mdx +++ b/models/ref/python/automations/sendnotification.mdx @@ -40,30 +40,3 @@ Defines an automation action that sends a (Slack) notification. - - -## Methods - -### method SendNotification.from_integration() - -```python -integration: 'SlackIntegration', *, -title: 'str' = '', -text: 'str' = '', -level: 'AlertSeverity' = -``` - -Define a notification action that sends to the given (Slack) integration. - -##### Arguments - -- `integration`: -- `title`: -- `text`: -- `level`: - - - - - - diff --git a/models/ref/python/automations/sendnotification/sendnotification-methods.mdx b/models/ref/python/automations/sendnotification/sendnotification-methods.mdx new file mode 100644 index 0000000000..0bf19a6189 --- /dev/null +++ b/models/ref/python/automations/sendnotification/sendnotification-methods.mdx @@ -0,0 +1,36 @@ +--- +title: SendNotification methods +sidebarTitle: Methods +page_kind: class-methods +parent_slug: sendnotification +kind: class +namespace: wandb.automations.actions +--- + +## class wandb.automations.SendNotification + + + +### method SendNotification.from_integration() + +```python +integration: 'SlackIntegration', *, +title: 'str' = '', +text: 'str' = '', +level: 'AlertSeverity' = +``` + +Define a notification action that sends to the given (Slack) integration. + +##### Arguments + +- `integration`: +- `title`: +- `text`: +- `level`: + + + + + + diff --git a/models/ref/python/automations/sendwebhook.mdx b/models/ref/python/automations/sendwebhook.mdx index 39d3fa58ac..4d4cc035ce 100644 --- a/models/ref/python/automations/sendwebhook.mdx +++ b/models/ref/python/automations/sendwebhook.mdx @@ -36,26 +36,3 @@ Defines an automation action that sends a webhook request. - - -## Methods - -### method SendWebhook.from_integration() - -```python -integration: 'WebhookIntegration', *, -payload: 'JsonEncoded[dict[str, Any]] | None' = None -``` - -Define a webhook action that sends to the given (webhook) integration. - -##### Arguments - -- `integration`: -- `payload`: - - - - - - diff --git a/models/ref/python/automations/sendwebhook/sendwebhook-methods.mdx b/models/ref/python/automations/sendwebhook/sendwebhook-methods.mdx new file mode 100644 index 0000000000..bba8321ad0 --- /dev/null +++ b/models/ref/python/automations/sendwebhook/sendwebhook-methods.mdx @@ -0,0 +1,32 @@ +--- +title: SendWebhook methods +sidebarTitle: Methods +page_kind: class-methods +parent_slug: sendwebhook +kind: class +namespace: wandb.automations.actions +--- + +## class wandb.automations.SendWebhook + + + +### method SendWebhook.from_integration() + +```python +integration: 'WebhookIntegration', *, +payload: 'JsonEncoded[dict[str, Any]] | None' = None +``` + +Define a webhook action that sends to the given (webhook) integration. + +##### Arguments + +- `integration`: +- `payload`: + + + + + + diff --git a/models/ref/python/data-types/audio.mdx b/models/ref/python/data-types/audio.mdx index 2e3a686774..b426d48dd5 100644 --- a/models/ref/python/data-types/audio.mdx +++ b/models/ref/python/data-types/audio.mdx @@ -35,39 +35,3 @@ W&B class for audio clips. - - -## Methods - -### method Audio.durations() - -```python -(audio_list) -``` - -Calculate the duration of the audio files. - -##### Arguments - -- `audio_list`: - - - - -### method Audio.sample_rates() - -```python -(audio_list) -``` - -Get sample rates of the audio files. - -##### Arguments - -- `audio_list`: - - - - - - diff --git a/models/ref/python/data-types/audio/audio-methods.mdx b/models/ref/python/data-types/audio/audio-methods.mdx new file mode 100644 index 0000000000..b01a8edbac --- /dev/null +++ b/models/ref/python/data-types/audio/audio-methods.mdx @@ -0,0 +1,45 @@ +--- +title: Audio methods +sidebarTitle: Methods +page_kind: class-methods +parent_slug: audio +kind: class +namespace: wandb.sdk.data_types.audio +--- + +## class wandb.Audio + + + +### method Audio.durations() + +```python +(audio_list) +``` + +Calculate the duration of the audio files. + +##### Arguments + +- `audio_list`: + + + + +### method Audio.sample_rates() + +```python +(audio_list) +``` + +Get sample rates of the audio files. + +##### Arguments + +- `audio_list`: + + + + + + diff --git a/models/ref/python/data-types/histogram.mdx b/models/ref/python/data-types/histogram.mdx index b3cf154899..565632d159 100644 --- a/models/ref/python/data-types/histogram.mdx +++ b/models/ref/python/data-types/histogram.mdx @@ -42,7 +42,3 @@ https://docs.scipy.org/doc/numpy/reference/generated/numpy.histogram.html - - - - diff --git a/models/ref/python/data-types/html.mdx b/models/ref/python/data-types/html.mdx index 283eb9f5b4..092c927ebc 100644 --- a/models/ref/python/data-types/html.mdx +++ b/models/ref/python/data-types/html.mdx @@ -35,7 +35,3 @@ W&B class for logging HTML content to W&B. - - - - diff --git a/models/ref/python/data-types/image.mdx b/models/ref/python/data-types/image.mdx index 3b210ad6dd..7ac53db36b 100644 --- a/models/ref/python/data-types/image.mdx +++ b/models/ref/python/data-types/image.mdx @@ -55,13 +55,3 @@ A class for logging images to W&B. -## Properties - -### property image - - - - - - - diff --git a/models/ref/python/data-types/image/image-properties.mdx b/models/ref/python/data-types/image/image-properties.mdx new file mode 100644 index 0000000000..ce90f3946d --- /dev/null +++ b/models/ref/python/data-types/image/image-properties.mdx @@ -0,0 +1,19 @@ +--- +title: Image properties +sidebarTitle: Properties +page_kind: class-properties +parent_slug: image +kind: class +namespace: wandb.sdk.data_types.image +--- + +## class wandb.Image + + + +### property image + + + + + diff --git a/models/ref/python/data-types/molecule.mdx b/models/ref/python/data-types/molecule.mdx index 2a17d616f4..8f73737593 100644 --- a/models/ref/python/data-types/molecule.mdx +++ b/models/ref/python/data-types/molecule.mdx @@ -34,51 +34,3 @@ W&B class for 3D Molecular data. - - -## Methods - -### method Molecule.from_rdkit() - -```python -data_or_path: 'RDKitDataType', -caption: 'str | None' = None, -convert_to_3d_and_optimize: 'bool' = True, -mmff_optimize_molecule_max_iterations: 'int' = 200 -``` - -Convert RDKit-supported file/object types to wandb.Molecule. - -##### Arguments - -- `data_or_path`: (string, rdkit.Chem.rdchem.Mol) Molecule can be initialized from a file name or an rdkit.Chem.rdchem.Mol object. -- `caption`: (string) Caption associated with the molecule for display. -- `convert_to_3d_and_optimize`: (bool) Convert to rdkit.Chem.rdchem.Mol with 3D coordinates. This is an expensive operation that may take a long time for complicated molecules. - - - - -### method Molecule.from_smiles() - -```python -data: 'str', -caption: 'str | None' = None, -sanitize: 'bool' = True, -convert_to_3d_and_optimize: 'bool' = True, -mmff_optimize_molecule_max_iterations: 'int' = 200 -``` - -Convert SMILES string to wandb.Molecule. - -##### Arguments - -- `data`: SMILES string. -- `caption`: Caption associated with the molecule for display. -- `sanitize`: Check if the molecule is chemically reasonable by the RDKit's definition. -- `convert_to_3d_and_optimize`: Convert to rdkit.Chem.rdchem.Mol with 3D coordinates. This is a computationally intensive operation that may take a long time for complicated molecules. - - - - - - diff --git a/models/ref/python/data-types/molecule/molecule-methods.mdx b/models/ref/python/data-types/molecule/molecule-methods.mdx new file mode 100644 index 0000000000..6812cb4d2c --- /dev/null +++ b/models/ref/python/data-types/molecule/molecule-methods.mdx @@ -0,0 +1,57 @@ +--- +title: Molecule methods +sidebarTitle: Methods +page_kind: class-methods +parent_slug: molecule +kind: class +namespace: wandb.sdk.data_types.molecule +--- + +## class wandb.Molecule + + + +### method Molecule.from_rdkit() + +```python +data_or_path: 'RDKitDataType', +caption: 'str | None' = None, +convert_to_3d_and_optimize: 'bool' = True, +mmff_optimize_molecule_max_iterations: 'int' = 200 +``` + +Convert RDKit-supported file/object types to wandb.Molecule. + +##### Arguments + +- `data_or_path`: (string, rdkit.Chem.rdchem.Mol) Molecule can be initialized from a file name or an rdkit.Chem.rdchem.Mol object. +- `caption`: (string) Caption associated with the molecule for display. +- `convert_to_3d_and_optimize`: (bool) Convert to rdkit.Chem.rdchem.Mol with 3D coordinates. This is an expensive operation that may take a long time for complicated molecules. + + + + +### method Molecule.from_smiles() + +```python +data: 'str', +caption: 'str | None' = None, +sanitize: 'bool' = True, +convert_to_3d_and_optimize: 'bool' = True, +mmff_optimize_molecule_max_iterations: 'int' = 200 +``` + +Convert SMILES string to wandb.Molecule. + +##### Arguments + +- `data`: SMILES string. +- `caption`: Caption associated with the molecule for display. +- `sanitize`: Check if the molecule is chemically reasonable by the RDKit's definition. +- `convert_to_3d_and_optimize`: Convert to rdkit.Chem.rdchem.Mol with 3D coordinates. This is a computationally intensive operation that may take a long time for complicated molecules. + + + + + + diff --git a/models/ref/python/data-types/object3d.mdx b/models/ref/python/data-types/object3d.mdx index d614ccf162..a955cab873 100644 --- a/models/ref/python/data-types/object3d.mdx +++ b/models/ref/python/data-types/object3d.mdx @@ -34,57 +34,3 @@ W&B class for 3D point clouds. - - -## Methods - -### method Object3D.from_file() - -```python -data_or_path: 'TextIO | str', -file_type: 'FileFormat3D | None' = None -``` - -Initializes Object3D from a file or stream. - -##### Arguments - -- `data_or_path`: A path to a file or a `TextIO` stream. - - - - -### method Object3D.from_numpy() - -```python -data: 'np.ndarray' -``` - -Initializes Object3D from a numpy array. - - - - - -### method Object3D.from_point_cloud() - -```python -points: 'Sequence[Point]', -boxes: 'Sequence[Box3D]', -vectors: 'Sequence[Vector3D] | None' = None, -point_cloud_type: 'PointCloudType' = 'lidar/beta' -``` - -Initializes Object3D from a python object. - -##### Arguments - -- `points`: The points in the point cloud. -- `boxes`: 3D bounding boxes for labeling the point cloud. Boxes are displayed in point cloud visualizations. -- `vectors`: Each vector is displayed in the point cloud visualization. Can be used to indicate directionality of bounding boxes. Defaults to None. - - - - - - diff --git a/models/ref/python/data-types/object3d/object3d-methods.mdx b/models/ref/python/data-types/object3d/object3d-methods.mdx new file mode 100644 index 0000000000..c3fe0b3d70 --- /dev/null +++ b/models/ref/python/data-types/object3d/object3d-methods.mdx @@ -0,0 +1,63 @@ +--- +title: Object3D methods +sidebarTitle: Methods +page_kind: class-methods +parent_slug: object3d +kind: class +namespace: wandb.sdk.data_types.object_3d +--- + +## class wandb.Object3D + + + +### method Object3D.from_file() + +```python +data_or_path: 'TextIO | str', +file_type: 'FileFormat3D | None' = None +``` + +Initializes Object3D from a file or stream. + +##### Arguments + +- `data_or_path`: A path to a file or a `TextIO` stream. + + + + +### method Object3D.from_numpy() + +```python +data: 'np.ndarray' +``` + +Initializes Object3D from a numpy array. + + + + + +### method Object3D.from_point_cloud() + +```python +points: 'Sequence[Point]', +boxes: 'Sequence[Box3D]', +vectors: 'Sequence[Vector3D] | None' = None, +point_cloud_type: 'PointCloudType' = 'lidar/beta' +``` + +Initializes Object3D from a python object. + +##### Arguments + +- `points`: The points in the point cloud. +- `boxes`: 3D bounding boxes for labeling the point cloud. Boxes are displayed in point cloud visualizations. +- `vectors`: Each vector is displayed in the point cloud visualization. Can be used to indicate directionality of bounding boxes. Defaults to None. + + + + + + diff --git a/models/ref/python/data-types/plotly.mdx b/models/ref/python/data-types/plotly.mdx index fa06476b52..f4f59cbb50 100644 --- a/models/ref/python/data-types/plotly.mdx +++ b/models/ref/python/data-types/plotly.mdx @@ -31,7 +31,3 @@ W&B class for Plotly plots. - - - - diff --git a/models/ref/python/data-types/table.mdx b/models/ref/python/data-types/table.mdx index e496d322e2..6b11a58099 100644 --- a/models/ref/python/data-types/table.mdx +++ b/models/ref/python/data-types/table.mdx @@ -73,159 +73,3 @@ https://docs.wandb.ai/models/tables - - -## Methods - -### method Table.add_column() - -```python -self, -name: 'str', -data: 'list[Any] | np.ndarray', -optional: 'bool' = False -``` - -Adds a column of data to the table. - -##### Arguments - -- `name`: The unique name of the column. -- `data`: A column of homogeneous data. -- `optional`: If null-like values are permitted. - - - - -### method Table.add_computed_columns() - -```python -self, -fn: 'Callable[[int, dict[ColumnKey, Any]], dict[str, Any]]' -``` - -Adds one or more computed columns based on existing data. - -##### Arguments - -- `fn`: A function which accepts an index and row dict, and returns a dict representing new columns for that row, keyed by the new column names. - - - - -##### Examples - -In the callback: -- `ndx` is an integer representing the index of the row. -- `row` is a dictionary keyed by existing columns. - -```python -import wandb - -table = wandb.Table(columns=["x", "y"], data=[[3, 1], [4, 6]]) -table.add_computed_columns(lambda ndx, row: {"diff": row["x"] - row["y"]}) -``` - -### method Table.add_data() - -```python -self, *data: 'Any' -``` - -Adds a new row of data to the table. - -The maximum amount ofrows in a table is determined by -`wandb.Table.MAX_ARTIFACT_ROWS`. - -The length of the data should match the length of the table column. - -##### Arguments - -- `data`: - - - - -### method Table.add_row() - -```python -self, *row: 'Any' -``` - -Deprecated. Use `Table.add_data` method instead. - -##### Arguments - -- `row`: - - - - -### method Table.cast() - -```python -self, -col_name: 'ColumnKey', -dtype: 'Any', -optional: 'bool' = False -``` - -Casts a column to a specific data type. - -This can be one of the normal python classes, an internal W&B type, -or an example object, like an instance of wandb.Image or -wandb.Classes. - -##### Arguments - -- `col_name`: The name of the column to cast. -- `dtype`: The target dtype. -- `optional`: If the column should allow Nones. - - - - -### method Table.get_column() - -```python -self, -name: 'ColumnKey', -convert_to: "Literal['numpy'] | None" = None -``` - -Retrieves a column from the table and optionally converts it to a NumPy object. - -##### Arguments - -- `name`: The name of the column. -- `convert_to`: "numpy" will convert the underlying data to a NumPy object. - - - - -### method Table.get_dataframe() - -```python -self -``` - -Returns a `pandas.DataFrame` of the table. - - - - - -### method Table.get_index() - -```python -(self) -``` - -Returns an array of row indexes for use in other tables to create links. - - - - - - - diff --git a/models/ref/python/data-types/table/table-methods.mdx b/models/ref/python/data-types/table/table-methods.mdx new file mode 100644 index 0000000000..3493f3bad7 --- /dev/null +++ b/models/ref/python/data-types/table/table-methods.mdx @@ -0,0 +1,155 @@ +--- +title: Table methods +sidebarTitle: Methods +page_kind: class-methods +parent_slug: table +kind: class +namespace: wandb.sdk.data_types.table +--- + +## class wandb.Table + + + +### method Table.add_column() + +```python +self, +name: 'str', +data: 'list[Any] | np.ndarray', +optional: 'bool' = False +``` + +Adds a column of data to the table. + +##### Arguments + +- `name`: The unique name of the column. +- `data`: A column of homogeneous data. +- `optional`: If null-like values are permitted. + + + + +### method Table.add_computed_columns() + +```python +self, +fn: 'Callable[[int, dict[ColumnKey, Any]], dict[str, Any]]' +``` + +Adds one or more computed columns based on existing data. + +##### Arguments + +- `fn`: A function which accepts an index and row dict, and returns a dict representing new columns for that row, keyed by the new column names. + + + + +##### Examples + + +### method Table.add_data() + +```python +self, *data: 'Any' +``` + +Adds a new row of data to the table. + +The maximum amount ofrows in a table is determined by +`wandb.Table.MAX_ARTIFACT_ROWS`. + +The length of the data should match the length of the table column. + +##### Arguments + +- `data`: + + + + +### method Table.add_row() + +```python +self, *row: 'Any' +``` + +Deprecated. Use `Table.add_data` method instead. + +##### Arguments + +- `row`: + + + + +### method Table.cast() + +```python +self, +col_name: 'ColumnKey', +dtype: 'Any', +optional: 'bool' = False +``` + +Casts a column to a specific data type. + +This can be one of the normal python classes, an internal W&B type, +or an example object, like an instance of wandb.Image or +wandb.Classes. + +##### Arguments + +- `col_name`: The name of the column to cast. +- `dtype`: The target dtype. +- `optional`: If the column should allow Nones. + + + + +### method Table.get_column() + +```python +self, +name: 'ColumnKey', +convert_to: "Literal['numpy'] | None" = None +``` + +Retrieves a column from the table and optionally converts it to a NumPy object. + +##### Arguments + +- `name`: The name of the column. +- `convert_to`: "numpy" will convert the underlying data to a NumPy object. + + + + +### method Table.get_dataframe() + +```python +self +``` + +Returns a `pandas.DataFrame` of the table. + + + + + +### method Table.get_index() + +```python +(self) +``` + +Returns an array of row indexes for use in other tables to create links. + + + + + + + diff --git a/models/ref/python/data-types/video.mdx b/models/ref/python/data-types/video.mdx index e0ad10509c..feb9a5cbfb 100644 --- a/models/ref/python/data-types/video.mdx +++ b/models/ref/python/data-types/video.mdx @@ -37,7 +37,3 @@ A class for logging videos to W&B. - - - - diff --git a/models/ref/python/experiments/artifact.mdx b/models/ref/python/experiments/artifact.mdx index b42f6163f7..f9433a6c8d 100644 --- a/models/ref/python/experiments/artifact.mdx +++ b/models/ref/python/experiments/artifact.mdx @@ -47,762 +47,3 @@ begin with `add`. Once the artifact has all the desired files, you can call -## Properties - -### property aliases - -List of one or more semantically-friendly references or - -identifying "nicknames" assigned to an artifact version. - -Aliases are mutable references that you can programmatically reference. -Change an artifact's alias with the W&B App UI or programmatically. -See [Create new artifact versions](https://docs.wandb.ai/models/artifacts/create-a-new-artifact-version) -for more information. - -### property collection - -The collection this artifact is retrieved from. - -A collection is an ordered group of artifact versions. -If this artifact is retrieved from a collection that it is linked to, -return that collection. Otherwise, return the collection -that the artifact version originates from. - -The collection that an artifact originates from is known as -the source sequence. - -### property commit_hash - -The hash returned when this artifact was committed. - -### property created_at - -Timestamp when the artifact was created. - -### property description - -A description of the artifact. - -### property digest - -The logical digest of the artifact. - -The digest is the checksum of the artifact's contents. If an artifact has the -same digest as the current `latest` version, then `log_artifact` is a no-op. - -### property entity - -The name of the entity that the artifact collection belongs to. - -If the artifact is a link, the entity will be the entity of the linked artifact. - -### property file_count - -The number of files (including references). - -### property history_step - -The nearest step which logged history metrics for this artifact's source run. - -### property id - -The artifact's ID. - -### property is_link - -Boolean flag indicating if the artifact is a link artifact. - -True: The artifact is a link artifact to a source artifact. -False: The artifact is a source artifact. - -### property linked_artifacts - -Returns a list of all the linked artifacts of a source artifact. - -If this artifact is a link artifact (`artifact.is_link == True`), -it will return an empty list. - -Limited to 500 results. - -### property manifest - -The artifact's manifest. - -The manifest lists all of its contents, and can't be changed once the artifact -has been logged. - -### property metadata - -User-defined artifact metadata. - -Structured data associated with the artifact. - -### property name - -The artifact name and version of the artifact. - -A string with the format `{collection}:{alias}`. If fetched before an artifact is -logged/saved, the name won't contain the alias. -If the artifact is a link, the name will be the name of the linked artifact. - -### property project - -The name of the project that the artifact collection belongs to. - -If the artifact is a link, the project will be the project of the linked artifact. - -### property qualified_name - -The entity/project/name of the artifact. - -If the artifact is a link, the qualified name will be the qualified name of the -linked artifact path. - -### property size - -The total size of the artifact in bytes. - -Includes any references tracked by this artifact. - -### property source_artifact - -Returns the source artifact, which is the original logged artifact. - -If this artifact is a source artifact (`artifact.is_link == False`), -it will return itself. - -### property source_collection - -The artifact's source collection. - -The source collection is the collection that the artifact was logged from. - -### property source_entity - -The name of the entity of the source artifact. - -### property source_name - -The artifact name and version of the source artifact. - -A string with the format `{source_collection}:{alias}`. Before the artifact -is saved, contains only the name since the version is not yet known. - -### property source_project - -The name of the project of the source artifact. - -### property source_qualified_name - -The source_entity/source_project/source_name of the source artifact. - -### property source_version - -The source artifact's version. - -A string with the format `v{number}`. - -### property state - -The status of the artifact. One of: "PENDING", "COMMITTED", or "DELETED". - -### property tags - -List of one or more tags assigned to this artifact version. - -### property ttl - -The time-to-live (TTL) policy of an artifact. - -Artifacts are deleted shortly after a TTL policy's duration passes. -If set to `None`, the artifact deactivates TTL policies and will be not -scheduled for deletion, even if there is a team default TTL. -An artifact inherits a TTL policy from -the team default if the team administrator defines a default -TTL and there is no custom policy set on an artifact. - -### property type - -The artifact's type. Common types include `dataset` or `model`. - -### property updated_at - -The time when the artifact was last updated. - -### property url - -Constructs the URL of the artifact. - -### property use_as - -Deprecated. - -### property version - -The artifact's version. - -A string with the format `v{number}`. -If this is a link artifact, the version will be from the linked collection. - - - -## Methods - -### method Artifact.add() - -```python -self, -obj: 'WBValue', -name: 'StrPath', -overwrite: 'bool' = False -``` - -Add wandb.WBValue `obj` to the artifact. - -##### Arguments - -- `obj`: The object to add. Currently support one of Bokeh, JoinedTable, PartitionedTable, Table, Classes, ImageMask, BoundingBoxes2D, Audio, Image, Video, Html, Object3D -- `name`: The path within the artifact to add the object. -- `overwrite`: If True, overwrite existing objects with the same file path if applicable. - - -##### Raises - -- `ArtifactFinalizedError`: You cannot make changes to the current artifact version because it is finalized. Log a new artifact version instead. - - -### method Artifact.add_dir() - -```python -self, -local_path: 'str', -name: 'str | None' = None, -skip_cache: 'bool | None' = False, -policy: "Literal['mutable', 'immutable'] | None" = 'mutable', -merge: 'bool' = False -``` - -Add a local directory to the artifact. - -##### Arguments - -- `local_path`: The path of the local directory. -- `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. -- `skip_cache`: If set to `True`, W&B will not copy/move files to the cache while uploading -- `policy`: 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. -- `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. - - -##### Raises - -- `ArtifactFinalizedError`: You cannot make changes to the current artifact version because it is finalized. Log a new artifact version instead. -- `ValueError`: Policy must be "mutable" or "immutable" - - -### method Artifact.add_file() - -```python -self, -local_path: 'str', -name: 'str | None' = None, -is_tmp: 'bool | None' = False, -skip_cache: 'bool | None' = False, -policy: "Literal['mutable', 'immutable'] | None" = 'mutable', -overwrite: 'bool' = False -``` - -Add a local file to the artifact. - -##### Arguments - -- `local_path`: The path to the file being added. -- `name`: The path within the artifact to use for the file being added. Defaults to the basename of the file. -- `is_tmp`: If true, then the file is renamed deterministically to avoid collisions. -- `skip_cache`: If `True`, do not copy files to the cache after uploading. -- `policy`: By default, set to "mutable". If set to "mutable", create a temporary copy of the file to prevent corruption during upload. If set to "immutable", disable protection and rely on the user not to delete or change the file. -- `overwrite`: If `True`, overwrite the file if it already exists. - - -##### Raises - -- `ArtifactFinalizedError`: You cannot make changes to the current artifact version because it is finalized. Log a new artifact version instead. -- `ValueError`: Policy must be "mutable" or "immutable" - - -### method Artifact.add_reference() - -```python -self, -uri: 'ArtifactManifestEntry | str', -name: 'StrPath | None' = None, -checksum: 'bool' = True, -max_objects: 'int | None' = None -``` - -Add a reference denoted by a URI to the artifact. - -Unlike files or directories that you add to an artifact, references are not -uploaded to W&B. For more information, -see [Track external files](https://docs.wandb.ai/models/artifacts/track-external-files). - -By default, the following schemes are supported: - -- http(s): The size and digest of the file will be inferred by the - `Content-Length` and the `ETag` response headers returned by the server. -- s3: The checksum and size are pulled from the object metadata. - If bucket versioning is enabled, then the version ID is also tracked. -- gs: The checksum and size are pulled from the object metadata. If bucket - versioning is enabled, then the version ID is also tracked. -- https, domain matching `*.blob.core.windows.net` -- Azure: The checksum and size are be pulled from the blob metadata. - If storage account versioning is enabled, then the version ID is - also tracked. -- file: The checksum and size are pulled from the file system. This scheme - is useful if you have an NFS share or other externally mounted volume - containing files you wish to track but not necessarily upload. - -For any other scheme, the digest is just a hash of the URI and the size is left -blank. - -##### Arguments - -- `uri`: The URI path of the reference to add. The URI path can be an object returned from `Artifact.get_entry` to store a reference to another artifact's entry. -- `name`: The path within the artifact to place the contents of this reference. -- `checksum`: Whether or not to checksum the resource(s) located at the reference URI. Checksumming is strongly recommended as it enables automatic integrity validation. Disabling checksumming will speed up artifact creation but reference directories will not iterated through so the objects in the directory will not be saved to the artifact. We recommend setting `checksum=False` when adding reference objects, in which case a new version will only be created if the reference URI changes. -- `max_objects`: The maximum number of objects to consider when adding a reference that points to directory or bucket store prefix. By default, the maximum number of objects allowed for Amazon S3, GCS, Azure, and local files is 10,000,000. Other URI schemas do not have a maximum. - - -##### Raises - -- `ArtifactFinalizedError`: You cannot make changes to the current artifact version because it is finalized. Log a new artifact version instead. - - -### method Artifact.checkout() - -```python -self, -root: 'str | None' = None -``` - -Replace the specified root directory with the contents of the artifact. - -WARNING: This will delete all files in `root` that are not included in the -artifact. - -##### Arguments - -- `root`: The directory to replace with this artifact's files. - - -##### Raises - -- `ArtifactNotLoggedError`: If the artifact is not logged. - - -### method Artifact.delete() - -```python -self, -delete_aliases: 'bool' = False -``` - -Delete an artifact and its files. - -If called on a linked artifact, only the link is deleted, and the -source artifact is unaffected. - -Use `Artifact.unlink()` instead of `Artifact.delete()` to remove a -link between a source artifact and a collection. - -##### Arguments - -- `delete_aliases`: If set to `True`, delete all aliases associated with the artifact. If `False`, raise an exception if the artifact has existing aliases. This parameter is ignored if the artifact is retrieved from a collection it is linked to. - - -##### Raises - -- `ArtifactNotLoggedError`: If the artifact is not logged. - - -### method Artifact.download() - -```python -self, -root: 'StrPath | None' = None, -allow_missing_references: 'bool' = False, -skip_cache: 'bool | None' = None, -path_prefix: 'StrPath | None' = None, -multipart: 'bool | None' = None -``` - -Download the contents of the artifact to the specified root directory. - -Existing files located within `root` are not modified. Explicitly delete `root` -before you call `download` if you want the contents of `root` to exactly match -the artifact. - -##### Arguments - -- `root`: The directory W&B stores the artifact's files. -- `allow_missing_references`: If set to `True`, any invalid reference paths will be ignored while downloading referenced files. -- `skip_cache`: If set to `True`, the artifact cache will be skipped when downloading and W&B will download each file into the default root or specified download directory. -- `path_prefix`: If specified, only files with a path that starts with the given prefix will be downloaded. Uses unix format (forward slashes). -- `multipart`: If set to `None` (default), the artifact will be downloaded in parallel using multipart download if individual file size is greater than 2GB. If set to `True` or `False`, the artifact will be downloaded in parallel or serially regardless of the file size. - - -##### Raises - -- `ArtifactNotLoggedError`: If the artifact is not logged. - - -### method Artifact.file() - -```python -self, -root: 'str | None' = None -``` - -Download a single file artifact to the directory you specify with `root`. - -##### Arguments - -- `root`: The root directory to store the file. Defaults to `./artifacts/self.name/`. - - -##### Raises - -- `ArtifactNotLoggedError`: If the artifact is not logged. -- `ValueError`: If the artifact contains more than one file. - - -### method Artifact.files() - -```python -self, -names: 'list[str] | None' = None, -per_page: 'int' = 50, -start: 'str | None' = None -``` - -Iterate over all files stored in this artifact. - -##### Arguments - -- `names`: The filename paths relative to the root of the artifact you wish to list. -- `per_page`: The number of files to return per request. -- `start`: Pagination cursor for resuming a past query, captured from a previous paginator's `.cursor` attribute. - - -##### Raises - -- `ArtifactNotLoggedError`: If the artifact is not logged. - - -### method Artifact.finalize() - -```python -self -``` - -Finalize the artifact version. - -You cannot modify an artifact version once it is finalized because the artifact -is logged as a specific artifact version. Create a new artifact version -to log more data to an artifact. An artifact is automatically finalized -when you log the artifact with `log_artifact`. - - - - - -### method Artifact.get() - -```python -self, -name: 'str' -``` - -Get the WBValue object located at the artifact relative `name`. - -##### Arguments - -- `name`: The artifact relative name to retrieve. - - -##### Raises - -- `ArtifactNotLoggedError`: if the artifact isn't logged or the run is offline. - - -### method Artifact.get_added_local_path_name() - -```python -self, -local_path: 'str' -``` - -Get the artifact relative name of a file added by a local filesystem path. - -##### Arguments - -- `local_path`: The local path to resolve into an artifact relative name. - - - - -### method Artifact.get_entry() - -```python -self, -name: 'StrPath' -``` - -Get the entry with the given name. - -##### Arguments - -- `name`: The artifact relative name to get - - -##### Raises - -- `ArtifactNotLoggedError`: if the artifact isn't logged or the run is offline. -- `KeyError`: if the artifact doesn't contain an entry with the given name. - - -### method Artifact.get_path() - -```python -self, -name: 'StrPath' -``` - -Deprecated. Use `get_entry(name)`. - -##### Arguments - -- `name`: - - - - -### method Artifact.is_draft() - -```python -self -``` - -Check if artifact is not saved. - - - - - -### method Artifact.json_encode() - -```python -self -``` - -Returns the artifact encoded to the JSON format. - - - - - -### method Artifact.link() - -```python -self, -target_path: 'str', -aliases: 'Iterable[str] | None' = None -``` - -Link this artifact to a collection. - -##### Arguments - -- `target_path`: The path of the collection. Path consists of the prefix "wandb-registry-" along with the registry name and the collection name `wandb-registry-{REGISTRY_NAME}/{COLLECTION_NAME}`. -- `aliases`: Add one or more aliases to the linked artifact. The "latest" alias is automatically applied to the most recent artifact you link. - - -##### Raises - -- `ArtifactNotLoggedError`: If the artifact is not logged. - - -### method Artifact.logged_by() - -```python -self -``` - -Get the W&B run that originally logged the artifact. - - - -##### Raises - -- `ArtifactNotLoggedError`: If the artifact is not logged. - - -### method Artifact.new_draft() - -```python -self -``` - -Create a new draft artifact with the same content as this committed artifact. - -Modifying an existing artifact creates a new artifact version known -as an "incremental artifact". The artifact returned can be extended or -modified and logged as a new version. - - - -##### Raises - -- `ArtifactNotLoggedError`: If the artifact is not logged. - - -### method Artifact.new_file() - -```python -self, -name: 'str', -mode: 'str' = 'x', -encoding: 'str | None' = None -``` - -Open a new temporary file and add it to the artifact. - -##### Arguments - -- `name`: The name of the new file to add to the artifact. -- `mode`: The file access mode to use to open the new file. -- `encoding`: The encoding used to open the new file. - - -##### Raises - -- `ArtifactFinalizedError`: You cannot make changes to the current artifact version because it is finalized. Log a new artifact version instead. - - -### method Artifact.remove() - -```python -self, -item: 'StrPath | ArtifactManifestEntry' -``` - -Remove an item from the artifact. - -##### Arguments - -- `item`: The item to remove. Can be a specific manifest entry or the name of an artifact-relative path. If the item matches a directory all items in that directory will be removed. - - -##### Raises - -- `ArtifactFinalizedError`: You cannot make changes to the current artifact version because it is finalized. Log a new artifact version instead. -- `FileNotFoundError`: If the item isn't found in the artifact. - - -### method Artifact.save() - -```python -self, -project: 'str | None' = None, -settings: 'wandb.Settings | None' = None -``` - -Persist any changes made to the artifact. - -If currently in a run, that run will log this artifact. If not currently in a -run, a run of type "auto" is created to track this artifact. - -##### Arguments - -- `project`: A project to use for the artifact in the case that a run is not already in context. -- `settings`: A settings object to use when initializing an automatic run. Most commonly used in testing harness. - - - - -### method Artifact.unlink() - -```python -self -``` - -Unlink this artifact if it is a linked member of an artifact collection. - - - -##### Raises - -- `ArtifactNotLoggedError`: If the artifact is not logged. -- `ValueError`: If the artifact is not linked to any collection. - - -### method Artifact.used_by() - -```python -self -``` - -Get a list of the runs that have used this artifact and its linked artifacts. - - - -##### Raises - -- `ArtifactNotLoggedError`: If the artifact is not logged. - - -### method Artifact.verify() - -```python -self, -root: 'str | None' = None -``` - -Verify that the contents of an artifact match the manifest. - -All files in the directory are checksummed and the checksums are then -cross-referenced against the artifact's manifest. References are not verified. - -##### Arguments - -- `root`: The directory to verify. If None artifact will be downloaded to './artifacts/self.name/'. - - -##### Raises - -- `ArtifactNotLoggedError`: If the artifact is not logged. -- `ValueError`: If the verification fails. - - -### method Artifact.wait() - -```python -self, -timeout: 'int | None' = None -``` - -If needed, wait for this artifact to finish logging. - -##### Arguments - -- `timeout`: The time, in seconds, to wait. - - - - - - diff --git a/models/ref/python/experiments/artifact/artifact-methods.mdx b/models/ref/python/experiments/artifact/artifact-methods.mdx new file mode 100644 index 0000000000..183435822b --- /dev/null +++ b/models/ref/python/experiments/artifact/artifact-methods.mdx @@ -0,0 +1,570 @@ +--- +title: Artifact methods +sidebarTitle: Methods +page_kind: class-methods +parent_slug: artifact +kind: class +namespace: wandb.sdk.artifacts.artifact +--- + +## class wandb.Artifact + + + +### method Artifact.add() + +```python +self, +obj: 'WBValue', +name: 'StrPath', +overwrite: 'bool' = False +``` + +Add wandb.WBValue `obj` to the artifact. + +##### Arguments + +- `obj`: The object to add. Currently support one of Bokeh, JoinedTable, PartitionedTable, Table, Classes, ImageMask, BoundingBoxes2D, Audio, Image, Video, Html, Object3D +- `name`: The path within the artifact to add the object. +- `overwrite`: If True, overwrite existing objects with the same file path if applicable. + + +##### Raises + +- `ArtifactFinalizedError`: You cannot make changes to the current artifact version because it is finalized. Log a new artifact version instead. + + +### method Artifact.add_dir() + +```python +self, +local_path: 'str', +name: 'str | None' = None, +skip_cache: 'bool | None' = False, +policy: "Literal['mutable', 'immutable'] | None" = 'mutable', +merge: 'bool' = False +``` + +Add a local directory to the artifact. + +##### Arguments + +- `local_path`: The path of the local directory. +- `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. +- `skip_cache`: If set to `True`, W&B will not copy/move files to the cache while uploading +- `policy`: 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. +- `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. + + +##### Raises + +- `ArtifactFinalizedError`: You cannot make changes to the current artifact version because it is finalized. Log a new artifact version instead. +- `ValueError`: Policy must be "mutable" or "immutable" + + +### method Artifact.add_file() + +```python +self, +local_path: 'str', +name: 'str | None' = None, +is_tmp: 'bool | None' = False, +skip_cache: 'bool | None' = False, +policy: "Literal['mutable', 'immutable'] | None" = 'mutable', +overwrite: 'bool' = False +``` + +Add a local file to the artifact. + +##### Arguments + +- `local_path`: The path to the file being added. +- `name`: The path within the artifact to use for the file being added. Defaults to the basename of the file. +- `is_tmp`: If true, then the file is renamed deterministically to avoid collisions. +- `skip_cache`: If `True`, do not copy files to the cache after uploading. +- `policy`: By default, set to "mutable". If set to "mutable", create a temporary copy of the file to prevent corruption during upload. If set to "immutable", disable protection and rely on the user not to delete or change the file. +- `overwrite`: If `True`, overwrite the file if it already exists. + + +##### Raises + +- `ArtifactFinalizedError`: You cannot make changes to the current artifact version because it is finalized. Log a new artifact version instead. +- `ValueError`: Policy must be "mutable" or "immutable" + + +### method Artifact.add_reference() + +```python +self, +uri: 'ArtifactManifestEntry | str', +name: 'StrPath | None' = None, +checksum: 'bool' = True, +max_objects: 'int | None' = None +``` + +Add a reference denoted by a URI to the artifact. + +Unlike files or directories that you add to an artifact, references are not +uploaded to W&B. For more information, +see [Track external files](https://docs.wandb.ai/models/artifacts/track-external-files). + +By default, the following schemes are supported: + +- http(s): The size and digest of the file will be inferred by the + `Content-Length` and the `ETag` response headers returned by the server. +- s3: The checksum and size are pulled from the object metadata. + If bucket versioning is enabled, then the version ID is also tracked. +- gs: The checksum and size are pulled from the object metadata. If bucket + versioning is enabled, then the version ID is also tracked. +- https, domain matching `*.blob.core.windows.net` +- Azure: The checksum and size are be pulled from the blob metadata. + If storage account versioning is enabled, then the version ID is + also tracked. +- file: The checksum and size are pulled from the file system. This scheme + is useful if you have an NFS share or other externally mounted volume + containing files you wish to track but not necessarily upload. + +For any other scheme, the digest is just a hash of the URI and the size is left +blank. + +##### Arguments + +- `uri`: The URI path of the reference to add. The URI path can be an object returned from `Artifact.get_entry` to store a reference to another artifact's entry. +- `name`: The path within the artifact to place the contents of this reference. +- `checksum`: Whether or not to checksum the resource(s) located at the reference URI. Checksumming is strongly recommended as it enables automatic integrity validation. Disabling checksumming will speed up artifact creation but reference directories will not iterated through so the objects in the directory will not be saved to the artifact. We recommend setting `checksum=False` when adding reference objects, in which case a new version will only be created if the reference URI changes. +- `max_objects`: The maximum number of objects to consider when adding a reference that points to directory or bucket store prefix. By default, the maximum number of objects allowed for Amazon S3, GCS, Azure, and local files is 10,000,000. Other URI schemas do not have a maximum. + + +##### Raises + +- `ArtifactFinalizedError`: You cannot make changes to the current artifact version because it is finalized. Log a new artifact version instead. + + +### method Artifact.checkout() + +```python +self, +root: 'str | None' = None +``` + +Replace the specified root directory with the contents of the artifact. + +WARNING: This will delete all files in `root` that are not included in the +artifact. + +##### Arguments + +- `root`: The directory to replace with this artifact's files. + + +##### Raises + +- `ArtifactNotLoggedError`: If the artifact is not logged. + + +### method Artifact.delete() + +```python +self, +delete_aliases: 'bool' = False +``` + +Delete an artifact and its files. + +If called on a linked artifact, only the link is deleted, and the +source artifact is unaffected. + +Use `Artifact.unlink()` instead of `Artifact.delete()` to remove a +link between a source artifact and a collection. + +##### Arguments + +- `delete_aliases`: If set to `True`, delete all aliases associated with the artifact. If `False`, raise an exception if the artifact has existing aliases. This parameter is ignored if the artifact is retrieved from a collection it is linked to. + + +##### Raises + +- `ArtifactNotLoggedError`: If the artifact is not logged. + + +### method Artifact.download() + +```python +self, +root: 'StrPath | None' = None, +allow_missing_references: 'bool' = False, +skip_cache: 'bool | None' = None, +path_prefix: 'StrPath | None' = None, +multipart: 'bool | None' = None +``` + +Download the contents of the artifact to the specified root directory. + +Existing files located within `root` are not modified. Explicitly delete `root` +before you call `download` if you want the contents of `root` to exactly match +the artifact. + +##### Arguments + +- `root`: The directory W&B stores the artifact's files. +- `allow_missing_references`: If set to `True`, any invalid reference paths will be ignored while downloading referenced files. +- `skip_cache`: If set to `True`, the artifact cache will be skipped when downloading and W&B will download each file into the default root or specified download directory. +- `path_prefix`: If specified, only files with a path that starts with the given prefix will be downloaded. Uses unix format (forward slashes). +- `multipart`: If set to `None` (default), the artifact will be downloaded in parallel using multipart download if individual file size is greater than 2GB. If set to `True` or `False`, the artifact will be downloaded in parallel or serially regardless of the file size. + + +##### Raises + +- `ArtifactNotLoggedError`: If the artifact is not logged. + + +### method Artifact.file() + +```python +self, +root: 'str | None' = None +``` + +Download a single file artifact to the directory you specify with `root`. + +##### Arguments + +- `root`: The root directory to store the file. Defaults to `./artifacts/self.name/`. + + +##### Raises + +- `ArtifactNotLoggedError`: If the artifact is not logged. +- `ValueError`: If the artifact contains more than one file. + + +### method Artifact.files() + +```python +self, +names: 'list[str] | None' = None, +per_page: 'int' = 50, +start: 'str | None' = None +``` + +Iterate over all files stored in this artifact. + +##### Arguments + +- `names`: The filename paths relative to the root of the artifact you wish to list. +- `per_page`: The number of files to return per request. +- `start`: Pagination cursor for resuming a past query, captured from a previous paginator's `.cursor` attribute. + + +##### Raises + +- `ArtifactNotLoggedError`: If the artifact is not logged. + + +### method Artifact.finalize() + +```python +self +``` + +Finalize the artifact version. + +You cannot modify an artifact version once it is finalized because the artifact +is logged as a specific artifact version. Create a new artifact version +to log more data to an artifact. An artifact is automatically finalized +when you log the artifact with `log_artifact`. + + + + + +### method Artifact.get() + +```python +self, +name: 'str' +``` + +Get the WBValue object located at the artifact relative `name`. + +##### Arguments + +- `name`: The artifact relative name to retrieve. + + +##### Raises + +- `ArtifactNotLoggedError`: if the artifact isn't logged or the run is offline. + + +### method Artifact.get_added_local_path_name() + +```python +self, +local_path: 'str' +``` + +Get the artifact relative name of a file added by a local filesystem path. + +##### Arguments + +- `local_path`: The local path to resolve into an artifact relative name. + + + + +### method Artifact.get_entry() + +```python +self, +name: 'StrPath' +``` + +Get the entry with the given name. + +##### Arguments + +- `name`: The artifact relative name to get + + +##### Raises + +- `ArtifactNotLoggedError`: if the artifact isn't logged or the run is offline. +- `KeyError`: if the artifact doesn't contain an entry with the given name. + + +### method Artifact.get_path() + +```python +self, +name: 'StrPath' +``` + +Deprecated. Use `get_entry(name)`. + +##### Arguments + +- `name`: + + + + +### method Artifact.is_draft() + +```python +self +``` + +Check if artifact is not saved. + + + + + +### method Artifact.json_encode() + +```python +self +``` + +Returns the artifact encoded to the JSON format. + + + + + +### method Artifact.link() + +```python +self, +target_path: 'str', +aliases: 'Iterable[str] | None' = None +``` + +Link this artifact to a collection. + +##### Arguments + +- `target_path`: The path of the collection. Path consists of the prefix "wandb-registry-" along with the registry name and the collection name `wandb-registry-{REGISTRY_NAME}/{COLLECTION_NAME}`. +- `aliases`: Add one or more aliases to the linked artifact. The "latest" alias is automatically applied to the most recent artifact you link. + + +##### Raises + +- `ArtifactNotLoggedError`: If the artifact is not logged. + + +### method Artifact.logged_by() + +```python +self +``` + +Get the W&B run that originally logged the artifact. + + + +##### Raises + +- `ArtifactNotLoggedError`: If the artifact is not logged. + + +### method Artifact.new_draft() + +```python +self +``` + +Create a new draft artifact with the same content as this committed artifact. + +Modifying an existing artifact creates a new artifact version known +as an "incremental artifact". The artifact returned can be extended or +modified and logged as a new version. + + + +##### Raises + +- `ArtifactNotLoggedError`: If the artifact is not logged. + + +### method Artifact.new_file() + +```python +self, +name: 'str', +mode: 'str' = 'x', +encoding: 'str | None' = None +``` + +Open a new temporary file and add it to the artifact. + +##### Arguments + +- `name`: The name of the new file to add to the artifact. +- `mode`: The file access mode to use to open the new file. +- `encoding`: The encoding used to open the new file. + + +##### Raises + +- `ArtifactFinalizedError`: You cannot make changes to the current artifact version because it is finalized. Log a new artifact version instead. + + +### method Artifact.remove() + +```python +self, +item: 'StrPath | ArtifactManifestEntry' +``` + +Remove an item from the artifact. + +##### Arguments + +- `item`: The item to remove. Can be a specific manifest entry or the name of an artifact-relative path. If the item matches a directory all items in that directory will be removed. + + +##### Raises + +- `ArtifactFinalizedError`: You cannot make changes to the current artifact version because it is finalized. Log a new artifact version instead. +- `FileNotFoundError`: If the item isn't found in the artifact. + + +### method Artifact.save() + +```python +self, +project: 'str | None' = None, +settings: 'wandb.Settings | None' = None +``` + +Persist any changes made to the artifact. + +If currently in a run, that run will log this artifact. If not currently in a +run, a run of type "auto" is created to track this artifact. + +##### Arguments + +- `project`: A project to use for the artifact in the case that a run is not already in context. +- `settings`: A settings object to use when initializing an automatic run. Most commonly used in testing harness. + + + + +### method Artifact.unlink() + +```python +self +``` + +Unlink this artifact if it is a linked member of an artifact collection. + + + +##### Raises + +- `ArtifactNotLoggedError`: If the artifact is not logged. +- `ValueError`: If the artifact is not linked to any collection. + + +### method Artifact.used_by() + +```python +self +``` + +Get a list of the runs that have used this artifact and its linked artifacts. + + + +##### Raises + +- `ArtifactNotLoggedError`: If the artifact is not logged. + + +### method Artifact.verify() + +```python +self, +root: 'str | None' = None +``` + +Verify that the contents of an artifact match the manifest. + +All files in the directory are checksummed and the checksums are then +cross-referenced against the artifact's manifest. References are not verified. + +##### Arguments + +- `root`: The directory to verify. If None artifact will be downloaded to './artifacts/self.name/'. + + +##### Raises + +- `ArtifactNotLoggedError`: If the artifact is not logged. +- `ValueError`: If the verification fails. + + +### method Artifact.wait() + +```python +self, +timeout: 'int | None' = None +``` + +If needed, wait for this artifact to finish logging. + +##### Arguments + +- `timeout`: The time, in seconds, to wait. + + + + + + diff --git a/models/ref/python/experiments/artifact/artifact-properties.mdx b/models/ref/python/experiments/artifact/artifact-properties.mdx new file mode 100644 index 0000000000..2fefcb9425 --- /dev/null +++ b/models/ref/python/experiments/artifact/artifact-properties.mdx @@ -0,0 +1,211 @@ +--- +title: Artifact properties +sidebarTitle: Properties +page_kind: class-properties +parent_slug: artifact +kind: class +namespace: wandb.sdk.artifacts.artifact +--- + +## class wandb.Artifact + + + +### property aliases + +List of one or more semantically-friendly references or + +identifying "nicknames" assigned to an artifact version. + +Aliases are mutable references that you can programmatically reference. +Change an artifact's alias with the W&B App UI or programmatically. +See [Create new artifact versions](https://docs.wandb.ai/models/artifacts/create-a-new-artifact-version) +for more information. + +### property collection + +The collection this artifact is retrieved from. + +A collection is an ordered group of artifact versions. +If this artifact is retrieved from a collection that it is linked to, +return that collection. Otherwise, return the collection +that the artifact version originates from. + +The collection that an artifact originates from is known as +the source sequence. + +### property commit_hash + +The hash returned when this artifact was committed. + +### property created_at + +Timestamp when the artifact was created. + +### property description + +A description of the artifact. + +### property digest + +The logical digest of the artifact. + +The digest is the checksum of the artifact's contents. If an artifact has the +same digest as the current `latest` version, then `log_artifact` is a no-op. + +### property entity + +The name of the entity that the artifact collection belongs to. + +If the artifact is a link, the entity will be the entity of the linked artifact. + +### property file_count + +The number of files (including references). + +### property history_step + +The nearest step which logged history metrics for this artifact's source run. + +### property id + +The artifact's ID. + +### property is_link + +Boolean flag indicating if the artifact is a link artifact. + +True: The artifact is a link artifact to a source artifact. +False: The artifact is a source artifact. + +### property linked_artifacts + +Returns a list of all the linked artifacts of a source artifact. + +If this artifact is a link artifact (`artifact.is_link == True`), +it will return an empty list. + +Limited to 500 results. + +### property manifest + +The artifact's manifest. + +The manifest lists all of its contents, and can't be changed once the artifact +has been logged. + +### property metadata + +User-defined artifact metadata. + +Structured data associated with the artifact. + +### property name + +The artifact name and version of the artifact. + +A string with the format `{collection}:{alias}`. If fetched before an artifact is +logged/saved, the name won't contain the alias. +If the artifact is a link, the name will be the name of the linked artifact. + +### property project + +The name of the project that the artifact collection belongs to. + +If the artifact is a link, the project will be the project of the linked artifact. + +### property qualified_name + +The entity/project/name of the artifact. + +If the artifact is a link, the qualified name will be the qualified name of the +linked artifact path. + +### property size + +The total size of the artifact in bytes. + +Includes any references tracked by this artifact. + +### property source_artifact + +Returns the source artifact, which is the original logged artifact. + +If this artifact is a source artifact (`artifact.is_link == False`), +it will return itself. + +### property source_collection + +The artifact's source collection. + +The source collection is the collection that the artifact was logged from. + +### property source_entity + +The name of the entity of the source artifact. + +### property source_name + +The artifact name and version of the source artifact. + +A string with the format `{source_collection}:{alias}`. Before the artifact +is saved, contains only the name since the version is not yet known. + +### property source_project + +The name of the project of the source artifact. + +### property source_qualified_name + +The source_entity/source_project/source_name of the source artifact. + +### property source_version + +The source artifact's version. + +A string with the format `v{number}`. + +### property state + +The status of the artifact. One of: "PENDING", "COMMITTED", or "DELETED". + +### property tags + +List of one or more tags assigned to this artifact version. + +### property ttl + +The time-to-live (TTL) policy of an artifact. + +Artifacts are deleted shortly after a TTL policy's duration passes. +If set to `None`, the artifact deactivates TTL policies and will be not +scheduled for deletion, even if there is a team default TTL. +An artifact inherits a TTL policy from +the team default if the team administrator defines a default +TTL and there is no custom policy set on an artifact. + +### property type + +The artifact's type. Common types include `dataset` or `model`. + +### property updated_at + +The time when the artifact was last updated. + +### property url + +Constructs the URL of the artifact. + +### property use_as + +Deprecated. + +### property version + +The artifact's version. + +A string with the format `v{number}`. +If this is a link artifact, the version will be from the linked collection. + + + diff --git a/models/ref/python/experiments/run.mdx b/models/ref/python/experiments/run.mdx index ec38463e95..9929a896ca 100644 --- a/models/ref/python/experiments/run.mdx +++ b/models/ref/python/experiments/run.mdx @@ -61,1010 +61,3 @@ with wandb.init(entity="entity", project="project") as run: run.log({"accuracy": acc, "loss": loss}) ``` -## Properties - -### property config - -Config object associated with this run. - -### property config_static - -Static config object associated with this run. - -### property dir - -The directory where files associated with the run are saved. - -### property disabled - -True if the run is disabled, False otherwise. - -### property entity - -The name of the W&B entity associated with the run. - -Entity can be a username or the name of a team or organization. - -### property group - -Returns the name of the group associated with this run. - -Grouping runs together allows related experiments to be organized and -visualized collectively in the W&B UI. This is especially useful for -scenarios such as distributed training or cross-validation, where -multiple runs should be viewed and managed as a unified experiment. - -In shared mode, where all processes share the same run object, -setting a group is usually unnecessary, since there is only one -run and no grouping is required. - -### property id - -Identifier for this run. - -### property job_type - -Name of the job type associated with the run. - -View a run's job type in the run's Overview page in the W&B App. - -You can use this to categorize runs by their job type, such as -"training", "evaluation", or "inference". This is useful for organizing -and filtering runs in the W&B UI, especially when you have multiple -runs with different job types in the same project. For more -information, see [Organize runs](https://docs.wandb.ai/models/runs#organize-runs). - -### property name - -Display name of the run. - -Display names are not guaranteed to be unique and may be descriptive. -By default, they are randomly generated. - -### property notes - -Notes associated with the run, if there are any. - -Notes can be a multiline string and can also use markdown and latex -equations inside `$$`, like `$x + 3$`. - -### property offline - -True if the run is offline, False otherwise. - -### property path - -Path to the run. - -Run paths include entity, project, and run ID, in the format -`entity/project/run_id`. - -### property project - -Name of the W&B project associated with the run. - -### property project_url - -URL of the W&B project associated with the run, if there is one. - -Offline runs do not have a project URL. - -### property resumed - -True if the run was resumed, False otherwise. - -### property settings - -A frozen copy of run's Settings object. - -### property start_time - -Unix timestamp (in seconds) of when the run started. - -### property step - -The W&B step of the next `log()` call. - -Raises an error in mode="shared" runs. - -### property sweep_id - -Identifier for the sweep associated with the run, if there is one. - -### property sweep_url - -URL of the sweep associated with the run, if there is one. - -Offline runs do not have a sweep URL. - -### property tags - -Tags associated with the run, if there are any. - -### property url - -The url for the W&B run, if there is one. - -Offline runs will not have a url. - - - -## Methods - -### method Run.alert() - -```python -self, -title: 'str', -text: 'str', -level: 'str | AlertLevel | None' = None, -wait_duration: 'int | float | timedelta | None' = None -``` - -Create an alert with the given title and text. - -##### Arguments - -- `title`: The title of the alert, must be less than 64 characters long. -- `text`: The text body of the alert. -- `level`: The alert level to use, either: `INFO`, `WARN`, or `ERROR`. -- `wait_duration`: The time to wait (in seconds) before sending another alert with this title. - - - - -### method Run.define_metric() - -```python -self, -name: 'str', -step_metric: 'str | wandb_metric.Metric | None' = None, -step_sync: 'bool | None' = None, -hidden: 'bool | None' = None, -summary: 'str | None' = None, -goal: 'str | None' = None, -overwrite: 'bool | None' = None -``` - -Customize metrics logged with `wandb.Run.log()`. - -##### Arguments - -- `name`: The name of the metric to customize. -- `step_metric`: The name of another metric to serve as the X-axis for this metric in automatically generated charts. -- `step_sync`: Automatically insert the last value of step_metric into `wandb.Run.log()` if it is not provided explicitly. Defaults to True if step_metric is specified. -- `hidden`: Hide this metric from automatic plots. -- `summary`: Specify aggregate metrics added to summary. Supported aggregations include "min", "max", "mean", "last", "first", "best", "copy" and "none". "none" prevents a summary from being generated. "best" is used together with the goal parameter, "best" is deprecated and should not be used, use "min" or "max" instead. "copy" is deprecated and should not be used. -- `goal`: Specify how to interpret the "best" summary type. Supported options are "minimize" and "maximize". "goal" is deprecated and should not be used, use "min" or "max" instead. -- `overwrite`: If false, then this call is merged with previous `define_metric` calls for the same metric by using their values for any unspecified parameters. If true, then unspecified parameters overwrite values specified by previous calls. - - - - -### method Run.display() - -```python -self, -height: 'int' = 420, -hidden: 'bool' = False -``` - -Display this run in Jupyter. - -##### Arguments - -- `height`: -- `hidden`: - - - - -### method Run.finish() - -```python -self, -exit_code: 'int | None' = None, -quiet: 'bool | None' = None -``` - -Finish a run and upload any remaining data. - -Marks the completion of a W&B run and ensures all data is synced to the server. -The run's final state is determined by its exit conditions and sync status. - -Run States: -- Running: Active run that is logging data and/or sending heartbeats. -- Crashed: Run that stopped sending heartbeats unexpectedly. -- Finished: Run completed successfully (`exit_code=0`) with all data synced. -- Failed: Run completed with errors (`exit_code!=0`). -- Killed: Run was forcibly stopped before it could finish. - -##### Arguments - -- `exit_code`: Integer indicating the run's exit status. Use 0 for success, any other value marks the run as failed. -- `quiet`: Deprecated. Configure logging verbosity using `wandb.Settings(quiet=...)`. - - - - -### method Run.finish_artifact() - -```python -self, -artifact_or_path: 'Artifact | str', -name: 'str | None' = None, -type: 'str | None' = None, -aliases: 'list[str] | None' = None, -distributed_id: 'str | None' = None -``` - -Finishes a non-finalized artifact as output of a run. - -Subsequent "upserts" with the same distributed ID will result in a new version. - -##### Arguments - -- `artifact_or_path`: A path to the contents of this artifact, - can be in the following forms: - - `/local/directory` - - `/local/directory/file.txt` - - `s3://bucket/path` - You can also pass an Artifact object created by calling - `wandb.Artifact`. -- `name`: An artifact name. May be prefixed with entity/project. - Valid names can be in the following forms: - - name:version - - name:alias - - digest - This will default to the basename of the path prepended with the current - run id if not specified. -- `type`: The type of artifact to log, examples include `dataset`, `model` -- `aliases`: Aliases to apply to this artifact, defaults to `["latest"]` -- `distributed_id`: Unique string that all distributed jobs share. If None, defaults to the run's group name. - - - - -### method Run.link_artifact() - -```python -self, -artifact: 'Artifact', -target_path: 'str', -aliases: 'list[str] | None' = None -``` - -Link the artifact to a collection. - -The term “link” refers to pointers that connect where W&B stores the -artifact and where the artifact is accessible in the registry. W&B -does not duplicate artifacts when you link an artifact to a collection. - -View linked artifacts in the Registry UI for the specified collection. - -##### Arguments - -- `artifact`: The artifact object to link to the collection. -- `target_path`: The path of the collection. Path consists of the prefix "wandb-registry-" along with the registry name and the collection name `wandb-registry-{REGISTRY_NAME}/{COLLECTION_NAME}`. -- `aliases`: Add one or more aliases to the linked artifact. The "latest" alias is automatically applied to the most recent artifact you link. - - - - -### method Run.link_model() - -```python -self, -path: 'StrPath', -registered_model_name: 'str', -name: 'str | None' = None, -aliases: 'list[str] | None' = None -``` - -Log a model artifact version and link it to a registered model in the model registry. - -Linked model versions are visible in the UI for the specified registered model. - -This method will: -- Check if 'name' model artifact has been logged. If so, use the artifact version that matches the files -located at 'path' or log a new version. Otherwise log files under 'path' as a new model artifact, 'name' -of type 'model'. -- Check if registered model with name 'registered_model_name' exists in the 'model-registry' project. -If not, create a new registered model with name 'registered_model_name'. -- Link version of model artifact 'name' to registered model, 'registered_model_name'. -- Attach aliases from 'aliases' list to the newly linked model artifact version. - -##### Arguments - -- `path`: (str) A path to the contents of this model, can be in the - following forms: - - `/local/directory` - - `/local/directory/file.txt` - - `s3://bucket/path` -- `registered_model_name`: The name of the registered model that the model is to be linked to. A registered model is a collection of model versions linked to the model registry, typically representing a team's specific ML Task. The entity that this registered model belongs to will be derived from the run. -- `name`: The name of the model artifact that files in 'path' will be logged to. This will default to the basename of the path prepended with the current run id if not specified. -- `aliases`: Aliases that will only be applied on this linked artifact inside the registered model. The alias "latest" will always be applied to the latest version of an artifact that is linked. - - -##### Raises - -- `AssertionError`: If registered_model_name is a path or if model artifact 'name' is of a type that does not contain the substring 'model'. -- `ValueError`: If name has invalid special characters. - - -### method Run.log() - -```python -self, -data: 'dict[str, Any]', -step: 'int | None' = None, -commit: 'bool | None' = None -``` - -Upload run data. - -Use `log` to log data from runs, such as scalars, images, video, -histograms, plots, and tables. See [Log objects and media](https://docs.wandb.ai/models/track/log) for -code snippets, best practices, and more. - -Basic usage: - -```python -import wandb - -with wandb.init() as run: - run.log({"train-loss": 0.5, "accuracy": 0.9}) -``` - -The previous code snippet saves the loss and accuracy to the run's -history and updates the summary values for these metrics. - -Visualize logged data in a workspace at [wandb.ai](https://wandb.ai), -or locally on a [self-hosted instance](https://docs.wandb.ai/platform/hosting) -of the W&B app, or export data to visualize and explore locally, such as in a -Jupyter notebook, with the [Public API](https://docs.wandb.ai/models/track/public-api-guide). - -Logged values don't have to be scalars. You can log any -[W&B supported Data Type](https://docs.wandb.ai/models/ref/python/data-types) -such as images, audio, video, and more. For example, you can use -`wandb.Table` to log structured data. See -[Log tables, visualize and query data](https://docs.wandb.ai/models/tables/tables-walkthrough) -tutorial for more details. - -W&B organizes metrics with a forward slash (`/`) in their name -into sections named using the text before the final slash. For example, -the following results in two sections named "train" and "validate": - -```python -with wandb.init() as run: - # Log metrics in the "train" section. - run.log( - { - "train/accuracy": 0.9, - "train/loss": 30, - "validate/accuracy": 0.8, - "validate/loss": 20, - } - ) -``` - -Only one level of nesting is supported; `run.log({"a/b/c": 1})` -produces a section named "a". - -`run.log()` is not intended to be called more than a few times per second. -For optimal performance, limit your logging to once every N iterations, -or collect data over multiple iterations and log it in a single step. - -By default, each call to `log` creates a new "step". -The step must always increase, and it is not possible to log -to a previous step. You can use any metric as the X axis in charts. -See [Custom log axes](https://docs.wandb.ai/models/track/log/customize-logging-axes) -for more details. - -In many cases, it is better to treat the W&B step like -you'd treat a timestamp rather than a training step. - -```python -with wandb.init() as run: - # Example: log an "epoch" metric for use as an X axis. - run.log({"epoch": 40, "train-loss": 0.5}) -``` - -It is possible to use multiple `wandb.Run.log()` invocations to log to -the same step with the `step` and `commit` parameters. -The following are all equivalent: - -```python -with wandb.init() as run: - # Normal usage: - run.log({"train-loss": 0.5, "accuracy": 0.8}) - run.log({"train-loss": 0.4, "accuracy": 0.9}) - - # Implicit step without auto-incrementing: - run.log({"train-loss": 0.5}, commit=False) - run.log({"accuracy": 0.8}) - run.log({"train-loss": 0.4}, commit=False) - run.log({"accuracy": 0.9}) - - # Explicit step: - run.log({"train-loss": 0.5}, step=current_step) - run.log({"accuracy": 0.8}, step=current_step) - current_step += 1 - run.log({"train-loss": 0.4}, step=current_step) - run.log({"accuracy": 0.9}, step=current_step, commit=True) -``` - -##### Arguments - -- `data`: A `dict` with `str` keys and values that are serializable Python objects including: `int`, `float` and `string`; any of the `wandb.data_types`; lists, tuples and NumPy arrays of serializable Python objects; other `dict`s of this structure. -- `step`: The step number to log. If `None`, then an implicit auto-incrementing step is used. See the notes in the description. -- `commit`: If true, finalize and upload the step. If false, then accumulate data for the step. See the notes in the description. If `step` is `None`, then the default is `commit=True`; otherwise, the default is `commit=False`. - - -##### Raises - -- `wandb.Error`: If called before `wandb.init()`. -- `ValueError`: If invalid data is passed. - - -##### Examples - -For more and more detailed examples, see -[our guides to logging](https://docs.wandb.ai/models/track/log). - -Basic usage - -```python -import wandb - -with wandb.init() as run: - run.log({"train-loss": 0.5, "accuracy": 0.9 -``` - -Incremental logging - -```python -import wandb - -with wandb.init() as run: - run.log({"loss": 0.2}, commit=False) - # Somewhere else when I'm ready to report this step: - run.log({"accuracy": 0.8}) -``` - -Histogram - -```python -import numpy as np -import wandb - -# sample gradients at random from normal distribution -gradients = np.random.randn(100, 100) -with wandb.init() as run: - run.log({"gradients": wandb.Histogram(gradients)}) -``` - -Image from NumPy - -```python -import numpy as np -import wandb - -with wandb.init() as run: - examples = [] - for i in range(3): - pixels = np.random.randint(low=0, high=256, size=(100, 100, 3)) - image = wandb.Image(pixels, caption=f"random field {i}") - examples.append(image) - run.log({"examples": examples}) -``` - -Image from PIL - -```python -import numpy as np -from PIL import Image as PILImage -import wandb - -with wandb.init() as run: - examples = [] - for i in range(3): - pixels = np.random.randint( - low=0, - high=256, - size=(100, 100, 3), - dtype=np.uint8, - ) - pil_image = PILImage.fromarray(pixels, mode="RGB") - image = wandb.Image(pil_image, caption=f"random field {i}") - examples.append(image) - run.log({"examples": examples}) -``` - -Video from NumPy - -```python -import numpy as np -import wandb - -with wandb.init() as run: - # axes are (time, channel, height, width) - frames = np.random.randint( - low=0, - high=256, - size=(10, 3, 100, 100), - dtype=np.uint8, - ) - run.log({"video": wandb.Video(frames, fps=4)}) -``` - -Matplotlib plot - -```python -from matplotlib import pyplot as plt -import numpy as np -import wandb - -with wandb.init() as run: - fig, ax = plt.subplots() - x = np.linspace(0, 10) - y = x * x - ax.plot(x, y) # plot y = x^2 - run.log({"chart": fig}) -``` - -PR Curve - -```python -import wandb - -with wandb.init() as run: - run.log({"pr": wandb.plot.pr_curve(y_test, y_probas, labels)}) -``` - -3D Object - -```python -import wandb - -with wandb.init() as run: - run.log( - { - "generated_samples": [ - wandb.Object3D(open("sample.obj")), - wandb.Object3D(open("sample.gltf")), - wandb.Object3D(open("sample.glb")), - ] - } - ) -``` - -### method Run.log_artifact() - -```python -self, -artifact_or_path: 'Artifact | StrPath', -name: 'str | None' = None, -type: 'str | None' = None, -aliases: 'list[str] | None' = None, -tags: 'list[str] | None' = None -``` - -Declare an artifact as an output of a run. - -##### Arguments - -- `artifact_or_path`: (str or Artifact) A path to the contents of this artifact, - can be in the following forms: - - `/local/directory` - - `/local/directory/file.txt` - - `s3://bucket/path` - You can also pass an Artifact object created by calling - `wandb.Artifact`. -- `name`: (str, optional) An artifact name. Valid names can be in the following forms: - - name:version - - name:alias - - digest - This will default to the basename of the path prepended with the current - run id if not specified. -- `type`: (str) The type of artifact to log, examples include `dataset`, `model` -- `aliases`: (list, optional) Aliases to apply to this artifact, defaults to `["latest"]` -- `tags`: (list, optional) Tags to apply to this artifact, if any. - - - - -### method Run.log_code() - -```python -self, -root: 'str | None' = '.', -name: 'str | None' = None, -include_fn: 'Callable[[str, str], bool] | Callable[[str], bool]' = _is_py_requirements_or_dockerfile, -exclude_fn: 'Callable[[str, str], bool] | Callable[[str], bool]' = exclude_wandb_fn -``` - -Save the current state of your code to a W&B Artifact. - -By default, it walks the current directory and logs all files that end with `.py`. - -##### Arguments - -- `root`: The relative (to `os.getcwd()`) or absolute path to recursively find code from. -- `name`: (str, optional) The name of our code artifact. By default, we'll name the artifact `source-$PROJECT_ID-$ENTRYPOINT_RELPATH`. There may be scenarios where you want many runs to share the same artifact. Specifying name allows you to achieve that. -- `include_fn`: A callable that accepts a file path and (optionally) root path and returns True when it should be included and False otherwise. This defaults to `lambda path, root: path.endswith(".py")`. -- `exclude_fn`: A callable that accepts a file path and (optionally) root path and returns `True` when it should be excluded and `False` otherwise. This defaults to a function that excludes all files within `/.wandb/` and `/wandb/` directories. - - - - -##### Examples - -Basic usage - -```python -import wandb - -with wandb.init() as run: - run.log_code() -``` - -Advanced usage - -```python -import wandb - -with wandb.init() as run: - run.log_code( - root="../", - include_fn=lambda path: path.endswith(".py") or path.endswith(".ipynb"), - exclude_fn=lambda path, root: os.path.relpath(path, root).startswith( - "cache/" - ), - ) -``` - -### method Run.log_model() - -```python -self, -path: 'StrPath', -name: 'str | None' = None, -aliases: 'list[str] | None' = None -``` - -Logs a model artifact containing the contents inside the 'path' to a run and marks it as an output to this run. - -The name of model artifact can only contain alphanumeric characters, -underscores, and hyphens. - -##### Arguments - -- `path`: (str) A path to the contents of this model, - can be in the following forms: - - `/local/directory` - - `/local/directory/file.txt` - - `s3://bucket/path` -- `name`: A name to assign to the model artifact that the file contents will be added to. This will default to the basename of the path prepended with the current run id if not specified. -- `aliases`: Aliases to apply to the created model artifact, defaults to `["latest"]` - - -##### Raises - -- `ValueError`: If name has invalid special characters. - - -### method Run.mark_preempting() - -```python -self -``` - -Mark this run as preempting. - -Also tells the internal process to immediately report this to server. - - - - - -### method Run.pin_config_keys() - -```python -self, -keys: 'Sequence[str]' = () -``` - -Pin config keys to display in the References section on Run Overview. - -Pinned keys appear prominently above Notes on the Run Overview page. -String values are rendered as markdown; non-strings are rendered as -plain text. Calling this again replaces the previously pinned list. - -##### Arguments - -- `keys`: Config key names to pin, matching keys set via ``run.config``. These are exact key strings (dots and slashes are treated literally, not as path separators). Order is preserved and determines display order. - - - - -### method Run.restore() - -```python -self, -name: 'str', -run_path: 'str | None' = None, -replace: 'bool' = False, -root: 'str | None' = None -``` - -Download the specified file from cloud storage. - -File is placed into the current directory or run directory. -By default, will only download the file if it doesn't already exist. - -##### Arguments - -- `name`: The name of the file. -- `run_path`: Optional path to a run to pull files from, i.e. `username/project_name/run_id` if wandb.init has not been called, this is required. -- `replace`: Whether to download the file even if it already exists locally -- `root`: The directory to download the file to. Defaults to the current directory or the run directory if wandb.init was called. - - -##### Raises - -- `CommError`: If W&B can't connect to the W&B backend. -- `ValueError`: If the file is not found or can't find run_path. - - -### method Run.save() - -```python -self, -glob_str: 'str | os.PathLike', -base_path: 'str | os.PathLike | None' = None, -policy: 'PolicyName' = 'live', -glob: 'bool' = True -``` - -Sync one or more files to W&B. - -Relative paths are relative to the current working directory. - -A Unix glob, such as "myfiles/*", is expanded at the time `save` is -called regardless of the `policy`. In particular, new files are not -picked up automatically. - -`glob_str` is expanded using Python's `glob` module: see -https://docs.python.org/3/library/glob.html for the exact syntax and -behavior. Notably, the characters `*`, `?`, and `[]` are treated as -glob metacharacters, not literal characters, even if they appear in a -real filename (e.g. "myfile[1].txt"). If your file's name contains -any of these characters and you want to match it literally rather -than as a pattern, either escape it yourself with `glob.escape()` -before calling `save`, or pass `glob=False` to disable pattern -expansion entirely and treat `glob_str` as a literal path. - -A `base_path` may be provided to control the directory structure of -uploaded files. It should be a prefix of `glob_str`, and the directory -structure beneath it is preserved. - -When given an absolute path or glob and no `base_path`, one -directory level is preserved as in the example above. - -Files are automatically deduplicated: calling `save()` multiple times -on the same file without modifications will not re-upload it. - -##### Arguments - -- `glob_str`: A relative or absolute path or Unix glob. -- `base_path`: A path to use to infer a directory structure; see examples. -- `policy`: One of `live`, `now`, or `end`. - - live: upload the file as it changes, overwriting the previous version - - now: upload the file once now - - end: upload file when the run ends -- `glob`: Whether to treat `glob_str` as a glob pattern. Defaults to `True` for backward compatibility. Set to `False` to treat `glob_str` as a literal path, e.g. when its name contains glob metacharacters like `[`, `]`, `*`, or `?` that you don't want interpreted as a pattern. - - - - -### method Run.status() - -```python -self -``` - -Get sync info from the internal backend, about the current run's sync status. - - - - - -### method Run.unwatch() - -```python -self, -models: 'torch.nn.Module | Sequence[torch.nn.Module] | None' = None -``` - -Remove pytorch model topology, gradient and parameter hooks. - -##### Arguments - -- `models`: Optional list of pytorch models that have had watch called on them. - - - - -### method Run.upsert_artifact() - -```python -self, -artifact_or_path: 'Artifact | str', -name: 'str | None' = None, -type: 'str | None' = None, -aliases: 'list[str] | None' = None, -distributed_id: 'str | None' = None -``` - -Declare (or append to) a non-finalized artifact as output of a run. - -Note that you must call run.finish_artifact() to finalize the artifact. -This is useful when distributed jobs need to all contribute to the same artifact. - -##### Arguments - -- `artifact_or_path`: A path to the contents of this artifact, - can be in the following forms: - - `/local/directory` - - `/local/directory/file.txt` - - `s3://bucket/path` -- `name`: An artifact name. May be prefixed with "entity/project". Defaults - to the basename of the path prepended with the current run ID - if not specified. Valid names can be in the following forms: - - name:version - - name:alias - - digest -- `type`: The type of artifact to log. Common examples include `dataset`, `model`. -- `aliases`: Aliases to apply to this artifact, defaults to `["latest"]`. -- `distributed_id`: Unique string that all distributed jobs share. If None, defaults to the run's group name. - - - - -### method Run.use_artifact() - -```python -self, -artifact_or_name: 'str | Artifact', -type: 'str | None' = None, -aliases: 'list[str] | None' = None, -use_as: 'str | None' = None -``` - -Declare an artifact as an input to a run. - -Call `download` or `file` on the returned object to get the contents locally. - -##### Arguments - -- `artifact_or_name`: The name of the artifact to use. May be prefixed - with the name of the project the artifact was logged to - ("entity" or "entity/project"). If no - entity is specified in the name, the Run or API setting's entity is used. - Valid names can be in the following forms - - name:version - - name:alias -- `type`: The type of artifact to use. -- `aliases`: Aliases to apply to this artifact -- `use_as`: This argument is deprecated and does nothing. - - - - -##### Examples - -```python -import wandb - -run = wandb.init(project="") - -# Use an artifact by name and alias -artifact_a = run.use_artifact(artifact_or_name=":") - -# Use an artifact by name and version -artifact_b = run.use_artifact(artifact_or_name=":v") - -# Use an artifact by entity/project/name:alias -artifact_c = run.use_artifact( - artifact_or_name="//:" -) - -# Use an artifact by entity/project/name:version -artifact_d = run.use_artifact( - artifact_or_name="//:v" -) - -# Explicitly finish the run since a context manager is not used. -run.finish() -``` - -### method Run.use_model() - -```python -self, -name: 'str' -``` - -Download the files logged in a model artifact 'name'. - -##### Arguments - -- `name`: A model artifact name. 'name' must match the name of an existing logged - model artifact. May be prefixed with `entity/project/`. Valid names - can be in the following forms - - model_artifact_name:version - - model_artifact_name:alias - - -##### Raises - -- `AssertionError`: If model artifact 'name' is of a type that does not contain the substring 'model'. - - -### method Run.watch() - -```python -self, -models: 'torch.nn.Module | Sequence[torch.nn.Module]', -criterion: 'torch.F | None' = None, -log: "Literal['gradients', 'parameters', 'all'] | None" = 'gradients', -log_freq: 'int' = 1000, -idx: 'int | None' = None, -log_graph: 'bool' = False -``` - -Hook into given PyTorch model to monitor gradients and the model's computational graph. - -This function can track parameters, gradients, or both during training. - -##### Arguments - -- `models`: A single model or a sequence of models to be monitored. -- `criterion`: The loss function being optimized (optional). -- `log`: Specifies whether to log "gradients", "parameters", or "all". Set to None to disable logging. (default="gradients"). -- `log_freq`: Frequency (in batches) to log gradients and parameters. (default=1000) -- `idx`: Index used when tracking multiple models with `wandb.watch`. (default=None) -- `log_graph`: Whether to log the model's computational graph. (default=False) - - -##### Raises - -- `ValueError`: If `wandb.init()` has not been called or if any of the models are not instances of `torch.nn.Module`. - - -### method Run.write_logs() - -```python -self, -text: 'str' -``` - -Write text to the run's Logs tab. - -Use `write_logs` to directly write text to the Logs tab instead of -relying on automatic stdout/stderr capture. Calls after the run has -finished are silently ignored. - -Consider using the `capture_loggers` setting which integrates with -Python's `logging` module. - -##### Arguments - -- `text`: The text to write. A trailing newline is added if not present. - - - - - - diff --git a/models/ref/python/experiments/run/run-methods.mdx b/models/ref/python/experiments/run/run-methods.mdx new file mode 100644 index 0000000000..d83ee11e80 --- /dev/null +++ b/models/ref/python/experiments/run/run-methods.mdx @@ -0,0 +1,890 @@ +--- +title: Run methods +sidebarTitle: Methods +page_kind: class-methods +parent_slug: run +kind: class +namespace: wandb.sdk.wandb_run +--- + +## class wandb.Run + + + +### method Run.alert() + +```python +self, +title: 'str', +text: 'str', +level: 'str | AlertLevel | None' = None, +wait_duration: 'int | float | timedelta | None' = None +``` + +Create an alert with the given title and text. + +##### Arguments + +- `title`: The title of the alert, must be less than 64 characters long. +- `text`: The text body of the alert. +- `level`: The alert level to use, either: `INFO`, `WARN`, or `ERROR`. +- `wait_duration`: The time to wait (in seconds) before sending another alert with this title. + + + + +### method Run.define_metric() + +```python +self, +name: 'str', +step_metric: 'str | wandb_metric.Metric | None' = None, +step_sync: 'bool | None' = None, +hidden: 'bool | None' = None, +summary: 'str | None' = None, +goal: 'str | None' = None, +overwrite: 'bool | None' = None +``` + +Customize metrics logged with `wandb.Run.log()`. + +##### Arguments + +- `name`: The name of the metric to customize. +- `step_metric`: The name of another metric to serve as the X-axis for this metric in automatically generated charts. +- `step_sync`: Automatically insert the last value of step_metric into `wandb.Run.log()` if it is not provided explicitly. Defaults to True if step_metric is specified. +- `hidden`: Hide this metric from automatic plots. +- `summary`: Specify aggregate metrics added to summary. Supported aggregations include "min", "max", "mean", "last", "first", "best", "copy" and "none". "none" prevents a summary from being generated. "best" is used together with the goal parameter, "best" is deprecated and should not be used, use "min" or "max" instead. "copy" is deprecated and should not be used. +- `goal`: Specify how to interpret the "best" summary type. Supported options are "minimize" and "maximize". "goal" is deprecated and should not be used, use "min" or "max" instead. +- `overwrite`: If false, then this call is merged with previous `define_metric` calls for the same metric by using their values for any unspecified parameters. If true, then unspecified parameters overwrite values specified by previous calls. + + + + +### method Run.display() + +```python +self, +height: 'int' = 420, +hidden: 'bool' = False +``` + +Display this run in Jupyter. + +##### Arguments + +- `height`: +- `hidden`: + + + + +### method Run.finish() + +```python +self, +exit_code: 'int | None' = None, +quiet: 'bool | None' = None +``` + +Finish a run and upload any remaining data. + +Marks the completion of a W&B run and ensures all data is synced to the server. +The run's final state is determined by its exit conditions and sync status. + +Run States: +- Running: Active run that is logging data and/or sending heartbeats. +- Crashed: Run that stopped sending heartbeats unexpectedly. +- Finished: Run completed successfully (`exit_code=0`) with all data synced. +- Failed: Run completed with errors (`exit_code!=0`). +- Killed: Run was forcibly stopped before it could finish. + +##### Arguments + +- `exit_code`: Integer indicating the run's exit status. Use 0 for success, any other value marks the run as failed. +- `quiet`: Deprecated. Configure logging verbosity using `wandb.Settings(quiet=...)`. + + + + +### method Run.finish_artifact() + +```python +self, +artifact_or_path: 'Artifact | str', +name: 'str | None' = None, +type: 'str | None' = None, +aliases: 'list[str] | None' = None, +distributed_id: 'str | None' = None +``` + +Finishes a non-finalized artifact as output of a run. + +Subsequent "upserts" with the same distributed ID will result in a new version. + +##### Arguments + +- `artifact_or_path`: A path to the contents of this artifact, + can be in the following forms: + - `/local/directory` + - `/local/directory/file.txt` + - `s3://bucket/path` + You can also pass an Artifact object created by calling + `wandb.Artifact`. +- `name`: An artifact name. May be prefixed with entity/project. + Valid names can be in the following forms: + - name:version + - name:alias + - digest + This will default to the basename of the path prepended with the current + run id if not specified. +- `type`: The type of artifact to log, examples include `dataset`, `model` +- `aliases`: Aliases to apply to this artifact, defaults to `["latest"]` +- `distributed_id`: Unique string that all distributed jobs share. If None, defaults to the run's group name. + + + + +### method Run.link_artifact() + +```python +self, +artifact: 'Artifact', +target_path: 'str', +aliases: 'list[str] | None' = None +``` + +Link the artifact to a collection. + +The term “link” refers to pointers that connect where W&B stores the +artifact and where the artifact is accessible in the registry. W&B +does not duplicate artifacts when you link an artifact to a collection. + +View linked artifacts in the Registry UI for the specified collection. + +##### Arguments + +- `artifact`: The artifact object to link to the collection. +- `target_path`: The path of the collection. Path consists of the prefix "wandb-registry-" along with the registry name and the collection name `wandb-registry-{REGISTRY_NAME}/{COLLECTION_NAME}`. +- `aliases`: Add one or more aliases to the linked artifact. The "latest" alias is automatically applied to the most recent artifact you link. + + + + +### method Run.link_model() + +```python +self, +path: 'StrPath', +registered_model_name: 'str', +name: 'str | None' = None, +aliases: 'list[str] | None' = None +``` + +Log a model artifact version and link it to a registered model in the model registry. + +Linked model versions are visible in the UI for the specified registered model. + +This method will: +- Check if 'name' model artifact has been logged. If so, use the artifact version that matches the files +located at 'path' or log a new version. Otherwise log files under 'path' as a new model artifact, 'name' +of type 'model'. +- Check if registered model with name 'registered_model_name' exists in the 'model-registry' project. +If not, create a new registered model with name 'registered_model_name'. +- Link version of model artifact 'name' to registered model, 'registered_model_name'. +- Attach aliases from 'aliases' list to the newly linked model artifact version. + +##### Arguments + +- `path`: (str) A path to the contents of this model, can be in the + following forms: + - `/local/directory` + - `/local/directory/file.txt` + - `s3://bucket/path` +- `registered_model_name`: The name of the registered model that the model is to be linked to. A registered model is a collection of model versions linked to the model registry, typically representing a team's specific ML Task. The entity that this registered model belongs to will be derived from the run. +- `name`: The name of the model artifact that files in 'path' will be logged to. This will default to the basename of the path prepended with the current run id if not specified. +- `aliases`: Aliases that will only be applied on this linked artifact inside the registered model. The alias "latest" will always be applied to the latest version of an artifact that is linked. + + +##### Raises + +- `AssertionError`: If registered_model_name is a path or if model artifact 'name' is of a type that does not contain the substring 'model'. +- `ValueError`: If name has invalid special characters. + + +### method Run.log() + +```python +self, +data: 'dict[str, Any]', +step: 'int | None' = None, +commit: 'bool | None' = None +``` + +Upload run data. + +Use `log` to log data from runs, such as scalars, images, video, +histograms, plots, and tables. See [Log objects and media](https://docs.wandb.ai/models/track/log) for +code snippets, best practices, and more. + +Basic usage: + +```python +import wandb + +with wandb.init() as run: + run.log({"train-loss": 0.5, "accuracy": 0.9}) +``` + +The previous code snippet saves the loss and accuracy to the run's +history and updates the summary values for these metrics. + +Visualize logged data in a workspace at [wandb.ai](https://wandb.ai), +or locally on a [self-hosted instance](https://docs.wandb.ai/platform/hosting) +of the W&B app, or export data to visualize and explore locally, such as in a +Jupyter notebook, with the [Public API](https://docs.wandb.ai/models/track/public-api-guide). + +Logged values don't have to be scalars. You can log any +[W&B supported Data Type](https://docs.wandb.ai/models/ref/python/data-types) +such as images, audio, video, and more. For example, you can use +`wandb.Table` to log structured data. See +[Log tables, visualize and query data](https://docs.wandb.ai/models/tables/tables-walkthrough) +tutorial for more details. + +W&B organizes metrics with a forward slash (`/`) in their name +into sections named using the text before the final slash. For example, +the following results in two sections named "train" and "validate": + +```python +with wandb.init() as run: + # Log metrics in the "train" section. + run.log( + { + "train/accuracy": 0.9, + "train/loss": 30, + "validate/accuracy": 0.8, + "validate/loss": 20, + } + ) +``` + +Only one level of nesting is supported; `run.log({"a/b/c": 1})` +produces a section named "a". + +`run.log()` is not intended to be called more than a few times per second. +For optimal performance, limit your logging to once every N iterations, +or collect data over multiple iterations and log it in a single step. + +By default, each call to `log` creates a new "step". +The step must always increase, and it is not possible to log +to a previous step. You can use any metric as the X axis in charts. +See [Custom log axes](https://docs.wandb.ai/models/track/log/customize-logging-axes) +for more details. + +In many cases, it is better to treat the W&B step like +you'd treat a timestamp rather than a training step. + +```python +with wandb.init() as run: + # Example: log an "epoch" metric for use as an X axis. + run.log({"epoch": 40, "train-loss": 0.5}) +``` + +It is possible to use multiple `wandb.Run.log()` invocations to log to +the same step with the `step` and `commit` parameters. +The following are all equivalent: + +```python +with wandb.init() as run: + # Normal usage: + run.log({"train-loss": 0.5, "accuracy": 0.8}) + run.log({"train-loss": 0.4, "accuracy": 0.9}) + + # Implicit step without auto-incrementing: + run.log({"train-loss": 0.5}, commit=False) + run.log({"accuracy": 0.8}) + run.log({"train-loss": 0.4}, commit=False) + run.log({"accuracy": 0.9}) + + # Explicit step: + run.log({"train-loss": 0.5}, step=current_step) + run.log({"accuracy": 0.8}, step=current_step) + current_step += 1 + run.log({"train-loss": 0.4}, step=current_step) + run.log({"accuracy": 0.9}, step=current_step, commit=True) +``` + +##### Arguments + +- `data`: A `dict` with `str` keys and values that are serializable Python objects including: `int`, `float` and `string`; any of the `wandb.data_types`; lists, tuples and NumPy arrays of serializable Python objects; other `dict`s of this structure. +- `step`: The step number to log. If `None`, then an implicit auto-incrementing step is used. See the notes in the description. +- `commit`: If true, finalize and upload the step. If false, then accumulate data for the step. See the notes in the description. If `step` is `None`, then the default is `commit=True`; otherwise, the default is `commit=False`. + + +##### Raises + +- `wandb.Error`: If called before `wandb.init()`. +- `ValueError`: If invalid data is passed. + + +##### Examples + +For more and more detailed examples, see +[our guides to logging](https://docs.wandb.ai/models/track/log). + +Basic usage + +```python +import wandb + +with wandb.init() as run: + run.log({"train-loss": 0.5, "accuracy": 0.9 +``` + +Incremental logging + +```python +import wandb + +with wandb.init() as run: + run.log({"loss": 0.2}, commit=False) + # Somewhere else when I'm ready to report this step: + run.log({"accuracy": 0.8}) +``` + +Histogram + +```python +import numpy as np +import wandb + +# sample gradients at random from normal distribution +gradients = np.random.randn(100, 100) +with wandb.init() as run: + run.log({"gradients": wandb.Histogram(gradients)}) +``` + +Image from NumPy + +```python +import numpy as np +import wandb + +with wandb.init() as run: + examples = [] + for i in range(3): + pixels = np.random.randint(low=0, high=256, size=(100, 100, 3)) + image = wandb.Image(pixels, caption=f"random field {i}") + examples.append(image) + run.log({"examples": examples}) +``` + +Image from PIL + +```python +import numpy as np +from PIL import Image as PILImage +import wandb + +with wandb.init() as run: + examples = [] + for i in range(3): + pixels = np.random.randint( + low=0, + high=256, + size=(100, 100, 3), + dtype=np.uint8, + ) + pil_image = PILImage.fromarray(pixels, mode="RGB") + image = wandb.Image(pil_image, caption=f"random field {i}") + examples.append(image) + run.log({"examples": examples}) +``` + +Video from NumPy + +```python +import numpy as np +import wandb + +with wandb.init() as run: + # axes are (time, channel, height, width) + frames = np.random.randint( + low=0, + high=256, + size=(10, 3, 100, 100), + dtype=np.uint8, + ) + run.log({"video": wandb.Video(frames, fps=4)}) +``` + +Matplotlib plot + +```python +from matplotlib import pyplot as plt +import numpy as np +import wandb + +with wandb.init() as run: + fig, ax = plt.subplots() + x = np.linspace(0, 10) + y = x * x + ax.plot(x, y) # plot y = x^2 + run.log({"chart": fig}) +``` + +PR Curve + +```python +import wandb + +with wandb.init() as run: + run.log({"pr": wandb.plot.pr_curve(y_test, y_probas, labels)}) +``` + +3D Object + +```python +import wandb + +with wandb.init() as run: + run.log( + { + "generated_samples": [ + wandb.Object3D(open("sample.obj")), + wandb.Object3D(open("sample.gltf")), + wandb.Object3D(open("sample.glb")), + ] + } + ) +``` + +### method Run.log_artifact() + +```python +self, +artifact_or_path: 'Artifact | StrPath', +name: 'str | None' = None, +type: 'str | None' = None, +aliases: 'list[str] | None' = None, +tags: 'list[str] | None' = None +``` + +Declare an artifact as an output of a run. + +##### Arguments + +- `artifact_or_path`: (str or Artifact) A path to the contents of this artifact, + can be in the following forms: + - `/local/directory` + - `/local/directory/file.txt` + - `s3://bucket/path` + You can also pass an Artifact object created by calling + `wandb.Artifact`. +- `name`: (str, optional) An artifact name. Valid names can be in the following forms: + - name:version + - name:alias + - digest + This will default to the basename of the path prepended with the current + run id if not specified. +- `type`: (str) The type of artifact to log, examples include `dataset`, `model` +- `aliases`: (list, optional) Aliases to apply to this artifact, defaults to `["latest"]` +- `tags`: (list, optional) Tags to apply to this artifact, if any. + + + + +### method Run.log_code() + +```python +self, +root: 'str | None' = '.', +name: 'str | None' = None, +include_fn: 'Callable[[str, str], bool] | Callable[[str], bool]' = _is_py_requirements_or_dockerfile, +exclude_fn: 'Callable[[str, str], bool] | Callable[[str], bool]' = exclude_wandb_fn +``` + +Save the current state of your code to a W&B Artifact. + +By default, it walks the current directory and logs all files that end with `.py`. + +##### Arguments + +- `root`: The relative (to `os.getcwd()`) or absolute path to recursively find code from. +- `name`: (str, optional) The name of our code artifact. By default, we'll name the artifact `source-$PROJECT_ID-$ENTRYPOINT_RELPATH`. There may be scenarios where you want many runs to share the same artifact. Specifying name allows you to achieve that. +- `include_fn`: A callable that accepts a file path and (optionally) root path and returns True when it should be included and False otherwise. This defaults to `lambda path, root: path.endswith(".py")`. +- `exclude_fn`: A callable that accepts a file path and (optionally) root path and returns `True` when it should be excluded and `False` otherwise. This defaults to a function that excludes all files within `/.wandb/` and `/wandb/` directories. + + + + +##### Examples + +Basic usage + +```python +import wandb + +with wandb.init() as run: + run.log_code() +``` + +Advanced usage + +```python +import wandb + +with wandb.init() as run: + run.log_code( + root="../", + include_fn=lambda path: path.endswith(".py") or path.endswith(".ipynb"), + exclude_fn=lambda path, root: os.path.relpath(path, root).startswith( + "cache/" + ), + ) +``` + +### method Run.log_model() + +```python +self, +path: 'StrPath', +name: 'str | None' = None, +aliases: 'list[str] | None' = None +``` + +Logs a model artifact containing the contents inside the 'path' to a run and marks it as an output to this run. + +The name of model artifact can only contain alphanumeric characters, +underscores, and hyphens. + +##### Arguments + +- `path`: (str) A path to the contents of this model, + can be in the following forms: + - `/local/directory` + - `/local/directory/file.txt` + - `s3://bucket/path` +- `name`: A name to assign to the model artifact that the file contents will be added to. This will default to the basename of the path prepended with the current run id if not specified. +- `aliases`: Aliases to apply to the created model artifact, defaults to `["latest"]` + + +##### Raises + +- `ValueError`: If name has invalid special characters. + + +### method Run.mark_preempting() + +```python +self +``` + +Mark this run as preempting. + +Also tells the internal process to immediately report this to server. + + + + + +### method Run.pin_config_keys() + +```python +self, +keys: 'Sequence[str]' = () +``` + +Pin config keys to display in the References section on Run Overview. + +Pinned keys appear prominently above Notes on the Run Overview page. +String values are rendered as markdown; non-strings are rendered as +plain text. Calling this again replaces the previously pinned list. + +##### Arguments + +- `keys`: Config key names to pin, matching keys set via ``run.config``. These are exact key strings (dots and slashes are treated literally, not as path separators). Order is preserved and determines display order. + + + + +### method Run.restore() + +```python +self, +name: 'str', +run_path: 'str | None' = None, +replace: 'bool' = False, +root: 'str | None' = None +``` + +Download the specified file from cloud storage. + +File is placed into the current directory or run directory. +By default, will only download the file if it doesn't already exist. + +##### Arguments + +- `name`: The name of the file. +- `run_path`: Optional path to a run to pull files from, i.e. `username/project_name/run_id` if wandb.init has not been called, this is required. +- `replace`: Whether to download the file even if it already exists locally +- `root`: The directory to download the file to. Defaults to the current directory or the run directory if wandb.init was called. + + +##### Raises + +- `CommError`: If W&B can't connect to the W&B backend. +- `ValueError`: If the file is not found or can't find run_path. + + +### method Run.save() + +```python +self, +glob_str: 'str | os.PathLike', +base_path: 'str | os.PathLike | None' = None, +policy: 'PolicyName' = 'live', +glob: 'bool' = True +``` + +Sync one or more files to W&B. + +Relative paths are relative to the current working directory. + +A Unix glob, such as "myfiles/*", is expanded at the time `save` is +called regardless of the `policy`. In particular, new files are not +picked up automatically. + +`glob_str` is expanded using Python's `glob` module: see +https://docs.python.org/3/library/glob.html for the exact syntax and +behavior. Notably, the characters `*`, `?`, and `[]` are treated as +glob metacharacters, not literal characters, even if they appear in a +real filename (e.g. "myfile[1].txt"). If your file's name contains +any of these characters and you want to match it literally rather +than as a pattern, either escape it yourself with `glob.escape()` +before calling `save`, or pass `glob=False` to disable pattern +expansion entirely and treat `glob_str` as a literal path. + +A `base_path` may be provided to control the directory structure of +uploaded files. It should be a prefix of `glob_str`, and the directory +structure beneath it is preserved. + +When given an absolute path or glob and no `base_path`, one +directory level is preserved as in the example above. + +Files are automatically deduplicated: calling `save()` multiple times +on the same file without modifications will not re-upload it. + +##### Arguments + +- `glob_str`: A relative or absolute path or Unix glob. +- `base_path`: A path to use to infer a directory structure; see examples. +- `policy`: One of `live`, `now`, or `end`. + - live: upload the file as it changes, overwriting the previous version + - now: upload the file once now + - end: upload file when the run ends +- `glob`: Whether to treat `glob_str` as a glob pattern. Defaults to `True` for backward compatibility. Set to `False` to treat `glob_str` as a literal path, e.g. when its name contains glob metacharacters like `[`, `]`, `*`, or `?` that you don't want interpreted as a pattern. + + + + +### method Run.status() + +```python +self +``` + +Get sync info from the internal backend, about the current run's sync status. + + + + + +### method Run.unwatch() + +```python +self, +models: 'torch.nn.Module | Sequence[torch.nn.Module] | None' = None +``` + +Remove pytorch model topology, gradient and parameter hooks. + +##### Arguments + +- `models`: Optional list of pytorch models that have had watch called on them. + + + + +### method Run.upsert_artifact() + +```python +self, +artifact_or_path: 'Artifact | str', +name: 'str | None' = None, +type: 'str | None' = None, +aliases: 'list[str] | None' = None, +distributed_id: 'str | None' = None +``` + +Declare (or append to) a non-finalized artifact as output of a run. + +Note that you must call run.finish_artifact() to finalize the artifact. +This is useful when distributed jobs need to all contribute to the same artifact. + +##### Arguments + +- `artifact_or_path`: A path to the contents of this artifact, + can be in the following forms: + - `/local/directory` + - `/local/directory/file.txt` + - `s3://bucket/path` +- `name`: An artifact name. May be prefixed with "entity/project". Defaults + to the basename of the path prepended with the current run ID + if not specified. Valid names can be in the following forms: + - name:version + - name:alias + - digest +- `type`: The type of artifact to log. Common examples include `dataset`, `model`. +- `aliases`: Aliases to apply to this artifact, defaults to `["latest"]`. +- `distributed_id`: Unique string that all distributed jobs share. If None, defaults to the run's group name. + + + + +### method Run.use_artifact() + +```python +self, +artifact_or_name: 'str | Artifact', +type: 'str | None' = None, +aliases: 'list[str] | None' = None, +use_as: 'str | None' = None +``` + +Declare an artifact as an input to a run. + +Call `download` or `file` on the returned object to get the contents locally. + +##### Arguments + +- `artifact_or_name`: The name of the artifact to use. May be prefixed + with the name of the project the artifact was logged to + ("entity" or "entity/project"). If no + entity is specified in the name, the Run or API setting's entity is used. + Valid names can be in the following forms + - name:version + - name:alias +- `type`: The type of artifact to use. +- `aliases`: Aliases to apply to this artifact +- `use_as`: This argument is deprecated and does nothing. + + + + +##### Examples + +```python +import wandb + +run = wandb.init(project="") + +# Use an artifact by name and alias +artifact_a = run.use_artifact(artifact_or_name=":") + +# Use an artifact by name and version +artifact_b = run.use_artifact(artifact_or_name=":v") + +# Use an artifact by entity/project/name:alias +artifact_c = run.use_artifact( + artifact_or_name="//:" +) + +# Use an artifact by entity/project/name:version +artifact_d = run.use_artifact( + artifact_or_name="//:v" +) + +# Explicitly finish the run since a context manager is not used. +run.finish() +``` + +### method Run.use_model() + +```python +self, +name: 'str' +``` + +Download the files logged in a model artifact 'name'. + +##### Arguments + +- `name`: A model artifact name. 'name' must match the name of an existing logged + model artifact. May be prefixed with `entity/project/`. Valid names + can be in the following forms + - model_artifact_name:version + - model_artifact_name:alias + + +##### Raises + +- `AssertionError`: If model artifact 'name' is of a type that does not contain the substring 'model'. + + +### method Run.watch() + +```python +self, +models: 'torch.nn.Module | Sequence[torch.nn.Module]', +criterion: 'torch.F | None' = None, +log: "Literal['gradients', 'parameters', 'all'] | None" = 'gradients', +log_freq: 'int' = 1000, +idx: 'int | None' = None, +log_graph: 'bool' = False +``` + +Hook into given PyTorch model to monitor gradients and the model's computational graph. + +This function can track parameters, gradients, or both during training. + +##### Arguments + +- `models`: A single model or a sequence of models to be monitored. +- `criterion`: The loss function being optimized (optional). +- `log`: Specifies whether to log "gradients", "parameters", or "all". Set to None to disable logging. (default="gradients"). +- `log_freq`: Frequency (in batches) to log gradients and parameters. (default=1000) +- `idx`: Index used when tracking multiple models with `wandb.watch`. (default=None) +- `log_graph`: Whether to log the model's computational graph. (default=False) + + +##### Raises + +- `ValueError`: If `wandb.init()` has not been called or if any of the models are not instances of `torch.nn.Module`. + + +### method Run.write_logs() + +```python +self, +text: 'str' +``` + +Write text to the run's Logs tab. + +Use `write_logs` to directly write text to the Logs tab instead of +relying on automatic stdout/stderr capture. Calls after the run has +finished are silently ignored. + +Consider using the `capture_loggers` setting which integrates with +Python's `logging` module. + +##### Arguments + +- `text`: The text to write. A trailing newline is added if not present. + + + + + + diff --git a/models/ref/python/experiments/run/run-properties.mdx b/models/ref/python/experiments/run/run-properties.mdx new file mode 100644 index 0000000000..27dc19c752 --- /dev/null +++ b/models/ref/python/experiments/run/run-properties.mdx @@ -0,0 +1,139 @@ +--- +title: Run properties +sidebarTitle: Properties +page_kind: class-properties +parent_slug: run +kind: class +namespace: wandb.sdk.wandb_run +--- + +## class wandb.Run + + + +### property config + +Config object associated with this run. + +### property config_static + +Static config object associated with this run. + +### property dir + +The directory where files associated with the run are saved. + +### property disabled + +True if the run is disabled, False otherwise. + +### property entity + +The name of the W&B entity associated with the run. + +Entity can be a username or the name of a team or organization. + +### property group + +Returns the name of the group associated with this run. + +Grouping runs together allows related experiments to be organized and +visualized collectively in the W&B UI. This is especially useful for +scenarios such as distributed training or cross-validation, where +multiple runs should be viewed and managed as a unified experiment. + +In shared mode, where all processes share the same run object, +setting a group is usually unnecessary, since there is only one +run and no grouping is required. + +### property id + +Identifier for this run. + +### property job_type + +Name of the job type associated with the run. + +View a run's job type in the run's Overview page in the W&B App. + +You can use this to categorize runs by their job type, such as +"training", "evaluation", or "inference". This is useful for organizing +and filtering runs in the W&B UI, especially when you have multiple +runs with different job types in the same project. For more +information, see [Organize runs](https://docs.wandb.ai/models/runs#organize-runs). + +### property name + +Display name of the run. + +Display names are not guaranteed to be unique and may be descriptive. +By default, they are randomly generated. + +### property notes + +Notes associated with the run, if there are any. + +Notes can be a multiline string and can also use markdown and latex +equations inside `$$`, like `$x + 3$`. + +### property offline + +True if the run is offline, False otherwise. + +### property path + +Path to the run. + +Run paths include entity, project, and run ID, in the format +`entity/project/run_id`. + +### property project + +Name of the W&B project associated with the run. + +### property project_url + +URL of the W&B project associated with the run, if there is one. + +Offline runs do not have a project URL. + +### property resumed + +True if the run was resumed, False otherwise. + +### property settings + +A frozen copy of run's Settings object. + +### property start_time + +Unix timestamp (in seconds) of when the run started. + +### property step + +The W&B step of the next `log()` call. + +Raises an error in mode="shared" runs. + +### property sweep_id + +Identifier for the sweep associated with the run, if there is one. + +### property sweep_url + +URL of the sweep associated with the run, if there is one. + +Offline runs do not have a sweep URL. + +### property tags + +Tags associated with the run, if there are any. + +### property url + +The url for the W&B run, if there is one. + +Offline runs will not have a url. + + + diff --git a/models/ref/python/experiments/settings.mdx b/models/ref/python/experiments/settings.mdx index 4d4244d534..428d16add4 100644 --- a/models/ref/python/experiments/settings.mdx +++ b/models/ref/python/experiments/settings.mdx @@ -147,7 +147,7 @@ x_service_transport: str | None = None, x_service_wait: float = 30.0, x_skip_transaction_log: bool = False, x_start_time: float | None = None, -x_stats_pid: int = 3570, +x_stats_pid: int = 26314, x_stats_sampling_interval: float = 15.0, x_stats_neuron_monitor_config_path: str | None = None, x_stats_dcgm_exporter: str | None = None, @@ -533,143 +533,3 @@ precedence: -## Properties - -### property app_url - -The URL for the W&B UI, usually https://wandb.ai. - -This is different from `base_url` (like https://api.wandb.ai) which -is used to access W&B APIs programmatically. - -### property colab_url - -The URL to the Colab notebook, if running in Colab. - -### property deployment - - - -### property files_dir - -Absolute path to the local directory where the run's files are stored. - -### property is_local - - - -### property log_dir - -The directory for storing log files. - -### property log_internal - -The path to the file to use for internal logs. - -### property log_symlink_internal - -The path to the symlink to the internal log file of the most recent run. - -### property log_symlink_user - -The path to the symlink to the user-process log file of the most recent run. - -### property log_user - -The path to the file to use for user-process logs. - -### property project_url - -The W&B URL where the project can be viewed. - -### property resume_fname - -The path to the resume file. - -### property run_mode - -The mode of the run. Can be either "run" or "offline-run". - -### property run_url - -The W&B URL where the run can be viewed. - -### property settings_workspace - -The path to the workspace settings file. - -### property sweep_url - -The W&B URL where the sweep can be viewed. - -### property sync_dir - -The directory for storing the run's files. - -### property sync_file - -Path to the append-only binary transaction log file. - -### property sync_symlink_latest - -Path to the symlink to the most recent run's transaction log file. - -### property timespec - -The time specification for the run. - -### property wandb_dir - -Full path to the wandb directory. - - - -## Methods - -### method Settings.validate_anonymous() - -```python -value: 'object' -``` - - - -##### Arguments - -- `value`: - - - - -### method Settings.validate_x_extra_http_headers() - -```python -(value) -``` - - - -##### Arguments - -- `value`: - - - - -### method Settings.validate_x_stats_coreweave_metadata_base_url() - -```python -(value) -``` - - - -##### Arguments - -- `value`: - - - - - - diff --git a/models/ref/python/experiments/settings/settings-methods.mdx b/models/ref/python/experiments/settings/settings-methods.mdx new file mode 100644 index 0000000000..b9c8261e92 --- /dev/null +++ b/models/ref/python/experiments/settings/settings-methods.mdx @@ -0,0 +1,60 @@ +--- +title: Settings methods +sidebarTitle: Methods +page_kind: class-methods +parent_slug: settings +kind: class +namespace: wandb.sdk.wandb_settings +--- + +## class wandb.Settings + + + +### method Settings.validate_anonymous() + +```python +value: 'object' +``` + + + +##### Arguments + +- `value`: + + + + +### method Settings.validate_x_extra_http_headers() + +```python +(value) +``` + + + +##### Arguments + +- `value`: + + + + +### method Settings.validate_x_stats_coreweave_metadata_base_url() + +```python +(value) +``` + + + +##### Arguments + +- `value`: + + + + + + diff --git a/models/ref/python/experiments/settings/settings-properties.mdx b/models/ref/python/experiments/settings/settings-properties.mdx new file mode 100644 index 0000000000..650c285ea9 --- /dev/null +++ b/models/ref/python/experiments/settings/settings-properties.mdx @@ -0,0 +1,102 @@ +--- +title: Settings properties +sidebarTitle: Properties +page_kind: class-properties +parent_slug: settings +kind: class +namespace: wandb.sdk.wandb_settings +--- + +## class wandb.Settings + + + +### property app_url + +The URL for the W&B UI, usually https://wandb.ai. + +This is different from `base_url` (like https://api.wandb.ai) which +is used to access W&B APIs programmatically. + +### property colab_url + +The URL to the Colab notebook, if running in Colab. + +### property deployment + + + +### property files_dir + +Absolute path to the local directory where the run's files are stored. + +### property is_local + + + +### property log_dir + +The directory for storing log files. + +### property log_internal + +The path to the file to use for internal logs. + +### property log_symlink_internal + +The path to the symlink to the internal log file of the most recent run. + +### property log_symlink_user + +The path to the symlink to the user-process log file of the most recent run. + +### property log_user + +The path to the file to use for user-process logs. + +### property project_url + +The W&B URL where the project can be viewed. + +### property resume_fname + +The path to the resume file. + +### property run_mode + +The mode of the run. Can be either "run" or "offline-run". + +### property run_url + +The W&B URL where the run can be viewed. + +### property settings_workspace + +The path to the workspace settings file. + +### property sweep_url + +The W&B URL where the sweep can be viewed. + +### property sync_dir + +The directory for storing the run's files. + +### property sync_file + +Path to the append-only binary transaction log file. + +### property sync_symlink_latest + +Path to the symlink to the most recent run's transaction log file. + +### property timespec + +The time specification for the run. + +### property wandb_dir + +Full path to the wandb directory. + + + diff --git a/models/ref/python/functions/login.mdx b/models/ref/python/functions/login.mdx index 19cdd64f2a..11f2887ba8 100644 --- a/models/ref/python/functions/login.mdx +++ b/models/ref/python/functions/login.mdx @@ -7,7 +7,7 @@ namespace: wandb.sdk.wandb_login import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; - + diff --git a/models/ref/python/public-api/api.mdx b/models/ref/python/public-api/api.mdx index ed79767573..22ebb5da32 100644 --- a/models/ref/python/public-api/api.mdx +++ b/models/ref/python/public-api/api.mdx @@ -41,1386 +41,3 @@ import wandb wandb.Api() ``` -## Properties - -### property default_entity - -Returns the default W&B entity. - -### property user_agent - -Returns W&B public user agent. - -### property viewer - -Returns the viewer object. - - - -## Methods - -### method Api.artifact() - -```python -(self, -name: 'str', -type: 'str | None' = None) -``` - -Returns a single artifact. - -##### Arguments - -- `name`: The artifact's name. The name of an artifact resembles a filepath that consists, at a minimum, the name of the project the artifact was logged to, the name of the artifact, and the artifact's version or alias. Optionally append the entity that logged the artifact as a prefix followed by a forward slash. If no entity is specified in the name, the Run or API setting's entity is used. -- `type`: The type of artifact to fetch. - - -##### Raises - -- `ValueError`: If the artifact name is not specified. -- `ValueError`: If the artifact type is specified but does not match the type of the fetched artifact. - - -##### Examples - -In the following code snippets "entity", "project", "artifact", -"version", and "alias" are placeholders for your W&B entity, name -of the project the artifact is in, the name of the artifact, -and artifact's version, respectively. - -```python -import wandb - -# Specify the project, artifact's name, and the artifact's alias -wandb.Api().artifact(name="project/artifact:alias") - -# Specify the project, artifact's name, and a specific artifact version -wandb.Api().artifact(name="project/artifact:version") - -# Specify the entity, project, artifact's name, and the artifact's alias -wandb.Api().artifact(name="entity/project/artifact:alias") - -# Specify the entity, project, artifact's name, and a specific artifact version -wandb.Api().artifact(name="entity/project/artifact:version") -``` - -### method Api.artifact_collection() - -```python -self, -type_name: 'str', -name: 'str' -``` - -Returns a single artifact collection by type. - -You can use the returned `ArtifactCollection` object to retrieve -information about specific artifacts in that collection, and more. - -##### Arguments - -- `type_name`: The type of artifact collection to fetch. -- `name`: An artifact collection name. Optionally append the entity that logged the artifact as a prefix followed by a forward slash. - - - - -##### Examples - -In the proceeding code snippet "type", "entity", "project", and -"artifact_name" are placeholders for the collection type, your W&B -entity, name of the project the artifact is in, and the name of -the artifact, respectively. - -```python -import wandb - -collections = wandb.Api().artifact_collection( - type_name="type", name="entity/project/artifact_name" -) - -# Get the first artifact in the collection -artifact_example = collections.artifacts()[0] - -# Download the contents of the artifact to the specified root directory. -artifact_example.download() -``` - -### method Api.artifact_collection_exists() - -```python -self, -name: 'str', -type: 'str' -``` - -Whether an artifact collection exists within a specified project and entity. - -##### Arguments - -- `name`: An artifact collection name. Optionally append the entity that logged the artifact as a prefix followed by a forward slash. If entity or project is not specified, infer the collection from the override params if they exist. Otherwise, entity is pulled from the user settings and project will default to "uncategorized". -- `type`: The type of artifact collection. - - - - -##### Examples - -In the proceeding code snippet "type", and "collection_name" refer to the type -of the artifact collection and the name of the collection, respectively. - -```python -import wandb - -wandb.Api.artifact_collection_exists(type="type", name="collection_name") -``` - -### method Api.artifact_collections() - -```python -self, -project_name: 'str', -type_name: 'str', -order: 'str | None' = None, -per_page: 'int' = 50, -start: 'str | None' = None -``` - -Returns a collection of matching artifact collections. - -##### Arguments - -- `project_name`: The name of the project to filter on. -- `type_name`: The name of the artifact type to filter on. -- `order`: Optional string to specify the order of the results. If prefixed with '+', sorts ascending (default). If prefixed with '-', sorts descending. -- `per_page`: Sets the page size for query pagination. Usually there is no reason to change this. -- `start`: Pagination cursor for resuming a past query, captured from a previous paginator's `.cursor` attribute. - - - - -### method Api.artifact_exists() - -```python -self, -name: 'str', -type: 'str | None' = None -``` - -Whether an artifact version exists within the specified project and entity. - -##### Arguments - -- `name`: The name of artifact. Add the artifact's entity and project as a prefix. Append the version or the alias of the artifact with a colon. If the entity or project is not specified, W&B uses override parameters if populated. Otherwise, the entity is pulled from the user settings and the project is set to "Uncategorized". -- `type`: The type of artifact. - - - - -##### Examples - -In the proceeding code snippets "entity", "project", "artifact", -"version", and "alias" are placeholders for your W&B entity, name of -the project the artifact is in, the name of the artifact, and -artifact's version, respectively. - -```python -import wandb - -wandb.Api().artifact_exists("entity/project/artifact:version") -wandb.Api().artifact_exists("entity/project/artifact:alias") -``` - -### method Api.artifact_type() - -```python -self, -type_name: 'str', -project: 'str | None' = None -``` - -Returns the matching `ArtifactType`. - -##### Arguments - -- `type_name`: The name of the artifact type to retrieve. -- `project`: If given, a project name or path to filter on. - - - - -### method Api.artifact_types() - -```python -self, -project: 'str | None' = None, -start: 'str | None' = None -``` - -Returns a collection of matching artifact types. - -##### Arguments - -- `project`: The project name or path to filter on. -- `start`: Pagination cursor for resuming a past query, captured from a previous paginator's `.cursor` attribute. - - - - -### method Api.artifact_versions() - -```python -(self, type_name, name, per_page=50) -``` - -Deprecated. Use `Api.artifacts(type_name, name)` method instead. - -##### Arguments - -- `type_name`: -- `name`: -- `per_page`: - - - - -### method Api.artifacts() - -```python -self, -type_name: 'str', -name: 'str', -order: 'str | None' = None, -per_page: 'int' = 50, -tags: 'list[str] | None' = None, -start: 'str | None' = None -``` - -Return an `Artifacts` collection. - -##### Arguments - -- `type_name`: The type of artifacts to fetch. -- `name`: The artifact's collection name. Optionally append the entity that logged the artifact as a prefix followed by a forward slash. -- `order`: Optional string to specify the order of the results. If prefixed with '+', sorts ascending (default). If prefixed with '-', sorts descending. -- `per_page`: Sets the page size for query pagination. Usually there is no reason to change this. -- `tags`: Only return artifacts with all of these tags. -- `start`: Pagination cursor for resuming a past query, captured from a previous paginator's `.cursor` attribute. - - - - -##### Examples - -In the proceeding code snippet, "type", "entity", "project", and -"artifact_name" are placeholders for the artifact type, W&B entity, -name of the project the artifact was logged to, -and the name of the artifact, respectively. - -```python -import wandb - -wandb.Api().artifacts(type_name="type", name="entity/project/artifact_name") -``` - -Pause iteration and resume later from the same position by saving -the paginator's `.cursor` and passing it as `start=`: - -```python -from itertools import islice - -import wandb - -api = wandb.Api() - -# Consume the first page of results, then save the cursor. -page_size = 10 -artifacts = api.artifacts( - type_name="type", - name="entity/project/artifact_name", - per_page=page_size, -) -first_page = list(islice(artifacts, page_size)) - -saved_cursor = artifacts.cursor - -# Later (e.g. in a new process), resume iteration from the saved cursor. -remaining_artifacts = api.artifacts( - type_name="type", - name="entity/project/artifact_name", - per_page=page_size, - start=saved_cursor, -) -``` - -### method Api.automation() - -```python -self, -name: 'str', *, -entity: 'str | None' = None -``` - -Returns the only Automation matching the parameters. - -##### Arguments - -- `name`: The name of the automation to fetch. -- `entity`: The entity to fetch the automation for. - - -##### Raises - -- `ValueError`: If zero or multiple Automations match the search criteria. - - -##### Examples - -Get an existing automation named "my-automation": - -```python -import wandb - -api = wandb.Api() -automation = api.automation(name="my-automation") -``` - -Get an existing automation named "other-automation", from the entity "my-team": - -```python -automation = api.automation(name="other-automation", entity="my-team") -``` - -### method Api.automations() - -```python -self, -entity: 'str | None' = None, *, -name: 'str | None' = None, -per_page: 'int' = 50, -start: 'str | None' = None -``` - -Returns an iterator over all Automations that match the given parameters. - -If no parameters are provided, the returned iterator will contain all -Automations that the user has access to. - -##### Arguments - -- `entity`: The entity to fetch the automations for. -- `name`: The name of the automation to fetch. -- `per_page`: The number of automations to fetch per page. Defaults to 50. Usually there is no reason to change this. -- `start`: Pagination cursor for resuming a past query, captured from a previous paginator's `.cursor` attribute. - - - - -##### Examples - -Fetch all existing automations for the entity "my-team": - -```python -import wandb - -api = wandb.Api() -automations = api.automations(entity="my-team") -``` - -### method Api.create_automation() - -```python -self, -obj: 'NewAutomation', *, -fetch_existing: 'bool' = False, **kwargs: 'Unpack[WriteAutomationsKwargs]' -``` - -Create a new Automation. - -##### Arguments - -- `obj`: The automation to create. -- `fetch_existing`: If True, and a conflicting automation already exists, attempt to fetch the existing automation instead of raising an error. -- `kwargs`: - - - - -##### Examples - -Create a new automation named "my-automation" that sends a Slack notification -when a run within a specific project logs a metric exceeding a custom threshold: - -```python -import wandb -from wandb.automations import OnRunMetric, RunEvent, SendNotification - -api = wandb.Api() - -project = api.project("my-project", entity="my-team") - -# Use the first Slack integration for the team -slack_hook = next(api.slack_integrations(entity="my-team")) - -event = OnRunMetric( - scope=project, - filter=RunEvent.metric("custom-metric") > 10, -) -action = SendNotification.from_integration(slack_hook) - -automation = api.create_automation( - event >> action, - name="my-automation", - description="Send a Slack message whenever 'custom-metric' exceeds 10.", -) -``` - -### method Api.create_custom_chart() - -```python -self, -entity: 'str', -name: 'str', -display_name: 'str', -spec_type: "Literal['vega2']", -access: "Literal['private', 'public']", -spec: 'str | dict' -``` - -Create a custom chart preset and return its id. - -##### Arguments - -- `entity`: The entity (user or team) that owns the chart -- `name`: Unique identifier for the chart preset -- `display_name`: Human-readable name shown in the UI -- `spec_type`: Type of specification. Must be "vega2" for Vega-Lite v2 specifications. -- `access`: Access level for the chart: - - "private": Chart is only accessible to the entity that created it - - "public": Chart is publicly accessible -- `spec`: The Vega/Vega-Lite specification as a dictionary or JSON string - - -##### Raises - -- `wandb.Error`: If chart creation fails -- `UnsupportedError`: If the server doesn't support custom charts - - -##### Examples - -```python - import wandb - - api = wandb.Api() - - # Define a simple bar chart specification - vega_spec = { - "$schema": "https://vega.github.io/schema/vega-lite/v6.json", - "mark": "bar", - "data": {"name": "wandb"}, - "encoding": { - "x": {"field": "${field:x}", "type": "ordinal"}, - "y": {"field": "${field:y}", "type": "quantitative"}, - }, - } - - # Create the custom chart - chart_id = api.create_custom_chart( - entity="my-team", - name="my-bar-chart", - display_name="My Custom Bar Chart", - spec_type="vega2", - access="private", - spec=vega_spec, - ) - - # Use with wandb.plot_table() - chart = wandb.plot_table( - vega_spec_name=chart_id, - data_table=my_table, - fields={"x": "category", "y": "value"}, - ) - ``` - -### method Api.create_project() - -```python -self, -name: 'str', -entity: 'str' -``` - -Create a new project. - -##### Arguments - -- `name`: The name of the new project. -- `entity`: The entity of the new project. - - - - -### method Api.create_registry() - -```python -self, -name: 'str', -visibility: "Literal['organization', 'restricted']", -organization: 'str | None' = None, -description: 'str | None' = None, -artifact_types: 'list[str] | None' = None -``` - -Create a new registry. - -##### Arguments - -- `name`: The name of the registry. Name must be unique within the organization. -- `visibility`: The visibility of the registry. organization: Anyone in the organization can view this registry. You can edit their roles later from the settings in the UI. restricted: Only invited members via the UI can access this registry. Public sharing is disabled. -- `organization`: The organization of the registry. If no organization is set in the settings, the organization will be fetched from the entity if the entity only belongs to one organization. -- `description`: The description of the registry. -- `artifact_types`: The accepted artifact types of the registry. A type is no more than 128 characters and do not include characters `/` or `:`. If not specified, all types are accepted. Allowed types added to the registry cannot be removed later. - - - - -##### Examples - -```python -import wandb - -api = wandb.Api() -registry = api.create_registry( - name="my-registry", - visibility="restricted", - organization="my-org", - description="This is a test registry", - artifact_types=["model"], -) -``` - -### method Api.create_run() - -```python -self, *, -run_id: 'str | None' = None, -project: 'str | None' = None, -entity: 'str | None' = None -``` - -Create a new run. - -##### Arguments - -- `run_id`: The ID to assign to the run. If not specified, W&B creates a random ID. -- `project`: The project where to log the run to. If no project is specified, log the run to a project called "Uncategorized". -- `entity`: The entity that owns the project. If no entity is specified, log the run to the default entity. - - - - -### method Api.create_run_queue() - -```python -self, -name: 'str', -type: 'public.RunQueueResourceType', -entity: 'str | None' = None, -prioritization_mode: 'public.RunQueuePrioritizationMode | None' = None, -config: 'dict | None' = None, -template_variables: 'dict | None' = None -``` - -Create a new run queue in W&B Launch. - -##### Arguments - -- `name`: Name of the queue to create -- `type`: Type of resource to be used for the queue. One of "local-container", "local-process", "kubernetes","sagemaker", or "gcp-vertex". -- `entity`: Name of the entity to create the queue. If `None`, use the configured or default entity. -- `prioritization_mode`: Version of prioritization to use. Either "V0" or `None`. -- `config`: Default resource configuration to be used for the queue. Use handlebars (eg. `{{var}}`) to specify template variables. -- `template_variables`: A dictionary of template variable schemas to use with the config. - - - - -### method Api.create_team() - -```python -self, -team: 'str', -admin_username: 'str | None' = None -``` - -Create a new team. - -For W&B Multi-tenant Cloud users, set the Default API organization in -your user settings in the W&B UI before calling `create_team()`. -This setting determines the organization the new team will belong to. - -##### Arguments - -- `team`: The name of the team. -- `admin_username`: Username of the admin user of the team. Defaults to the current user. - - - - -### method Api.create_user() - -```python -self, -email: 'str', -admin: 'bool | None' = False -``` - -Create a new user. - -##### Arguments - -- `email`: The email address of the user. -- `admin`: Set user as a global instance administrator. - - - - -### method Api.delete_automation() - -```python -self, -obj: 'Automation | str' -``` - -Delete an automation. - -##### Arguments - -- `obj`: The automation to delete, or its ID. - - - - -### method Api.flush() - -```python -(self) -``` - -Flush the local cache. - -The api object keeps a local cache of runs, so if the state of the run -may change while executing your script you must clear the local cache -with `api.flush()` to get the latest values associated with the run. - - - - - -### method Api.from_path() - -```python -(self, -path: 'str') -``` - -Return a run, sweep, project or report from a path. - -##### Arguments - -- `path`: The path to the project, run, sweep or report - - - - -##### Examples - -In the proceeding code snippets "project", "team", "run_id", "sweep_id", -and "report_name" are placeholders for the project, team, run ID, -sweep ID, and the name of a specific report, respectively. - -```python -import wandb - -api = wandb.Api() - -project = api.from_path("project") -team_project = api.from_path("team/project") -run = api.from_path("team/project/runs/run_id") -sweep = api.from_path("team/project/sweeps/sweep_id") -report = api.from_path("team/project/reports/report_name") -``` - -### method Api.integrations() - -```python -self, -entity: 'str | None' = None, *, -per_page: 'int' = 50, -start: 'str | None' = None -``` - -Return an iterator of all integrations for an entity. - -##### Arguments - -- `entity`: The entity (e.g. team name) for which to fetch integrations. If not provided, the user's default entity will be used. -- `per_page`: Number of integrations to fetch per page. Defaults to 50. Usually there is no reason to change this. -- `start`: - - - - -### method Api.job() - -```python -self, -name: 'str | None', -path: 'str | None' = None -``` - -Return a `Job` object. - -##### Arguments - -- `name`: The name of the job. -- `path`: The root path to download the job artifact. - - - - -### method Api.list_jobs() - -```python -self, -entity: 'str', -project: 'str' -``` - -Return a list of jobs, if any, for the given entity and project. - -##### Arguments - -- `entity`: The entity for the listed jobs. -- `project`: The project for the listed jobs. - - - - -### method Api.organization() - -```python -self, -name: 'str | None' = None -``` - -Return the matching `Organization`. - -##### Arguments - -- `name`: The name of the organization. If omitted, this method will attempt to infer and return the current default organization. - - - - -### method Api.project() - -```python -self, -name: 'str', -entity: 'str | None' = None -``` - -Return the `Project` with the given name (and entity, if given). - -##### Arguments - -- `name`: The project name. -- `entity`: Name of the entity requested. If None, will fall back to the default entity passed to `Api`. If no default entity, will raise a `ValueError`. - - - - -### method Api.projects() - -```python -self, -entity: 'str | None' = None, -per_page: 'int' = 200 -``` - -Get projects for a given entity. - -##### Arguments - -- `entity`: Name of the entity requested. If None, will fall back to the default entity passed to `Api`. If no default entity, will raise a `ValueError`. -- `per_page`: Sets the page size for query pagination. Usually there is no reason to change this. - - - - -### method Api.queued_run() - -```python -(self, -entity: 'str', -project: 'str', -queue_name: 'str', -run_queue_item_id: 'str', project_queue=None, priority=None) -``` - -Return a single queued run based on the path. - -Parses paths of the form `entity/project/queue_id/run_queue_item_id`. - -##### Arguments - -- `entity`: -- `project`: -- `queue_name`: -- `run_queue_item_id`: -- `project_queue`: -- `priority`: - - - - -### method Api.registries() - -```python -self, -organization: 'str | None' = None, -filter: 'dict[str, Any] | None' = None, -order: 'str | None' = None, -per_page: 'int' = 100, -start: 'str | None' = None -``` - -Returns a lazy iterator of `Registry` objects. - -Use the iterator to search and filter registries, collections, -or artifact versions across your organization's registry. - -##### Arguments - -- `organization`: The organization of the registry to fetch. If not specified, use the organization specified in the user's settings. -- `filter`: Optional MongoDB-style filter to apply to each object in the lazy registry iterator. Fields available to filter for registries are `name`, `description`, `created_at`, `updated_at`. Fields available to filter for collections are `name`, `tag`, `description`, `created_at`, `updated_at` Fields available to filter for versions are `tag`, `alias`, `created_at`, `updated_at`, `metadata` -- `order`: Optional string to specify the order of the results. If prefixed with '+', sorts ascending (default). If prefixed with '-', sorts descending. -- `per_page`: Sets the page size for query pagination. -- `start`: Pagination cursor for resuming a past query, captured from a previous paginator's `.cursor` attribute. - - - - -##### Examples - -Find all registries with the names that contain "model" - -```python -import wandb - -api = wandb.Api() # specify an org if your entity belongs to multiple orgs -api.registries(filter={"name": {"$regex": "model"}}) -``` - -Find all collections in the registries with the name "my_collection" and the tag "my_tag" - -```python -api.registries().collections(filter={"name": "my_collection", "tag": "my_tag"}) -``` - -Find all artifact versions in the registries with a collection name that contains "my_collection" and a version that has the alias "best" - -```python -api.registries().collections( - filter={"name": {"$regex": "my_collection"}} -).versions(filter={"alias": "best"}) -``` - -Find all artifact versions in the registries that contain "model" and have the tag "prod" or alias "best" - -```python -api.registries(filter={"name": {"$regex": "model"}}).versions( - filter={"$or": [{"tag": "prod"}, {"alias": "best"}]} -) -``` - -Pause iteration and resume later from the same position by saving -the paginator's `.cursor` and passing it as `start=`: - -```python -from itertools import islice - -import wandb - -api = wandb.Api() - -# Consume the first page of results, then save the cursor. -page_size = 10 -registries = api.registries(per_page=page_size) -first_page = list(islice(registries, page_size)) - -saved_cursor = registries.cursor - -# Later (e.g. in a new process), resume iteration from the saved cursor. -remaining_registries = api.registries(per_page=page_size, start=saved_cursor) -``` - -### method Api.registry() - -```python -self, -name: 'str', -organization: 'str | None' = None -``` - -Return a registry given a registry name. - -##### Arguments - -- `name`: The name of the registry. This is without the `wandb-registry-` prefix. -- `organization`: The organization of the registry. If no organization is set in the settings, the organization will be fetched from the entity if the entity only belongs to one organization. - - - - -##### Examples - -Fetch and update a registry - -```python -import wandb - -api = wandb.Api() -registry = api.registry(name="my-registry", organization="my-org") -registry.description = "This is an updated description" -registry.save() -``` - -### method Api.reports() - -```python -self, -path: 'str' = '', -name: 'str | None' = None, -per_page: 'int' = 50 -``` - -Get reports for a given project path. - -Note: `wandb.Api.reports()` API is in beta and will likely change in -future releases. - -##### Arguments - -- `path`: The path to the project the report resides in. Specify the entity that created the project as a prefix followed by a forward slash. -- `name`: Name of the report requested. -- `per_page`: Sets the page size for query pagination. Usually there is no reason to change this. - - - - -##### Examples - -```python -import wandb - -wandb.Api.reports("entity/project") -``` - -### method Api.run() - -```python -(self, path='') -``` - -Return a single run by parsing path in the form `entity/project/run_id`. - -##### Arguments - -- `path`: Path to run in the form `entity/project/run_id`. If `api.entity` is set, this can be in the form `project/run_id` and if `api.project` is set this can just be the run_id. - - -##### Raises - -- `RunNotFoundError`: If a run is not found, or run data is not able to be loaded. - - -### method Api.run_queue() - -```python -(self, -entity: 'str', -name: 'str') -``` - -Return the named `RunQueue` for entity. - -See `Api.create_run_queue` for more information on how to create a run queue. - -##### Arguments - -- `entity`: -- `name`: - - - - -### method Api.runs() - -```python -(self, -path: 'str | None' = None, -filters: 'dict[str, Any] | None' = None, -order: 'str' = '+created_at', -per_page: 'int' = 50, -include_sweeps: 'bool' = False, -lazy: 'bool' = True) -``` - -Returns a `Runs` object, which lazily iterates over `Run` objects. - -Fields you can filter by include: -- `createdAt`: The timestamp when the run was created. (in ISO 8601 format, e.g. "2023-01-01T12:00:00Z") -- `displayName`: The human-readable display name of the run. (e.g. "eager-fox-1") -- `duration`: The total runtime of the run in seconds. -- `group`: The group name used to organize related runs together. -- `host`: The hostname where the run was executed. -- `jobType`: The type of job or purpose of the run. -- `name`: The unique identifier of the run. (e.g. "a1b2cdef") -- `state`: The current state of the run. -- `tags`: The tags associated with the run. -- `username`: The username of the user who initiated the run - -Additionally, you can filter by items in the run config or summary metrics. -Such as `config.experiment_name`, `summary_metrics.loss`, etc. - -For more complex filtering, you can use MongoDB query operators. -For details, see: https://docs.mongodb.com/manual/reference/operator/query -The following operations are supported: -- `$and` -- `$or` -- `$nor` -- `$eq` -- `$ne` -- `$gt` -- `$gte` -- `$lt` -- `$lte` -- `$in` -- `$nin` -- `$exists` -- `$regex` - -##### Arguments - -- `path`: (str) path to project, should be in the form: "entity/project" -- `filters`: (dict) queries for specific runs using the MongoDB query language. You can filter by run properties such as config.key, summary_metrics.key, state, entity, createdAt, etc. For example: `{"config.experiment_name": "foo"}` would find runs with a config entry of experiment name set to "foo" -- `order`: (str) Order can be `created_at`, `heartbeat_at`, `config.*.value`, or `summary_metrics.*`. If you prepend order with a + order is ascending (default). If you prepend order with a - order is descending. The default order is run.created_at from oldest to newest. -- `per_page`: (int) Sets the page size for query pagination. -- `include_sweeps`: (bool) Whether to eagerly fetch the sweep object in each run result. -- `lazy`: (bool) Whether to use lazy loading for faster performance. When True (default), only essential run metadata is loaded initially. Heavy fields like config, summaryMetrics, and systemMetrics are loaded on-demand when accessed. Set to False for full data upfront. - - - - -##### Examples - -```python -import wandb -from wandb.apis.public import Api - -# Find runs in project where config.experiment_name has been set to "foo" -Api.runs(path="my_entity/project", filters={"config.experiment_name": "foo"}) -``` - -```python -# Find runs in project where config.experiment_name has been set to "foo" or "bar" -Api.runs( - path="my_entity/project", - filters={ - "$or": [ - {"config.experiment_name": "foo"}, - {"config.experiment_name": "bar"}, - ] - }, -) -``` - -```python -# Find runs in project where config.experiment_name matches a regex -Api.runs( - path="my_entity/project", - filters={"config.experiment_name": {"$regex": "b.*"}}, -) -``` - -Note: - Regular expressions use Google's RE2 syntax: - https://github.com/google/re2/wiki/Syntax - -```python -# Find runs in project where the run name matches a regex -Api.runs( - path="my_entity/project", filters={"display_name": {"$regex": "^foo.*"}} -) -``` - -```python -# Find runs in project sorted by ascending loss -Api.runs(path="my_entity/project", order="+summary_metrics.loss") -``` - -### method Api.slack_integrations() - -```python -self, *, -entity: 'str | None' = None, -per_page: 'int' = 50, -start: 'str | None' = None -``` - -Returns an iterator of Slack integrations for an entity. - -##### Arguments - -- `entity`: The entity (e.g. team name) for which to fetch integrations. If not provided, the user's default entity will be used. -- `per_page`: Number of integrations to fetch per page. Defaults to 50. Usually there is no reason to change this. -- `start`: - - - - -##### Examples - -Get all registered Slack integrations for the team "my-team": - -```python -import wandb - -api = wandb.Api() -slack_integrations = api.slack_integrations(entity="my-team") -``` - -Find only Slack integrations that post to channel names starting with "team-alerts-": - -```python -slack_integrations = api.slack_integrations(entity="my-team") -team_alert_integrations = [ - ig - for ig in slack_integrations - if ig.channel_name.startswith("team-alerts-") -] -``` - -### method Api.sweep() - -```python -(self, path='') -``` - -Return a sweep by parsing path in the form `entity/project/sweep_id`. - -##### Arguments - -- `path`: Path to sweep in the form entity/project/sweep_id. If `api.entity` is set, this can be in the form project/sweep_id and if `api.project` is set this can just be the sweep_id. - - - - -### method Api.sync_tensorboard() - -```python -(self, root_dir, run_id=None, project=None, entity=None) -``` - -Sync a local directory containing tfevent files to wandb. - -##### Arguments - -- `root_dir`: -- `run_id`: -- `project`: -- `entity`: - - - - -### method Api.team() - -```python -self, -team: 'str' -``` - -Return the matching `Team` with the given name. - -##### Arguments - -- `team`: The name of the team. - - - - -### method Api.update_automation() - -```python -self, -obj: 'Automation', *, -create_missing: 'bool' = False, **kwargs: 'Unpack[WriteAutomationsKwargs]' -``` - -Update an existing automation. - -##### Arguments - -- `obj`: The automation to update. Must be an existing automation. -- `create_missing`: If True, and the automation does not exist, create it. -- `kwargs`: - - - - -##### Examples - -Disable and edit the description of an existing automation ("my-automation"): - -```python -import wandb - -api = wandb.Api() - -automation = api.automation(name="my-automation") -automation.enabled = False -automation.description = "Kept for reference, but no longer used." - -updated_automation = api.update_automation(automation) -``` - -OR - -```python -import wandb - -api = wandb.Api() - -automation = api.automation(name="my-automation") - -updated_automation = api.update_automation( - automation, - enabled=False, - description="Kept for reference, but no longer used.", -) -``` - -### method Api.upsert_run_queue() - -```python -(self, -name: 'str', -resource_config: 'dict', -resource_type: 'public.RunQueueResourceType', -entity: 'str | None' = None, -template_variables: 'dict | None' = None, -external_links: 'dict | None' = None, -prioritization_mode: 'public.RunQueuePrioritizationMode | None' = None) -``` - -Upsert a run queue in W&B Launch. - -##### Arguments - -- `name`: Name of the queue to create -- `resource_config`: Optional default resource configuration to be used for the queue. Use handlebars (eg. `{{var}}`) to specify template variables. -- `resource_type`: Type of resource to be used for the queue. One of "local-container", "local-process", "kubernetes", "sagemaker", or "gcp-vertex". -- `entity`: Optional name of the entity to create the queue. If `None`, use the configured or default entity. -- `template_variables`: A dictionary of template variable schemas to be used with the config. -- `external_links`: Optional dictionary of external links to be used with the queue. -- `prioritization_mode`: Optional version of prioritization to use. Either "V0" or None - - - - -### method Api.user() - -```python -self, -username_or_email: 'str' -``` - -Return a user from a username or email address. - -This function only works for local administrators. Use `api.viewer` - to get your own user object. - -##### Arguments - -- `username_or_email`: The username or email address of the user. - - - - -### method Api.users() - -```python -self, -username_or_email: 'str' -``` - -Return all users from a partial username or email address query. - -This function only works for local administrators. Use `api.viewer` - to get your own user object. - -##### Arguments - -- `username_or_email`: The prefix or suffix of the user you want to find. - - - - -### method Api.webhook_integrations() - -```python -self, -entity: 'str | None' = None, *, -per_page: 'int' = 50, -start: 'str | None' = None -``` - -Returns an iterator of webhook integrations for an entity. - -##### Arguments - -- `entity`: The entity (e.g. team name) for which to fetch integrations. If not provided, the user's default entity will be used. -- `per_page`: Number of integrations to fetch per page. Defaults to 50. Usually there is no reason to change this. -- `start`: - - - - -##### Examples - -Get all registered webhook integrations for the team "my-team": - -```python -import wandb - -api = wandb.Api() -webhook_integrations = api.webhook_integrations(entity="my-team") -``` - -Find only webhook integrations that post requests to "https://my-fake-url.com": - -```python -webhook_integrations = api.webhook_integrations(entity="my-team") -my_webhooks = [ - ig - for ig in webhook_integrations - if ig.url_endpoint.startswith("https://my-fake-url.com") -] -``` - - - diff --git a/models/ref/python/public-api/api/api-methods.mdx b/models/ref/python/public-api/api/api-methods.mdx new file mode 100644 index 0000000000..5c2228be7c --- /dev/null +++ b/models/ref/python/public-api/api/api-methods.mdx @@ -0,0 +1,1374 @@ +--- +title: Api methods +sidebarTitle: Methods +page_kind: class-methods +parent_slug: api +kind: class +namespace: wandb.apis.public.api +--- + +## class wandb.Api + + + +### method Api.artifact() + +```python +(self, +name: 'str', +type: 'str | None' = None) +``` + +Returns a single artifact. + +##### Arguments + +- `name`: The artifact's name. The name of an artifact resembles a filepath that consists, at a minimum, the name of the project the artifact was logged to, the name of the artifact, and the artifact's version or alias. Optionally append the entity that logged the artifact as a prefix followed by a forward slash. If no entity is specified in the name, the Run or API setting's entity is used. +- `type`: The type of artifact to fetch. + + +##### Raises + +- `ValueError`: If the artifact name is not specified. +- `ValueError`: If the artifact type is specified but does not match the type of the fetched artifact. + + +##### Examples + +In the following code snippets "entity", "project", "artifact", +"version", and "alias" are placeholders for your W&B entity, name +of the project the artifact is in, the name of the artifact, +and artifact's version, respectively. + +```python +import wandb + +# Specify the project, artifact's name, and the artifact's alias +wandb.Api().artifact(name="project/artifact:alias") + +# Specify the project, artifact's name, and a specific artifact version +wandb.Api().artifact(name="project/artifact:version") + +# Specify the entity, project, artifact's name, and the artifact's alias +wandb.Api().artifact(name="entity/project/artifact:alias") + +# Specify the entity, project, artifact's name, and a specific artifact version +wandb.Api().artifact(name="entity/project/artifact:version") +``` + +### method Api.artifact_collection() + +```python +self, +type_name: 'str', +name: 'str' +``` + +Returns a single artifact collection by type. + +You can use the returned `ArtifactCollection` object to retrieve +information about specific artifacts in that collection, and more. + +##### Arguments + +- `type_name`: The type of artifact collection to fetch. +- `name`: An artifact collection name. Optionally append the entity that logged the artifact as a prefix followed by a forward slash. + + + + +##### Examples + +In the proceeding code snippet "type", "entity", "project", and +"artifact_name" are placeholders for the collection type, your W&B +entity, name of the project the artifact is in, and the name of +the artifact, respectively. + +```python +import wandb + +collections = wandb.Api().artifact_collection( + type_name="type", name="entity/project/artifact_name" +) + +# Get the first artifact in the collection +artifact_example = collections.artifacts()[0] + +# Download the contents of the artifact to the specified root directory. +artifact_example.download() +``` + +### method Api.artifact_collection_exists() + +```python +self, +name: 'str', +type: 'str' +``` + +Whether an artifact collection exists within a specified project and entity. + +##### Arguments + +- `name`: An artifact collection name. Optionally append the entity that logged the artifact as a prefix followed by a forward slash. If entity or project is not specified, infer the collection from the override params if they exist. Otherwise, entity is pulled from the user settings and project will default to "uncategorized". +- `type`: The type of artifact collection. + + + + +##### Examples + +In the proceeding code snippet "type", and "collection_name" refer to the type +of the artifact collection and the name of the collection, respectively. + +```python +import wandb + +wandb.Api.artifact_collection_exists(type="type", name="collection_name") +``` + +### method Api.artifact_collections() + +```python +self, +project_name: 'str', +type_name: 'str', +order: 'str | None' = None, +per_page: 'int' = 50, +start: 'str | None' = None +``` + +Returns a collection of matching artifact collections. + +##### Arguments + +- `project_name`: The name of the project to filter on. +- `type_name`: The name of the artifact type to filter on. +- `order`: Optional string to specify the order of the results. If prefixed with '+', sorts ascending (default). If prefixed with '-', sorts descending. +- `per_page`: Sets the page size for query pagination. Usually there is no reason to change this. +- `start`: Pagination cursor for resuming a past query, captured from a previous paginator's `.cursor` attribute. + + + + +### method Api.artifact_exists() + +```python +self, +name: 'str', +type: 'str | None' = None +``` + +Whether an artifact version exists within the specified project and entity. + +##### Arguments + +- `name`: The name of artifact. Add the artifact's entity and project as a prefix. Append the version or the alias of the artifact with a colon. If the entity or project is not specified, W&B uses override parameters if populated. Otherwise, the entity is pulled from the user settings and the project is set to "Uncategorized". +- `type`: The type of artifact. + + + + +##### Examples + +In the proceeding code snippets "entity", "project", "artifact", +"version", and "alias" are placeholders for your W&B entity, name of +the project the artifact is in, the name of the artifact, and +artifact's version, respectively. + +```python +import wandb + +wandb.Api().artifact_exists("entity/project/artifact:version") +wandb.Api().artifact_exists("entity/project/artifact:alias") +``` + +### method Api.artifact_type() + +```python +self, +type_name: 'str', +project: 'str | None' = None +``` + +Returns the matching `ArtifactType`. + +##### Arguments + +- `type_name`: The name of the artifact type to retrieve. +- `project`: If given, a project name or path to filter on. + + + + +### method Api.artifact_types() + +```python +self, +project: 'str | None' = None, +start: 'str | None' = None +``` + +Returns a collection of matching artifact types. + +##### Arguments + +- `project`: The project name or path to filter on. +- `start`: Pagination cursor for resuming a past query, captured from a previous paginator's `.cursor` attribute. + + + + +### method Api.artifact_versions() + +```python +(self, type_name, name, per_page=50) +``` + +Deprecated. Use `Api.artifacts(type_name, name)` method instead. + +##### Arguments + +- `type_name`: +- `name`: +- `per_page`: + + + + +### method Api.artifacts() + +```python +self, +type_name: 'str', +name: 'str', +order: 'str | None' = None, +per_page: 'int' = 50, +tags: 'list[str] | None' = None, +start: 'str | None' = None +``` + +Return an `Artifacts` collection. + +##### Arguments + +- `type_name`: The type of artifacts to fetch. +- `name`: The artifact's collection name. Optionally append the entity that logged the artifact as a prefix followed by a forward slash. +- `order`: Optional string to specify the order of the results. If prefixed with '+', sorts ascending (default). If prefixed with '-', sorts descending. +- `per_page`: Sets the page size for query pagination. Usually there is no reason to change this. +- `tags`: Only return artifacts with all of these tags. +- `start`: Pagination cursor for resuming a past query, captured from a previous paginator's `.cursor` attribute. + + + + +##### Examples + +In the proceeding code snippet, "type", "entity", "project", and +"artifact_name" are placeholders for the artifact type, W&B entity, +name of the project the artifact was logged to, +and the name of the artifact, respectively. + +```python +import wandb + +wandb.Api().artifacts(type_name="type", name="entity/project/artifact_name") +``` + +Pause iteration and resume later from the same position by saving +the paginator's `.cursor` and passing it as `start=`: + +```python +from itertools import islice + +import wandb + +api = wandb.Api() + +# Consume the first page of results, then save the cursor. +page_size = 10 +artifacts = api.artifacts( + type_name="type", + name="entity/project/artifact_name", + per_page=page_size, +) +first_page = list(islice(artifacts, page_size)) + +saved_cursor = artifacts.cursor + +# Later (e.g. in a new process), resume iteration from the saved cursor. +remaining_artifacts = api.artifacts( + type_name="type", + name="entity/project/artifact_name", + per_page=page_size, + start=saved_cursor, +) +``` + +### method Api.automation() + +```python +self, +name: 'str', *, +entity: 'str | None' = None +``` + +Returns the only Automation matching the parameters. + +##### Arguments + +- `name`: The name of the automation to fetch. +- `entity`: The entity to fetch the automation for. + + +##### Raises + +- `ValueError`: If zero or multiple Automations match the search criteria. + + +##### Examples + +Get an existing automation named "my-automation": + +```python +import wandb + +api = wandb.Api() +automation = api.automation(name="my-automation") +``` + +Get an existing automation named "other-automation", from the entity "my-team": + +```python +automation = api.automation(name="other-automation", entity="my-team") +``` + +### method Api.automations() + +```python +self, +entity: 'str | None' = None, *, +name: 'str | None' = None, +per_page: 'int' = 50, +start: 'str | None' = None +``` + +Returns an iterator over all Automations that match the given parameters. + +If no parameters are provided, the returned iterator will contain all +Automations that the user has access to. + +##### Arguments + +- `entity`: The entity to fetch the automations for. +- `name`: The name of the automation to fetch. +- `per_page`: The number of automations to fetch per page. Defaults to 50. Usually there is no reason to change this. +- `start`: Pagination cursor for resuming a past query, captured from a previous paginator's `.cursor` attribute. + + + + +##### Examples + +Fetch all existing automations for the entity "my-team": + +```python +import wandb + +api = wandb.Api() +automations = api.automations(entity="my-team") +``` + +### method Api.create_automation() + +```python +self, +obj: 'NewAutomation', *, +fetch_existing: 'bool' = False, **kwargs: 'Unpack[WriteAutomationsKwargs]' +``` + +Create a new Automation. + +##### Arguments + +- `obj`: The automation to create. +- `fetch_existing`: If True, and a conflicting automation already exists, attempt to fetch the existing automation instead of raising an error. +- `kwargs`: + + + + +##### Examples + +Create a new automation named "my-automation" that sends a Slack notification +when a run within a specific project logs a metric exceeding a custom threshold: + +```python +import wandb +from wandb.automations import OnRunMetric, RunEvent, SendNotification + +api = wandb.Api() + +project = api.project("my-project", entity="my-team") + +# Use the first Slack integration for the team +slack_hook = next(api.slack_integrations(entity="my-team")) + +event = OnRunMetric( + scope=project, + filter=RunEvent.metric("custom-metric") > 10, +) +action = SendNotification.from_integration(slack_hook) + +automation = api.create_automation( + event >> action, + name="my-automation", + description="Send a Slack message whenever 'custom-metric' exceeds 10.", +) +``` + +### method Api.create_custom_chart() + +```python +self, +entity: 'str', +name: 'str', +display_name: 'str', +spec_type: "Literal['vega2']", +access: "Literal['private', 'public']", +spec: 'str | dict' +``` + +Create a custom chart preset and return its id. + +##### Arguments + +- `entity`: The entity (user or team) that owns the chart +- `name`: Unique identifier for the chart preset +- `display_name`: Human-readable name shown in the UI +- `spec_type`: Type of specification. Must be "vega2" for Vega-Lite v2 specifications. +- `access`: Access level for the chart: + - "private": Chart is only accessible to the entity that created it + - "public": Chart is publicly accessible +- `spec`: The Vega/Vega-Lite specification as a dictionary or JSON string + + +##### Raises + +- `wandb.Error`: If chart creation fails +- `UnsupportedError`: If the server doesn't support custom charts + + +##### Examples + +```python + import wandb + + api = wandb.Api() + + # Define a simple bar chart specification + vega_spec = { + "$schema": "https://vega.github.io/schema/vega-lite/v6.json", + "mark": "bar", + "data": {"name": "wandb"}, + "encoding": { + "x": {"field": "${field:x}", "type": "ordinal"}, + "y": {"field": "${field:y}", "type": "quantitative"}, + }, + } + + # Create the custom chart + chart_id = api.create_custom_chart( + entity="my-team", + name="my-bar-chart", + display_name="My Custom Bar Chart", + spec_type="vega2", + access="private", + spec=vega_spec, + ) + + # Use with wandb.plot_table() + chart = wandb.plot_table( + vega_spec_name=chart_id, + data_table=my_table, + fields={"x": "category", "y": "value"}, + ) + ``` + +### method Api.create_project() + +```python +self, +name: 'str', +entity: 'str' +``` + +Create a new project. + +##### Arguments + +- `name`: The name of the new project. +- `entity`: The entity of the new project. + + + + +### method Api.create_registry() + +```python +self, +name: 'str', +visibility: "Literal['organization', 'restricted']", +organization: 'str | None' = None, +description: 'str | None' = None, +artifact_types: 'list[str] | None' = None +``` + +Create a new registry. + +##### Arguments + +- `name`: The name of the registry. Name must be unique within the organization. +- `visibility`: The visibility of the registry. organization: Anyone in the organization can view this registry. You can edit their roles later from the settings in the UI. restricted: Only invited members via the UI can access this registry. Public sharing is disabled. +- `organization`: The organization of the registry. If no organization is set in the settings, the organization will be fetched from the entity if the entity only belongs to one organization. +- `description`: The description of the registry. +- `artifact_types`: The accepted artifact types of the registry. A type is no more than 128 characters and do not include characters `/` or `:`. If not specified, all types are accepted. Allowed types added to the registry cannot be removed later. + + + + +##### Examples + +```python +import wandb + +api = wandb.Api() +registry = api.create_registry( + name="my-registry", + visibility="restricted", + organization="my-org", + description="This is a test registry", + artifact_types=["model"], +) +``` + +### method Api.create_run() + +```python +self, *, +run_id: 'str | None' = None, +project: 'str | None' = None, +entity: 'str | None' = None +``` + +Create a new run. + +##### Arguments + +- `run_id`: The ID to assign to the run. If not specified, W&B creates a random ID. +- `project`: The project where to log the run to. If no project is specified, log the run to a project called "Uncategorized". +- `entity`: The entity that owns the project. If no entity is specified, log the run to the default entity. + + + + +### method Api.create_run_queue() + +```python +self, +name: 'str', +type: 'public.RunQueueResourceType', +entity: 'str | None' = None, +prioritization_mode: 'public.RunQueuePrioritizationMode | None' = None, +config: 'dict | None' = None, +template_variables: 'dict | None' = None +``` + +Create a new run queue in W&B Launch. + +##### Arguments + +- `name`: Name of the queue to create +- `type`: Type of resource to be used for the queue. One of "local-container", "local-process", "kubernetes","sagemaker", or "gcp-vertex". +- `entity`: Name of the entity to create the queue. If `None`, use the configured or default entity. +- `prioritization_mode`: Version of prioritization to use. Either "V0" or `None`. +- `config`: Default resource configuration to be used for the queue. Use handlebars (eg. `{{var}}`) to specify template variables. +- `template_variables`: A dictionary of template variable schemas to use with the config. + + + + +### method Api.create_team() + +```python +self, +team: 'str', +admin_username: 'str | None' = None +``` + +Create a new team. + +##### Arguments + +- `team`: The name of the team +- `admin_username`: Username of the admin user of the team. Defaults to the current user. + + + + +### method Api.create_user() + +```python +self, +email: 'str', +admin: 'bool | None' = False +``` + +Create a new user. + +##### Arguments + +- `email`: The email address of the user. +- `admin`: Set user as a global instance administrator. + + + + +### method Api.delete_automation() + +```python +self, +obj: 'Automation | str' +``` + +Delete an automation. + +##### Arguments + +- `obj`: The automation to delete, or its ID. + + + + +### method Api.flush() + +```python +(self) +``` + +Flush the local cache. + +The api object keeps a local cache of runs, so if the state of the run +may change while executing your script you must clear the local cache +with `api.flush()` to get the latest values associated with the run. + + + + + +### method Api.from_path() + +```python +(self, +path: 'str') +``` + +Return a run, sweep, project or report from a path. + +##### Arguments + +- `path`: The path to the project, run, sweep or report + + + + +##### Examples + +In the proceeding code snippets "project", "team", "run_id", "sweep_id", +and "report_name" are placeholders for the project, team, run ID, +sweep ID, and the name of a specific report, respectively. + +```python +import wandb + +api = wandb.Api() + +project = api.from_path("project") +team_project = api.from_path("team/project") +run = api.from_path("team/project/runs/run_id") +sweep = api.from_path("team/project/sweeps/sweep_id") +report = api.from_path("team/project/reports/report_name") +``` + +### method Api.integrations() + +```python +self, +entity: 'str | None' = None, *, +per_page: 'int' = 50, +start: 'str | None' = None +``` + +Return an iterator of all integrations for an entity. + +##### Arguments + +- `entity`: The entity (e.g. team name) for which to fetch integrations. If not provided, the user's default entity will be used. +- `per_page`: Number of integrations to fetch per page. Defaults to 50. Usually there is no reason to change this. +- `start`: + + + + +### method Api.job() + +```python +self, +name: 'str | None', +path: 'str | None' = None +``` + +Return a `Job` object. + +##### Arguments + +- `name`: The name of the job. +- `path`: The root path to download the job artifact. + + + + +### method Api.list_jobs() + +```python +self, +entity: 'str', +project: 'str' +``` + +Return a list of jobs, if any, for the given entity and project. + +##### Arguments + +- `entity`: The entity for the listed jobs. +- `project`: The project for the listed jobs. + + + + +### method Api.organization() + +```python +self, +name: 'str | None' = None +``` + +Return the matching `Organization`. + +##### Arguments + +- `name`: The name of the organization. If omitted, this method will attempt to infer and return the current default organization. + + + + +### method Api.project() + +```python +self, +name: 'str', +entity: 'str | None' = None +``` + +Return the `Project` with the given name (and entity, if given). + +##### Arguments + +- `name`: The project name. +- `entity`: Name of the entity requested. If None, will fall back to the default entity passed to `Api`. If no default entity, will raise a `ValueError`. + + + + +### method Api.projects() + +```python +self, +entity: 'str | None' = None, +per_page: 'int' = 200 +``` + +Get projects for a given entity. + +##### Arguments + +- `entity`: Name of the entity requested. If None, will fall back to the default entity passed to `Api`. If no default entity, will raise a `ValueError`. +- `per_page`: Sets the page size for query pagination. Usually there is no reason to change this. + + + + +### method Api.queued_run() + +```python +(self, +entity: 'str', +project: 'str', +queue_name: 'str', +run_queue_item_id: 'str', project_queue=None, priority=None) +``` + +Return a single queued run based on the path. + +Parses paths of the form `entity/project/queue_id/run_queue_item_id`. + +##### Arguments + +- `entity`: +- `project`: +- `queue_name`: +- `run_queue_item_id`: +- `project_queue`: +- `priority`: + + + + +### method Api.registries() + +```python +self, +organization: 'str | None' = None, +filter: 'dict[str, Any] | None' = None, +order: 'str | None' = None, +per_page: 'int' = 100, +start: 'str | None' = None +``` + +Returns a lazy iterator of `Registry` objects. + +Use the iterator to search and filter registries, collections, +or artifact versions across your organization's registry. + +##### Arguments + +- `organization`: The organization of the registry to fetch. If not specified, use the organization specified in the user's settings. +- `filter`: Optional MongoDB-style filter to apply to each object in the lazy registry iterator. Fields available to filter for registries are `name`, `description`, `created_at`, `updated_at`. Fields available to filter for collections are `name`, `tag`, `description`, `created_at`, `updated_at` Fields available to filter for versions are `tag`, `alias`, `created_at`, `updated_at`, `metadata` +- `order`: Optional string to specify the order of the results. If prefixed with '+', sorts ascending (default). If prefixed with '-', sorts descending. +- `per_page`: Sets the page size for query pagination. +- `start`: Pagination cursor for resuming a past query, captured from a previous paginator's `.cursor` attribute. + + + + +##### Examples + +Find all registries with the names that contain "model" + +```python +import wandb + +api = wandb.Api() # specify an org if your entity belongs to multiple orgs +api.registries(filter={"name": {"$regex": "model"}}) +``` + +Find all collections in the registries with the name "my_collection" and the tag "my_tag" + +```python +api.registries().collections(filter={"name": "my_collection", "tag": "my_tag"}) +``` + +Find all artifact versions in the registries with a collection name that contains "my_collection" and a version that has the alias "best" + +```python +api.registries().collections( + filter={"name": {"$regex": "my_collection"}} +).versions(filter={"alias": "best"}) +``` + +Find all artifact versions in the registries that contain "model" and have the tag "prod" or alias "best" + +```python +api.registries(filter={"name": {"$regex": "model"}}).versions( + filter={"$or": [{"tag": "prod"}, {"alias": "best"}]} +) +``` + +Pause iteration and resume later from the same position by saving +the paginator's `.cursor` and passing it as `start=`: + +```python +from itertools import islice + +import wandb + +api = wandb.Api() + +# Consume the first page of results, then save the cursor. +page_size = 10 +registries = api.registries(per_page=page_size) +first_page = list(islice(registries, page_size)) + +saved_cursor = registries.cursor + +# Later (e.g. in a new process), resume iteration from the saved cursor. +remaining_registries = api.registries(per_page=page_size, start=saved_cursor) +``` + +### method Api.registry() + +```python +self, +name: 'str', +organization: 'str | None' = None +``` + +Return a registry given a registry name. + +##### Arguments + +- `name`: The name of the registry. This is without the `wandb-registry-` prefix. +- `organization`: The organization of the registry. If no organization is set in the settings, the organization will be fetched from the entity if the entity only belongs to one organization. + + + + +##### Examples + +Fetch and update a registry + +```python +import wandb + +api = wandb.Api() +registry = api.registry(name="my-registry", organization="my-org") +registry.description = "This is an updated description" +registry.save() +``` + +### method Api.reports() + +```python +self, +path: 'str' = '', +name: 'str | None' = None, +per_page: 'int' = 50 +``` + +Get reports for a given project path. + +Note: `wandb.Api.reports()` API is in beta and will likely change in +future releases. + +##### Arguments + +- `path`: The path to the project the report resides in. Specify the entity that created the project as a prefix followed by a forward slash. +- `name`: Name of the report requested. +- `per_page`: Sets the page size for query pagination. Usually there is no reason to change this. + + + + +##### Examples + +```python +import wandb + +wandb.Api.reports("entity/project") +``` + +### method Api.run() + +```python +(self, path='') +``` + +Return a single run by parsing path in the form `entity/project/run_id`. + +##### Arguments + +- `path`: Path to run in the form `entity/project/run_id`. If `api.entity` is set, this can be in the form `project/run_id` and if `api.project` is set this can just be the run_id. + + +##### Raises + +- `RunNotFoundError`: If a run is not found, or run data is not able to be loaded. + + +### method Api.run_queue() + +```python +(self, +entity: 'str', +name: 'str') +``` + +Return the named `RunQueue` for entity. + +See `Api.create_run_queue` for more information on how to create a run queue. + +##### Arguments + +- `entity`: +- `name`: + + + + +### method Api.runs() + +```python +(self, +path: 'str | None' = None, +filters: 'dict[str, Any] | None' = None, +order: 'str' = '+created_at', +per_page: 'int' = 50, +include_sweeps: 'bool' = False, +lazy: 'bool' = True) +``` + +Returns a `Runs` object, which lazily iterates over `Run` objects. + +Fields you can filter by include: +- `createdAt`: The timestamp when the run was created. (in ISO 8601 format, e.g. "2023-01-01T12:00:00Z") +- `displayName`: The human-readable display name of the run. (e.g. "eager-fox-1") +- `duration`: The total runtime of the run in seconds. +- `group`: The group name used to organize related runs together. +- `host`: The hostname where the run was executed. +- `jobType`: The type of job or purpose of the run. +- `name`: The unique identifier of the run. (e.g. "a1b2cdef") +- `state`: The current state of the run. +- `tags`: The tags associated with the run. +- `username`: The username of the user who initiated the run + +Additionally, you can filter by items in the run config or summary metrics. +Such as `config.experiment_name`, `summary_metrics.loss`, etc. + +For more complex filtering, you can use MongoDB query operators. +For details, see: https://docs.mongodb.com/manual/reference/operator/query +The following operations are supported: +- `$and` +- `$or` +- `$nor` +- `$eq` +- `$ne` +- `$gt` +- `$gte` +- `$lt` +- `$lte` +- `$in` +- `$nin` +- `$exists` +- `$regex` + +##### Arguments + +- `path`: (str) path to project, should be in the form: "entity/project" +- `filters`: (dict) queries for specific runs using the MongoDB query language. You can filter by run properties such as config.key, summary_metrics.key, state, entity, createdAt, etc. For example: `{"config.experiment_name": "foo"}` would find runs with a config entry of experiment name set to "foo" +- `order`: (str) Order can be `created_at`, `heartbeat_at`, `config.*.value`, or `summary_metrics.*`. If you prepend order with a + order is ascending (default). If you prepend order with a - order is descending. The default order is run.created_at from oldest to newest. +- `per_page`: (int) Sets the page size for query pagination. +- `include_sweeps`: (bool) Whether to eagerly fetch the sweep object in each run result. +- `lazy`: (bool) Whether to use lazy loading for faster performance. When True (default), only essential run metadata is loaded initially. Heavy fields like config, summaryMetrics, and systemMetrics are loaded on-demand when accessed. Set to False for full data upfront. + + + + +##### Examples + +```python +import wandb +from wandb.apis.public import Api + +# Find runs in project where config.experiment_name has been set to "foo" +Api.runs(path="my_entity/project", filters={"config.experiment_name": "foo"}) +``` + +```python +# Find runs in project where config.experiment_name has been set to "foo" or "bar" +Api.runs( + path="my_entity/project", + filters={ + "$or": [ + {"config.experiment_name": "foo"}, + {"config.experiment_name": "bar"}, + ] + }, +) +``` + +```python +# Find runs in project where config.experiment_name matches a regex +Api.runs( + path="my_entity/project", + filters={"config.experiment_name": {"$regex": "b.*"}}, +) +``` + +Note: + Regular expressions use Google's RE2 syntax: + https://github.com/google/re2/wiki/Syntax + +```python +# Find runs in project where the run name matches a regex +Api.runs( + path="my_entity/project", filters={"display_name": {"$regex": "^foo.*"}} +) +``` + +```python +# Find runs in project sorted by ascending loss +Api.runs(path="my_entity/project", order="+summary_metrics.loss") +``` + +### method Api.slack_integrations() + +```python +self, *, +entity: 'str | None' = None, +per_page: 'int' = 50, +start: 'str | None' = None +``` + +Returns an iterator of Slack integrations for an entity. + +##### Arguments + +- `entity`: The entity (e.g. team name) for which to fetch integrations. If not provided, the user's default entity will be used. +- `per_page`: Number of integrations to fetch per page. Defaults to 50. Usually there is no reason to change this. +- `start`: + + + + +##### Examples + +Get all registered Slack integrations for the team "my-team": + +```python +import wandb + +api = wandb.Api() +slack_integrations = api.slack_integrations(entity="my-team") +``` + +Find only Slack integrations that post to channel names starting with "team-alerts-": + +```python +slack_integrations = api.slack_integrations(entity="my-team") +team_alert_integrations = [ + ig + for ig in slack_integrations + if ig.channel_name.startswith("team-alerts-") +] +``` + +### method Api.sweep() + +```python +(self, path='') +``` + +Return a sweep by parsing path in the form `entity/project/sweep_id`. + +##### Arguments + +- `path`: Path to sweep in the form entity/project/sweep_id. If `api.entity` is set, this can be in the form project/sweep_id and if `api.project` is set this can just be the sweep_id. + + + + +### method Api.sync_tensorboard() + +```python +(self, root_dir, run_id=None, project=None, entity=None) +``` + +Sync a local directory containing tfevent files to wandb. + +##### Arguments + +- `root_dir`: +- `run_id`: +- `project`: +- `entity`: + + + + +### method Api.team() + +```python +self, +team: 'str' +``` + +Return the matching `Team` with the given name. + +##### Arguments + +- `team`: The name of the team. + + + + +### method Api.update_automation() + +```python +self, +obj: 'Automation', *, +create_missing: 'bool' = False, **kwargs: 'Unpack[WriteAutomationsKwargs]' +``` + +Update an existing automation. + +##### Arguments + +- `obj`: The automation to update. Must be an existing automation. +- `create_missing`: If True, and the automation does not exist, create it. +- `kwargs`: + + + + +##### Examples + +Disable and edit the description of an existing automation ("my-automation"): + +```python +import wandb + +api = wandb.Api() + +automation = api.automation(name="my-automation") +automation.enabled = False +automation.description = "Kept for reference, but no longer used." + +updated_automation = api.update_automation(automation) +``` + +OR + +```python +import wandb + +api = wandb.Api() + +automation = api.automation(name="my-automation") + +updated_automation = api.update_automation( + automation, + enabled=False, + description="Kept for reference, but no longer used.", +) +``` + +### method Api.upsert_run_queue() + +```python +(self, +name: 'str', +resource_config: 'dict', +resource_type: 'public.RunQueueResourceType', +entity: 'str | None' = None, +template_variables: 'dict | None' = None, +external_links: 'dict | None' = None, +prioritization_mode: 'public.RunQueuePrioritizationMode | None' = None) +``` + +Upsert a run queue in W&B Launch. + +##### Arguments + +- `name`: Name of the queue to create +- `resource_config`: Optional default resource configuration to be used for the queue. Use handlebars (eg. `{{var}}`) to specify template variables. +- `resource_type`: Type of resource to be used for the queue. One of "local-container", "local-process", "kubernetes", "sagemaker", or "gcp-vertex". +- `entity`: Optional name of the entity to create the queue. If `None`, use the configured or default entity. +- `template_variables`: A dictionary of template variable schemas to be used with the config. +- `external_links`: Optional dictionary of external links to be used with the queue. +- `prioritization_mode`: Optional version of prioritization to use. Either "V0" or None + + + + +### method Api.user() + +```python +self, +username_or_email: 'str' +``` + +Return a user from a username or email address. + +This function only works for local administrators. Use `api.viewer` + to get your own user object. + +##### Arguments + +- `username_or_email`: The username or email address of the user. + + + + +### method Api.users() + +```python +self, +username_or_email: 'str' +``` + +Return all users from a partial username or email address query. + +This function only works for local administrators. Use `api.viewer` + to get your own user object. + +##### Arguments + +- `username_or_email`: The prefix or suffix of the user you want to find. + + + + +### method Api.webhook_integrations() + +```python +self, +entity: 'str | None' = None, *, +per_page: 'int' = 50, +start: 'str | None' = None +``` + +Returns an iterator of webhook integrations for an entity. + +##### Arguments + +- `entity`: The entity (e.g. team name) for which to fetch integrations. If not provided, the user's default entity will be used. +- `per_page`: Number of integrations to fetch per page. Defaults to 50. Usually there is no reason to change this. +- `start`: + + + + +##### Examples + +Get all registered webhook integrations for the team "my-team": + +```python +import wandb + +api = wandb.Api() +webhook_integrations = api.webhook_integrations(entity="my-team") +``` + +Find only webhook integrations that post requests to "https://my-fake-url.com": + +```python +webhook_integrations = api.webhook_integrations(entity="my-team") +my_webhooks = [ + ig + for ig in webhook_integrations + if ig.url_endpoint.startswith("https://my-fake-url.com") +] +``` + + + diff --git a/models/ref/python/public-api/api/api-properties.mdx b/models/ref/python/public-api/api/api-properties.mdx new file mode 100644 index 0000000000..a4dd321a46 --- /dev/null +++ b/models/ref/python/public-api/api/api-properties.mdx @@ -0,0 +1,27 @@ +--- +title: Api properties +sidebarTitle: Properties +page_kind: class-properties +parent_slug: api +kind: class +namespace: wandb.apis.public.api +--- + +## class wandb.Api + + + +### property default_entity + +Returns the default W&B entity. + +### property user_agent + +Returns W&B public user agent. + +### property viewer + +Returns the viewer object. + + + diff --git a/models/ref/python/public-api/artifactcollection.mdx b/models/ref/python/public-api/artifactcollection.mdx index d19cd6022c..69722feecb 100644 --- a/models/ref/python/public-api/artifactcollection.mdx +++ b/models/ref/python/public-api/artifactcollection.mdx @@ -7,7 +7,7 @@ namespace: wandb.apis.public.artifacts import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; - + @@ -26,121 +26,3 @@ An artifact collection that represents a group of related artifacts. -## Properties - -### property aliases - -The aliases for all artifact versions contained in this collection. - -### property created_at - -The creation date of the artifact collection. - -### property description - -A description of the artifact collection. - -### property entity - -The entity (user or team) that owns the project. - -### property id - -The unique identifier of the artifact collection. - -### property name - -The name of the artifact collection. - -### property project - -The project that contains the artifact collection. - -### property tags - -The tags associated with the artifact collection. - -### property type - -Returns the type of the artifact collection. - -### property updated_at - -The date at which the artifact collection was last updated. - - - -## Methods - -### method ArtifactCollection.artifacts() - -```python -self, -per_page: 'int' = 50, -start: 'str | None' = None -``` - -Get all artifacts in the collection. - -##### Arguments - -- `per_page`: The number of artifacts to fetch per page. -- `start`: Pagination cursor for resuming a past query, captured from a previous paginator's `.cursor` attribute. - - - - -### method ArtifactCollection.change_type() - -```python -self, -new_type: 'str' -``` - -Deprecated, change type directly with `save` instead. - -##### Arguments - -- `new_type`: - - - - -### method ArtifactCollection.delete() - -```python -self -``` - -Delete the entire artifact collection. - - - - - -### method ArtifactCollection.is_sequence() - -```python -self -``` - -Return whether the artifact collection is a sequence. - - - - - -### method ArtifactCollection.save() - -```python -self -``` - -Persist any changes made to the artifact collection. - - - - - - - diff --git a/models/ref/python/public-api/artifactcollection/artifactcollection-methods.mdx b/models/ref/python/public-api/artifactcollection/artifactcollection-methods.mdx new file mode 100644 index 0000000000..b229959e8c --- /dev/null +++ b/models/ref/python/public-api/artifactcollection/artifactcollection-methods.mdx @@ -0,0 +1,85 @@ +--- +title: ArtifactCollection methods +sidebarTitle: Methods +page_kind: class-methods +parent_slug: artifactcollection +kind: class +namespace: wandb.apis.public.artifacts +--- + +## class wandb.apis.public.ArtifactCollection + + + +### method ArtifactCollection.artifacts() + +```python +self, +per_page: 'int' = 50, +start: 'str | None' = None +``` + +Get all artifacts in the collection. + +##### Arguments + +- `per_page`: The number of artifacts to fetch per page. +- `start`: Pagination cursor for resuming a past query, captured from a previous paginator's `.cursor` attribute. + + + + +### method ArtifactCollection.change_type() + +```python +self, +new_type: 'str' +``` + +Deprecated, change type directly with `save` instead. + +##### Arguments + +- `new_type`: + + + + +### method ArtifactCollection.delete() + +```python +self +``` + +Delete the entire artifact collection. + + + + + +### method ArtifactCollection.is_sequence() + +```python +self +``` + +Return whether the artifact collection is a sequence. + + + + + +### method ArtifactCollection.save() + +```python +self +``` + +Persist any changes made to the artifact collection. + + + + + + + diff --git a/models/ref/python/public-api/artifactcollection/artifactcollection-properties.mdx b/models/ref/python/public-api/artifactcollection/artifactcollection-properties.mdx new file mode 100644 index 0000000000..989f6e7cfd --- /dev/null +++ b/models/ref/python/public-api/artifactcollection/artifactcollection-properties.mdx @@ -0,0 +1,55 @@ +--- +title: ArtifactCollection properties +sidebarTitle: Properties +page_kind: class-properties +parent_slug: artifactcollection +kind: class +namespace: wandb.apis.public.artifacts +--- + +## class wandb.apis.public.ArtifactCollection + + + +### property aliases + +The aliases for all artifact versions contained in this collection. + +### property created_at + +The creation date of the artifact collection. + +### property description + +A description of the artifact collection. + +### property entity + +The entity (user or team) that owns the project. + +### property id + +The unique identifier of the artifact collection. + +### property name + +The name of the artifact collection. + +### property project + +The project that contains the artifact collection. + +### property tags + +The tags associated with the artifact collection. + +### property type + +Returns the type of the artifact collection. + +### property updated_at + +The date at which the artifact collection was last updated. + + + diff --git a/models/ref/python/public-api/artifactcollections.mdx b/models/ref/python/public-api/artifactcollections.mdx index 63999a8e65..18cc82f3eb 100644 --- a/models/ref/python/public-api/artifactcollections.mdx +++ b/models/ref/python/public-api/artifactcollections.mdx @@ -7,7 +7,7 @@ namespace: wandb.apis.public.artifacts import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; - + @@ -26,45 +26,3 @@ Artifact collections of a specific type in a project. - - -## Methods - -### method RelayPaginator.convert_objects() - -```python -self -``` - -Convert the last fetched response data into the iterated objects. - - - - - -### method Paginator.__next__() - -```python -self -``` - -Return the next item from the iterator. When exhausted, raise StopIteration - - - - - -### method Paginator.update_variables() - -```python -self -``` - -Update the query variables for the next page fetch. - - - - - - - diff --git a/models/ref/python/public-api/artifactcollections/artifactcollections-methods.mdx b/models/ref/python/public-api/artifactcollections/artifactcollections-methods.mdx new file mode 100644 index 0000000000..d21a0c6f9d --- /dev/null +++ b/models/ref/python/public-api/artifactcollections/artifactcollections-methods.mdx @@ -0,0 +1,51 @@ +--- +title: ArtifactCollections methods +sidebarTitle: Methods +page_kind: class-methods +parent_slug: artifactcollections +kind: class +namespace: wandb.apis.public.artifacts +--- + +## class wandb.apis.public.ArtifactCollections + + + +### method RelayPaginator.convert_objects() + +```python +self +``` + +Convert the last fetched response data into the iterated objects. + + + + + +### method Paginator.__next__() + +```python +self +``` + +Return the next item from the iterator. When exhausted, raise StopIteration + + + + + +### method Paginator.update_variables() + +```python +self +``` + +Update the query variables for the next page fetch. + + + + + + + diff --git a/models/ref/python/public-api/artifactfiles.mdx b/models/ref/python/public-api/artifactfiles.mdx index 083e9d3161..74e8bddeb2 100644 --- a/models/ref/python/public-api/artifactfiles.mdx +++ b/models/ref/python/public-api/artifactfiles.mdx @@ -7,7 +7,7 @@ namespace: wandb.apis.public.artifacts import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; - + @@ -26,51 +26,3 @@ A paginator for files in an artifact. -## Properties - -### property path - -Returns the path of the artifact. - - - -## Methods - -### method RelayPaginator.convert_objects() - -```python -self -``` - -Convert the last fetched response data into the iterated objects. - - - - - -### method Paginator.__next__() - -```python -self -``` - -Return the next item from the iterator. When exhausted, raise StopIteration - - - - - -### method Paginator.update_variables() - -```python -self -``` - -Update the query variables for the next page fetch. - - - - - - - diff --git a/models/ref/python/public-api/artifactfiles/artifactfiles-methods.mdx b/models/ref/python/public-api/artifactfiles/artifactfiles-methods.mdx new file mode 100644 index 0000000000..b209993f0f --- /dev/null +++ b/models/ref/python/public-api/artifactfiles/artifactfiles-methods.mdx @@ -0,0 +1,51 @@ +--- +title: ArtifactFiles methods +sidebarTitle: Methods +page_kind: class-methods +parent_slug: artifactfiles +kind: class +namespace: wandb.apis.public.artifacts +--- + +## class wandb.apis.public.ArtifactFiles + + + +### method RelayPaginator.convert_objects() + +```python +self +``` + +Convert the last fetched response data into the iterated objects. + + + + + +### method Paginator.__next__() + +```python +self +``` + +Return the next item from the iterator. When exhausted, raise StopIteration + + + + + +### method Paginator.update_variables() + +```python +self +``` + +Update the query variables for the next page fetch. + + + + + + + diff --git a/models/ref/python/public-api/artifactfiles/artifactfiles-properties.mdx b/models/ref/python/public-api/artifactfiles/artifactfiles-properties.mdx new file mode 100644 index 0000000000..ea2f41ecc9 --- /dev/null +++ b/models/ref/python/public-api/artifactfiles/artifactfiles-properties.mdx @@ -0,0 +1,19 @@ +--- +title: ArtifactFiles properties +sidebarTitle: Properties +page_kind: class-properties +parent_slug: artifactfiles +kind: class +namespace: wandb.apis.public.artifacts +--- + +## class wandb.apis.public.ArtifactFiles + + + +### property path + +Returns the path of the artifact. + + + diff --git a/models/ref/python/public-api/artifacts.mdx b/models/ref/python/public-api/artifacts.mdx index acd90db310..b7fbe1af97 100644 --- a/models/ref/python/public-api/artifacts.mdx +++ b/models/ref/python/public-api/artifacts.mdx @@ -7,7 +7,7 @@ namespace: wandb.apis.public.artifacts import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; - + @@ -28,33 +28,3 @@ Optionally pass in filters to narrow down the results based on specific criteria - - -## Methods - -### method Paginator.__next__() - -```python -self -``` - -Return the next item from the iterator. When exhausted, raise StopIteration - - - - - -### method Paginator.update_variables() - -```python -self -``` - -Update the query variables for the next page fetch. - - - - - - - diff --git a/models/ref/python/public-api/artifacts/artifacts-methods.mdx b/models/ref/python/public-api/artifacts/artifacts-methods.mdx new file mode 100644 index 0000000000..450480a49c --- /dev/null +++ b/models/ref/python/public-api/artifacts/artifacts-methods.mdx @@ -0,0 +1,39 @@ +--- +title: Artifacts methods +sidebarTitle: Methods +page_kind: class-methods +parent_slug: artifacts +kind: class +namespace: wandb.apis.public.artifacts +--- + +## class wandb.apis.public.Artifacts + + + +### method Paginator.__next__() + +```python +self +``` + +Return the next item from the iterator. When exhausted, raise StopIteration + + + + + +### method Paginator.update_variables() + +```python +self +``` + +Update the query variables for the next page fetch. + + + + + + + diff --git a/models/ref/python/public-api/artifacttype.mdx b/models/ref/python/public-api/artifacttype.mdx index 5d610f142d..76af3bc203 100644 --- a/models/ref/python/public-api/artifacttype.mdx +++ b/models/ref/python/public-api/artifacttype.mdx @@ -7,7 +7,7 @@ namespace: wandb.apis.public.artifacts import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; - + @@ -26,57 +26,3 @@ An artifact object that satisfies query based on the specified type. -## Properties - -### property id - -The unique identifier of the artifact type. - -### property name - -The name of the artifact type. - - - -## Methods - -### method ArtifactType.collection() - -```python -self, -name: 'str' -``` - -Get a specific artifact collection by name. - -##### Arguments - -- `name`: The name of the artifact collection to retrieve. - - - - -### method ArtifactType.collections() - -```python -self, -filters: 'Mapping[str, Any] | None' = None, -order: 'str | None' = None, -per_page: 'int' = 50, -start: 'str | None' = None -``` - -Get all artifact collections associated with this artifact type. - -##### Arguments - -- `filters`: Optional mapping of filters to apply to the query. -- `order`: Optional string to specify the order of the results. If prefixed with '+', sorts ascending (default). If prefixed with '-', sorts descending. The default order is the collection ID in descending order. -- `per_page`: The number of artifact collections to fetch per page. Default is 50. -- `start`: Pagination cursor for resuming a past query, captured from a previous paginator's `.cursor` attribute. - - - - - - diff --git a/models/ref/python/public-api/artifacttype/artifacttype-methods.mdx b/models/ref/python/public-api/artifacttype/artifacttype-methods.mdx new file mode 100644 index 0000000000..f28e108eb3 --- /dev/null +++ b/models/ref/python/public-api/artifacttype/artifacttype-methods.mdx @@ -0,0 +1,53 @@ +--- +title: ArtifactType methods +sidebarTitle: Methods +page_kind: class-methods +parent_slug: artifacttype +kind: class +namespace: wandb.apis.public.artifacts +--- + +## class wandb.apis.public.ArtifactType + + + +### method ArtifactType.collection() + +```python +self, +name: 'str' +``` + +Get a specific artifact collection by name. + +##### Arguments + +- `name`: The name of the artifact collection to retrieve. + + + + +### method ArtifactType.collections() + +```python +self, +filters: 'Mapping[str, Any] | None' = None, +order: 'str | None' = None, +per_page: 'int' = 50, +start: 'str | None' = None +``` + +Get all artifact collections associated with this artifact type. + +##### Arguments + +- `filters`: Optional mapping of filters to apply to the query. +- `order`: Optional string to specify the order of the results. If prefixed with '+', sorts ascending (default). If prefixed with '-', sorts descending. The default order is the collection ID in descending order. +- `per_page`: The number of artifact collections to fetch per page. Default is 50. +- `start`: Pagination cursor for resuming a past query, captured from a previous paginator's `.cursor` attribute. + + + + + + diff --git a/models/ref/python/public-api/artifacttype/artifacttype-properties.mdx b/models/ref/python/public-api/artifacttype/artifacttype-properties.mdx new file mode 100644 index 0000000000..b045dde233 --- /dev/null +++ b/models/ref/python/public-api/artifacttype/artifacttype-properties.mdx @@ -0,0 +1,23 @@ +--- +title: ArtifactType properties +sidebarTitle: Properties +page_kind: class-properties +parent_slug: artifacttype +kind: class +namespace: wandb.apis.public.artifacts +--- + +## class wandb.apis.public.ArtifactType + + + +### property id + +The unique identifier of the artifact type. + +### property name + +The name of the artifact type. + + + diff --git a/models/ref/python/public-api/artifacttypes.mdx b/models/ref/python/public-api/artifacttypes.mdx index 753e175cf1..33e96e687c 100644 --- a/models/ref/python/public-api/artifacttypes.mdx +++ b/models/ref/python/public-api/artifacttypes.mdx @@ -7,7 +7,7 @@ namespace: wandb.apis.public.artifacts import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; - + @@ -26,45 +26,3 @@ An lazy iterator of `ArtifactType` objects for a specific project. - - -## Methods - -### method RelayPaginator.convert_objects() - -```python -self -``` - -Convert the last fetched response data into the iterated objects. - - - - - -### method Paginator.__next__() - -```python -self -``` - -Return the next item from the iterator. When exhausted, raise StopIteration - - - - - -### method Paginator.update_variables() - -```python -self -``` - -Update the query variables for the next page fetch. - - - - - - - diff --git a/models/ref/python/public-api/artifacttypes/artifacttypes-methods.mdx b/models/ref/python/public-api/artifacttypes/artifacttypes-methods.mdx new file mode 100644 index 0000000000..c62ef05ac0 --- /dev/null +++ b/models/ref/python/public-api/artifacttypes/artifacttypes-methods.mdx @@ -0,0 +1,51 @@ +--- +title: ArtifactTypes methods +sidebarTitle: Methods +page_kind: class-methods +parent_slug: artifacttypes +kind: class +namespace: wandb.apis.public.artifacts +--- + +## class wandb.apis.public.ArtifactTypes + + + +### method RelayPaginator.convert_objects() + +```python +self +``` + +Convert the last fetched response data into the iterated objects. + + + + + +### method Paginator.__next__() + +```python +self +``` + +Return the next item from the iterator. When exhausted, raise StopIteration + + + + + +### method Paginator.update_variables() + +```python +self +``` + +Update the query variables for the next page fetch. + + + + + + + diff --git a/models/ref/python/public-api/betareport.mdx b/models/ref/python/public-api/betareport.mdx index 449e06c1c2..83cde0e200 100644 --- a/models/ref/python/public-api/betareport.mdx +++ b/models/ref/python/public-api/betareport.mdx @@ -52,89 +52,3 @@ sections, and for rendering the report as HTML. -## Properties - -### property created_at - - - -### property description - - - -### property display_name - - - -### property id - - - -### property name - - - -### property sections - -Get the panel sections (groups) from the report. - -### property spec - - - -### property updated_at - - - -### property url - - - -### property user - - - - - -## Methods - -### method BetaReport.runs() - -```python -self, -section: 'dict[str, Any]', -per_page: 'int' = 50, -only_selected: 'bool' = True -``` - -Get runs associated with a section of the report. - -##### Arguments - -- `section`: -- `per_page`: -- `only_selected`: - - - - -### method BetaReport.to_html() - -```python -self, -height: 'int' = 1024, -hidden: 'bool' = False -``` - -Generate HTML containing an iframe displaying this report. - -##### Arguments - -- `height`: -- `hidden`: - - - - - - diff --git a/models/ref/python/public-api/betareport/betareport-methods.mdx b/models/ref/python/public-api/betareport/betareport-methods.mdx new file mode 100644 index 0000000000..2858d6495d --- /dev/null +++ b/models/ref/python/public-api/betareport/betareport-methods.mdx @@ -0,0 +1,53 @@ +--- +title: BetaReport methods +sidebarTitle: Methods +page_kind: class-methods +parent_slug: betareport +kind: class +namespace: wandb.apis.public.reports +--- + +## class wandb.apis.public.BetaReport + + + +### method BetaReport.runs() + +```python +self, +section: 'dict[str, Any]', +per_page: 'int' = 50, +only_selected: 'bool' = True +``` + +Get runs associated with a section of the report. + +##### Arguments + +- `section`: +- `per_page`: +- `only_selected`: + + + + +### method BetaReport.to_html() + +```python +self, +height: 'int' = 1024, +hidden: 'bool' = False +``` + +Generate HTML containing an iframe displaying this report. + +##### Arguments + +- `height`: +- `hidden`: + + + + + + diff --git a/models/ref/python/public-api/betareport/betareport-properties.mdx b/models/ref/python/public-api/betareport/betareport-properties.mdx new file mode 100644 index 0000000000..7b016bb731 --- /dev/null +++ b/models/ref/python/public-api/betareport/betareport-properties.mdx @@ -0,0 +1,55 @@ +--- +title: BetaReport properties +sidebarTitle: Properties +page_kind: class-properties +parent_slug: betareport +kind: class +namespace: wandb.apis.public.reports +--- + +## class wandb.apis.public.BetaReport + + + +### property created_at + + + +### property description + + + +### property display_name + + + +### property id + + + +### property name + + + +### property sections + +Get the panel sections (groups) from the report. + +### property spec + + + +### property updated_at + + + +### property url + + + +### property user + + + + + diff --git a/models/ref/python/public-api/downloadhistoryresult.mdx b/models/ref/python/public-api/downloadhistoryresult.mdx index b58f99b449..9f8f90080a 100644 --- a/models/ref/python/public-api/downloadhistoryresult.mdx +++ b/models/ref/python/public-api/downloadhistoryresult.mdx @@ -40,7 +40,3 @@ Result of downloading a run's history exports. - - - - diff --git a/models/ref/python/public-api/file.mdx b/models/ref/python/public-api/file.mdx index f6ccad2f6c..349f0ce3ec 100644 --- a/models/ref/python/public-api/file.mdx +++ b/models/ref/python/public-api/file.mdx @@ -45,53 +45,3 @@ file logged to a specific run. You can search using the following keys: -## Properties - -### property path_uri - -Returns the URI path to the file in the storage bucket. - -### property size - -Returns the size of the file in bytes. - - - -## Methods - -### method File.delete() - -```python -self -``` - -Delete the file from the W&B server. - - - - - -### method File.download() - -```python -self, -root: 'str' = '.', -replace: 'bool' = False, -exist_ok: 'bool' = False, -api: 'Api | None' = None -``` - -Downloads a file previously saved by a run from the wandb server. - -##### Arguments - -- `root`: Local directory to save the file. Defaults to the current working directory ("."). -- `replace`: If `True`, download will overwrite a local file if it exists. Defaults to `False`. -- `exist_ok`: If `True`, will not raise ValueError if file already exists and will not re-download unless replace=True. Defaults to `False`. -- `api`: If specified, the `Api` instance used to download the file. - - - - - - diff --git a/models/ref/python/public-api/file/file-methods.mdx b/models/ref/python/public-api/file/file-methods.mdx new file mode 100644 index 0000000000..322734acd9 --- /dev/null +++ b/models/ref/python/public-api/file/file-methods.mdx @@ -0,0 +1,49 @@ +--- +title: File methods +sidebarTitle: Methods +page_kind: class-methods +parent_slug: file +kind: class +namespace: wandb.apis.public.files +--- + +## class wandb.apis.public.File + + + +### method File.delete() + +```python +self +``` + +Delete the file from the W&B server. + + + + + +### method File.download() + +```python +self, +root: 'str' = '.', +replace: 'bool' = False, +exist_ok: 'bool' = False, +api: 'Api | None' = None +``` + +Downloads a file previously saved by a run from the wandb server. + +##### Arguments + +- `root`: Local directory to save the file. Defaults to the current working directory ("."). +- `replace`: If `True`, download will overwrite a local file if it exists. Defaults to `False`. +- `exist_ok`: If `True`, will not raise ValueError if file already exists and will not re-download unless replace=True. Defaults to `False`. +- `api`: If specified, the `Api` instance used to download the file. + + + + + + diff --git a/models/ref/python/public-api/file/file-properties.mdx b/models/ref/python/public-api/file/file-properties.mdx new file mode 100644 index 0000000000..269f0cfd41 --- /dev/null +++ b/models/ref/python/public-api/file/file-properties.mdx @@ -0,0 +1,23 @@ +--- +title: File properties +sidebarTitle: Properties +page_kind: class-properties +parent_slug: file +kind: class +namespace: wandb.apis.public.files +--- + +## class wandb.apis.public.File + + + +### property path_uri + +Returns the URI path to the file in the storage bucket. + +### property size + +Returns the size of the file in bytes. + + + diff --git a/models/ref/python/public-api/files.mdx b/models/ref/python/public-api/files.mdx index cc469f6e5d..99c5375a65 100644 --- a/models/ref/python/public-api/files.mdx +++ b/models/ref/python/public-api/files.mdx @@ -64,21 +64,3 @@ for file in files: file.download(root="download_directory", replace=True) ``` - - -## Methods - -### method Paginator.__next__() - -```python -self -``` - -Return the next item from the iterator. When exhausted, raise StopIteration - - - - - - - diff --git a/models/ref/python/public-api/files/files-methods.mdx b/models/ref/python/public-api/files/files-methods.mdx new file mode 100644 index 0000000000..e1a3b7865b --- /dev/null +++ b/models/ref/python/public-api/files/files-methods.mdx @@ -0,0 +1,27 @@ +--- +title: Files methods +sidebarTitle: Methods +page_kind: class-methods +parent_slug: files +kind: class +namespace: wandb.apis.public.files +--- + +## class wandb.apis.public.Files + + + +### method Paginator.__next__() + +```python +self +``` + +Return the next item from the iterator. When exhausted, raise StopIteration + + + + + + + diff --git a/models/ref/python/public-api/incompleterunhistoryerror.mdx b/models/ref/python/public-api/incompleterunhistoryerror.mdx index 3425cc2fd0..51ab6e1ff1 100644 --- a/models/ref/python/public-api/incompleterunhistoryerror.mdx +++ b/models/ref/python/public-api/incompleterunhistoryerror.mdx @@ -29,41 +29,3 @@ parquet files yet, typically because the run is still ongoing. - - -## Methods - -### method BaseException.add_note() - -```python -(self, object, /) -``` - -Exception.add_note(note) -- -add a note to the exception - -##### Arguments - -- `object`: - - - - -### method BaseException.with_traceback() - -```python -(self, object, /) -``` - -Exception.with_traceback(tb) -- -set self.__traceback__ to tb and return self. - -##### Arguments - -- `object`: - - - - - - diff --git a/models/ref/python/public-api/incompleterunhistoryerror/incompleterunhistoryerror-methods.mdx b/models/ref/python/public-api/incompleterunhistoryerror/incompleterunhistoryerror-methods.mdx new file mode 100644 index 0000000000..c021f39479 --- /dev/null +++ b/models/ref/python/public-api/incompleterunhistoryerror/incompleterunhistoryerror-methods.mdx @@ -0,0 +1,47 @@ +--- +title: IncompleteRunHistoryError methods +sidebarTitle: Methods +page_kind: class-methods +parent_slug: incompleterunhistoryerror +kind: class +namespace: wandb.apis.public.runhistory.downloads +--- + +## class wandb.apis.public.IncompleteRunHistoryError + + + +### method BaseException.add_note() + +```python +(self, object, /) +``` + +Exception.add_note(note) -- +add a note to the exception + +##### Arguments + +- `object`: + + + + +### method BaseException.with_traceback() + +```python +(self, object, /) +``` + +Exception.with_traceback(tb) -- +set self.__traceback__ to tb and return self. + +##### Arguments + +- `object`: + + + + + + diff --git a/models/ref/python/public-api/member.mdx b/models/ref/python/public-api/member.mdx index 738b94e2e6..084acc2f51 100644 --- a/models/ref/python/public-api/member.mdx +++ b/models/ref/python/public-api/member.mdx @@ -35,21 +35,3 @@ A member of a team. - - -## Methods - -### method Member.delete() - -```python -(self) -``` - -Remove a member from a team. - - - - - - - diff --git a/models/ref/python/public-api/member/member-methods.mdx b/models/ref/python/public-api/member/member-methods.mdx new file mode 100644 index 0000000000..fb8bd390a5 --- /dev/null +++ b/models/ref/python/public-api/member/member-methods.mdx @@ -0,0 +1,27 @@ +--- +title: Member methods +sidebarTitle: Methods +page_kind: class-methods +parent_slug: member +kind: class +namespace: wandb.apis.public.teams +--- + +## class wandb.apis.public.Member + + + +### method Member.delete() + +```python +(self) +``` + +Remove a member from a team. + + + + + + + diff --git a/models/ref/python/public-api/organization.mdx b/models/ref/python/public-api/organization.mdx index 92062f5bbb..dd3ff1a099 100644 --- a/models/ref/python/public-api/organization.mdx +++ b/models/ref/python/public-api/organization.mdx @@ -40,7 +40,3 @@ Users should never need to instantiate this class directly. Use - - - - diff --git a/models/ref/python/public-api/project.mdx b/models/ref/python/public-api/project.mdx index b57d06c2ba..c297cd3f8f 100644 --- a/models/ref/python/public-api/project.mdx +++ b/models/ref/python/public-api/project.mdx @@ -7,7 +7,7 @@ namespace: wandb.apis.public.projects import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; - + @@ -37,84 +37,3 @@ A project is a namespace for runs. -## Properties - -### property id - - - -### property owner - -Returns the project owner as a User object. - -### property path - -Returns the path of the project. The path is a list containing the -entity and project name. - -### property url - -Returns the URL of the project. - - - -## Methods - -### method Project.artifacts_types() - -```python -self, -per_page: 'int' = 50 -``` - -Returns all artifact types associated with this project. - -##### Arguments - -- `per_page`: - - - - -### method Project.collections() - -```python -self, -filters: 'Mapping[str, Any] | None' = None, -order: 'str | None' = None, -per_page: 'int' = 50 -``` - -Returns all artifact collections associated with this project. - -##### Arguments - -- `filters`: Optional mapping of filters to apply to the query. -- `order`: Optional string to specify the order of the results. If you prepend order with a + order is ascending (default). If you prepend order with a - order is descending. -- `per_page`: The number of artifact collections to fetch per page. Default is 50. - - - - -### method Project.sweeps() - -```python -self, -per_page: 'int' = 50, -filters: 'dict[str, Any] | None' = None, -order: 'str | None' = None -``` - -Return a paginated collection of sweeps in this project. - -##### Arguments - -- `per_page`: The number of sweeps to fetch per request to the API. -- `filters`: (dict) queries for specific sweeps using the runs filters, See wandb/apis/public/api.py:runs for more details. -- `order`: - - - - - - diff --git a/models/ref/python/public-api/project/project-methods.mdx b/models/ref/python/public-api/project/project-methods.mdx new file mode 100644 index 0000000000..25faf797da --- /dev/null +++ b/models/ref/python/public-api/project/project-methods.mdx @@ -0,0 +1,71 @@ +--- +title: Project methods +sidebarTitle: Methods +page_kind: class-methods +parent_slug: project +kind: class +namespace: wandb.apis.public.projects +--- + +## class wandb.apis.public.Project + + + +### method Project.artifacts_types() + +```python +self, +per_page: 'int' = 50 +``` + +Returns all artifact types associated with this project. + +##### Arguments + +- `per_page`: + + + + +### method Project.collections() + +```python +self, +filters: 'Mapping[str, Any] | None' = None, +order: 'str | None' = None, +per_page: 'int' = 50 +``` + +Returns all artifact collections associated with this project. + +##### Arguments + +- `filters`: Optional mapping of filters to apply to the query. +- `order`: Optional string to specify the order of the results. If you prepend order with a + order is ascending (default). If you prepend order with a - order is descending. +- `per_page`: The number of artifact collections to fetch per page. Default is 50. + + + + +### method Project.sweeps() + +```python +self, +per_page: 'int' = 50, +filters: 'dict[str, Any] | None' = None, +order: 'str | None' = None +``` + +Return a paginated collection of sweeps in this project. + +##### Arguments + +- `per_page`: The number of sweeps to fetch per request to the API. +- `filters`: (dict) queries for specific sweeps using the runs filters, See wandb/apis/public/api.py:runs for more details. +- `order`: + + + + + + diff --git a/models/ref/python/public-api/project/project-properties.mdx b/models/ref/python/public-api/project/project-properties.mdx new file mode 100644 index 0000000000..fbc5a7d966 --- /dev/null +++ b/models/ref/python/public-api/project/project-properties.mdx @@ -0,0 +1,32 @@ +--- +title: Project properties +sidebarTitle: Properties +page_kind: class-properties +parent_slug: project +kind: class +namespace: wandb.apis.public.projects +--- + +## class wandb.apis.public.Project + + + +### property id + + + +### property owner + +Returns the project owner as a User object. + +### property path + +Returns the path of the project. The path is a list containing the +entity and project name. + +### property url + +Returns the URL of the project. + + + diff --git a/models/ref/python/public-api/projectartifactcollections.mdx b/models/ref/python/public-api/projectartifactcollections.mdx index e9aedbe814..4a8bbd65c3 100644 --- a/models/ref/python/public-api/projectartifactcollections.mdx +++ b/models/ref/python/public-api/projectartifactcollections.mdx @@ -7,7 +7,7 @@ namespace: wandb.apis.public.artifacts import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; - + @@ -26,45 +26,3 @@ Artifact collections in a project. - - -## Methods - -### method RelayPaginator.convert_objects() - -```python -self -``` - -Convert the last fetched response data into the iterated objects. - - - - - -### method Paginator.__next__() - -```python -self -``` - -Return the next item from the iterator. When exhausted, raise StopIteration - - - - - -### method Paginator.update_variables() - -```python -self -``` - -Update the query variables for the next page fetch. - - - - - - - diff --git a/models/ref/python/public-api/projectartifactcollections/projectartifactcollections-methods.mdx b/models/ref/python/public-api/projectartifactcollections/projectartifactcollections-methods.mdx new file mode 100644 index 0000000000..ef8184eb28 --- /dev/null +++ b/models/ref/python/public-api/projectartifactcollections/projectartifactcollections-methods.mdx @@ -0,0 +1,51 @@ +--- +title: ProjectArtifactCollections methods +sidebarTitle: Methods +page_kind: class-methods +parent_slug: projectartifactcollections +kind: class +namespace: wandb.apis.public.artifacts +--- + +## class wandb.apis.public.ProjectArtifactCollections + + + +### method RelayPaginator.convert_objects() + +```python +self +``` + +Convert the last fetched response data into the iterated objects. + + + + + +### method Paginator.__next__() + +```python +self +``` + +Return the next item from the iterator. When exhausted, raise StopIteration + + + + + +### method Paginator.update_variables() + +```python +self +``` + +Update the query variables for the next page fetch. + + + + + + + diff --git a/models/ref/python/public-api/projects.mdx b/models/ref/python/public-api/projects.mdx index 29d68cc1e9..c93c3231d0 100644 --- a/models/ref/python/public-api/projects.mdx +++ b/models/ref/python/public-api/projects.mdx @@ -51,45 +51,3 @@ for project in projects: print(f"- Is benchmark: {project.is_benchmark}") ``` - - -## Methods - -### method RelayPaginator.convert_objects() - -```python -self -``` - -Convert the last fetched response data into the iterated objects. - - - - - -### method Paginator.__next__() - -```python -self -``` - -Return the next item from the iterator. When exhausted, raise StopIteration - - - - - -### method Paginator.update_variables() - -```python -self -``` - -Update the query variables for the next page fetch. - - - - - - - diff --git a/models/ref/python/public-api/projects/projects-methods.mdx b/models/ref/python/public-api/projects/projects-methods.mdx new file mode 100644 index 0000000000..b183596f23 --- /dev/null +++ b/models/ref/python/public-api/projects/projects-methods.mdx @@ -0,0 +1,51 @@ +--- +title: Projects methods +sidebarTitle: Methods +page_kind: class-methods +parent_slug: projects +kind: class +namespace: wandb.apis.public.projects +--- + +## class wandb.apis.public.Projects + + + +### method RelayPaginator.convert_objects() + +```python +self +``` + +Convert the last fetched response data into the iterated objects. + + + + + +### method Paginator.__next__() + +```python +self +``` + +Return the next item from the iterator. When exhausted, raise StopIteration + + + + + +### method Paginator.update_variables() + +```python +self +``` + +Update the query variables for the next page fetch. + + + + + + + diff --git a/models/ref/python/public-api/registry.mdx b/models/ref/python/public-api/registry.mdx index b479fd49a0..19fd81a0d8 100644 --- a/models/ref/python/public-api/registry.mdx +++ b/models/ref/python/public-api/registry.mdx @@ -39,329 +39,3 @@ A single registry in the Registry. -## Properties - -### property allow_all_artifact_types - -Return whether all artifact types are allowed in the registry. - -If `True`, artifacts of any type can be added. If `False`, artifacts are -restricted to the types listed in `artifact_types`. - -### property artifact_types - -Returns the artifact types allowed in the registry. - -If `allow_all_artifact_types` is `True` then `artifact_types` reflects the -types previously saved or currently used in the registry. -If `allow_all_artifact_types` is `False` then artifacts are restricted to the -types in `artifact_types`. - -Note: - Previously saved artifact types cannot be removed. - -### property created_at - -Timestamp of when the registry was created. - -### property description - -Description of the registry. - -### property entity - -Organization entity of the registry. - -### property full_name - -Full name of the registry including the `wandb-registry-` prefix. - -### property id - -The unique ID for this registry. - -### property name - -Name of the registry without the `wandb-registry-` prefix. - -### property organization - -Organization name of the registry. - -### property path - - - -### property updated_at - -Timestamp of when the registry was last updated. - -### property visibility - -Visibility of the registry. - - - -## Methods - -### method Registry.add_members() - -```python -self, *members: 'User | UserMember | Team | TeamMember | str' -``` - -Adds users or teams to this registry. - -##### Arguments - -- `members`: The users or teams to add to the registry. Accepts `User` objects, `Team` objects, or their string IDs. - - -##### Raises - -- `TypeError`: If no members are passed as arguments. -- `ValueError`: If unable to infer or parse the user or team IDs. - - -##### Examples - -```python -import wandb - -api = wandb.Api() - -# Fetch an existing registry -registry = api.registry(name="my-registry", organization="my-org") - -user1 = api.user(username="some-user") -user2 = api.user(username="other-user") -registry.add_members(user1, user2) - -my_team = api.team(name="my-team") -registry.add_members(my_team) -``` - -### method Registry.collections() - -```python -self, -filter: 'dict[str, Any] | None' = None, -order: 'str | None' = None, -per_page: 'PositiveInt' = 100, -start: 'str | None' = None -``` - -Returns the collections belonging to this registry. - -##### Arguments - -- `filter`: Optional mapping of filters to apply to the collections query. -- `order`: Optional string to specify the order of the results. If prefixed with '+', sorts ascending (default). If prefixed with '-', sorts descending. -- `per_page`: The number of results to fetch per page. Usually there is no reason to change this. -- `start`: Pagination cursor for resuming a past query, captured from a previous paginator's `.cursor` attribute. - - - - -### method Registry.create() - -```python -api: 'Api', -organization: 'str', -name: 'str', -visibility: "Literal['organization', 'restricted']", -description: 'str | None' = None, -artifact_types: 'list[str] | None' = None -``` - -Create a new registry. - -The registry name must be unique within the organization. -This function should be called using `api.create_registry()` - -##### Arguments - -- `api`: The W&B API instance. -- `organization`: The name of the organization. -- `name`: The name of the registry (without the `wandb-registry-` prefix). -- `visibility`: The visibility level ('organization' or 'restricted'). -- `description`: An optional description for the registry. -- `artifact_types`: An optional list of allowed artifact types. - - -##### Raises - -- `ValueError`: If a registry with the same name already exists in the organization or if the creation fails. - - -### method Registry.delete() - -```python -self -``` - -Delete the registry. This is irreversible. - - - - - -### method Registry.load() - -```python -self -``` - -Load registry attributes from the backend. - - - - - -### method Registry.members() - -```python -self -``` - -Returns the current members (users and teams) of this registry. - - - - - -### method Registry.remove_members() - -```python -self, *members: 'User | UserMember | Team | TeamMember | str' -``` - -Removes users or teams from this registry. - -##### Arguments - -- `members`: The users or teams to remove from the registry. Accepts `User` objects, `Team` objects, or their string IDs. - - -##### Raises - -- `TypeError`: If no members are passed as arguments. -- `ValueError`: If unable to infer or parse the user or team IDs. - - -##### Examples - -```python -import wandb - -api = wandb.Api() - -# Fetch an existing registry -registry = api.registry(name="my-registry", organization="my-org") - -user1 = api.user(username="some-user") -user2 = api.user(username="other-user") -registry.remove_members(user1, user2) - -old_team = api.team(name="old-team") -registry.remove_members(old_team) -``` - -### method Registry.save() - -```python -self -``` - -Save registry attributes to the backend. - - - - - -### method Registry.team_members() - -```python -self -``` - -Returns the current member teams of this registry. - - - - - -### method Registry.update_member() - -```python -self, -member: 'User | UserMember | Team | TeamMember | str', -role: 'MemberRole | str' -``` - -Updates the role of a member (user or team) within this registry. - -##### Arguments - -- `member`: The user or team to update the role of. Accepts a `User` object, `Team` object, or their string ID. -- `role`: The new role to assign to the member. May be one of: - - "admin" - - "member" - - "viewer" - - "restricted_viewer" (if supported by the W&B server) - - -##### Raises - -- `ValueError`: If unable to infer the user or team ID. - - -##### Examples - -Make all users in the registry admins -```python -import wandb - -api = wandb.Api() - -# Fetch an existing registry -registry = api.registry(name="my-registry", organization="my-org") - -for member in registry.user_members(): - registry.update_member(member.user, role="admin") -``` - -### method Registry.user_members() - -```python -self -``` - -Returns the current member users of this registry. - - - - - -### method Registry.versions() - -```python -self, -filter: 'dict[str, Any] | None' = None, -per_page: 'PositiveInt' = 100, -start: 'str | None' = None -``` - -Returns the artifact versions belonging to this registry. - -##### Arguments - -- `filter`: Optional mapping of filters to apply to the artifact versions query. -- `per_page`: The number of results to fetch per page. Usually there is no reason to change this. -- `start`: Pagination cursor for resuming a past query, captured from a previous paginator's `.cursor` attribute. - - - - - - diff --git a/models/ref/python/public-api/registry/registry-methods.mdx b/models/ref/python/public-api/registry/registry-methods.mdx new file mode 100644 index 0000000000..986f5329d4 --- /dev/null +++ b/models/ref/python/public-api/registry/registry-methods.mdx @@ -0,0 +1,274 @@ +--- +title: Registry methods +sidebarTitle: Methods +page_kind: class-methods +parent_slug: registry +kind: class +namespace: wandb.apis.public.registries.registry +--- + +## class wandb.apis.public.Registry + + + +### method Registry.add_members() + +```python +self, *members: 'User | UserMember | Team | TeamMember | str' +``` + +Adds users or teams to this registry. + +##### Arguments + +- `members`: The users or teams to add to the registry. Accepts `User` objects, `Team` objects, or their string IDs. + + +##### Raises + +- `TypeError`: If no members are passed as arguments. +- `ValueError`: If unable to infer or parse the user or team IDs. + + +##### Examples + +```python +import wandb + +api = wandb.Api() + +# Fetch an existing registry +registry = api.registry(name="my-registry", organization="my-org") + +user1 = api.user(username="some-user") +user2 = api.user(username="other-user") +registry.add_members(user1, user2) + +my_team = api.team(name="my-team") +registry.add_members(my_team) +``` + +### method Registry.collections() + +```python +self, +filter: 'dict[str, Any] | None' = None, +order: 'str | None' = None, +per_page: 'PositiveInt' = 100, +start: 'str | None' = None +``` + +Returns the collections belonging to this registry. + +##### Arguments + +- `filter`: Optional mapping of filters to apply to the collections query. +- `order`: Optional string to specify the order of the results. If prefixed with '+', sorts ascending (default). If prefixed with '-', sorts descending. +- `per_page`: The number of results to fetch per page. Usually there is no reason to change this. +- `start`: Pagination cursor for resuming a past query, captured from a previous paginator's `.cursor` attribute. + + + + +### method Registry.create() + +```python +api: 'Api', +organization: 'str', +name: 'str', +visibility: "Literal['organization', 'restricted']", +description: 'str | None' = None, +artifact_types: 'list[str] | None' = None +``` + +Create a new registry. + +The registry name must be unique within the organization. +This function should be called using `api.create_registry()` + +##### Arguments + +- `api`: The W&B API instance. +- `organization`: The name of the organization. +- `name`: The name of the registry (without the `wandb-registry-` prefix). +- `visibility`: The visibility level ('organization' or 'restricted'). +- `description`: An optional description for the registry. +- `artifact_types`: An optional list of allowed artifact types. + + +##### Raises + +- `ValueError`: If a registry with the same name already exists in the organization or if the creation fails. + + +### method Registry.delete() + +```python +self +``` + +Delete the registry. This is irreversible. + + + + + +### method Registry.load() + +```python +self +``` + +Load registry attributes from the backend. + + + + + +### method Registry.members() + +```python +self +``` + +Returns the current members (users and teams) of this registry. + + + + + +### method Registry.remove_members() + +```python +self, *members: 'User | UserMember | Team | TeamMember | str' +``` + +Removes users or teams from this registry. + +##### Arguments + +- `members`: The users or teams to remove from the registry. Accepts `User` objects, `Team` objects, or their string IDs. + + +##### Raises + +- `TypeError`: If no members are passed as arguments. +- `ValueError`: If unable to infer or parse the user or team IDs. + + +##### Examples + +```python +import wandb + +api = wandb.Api() + +# Fetch an existing registry +registry = api.registry(name="my-registry", organization="my-org") + +user1 = api.user(username="some-user") +user2 = api.user(username="other-user") +registry.remove_members(user1, user2) + +old_team = api.team(name="old-team") +registry.remove_members(old_team) +``` + +### method Registry.save() + +```python +self +``` + +Save registry attributes to the backend. + + + + + +### method Registry.team_members() + +```python +self +``` + +Returns the current member teams of this registry. + + + + + +### method Registry.update_member() + +```python +self, +member: 'User | UserMember | Team | TeamMember | str', +role: 'MemberRole | str' +``` + +Updates the role of a member (user or team) within this registry. + +##### Arguments + +- `member`: The user or team to update the role of. Accepts a `User` object, `Team` object, or their string ID. +- `role`: The new role to assign to the member. May be one of: + - "admin" + - "member" + - "viewer" + - "restricted_viewer" (if supported by the W&B server) + + +##### Raises + +- `ValueError`: If unable to infer the user or team ID. + + +##### Examples + +Make all users in the registry admins +```python +import wandb + +api = wandb.Api() + +# Fetch an existing registry +registry = api.registry(name="my-registry", organization="my-org") + +for member in registry.user_members(): + registry.update_member(member.user, role="admin") +``` + +### method Registry.user_members() + +```python +self +``` + +Returns the current member users of this registry. + + + + + +### method Registry.versions() + +```python +self, +filter: 'dict[str, Any] | None' = None, +per_page: 'PositiveInt' = 100, +start: 'str | None' = None +``` + +Returns the artifact versions belonging to this registry. + +##### Arguments + +- `filter`: Optional mapping of filters to apply to the artifact versions query. +- `per_page`: The number of results to fetch per page. Usually there is no reason to change this. +- `start`: Pagination cursor for resuming a past query, captured from a previous paginator's `.cursor` attribute. + + + + + + diff --git a/models/ref/python/public-api/registry/registry-properties.mdx b/models/ref/python/public-api/registry/registry-properties.mdx new file mode 100644 index 0000000000..43e54e4d5c --- /dev/null +++ b/models/ref/python/public-api/registry/registry-properties.mdx @@ -0,0 +1,74 @@ +--- +title: Registry properties +sidebarTitle: Properties +page_kind: class-properties +parent_slug: registry +kind: class +namespace: wandb.apis.public.registries.registry +--- + +## class wandb.apis.public.Registry + + + +### property allow_all_artifact_types + +Return whether all artifact types are allowed in the registry. + +If `True`, artifacts of any type can be added. If `False`, artifacts are +restricted to the types listed in `artifact_types`. + +### property artifact_types + +Returns the artifact types allowed in the registry. + +If `allow_all_artifact_types` is `True` then `artifact_types` reflects the +types previously saved or currently used in the registry. +If `allow_all_artifact_types` is `False` then artifacts are restricted to the +types in `artifact_types`. + +Note: + Previously saved artifact types cannot be removed. + +### property created_at + +Timestamp of when the registry was created. + +### property description + +Description of the registry. + +### property entity + +Organization entity of the registry. + +### property full_name + +Full name of the registry including the `wandb-registry-` prefix. + +### property id + +The unique ID for this registry. + +### property name + +Name of the registry without the `wandb-registry-` prefix. + +### property organization + +Organization name of the registry. + +### property path + + + +### property updated_at + +Timestamp of when the registry was last updated. + +### property visibility + +Visibility of the registry. + + + diff --git a/models/ref/python/public-api/reports.mdx b/models/ref/python/public-api/reports.mdx index 4a7d2f70a5..8dd8fe7e51 100644 --- a/models/ref/python/public-api/reports.mdx +++ b/models/ref/python/public-api/reports.mdx @@ -39,45 +39,3 @@ Reports is a lazy iterator of `BetaReport` objects. - - -## Methods - -### method Reports.convert_objects() - -```python -self -``` - -Converts GraphQL edges to File objects. - - - - - -### method Paginator.__next__() - -```python -self -``` - -Return the next item from the iterator. When exhausted, raise StopIteration - - - - - -### method Reports.update_variables() - -```python -self -``` - -Updates the GraphQL query variables for pagination. - - - - - - - diff --git a/models/ref/python/public-api/reports/reports-methods.mdx b/models/ref/python/public-api/reports/reports-methods.mdx new file mode 100644 index 0000000000..b97459dc7c --- /dev/null +++ b/models/ref/python/public-api/reports/reports-methods.mdx @@ -0,0 +1,51 @@ +--- +title: Reports methods +sidebarTitle: Methods +page_kind: class-methods +parent_slug: reports +kind: class +namespace: wandb.apis.public.reports +--- + +## class wandb.apis.public.Reports + + + +### method Reports.convert_objects() + +```python +self +``` + +Converts GraphQL edges to File objects. + + + + + +### method Paginator.__next__() + +```python +self +``` + +Return the next item from the iterator. When exhausted, raise StopIteration + + + + + +### method Reports.update_variables() + +```python +self +``` + +Updates the GraphQL query variables for pagination. + + + + + + + diff --git a/models/ref/python/public-api/run.mdx b/models/ref/python/public-api/run.mdx index f465e57fde..661de7de31 100644 --- a/models/ref/python/public-api/run.mdx +++ b/models/ref/python/public-api/run.mdx @@ -7,7 +7,7 @@ namespace: wandb.apis.public.runs import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; - + @@ -65,589 +65,3 @@ A single run associated with an entity and project. -## Properties - -### property config - -Get run config. Auto-loads full data if in lazy mode. - -### property entity - -The entity associated with the run. - -### property id - -The unique identifier for the run. - -### property lastHistoryStep - -Returns the last step logged in the run's history. - -### property metadata - -Metadata about the run from wandb-metadata.json. - -Metadata includes the run's description, tags, start time, memory -usage and more. - -### property name - -The name of the run. - -### property path - -The path of the run. The path is a list containing the entity, project, and run_id. - -### property rawconfig - -Get raw run config including internal keys. Auto-loads full data if in lazy mode. - -### property state - -The state of the run. - -The following table describes the possible states a run can be in: - -| State | Description | -| -------- | ----------- | -| Crashed | Run stopped sending heartbeats in the internal process, which can happen if the machine crashes. | -| Failed | Run ended with a non-zero exit status. | -| Finished | Run ended and fully synced data, or called `wandb.Run.finish()`. | -| Killed | Run was forcibly stopped before it could finish. | -| Running | Run is still running and has recently sent a heartbeat. | -| Pending | Run is scheduled but not yet started (common in sweeps and Launch jobs). | - -### property storage_id - -The unique storage identifier for the run. - -### property summary - -Get run summary metrics. Auto-loads full data if in lazy mode. - -### property summary_metrics - -Get run summary metrics. Auto-loads full data if in lazy mode. - -### property sweep - -The sweep associated with this run. Loads sweep data if include_sweeps is False. - -### property sweep_name - -Get sweep name. Always available since sweepName is in lightweight fragment. - -### property system_metrics - -Get run system metrics. Auto-loads full data if in lazy mode. - -### property url - -The URL of the run. - -The run URL is generated from the entity, project, and run_id. For -SaaS users, it takes the form of `https://wandb.ai/entity/project/run_id`. - -### property username - -This API is deprecated. Use `entity` instead. - - - -## Methods - -### method Run.beta_scan_history() - -```python -self, -keys: 'list[str] | None' = None, -page_size: 'int' = 1000, -min_step: 'int' = 0, -max_step: 'int | None' = None, -use_cache: 'bool' = True -``` - - - -##### Arguments - -- `keys`: -- `page_size`: -- `min_step`: -- `max_step`: -- `use_cache`: - - - - -### method Run.create() - -```python -api: 'public.Api', -run_id: 'str | None' = None, -project: 'str | None' = None, -entity: 'str | None' = None, -state: "Literal['running', 'pending']" = 'running' -``` - -Create a run for the given project. - -For most use cases, use `wandb.init()`. `wandb.init()` provides more robust -logic for creating and updating runs. `wandb.apis.public.Run.create` -is intended for specific scenarios such as creating runs in -a "pending" state for jobs that may be unschedulable -(for example, in a Kubernetes cluster with insufficient GPUs or high -contention). These pending runs can later be resumed and tracked by W&B. - -Runs created with this method have limited functionality. Calling -`update()` on a run created this way may not work as expected. - -##### Arguments - -- `api`: The W&B API instance. -- `run_id`: Optional run ID. If not provided, a random ID will be generated. -- `project`: Optional project name. Defaults to the project in API settings or "uncategorized". -- `entity`: Optional entity (user or team) name. -- `state`: Initial state of the run. Use "pending" for runs that will be resumed later, or "running" for immediate execution. - - - - -##### Examples - -Creating a pending run for later execution - -```python -import wandb - -api = wandb.Api() - -run_name = "my-pending-run" - -run = Run.create( - api=api, - project="project", - entity="entity", - state="pending", - run_id=run_name, -) -``` - -### method Run.delete() - -```python -self, -delete_artifacts: 'bool' = False -``` - -Delete the given run from the wandb backend. - -##### Arguments - -- `delete_artifacts`: Whether to delete the artifacts associated with the run. - - - - -### method Run.download_history_exports() - -```python -self, -download_dir: 'pathlib.Path | str', -require_complete_history: 'bool' = True -``` - -Download any parquet history files for the run to the provided directory. - -##### Arguments - -- `download_dir`: The directory to download the history files to. -- `require_complete_history`: Whether to require the complete history to be downloaded. If true, and the run contains data that has not been exported to parquet files yet, an IncompleteRunHistoryError will be raised. - - -##### Raises - -- `IncompleteRunHistoryError`: If require_complete_history is True and the run contains data not yet exported to parquet files. -- `WandbApiFailedError`: If the API request fails for reasons other than incomplete history. - - -### method Run.file() - -```python -self, -name: 'str' -``` - -Return the path of a file with a given name in the artifact. - -##### Arguments - -- `name`: name of requested file. - - - - -### method Run.files() - -```python -self, -names: 'list[str] | None' = None, -pattern: 'str | None' = None, -per_page: 'int' = 50 -``` - -Returns a `Files` object for all files in the run which match the given criteria. - -You can specify a list of exact file names to match, or a pattern to match against. -If both are provided, the pattern will be ignored. - -##### Arguments - -- `names`: names of the requested files, if empty returns all files -- `pattern`: Pattern to match when returning files from W&B. This pattern uses mySQL's LIKE syntax, so matching all files that end with .json would be "%.json". If both names and pattern are provided, a ValueError will be raised. -- `per_page`: number of results per page. - - - - -### method Run.history() - -```python -self, -samples: 'int' = 500, -keys: 'list[str] | None' = None, -x_axis: 'str' = '_step', -pandas: 'bool' = True, -stream: "Literal['default', 'system']" = 'default' -``` - -Return sampled history metrics for a run. - -This is simpler and faster if you are ok with the history records being sampled. - -##### Arguments - -- `samples`: (int, optional) The number of samples to return -- `keys`: (list, optional) Only return metrics for specific keys -- `x_axis`: (str, optional) Use this metric as the xAxis defaults to _step -- `pandas`: (bool, optional) Return a pandas dataframe -- `stream`: (str, optional) "default" for metrics, "system" for machine metrics - - - - -### method Run.load() - -```python -self, -force: 'bool' = False -``` - -Load run data using appropriate fragment based on lazy mode. - -##### Arguments - -- `force`: If True, re-fetch the run data from the server, even if it is already loaded. - - -##### Raises - -- `RunNotFoundError`: If the run is not found, or the run data can not be loaded. - - -### method Run.load_full_data() - -```python -self, -force: 'bool' = False -``` - -Load full run data including heavy fields like config, systemMetrics, summaryMetrics. - -This method is useful when you initially used lazy=True for listing runs, -but need access to the full data for specific runs. - -##### Arguments - -- `force`: Force reload even if data is already loaded - - - - -### method Run.log_artifact() - -```python -self, -artifact: 'wandb.Artifact', -aliases: 'Collection[str] | None' = None, -tags: 'Collection[str] | None' = None -``` - -Declare an artifact as output of a run. - -##### Arguments - -- `artifact`: An artifact returned from `wandb.Api().artifact(name)`. -- `aliases`: Aliases to apply to this artifact. -- `tags`: (list, optional) Tags to apply to this artifact, if any. - - - - -### method Run.logged_artifacts() - -```python -self, -per_page: 'int' = 100 -``` - -Fetches all artifacts logged by this run. - -Retrieves all output artifacts that were logged during the run. Returns a -paginated result that can be iterated over or collected into a single list. - -##### Arguments - -- `per_page`: Number of artifacts to fetch per API request. - - - - -##### Examples - -```python -import wandb -import tempfile - -with tempfile.NamedTemporaryFile(mode="w", delete=False, suffix=".txt") as tmp: - tmp.write("This is a test artifact") - tmp_path = tmp.name -run = wandb.init(project="artifact-example") -artifact = wandb.Artifact("test_artifact", type="dataset") -artifact.add_file(tmp_path) -run.log_artifact(artifact) -run.finish() - -api = wandb.Api() - -finished_run = api.run(f"{run.entity}/{run.project}/{run.id}") - -for logged_artifact in finished_run.logged_artifacts(): - print(logged_artifact.name) -``` - -### method Run.save() - -```python -self -``` - -Persist changes to the run object to the W&B backend. - - - - - -### method Run.scan_history() - -```python -self, -keys: 'list[str] | None' = None, -page_size: 'int' = 1000, -min_step: 'int' = 0, -max_step: 'int | None' = None, -use_cache: 'bool' = True -``` - -Returns an iterable collection of all history records for a run. - -##### Arguments - -- `keys`: list of metrics to read from the run's history. if no keys are provided then all metrics will be returned. -- `page_size`: the number of history records to read at a time. -- `min_step`: The minimum step to start reading history from (inclusive). -- `max_step`: The maximum step to read history up to (exclusive). -- `use_cache`: When set to True, checks the WANDB_CACHE_DIR for a run history. If the run history is not found in the cache, it will be downloaded from the server. If set to False, the run history will be downloaded every time. - - - - -### method Run.stop() - -```python -self -``` - -Request that this run stop gracefully. - -This sets the run's stop flag on the W&B backend, the same signal -sent by the "Stop run" button in the W&B App UI. The process running -the run picks the flag up through its regular heartbeat and shuts -the run down gracefully, so this is safe for terminating remote runs -(for example, runs on Kubernetes pods). - -Stopping is asynchronous: this method returns once the backend has -flagged the run, not once the run terminates. Calling it again, or -on a run that is no longer running, has no effect. - - - -##### Raises - -- ``wandb.Error``: If the request fails. - - -##### Examples - -```python -import wandb - -run = wandb.Api().run("entity/project/run_id") -run.stop() -``` - -### method Run.to_html() - -```python -self, -height: 'int' = 420, -hidden: 'bool' = False -``` - -Generate HTML containing an iframe displaying this run. - -##### Arguments - -- `height`: -- `hidden`: - - - - -### method Run.update() - -```python -self -``` - -Persist changes to the run object to the wandb backend. - - - - - -### method Run.update_state() - -```python -self, -state: 'str' -``` - -Update the state of a run. - -Supported transitions: - - to `pending` from `running`, `failed`, `crashed`, or `preempted` - (e.g. to requeue a terminated or in-progress run) - - to `failed` from `pending` or `running` - (e.g. to mark a preempted or lost run as failed) - -Sweep runs cannot have their state updated. - -See `Run.state` for the list of possible run states. - -##### Arguments - -- `state`: The target run state. One of `"pending"` or `"failed"`. - - -##### Raises - -- ``wandb.Error``: If the requested state transition is not allowed, or the server does not support this operation. - - -### method Run.upload_file() - -```python -self, -path: 'str', -root: 'str' = '.' -``` - -Upload a local file to W&B, associating it with this run. - -##### Arguments - -- `path`: Path to the file to upload. Can be absolute or relative. -- `root`: The root path to save the file relative to. For example, if you want to have the file saved in the run as "my_dir/file.txt" and you're currently in "my_dir" you would set root to "../". Defaults to current directory ("."). - - - - -### method Run.use_artifact() - -```python -self, -artifact: 'wandb.Artifact', -use_as: 'str | None' = None -``` - -Declare an artifact as an input to a run. - -##### Arguments - -- `artifact`: An artifact returned from `wandb.Api().artifact(name)` -- `use_as`: A string identifying how the artifact is used in the script. Used to easily differentiate artifacts used in a run, when using the beta wandb launch feature's artifact swapping functionality. - - - - -### method Run.used_artifacts() - -```python -self, -per_page: 'int' = 100 -``` - -Fetches artifacts explicitly used by this run. - -Retrieves only the input artifacts that were explicitly declared as used -during the run, typically via `run.use_artifact()`. Returns a paginated -result that can be iterated over or collected into a single list. - -##### Arguments - -- `per_page`: Number of artifacts to fetch per API request. - - - - -##### Examples - -```python -import wandb - -run = wandb.init(project="artifact-example") -run.use_artifact("test_artifact:latest") -run.finish() - -api = wandb.Api() -finished_run = api.run(f"{run.entity}/{run.project}/{run.id}") -for used_artifact in finished_run.used_artifacts(): - print(used_artifact.name) -test_artifact -``` - -### method Run.wait_until_finished() - -```python -self -``` - -Check the state of the run until it is finished. - - - - - - - diff --git a/models/ref/python/public-api/run/run-methods.mdx b/models/ref/python/public-api/run/run-methods.mdx new file mode 100644 index 0000000000..80bc41462e --- /dev/null +++ b/models/ref/python/public-api/run/run-methods.mdx @@ -0,0 +1,508 @@ +--- +title: Run methods +sidebarTitle: Methods +page_kind: class-methods +parent_slug: run +kind: class +namespace: wandb.apis.public.runs +--- + +## class wandb.apis.public.Run + + + +### method Run.beta_scan_history() + +```python +self, +keys: 'list[str] | None' = None, +page_size: 'int' = 1000, +min_step: 'int' = 0, +max_step: 'int | None' = None, +use_cache: 'bool' = True +``` + + + +##### Arguments + +- `keys`: +- `page_size`: +- `min_step`: +- `max_step`: +- `use_cache`: + + + + +### method Run.create() + +```python +api: 'public.Api', +run_id: 'str | None' = None, +project: 'str | None' = None, +entity: 'str | None' = None, +state: "Literal['running', 'pending']" = 'running' +``` + +Create a run for the given project. + +For most use cases, use `wandb.init()`. `wandb.init()` provides more robust +logic for creating and updating runs. `wandb.apis.public.Run.create` +is intended for specific scenarios such as creating runs in +a "pending" state for jobs that may be unschedulable +(for example, in a Kubernetes cluster with insufficient GPUs or high +contention). These pending runs can later be resumed and tracked by W&B. + +Runs created with this method have limited functionality. Calling +`update()` on a run created this way may not work as expected. + +##### Arguments + +- `api`: The W&B API instance. +- `run_id`: Optional run ID. If not provided, a random ID will be generated. +- `project`: Optional project name. Defaults to the project in API settings or "uncategorized". +- `entity`: Optional entity (user or team) name. +- `state`: Initial state of the run. Use "pending" for runs that will be resumed later, or "running" for immediate execution. + + + + +##### Examples + +Creating a pending run for later execution + +```python +import wandb + +api = wandb.Api() + +run_name = "my-pending-run" + +run = Run.create( + api=api, + project="project", + entity="entity", + state="pending", + run_id=run_name, +) +``` + +### method Run.delete() + +```python +self, +delete_artifacts: 'bool' = False +``` + +Delete the given run from the wandb backend. + +##### Arguments + +- `delete_artifacts`: Whether to delete the artifacts associated with the run. + + + + +### method Run.download_history_exports() + +```python +self, +download_dir: 'pathlib.Path | str', +require_complete_history: 'bool' = True +``` + +Download any parquet history files for the run to the provided directory. + +##### Arguments + +- `download_dir`: The directory to download the history files to. +- `require_complete_history`: Whether to require the complete history to be downloaded. If true, and the run contains data that has not been exported to parquet files yet, an IncompleteRunHistoryError will be raised. + + +##### Raises + +- `IncompleteRunHistoryError`: If require_complete_history is True and the run contains data not yet exported to parquet files. +- `WandbApiFailedError`: If the API request fails for reasons other than incomplete history. + + +### method Run.file() + +```python +self, +name: 'str' +``` + +Return the path of a file with a given name in the artifact. + +##### Arguments + +- `name`: name of requested file. + + + + +### method Run.files() + +```python +self, +names: 'list[str] | None' = None, +pattern: 'str | None' = None, +per_page: 'int' = 50 +``` + +Returns a `Files` object for all files in the run which match the given criteria. + +You can specify a list of exact file names to match, or a pattern to match against. +If both are provided, the pattern will be ignored. + +##### Arguments + +- `names`: names of the requested files, if empty returns all files +- `pattern`: Pattern to match when returning files from W&B. This pattern uses mySQL's LIKE syntax, so matching all files that end with .json would be "%.json". If both names and pattern are provided, a ValueError will be raised. +- `per_page`: number of results per page. + + + + +### method Run.history() + +```python +self, +samples: 'int' = 500, +keys: 'list[str] | None' = None, +x_axis: 'str' = '_step', +pandas: 'bool' = True, +stream: "Literal['default', 'system']" = 'default' +``` + +Return sampled history metrics for a run. + +This is simpler and faster if you are ok with the history records being sampled. + +##### Arguments + +- `samples`: (int, optional) The number of samples to return +- `keys`: (list, optional) Only return metrics for specific keys +- `x_axis`: (str, optional) Use this metric as the xAxis defaults to _step +- `pandas`: (bool, optional) Return a pandas dataframe +- `stream`: (str, optional) "default" for metrics, "system" for machine metrics + + + + +### method Run.load() + +```python +self, +force: 'bool' = False +``` + +Load run data using appropriate fragment based on lazy mode. + +##### Arguments + +- `force`: If True, re-fetch the run data from the server, even if it is already loaded. + + +##### Raises + +- `RunNotFoundError`: If the run is not found, or the run data can not be loaded. + + +### method Run.load_full_data() + +```python +self, +force: 'bool' = False +``` + +Load full run data including heavy fields like config, systemMetrics, summaryMetrics. + +This method is useful when you initially used lazy=True for listing runs, +but need access to the full data for specific runs. + +##### Arguments + +- `force`: Force reload even if data is already loaded + + + + +### method Run.log_artifact() + +```python +self, +artifact: 'wandb.Artifact', +aliases: 'Collection[str] | None' = None, +tags: 'Collection[str] | None' = None +``` + +Declare an artifact as output of a run. + +##### Arguments + +- `artifact`: An artifact returned from `wandb.Api().artifact(name)`. +- `aliases`: Aliases to apply to this artifact. +- `tags`: (list, optional) Tags to apply to this artifact, if any. + + + + +### method Run.logged_artifacts() + +```python +self, +per_page: 'int' = 100 +``` + +Fetches all artifacts logged by this run. + +Retrieves all output artifacts that were logged during the run. Returns a +paginated result that can be iterated over or collected into a single list. + +##### Arguments + +- `per_page`: Number of artifacts to fetch per API request. + + + + +##### Examples + +```python +import wandb +import tempfile + +with tempfile.NamedTemporaryFile(mode="w", delete=False, suffix=".txt") as tmp: + tmp.write("This is a test artifact") + tmp_path = tmp.name +run = wandb.init(project="artifact-example") +artifact = wandb.Artifact("test_artifact", type="dataset") +artifact.add_file(tmp_path) +run.log_artifact(artifact) +run.finish() + +api = wandb.Api() + +finished_run = api.run(f"{run.entity}/{run.project}/{run.id}") + +for logged_artifact in finished_run.logged_artifacts(): + print(logged_artifact.name) +``` + +### method Run.save() + +```python +self +``` + +Persist changes to the run object to the W&B backend. + + + + + +### method Run.scan_history() + +```python +self, +keys: 'list[str] | None' = None, +page_size: 'int' = 1000, +min_step: 'int' = 0, +max_step: 'int | None' = None, +use_cache: 'bool' = True +``` + +Returns an iterable collection of all history records for a run. + +##### Arguments + +- `keys`: list of metrics to read from the run's history. if no keys are provided then all metrics will be returned. +- `page_size`: the number of history records to read at a time. +- `min_step`: The minimum step to start reading history from (inclusive). +- `max_step`: The maximum step to read history up to (exclusive). +- `use_cache`: When set to True, checks the WANDB_CACHE_DIR for a run history. If the run history is not found in the cache, it will be downloaded from the server. If set to False, the run history will be downloaded every time. + + + + +### method Run.stop() + +```python +self +``` + +Request that this run stop gracefully. + +This sets the run's stop flag on the W&B backend, the same signal +sent by the "Stop run" button in the W&B App UI. The process running +the run picks the flag up through its regular heartbeat and shuts +the run down gracefully, so this is safe for terminating remote runs +(for example, runs on Kubernetes pods). + +Stopping is asynchronous: this method returns once the backend has +flagged the run, not once the run terminates. Calling it again, or +on a run that is no longer running, has no effect. + + + +##### Raises + +- ``wandb.Error``: If the request fails. + + +##### Examples + +```python +import wandb + +run = wandb.Api().run("entity/project/run_id") +run.stop() +``` + +### method Run.to_html() + +```python +self, +height: 'int' = 420, +hidden: 'bool' = False +``` + +Generate HTML containing an iframe displaying this run. + +##### Arguments + +- `height`: +- `hidden`: + + + + +### method Run.update() + +```python +self +``` + +Persist changes to the run object to the wandb backend. + + + + + +### method Run.update_state() + +```python +self, +state: 'str' +``` + +Update the state of a run. + +Supported transitions: + - to `pending` from `running`, `failed`, `crashed`, or `preempted` + (e.g. to requeue a terminated or in-progress run) + - to `failed` from `pending` or `running` + (e.g. to mark a preempted or lost run as failed) + +Sweep runs cannot have their state updated. + +See `Run.state` for the list of possible run states. + +##### Arguments + +- `state`: The target run state. One of `"pending"` or `"failed"`. + + +##### Raises + +- ``wandb.Error``: If the requested state transition is not allowed, or the server does not support this operation. + + +### method Run.upload_file() + +```python +self, +path: 'str', +root: 'str' = '.' +``` + +Upload a local file to W&B, associating it with this run. + +##### Arguments + +- `path`: Path to the file to upload. Can be absolute or relative. +- `root`: The root path to save the file relative to. For example, if you want to have the file saved in the run as "my_dir/file.txt" and you're currently in "my_dir" you would set root to "../". Defaults to current directory ("."). + + + + +### method Run.use_artifact() + +```python +self, +artifact: 'wandb.Artifact', +use_as: 'str | None' = None +``` + +Declare an artifact as an input to a run. + +##### Arguments + +- `artifact`: An artifact returned from `wandb.Api().artifact(name)` +- `use_as`: A string identifying how the artifact is used in the script. Used to easily differentiate artifacts used in a run, when using the beta wandb launch feature's artifact swapping functionality. + + + + +### method Run.used_artifacts() + +```python +self, +per_page: 'int' = 100 +``` + +Fetches artifacts explicitly used by this run. + +Retrieves only the input artifacts that were explicitly declared as used +during the run, typically via `run.use_artifact()`. Returns a paginated +result that can be iterated over or collected into a single list. + +##### Arguments + +- `per_page`: Number of artifacts to fetch per API request. + + + + +##### Examples + +```python +import wandb + +run = wandb.init(project="artifact-example") +run.use_artifact("test_artifact:latest") +run.finish() + +api = wandb.Api() +finished_run = api.run(f"{run.entity}/{run.project}/{run.id}") +for used_artifact in finished_run.used_artifacts(): + print(used_artifact.name) +test_artifact +``` + +### method Run.wait_until_finished() + +```python +self +``` + +Check the state of the run until it is finished. + + + + + + + diff --git a/models/ref/python/public-api/run/run-properties.mdx b/models/ref/python/public-api/run/run-properties.mdx new file mode 100644 index 0000000000..8fa266f9f5 --- /dev/null +++ b/models/ref/python/public-api/run/run-properties.mdx @@ -0,0 +1,100 @@ +--- +title: Run properties +sidebarTitle: Properties +page_kind: class-properties +parent_slug: run +kind: class +namespace: wandb.apis.public.runs +--- + +## class wandb.apis.public.Run + + + +### property config + +Get run config. Auto-loads full data if in lazy mode. + +### property entity + +The entity associated with the run. + +### property id + +The unique identifier for the run. + +### property lastHistoryStep + +Returns the last step logged in the run's history. + +### property metadata + +Metadata about the run from wandb-metadata.json. + +Metadata includes the run's description, tags, start time, memory +usage and more. + +### property name + +The name of the run. + +### property path + +The path of the run. The path is a list containing the entity, project, and run_id. + +### property rawconfig + +Get raw run config including internal keys. Auto-loads full data if in lazy mode. + +### property state + +The state of the run. + +The following table describes the possible states a run can be in: + +| State | Description | +| -------- | ----------- | +| Crashed | Run stopped sending heartbeats in the internal process, which can happen if the machine crashes. | +| Failed | Run ended with a non-zero exit status. | +| Finished | Run ended and fully synced data, or called `wandb.Run.finish()`. | +| Killed | Run was forcibly stopped before it could finish. | +| Running | Run is still running and has recently sent a heartbeat. | +| Pending | Run is scheduled but not yet started (common in sweeps and Launch jobs). | + +### property storage_id + +The unique storage identifier for the run. + +### property summary + +Get run summary metrics. Auto-loads full data if in lazy mode. + +### property summary_metrics + +Get run summary metrics. Auto-loads full data if in lazy mode. + +### property sweep + +The sweep associated with this run. Loads sweep data if include_sweeps is False. + +### property sweep_name + +Get sweep name. Always available since sweepName is in lightweight fragment. + +### property system_metrics + +Get run system metrics. Auto-loads full data if in lazy mode. + +### property url + +The URL of the run. + +The run URL is generated from the entity, project, and run_id. For +SaaS users, it takes the form of `https://wandb.ai/entity/project/run_id`. + +### property username + +This API is deprecated. Use `entity` instead. + + + diff --git a/models/ref/python/public-api/runartifacts.mdx b/models/ref/python/public-api/runartifacts.mdx index 132a7ebea8..6e0798bab0 100644 --- a/models/ref/python/public-api/runartifacts.mdx +++ b/models/ref/python/public-api/runartifacts.mdx @@ -7,7 +7,7 @@ namespace: wandb.apis.public.artifacts import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; - + @@ -26,45 +26,3 @@ An iterable collection of artifacts associated with a specific run. - - -## Methods - -### method RelayPaginator.convert_objects() - -```python -self -``` - -Convert the last fetched response data into the iterated objects. - - - - - -### method Paginator.__next__() - -```python -self -``` - -Return the next item from the iterator. When exhausted, raise StopIteration - - - - - -### method Paginator.update_variables() - -```python -self -``` - -Update the query variables for the next page fetch. - - - - - - - diff --git a/models/ref/python/public-api/runartifacts/runartifacts-methods.mdx b/models/ref/python/public-api/runartifacts/runartifacts-methods.mdx new file mode 100644 index 0000000000..b5563d378e --- /dev/null +++ b/models/ref/python/public-api/runartifacts/runartifacts-methods.mdx @@ -0,0 +1,51 @@ +--- +title: RunArtifacts methods +sidebarTitle: Methods +page_kind: class-methods +parent_slug: runartifacts +kind: class +namespace: wandb.apis.public.artifacts +--- + +## class wandb.apis.public.RunArtifacts + + + +### method RelayPaginator.convert_objects() + +```python +self +``` + +Convert the last fetched response data into the iterated objects. + + + + + +### method Paginator.__next__() + +```python +self +``` + +Return the next item from the iterator. When exhausted, raise StopIteration + + + + + +### method Paginator.update_variables() + +```python +self +``` + +Update the query variables for the next page fetch. + + + + + + + diff --git a/models/ref/python/public-api/runs.mdx b/models/ref/python/public-api/runs.mdx index b551ca5016..da91ad4ea5 100644 --- a/models/ref/python/public-api/runs.mdx +++ b/models/ref/python/public-api/runs.mdx @@ -51,73 +51,3 @@ This is generally used indirectly using the `Api.runs` namespace. - - -## Methods - -### method Runs.histories() - -```python -self, -samples: 'int' = 500, -keys: 'list[str] | None' = None, -x_axis: 'str' = '_step', -format: "Literal['default', 'pandas', 'polars']" = 'default', -stream: "Literal['default', 'system']" = 'default' -``` - -Return sampled history metrics for all runs that fit the filters conditions. - -##### Arguments - -- `samples`: The number of samples to return per run -- `keys`: Only return metrics for specific keys -- `x_axis`: Use this metric as the xAxis defaults to _step -- `format`: Format to return data in, options are "default", "pandas", "polars" -- `stream`: "default" for metrics, "system" for machine metrics - - - - -### method Paginator.__next__() - -```python -self -``` - -Return the next item from the iterator. When exhausted, raise StopIteration - - - - - -### method Paginator.update_variables() - -```python -self -``` - -Update the query variables for the next page fetch. - - - - - -### method Runs.upgrade_to_full() - -```python -self -``` - -Upgrade this Runs collection from lazy to full mode. - -This switches to fetching full run data and -upgrades any already-loaded Run objects to have full data. -Uses parallel loading for better performance when upgrading multiple runs. - - - - - - - diff --git a/models/ref/python/public-api/runs/runs-methods.mdx b/models/ref/python/public-api/runs/runs-methods.mdx new file mode 100644 index 0000000000..6d1da3a2b4 --- /dev/null +++ b/models/ref/python/public-api/runs/runs-methods.mdx @@ -0,0 +1,79 @@ +--- +title: Runs methods +sidebarTitle: Methods +page_kind: class-methods +parent_slug: runs +kind: class +namespace: wandb.apis.public.runs +--- + +## class wandb.apis.public.Runs + + + +### method Runs.histories() + +```python +self, +samples: 'int' = 500, +keys: 'list[str] | None' = None, +x_axis: 'str' = '_step', +format: "Literal['default', 'pandas', 'polars']" = 'default', +stream: "Literal['default', 'system']" = 'default' +``` + +Return sampled history metrics for all runs that fit the filters conditions. + +##### Arguments + +- `samples`: The number of samples to return per run +- `keys`: Only return metrics for specific keys +- `x_axis`: Use this metric as the xAxis defaults to _step +- `format`: Format to return data in, options are "default", "pandas", "polars" +- `stream`: "default" for metrics, "system" for machine metrics + + + + +### method Paginator.__next__() + +```python +self +``` + +Return the next item from the iterator. When exhausted, raise StopIteration + + + + + +### method Paginator.update_variables() + +```python +self +``` + +Update the query variables for the next page fetch. + + + + + +### method Runs.upgrade_to_full() + +```python +self +``` + +Upgrade this Runs collection from lazy to full mode. + +This switches to fetching full run data and +upgrades any already-loaded Run objects to have full data. +Uses parallel loading for better performance when upgrading multiple runs. + + + + + + + diff --git a/models/ref/python/public-api/sweep.mdx b/models/ref/python/public-api/sweep.mdx index 6efca4956c..82d787c4d7 100644 --- a/models/ref/python/public-api/sweep.mdx +++ b/models/ref/python/public-api/sweep.mdx @@ -47,143 +47,3 @@ The set of runs associated with the sweep. -## Properties - -### property config - -The sweep configuration used for the sweep. - -### property entity - -The entity associated with the sweep. - -### property expected_run_count - -Return the number of expected runs in the sweep or None for infinite runs. - -### property name - -The name of the sweep. - -Returns the first name that exists in the following priority order: - -1. User-edited display name -2. Name configured at creation time -3. Sweep ID - -### property order - -Return the order key for the sweep. - -### property path - -Returns the path of the project. - -The path is a list containing the entity, project name, and sweep ID. - -### property url - -The URL of the sweep. - -The sweep URL is generated from the entity, project, the term -"sweeps", and the sweep ID.run_id. For -SaaS users, it takes the form -of `https://wandb.ai/entity/project/sweeps/sweeps_ID`. - -### property username - -Deprecated. Use `Sweep.entity` instead. - - - -## Methods - -### method Sweep.agent() - -```python -self, -agent_id: 'str' -``` - -Query an agent by ID for this sweep. - -##### Arguments - -- `agent_id`: The ID of the agent to look up. - - - - -### method Sweep.agents() - -```python -self -``` - -Query the list of all agents for this sweep. - - - - - -### method Sweep.best_run() - -```python -(self, order=None) -``` - -Return the best run sorted by the metric defined in config or the order passed in. - -##### Arguments - -- `order`: - - - - -### method Sweep.get() - -```python -(api: 'Api', -entity: 'str | None' = None, -project: 'str | None' = None, -sid: 'str | None' = None, -order: 'str | None' = None, -query: 'str | None' = None, **kwargs) -``` - -Execute a query against the cloud backend. - -##### Arguments - -- `api`: The W&B API instance. -- `entity`: The entity (username or team) that owns the project. -- `project`: The name of the project to fetch sweep from. -- `sid`: The sweep ID to query. -- `order`: The order in which the sweep's runs are returned. -- `query`: The query to use to execute the query. -- `kwargs`: - - - - -### method Sweep.to_html() - -```python -self, -height: 'int' = 420, -hidden: 'bool' = False -``` - -Generate HTML containing an iframe displaying this sweep. - -##### Arguments - -- `height`: -- `hidden`: - - - - - - diff --git a/models/ref/python/public-api/sweep/sweep-methods.mdx b/models/ref/python/public-api/sweep/sweep-methods.mdx new file mode 100644 index 0000000000..4762a0249b --- /dev/null +++ b/models/ref/python/public-api/sweep/sweep-methods.mdx @@ -0,0 +1,102 @@ +--- +title: Sweep methods +sidebarTitle: Methods +page_kind: class-methods +parent_slug: sweep +kind: class +namespace: wandb.apis.public.sweeps +--- + +## class wandb.apis.public.Sweep + + + +### method Sweep.agent() + +```python +self, +agent_id: 'str' +``` + +Query an agent by ID for this sweep. + +##### Arguments + +- `agent_id`: The ID of the agent to look up. + + + + +### method Sweep.agents() + +```python +self +``` + +Query the list of all agents for this sweep. + + + + + +### method Sweep.best_run() + +```python +(self, order=None) +``` + +Return the best run sorted by the metric defined in config or the order passed in. + +##### Arguments + +- `order`: + + + + +### method Sweep.get() + +```python +(api: 'Api', +entity: 'str | None' = None, +project: 'str | None' = None, +sid: 'str | None' = None, +order: 'str | None' = None, +query: 'str | None' = None, **kwargs) +``` + +Execute a query against the cloud backend. + +##### Arguments + +- `api`: The W&B API instance. +- `entity`: The entity (username or team) that owns the project. +- `project`: The name of the project to fetch sweep from. +- `sid`: The sweep ID to query. +- `order`: The order in which the sweep's runs are returned. +- `query`: The query to use to execute the query. +- `kwargs`: + + + + +### method Sweep.to_html() + +```python +self, +height: 'int' = 420, +hidden: 'bool' = False +``` + +Generate HTML containing an iframe displaying this sweep. + +##### Arguments + +- `height`: +- `hidden`: + + + + + + diff --git a/models/ref/python/public-api/sweep/sweep-properties.mdx b/models/ref/python/public-api/sweep/sweep-properties.mdx new file mode 100644 index 0000000000..56d3c41e55 --- /dev/null +++ b/models/ref/python/public-api/sweep/sweep-properties.mdx @@ -0,0 +1,60 @@ +--- +title: Sweep properties +sidebarTitle: Properties +page_kind: class-properties +parent_slug: sweep +kind: class +namespace: wandb.apis.public.sweeps +--- + +## class wandb.apis.public.Sweep + + + +### property config + +The sweep configuration used for the sweep. + +### property entity + +The entity associated with the sweep. + +### property expected_run_count + +Return the number of expected runs in the sweep or None for infinite runs. + +### property name + +The name of the sweep. + +Returns the first name that exists in the following priority order: + +1. User-edited display name +2. Name configured at creation time +3. Sweep ID + +### property order + +Return the order key for the sweep. + +### property path + +Returns the path of the project. + +The path is a list containing the entity, project name, and sweep ID. + +### property url + +The URL of the sweep. + +The sweep URL is generated from the entity, project, the term +"sweeps", and the sweep ID.run_id. For +SaaS users, it takes the form +of `https://wandb.ai/entity/project/sweeps/sweeps_ID`. + +### property username + +Deprecated. Use `Sweep.entity` instead. + + + diff --git a/models/ref/python/public-api/sweeps.mdx b/models/ref/python/public-api/sweeps.mdx index 9365c9f0b9..a00ff99795 100644 --- a/models/ref/python/public-api/sweeps.mdx +++ b/models/ref/python/public-api/sweeps.mdx @@ -52,33 +52,3 @@ for sweep in sweeps: print("----------") ``` - - -## Methods - -### method Paginator.__next__() - -```python -self -``` - -Return the next item from the iterator. When exhausted, raise StopIteration - - - - - -### method Paginator.update_variables() - -```python -self -``` - -Update the query variables for the next page fetch. - - - - - - - diff --git a/models/ref/python/public-api/sweeps/sweeps-methods.mdx b/models/ref/python/public-api/sweeps/sweeps-methods.mdx new file mode 100644 index 0000000000..338f9dd1f1 --- /dev/null +++ b/models/ref/python/public-api/sweeps/sweeps-methods.mdx @@ -0,0 +1,39 @@ +--- +title: Sweeps methods +sidebarTitle: Methods +page_kind: class-methods +parent_slug: sweeps +kind: class +namespace: wandb.apis.public.sweeps +--- + +## class wandb.apis.public.Sweeps + + + +### method Paginator.__next__() + +```python +self +``` + +Return the next item from the iterator. When exhausted, raise StopIteration + + + + + +### method Paginator.update_variables() + +```python +self +``` + +Update the query variables for the next page fetch. + + + + + + + diff --git a/models/ref/python/public-api/team.mdx b/models/ref/python/public-api/team.mdx index ab50087ef7..b4eab1d8f0 100644 --- a/models/ref/python/public-api/team.mdx +++ b/models/ref/python/public-api/team.mdx @@ -59,62 +59,3 @@ team = api.create_team("my-team") team.create_service_account("CI service account") ``` - - -## Methods - -### method Team.create() - -```python -api: 'Api', -team: 'str', -admin_username: 'str | None' = None -``` - -Create a new team. - -##### Arguments - -- `api`: (`Api`) The api instance to use -- `team`: (str) The name of the team -- `admin_username`: (str) optional username of the admin user of the team, defaults to the current user. - - - - -### method Team.create_service_account() - -```python -self, -description: 'str' -``` - -Create a service account for the team. - -##### Arguments - -- `description`: (str) A description for this service account - - - - -### method Team.invite() - -```python -self, -username_or_email: 'str', -admin: 'bool' = False -``` - -Invite a user to a team. - -##### Arguments - -- `username_or_email`: (str) The username or email address of the user you want to invite. -- `admin`: (bool) Whether to make this user a team admin. Defaults to `False`. - - - - - - diff --git a/models/ref/python/public-api/team/team-methods.mdx b/models/ref/python/public-api/team/team-methods.mdx new file mode 100644 index 0000000000..45fe614ea9 --- /dev/null +++ b/models/ref/python/public-api/team/team-methods.mdx @@ -0,0 +1,68 @@ +--- +title: Team methods +sidebarTitle: Methods +page_kind: class-methods +parent_slug: team +kind: class +namespace: wandb.apis.public.teams +--- + +## class wandb.apis.public.Team + + + +### method Team.create() + +```python +api: 'Api', +team: 'str', +admin_username: 'str | None' = None +``` + +Create a new team. + +##### Arguments + +- `api`: (`Api`) The api instance to use +- `team`: (str) The name of the team +- `admin_username`: (str) optional username of the admin user of the team, defaults to the current user. + + + + +### method Team.create_service_account() + +```python +self, +description: 'str' +``` + +Create a service account for the team. + +##### Arguments + +- `description`: (str) A description for this service account + + + + +### method Team.invite() + +```python +self, +username_or_email: 'str', +admin: 'bool' = False +``` + +Invite a user to a team. + +##### Arguments + +- `username_or_email`: (str) The username or email address of the user you want to invite. +- `admin`: (bool) Whether to make this user a team admin. Defaults to `False`. + + + + + + diff --git a/models/ref/python/public-api/user.mdx b/models/ref/python/public-api/user.mdx index 3589995287..5f6a0ec1c4 100644 --- a/models/ref/python/public-api/user.mdx +++ b/models/ref/python/public-api/user.mdx @@ -30,89 +30,3 @@ user. -## Properties - -### property api_keys - -Names of the user's API keys. - -This property returns the names of the the API keys, *not* the secret -associated with the key. The name of the key cannot be used as an API -key. - -The list is empty if the user has no API keys or if API keys have not -been loaded. - -### property teams - -Names of the user's teams. - -This is an empty list if the user has no team memberships or if teams -data was not loaded. - -### property user_api - -A `wandb.Api` instance using the user's credentials. - - - -## Methods - -### method User.create() - -```python -api: 'Api', -email: 'str', -admin: 'bool | None' = False -``` - -Create a new user. - -This is an internal method. Use the `create_user()` method of -`wandb.Api` instead. - -##### Arguments - -- `api`: The API instance to use to create the user. -- `email`: The email for the user. -- `admin`: Whether this user should be a global instance admin. - - - - -### method User.delete_api_key() - -```python -self, -api_key: 'str' -``` - -Delete a user's API key. - -Only the owner of the key or an admin can delete it. - -##### Arguments - -- `api_key`: The name of the API key to delete. Use one of the names returned by the `api_keys` property. - - - - -### method User.generate_api_key() - -```python -self, -description: 'str | None' = None -``` - -Generate a new API key. - -##### Arguments - -- `description`: A description for the new API key. This can be used to identify the purpose of the API key. - - - - - - diff --git a/models/ref/python/public-api/user/user-methods.mdx b/models/ref/python/public-api/user/user-methods.mdx new file mode 100644 index 0000000000..80ed5ed487 --- /dev/null +++ b/models/ref/python/public-api/user/user-methods.mdx @@ -0,0 +1,71 @@ +--- +title: User methods +sidebarTitle: Methods +page_kind: class-methods +parent_slug: user +kind: class +namespace: wandb.apis.public.users +--- + +## class wandb.apis.public.User + + + +### method User.create() + +```python +api: 'Api', +email: 'str', +admin: 'bool | None' = False +``` + +Create a new user. + +This is an internal method. Use the `create_user()` method of +`wandb.Api` instead. + +##### Arguments + +- `api`: The API instance to use to create the user. +- `email`: The email for the user. +- `admin`: Whether this user should be a global instance admin. + + + + +### method User.delete_api_key() + +```python +self, +api_key: 'str' +``` + +Delete a user's API key. + +Only the owner of the key or an admin can delete it. + +##### Arguments + +- `api_key`: The name of the API key to delete. Use one of the names returned by the `api_keys` property. + + + + +### method User.generate_api_key() + +```python +self, +description: 'str | None' = None +``` + +Generate a new API key. + +##### Arguments + +- `description`: A description for the new API key. This can be used to identify the purpose of the API key. + + + + + + diff --git a/models/ref/python/public-api/user/user-properties.mdx b/models/ref/python/public-api/user/user-properties.mdx new file mode 100644 index 0000000000..8ecc7f20e3 --- /dev/null +++ b/models/ref/python/public-api/user/user-properties.mdx @@ -0,0 +1,37 @@ +--- +title: User properties +sidebarTitle: Properties +page_kind: class-properties +parent_slug: user +kind: class +namespace: wandb.apis.public.users +--- + +## class wandb.apis.public.User + + + +### property api_keys + +Names of the user's API keys. + +This property returns the names of the the API keys, *not* the secret +associated with the key. The name of the key cannot be used as an API +key. + +The list is empty if the user has no API keys or if API keys have not +been loaded. + +### property teams + +Names of the user's teams. + +This is an empty list if the user has no team memberships or if teams +data was not loaded. + +### property user_api + +A `wandb.Api` instance using the user's credentials. + + + From 37edd531e9a0d3930b4fd911749767eaa047279e Mon Sep 17 00:00:00 2001 From: Noah Luna <15202580+ngrayluna@users.noreply.github.com> Date: Mon, 3 Aug 2026 18:10:10 -0700 Subject: [PATCH 2/4] wip --- models/ref/python/automations/automation.mdx | 47 +- models/ref/python/automations/donothing.mdx | 14 +- .../python/automations/metricchangefilter.mdx | 44 +- .../automations/metricthresholdfilter.mdx | 27 +- .../python/automations/metriczscorefilter.mdx | 22 +- .../ref/python/automations/newautomation.mdx | 27 +- .../newautomation-properties.mdx | 6 +- .../python/automations/onaddartifactalias.mdx | 17 +- .../python/automations/onaddartifacttag.mdx | 17 +- .../python/automations/onaddcollectiontag.mdx | 17 +- .../python/automations/oncreateartifact.mdx | 17 +- .../ref/python/automations/onlinkartifact.mdx | 17 +- .../automations/onremoveartifacttag.mdx | 17 +- .../automations/onremovecollectiontag.mdx | 17 +- models/ref/python/automations/onrunmetric.mdx | 17 +- models/ref/python/automations/onrunstate.mdx | 17 +- .../python/automations/onunlinkartifact.mdx | 17 +- .../ref/python/automations/runstatefilter.mdx | 12 +- .../python/automations/sendnotification.mdx | 27 +- .../sendnotification-methods.mdx | 22 +- models/ref/python/automations/sendwebhook.mdx | 17 +- .../sendwebhook/sendwebhook-methods.mdx | 16 +- models/ref/python/custom-charts/bar.mdx | 4 +- .../python/custom-charts/confusion_matrix.mdx | 5 +- models/ref/python/custom-charts/histogram.mdx | 4 +- models/ref/python/custom-charts/line.mdx | 4 +- .../ref/python/custom-charts/line_series.mdx | 4 +- .../ref/python/custom-charts/plot_table.mdx | 5 +- models/ref/python/custom-charts/pr_curve.mdx | 5 +- models/ref/python/custom-charts/roc_curve.mdx | 5 +- models/ref/python/custom-charts/scatter.mdx | 4 +- models/ref/python/data-types/audio.mdx | 17 +- .../python/data-types/audio/audio-methods.mdx | 24 +- models/ref/python/data-types/histogram.mdx | 18 +- models/ref/python/data-types/html.mdx | 17 +- models/ref/python/data-types/image.mdx | 65 +- .../data-types/image/image-properties.mdx | 8 +- models/ref/python/data-types/molecule.mdx | 17 +- .../data-types/molecule/molecule-methods.mdx | 43 +- models/ref/python/data-types/object3d.mdx | 17 +- .../data-types/object3d/object3d-methods.mdx | 42 +- models/ref/python/data-types/plotly.mdx | 9 +- models/ref/python/data-types/table.mdx | 84 +- .../python/data-types/table/table-methods.mdx | 114 ++- models/ref/python/data-types/video.mdx | 22 +- models/ref/python/experiments/artifact.mdx | 51 +- .../experiments/artifact/artifact-methods.mdx | 452 +++++---- .../artifact/artifact-properties.mdx | 6 +- models/ref/python/experiments/run.mdx | 5 +- .../python/experiments/run/run-methods.mdx | 667 +++++++----- .../python/experiments/run/run-properties.mdx | 6 +- models/ref/python/experiments/settings.mdx | 953 ++++++++++++------ .../experiments/settings/settings-methods.mdx | 33 +- .../settings/settings-properties.mdx | 6 +- models/ref/python/functions/agent.mdx | 3 +- models/ref/python/functions/box3d.mdx | 3 +- models/ref/python/functions/controller.mdx | 3 +- models/ref/python/functions/finish.mdx | 3 +- models/ref/python/functions/init.mdx | 4 +- models/ref/python/functions/login.mdx | 5 +- models/ref/python/functions/restore.mdx | 4 +- models/ref/python/functions/setup.mdx | 3 +- models/ref/python/functions/sweep.mdx | 4 +- models/ref/python/functions/teardown.mdx | 3 +- models/ref/python/public-api/api.mdx | 17 +- .../ref/python/public-api/api/api-methods.mdx | 928 +++++++++++------ .../python/public-api/api/api-properties.mdx | 6 +- .../python/public-api/artifactcollection.mdx | 4 +- .../artifactcollection-methods.mdx | 53 +- .../artifactcollection-properties.mdx | 6 +- .../python/public-api/artifactcollections.mdx | 4 +- .../artifactcollections-methods.mdx | 30 +- .../ref/python/public-api/artifactfiles.mdx | 4 +- .../artifactfiles/artifactfiles-methods.mdx | 30 +- .../artifactfiles-properties.mdx | 6 +- models/ref/python/public-api/artifacts.mdx | 4 +- .../artifacts/artifacts-methods.mdx | 22 +- models/ref/python/public-api/artifacttype.mdx | 4 +- .../artifacttype/artifacttype-methods.mdx | 37 +- .../artifacttype/artifacttype-properties.mdx | 6 +- .../ref/python/public-api/artifacttypes.mdx | 4 +- .../artifacttypes/artifacttypes-methods.mdx | 30 +- models/ref/python/public-api/betareport.mdx | 23 +- .../betareport/betareport-methods.mdx | 33 +- .../betareport/betareport-properties.mdx | 8 +- .../public-api/downloadhistoryresult.mdx | 18 +- models/ref/python/public-api/file.mdx | 4 +- .../python/public-api/file/file-methods.mdx | 34 +- .../public-api/file/file-properties.mdx | 6 +- models/ref/python/public-api/files.mdx | 32 +- .../python/public-api/files/files-methods.mdx | 14 +- .../public-api/incompleterunhistoryerror.mdx | 4 +- .../incompleterunhistoryerror-methods.mdx | 28 +- models/ref/python/public-api/member.mdx | 17 +- .../public-api/member/member-methods.mdx | 14 +- models/ref/python/public-api/organization.mdx | 22 +- models/ref/python/public-api/project.mdx | 22 +- .../public-api/project/project-methods.mdx | 47 +- .../public-api/project/project-properties.mdx | 6 +- .../public-api/projectartifactcollections.mdx | 4 +- .../projectartifactcollections-methods.mdx | 30 +- models/ref/python/public-api/projects.mdx | 17 +- .../public-api/projects/projects-methods.mdx | 30 +- models/ref/python/public-api/registry.mdx | 27 +- .../public-api/registry/registry-methods.mdx | 189 ++-- .../registry/registry-properties.mdx | 6 +- models/ref/python/public-api/reports.mdx | 27 +- .../public-api/reports/reports-methods.mdx | 30 +- models/ref/python/public-api/run.mdx | 43 +- .../ref/python/public-api/run/run-methods.mdx | 383 ++++--- .../python/public-api/run/run-properties.mdx | 6 +- models/ref/python/public-api/runartifacts.mdx | 4 +- .../runartifacts/runartifacts-methods.mdx | 30 +- models/ref/python/public-api/runs.mdx | 47 +- .../python/public-api/runs/runs-methods.mdx | 59 +- models/ref/python/public-api/sweep.mdx | 28 +- .../python/public-api/sweep/sweep-methods.mdx | 81 +- .../public-api/sweep/sweep-properties.mdx | 6 +- models/ref/python/public-api/sweeps.mdx | 27 +- .../public-api/sweeps/sweeps-methods.mdx | 22 +- models/ref/python/public-api/team.mdx | 17 +- .../python/public-api/team/team-methods.mdx | 52 +- models/ref/python/public-api/user.mdx | 4 +- .../python/public-api/user/user-methods.mdx | 55 +- .../public-api/user/user-properties.mdx | 6 +- snippets/_includes/github-source-link.mdx | 12 +- 126 files changed, 3627 insertions(+), 2344 deletions(-) diff --git a/models/ref/python/automations/automation.mdx b/models/ref/python/automations/automation.mdx index 746c41aa4c..b906668e92 100644 --- a/models/ref/python/automations/automation.mdx +++ b/models/ref/python/automations/automation.mdx @@ -7,11 +7,11 @@ namespace: wandb.automations.automations import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; - + -## class wandb.automations.Automation +## Class wandb.automations.Automation ```python *, __typename: Literal['Trigger'] = 'Trigger', @@ -34,16 +34,41 @@ A local instance of a saved W&B automation that supports editing. ## 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. + + + + +The date and time when this automation was created. + + + +The date and time when this automation was last updated, if applicable. + + + +The name of this automation. + + + +An optional description of this automation. + + + +Whether this automation is enabled. Only enabled automations will trigger. + + + +The scope in which the triggering event must occur. + + + +The event that will trigger this automation. + + + +The action that will execute when this automation is triggered. + diff --git a/models/ref/python/automations/donothing.mdx b/models/ref/python/automations/donothing.mdx index 7bf4945703..641ea3eddb 100644 --- a/models/ref/python/automations/donothing.mdx +++ b/models/ref/python/automations/donothing.mdx @@ -7,11 +7,11 @@ namespace: wandb.automations.actions import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; - + -## class wandb.automations.DoNothing +## Class wandb.automations.DoNothing ```python *, no_op: Annotated[bool, BeforeValidator(func=, json_schema_input_type=PydanticUndefined)] = True, @@ -26,11 +26,15 @@ Defines an automation action that intentionally does nothing. ## Args -- `no_op`: Placeholder field which exists only to satisfy backend schema requirements. + +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`: +There should never be a need to set this field explicitly, as its value is ignored. + + + + diff --git a/models/ref/python/automations/metricchangefilter.mdx b/models/ref/python/automations/metricchangefilter.mdx index b1bf9e1298..05674df2c1 100644 --- a/models/ref/python/automations/metricchangefilter.mdx +++ b/models/ref/python/automations/metricchangefilter.mdx @@ -7,11 +7,11 @@ namespace: wandb.automations._filters.run_metrics import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; - + -## class wandb.automations.MetricChangeFilter +## Class wandb.automations.MetricChangeFilter ```python *, name: str, @@ -35,17 +35,39 @@ between the current window and the non-overlapping prior window. ## Args -- `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``). + - If omitted, defaults to the size of the current window. -- `change_type`: -- `change_dir`: + + + + + + + + + + +Ignored. + + + + + + + +Size of the "prior" metric aggregation window (ignored if `agg` is ``None``). + +If omitted, defaults to the size of the current window. + + + + + + + + + diff --git a/models/ref/python/automations/metricthresholdfilter.mdx b/models/ref/python/automations/metricthresholdfilter.mdx index 667bbf13d4..37eab577fb 100644 --- a/models/ref/python/automations/metricthresholdfilter.mdx +++ b/models/ref/python/automations/metricthresholdfilter.mdx @@ -7,11 +7,11 @@ namespace: wandb.automations._filters.run_metrics import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; - + -## class wandb.automations.MetricThresholdFilter +## Class wandb.automations.MetricThresholdFilter ```python *, name: str, @@ -32,12 +32,25 @@ multiple values. ## Args -- `name`: -- `agg_op`: -- `window_size`: -- `cmp_op`: Comparison operator between the metric value (left) vs. the threshold (right). -- `threshold`: + + + + + + + + + + + + +Comparison operator between the metric value (left) vs. the threshold (right). + + + + + diff --git a/models/ref/python/automations/metriczscorefilter.mdx b/models/ref/python/automations/metriczscorefilter.mdx index 4ab0021d16..06fc0cef02 100644 --- a/models/ref/python/automations/metriczscorefilter.mdx +++ b/models/ref/python/automations/metriczscorefilter.mdx @@ -7,11 +7,11 @@ namespace: wandb.automations._filters.run_metrics import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; - + -## class wandb.automations.MetricZScoreFilter +## Class wandb.automations.MetricZScoreFilter ```python *, name: str, @@ -28,11 +28,21 @@ 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. + +Name of the observed metric. + + +Size of the window to calculate the metric mean and standard deviation over. + + + +Threshold for the z-score. + + + +Direction of the z-score change to watch for. + diff --git a/models/ref/python/automations/newautomation.mdx b/models/ref/python/automations/newautomation.mdx index 5fadb358e5..b6124ead54 100644 --- a/models/ref/python/automations/newautomation.mdx +++ b/models/ref/python/automations/newautomation.mdx @@ -7,11 +7,11 @@ namespace: wandb.automations.automations import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; - + -## class wandb.automations.NewAutomation +## Class wandb.automations.NewAutomation ```python *, name: str | None = None, @@ -29,12 +29,25 @@ A new automation to be created. ## Args -- `name`: The name of this automation. -- `description`: An optional description of this automation. -- `enabled`: Whether this automation is enabled. Only enabled automations will trigger. -- `event`: The event that will trigger this automation. -- `action`: The action that will execute when this automation is triggered. + +The name of this automation. + + +An optional description of this automation. + + + +Whether this automation is enabled. Only enabled automations will trigger. + + + +The event that will trigger this automation. + + + +The action that will execute when this automation is triggered. + diff --git a/models/ref/python/automations/newautomation/newautomation-properties.mdx b/models/ref/python/automations/newautomation/newautomation-properties.mdx index ca478abcc7..2850082895 100644 --- a/models/ref/python/automations/newautomation/newautomation-properties.mdx +++ b/models/ref/python/automations/newautomation/newautomation-properties.mdx @@ -7,13 +7,9 @@ kind: class namespace: wandb.automations.automations --- -## class wandb.automations.NewAutomation - - +## Class wandb.automations.NewAutomation ### property scope The scope in which the triggering event must occur. - - diff --git a/models/ref/python/automations/onaddartifactalias.mdx b/models/ref/python/automations/onaddartifactalias.mdx index 15e811f0a6..3853ff3692 100644 --- a/models/ref/python/automations/onaddartifactalias.mdx +++ b/models/ref/python/automations/onaddartifactalias.mdx @@ -7,11 +7,11 @@ namespace: wandb.automations.events import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; - + -## class wandb.automations.OnAddArtifactAlias +## Class wandb.automations.OnAddArtifactAlias ```python *, event_type: Literal[ADD_ARTIFACT_ALIAS] = ADD_ARTIFACT_ALIAS, @@ -27,10 +27,17 @@ A new alias is assigned to an artifact. ## Args -- `event_type`: -- `scope`: The scope of the event. -- `filter`: Additional conditions(s), if any, that are required for this event to trigger. + + + + +The scope of the event. + + + +Additional conditions(s), if any, that are required for this event to trigger. + diff --git a/models/ref/python/automations/onaddartifacttag.mdx b/models/ref/python/automations/onaddartifacttag.mdx index 9e47ad4484..f1f264baa9 100644 --- a/models/ref/python/automations/onaddartifacttag.mdx +++ b/models/ref/python/automations/onaddartifacttag.mdx @@ -7,11 +7,11 @@ namespace: wandb.automations.events import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; - + -## class wandb.automations.OnAddArtifactTag +## Class wandb.automations.OnAddArtifactTag ```python *, event_type: Literal[ADD_ARTIFACT_TAG] = ADD_ARTIFACT_TAG, @@ -27,10 +27,17 @@ A new tag is assigned to an artifact version. ## Args -- `event_type`: -- `scope`: The scope of the event. -- `filter`: Additional conditions(s), if any, that are required for this event to trigger. + + + + +The scope of the event. + + + +Additional conditions(s), if any, that are required for this event to trigger. + diff --git a/models/ref/python/automations/onaddcollectiontag.mdx b/models/ref/python/automations/onaddcollectiontag.mdx index e400525419..ddc40721f6 100644 --- a/models/ref/python/automations/onaddcollectiontag.mdx +++ b/models/ref/python/automations/onaddcollectiontag.mdx @@ -7,11 +7,11 @@ namespace: wandb.automations.events import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; - + -## class wandb.automations.OnAddCollectionTag +## Class wandb.automations.OnAddCollectionTag ```python *, event_type: Literal[ADD_COLLECTION_TAG] = ADD_COLLECTION_TAG, @@ -27,10 +27,17 @@ A new tag is assigned to an artifact collection. ## Args -- `event_type`: -- `scope`: The scope of the event. -- `filter`: Additional conditions(s), if any, that are required for this event to trigger. + + + + +The scope of the event. + + + +Additional conditions(s), if any, that are required for this event to trigger. + diff --git a/models/ref/python/automations/oncreateartifact.mdx b/models/ref/python/automations/oncreateartifact.mdx index a41a9dd0b4..a8c8b60009 100644 --- a/models/ref/python/automations/oncreateartifact.mdx +++ b/models/ref/python/automations/oncreateartifact.mdx @@ -7,11 +7,11 @@ namespace: wandb.automations.events import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; - + -## class wandb.automations.OnCreateArtifact +## Class wandb.automations.OnCreateArtifact ```python *, event_type: Literal[CREATE_ARTIFACT] = CREATE_ARTIFACT, @@ -27,10 +27,17 @@ A new artifact is created. ## Args -- `event_type`: -- `scope`: The scope of the event: must be an artifact collection. -- `filter`: Additional conditions(s), if any, that are required for this event to trigger. + + + + +The scope of the event: must be an artifact collection. + + + +Additional conditions(s), if any, that are required for this event to trigger. + diff --git a/models/ref/python/automations/onlinkartifact.mdx b/models/ref/python/automations/onlinkartifact.mdx index ed8b8ce4ba..4d73829ca6 100644 --- a/models/ref/python/automations/onlinkartifact.mdx +++ b/models/ref/python/automations/onlinkartifact.mdx @@ -7,11 +7,11 @@ namespace: wandb.automations.events import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; - + -## class wandb.automations.OnLinkArtifact +## Class wandb.automations.OnLinkArtifact ```python *, event_type: Literal[LINK_ARTIFACT] = LINK_ARTIFACT, @@ -27,10 +27,17 @@ A new artifact is linked to a collection. ## Args -- `event_type`: -- `scope`: The scope of the event. -- `filter`: Additional conditions(s), if any, that are required for this event to trigger. + + + + +The scope of the event. + + + +Additional conditions(s), if any, that are required for this event to trigger. + diff --git a/models/ref/python/automations/onremoveartifacttag.mdx b/models/ref/python/automations/onremoveartifacttag.mdx index f6e2d944d2..6b557bcac4 100644 --- a/models/ref/python/automations/onremoveartifacttag.mdx +++ b/models/ref/python/automations/onremoveartifacttag.mdx @@ -7,11 +7,11 @@ namespace: wandb.automations.events import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; - + -## class wandb.automations.OnRemoveArtifactTag +## Class wandb.automations.OnRemoveArtifactTag ```python *, event_type: Literal[REMOVE_ARTIFACT_TAG] = REMOVE_ARTIFACT_TAG, @@ -27,10 +27,17 @@ A tag is removed from an artifact version. ## Args -- `event_type`: -- `scope`: The scope of the event. -- `filter`: Additional conditions(s), if any, that are required for this event to trigger. + + + + +The scope of the event. + + + +Additional conditions(s), if any, that are required for this event to trigger. + diff --git a/models/ref/python/automations/onremovecollectiontag.mdx b/models/ref/python/automations/onremovecollectiontag.mdx index bc02e9eec6..fb8d0c0240 100644 --- a/models/ref/python/automations/onremovecollectiontag.mdx +++ b/models/ref/python/automations/onremovecollectiontag.mdx @@ -7,11 +7,11 @@ namespace: wandb.automations.events import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; - + -## class wandb.automations.OnRemoveCollectionTag +## Class wandb.automations.OnRemoveCollectionTag ```python *, event_type: Literal[REMOVE_COLLECTION_TAG] = REMOVE_COLLECTION_TAG, @@ -27,10 +27,17 @@ A tag is removed from an artifact collection. ## Args -- `event_type`: -- `scope`: The scope of the event. -- `filter`: Additional conditions(s), if any, that are required for this event to trigger. + + + + +The scope of the event. + + + +Additional conditions(s), if any, that are required for this event to trigger. + diff --git a/models/ref/python/automations/onrunmetric.mdx b/models/ref/python/automations/onrunmetric.mdx index c7306a86db..5bd573c82a 100644 --- a/models/ref/python/automations/onrunmetric.mdx +++ b/models/ref/python/automations/onrunmetric.mdx @@ -7,11 +7,11 @@ namespace: wandb.automations.events import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; - + -## class wandb.automations.OnRunMetric +## Class wandb.automations.OnRunMetric ```python *, event_type: Literal[RUN_METRIC_THRESHOLD, RUN_METRIC_CHANGE, RUN_METRIC_ZSCORE], @@ -27,10 +27,17 @@ A run metric satisfies a user-defined condition. ## Args -- `event_type`: -- `scope`: The scope of the event: must be a project. -- `filter`: Run and/or metric condition(s) that must be satisfied for this event to trigger. + + + + +The scope of the event: must be a project. + + + +Run and/or metric condition(s) that must be satisfied for this event to trigger. + diff --git a/models/ref/python/automations/onrunstate.mdx b/models/ref/python/automations/onrunstate.mdx index 4329e78929..523e1aa9d1 100644 --- a/models/ref/python/automations/onrunstate.mdx +++ b/models/ref/python/automations/onrunstate.mdx @@ -7,11 +7,11 @@ namespace: wandb.automations.events import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; - + -## class wandb.automations.OnRunState +## Class wandb.automations.OnRunState ```python *, event_type: Literal[RUN_STATE] = RUN_STATE, @@ -27,10 +27,17 @@ A run state changes. ## Args -- `event_type`: -- `scope`: The scope of the event: must be a project. -- `filter`: Run state condition(s) that must be satisfied for this event to trigger. + + + + +The scope of the event: must be a project. + + + +Run state condition(s) that must be satisfied for this event to trigger. + diff --git a/models/ref/python/automations/onunlinkartifact.mdx b/models/ref/python/automations/onunlinkartifact.mdx index cbdbdcba65..7551120b13 100644 --- a/models/ref/python/automations/onunlinkartifact.mdx +++ b/models/ref/python/automations/onunlinkartifact.mdx @@ -7,11 +7,11 @@ namespace: wandb.automations.events import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; - + -## class wandb.automations.OnUnlinkArtifact +## Class wandb.automations.OnUnlinkArtifact ```python *, event_type: Literal[UNLINK_ARTIFACT] = UNLINK_ARTIFACT, @@ -27,10 +27,17 @@ An artifact version is unlinked from a collection. ## Args -- `event_type`: -- `scope`: The scope of the event. -- `filter`: Additional conditions(s), if any, that are required for this event to trigger. + + + + +The scope of the event. + + + +Additional conditions(s), if any, that are required for this event to trigger. + diff --git a/models/ref/python/automations/runstatefilter.mdx b/models/ref/python/automations/runstatefilter.mdx index aaa8873d98..9780ae1dda 100644 --- a/models/ref/python/automations/runstatefilter.mdx +++ b/models/ref/python/automations/runstatefilter.mdx @@ -7,11 +7,11 @@ namespace: wandb.automations.events import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; - + -## class wandb.automations.RunStateFilter +## Class wandb.automations.RunStateFilter ```python *, run_filter: Annotated[wandb.automations._filters.operators.And | wandb.automations._filters.operators.Or | wandb.automations._filters.operators.Nor | wandb.automations._filters.operators.Not | wandb.automations._filters.operators.Lt | wandb.automations._filters.operators.Gt | wandb.automations._filters.operators.Lte | wandb.automations._filters.operators.Gte | wandb.automations._filters.operators.Eq | wandb.automations._filters.operators.Ne | wandb.automations._filters.operators.In | wandb.automations._filters.operators.NotIn | wandb.automations._filters.operators.Exists | wandb.automations._filters.operators.Regex | wandb.automations._filters.operators.Contains | wandb.automations._filters.expressions.FilterExpr | dict[str, Any], Json, BeforeValidator(func=, json_schema_input_type=PydanticUndefined), PlainSerializer(func=, return_type=PydanticUndefined, when_used='always'), AfterValidator(func=)] = And(()), @@ -26,9 +26,13 @@ Represents a filter for triggering events based on changes in run states. ## Args -- `run_filter`: Filters that must match any runs that will trigger this event. -- `run_state_filter`: Run state condition(s) that must be satisfied for this event to trigger. + +Filters that must match any runs that will trigger this event. + + +Run state condition(s) that must be satisfied for this event to trigger. + diff --git a/models/ref/python/automations/sendnotification.mdx b/models/ref/python/automations/sendnotification.mdx index 6a36dcf0e3..89b172752f 100644 --- a/models/ref/python/automations/sendnotification.mdx +++ b/models/ref/python/automations/sendnotification.mdx @@ -7,11 +7,11 @@ namespace: wandb.automations.actions import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; - + -## class wandb.automations.SendNotification +## Class wandb.automations.SendNotification ```python *, integration_id: Annotated[str, Strict(strict=True)], @@ -29,12 +29,25 @@ Defines an automation action that sends a (Slack) notification. ## Args -- `integration_id`: The ID of the Slack integration that will be used to send the notification. -- `text`: The message body of the sent notification. -- `level`: The severity (`INFO`, `WARN`, `ERROR`) of the sent notification. -- `title`: The title of the sent notification. -- `action_type`: + +The ID of the Slack integration that will be used to send the notification. + + +The message body of the sent notification. + + + +The severity (`INFO`, `WARN`, `ERROR`) of the sent notification. + + + +The title of the sent notification. + + + + + diff --git a/models/ref/python/automations/sendnotification/sendnotification-methods.mdx b/models/ref/python/automations/sendnotification/sendnotification-methods.mdx index 0bf19a6189..607092ccef 100644 --- a/models/ref/python/automations/sendnotification/sendnotification-methods.mdx +++ b/models/ref/python/automations/sendnotification/sendnotification-methods.mdx @@ -7,11 +7,11 @@ kind: class namespace: wandb.automations.actions --- -## class wandb.automations.SendNotification +## Class wandb.automations.SendNotification +## method SendNotification.from_integration - -### method SendNotification.from_integration() +Define a notification action that sends to the given (Slack) integration. ```python integration: 'SlackIntegration', *, @@ -20,17 +20,21 @@ text: 'str' = '', level: 'AlertSeverity' = ``` -Define a notification action that sends to the given (Slack) integration. - ##### Arguments -- `integration`: -- `title`: -- `text`: -- `level`: + + + + + + + + + + diff --git a/models/ref/python/automations/sendwebhook.mdx b/models/ref/python/automations/sendwebhook.mdx index 4d4cc035ce..e14deb75a0 100644 --- a/models/ref/python/automations/sendwebhook.mdx +++ b/models/ref/python/automations/sendwebhook.mdx @@ -7,11 +7,11 @@ namespace: wandb.automations.actions import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; - + -## class wandb.automations.SendWebhook +## Class wandb.automations.SendWebhook ```python *, integration_id: Annotated[str, Strict(strict=True)], @@ -27,10 +27,17 @@ Defines an automation action that sends a webhook request. ## Args -- `integration_id`: The ID of the webhook integration that will be used to send the request. -- `requestPayload`: The payload, possibly with template variables, to send in the webhook request. -- `action_type`: + +The ID of the webhook integration that will be used to send the request. + + +The payload, possibly with template variables, to send in the webhook request. + + + + + diff --git a/models/ref/python/automations/sendwebhook/sendwebhook-methods.mdx b/models/ref/python/automations/sendwebhook/sendwebhook-methods.mdx index bba8321ad0..b96fc6a6f1 100644 --- a/models/ref/python/automations/sendwebhook/sendwebhook-methods.mdx +++ b/models/ref/python/automations/sendwebhook/sendwebhook-methods.mdx @@ -7,26 +7,24 @@ kind: class namespace: wandb.automations.actions --- -## class wandb.automations.SendWebhook +## Class wandb.automations.SendWebhook +## method SendWebhook.from_integration - -### method SendWebhook.from_integration() +Define a webhook action that sends to the given (webhook) integration. ```python integration: 'WebhookIntegration', *, payload: 'JsonEncoded[dict[str, Any]] | None' = None ``` -Define a webhook action that sends to the given (webhook) integration. - ##### Arguments -- `integration`: -- `payload`: - - + + + + diff --git a/models/ref/python/custom-charts/bar.mdx b/models/ref/python/custom-charts/bar.mdx index 04a403c167..c1ff6f0a4e 100644 --- a/models/ref/python/custom-charts/bar.mdx +++ b/models/ref/python/custom-charts/bar.mdx @@ -7,7 +7,7 @@ namespace: wandb.plot.bar import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; - + @@ -34,14 +34,12 @@ Constructs a bar chart from a wandb.Table of data. - `title`: The title of the bar chart. - `split_table`: Whether the table should be split into a separate section in the W&B UI. If `True`, the table will be displayed in a section named "Custom Chart Tables". Default is `False`. - ## Returns `CustomChart`: A custom chart object that can be logged to W&B. To log the chart, pass it to `wandb.log()`. - ## Examples ```python diff --git a/models/ref/python/custom-charts/confusion_matrix.mdx b/models/ref/python/custom-charts/confusion_matrix.mdx index 8c0d65a8ca..0482f607a2 100644 --- a/models/ref/python/custom-charts/confusion_matrix.mdx +++ b/models/ref/python/custom-charts/confusion_matrix.mdx @@ -7,7 +7,7 @@ namespace: wandb.plot.confusion_matrix import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; - + @@ -36,18 +36,15 @@ Constructs a confusion matrix from a sequence of probabilities or predictions. - `title`: Title of the confusion matrix chart. - `split_table`: Whether the table should be split into a separate section in the W&B UI. If `True`, the table will be displayed in a section named "Custom Chart Tables". Default is `False`. - ## Returns `CustomChart`: A custom chart object that can be logged to W&B. To log the chart, pass it to `wandb.log()`. - ## Raises - `ValueError`: If both `probs` and `preds` are provided or if the number of predictions and true labels are not equal. If the number of unique predicted classes exceeds the number of class names or if the number of unique true labels exceeds the number of class names. - `wandb.Error`: If numpy is not installed. - ## Examples Logging a confusion matrix with random probabilities for wildlife diff --git a/models/ref/python/custom-charts/histogram.mdx b/models/ref/python/custom-charts/histogram.mdx index 8ec1fac1a8..40184f06a1 100644 --- a/models/ref/python/custom-charts/histogram.mdx +++ b/models/ref/python/custom-charts/histogram.mdx @@ -7,7 +7,7 @@ namespace: wandb.plot.histogram import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; - + @@ -32,14 +32,12 @@ Constructs a histogram chart from a W&B Table. - `title`: The title of the histogram plot. - `split_table`: Whether the table should be split into a separate section in the W&B UI. If `True`, the table will be displayed in a section named "Custom Chart Tables". Default is `False`. - ## Returns `CustomChart`: A custom chart object that can be logged to W&B. To log the chart, pass it to `wandb.log()`. - ## Examples ```python diff --git a/models/ref/python/custom-charts/line.mdx b/models/ref/python/custom-charts/line.mdx index 80b299e7b6..fe3177b0c8 100644 --- a/models/ref/python/custom-charts/line.mdx +++ b/models/ref/python/custom-charts/line.mdx @@ -7,7 +7,7 @@ namespace: wandb.plot.line import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; - + @@ -36,14 +36,12 @@ Constructs a customizable line chart. - `title`: Title of the chart. - `split_table`: Whether the table should be split into a separate section in the W&B UI. If `True`, the table will be displayed in a section named "Custom Chart Tables". Default is `False`. - ## Returns `CustomChart`: A custom chart object that can be logged to W&B. To log the chart, pass it to `wandb.log()`. - ## Examples ```python diff --git a/models/ref/python/custom-charts/line_series.mdx b/models/ref/python/custom-charts/line_series.mdx index cd011a44fc..599a1cc980 100644 --- a/models/ref/python/custom-charts/line_series.mdx +++ b/models/ref/python/custom-charts/line_series.mdx @@ -7,7 +7,7 @@ namespace: wandb.plot.line_series import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; - + @@ -36,14 +36,12 @@ Constructs a line series chart. - `xname`: Label for the x-axis. - `split_table`: Whether the table should be split into a separate section in the W&B UI. If `True`, the table will be displayed in a section named "Custom Chart Tables". Default is `False`. - ## Returns `CustomChart`: A custom chart object that can be logged to W&B. To log the chart, pass it to `wandb.log()`. - ## Examples Logging a single x array where all y series are plotted against the same x values: diff --git a/models/ref/python/custom-charts/plot_table.mdx b/models/ref/python/custom-charts/plot_table.mdx index 803fcd7357..3b26900f05 100644 --- a/models/ref/python/custom-charts/plot_table.mdx +++ b/models/ref/python/custom-charts/plot_table.mdx @@ -7,7 +7,7 @@ namespace: wandb.plot.custom_chart import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; - + @@ -39,17 +39,14 @@ chart object that can be logged to W&B using `wandb.Run.log()`. - `string_fields`: A dictionary for providing values for any string constants required by the custom visualization. - `split_table`: Whether the table should be split into a separate section in the W&B UI. If `True`, the table will be displayed in a section named "Custom Chart Tables". Default is `False`. - ## Returns `CustomChart`: A custom chart object that can be logged to W&B. To log the chart, pass the chart object as argument to `wandb.Run.log()`. - ## Raises - `wandb.Error`: If `data_table` is not a `wandb.Table` object. - ## Examples ```python diff --git a/models/ref/python/custom-charts/pr_curve.mdx b/models/ref/python/custom-charts/pr_curve.mdx index 44afa4a17b..59fca7d9ec 100644 --- a/models/ref/python/custom-charts/pr_curve.mdx +++ b/models/ref/python/custom-charts/pr_curve.mdx @@ -7,7 +7,7 @@ namespace: wandb.plot.pr_curve import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; - + @@ -45,17 +45,14 @@ a model's performance. - `title`: Title of the plot. Defaults to "Precision-Recall Curve". - `split_table`: Whether the table should be split into a separate section in the W&B UI. If `True`, the table will be displayed in a section named "Custom Chart Tables". Default is `False`. - ## Returns `CustomChart`: A custom chart object that can be logged to W&B. To log the chart, pass it to `wandb.log()`. - ## Raises - `wandb.Error`: If NumPy, pandas, or scikit-learn is not installed. - ## Examples ```python diff --git a/models/ref/python/custom-charts/roc_curve.mdx b/models/ref/python/custom-charts/roc_curve.mdx index f5fb4c4a0b..e2399ddb5a 100644 --- a/models/ref/python/custom-charts/roc_curve.mdx +++ b/models/ref/python/custom-charts/roc_curve.mdx @@ -7,7 +7,7 @@ namespace: wandb.plot.roc_curve import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; - + @@ -36,17 +36,14 @@ Constructs Receiver Operating Characteristic (ROC) curve chart. - `title`: Title of the ROC curve plot. Default is "ROC Curve". - `split_table`: Whether the table should be split into a separate section in the W&B UI. If `True`, the table will be displayed in a section named "Custom Chart Tables". Default is `False`. - ## Returns `CustomChart`: A custom chart object that can be logged to W&B. To log the chart, pass it to `wandb.log()`. - ## Raises - `wandb.Error`: If numpy, pandas, or scikit-learn are not found. - ## Examples ```python diff --git a/models/ref/python/custom-charts/scatter.mdx b/models/ref/python/custom-charts/scatter.mdx index 0eac6ad0b6..3e250e09db 100644 --- a/models/ref/python/custom-charts/scatter.mdx +++ b/models/ref/python/custom-charts/scatter.mdx @@ -7,7 +7,7 @@ namespace: wandb.plot.scatter import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; - + @@ -34,14 +34,12 @@ Constructs a scatter plot from a wandb.Table of data. - `title`: The title of the scatter chart. - `split_table`: Whether the table should be split into a separate section in the W&B UI. If `True`, the table will be displayed in a section named "Custom Chart Tables". Default is `False`. - ## Returns `CustomChart`: A custom chart object that can be logged to W&B. To log the chart, pass it to `wandb.log()`. - ## Examples ```python diff --git a/models/ref/python/data-types/audio.mdx b/models/ref/python/data-types/audio.mdx index b426d48dd5..a3a467e613 100644 --- a/models/ref/python/data-types/audio.mdx +++ b/models/ref/python/data-types/audio.mdx @@ -7,11 +7,11 @@ namespace: wandb.sdk.data_types.audio import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; - + -## class wandb.Audio +## Class wandb.Audio ```python (data_or_path: 'str | pathlib.Path | list | np.ndarray', sample_rate: 'int | None' = None, @@ -26,10 +26,17 @@ W&B class for audio clips. ## Args -- `data_or_path`: A path to an audio file or a NumPy array of audio data. -- `sample_rate`: Sample rate, required when passing in raw NumPy array of audio data. -- `caption`: Caption to display with audio. + +A path to an audio file or a NumPy array of audio data. + + +Sample rate, required when passing in raw NumPy array of audio data. + + + +Caption to display with audio. + diff --git a/models/ref/python/data-types/audio/audio-methods.mdx b/models/ref/python/data-types/audio/audio-methods.mdx index b01a8edbac..37b8e226f0 100644 --- a/models/ref/python/data-types/audio/audio-methods.mdx +++ b/models/ref/python/data-types/audio/audio-methods.mdx @@ -7,39 +7,33 @@ kind: class namespace: wandb.sdk.data_types.audio --- -## class wandb.Audio +## Class wandb.Audio +## method Audio.durations - -### method Audio.durations() +Calculate the duration of the audio files. ```python (audio_list) ``` -Calculate the duration of the audio files. - ##### Arguments -- `audio_list`: - + + +## method Audio.sample_rates -### method Audio.sample_rates() +Get sample rates of the audio files. ```python (audio_list) ``` -Get sample rates of the audio files. - ##### Arguments -- `audio_list`: - - - - + + diff --git a/models/ref/python/data-types/histogram.mdx b/models/ref/python/data-types/histogram.mdx index 565632d159..44fba53998 100644 --- a/models/ref/python/data-types/histogram.mdx +++ b/models/ref/python/data-types/histogram.mdx @@ -7,11 +7,11 @@ namespace: wandb.sdk.data_types.histogram import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; - + -## class wandb.Histogram +## Class wandb.Histogram ```python sequence: 'Sequence | None' = None, np_histogram: 'NumpyHistogram | None' = None, @@ -29,10 +29,17 @@ https://docs.scipy.org/doc/numpy/reference/generated/numpy.histogram.html ## Args -- `sequence`: Input data for histogram. -- `np_histogram`: Alternative input of a precomputed histogram. -- `num_bins`: Number of bins for the histogram. The default number of bins is 64. The maximum number of bins is 512. + +Input data for histogram. + + +Alternative input of a precomputed histogram. + + + +Number of bins for the histogram. The default number of bins is 64. The maximum number of bins is 512. + ## Attributes @@ -41,4 +48,3 @@ https://docs.scipy.org/doc/numpy/reference/generated/numpy.histogram.html - diff --git a/models/ref/python/data-types/html.mdx b/models/ref/python/data-types/html.mdx index 092c927ebc..8c4f81a17d 100644 --- a/models/ref/python/data-types/html.mdx +++ b/models/ref/python/data-types/html.mdx @@ -7,11 +7,11 @@ namespace: wandb.sdk.data_types.html import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; - + -## class wandb.Html +## Class wandb.Html ```python data: 'str | pathlib.Path | TextIO', inject: 'bool' = True, @@ -26,10 +26,17 @@ W&B class for logging HTML content to W&B. ## Args -- `data`: A string that is a path to a file with the extension ".html", or a string or IO object containing literal HTML. -- `inject`: Add a stylesheet to the HTML object. If set to False the HTML will pass through unchanged. -- `data_is_not_path`: If set to False, the data will be treated as a path to a file. + +A string that is a path to a file with the extension ".html", or a string or IO object containing literal HTML. + + +Add a stylesheet to the HTML object. If set to False the HTML will pass through unchanged. + + + +If set to False, the data will be treated as a path to a file. + diff --git a/models/ref/python/data-types/image.mdx b/models/ref/python/data-types/image.mdx index 7ac53db36b..76ede88282 100644 --- a/models/ref/python/data-types/image.mdx +++ b/models/ref/python/data-types/image.mdx @@ -7,11 +7,11 @@ namespace: wandb.sdk.data_types.image import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; - + -## class wandb.Image +## Class wandb.Image ```python data_or_path: 'ImageDataOrPathType', mode: 'str | None' = None, @@ -32,24 +32,49 @@ A class for logging images to W&B. ## Args -- `data_or_path`: Accepts NumPy array/pytorch tensor of image data, - a PIL image object, or a path to an image file. If a NumPy - array or pytorch tensor is provided, - the image data will be saved to the given file type. - If the values are not in the range [0, 255] or all values are in the range [0, 1], - the image pixel values will be normalized to the range [0, 255] - unless `normalize` is set to `False`. - - pytorch tensor should be in the format (channel, height, width) - - NumPy array should be in the format (height, width, channel) -- `mode`: The PIL mode for an image. Most common are "L", "RGB", "RGBA". Full Pillow docs for more information https://pillow.readthedocs.io/en/stable/handbook/concepts.html#modes -- `caption`: Label for display of image. -- `grouping`: The grouping number for the image. -- `classes`: A list of class information for the image, used for labeling bounding boxes, and image masks. -- `boxes`: A dictionary containing bounding box information for the image. see https://docs.wandb.ai/models/ref/python/data-types/boundingboxes2d -- `masks`: A dictionary containing mask information for the image. see https://docs.wandb.ai/models/ref/python/data-types/imagemask -- `file_type`: The file type to save the image as. This parameter has no effect if `data_or_path` is a path to an image file. -- `normalize`: If `True`, normalize the image pixel values to fall within the range of [0, 255]. Normalize is only applied if `data_or_path` is a numpy array or pytorch tensor. - + +Accepts NumPy array/pytorch tensor of image data, +a PIL image object, or a path to an image file. If a NumPy +array or pytorch tensor is provided, +the image data will be saved to the given file type. +If the values are not in the range [0, 255] or all values are in the range [0, 1], +the image pixel values will be normalized to the range [0, 255] +unless `normalize` is set to `False`. +- pytorch tensor should be in the format (channel, height, width) +- NumPy array should be in the format (height, width, channel) + + + +The PIL mode for an image. Most common are "L", "RGB", "RGBA". Full Pillow docs for more information https://pillow.readthedocs.io/en/stable/handbook/concepts.html#modes + + + +Label for display of image. + + + +The grouping number for the image. + + + +A list of class information for the image, used for labeling bounding boxes, and image masks. + + + +A dictionary containing bounding box information for the image. see https://docs.wandb.ai/models/ref/python/data-types/boundingboxes2d + + + +A dictionary containing mask information for the image. see https://docs.wandb.ai/models/ref/python/data-types/imagemask + + + +The file type to save the image as. This parameter has no effect if `data_or_path` is a path to an image file. + + + +If `True`, normalize the image pixel values to fall within the range of [0, 255]. Normalize is only applied if `data_or_path` is a numpy array or pytorch tensor. + diff --git a/models/ref/python/data-types/image/image-properties.mdx b/models/ref/python/data-types/image/image-properties.mdx index ce90f3946d..37088e0a4a 100644 --- a/models/ref/python/data-types/image/image-properties.mdx +++ b/models/ref/python/data-types/image/image-properties.mdx @@ -7,13 +7,7 @@ kind: class namespace: wandb.sdk.data_types.image --- -## class wandb.Image - - +## Class wandb.Image ### property image - - - - diff --git a/models/ref/python/data-types/molecule.mdx b/models/ref/python/data-types/molecule.mdx index 8f73737593..16cef4de6f 100644 --- a/models/ref/python/data-types/molecule.mdx +++ b/models/ref/python/data-types/molecule.mdx @@ -7,11 +7,11 @@ namespace: wandb.sdk.data_types.molecule import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; - + -## class wandb.Molecule +## Class wandb.Molecule ```python data_or_path: 'str | pathlib.Path | TextIO', caption: 'str | None' = None, **kwargs: 'str' @@ -25,10 +25,17 @@ W&B class for 3D Molecular data. ## Args -- `data_or_path`: Molecule can be initialized from a file name or an io object. -- `caption`: Caption associated with the molecule for display. -- `kwargs`: + +Molecule can be initialized from a file name or an io object. + + +Caption associated with the molecule for display. + + + + + diff --git a/models/ref/python/data-types/molecule/molecule-methods.mdx b/models/ref/python/data-types/molecule/molecule-methods.mdx index 6812cb4d2c..c87d4c8a5b 100644 --- a/models/ref/python/data-types/molecule/molecule-methods.mdx +++ b/models/ref/python/data-types/molecule/molecule-methods.mdx @@ -7,11 +7,11 @@ kind: class namespace: wandb.sdk.data_types.molecule --- -## class wandb.Molecule +## Class wandb.Molecule +## method Molecule.from_rdkit - -### method Molecule.from_rdkit() +Convert RDKit-supported file/object types to wandb.Molecule. ```python data_or_path: 'RDKitDataType', @@ -20,18 +20,23 @@ convert_to_3d_and_optimize: 'bool' = True, mmff_optimize_molecule_max_iterations: 'int' = 200 ``` -Convert RDKit-supported file/object types to wandb.Molecule. - ##### Arguments -- `data_or_path`: (string, rdkit.Chem.rdchem.Mol) Molecule can be initialized from a file name or an rdkit.Chem.rdchem.Mol object. -- `caption`: (string) Caption associated with the molecule for display. -- `convert_to_3d_and_optimize`: (bool) Convert to rdkit.Chem.rdchem.Mol with 3D coordinates. This is an expensive operation that may take a long time for complicated molecules. + +(string, rdkit.Chem.rdchem.Mol) Molecule can be initialized from a file name or an rdkit.Chem.rdchem.Mol object. + + +(string) Caption associated with the molecule for display. + + +(bool) Convert to rdkit.Chem.rdchem.Mol with 3D coordinates. This is an expensive operation that may take a long time for complicated molecules. + +## method Molecule.from_smiles -### method Molecule.from_smiles() +Convert SMILES string to wandb.Molecule. ```python data: 'str', @@ -41,17 +46,21 @@ convert_to_3d_and_optimize: 'bool' = True, mmff_optimize_molecule_max_iterations: 'int' = 200 ``` -Convert SMILES string to wandb.Molecule. - ##### Arguments -- `data`: SMILES string. -- `caption`: Caption associated with the molecule for display. -- `sanitize`: Check if the molecule is chemically reasonable by the RDKit's definition. -- `convert_to_3d_and_optimize`: Convert to rdkit.Chem.rdchem.Mol with 3D coordinates. This is a computationally intensive operation that may take a long time for complicated molecules. - - + +SMILES string. + + +Caption associated with the molecule for display. + + +Check if the molecule is chemically reasonable by the RDKit's definition. + + +Convert to rdkit.Chem.rdchem.Mol with 3D coordinates. This is a computationally intensive operation that may take a long time for complicated molecules. + diff --git a/models/ref/python/data-types/object3d.mdx b/models/ref/python/data-types/object3d.mdx index a955cab873..8b602a631b 100644 --- a/models/ref/python/data-types/object3d.mdx +++ b/models/ref/python/data-types/object3d.mdx @@ -7,11 +7,11 @@ namespace: wandb.sdk.data_types.object_3d import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; - + -## class wandb.Object3D +## Class wandb.Object3D ```python data_or_path: 'np.ndarray | str | pathlib.Path | TextIO | dict', caption: 'str | None' = None, **kwargs: 'str | FileFormat3D | None' @@ -25,10 +25,17 @@ W&B class for 3D point clouds. ## Args -- `data_or_path`: Object3D can be initialized from a file or a numpy array. -- `caption`: Caption associated with the object for display. -- `kwargs`: + +Object3D can be initialized from a file or a numpy array. + + +Caption associated with the object for display. + + + + + diff --git a/models/ref/python/data-types/object3d/object3d-methods.mdx b/models/ref/python/data-types/object3d/object3d-methods.mdx index c3fe0b3d70..a24e3d7ff9 100644 --- a/models/ref/python/data-types/object3d/object3d-methods.mdx +++ b/models/ref/python/data-types/object3d/object3d-methods.mdx @@ -7,39 +7,34 @@ kind: class namespace: wandb.sdk.data_types.object_3d --- -## class wandb.Object3D +## Class wandb.Object3D +## method Object3D.from_file - -### method Object3D.from_file() +Initializes Object3D from a file or stream. ```python data_or_path: 'TextIO | str', file_type: 'FileFormat3D | None' = None ``` -Initializes Object3D from a file or stream. - ##### Arguments -- `data_or_path`: A path to a file or a `TextIO` stream. - + +A path to a file or a `TextIO` stream. + +## method Object3D.from_numpy - -### method Object3D.from_numpy() +Initializes Object3D from a numpy array. ```python data: 'np.ndarray' ``` -Initializes Object3D from a numpy array. - +## method Object3D.from_point_cloud - - - -### method Object3D.from_point_cloud() +Initializes Object3D from a python object. ```python points: 'Sequence[Point]', @@ -48,16 +43,17 @@ vectors: 'Sequence[Vector3D] | None' = None, point_cloud_type: 'PointCloudType' = 'lidar/beta' ``` -Initializes Object3D from a python object. - ##### Arguments -- `points`: The points in the point cloud. -- `boxes`: 3D bounding boxes for labeling the point cloud. Boxes are displayed in point cloud visualizations. -- `vectors`: Each vector is displayed in the point cloud visualization. Can be used to indicate directionality of bounding boxes. Defaults to None. - - - + +The points in the point cloud. + + +3D bounding boxes for labeling the point cloud. Boxes are displayed in point cloud visualizations. + + +Each vector is displayed in the point cloud visualization. Can be used to indicate directionality of bounding boxes. Defaults to None. + diff --git a/models/ref/python/data-types/plotly.mdx b/models/ref/python/data-types/plotly.mdx index f4f59cbb50..fecfd0a221 100644 --- a/models/ref/python/data-types/plotly.mdx +++ b/models/ref/python/data-types/plotly.mdx @@ -7,11 +7,11 @@ namespace: wandb.sdk.data_types.plotly import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; - + -## class wandb.Plotly +## Class wandb.Plotly ```python (val: 'plotly.Figure | matplotlib.artist.Artist') ``` @@ -24,8 +24,9 @@ W&B class for Plotly plots. ## Args -- `val`: Matplotlib or Plotly figure. - + +Matplotlib or Plotly figure. + diff --git a/models/ref/python/data-types/table.mdx b/models/ref/python/data-types/table.mdx index 6b11a58099..10bfa983ce 100644 --- a/models/ref/python/data-types/table.mdx +++ b/models/ref/python/data-types/table.mdx @@ -7,11 +7,11 @@ namespace: wandb.sdk.data_types.table import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; - + -## class wandb.Table +## Class wandb.Table ```python columns: 'list[ColumnKey] | None' = None, data: 'list[InputRow] | np.ndarray | pd.DataFrame | None' = None, @@ -39,35 +39,57 @@ https://docs.wandb.ai/models/tables ## Args -- `columns`: Names of the columns in the table. Defaults to ["Input", "Output", "Expected"]. -- `data`: 2D row-oriented array of values, NumPy array, or pandas DataFrame. -- `rows`: 2D row-oriented array of values. -- `dataframe`: pandas DataFrame object used to create the table. When set, `data` and `columns` arguments are ignored. -- `dtype`: The expected type for the column values, used to validate the - data. If not set, types are inferred from the data. It can be: - - a single type - - a Python built-in type such as `int`, `str`, `bool`, list, dict, or - datetime. - - a W&B Media type like `wandb.Image` declared under wandb.data_types - - a const value - - a list of any of the above to assign a different type to each - column (should be the same length as `columns`) -- `optional`: Determines if `None` values are allowed. Defaults to True. - - If a singular bool value, then the optionality is enforced for all - columns specified at construction time - - If a list of bool values, then the optionality is applied to each - column - should be the same length as `columns` - applies to all columns. A list of bool values applies to each respective column. -- `allow_mixed_types`: Determines if columns are allowed to have mixed types (disables type validation). Defaults to False -- `log_mode`: Controls how the Table is logged when mutations occur. - Options: - - "IMMUTABLE" (default): Table can only be logged once; subsequent - logging attempts after the table has been mutated will be no-ops. - - "MUTABLE": Table can be re-logged after mutations, creating - a new artifact version each time it's logged. - - "INCREMENTAL": Table data is logged incrementally, with each log creating - a new artifact entry containing the new data since the last log. - + +Names of the columns in the table. Defaults to ["Input", "Output", "Expected"]. + + + +2D row-oriented array of values, NumPy array, or pandas DataFrame. + + + +2D row-oriented array of values. + + + +pandas DataFrame object used to create the table. When set, `data` and `columns` arguments are ignored. + + + +The expected type for the column values, used to validate the +data. If not set, types are inferred from the data. It can be: +- a single type + - a Python built-in type such as `int`, `str`, `bool`, list, dict, or + datetime. + - a W&B Media type like `wandb.Image` declared under wandb.data_types + - a const value +- a list of any of the above to assign a different type to each + column (should be the same length as `columns`) + + + +Determines if `None` values are allowed. Defaults to True. +- If a singular bool value, then the optionality is enforced for all +columns specified at construction time +- If a list of bool values, then the optionality is applied to each +column - should be the same length as `columns` +applies to all columns. A list of bool values applies to each respective column. + + + +Determines if columns are allowed to have mixed types (disables type validation). Defaults to False + + + +Controls how the Table is logged when mutations occur. +Options: +- "IMMUTABLE" (default): Table can only be logged once; subsequent +logging attempts after the table has been mutated will be no-ops. +- "MUTABLE": Table can be re-logged after mutations, creating +a new artifact version each time it's logged. +- "INCREMENTAL": Table data is logged incrementally, with each log creating +a new artifact entry containing the new data since the last log. + diff --git a/models/ref/python/data-types/table/table-methods.mdx b/models/ref/python/data-types/table/table-methods.mdx index 3493f3bad7..57b26bab0c 100644 --- a/models/ref/python/data-types/table/table-methods.mdx +++ b/models/ref/python/data-types/table/table-methods.mdx @@ -7,11 +7,11 @@ kind: class namespace: wandb.sdk.data_types.table --- -## class wandb.Table +## Class wandb.Table +## method Table.add_column - -### method Table.add_column() +Adds a column of data to the table. ```python self, @@ -20,41 +20,44 @@ data: 'list[Any] | np.ndarray', optional: 'bool' = False ``` -Adds a column of data to the table. - ##### Arguments -- `name`: The unique name of the column. -- `data`: A column of homogeneous data. -- `optional`: If null-like values are permitted. + +The unique name of the column. + + +A column of homogeneous data. + + +If null-like values are permitted. + +## method Table.add_computed_columns -### method Table.add_computed_columns() +Adds one or more computed columns based on existing data. ```python self, fn: 'Callable[[int, dict[ColumnKey, Any]], dict[str, Any]]' ``` -Adds one or more computed columns based on existing data. - ##### Arguments -- `fn`: A function which accepts an index and row dict, and returns a dict representing new columns for that row, keyed by the new column names. - - - + +A function which accepts an index and row dict, and returns a dict representing new columns for that row, keyed by the new column names. + ##### Examples +table = wandb.Table(columns=["x", "y"], data=[[3, 1], [4, 6]]) -### method Table.add_data() + In the callback: + - `ndx` is an integer representing the index of the row. + - `row` is a dictionary keyed by existing columns. -```python -self, *data: 'Any' -``` +## method Table.add_data Adds a new row of data to the table. @@ -63,29 +66,37 @@ The maximum amount ofrows in a table is determined by The length of the data should match the length of the table column. -##### Arguments +```python +self, *data: 'Any' +``` -- `data`: +##### Arguments + + +## method Table.add_row -### method Table.add_row() +Deprecated. Use `Table.add_data` method instead. ```python self, *row: 'Any' ``` -Deprecated. Use `Table.add_data` method instead. - ##### Arguments -- `row`: + + +## method Table.cast +Casts a column to a specific data type. -### method Table.cast() +This can be one of the normal python classes, an internal W&B type, +or an example object, like an instance of wandb.Image or +wandb.Classes. ```python self, @@ -94,22 +105,23 @@ dtype: 'Any', optional: 'bool' = False ``` -Casts a column to a specific data type. - -This can be one of the normal python classes, an internal W&B type, -or an example object, like an instance of wandb.Image or -wandb.Classes. - ##### Arguments -- `col_name`: The name of the column to cast. -- `dtype`: The target dtype. -- `optional`: If the column should allow Nones. + +The name of the column to cast. + + +The target dtype. + + +If the column should allow Nones. + +## method Table.get_column -### method Table.get_column() +Retrieves a column from the table and optionally converts it to a NumPy object. ```python self, @@ -117,39 +129,29 @@ name: 'ColumnKey', convert_to: "Literal['numpy'] | None" = None ``` -Retrieves a column from the table and optionally converts it to a NumPy object. - ##### Arguments -- `name`: The name of the column. -- `convert_to`: "numpy" will convert the underlying data to a NumPy object. - + +The name of the column. + + +"numpy" will convert the underlying data to a NumPy object. + +## method Table.get_dataframe -### method Table.get_dataframe() +Returns a `pandas.DataFrame` of the table. ```python self ``` -Returns a `pandas.DataFrame` of the table. - +## method Table.get_index - - - -### method Table.get_index() +Returns an array of row indexes for use in other tables to create links. ```python (self) ``` -Returns an array of row indexes for use in other tables to create links. - - - - - - - diff --git a/models/ref/python/data-types/video.mdx b/models/ref/python/data-types/video.mdx index feb9a5cbfb..c2bd38cc90 100644 --- a/models/ref/python/data-types/video.mdx +++ b/models/ref/python/data-types/video.mdx @@ -7,11 +7,11 @@ namespace: wandb.sdk.data_types.video import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; - + -## class wandb.Video +## Class wandb.Video ```python (data_or_path: 'str | pathlib.Path | np.ndarray | TextIO | BytesIO', caption: 'str | None' = None, @@ -27,11 +27,21 @@ A class for logging videos to W&B. ## Args -- `data_or_path`: Video can be initialized with a path to a file or an io object. Video can be initialized with a numpy tensor. The numpy tensor must be either 4 dimensional or 5 dimensional. The dimensions should be (number of frames, channel, height, width) or (batch, number of frames, channel, height, width) The format parameter must be specified with the format argument when initializing with a numpy array or io object. -- `caption`: Caption associated with the video for display. -- `fps`: The frame rate to use when encoding raw video frames. Default value is 4. This parameter has no effect when data_or_path is a string, or bytes. -- `format`: Format of video, necessary if initializing with a numpy array or io object. This parameter will be used to determine the format to use when encoding the video data. Accepted values are "gif", "mp4", "webm", or "ogg". If no value is provided, the default format will be "gif". + +Video can be initialized with a path to a file or an io object. Video can be initialized with a numpy tensor. The numpy tensor must be either 4 dimensional or 5 dimensional. The dimensions should be (number of frames, channel, height, width) or (batch, number of frames, channel, height, width) The format parameter must be specified with the format argument when initializing with a numpy array or io object. + + +Caption associated with the video for display. + + + +The frame rate to use when encoding raw video frames. Default value is 4. This parameter has no effect when data_or_path is a string, or bytes. + + + +Format of video, necessary if initializing with a numpy array or io object. This parameter will be used to determine the format to use when encoding the video data. Accepted values are "gif", "mp4", "webm", or "ogg". If no value is provided, the default format will be "gif". + diff --git a/models/ref/python/experiments/artifact.mdx b/models/ref/python/experiments/artifact.mdx index f9433a6c8d..e964bf4060 100644 --- a/models/ref/python/experiments/artifact.mdx +++ b/models/ref/python/experiments/artifact.mdx @@ -7,11 +7,19 @@ namespace: wandb.sdk.artifacts.artifact import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; - + + +## Class wandb.Artifact + +Flexible and lightweight building block for dataset and model versioning. + +Construct an empty W&B Artifact. Populate an artifacts contents with methods that +begin with `add`. Once the artifact has all the desired files, you can call +`run.log_artifact()` to log it. + -## class wandb.Artifact ```python name: 'str', type: 'str', @@ -24,24 +32,43 @@ storage_region: 'str | None' = None -Flexible and lightweight building block for dataset and model versioning. +{/* Flexible and lightweight building block for dataset and model versioning. Construct an empty W&B Artifact. Populate an artifacts contents with methods that begin with `add`. Once the artifact has all the desired files, you can call -`run.log_artifact()` to log it. +`run.log_artifact()` to log it. */} + + + +### Args + + +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. + + + +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. Note that some types reserved for internal use and cannot be set by users. Such types include `job` and types that start with `wandb-`. + + + +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. + + +Additional information about an artifact. Specify metadata as a dictionary of key-value pairs. You can specify no more than 100 total keys. + + +Use `Artifact.new_draft()` method instead to modify an existing artifact. + -## Args + +Deprecated. + -- `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. -- `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. Note that some types reserved for internal use and cannot be set by users. Such types include `job` and types that start with `wandb-`. -- `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. -- `metadata`: Additional information about an artifact. Specify metadata as a dictionary of key-value pairs. You can specify no more than 100 total keys. -- `incremental`: Use `Artifact.new_draft()` method instead to modify an existing artifact. -- `use_as`: Deprecated. -- `storage_region`: + + diff --git a/models/ref/python/experiments/artifact/artifact-methods.mdx b/models/ref/python/experiments/artifact/artifact-methods.mdx index 183435822b..85200c27e8 100644 --- a/models/ref/python/experiments/artifact/artifact-methods.mdx +++ b/models/ref/python/experiments/artifact/artifact-methods.mdx @@ -7,11 +7,11 @@ kind: class namespace: wandb.sdk.artifacts.artifact --- -## class wandb.Artifact +## Class wandb.Artifact +## method Artifact.add - -### method Artifact.add() +Add wandb.WBValue `obj` to the artifact. ```python self, @@ -20,21 +20,31 @@ name: 'StrPath', overwrite: 'bool' = False ``` -Add wandb.WBValue `obj` to the artifact. - ##### Arguments -- `obj`: The object to add. Currently support one of Bokeh, JoinedTable, PartitionedTable, Table, Classes, ImageMask, BoundingBoxes2D, Audio, Image, Video, Html, Object3D -- `name`: The path within the artifact to add the object. -- `overwrite`: If True, overwrite existing objects with the same file path if applicable. + +The object to add. Currently support one of Bokeh, JoinedTable, PartitionedTable, Table, Classes, ImageMask, BoundingBoxes2D, Audio, Image, Video, Html, Object3D + + + +The path within the artifact to add the object. + + + +If True, overwrite existing objects with the same file path if applicable. + +##### Returns + +The added manifest entry ##### Raises - `ArtifactFinalizedError`: You cannot make changes to the current artifact version because it is finalized. Log a new artifact version instead. +## method Artifact.add_dir -### method Artifact.add_dir() +Add a local directory to the artifact. ```python self, @@ -45,28 +55,40 @@ policy: "Literal['mutable', 'immutable'] | None" = 'mutable', merge: 'bool' = False ``` -Add a local directory to the artifact. - ##### Arguments -- `local_path`: The path of the local directory. -- `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. -- `skip_cache`: If set to `True`, W&B will not copy/move files to the cache while uploading -- `policy`: 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. -- `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. + +The path of the local directory. + + + +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. + + + +If set to `True`, W&B will not copy/move files to the cache while uploading + + +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. + + + +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. + ##### Raises - `ArtifactFinalizedError`: You cannot make changes to the current artifact version because it is finalized. Log a new artifact version instead. - `ValueError`: Policy must be "mutable" or "immutable" +## method Artifact.add_file -### method Artifact.add_file() +Add a local file to the artifact. ```python self, @@ -78,33 +100,42 @@ policy: "Literal['mutable', 'immutable'] | None" = 'mutable', overwrite: 'bool' = False ``` -Add a local file to the artifact. - ##### Arguments -- `local_path`: The path to the file being added. -- `name`: The path within the artifact to use for the file being added. Defaults to the basename of the file. -- `is_tmp`: If true, then the file is renamed deterministically to avoid collisions. -- `skip_cache`: If `True`, do not copy files to the cache after uploading. -- `policy`: By default, set to "mutable". If set to "mutable", create a temporary copy of the file to prevent corruption during upload. If set to "immutable", disable protection and rely on the user not to delete or change the file. -- `overwrite`: If `True`, overwrite the file if it already exists. + +The path to the file being added. + + + +The path within the artifact to use for the file being added. Defaults to the basename of the file. + + + +If true, then the file is renamed deterministically to avoid collisions. + + +If `True`, do not copy files to the cache after uploading. + + + +By default, set to "mutable". If set to "mutable", create a temporary copy of the file to prevent corruption during upload. If set to "immutable", disable protection and rely on the user not to delete or change the file. + + + +If `True`, overwrite the file if it already exists. + + +##### Returns + +The added manifest entry. ##### Raises - `ArtifactFinalizedError`: You cannot make changes to the current artifact version because it is finalized. Log a new artifact version instead. - `ValueError`: Policy must be "mutable" or "immutable" - -### method Artifact.add_reference() - -```python -self, -uri: 'ArtifactManifestEntry | str', -name: 'StrPath | None' = None, -checksum: 'bool' = True, -max_objects: 'int | None' = None -``` +## method Artifact.add_reference Add a reference denoted by a URI to the artifact. @@ -131,47 +162,67 @@ By default, the following schemes are supported: For any other scheme, the digest is just a hash of the URI and the size is left blank. +```python +self, +uri: 'ArtifactManifestEntry | str', +name: 'StrPath | None' = None, +checksum: 'bool' = True, +max_objects: 'int | None' = None +``` + ##### Arguments -- `uri`: The URI path of the reference to add. The URI path can be an object returned from `Artifact.get_entry` to store a reference to another artifact's entry. -- `name`: The path within the artifact to place the contents of this reference. -- `checksum`: Whether or not to checksum the resource(s) located at the reference URI. Checksumming is strongly recommended as it enables automatic integrity validation. Disabling checksumming will speed up artifact creation but reference directories will not iterated through so the objects in the directory will not be saved to the artifact. We recommend setting `checksum=False` when adding reference objects, in which case a new version will only be created if the reference URI changes. -- `max_objects`: The maximum number of objects to consider when adding a reference that points to directory or bucket store prefix. By default, the maximum number of objects allowed for Amazon S3, GCS, Azure, and local files is 10,000,000. Other URI schemas do not have a maximum. + +The URI path of the reference to add. The URI path can be an object returned from `Artifact.get_entry` to store a reference to another artifact's entry. + + + +The path within the artifact to place the contents of this reference. + + + +Whether or not to checksum the resource(s) located at the reference URI. Checksumming is strongly recommended as it enables automatic integrity validation. Disabling checksumming will speed up artifact creation but reference directories will not iterated through so the objects in the directory will not be saved to the artifact. We recommend setting `checksum=False` when adding reference objects, in which case a new version will only be created if the reference URI changes. + + +The maximum number of objects to consider when adding a reference that points to directory or bucket store prefix. By default, the maximum number of objects allowed for Amazon S3, GCS, Azure, and local files is 10,000,000. Other URI schemas do not have a maximum. + + +##### Returns + +The added manifest entries. ##### Raises - `ArtifactFinalizedError`: You cannot make changes to the current artifact version because it is finalized. Log a new artifact version instead. +## method Artifact.checkout -### method Artifact.checkout() +Replace the specified root directory with the contents of the artifact. + +WARNING: This will delete all files in `root` that are not included in the +artifact. ```python self, root: 'str | None' = None ``` -Replace the specified root directory with the contents of the artifact. - -WARNING: This will delete all files in `root` that are not included in the -artifact. - ##### Arguments -- `root`: The directory to replace with this artifact's files. + +The directory to replace with this artifact's files. + +##### Returns + +The path of the checked out contents. ##### Raises - `ArtifactNotLoggedError`: If the artifact is not logged. - -### method Artifact.delete() - -```python -self, -delete_aliases: 'bool' = False -``` +## method Artifact.delete Delete an artifact and its files. @@ -181,17 +232,28 @@ source artifact is unaffected. Use `Artifact.unlink()` instead of `Artifact.delete()` to remove a link between a source artifact and a collection. -##### Arguments +```python +self, +delete_aliases: 'bool' = False +``` -- `delete_aliases`: If set to `True`, delete all aliases associated with the artifact. If `False`, raise an exception if the artifact has existing aliases. This parameter is ignored if the artifact is retrieved from a collection it is linked to. +##### Arguments + +If set to `True`, delete all aliases associated with the artifact. If `False`, raise an exception if the artifact has existing aliases. This parameter is ignored if the artifact is retrieved from a collection it is linked to. + ##### Raises - `ArtifactNotLoggedError`: If the artifact is not logged. +## method Artifact.download + +Download the contents of the artifact to the specified root directory. -### method Artifact.download() +Existing files located within `root` are not modified. Explicitly delete `root` +before you call `download` if you want the contents of `root` to exactly match +the artifact. ```python self, @@ -202,47 +264,63 @@ path_prefix: 'StrPath | None' = None, multipart: 'bool | None' = None ``` -Download the contents of the artifact to the specified root directory. +##### Arguments -Existing files located within `root` are not modified. Explicitly delete `root` -before you call `download` if you want the contents of `root` to exactly match -the artifact. + +The directory W&B stores the artifact's files. + -##### Arguments + +If set to `True`, any invalid reference paths will be ignored while downloading referenced files. + + + +If set to `True`, the artifact cache will be skipped when downloading and W&B will download each file into the default root or specified download directory. + + + +If specified, only files with a path that starts with the given prefix will be downloaded. Uses unix format (forward slashes). + -- `root`: The directory W&B stores the artifact's files. -- `allow_missing_references`: If set to `True`, any invalid reference paths will be ignored while downloading referenced files. -- `skip_cache`: If set to `True`, the artifact cache will be skipped when downloading and W&B will download each file into the default root or specified download directory. -- `path_prefix`: If specified, only files with a path that starts with the given prefix will be downloaded. Uses unix format (forward slashes). -- `multipart`: If set to `None` (default), the artifact will be downloaded in parallel using multipart download if individual file size is greater than 2GB. If set to `True` or `False`, the artifact will be downloaded in parallel or serially regardless of the file size. + +If set to `None` (default), the artifact will be downloaded in parallel using multipart download if individual file size is greater than 2GB. If set to `True` or `False`, the artifact will be downloaded in parallel or serially regardless of the file size. + +##### Returns + +The path to the downloaded contents. ##### Raises - `ArtifactNotLoggedError`: If the artifact is not logged. +## method Artifact.file -### method Artifact.file() +Download a single file artifact to the directory you specify with `root`. ```python self, root: 'str | None' = None ``` -Download a single file artifact to the directory you specify with `root`. - ##### Arguments -- `root`: The root directory to store the file. Defaults to `./artifacts/self.name/`. + +The root directory to store the file. Defaults to `./artifacts/self.name/`. + + +##### Returns +The full path of the downloaded file. ##### Raises - `ArtifactNotLoggedError`: If the artifact is not logged. - `ValueError`: If the artifact contains more than one file. +## method Artifact.files -### method Artifact.files() +Iterate over all files stored in this artifact. ```python self, @@ -251,25 +329,29 @@ per_page: 'int' = 50, start: 'str | None' = None ``` -Iterate over all files stored in this artifact. - ##### Arguments -- `names`: The filename paths relative to the root of the artifact you wish to list. -- `per_page`: The number of files to return per request. -- `start`: Pagination cursor for resuming a past query, captured from a previous paginator's `.cursor` attribute. + +The filename paths relative to the root of the artifact you wish to list. + + +The number of files to return per request. + -##### Raises + +Pagination cursor for resuming a past query, captured from a previous paginator's `.cursor` attribute. + -- `ArtifactNotLoggedError`: If the artifact is not logged. +##### Returns +An iterator containing `File` objects. -### method Artifact.finalize() +##### Raises -```python -self -``` +- `ArtifactNotLoggedError`: If the artifact is not logged. + +## method Artifact.finalize Finalize the artifact version. @@ -278,106 +360,118 @@ is logged as a specific artifact version. Create a new artifact version to log more data to an artifact. An artifact is automatically finalized when you log the artifact with `log_artifact`. +```python +self +``` +## method Artifact.get - - -### method Artifact.get() +Get the WBValue object located at the artifact relative `name`. ```python self, name: 'str' ``` -Get the WBValue object located at the artifact relative `name`. - ##### Arguments -- `name`: The artifact relative name to retrieve. + +The artifact relative name to retrieve. + + +##### Returns +W&B object that can be logged with `run.log()` and visualized in the W&B UI. ##### Raises - `ArtifactNotLoggedError`: if the artifact isn't logged or the run is offline. +## method Artifact.get_added_local_path_name -### method Artifact.get_added_local_path_name() +Get the artifact relative name of a file added by a local filesystem path. ```python self, local_path: 'str' ``` -Get the artifact relative name of a file added by a local filesystem path. - ##### Arguments -- `local_path`: The local path to resolve into an artifact relative name. + +The local path to resolve into an artifact relative name. + +##### Returns +The artifact relative name. +## method Artifact.get_entry -### method Artifact.get_entry() +Get the entry with the given name. ```python self, name: 'StrPath' ``` -Get the entry with the given name. - ##### Arguments -- `name`: The artifact relative name to get + +The artifact relative name to get + + +##### Returns +A `W&B` object. ##### Raises - `ArtifactNotLoggedError`: if the artifact isn't logged or the run is offline. - `KeyError`: if the artifact doesn't contain an entry with the given name. +## method Artifact.get_path -### method Artifact.get_path() +Deprecated. Use `get_entry(name)`. ```python self, name: 'StrPath' ``` -Deprecated. Use `get_entry(name)`. - ##### Arguments -- `name`: + + +## method Artifact.is_draft - -### method Artifact.is_draft() +Check if artifact is not saved. ```python self ``` -Check if artifact is not saved. - - +##### Returns +Boolean. `False` if artifact is saved. `True` if artifact is not saved. +## method Artifact.json_encode -### method Artifact.json_encode() +Returns the artifact encoded to the JSON format. ```python self ``` -Returns the artifact encoded to the JSON format. - +##### Returns +A `dict` with `string` keys representing attributes of the artifact. +## method Artifact.link - -### method Artifact.link() +Link this artifact to a collection. ```python self, @@ -385,39 +479,41 @@ target_path: 'str', aliases: 'Iterable[str] | None' = None ``` -Link this artifact to a collection. - ##### Arguments -- `target_path`: The path of the collection. Path consists of the prefix "wandb-registry-" along with the registry name and the collection name `wandb-registry-{REGISTRY_NAME}/{COLLECTION_NAME}`. -- `aliases`: Add one or more aliases to the linked artifact. The "latest" alias is automatically applied to the most recent artifact you link. + +The path of the collection. Path consists of the prefix "wandb-registry-" along with the registry name and the collection name `wandb-registry-{REGISTRY_NAME}/{COLLECTION_NAME}`. + + + +Add one or more aliases to the linked artifact. The "latest" alias is automatically applied to the most recent artifact you link. + + +##### Returns +The linked artifact. ##### Raises - `ArtifactNotLoggedError`: If the artifact is not logged. +## method Artifact.logged_by -### method Artifact.logged_by() +Get the W&B run that originally logged the artifact. ```python self ``` -Get the W&B run that originally logged the artifact. - +##### Returns +The name of the W&B run that originally logged the artifact. ##### Raises - `ArtifactNotLoggedError`: If the artifact is not logged. - -### method Artifact.new_draft() - -```python -self -``` +## method Artifact.new_draft Create a new draft artifact with the same content as this committed artifact. @@ -425,14 +521,21 @@ Modifying an existing artifact creates a new artifact version known as an "incremental artifact". The artifact returned can be extended or modified and logged as a new version. +```python +self +``` +##### Returns + +An `Artifact` object. ##### Raises - `ArtifactNotLoggedError`: If the artifact is not logged. +## method Artifact.new_file -### method Artifact.new_file() +Open a new temporary file and add it to the artifact. ```python self, @@ -441,41 +544,54 @@ mode: 'str' = 'x', encoding: 'str | None' = None ``` -Open a new temporary file and add it to the artifact. - ##### Arguments -- `name`: The name of the new file to add to the artifact. -- `mode`: The file access mode to use to open the new file. -- `encoding`: The encoding used to open the new file. + +The name of the new file to add to the artifact. + + + +The file access mode to use to open the new file. + + + +The encoding used to open the new file. + +##### Returns + +A new file object that can be written to. Upon closing, the file is automatically added to the artifact. ##### Raises - `ArtifactFinalizedError`: You cannot make changes to the current artifact version because it is finalized. Log a new artifact version instead. +## method Artifact.remove -### method Artifact.remove() +Remove an item from the artifact. ```python self, item: 'StrPath | ArtifactManifestEntry' ``` -Remove an item from the artifact. - ##### Arguments -- `item`: The item to remove. Can be a specific manifest entry or the name of an artifact-relative path. If the item matches a directory all items in that directory will be removed. - + +The item to remove. Can be a specific manifest entry or the name of an artifact-relative path. If the item matches a directory all items in that directory will be removed. + ##### Raises - `ArtifactFinalizedError`: You cannot make changes to the current artifact version because it is finalized. Log a new artifact version instead. - `FileNotFoundError`: If the item isn't found in the artifact. +## method Artifact.save -### method Artifact.save() +Persist any changes made to the artifact. + +If currently in a run, that run will log this artifact. If not currently in a +run, a run of type "auto" is created to track this artifact. ```python self, @@ -483,88 +599,84 @@ project: 'str | None' = None, settings: 'wandb.Settings | None' = None ``` -Persist any changes made to the artifact. - -If currently in a run, that run will log this artifact. If not currently in a -run, a run of type "auto" is created to track this artifact. - ##### Arguments -- `project`: A project to use for the artifact in the case that a run is not already in context. -- `settings`: A settings object to use when initializing an automatic run. Most commonly used in testing harness. - + +A project to use for the artifact in the case that a run is not already in context. + + +A settings object to use when initializing an automatic run. Most commonly used in testing harness. + +## method Artifact.unlink -### method Artifact.unlink() +Unlink this artifact if it is a linked member of an artifact collection. ```python self ``` -Unlink this artifact if it is a linked member of an artifact collection. - - - ##### Raises - `ArtifactNotLoggedError`: If the artifact is not logged. - `ValueError`: If the artifact is not linked to any collection. +## method Artifact.used_by -### method Artifact.used_by() +Get a list of the runs that have used this artifact and its linked artifacts. ```python self ``` -Get a list of the runs that have used this artifact and its linked artifacts. - +##### Returns +A list of `Run` objects. ##### Raises - `ArtifactNotLoggedError`: If the artifact is not logged. +## method Artifact.verify -### method Artifact.verify() +Verify that the contents of an artifact match the manifest. + +All files in the directory are checksummed and the checksums are then +cross-referenced against the artifact's manifest. References are not verified. ```python self, root: 'str | None' = None ``` -Verify that the contents of an artifact match the manifest. - -All files in the directory are checksummed and the checksums are then -cross-referenced against the artifact's manifest. References are not verified. - ##### Arguments -- `root`: The directory to verify. If None artifact will be downloaded to './artifacts/self.name/'. - + +The directory to verify. If None artifact will be downloaded to './artifacts/self.name/'. + ##### Raises - `ArtifactNotLoggedError`: If the artifact is not logged. - `ValueError`: If the verification fails. +## method Artifact.wait -### method Artifact.wait() +If needed, wait for this artifact to finish logging. ```python self, timeout: 'int | None' = None ``` -If needed, wait for this artifact to finish logging. - ##### Arguments -- `timeout`: The time, in seconds, to wait. - - - + +The time, in seconds, to wait. + +##### Returns +An `Artifact` object. diff --git a/models/ref/python/experiments/artifact/artifact-properties.mdx b/models/ref/python/experiments/artifact/artifact-properties.mdx index 2fefcb9425..0bbdec5722 100644 --- a/models/ref/python/experiments/artifact/artifact-properties.mdx +++ b/models/ref/python/experiments/artifact/artifact-properties.mdx @@ -7,9 +7,7 @@ kind: class namespace: wandb.sdk.artifacts.artifact --- -## class wandb.Artifact - - +## Class wandb.Artifact ### property aliases @@ -207,5 +205,3 @@ The artifact's version. A string with the format `v{number}`. If this is a link artifact, the version will be from the linked collection. - - diff --git a/models/ref/python/experiments/run.mdx b/models/ref/python/experiments/run.mdx index 9929a896ca..d07f516dac 100644 --- a/models/ref/python/experiments/run.mdx +++ b/models/ref/python/experiments/run.mdx @@ -7,11 +7,11 @@ namespace: wandb.sdk.wandb_run import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; - + -## class wandb.Run +## Class wandb.Run @@ -47,7 +47,6 @@ created. - `summary`: (Summary) A summary of the run, which is a dictionary-like object. For more information, see [Log summary metrics](https://docs.wandb.ai/models/track/log/log-summary). - ## Examples Create a run with `wandb.init()`: diff --git a/models/ref/python/experiments/run/run-methods.mdx b/models/ref/python/experiments/run/run-methods.mdx index d83ee11e80..67b6a7b77c 100644 --- a/models/ref/python/experiments/run/run-methods.mdx +++ b/models/ref/python/experiments/run/run-methods.mdx @@ -7,11 +7,11 @@ kind: class namespace: wandb.sdk.wandb_run --- -## class wandb.Run +## Class wandb.Run +## method Run.alert - -### method Run.alert() +Create an alert with the given title and text. ```python self, @@ -21,19 +21,27 @@ level: 'str | AlertLevel | None' = None, wait_duration: 'int | float | timedelta | None' = None ``` -Create an alert with the given title and text. - ##### Arguments -- `title`: The title of the alert, must be less than 64 characters long. -- `text`: The text body of the alert. -- `level`: The alert level to use, either: `INFO`, `WARN`, or `ERROR`. -- `wait_duration`: The time to wait (in seconds) before sending another alert with this title. + +The title of the alert, must be less than 64 characters long. + + +The text body of the alert. + + +The alert level to use, either: `INFO`, `WARN`, or `ERROR`. + + +The time to wait (in seconds) before sending another alert with this title. + -### method Run.define_metric() +## method Run.define_metric + +Customize metrics logged with `wandb.Run.log()`. ```python self, @@ -46,22 +54,43 @@ goal: 'str | None' = None, overwrite: 'bool | None' = None ``` -Customize metrics logged with `wandb.Run.log()`. - ##### Arguments -- `name`: The name of the metric to customize. -- `step_metric`: The name of another metric to serve as the X-axis for this metric in automatically generated charts. -- `step_sync`: Automatically insert the last value of step_metric into `wandb.Run.log()` if it is not provided explicitly. Defaults to True if step_metric is specified. -- `hidden`: Hide this metric from automatic plots. -- `summary`: Specify aggregate metrics added to summary. Supported aggregations include "min", "max", "mean", "last", "first", "best", "copy" and "none". "none" prevents a summary from being generated. "best" is used together with the goal parameter, "best" is deprecated and should not be used, use "min" or "max" instead. "copy" is deprecated and should not be used. -- `goal`: Specify how to interpret the "best" summary type. Supported options are "minimize" and "maximize". "goal" is deprecated and should not be used, use "min" or "max" instead. -- `overwrite`: If false, then this call is merged with previous `define_metric` calls for the same metric by using their values for any unspecified parameters. If true, then unspecified parameters overwrite values specified by previous calls. + +The name of the metric to customize. + + +The name of another metric to serve as the X-axis for this metric in automatically generated charts. + + +Automatically insert the last value of step_metric into `wandb.Run.log()` if it is not provided explicitly. Defaults to True if step_metric is specified. + + +Hide this metric from automatic plots. + -### method Run.display() + +Specify aggregate metrics added to summary. Supported aggregations include "min", "max", "mean", "last", "first", "best", "copy" and "none". "none" prevents a summary from being generated. "best" is used together with the goal parameter, "best" is deprecated and should not be used, use "min" or "max" instead. "copy" is deprecated and should not be used. + + + +Specify how to interpret the "best" summary type. Supported options are "minimize" and "maximize". "goal" is deprecated and should not be used, use "min" or "max" instead. + + + +If false, then this call is merged with previous `define_metric` calls for the same metric by using their values for any unspecified parameters. If true, then unspecified parameters overwrite values specified by previous calls. + + +##### Returns + +An object that represents this call but can otherwise be discarded. + +## method Run.display + +Display this run in Jupyter. ```python self, @@ -69,23 +98,17 @@ height: 'int' = 420, hidden: 'bool' = False ``` -Display this run in Jupyter. - ##### Arguments -- `height`: -- `hidden`: - + + + -### method Run.finish() + -```python -self, -exit_code: 'int | None' = None, -quiet: 'bool | None' = None -``` +## method Run.finish Finish a run and upload any remaining data. @@ -99,15 +122,27 @@ Run States: - Failed: Run completed with errors (`exit_code!=0`). - Killed: Run was forcibly stopped before it could finish. +```python +self, +exit_code: 'int | None' = None, +quiet: 'bool | None' = None +``` + ##### Arguments -- `exit_code`: Integer indicating the run's exit status. Use 0 for success, any other value marks the run as failed. -- `quiet`: Deprecated. Configure logging verbosity using `wandb.Settings(quiet=...)`. + +Integer indicating the run's exit status. Use 0 for success, any other value marks the run as failed. + + +Deprecated. Configure logging verbosity using `wandb.Settings(quiet=...)`. + +## method Run.finish_artifact +Finishes a non-finalized artifact as output of a run. -### method Run.finish_artifact() +Subsequent "upserts" with the same distributed ID will result in a new version. ```python self, @@ -118,41 +153,45 @@ aliases: 'list[str] | None' = None, distributed_id: 'str | None' = None ``` -Finishes a non-finalized artifact as output of a run. +##### Arguments -Subsequent "upserts" with the same distributed ID will result in a new version. + +A path to the contents of this artifact, +can be in the following forms: + - `/local/directory` + - `/local/directory/file.txt` + - `s3://bucket/path` +You can also pass an Artifact object created by calling +`wandb.Artifact`. + -##### Arguments + +An artifact name. May be prefixed with entity/project. +Valid names can be in the following forms: + - name:version + - name:alias + - digest +This will default to the basename of the path prepended with the current +run id if not specified. + -- `artifact_or_path`: A path to the contents of this artifact, - can be in the following forms: - - `/local/directory` - - `/local/directory/file.txt` - - `s3://bucket/path` - You can also pass an Artifact object created by calling - `wandb.Artifact`. -- `name`: An artifact name. May be prefixed with entity/project. - Valid names can be in the following forms: - - name:version - - name:alias - - digest - This will default to the basename of the path prepended with the current - run id if not specified. -- `type`: The type of artifact to log, examples include `dataset`, `model` -- `aliases`: Aliases to apply to this artifact, defaults to `["latest"]` -- `distributed_id`: Unique string that all distributed jobs share. If None, defaults to the run's group name. + +The type of artifact to log, examples include `dataset`, `model` + + +Aliases to apply to this artifact, defaults to `["latest"]` + + +Unique string that all distributed jobs share. If None, defaults to the run's group name. + +##### Returns -### method Run.link_artifact() +An `Artifact` object. -```python -self, -artifact: 'Artifact', -target_path: 'str', -aliases: 'list[str] | None' = None -``` +## method Run.link_artifact Link the artifact to a collection. @@ -162,24 +201,32 @@ does not duplicate artifacts when you link an artifact to a collection. View linked artifacts in the Registry UI for the specified collection. +```python +self, +artifact: 'Artifact', +target_path: 'str', +aliases: 'list[str] | None' = None +``` + ##### Arguments -- `artifact`: The artifact object to link to the collection. -- `target_path`: The path of the collection. Path consists of the prefix "wandb-registry-" along with the registry name and the collection name `wandb-registry-{REGISTRY_NAME}/{COLLECTION_NAME}`. -- `aliases`: Add one or more aliases to the linked artifact. The "latest" alias is automatically applied to the most recent artifact you link. + +The artifact object to link to the collection. + + +The path of the collection. Path consists of the prefix "wandb-registry-" along with the registry name and the collection name `wandb-registry-{REGISTRY_NAME}/{COLLECTION_NAME}`. + + +Add one or more aliases to the linked artifact. The "latest" alias is automatically applied to the most recent artifact you link. + +##### Returns -### method Run.link_model() +The linked artifact. -```python -self, -path: 'StrPath', -registered_model_name: 'str', -name: 'str | None' = None, -aliases: 'list[str] | None' = None -``` +## method Run.link_model Log a model artifact version and link it to a registered model in the model registry. @@ -194,32 +241,46 @@ If not, create a new registered model with name 'registered_model_name'. - Link version of model artifact 'name' to registered model, 'registered_model_name'. - Attach aliases from 'aliases' list to the newly linked model artifact version. +```python +self, +path: 'StrPath', +registered_model_name: 'str', +name: 'str | None' = None, +aliases: 'list[str] | None' = None +``` + ##### Arguments -- `path`: (str) A path to the contents of this model, can be in the - following forms: - - `/local/directory` - - `/local/directory/file.txt` - - `s3://bucket/path` -- `registered_model_name`: The name of the registered model that the model is to be linked to. A registered model is a collection of model versions linked to the model registry, typically representing a team's specific ML Task. The entity that this registered model belongs to will be derived from the run. -- `name`: The name of the model artifact that files in 'path' will be logged to. This will default to the basename of the path prepended with the current run id if not specified. -- `aliases`: Aliases that will only be applied on this linked artifact inside the registered model. The alias "latest" will always be applied to the latest version of an artifact that is linked. + +(str) A path to the contents of this model, can be in the +following forms: +- `/local/directory` +- `/local/directory/file.txt` +- `s3://bucket/path` + + + +The name of the registered model that the model is to be linked to. A registered model is a collection of model versions linked to the model registry, typically representing a team's specific ML Task. The entity that this registered model belongs to will be derived from the run. + + +The name of the model artifact that files in 'path' will be logged to. This will default to the basename of the path prepended with the current run id if not specified. + + + +Aliases that will only be applied on this linked artifact inside the registered model. The alias "latest" will always be applied to the latest version of an artifact that is linked. + + +##### Returns + +The linked artifact if linking was successful, otherwise `None`. ##### Raises - `AssertionError`: If registered_model_name is a path or if model artifact 'name' is of a type that does not contain the substring 'model'. - `ValueError`: If name has invalid special characters. - -### method Run.log() - -```python -self, -data: 'dict[str, Any]', -step: 'int | None' = None, -commit: 'bool | None' = None -``` +## method Run.log Upload run data. @@ -314,19 +375,32 @@ with wandb.init() as run: run.log({"accuracy": 0.9}, step=current_step, commit=True) ``` +```python +self, +data: 'dict[str, Any]', +step: 'int | None' = None, +commit: 'bool | None' = None +``` + ##### Arguments -- `data`: A `dict` with `str` keys and values that are serializable Python objects including: `int`, `float` and `string`; any of the `wandb.data_types`; lists, tuples and NumPy arrays of serializable Python objects; other `dict`s of this structure. -- `step`: The step number to log. If `None`, then an implicit auto-incrementing step is used. See the notes in the description. -- `commit`: If true, finalize and upload the step. If false, then accumulate data for the step. See the notes in the description. If `step` is `None`, then the default is `commit=True`; otherwise, the default is `commit=False`. + +A `dict` with `str` keys and values that are serializable Python objects including: `int`, `float` and `string`; any of the `wandb.data_types`; lists, tuples and NumPy arrays of serializable Python objects; other `dict`s of this structure. + + + +The step number to log. If `None`, then an implicit auto-incrementing step is used. See the notes in the description. + + +If true, finalize and upload the step. If false, then accumulate data for the step. See the notes in the description. If `step` is `None`, then the default is `commit=True`; otherwise, the default is `commit=False`. + ##### Raises - `wandb.Error`: If called before `wandb.init()`. - `ValueError`: If invalid data is passed. - ##### Examples For more and more detailed examples, see @@ -459,7 +533,9 @@ with wandb.init() as run: ) ``` -### method Run.log_artifact() +## method Run.log_artifact + +Declare an artifact as an output of a run. ```python self, @@ -470,31 +546,48 @@ aliases: 'list[str] | None' = None, tags: 'list[str] | None' = None ``` -Declare an artifact as an output of a run. - ##### Arguments -- `artifact_or_path`: (str or Artifact) A path to the contents of this artifact, - can be in the following forms: - - `/local/directory` - - `/local/directory/file.txt` - - `s3://bucket/path` - You can also pass an Artifact object created by calling - `wandb.Artifact`. -- `name`: (str, optional) An artifact name. Valid names can be in the following forms: - - name:version - - name:alias - - digest - This will default to the basename of the path prepended with the current - run id if not specified. -- `type`: (str) The type of artifact to log, examples include `dataset`, `model` -- `aliases`: (list, optional) Aliases to apply to this artifact, defaults to `["latest"]` -- `tags`: (list, optional) Tags to apply to this artifact, if any. + +(str or Artifact) A path to the contents of this artifact, +can be in the following forms: + - `/local/directory` + - `/local/directory/file.txt` + - `s3://bucket/path` +You can also pass an Artifact object created by calling +`wandb.Artifact`. + + + +(str, optional) An artifact name. Valid names can be in the following forms: + - name:version + - name:alias + - digest +This will default to the basename of the path prepended with the current +run id if not specified. + + + +(str) The type of artifact to log, examples include `dataset`, `model` + + + +(list, optional) Aliases to apply to this artifact, defaults to `["latest"]` + + + +(list, optional) Tags to apply to this artifact, if any. + +##### Returns +An `Artifact` object. +## method Run.log_code -### method Run.log_code() +Save the current state of your code to a W&B Artifact. + +By default, it walks the current directory and logs all files that end with `.py`. ```python self, @@ -504,19 +597,27 @@ include_fn: 'Callable[[str, str], bool] | Callable[[str], bool]' = _is_py_requir exclude_fn: 'Callable[[str, str], bool] | Callable[[str], bool]' = exclude_wandb_fn ``` -Save the current state of your code to a W&B Artifact. +##### Arguments -By default, it walks the current directory and logs all files that end with `.py`. + +The relative (to `os.getcwd()`) or absolute path to recursively find code from. + -##### Arguments + +(str, optional) The name of our code artifact. By default, we'll name the artifact `source-$PROJECT_ID-$ENTRYPOINT_RELPATH`. There may be scenarios where you want many runs to share the same artifact. Specifying name allows you to achieve that. + -- `root`: The relative (to `os.getcwd()`) or absolute path to recursively find code from. -- `name`: (str, optional) The name of our code artifact. By default, we'll name the artifact `source-$PROJECT_ID-$ENTRYPOINT_RELPATH`. There may be scenarios where you want many runs to share the same artifact. Specifying name allows you to achieve that. -- `include_fn`: A callable that accepts a file path and (optionally) root path and returns True when it should be included and False otherwise. This defaults to `lambda path, root: path.endswith(".py")`. -- `exclude_fn`: A callable that accepts a file path and (optionally) root path and returns `True` when it should be excluded and `False` otherwise. This defaults to a function that excludes all files within `/.wandb/` and `/wandb/` directories. + +A callable that accepts a file path and (optionally) root path and returns True when it should be included and False otherwise. This defaults to `lambda path, root: path.endswith(".py")`. + + +A callable that accepts a file path and (optionally) root path and returns `True` when it should be excluded and `False` otherwise. This defaults to a function that excludes all files within `/.wandb/` and `/wandb/` directories. + +##### Returns +An `Artifact` object if code was logged ##### Examples @@ -544,7 +645,12 @@ with wandb.init() as run: ) ``` -### method Run.log_model() +## method Run.log_model + +Logs a model artifact containing the contents inside the 'path' to a run and marks it as an output to this run. + +The name of model artifact can only contain alphanumeric characters, +underscores, and hyphens. ```python self, @@ -553,62 +659,67 @@ name: 'str | None' = None, aliases: 'list[str] | None' = None ``` -Logs a model artifact containing the contents inside the 'path' to a run and marks it as an output to this run. +##### Arguments -The name of model artifact can only contain alphanumeric characters, -underscores, and hyphens. + +(str) A path to the contents of this model, +can be in the following forms: + - `/local/directory` + - `/local/directory/file.txt` + - `s3://bucket/path` + -##### Arguments + +A name to assign to the model artifact that the file contents will be added to. This will default to the basename of the path prepended with the current run id if not specified. + + + +Aliases to apply to the created model artifact, defaults to `["latest"]` + -- `path`: (str) A path to the contents of this model, - can be in the following forms: - - `/local/directory` - - `/local/directory/file.txt` - - `s3://bucket/path` -- `name`: A name to assign to the model artifact that the file contents will be added to. This will default to the basename of the path prepended with the current run id if not specified. -- `aliases`: Aliases to apply to the created model artifact, defaults to `["latest"]` +##### Returns +None ##### Raises - `ValueError`: If name has invalid special characters. - -### method Run.mark_preempting() - -```python -self -``` +## method Run.mark_preempting Mark this run as preempting. Also tells the internal process to immediately report this to server. - - - - -### method Run.pin_config_keys() - ```python -self, -keys: 'Sequence[str]' = () +self ``` +## method Run.pin_config_keys + Pin config keys to display in the References section on Run Overview. Pinned keys appear prominently above Notes on the Run Overview page. String values are rendered as markdown; non-strings are rendered as plain text. Calling this again replaces the previously pinned list. -##### Arguments +```python +self, +keys: 'Sequence[str]' = () +``` -- `keys`: Config key names to pin, matching keys set via ``run.config``. These are exact key strings (dots and slashes are treated literally, not as path separators). Order is preserved and determines display order. +##### Arguments + +Config key names to pin, matching keys set via ``run.config``. These are exact key strings (dots and slashes are treated literally, not as path separators). Order is preserved and determines display order. + +## method Run.restore +Download the specified file from cloud storage. -### method Run.restore() +File is placed into the current directory or run directory. +By default, will only download the file if it doesn't already exist. ```python self, @@ -618,34 +729,34 @@ replace: 'bool' = False, root: 'str | None' = None ``` -Download the specified file from cloud storage. +##### Arguments -File is placed into the current directory or run directory. -By default, will only download the file if it doesn't already exist. + +The name of the file. + -##### Arguments + +Optional path to a run to pull files from, i.e. `username/project_name/run_id` if wandb.init has not been called, this is required. + + + +Whether to download the file even if it already exists locally + -- `name`: The name of the file. -- `run_path`: Optional path to a run to pull files from, i.e. `username/project_name/run_id` if wandb.init has not been called, this is required. -- `replace`: Whether to download the file even if it already exists locally -- `root`: The directory to download the file to. Defaults to the current directory or the run directory if wandb.init was called. + +The directory to download the file to. Defaults to the current directory or the run directory if wandb.init was called. + +##### Returns + +None if it can't find the file, otherwise a file object open for reading. ##### Raises - `CommError`: If W&B can't connect to the W&B backend. - `ValueError`: If the file is not found or can't find run_path. - -### method Run.save() - -```python -self, -glob_str: 'str | os.PathLike', -base_path: 'str | os.PathLike | None' = None, -policy: 'PolicyName' = 'live', -glob: 'bool' = True -``` +## method Run.save Sync one or more files to W&B. @@ -675,48 +786,68 @@ directory level is preserved as in the example above. Files are automatically deduplicated: calling `save()` multiple times on the same file without modifications will not re-upload it. -##### Arguments +```python +self, +glob_str: 'str | os.PathLike', +base_path: 'str | os.PathLike | None' = None, +policy: 'PolicyName' = 'live', +glob: 'bool' = True +``` -- `glob_str`: A relative or absolute path or Unix glob. -- `base_path`: A path to use to infer a directory structure; see examples. -- `policy`: One of `live`, `now`, or `end`. - - live: upload the file as it changes, overwriting the previous version - - now: upload the file once now - - end: upload file when the run ends -- `glob`: Whether to treat `glob_str` as a glob pattern. Defaults to `True` for backward compatibility. Set to `False` to treat `glob_str` as a literal path, e.g. when its name contains glob metacharacters like `[`, `]`, `*`, or `?` that you don't want interpreted as a pattern. +##### Arguments + +A relative or absolute path or Unix glob. + + +A path to use to infer a directory structure; see examples. + + +One of `live`, `now`, or `end`. +- live: upload the file as it changes, overwriting the previous version +- now: upload the file once now +- end: upload file when the run ends + -### method Run.status() + +Whether to treat `glob_str` as a glob pattern. Defaults to `True` for backward compatibility. Set to `False` to treat `glob_str` as a literal path, e.g. when its name contains glob metacharacters like `[`, `]`, `*`, or `?` that you don't want interpreted as a pattern. + -```python -self -``` +##### Returns -Get sync info from the internal backend, about the current run's sync status. +Paths to the symlinks created for the matched files. For historical reasons, this may return a boolean in legacy code. ```python import wandb run = wandb.init() run.save("these/are/myfiles/*") # => Saves files in a "these/are/myfiles/" folder in the run. run.save("these/are/myfiles/*", base_path="these") # => Saves files in an "are/myfiles/" folder in the run. run.save("/Users/username/Documents/run123/*.txt") # => Saves files in a "run123/" folder in the run. See note below. run.save("/Users/username/Documents/run123/*.txt", base_path="/Users") # => Saves files in a "username/Documents/run123/" folder in the run. run.save("files/*/saveme.txt") # => Saves each "saveme.txt" file in an appropriate subdirectory # of "files/". run.save("files/myfile[1].txt", glob=False) # => Saves the literal file "files/myfile[1].txt" without # interpreting "[1]" as a glob character class. # Explicitly finish the run since a context manager is not used. run.finish() ``` +## method Run.status +Get sync info from the internal backend, about the current run's sync status. +```python +self +``` +## method Run.unwatch -### method Run.unwatch() +Remove pytorch model topology, gradient and parameter hooks. ```python self, models: 'torch.nn.Module | Sequence[torch.nn.Module] | None' = None ``` -Remove pytorch model topology, gradient and parameter hooks. - ##### Arguments -- `models`: Optional list of pytorch models that have had watch called on them. - + +Optional list of pytorch models that have had watch called on them. + +## method Run.upsert_artifact +Declare (or append to) a non-finalized artifact as output of a run. -### method Run.upsert_artifact() +Note that you must call run.finish_artifact() to finalize the artifact. +This is useful when distributed jobs need to all contribute to the same artifact. ```python self, @@ -727,32 +858,46 @@ aliases: 'list[str] | None' = None, distributed_id: 'str | None' = None ``` -Declare (or append to) a non-finalized artifact as output of a run. +##### Arguments -Note that you must call run.finish_artifact() to finalize the artifact. -This is useful when distributed jobs need to all contribute to the same artifact. + +A path to the contents of this artifact, +can be in the following forms: +- `/local/directory` +- `/local/directory/file.txt` +- `s3://bucket/path` + -##### Arguments + +An artifact name. May be prefixed with "entity/project". Defaults +to the basename of the path prepended with the current run ID +if not specified. Valid names can be in the following forms: +- name:version +- name:alias +- digest + -- `artifact_or_path`: A path to the contents of this artifact, - can be in the following forms: - - `/local/directory` - - `/local/directory/file.txt` - - `s3://bucket/path` -- `name`: An artifact name. May be prefixed with "entity/project". Defaults - to the basename of the path prepended with the current run ID - if not specified. Valid names can be in the following forms: - - name:version - - name:alias - - digest -- `type`: The type of artifact to log. Common examples include `dataset`, `model`. -- `aliases`: Aliases to apply to this artifact, defaults to `["latest"]`. -- `distributed_id`: Unique string that all distributed jobs share. If None, defaults to the run's group name. + +The type of artifact to log. Common examples include `dataset`, `model`. + + +Aliases to apply to this artifact, defaults to `["latest"]`. + + +Unique string that all distributed jobs share. If None, defaults to the run's group name. + +##### Returns -### method Run.use_artifact() +An `Artifact` object. + +## method Run.use_artifact + +Declare an artifact as an input to a run. + +Call `download` or `file` on the returned object to get the contents locally. ```python self, @@ -762,25 +907,33 @@ aliases: 'list[str] | None' = None, use_as: 'str | None' = None ``` -Declare an artifact as an input to a run. +##### Arguments -Call `download` or `file` on the returned object to get the contents locally. + +The name of the artifact to use. May be prefixed +with the name of the project the artifact was logged to +("entity" or "entity/project"). If no +entity is specified in the name, the Run or API setting's entity is used. +Valid names can be in the following forms +- name:version +- name:alias + -##### Arguments + +The type of artifact to use. + -- `artifact_or_name`: The name of the artifact to use. May be prefixed - with the name of the project the artifact was logged to - ("entity" or "entity/project"). If no - entity is specified in the name, the Run or API setting's entity is used. - Valid names can be in the following forms - - name:version - - name:alias -- `type`: The type of artifact to use. -- `aliases`: Aliases to apply to this artifact -- `use_as`: This argument is deprecated and does nothing. + +Aliases to apply to this artifact + + +This argument is deprecated and does nothing. + +##### Returns +An `Artifact` object. ##### Examples @@ -809,30 +962,38 @@ artifact_d = run.use_artifact( run.finish() ``` -### method Run.use_model() +## method Run.use_model + +Download the files logged in a model artifact 'name'. ```python self, name: 'str' ``` -Download the files logged in a model artifact 'name'. - ##### Arguments -- `name`: A model artifact name. 'name' must match the name of an existing logged - model artifact. May be prefixed with `entity/project/`. Valid names - can be in the following forms - - model_artifact_name:version - - model_artifact_name:alias + +A model artifact name. 'name' must match the name of an existing logged +model artifact. May be prefixed with `entity/project/`. Valid names +can be in the following forms +- model_artifact_name:version +- model_artifact_name:alias + +##### Returns + +`path`: Path to downloaded model artifact file(s). ##### Raises - `AssertionError`: If model artifact 'name' is of a type that does not contain the substring 'model'. +## method Run.watch + +Hook into given PyTorch model to monitor gradients and the model's computational graph. -### method Run.watch() +This function can track parameters, gradients, or both during training. ```python self, @@ -844,31 +1005,37 @@ idx: 'int | None' = None, log_graph: 'bool' = False ``` -Hook into given PyTorch model to monitor gradients and the model's computational graph. +##### Arguments -This function can track parameters, gradients, or both during training. + +A single model or a sequence of models to be monitored. + -##### Arguments + +The loss function being optimized (optional). + -- `models`: A single model or a sequence of models to be monitored. -- `criterion`: The loss function being optimized (optional). -- `log`: Specifies whether to log "gradients", "parameters", or "all". Set to None to disable logging. (default="gradients"). -- `log_freq`: Frequency (in batches) to log gradients and parameters. (default=1000) -- `idx`: Index used when tracking multiple models with `wandb.watch`. (default=None) -- `log_graph`: Whether to log the model's computational graph. (default=False) + +Specifies whether to log "gradients", "parameters", or "all". Set to None to disable logging. (default="gradients"). + + +Frequency (in batches) to log gradients and parameters. (default=1000) + -##### Raises + +Index used when tracking multiple models with `wandb.watch`. (default=None) + -- `ValueError`: If `wandb.init()` has not been called or if any of the models are not instances of `torch.nn.Module`. + +Whether to log the model's computational graph. (default=False) + +##### Raises -### method Run.write_logs() +- `ValueError`: If `wandb.init()` has not been called or if any of the models are not instances of `torch.nn.Module`. -```python -self, -text: 'str' -``` +## method Run.write_logs Write text to the run's Logs tab. @@ -879,12 +1046,14 @@ finished are silently ignored. Consider using the `capture_loggers` setting which integrates with Python's `logging` module. -##### Arguments - -- `text`: The text to write. A trailing newline is added if not present. - - - +```python +self, +text: 'str' +``` +##### Arguments + +The text to write. A trailing newline is added if not present. + diff --git a/models/ref/python/experiments/run/run-properties.mdx b/models/ref/python/experiments/run/run-properties.mdx index 27dc19c752..c4c8663caa 100644 --- a/models/ref/python/experiments/run/run-properties.mdx +++ b/models/ref/python/experiments/run/run-properties.mdx @@ -7,9 +7,7 @@ kind: class namespace: wandb.sdk.wandb_run --- -## class wandb.Run - - +## Class wandb.Run ### property config @@ -135,5 +133,3 @@ The url for the W&B run, if there is one. Offline runs will not have a url. - - diff --git a/models/ref/python/experiments/settings.mdx b/models/ref/python/experiments/settings.mdx index 428d16add4..55f460232f 100644 --- a/models/ref/python/experiments/settings.mdx +++ b/models/ref/python/experiments/settings.mdx @@ -7,11 +7,11 @@ namespace: wandb.sdk.wandb_settings import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; - + -## class wandb.Settings +## Class wandb.Settings ```python *, allow_media_symlink: bool = False, @@ -147,7 +147,7 @@ x_service_transport: str | None = None, x_service_wait: float = 30.0, x_skip_transaction_log: bool = False, x_start_time: float | None = None, -x_stats_pid: int = 26314, +x_stats_pid: int = 20783, x_stats_sampling_interval: float = 15.0, x_stats_neuron_monitor_config_path: str | None = None, x_stats_dcgm_exporter: str | None = None, @@ -210,324 +210,637 @@ precedence: ## Args -- `allow_media_symlink`: Whether to symlink media files to the run directory. - - If true, media files will be symlinked or hardlinked to the - run directory instead of copied. This may result in faster - logging and reduced disk usage. However, deleting or modifying - the original files before upload to the W&B server will be - reflected in the uploaded data. -- `allow_offline_artifacts`: Flag to allow table artifacts to be synced in offline mode. - - To revert to the old behavior, set this to False. -- `allow_val_change`: Flag to allow modification of `Config` values after they've been set. -- `anonymous`: Deprecated and will be removed. -- `api_key`: The W&B API key. -- `azure_account_url_to_access_key`: Mapping of Azure account URLs to their corresponding access keys for Azure integration. -- `app_url_override`: Override for the 'app' URL for the W&B UI. - - The `app_url` is normally computed based on `base_url`, but this can be - used to set it explicitly. - - WANDB_APP_URL is the corresponding environment variable. -- `base_url`: The URL of the W&B backend for data synchronization. -- `code_dir`: Directory containing the code to be tracked by W&B. -- `config_paths`: Paths to files to load configuration from into the `Config` object. -- `console`: The type of console capture to be applied. - - Possible values are: - - "auto" - Automatically selects the console capture method based on the - system environment and settings. - - "off" - Disables console capture. - - "redirect" - Redirects low-level file descriptors for capturing output. - - "wrap" - Overrides the write methods of sys.stdout/sys.stderr. Will be - mapped to either "wrap_raw" or "wrap_emu" based on the state of the system. - - "wrap_raw" - Same as "wrap" but captures raw output directly instead of - through an emulator. Derived from the `wrap` setting and should not be set manually. - - "wrap_emu" - Same as "wrap" but captures output through an emulator. - Derived from the `wrap` setting and should not be set manually. -- `console_multipart`: Enable multipart console logging. - - When True, the SDK writes console output to timestamped files - under the `logs/` directory instead of a single `output.log`. - - Each part is uploaded as soon as it is closed, giving users live - access to logs while the run is active. Rollover cadence is - controlled by `console_chunk_max_bytes` and/or `console_chunk_max_seconds`. - If both limits are `0`, all logs are uploaded once at run finish. - - Note: Uploaded chunks are immutable; terminal control sequences - that modify previous lines (e.g., progress bars using carriage returns) - only affect the current chunk. -- `console_chunk_max_bytes`: Size-based rollover threshold for multipart console logs, in bytes. - - Starts a new console log file when the current part reaches this - size. Has an effect only when `console_multipart` is `True`. - Can be combined with `console_chunk_max_seconds`; whichever limit is - hit first triggers the rollover. A value of `0` disables the - size-based limit. -- `console_chunk_max_seconds`: Time-based rollover threshold for multipart console logs, in seconds. - - Starts a new console log file after this many seconds have elapsed - since the current part began. Requires `console_multipart` to be - `True`. May be used with `console_chunk_max_bytes`; the first limit - reached closes the part. A value of `0` disables the time-based - limit. -- `capture_loggers`: Names of Python loggers to capture into the run's Logs tab. - - A mapping of logger name to minimum log level. When set, wandb installs a - logging.Handler on each named logger and removes it when the run finishes. - Log records emitted by those loggers are published as console output to the - run, similar to stdout/stderr capture. - - Log records are formatted the same as `logging.basicConfig()`, like - `INFO:my_module:Some message.` This is not currently customizable. - - To capture all logs, pass the name of the root logger, which is 'root'. - - This is independent of the `console` setting: both can be active - simultaneously. - - Example: - ```python - wandb.init( - settings=wandb.Settings( - console="off", - capture_loggers={ - "my_app": "INFO", - "my_app.training": "ERROR", - }, - ), - ) - ``` -- `credentials_file`: Path to file for writing temporary access tokens. -- `disable_code`: Whether to disable capturing the code. -- `disable_git`: Whether to disable capturing the git state. -- `disable_git_fork_point`: Whether to disable inferring fork point from remote branches - - When set to True, the SDK will use the latest commit from the upstream - branch, if one is set. Otherwise skip generating the diff patch. - - When set to False, the SDK will try to use the latest commit from the upstream branch, - if one is set. - Otherwise, it will find the closest commit from all remote branches. - This may impact performance for repos with many upstream branches. -- `disable_job_creation`: Whether to disable the creation of a job artifact for W&B Launch. -- `docker`: The Docker image used to execute the script. -- `email`: The email address of the user. -- `entity`: The W&B entity, such as a user or a team. -- `organization`: The W&B organization. -- `force`: Whether to pass the `force` flag to `wandb.login()`. -- `fork_from`: Specifies a point in a previous execution of a run to fork from. - - The point is defined by the run ID, a metric, and its value. - Currently, only the metric '_step' is supported. -- `git_commit`: The git commit hash to associate with the run. -- `git_remote`: The git remote to associate with the run. -- `git_remote_url`: The URL of the git remote repository. -- `git_root`: Root directory of the git repository. -- `host`: Hostname of the machine running the script. -- `http_proxy`: Custom proxy servers for http requests to W&B. -- `https_proxy`: Custom proxy servers for https requests to W&B. -- `identity_token_file`: Path to file containing an identity token (JWT) for authentication. -- `ignore_globs`: Unix glob patterns relative to `files_dir` specifying files to exclude from upload. -- `init_timeout`: Time in seconds to wait for the `wandb.init` call to complete before timing out. -- `finish_timeout`: Time in seconds to wait for data to upload at the end of a run. - - Setting this can limit costs caused by slow uploads to W&B at the end of a - run, with the trade-off that the run will be marked crashed and may be - missing some data. The default is for `run.finish()` to block until all - data finishes uploading. - - If this is set to a number greater than zero, W&B gives up on uploading a - run's data after this many seconds at the end of a run, unblocking your - script. After some time, the run becomes Crashed or Failed in the UI. Any - unuploaded data is still stored on disk and can be uploaded with `wandb - sync`. - - Use the `finish_timeout_raises` setting to raise an error in addition to - printing a warning message. - - Runs shut down by `wandb.teardown()` (which automatically runs at the end - of a script in an atexit hook) will also respect this setting. -- `finish_timeout_raises`: Whether to raise a TimeoutError if finish_timeout expires. - - Using this together with the `finish_timeout` setting causes `run.finish()` - to raise a TimeoutError after a timeout in addition to printing a message. - - Note that `run.finish()` is called implicitly when using a Run as a context - manager: - - with wandb.init() as run: - ... # run.finish() executes at the end of the `with` block - - This does not cause `wandb.teardown()` to raise an error (since it runs - at the end of a script anyway). -- `insecure_disable_ssl`: Whether to insecurely disable SSL verification. -- `job_name`: Name of the Launch job running the script. -- `job_source`: Source type for Launch. -- `label_disable`: Whether to disable automatic labeling features. -- `launch_config_path`: Path to the launch configuration file. -- `login_timeout`: Time in seconds to wait for login operations before timing out. -- `mode`: The operating mode for W&B logging and synchronization. -- `notebook_name`: Name of the notebook if running in a Jupyter-like environment. -- `program`: Path to the script that created the run, if available. -- `program_abspath`: The absolute path from the root repository directory to the script that - created the run. - - Root repository directory is defined as the directory containing the - .git directory, if it exists. Otherwise, it's the current working directory. -- `program_relpath`: The relative path to the script that created the run. -- `project`: The W&B project ID. -- `quiet`: Flag to suppress non-essential output. -- `reinit`: What to do when `wandb.init()` is called while a run is active. - - Options: - - "default": Use "finish_previous" in notebooks and "return_previous" - otherwise. - - "return_previous": Return the most recently created run - that is not yet finished. This does not update `wandb.run`; see - the "create_new" option. - - "finish_previous": Finish all active runs, then return a new run. - - "create_new": Create a new run without modifying other active runs. - Does not update `wandb.run` and top-level functions like `wandb.log`. - Because of this, some older integrations that rely on the global run - will not work. - - Can also be a boolean, but this is deprecated. False is the same as - "return_previous", and True is the same as "finish_previous". -- `relogin`: Flag to force a new login attempt. -- `resume`: Specifies the resume behavior for the run. - - Options: - - "must": Resumes from an existing run with the same ID. If no such run exists, - it will result in failure. - - "allow": Attempts to resume from an existing run with the same ID. If none is - found, a new run will be created. - - "never": Always starts a new run. If a run with the same ID already exists, - it will result in failure. - - "auto": Automatically resumes from the most recent failed run on the same - machine. -- `resume_from`: Specifies a point in a previous execution of a run to resume from. - - The point is defined by the run ID, a metric, and its value. - Currently, only the metric '_step' is supported. -- `root_dir`: The root directory to use as the base for all run-related paths. - - In particular, this is used to derive the wandb directory and the run directory. -- `run_group`: Group identifier for related runs. - - Used for grouping runs in the UI. -- `run_id`: The ID of the run. -- `run_job_type`: Type of job being run (e.g., training, evaluation). -- `run_name`: Human-readable name for the run. -- `run_notes`: Additional notes or description for the run. -- `run_tags`: Tags to associate with the run for organization and filtering. -- `sagemaker_disable`: Flag to disable SageMaker-specific functionality. -- `save_code`: Whether to save the code associated with the run. -- `settings_system`: Path to the system-wide settings file. -- `stop_fn`: A callback to execute to stop the run. - - A run can be stopped through the web UI, or after a fatal error - (if configured via a setting). - - By default, to stop a run, W&B sends a SIGINT to the main thread. - Set this callback to override this behavior, like to use a different - signal or to take some other action before interrupting. - - The callback runs in a separate thread. It runs soon after a stop is - requested, but not immediately. -- `max_end_of_run_history_metrics`: Maximum number of history sparklines to display at the end of a run. -- `max_end_of_run_summary_metrics`: Maximum number of summary metrics to display at the end of a run. -- `show_errors`: Whether to display error messages. -- `show_info`: Whether to display informational messages. -- `show_warnings`: Whether to display warning messages. -- `silent`: Flag to suppress all output. -- `stop_on_fatal_error`: Whether to stop the run after a fatal error. - - After W&B hits an unrecoverable error while uploading data, it prints - a message and stops uploading, but still allows logging more data. - This is usually desirable: your training metrics get stored on disk - and can be recovered using `wandb sync`, even if they aren't uploaded. - - This is not useful if your files get deleted after training. - In that case, setting this to True will stop the run after a fatal error, - as if the stop button was pressed in the web UI. -- `strict`: Whether to enable strict mode for validation and error checking. -- `summary_timeout`: Time in seconds to wait for summary operations before timing out. -- `sweep_id`: Identifier of the sweep this run belongs to. -- `sweep_param_path`: Path to the sweep parameters configuration. -- `symlink`: Whether to use symlinks (True by default except on Windows). -- `sync_tensorboard`: Whether to synchronize TensorBoard logs with W&B. -- `table_raise_on_max_row_limit_exceeded`: Whether to raise an exception when table row limits are exceeded. -- `use_dot_wandb`: Whether to use a hidden `.wandb` or visible `wandb` directory for run data. - - If True, the SDK uses `.wandb`. If False, `wandb`. - If not set, defaults to `.wandb` if it already exists, otherwise `wandb`. -- `username`: Username. -- `x_disable_meta`: Flag to disable the collection of system metadata. -- `x_disable_stats`: Flag to disable the collection of system metrics. -- `x_extra_http_headers`: Additional headers to add to all outgoing HTTP requests. -- `x_label`: Label to assign to system metrics and console logs collected for the run. - - This is used to group data by on the frontend and can be used to distinguish data - from different processes in a distributed training job. -- `x_primary`: Determines whether to save internal wandb files and metadata. - - In a distributed setting, this is useful for avoiding file overwrites - from secondary processes when only system metrics and logs are needed, - as the primary process handles the main logging. -- `x_save_requirements`: Flag to save the requirements file. -- `x_server_side_derived_summary`: Flag to delegate automatic computation of summary from history to the server. - - This does not disable user-provided summary updates. -- `x_service_wait`: Time in seconds to wait for the wandb-core internal service to start. -- `x_skip_transaction_log`: Whether to skip saving the run events to the transaction log. - - This is only relevant for online runs. Can be used to reduce the amount of - data written to disk. - - Should be used with caution, as it removes the gurantees about - recoverability. -- `x_stats_sampling_interval`: Sampling interval for the system monitor in seconds. -- `x_stats_open_metrics_endpoints`: OpenMetrics `/metrics` endpoints to monitor for system metrics. -- `x_stats_open_metrics_filters`: Filter to apply to metrics collected from OpenMetrics `/metrics` endpoints. - - Supports two formats: - - `{"metric regex pattern, including endpoint name as prefix": {"label": "label value regex pattern"}}` - - `("metric regex pattern 1", "metric regex pattern 2", ...)` -- `x_stats_open_metrics_http_headers`: HTTP headers to add to OpenMetrics requests. -- `x_stats_disk_paths`: System paths to monitor for disk usage. -- `x_stats_cpu_count`: System CPU count. - - If set, overrides the auto-detected value in the run metadata. -- `x_stats_cpu_logical_count`: Logical CPU count. - - If set, overrides the auto-detected value in the run metadata. -- `x_stats_gpu_count`: GPU device count. - - If set, overrides the auto-detected value in the run metadata. -- `x_stats_gpu_type`: GPU device type. - - If set, overrides the auto-detected value in the run metadata. -- `x_stats_gpu_device_ids`: GPU device indices to monitor. - - If not set, the system monitor captures metrics for all GPUs. - Assumes 0-based indexing matching CUDA/ROCm device enumeration. -- `x_stats_track_process_tree`: Monitor the entire process tree for resource usage, starting from `x_stats_pid`. - - When `True`, the system monitor aggregates the RSS, CPU%, and thread count - from the process with PID `x_stats_pid` and all of its descendants. - This can have a performance overhead and is disabled by default. -- `x_stats_no_cgroup`: Disable cgroup v2 CPU and memory limits for system metric percentages. -- `x_sync_dir_suffix`: Suffix to add to the run's directory name (sync_dir). - - This is set in wandb.init() to avoid naming conflicts. - If set, it is joined to the default name with a dash. -- `x_update_finish_state`: Flag to indicate whether this process can update the run's final state on the server. - - Set to False in distributed training when only the main process should determine the final state. + +Whether to symlink media files to the run directory. + +If true, media files will be symlinked or hardlinked to the +run directory instead of copied. This may result in faster +logging and reduced disk usage. However, deleting or modifying +the original files before upload to the W&B server will be +reflected in the uploaded data. + + + +Flag to allow table artifacts to be synced in offline mode. + +To revert to the old behavior, set this to False. + + + +Flag to allow modification of `Config` values after they've been set. + + + +Deprecated and will be removed. + + +The W&B API key. + + + +Mapping of Azure account URLs to their corresponding access keys for Azure integration. + + + +Override for the 'app' URL for the W&B UI. + +The `app_url` is normally computed based on `base_url`, but this can be +used to set it explicitly. + +WANDB_APP_URL is the corresponding environment variable. + + + +The URL of the W&B backend for data synchronization. + + + +Directory containing the code to be tracked by W&B. + + + +Paths to files to load configuration from into the `Config` object. + + + +The type of console capture to be applied. + +Possible values are: +- "auto" - Automatically selects the console capture method based on the + system environment and settings. +- "off" - Disables console capture. +- "redirect" - Redirects low-level file descriptors for capturing output. +- "wrap" - Overrides the write methods of sys.stdout/sys.stderr. Will be + mapped to either "wrap_raw" or "wrap_emu" based on the state of the system. +- "wrap_raw" - Same as "wrap" but captures raw output directly instead of + through an emulator. Derived from the `wrap` setting and should not be set manually. +- "wrap_emu" - Same as "wrap" but captures output through an emulator. + Derived from the `wrap` setting and should not be set manually. + + + +Enable multipart console logging. + +When True, the SDK writes console output to timestamped files +under the `logs/` directory instead of a single `output.log`. + +Each part is uploaded as soon as it is closed, giving users live +access to logs while the run is active. Rollover cadence is +controlled by `console_chunk_max_bytes` and/or `console_chunk_max_seconds`. +If both limits are `0`, all logs are uploaded once at run finish. + +Note: Uploaded chunks are immutable; terminal control sequences +that modify previous lines (e.g., progress bars using carriage returns) +only affect the current chunk. + + + +Size-based rollover threshold for multipart console logs, in bytes. + +Starts a new console log file when the current part reaches this +size. Has an effect only when `console_multipart` is `True`. +Can be combined with `console_chunk_max_seconds`; whichever limit is +hit first triggers the rollover. A value of `0` disables the +size-based limit. + + + +Time-based rollover threshold for multipart console logs, in seconds. + +Starts a new console log file after this many seconds have elapsed +since the current part began. Requires `console_multipart` to be +`True`. May be used with `console_chunk_max_bytes`; the first limit +reached closes the part. A value of `0` disables the time-based +limit. + + + +Names of Python loggers to capture into the run's Logs tab. + +A mapping of logger name to minimum log level. When set, wandb installs a +logging.Handler on each named logger and removes it when the run finishes. +Log records emitted by those loggers are published as console output to the +run, similar to stdout/stderr capture. + +Log records are formatted the same as `logging.basicConfig()`, like +`INFO:my_module:Some message.` This is not currently customizable. + +To capture all logs, pass the name of the root logger, which is 'root'. + +This is independent of the `console` setting: both can be active +simultaneously. + +Example: +```python +wandb.init( + settings=wandb.Settings( + console="off", + capture_loggers={ + "my_app": "INFO", + "my_app.training": "ERROR", + }, + ), +) +``` + + + +Path to file for writing temporary access tokens. + + + +Whether to disable capturing the code. + + + +Whether to disable capturing the git state. + + + +Whether to disable inferring fork point from remote branches + +When set to True, the SDK will use the latest commit from the upstream +branch, if one is set. Otherwise skip generating the diff patch. + +When set to False, the SDK will try to use the latest commit from the upstream branch, +if one is set. +Otherwise, it will find the closest commit from all remote branches. +This may impact performance for repos with many upstream branches. + + + +Whether to disable the creation of a job artifact for W&B Launch. + + + +The Docker image used to execute the script. + + + +The email address of the user. + + + +The W&B entity, such as a user or a team. + + + +The W&B organization. + + + +Whether to pass the `force` flag to `wandb.login()`. + + + +Specifies a point in a previous execution of a run to fork from. + +The point is defined by the run ID, a metric, and its value. +Currently, only the metric '_step' is supported. + + + +The git commit hash to associate with the run. + + + +The git remote to associate with the run. + + + +The URL of the git remote repository. + + + +Root directory of the git repository. + + + +Hostname of the machine running the script. + + + +Custom proxy servers for http requests to W&B. + + + +Custom proxy servers for https requests to W&B. + + + +Path to file containing an identity token (JWT) for authentication. + + + +Unix glob patterns relative to `files_dir` specifying files to exclude from upload. + + + +Time in seconds to wait for the `wandb.init` call to complete before timing out. + + + +Time in seconds to wait for data to upload at the end of a run. + +Setting this can limit costs caused by slow uploads to W&B at the end of a +run, with the trade-off that the run will be marked crashed and may be +missing some data. The default is for `run.finish()` to block until all +data finishes uploading. + +If this is set to a number greater than zero, W&B gives up on uploading a +run's data after this many seconds at the end of a run, unblocking your +script. After some time, the run becomes Crashed or Failed in the UI. Any +unuploaded data is still stored on disk and can be uploaded with `wandb +sync`. + +Use the `finish_timeout_raises` setting to raise an error in addition to +printing a warning message. + +Runs shut down by `wandb.teardown()` (which automatically runs at the end +of a script in an atexit hook) will also respect this setting. + + + +Whether to raise a TimeoutError if finish_timeout expires. + +Using this together with the `finish_timeout` setting causes `run.finish()` +to raise a TimeoutError after a timeout in addition to printing a message. + +Note that `run.finish()` is called implicitly when using a Run as a context +manager: + + with wandb.init() as run: + ... # run.finish() executes at the end of the `with` block + +This does not cause `wandb.teardown()` to raise an error (since it runs +at the end of a script anyway). + + + +Whether to insecurely disable SSL verification. + + + +Name of the Launch job running the script. + + + +Source type for Launch. + + + +Whether to disable automatic labeling features. + + + +Path to the launch configuration file. + + + +Time in seconds to wait for login operations before timing out. + + + +The operating mode for W&B logging and synchronization. + + + +Name of the notebook if running in a Jupyter-like environment. + + + +Path to the script that created the run, if available. + + + +The absolute path from the root repository directory to the script that +created the run. + +Root repository directory is defined as the directory containing the +.git directory, if it exists. Otherwise, it's the current working directory. + + + +The relative path to the script that created the run. + + + +The W&B project ID. + + + +Flag to suppress non-essential output. + + + +What to do when `wandb.init()` is called while a run is active. + +Options: +- "default": Use "finish_previous" in notebooks and "return_previous" + otherwise. +- "return_previous": Return the most recently created run + that is not yet finished. This does not update `wandb.run`; see + the "create_new" option. +- "finish_previous": Finish all active runs, then return a new run. +- "create_new": Create a new run without modifying other active runs. + Does not update `wandb.run` and top-level functions like `wandb.log`. + Because of this, some older integrations that rely on the global run + will not work. + +Can also be a boolean, but this is deprecated. False is the same as +"return_previous", and True is the same as "finish_previous". + + + +Flag to force a new login attempt. + + + +Specifies the resume behavior for the run. + +Options: +- "must": Resumes from an existing run with the same ID. If no such run exists, + it will result in failure. +- "allow": Attempts to resume from an existing run with the same ID. If none is + found, a new run will be created. +- "never": Always starts a new run. If a run with the same ID already exists, + it will result in failure. +- "auto": Automatically resumes from the most recent failed run on the same + machine. + + + +Specifies a point in a previous execution of a run to resume from. + +The point is defined by the run ID, a metric, and its value. +Currently, only the metric '_step' is supported. + + + +The root directory to use as the base for all run-related paths. + +In particular, this is used to derive the wandb directory and the run directory. + + + +Group identifier for related runs. + +Used for grouping runs in the UI. + + + +The ID of the run. + + + +Type of job being run (e.g., training, evaluation). + + + +Human-readable name for the run. + + + +Additional notes or description for the run. + + + +Tags to associate with the run for organization and filtering. + + + +Flag to disable SageMaker-specific functionality. + + + +Whether to save the code associated with the run. + + + +Path to the system-wide settings file. + + + +A callback to execute to stop the run. + +A run can be stopped through the web UI, or after a fatal error +(if configured via a setting). + +By default, to stop a run, W&B sends a SIGINT to the main thread. +Set this callback to override this behavior, like to use a different +signal or to take some other action before interrupting. + +The callback runs in a separate thread. It runs soon after a stop is +requested, but not immediately. + + + +Maximum number of history sparklines to display at the end of a run. + + + +Maximum number of summary metrics to display at the end of a run. + + + +Whether to display error messages. + + + +Whether to display informational messages. + + + +Whether to display warning messages. + + + +Flag to suppress all output. + + + +Whether to stop the run after a fatal error. + +After W&B hits an unrecoverable error while uploading data, it prints +a message and stops uploading, but still allows logging more data. +This is usually desirable: your training metrics get stored on disk +and can be recovered using `wandb sync`, even if they aren't uploaded. + +This is not useful if your files get deleted after training. +In that case, setting this to True will stop the run after a fatal error, +as if the stop button was pressed in the web UI. + + + +Whether to enable strict mode for validation and error checking. + + + +Time in seconds to wait for summary operations before timing out. + + + +Identifier of the sweep this run belongs to. + + + +Path to the sweep parameters configuration. + + + +Whether to use symlinks (True by default except on Windows). + + + +Whether to synchronize TensorBoard logs with W&B. + + + +Whether to raise an exception when table row limits are exceeded. + + + +Whether to use a hidden `.wandb` or visible `wandb` directory for run data. + +If True, the SDK uses `.wandb`. If False, `wandb`. +If not set, defaults to `.wandb` if it already exists, otherwise `wandb`. + + + +Username. + + + +Flag to disable the collection of system metadata. + + + +Flag to disable the collection of system metrics. + + + +Additional headers to add to all outgoing HTTP requests. + + + +Label to assign to system metrics and console logs collected for the run. + +This is used to group data by on the frontend and can be used to distinguish data +from different processes in a distributed training job. + + + +Determines whether to save internal wandb files and metadata. + +In a distributed setting, this is useful for avoiding file overwrites +from secondary processes when only system metrics and logs are needed, +as the primary process handles the main logging. + + + +Flag to save the requirements file. + + + +Flag to delegate automatic computation of summary from history to the server. + +This does not disable user-provided summary updates. + + + +Time in seconds to wait for the wandb-core internal service to start. + + + +Whether to skip saving the run events to the transaction log. + +This is only relevant for online runs. Can be used to reduce the amount of +data written to disk. + +Should be used with caution, as it removes the gurantees about +recoverability. + + + +Sampling interval for the system monitor in seconds. + + + +OpenMetrics `/metrics` endpoints to monitor for system metrics. + + + +Filter to apply to metrics collected from OpenMetrics `/metrics` endpoints. + +Supports two formats: + - `{"metric regex pattern, including endpoint name as prefix": {"label": "label value regex pattern"}}` + - `("metric regex pattern 1", "metric regex pattern 2", ...)` + + + +HTTP headers to add to OpenMetrics requests. + + + +System paths to monitor for disk usage. + + + +System CPU count. + +If set, overrides the auto-detected value in the run metadata. + + + +Logical CPU count. + +If set, overrides the auto-detected value in the run metadata. + + + +GPU device count. + +If set, overrides the auto-detected value in the run metadata. + + + +GPU device type. + +If set, overrides the auto-detected value in the run metadata. + + + +GPU device indices to monitor. + +If not set, the system monitor captures metrics for all GPUs. +Assumes 0-based indexing matching CUDA/ROCm device enumeration. + + + +Monitor the entire process tree for resource usage, starting from `x_stats_pid`. + +When `True`, the system monitor aggregates the RSS, CPU%, and thread count +from the process with PID `x_stats_pid` and all of its descendants. +This can have a performance overhead and is disabled by default. + + + +Disable cgroup v2 CPU and memory limits for system metric percentages. + + + +Suffix to add to the run's directory name (sync_dir). + +This is set in wandb.init() to avoid naming conflicts. +If set, it is joined to the default name with a dash. + + + +Flag to indicate whether this process can update the run's final state on the server. + +Set to False in distributed training when only the main process should determine the final state. + diff --git a/models/ref/python/experiments/settings/settings-methods.mdx b/models/ref/python/experiments/settings/settings-methods.mdx index b9c8261e92..7c5c8374ae 100644 --- a/models/ref/python/experiments/settings/settings-methods.mdx +++ b/models/ref/python/experiments/settings/settings-methods.mdx @@ -7,54 +7,41 @@ kind: class namespace: wandb.sdk.wandb_settings --- -## class wandb.Settings +## Class wandb.Settings - - -### method Settings.validate_anonymous() +## method Settings.validate_anonymous ```python value: 'object' ``` - - ##### Arguments -- `value`: + + - - -### method Settings.validate_x_extra_http_headers() +## method Settings.validate_x_extra_http_headers ```python (value) ``` - - ##### Arguments -- `value`: + + - - -### method Settings.validate_x_stats_coreweave_metadata_base_url() +## method Settings.validate_x_stats_coreweave_metadata_base_url ```python (value) ``` - - ##### Arguments -- `value`: - - - - + + diff --git a/models/ref/python/experiments/settings/settings-properties.mdx b/models/ref/python/experiments/settings/settings-properties.mdx index 650c285ea9..4eb3eaba3b 100644 --- a/models/ref/python/experiments/settings/settings-properties.mdx +++ b/models/ref/python/experiments/settings/settings-properties.mdx @@ -7,9 +7,7 @@ kind: class namespace: wandb.sdk.wandb_settings --- -## class wandb.Settings - - +## Class wandb.Settings ### property app_url @@ -98,5 +96,3 @@ The time specification for the run. Full path to the wandb directory. - - diff --git a/models/ref/python/functions/agent.mdx b/models/ref/python/functions/agent.mdx index 36bc4e68a0..36f7af78f0 100644 --- a/models/ref/python/functions/agent.mdx +++ b/models/ref/python/functions/agent.mdx @@ -7,7 +7,7 @@ namespace: wandb.wandb_agent import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; - + @@ -40,7 +40,6 @@ many agents to run. - `count`: The number of sweep config trials to try. - `forward_signals`: Whether to forward signals the agent receives to the child processes. Only supported by CLI agent. - ## Returns None diff --git a/models/ref/python/functions/box3d.mdx b/models/ref/python/functions/box3d.mdx index 082e50903a..234bb7fb79 100644 --- a/models/ref/python/functions/box3d.mdx +++ b/models/ref/python/functions/box3d.mdx @@ -7,7 +7,7 @@ namespace: wandb.sdk.data_types.object_3d import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; - + @@ -37,7 +37,6 @@ A 3D bounding box. The box is specified by its center, size and orientation. - `label`: An optional label for the box. - `score`: An optional score for the box. Typically used to indicate the confidence of a detection. - ## Returns A Box3D object. diff --git a/models/ref/python/functions/controller.mdx b/models/ref/python/functions/controller.mdx index 54121a5c6c..356591b2c8 100644 --- a/models/ref/python/functions/controller.mdx +++ b/models/ref/python/functions/controller.mdx @@ -7,7 +7,7 @@ namespace: wandb.sdk.wandb_sweep import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; - + @@ -34,7 +34,6 @@ Public sweep controller constructor. - ## Examples ```python diff --git a/models/ref/python/functions/finish.mdx b/models/ref/python/functions/finish.mdx index 4807bdc223..47702b420e 100644 --- a/models/ref/python/functions/finish.mdx +++ b/models/ref/python/functions/finish.mdx @@ -7,7 +7,7 @@ namespace: wandb.sdk.wandb_run import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; - + @@ -37,7 +37,6 @@ Run States: - `exit_code`: Integer indicating the run's exit status. Use 0 for success, any other value marks the run as failed. - `quiet`: Deprecated. Configure logging verbosity using `wandb.Settings(quiet=...)`. - ## Returns None diff --git a/models/ref/python/functions/init.mdx b/models/ref/python/functions/init.mdx index 99a10d2148..1dcf0d766c 100644 --- a/models/ref/python/functions/init.mdx +++ b/models/ref/python/functions/init.mdx @@ -7,7 +7,7 @@ namespace: wandb.sdk.wandb_init import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; - + @@ -117,7 +117,6 @@ Run IDs must not contain any of the following special characters `/ \ # ? % :` - `settings`: Specifies a dictionary or `wandb.Settings` object with advanced settings for the run. - `anonymous`: - ## Returns A `Run` object. @@ -130,7 +129,6 @@ A `Run` object. - `UsageError`: If the user provided invalid arguments. - `KeyboardInterrupt`: If user interrupts the run. - ## Examples `wandb.init()` returns a `Run` object. Use the run object to log data, diff --git a/models/ref/python/functions/login.mdx b/models/ref/python/functions/login.mdx index 11f2887ba8..94f42950eb 100644 --- a/models/ref/python/functions/login.mdx +++ b/models/ref/python/functions/login.mdx @@ -7,7 +7,7 @@ namespace: wandb.sdk.wandb_login import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; - + @@ -63,12 +63,10 @@ If none of the above is true, then this gets the API key from the first of: - `referrer`: The referrer to use in the URL login request for analytics. - `anonymous`: - ## Returns `bool`: If `key` is configured. - ## Raises - `AuthenticationError`: If `api_key` fails verification with the server. @@ -76,4 +74,3 @@ If none of the above is true, then this gets the API key from the first of: - diff --git a/models/ref/python/functions/restore.mdx b/models/ref/python/functions/restore.mdx index d9cd2262c9..38fc7b9fbc 100644 --- a/models/ref/python/functions/restore.mdx +++ b/models/ref/python/functions/restore.mdx @@ -7,7 +7,7 @@ namespace: wandb.sdk.wandb_run import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; - + @@ -35,7 +35,6 @@ By default, will only download the file if it doesn't already exist. - `replace`: Whether to download the file even if it already exists locally - `root`: The directory to download the file to. Defaults to the current directory or the run directory if wandb.init was called. - ## Returns None if it can't find the file, otherwise a file object open for reading. @@ -47,4 +46,3 @@ None if it can't find the file, otherwise a file object open for reading. - diff --git a/models/ref/python/functions/setup.mdx b/models/ref/python/functions/setup.mdx index 869c730f24..9135c0619b 100644 --- a/models/ref/python/functions/setup.mdx +++ b/models/ref/python/functions/setup.mdx @@ -7,7 +7,7 @@ namespace: wandb.sdk.wandb_setup import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; - + @@ -41,7 +41,6 @@ See also `wandb.teardown()`. - ## Examples ```python diff --git a/models/ref/python/functions/sweep.mdx b/models/ref/python/functions/sweep.mdx index 18c68f709d..4866ad9fd6 100644 --- a/models/ref/python/functions/sweep.mdx +++ b/models/ref/python/functions/sweep.mdx @@ -7,7 +7,7 @@ namespace: wandb.sdk.wandb_sweep import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; - + @@ -41,7 +41,6 @@ for information on how to define your sweep. - `project`: The name of the project where W&B runs created from the sweep are sent to. If the project is not specified, the run is sent to a project labeled 'Uncategorized'. - `prior_runs`: The run IDs of existing runs to add to this sweep. - ## Returns `str`: A unique identifier for the sweep. @@ -50,4 +49,3 @@ for information on how to define your sweep. - diff --git a/models/ref/python/functions/teardown.mdx b/models/ref/python/functions/teardown.mdx index f0e729e0d5..6905a3480a 100644 --- a/models/ref/python/functions/teardown.mdx +++ b/models/ref/python/functions/teardown.mdx @@ -7,7 +7,7 @@ namespace: wandb.sdk.wandb_setup import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; - + @@ -34,7 +34,6 @@ such as when using Python's `multiprocessing` module. - `exit_code`: - ## Returns None diff --git a/models/ref/python/public-api/api.mdx b/models/ref/python/public-api/api.mdx index 22ebb5da32..3ab2ad462e 100644 --- a/models/ref/python/public-api/api.mdx +++ b/models/ref/python/public-api/api.mdx @@ -7,11 +7,11 @@ namespace: wandb.apis.public.api import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; - + -## class wandb.Api +## Class wandb.Api ```python overrides: 'dict[str, Any] | None' = None, timeout: 'int | None' = None, @@ -26,10 +26,17 @@ Used for querying the W&B server. ## Args -- `overrides`: You can set `base_url` if you are using a W&B server other than `https://api.wandb.ai`. You can also set defaults for `entity`, `project`, and `run`. -- `timeout`: HTTP timeout in seconds for API requests. If not specified, the default timeout will be used. -- `api_key`: API key to use for authentication. If not provided, the API key from the current environment or configuration will be used. Prompts for an API key if none is provided or configured in the environment. + +You can set `base_url` if you are using a W&B server other than `https://api.wandb.ai`. You can also set defaults for `entity`, `project`, and `run`. + + +HTTP timeout in seconds for API requests. If not specified, the default timeout will be used. + + + +API key to use for authentication. If not provided, the API key from the current environment or configuration will be used. Prompts for an API key if none is provided or configured in the environment. + diff --git a/models/ref/python/public-api/api/api-methods.mdx b/models/ref/python/public-api/api/api-methods.mdx index 5c2228be7c..322d371fac 100644 --- a/models/ref/python/public-api/api/api-methods.mdx +++ b/models/ref/python/public-api/api/api-methods.mdx @@ -7,11 +7,11 @@ kind: class namespace: wandb.apis.public.api --- -## class wandb.Api +## Class wandb.Api +## method Api.artifact - -### method Api.artifact() +Returns a single artifact. ```python (self, @@ -19,20 +19,25 @@ name: 'str', type: 'str | None' = None) ``` -Returns a single artifact. - ##### Arguments -- `name`: The artifact's name. The name of an artifact resembles a filepath that consists, at a minimum, the name of the project the artifact was logged to, the name of the artifact, and the artifact's version or alias. Optionally append the entity that logged the artifact as a prefix followed by a forward slash. If no entity is specified in the name, the Run or API setting's entity is used. -- `type`: The type of artifact to fetch. + +The artifact's name. The name of an artifact resembles a filepath that consists, at a minimum, the name of the project the artifact was logged to, the name of the artifact, and the artifact's version or alias. Optionally append the entity that logged the artifact as a prefix followed by a forward slash. If no entity is specified in the name, the Run or API setting's entity is used. + + + +The type of artifact to fetch. + +##### Returns + +An `Artifact` object. ##### Raises - `ValueError`: If the artifact name is not specified. - `ValueError`: If the artifact type is specified but does not match the type of the fetched artifact. - ##### Examples In the following code snippets "entity", "project", "artifact", @@ -56,7 +61,12 @@ wandb.Api().artifact(name="entity/project/artifact:alias") wandb.Api().artifact(name="entity/project/artifact:version") ``` -### method Api.artifact_collection() +## method Api.artifact_collection + +Returns a single artifact collection by type. + +You can use the returned `ArtifactCollection` object to retrieve +information about specific artifacts in that collection, and more. ```python self, @@ -64,18 +74,19 @@ type_name: 'str', name: 'str' ``` -Returns a single artifact collection by type. - -You can use the returned `ArtifactCollection` object to retrieve -information about specific artifacts in that collection, and more. - ##### Arguments -- `type_name`: The type of artifact collection to fetch. -- `name`: An artifact collection name. Optionally append the entity that logged the artifact as a prefix followed by a forward slash. + +The type of artifact collection to fetch. + + +An artifact collection name. Optionally append the entity that logged the artifact as a prefix followed by a forward slash. + +##### Returns +An `ArtifactCollection` object. ##### Examples @@ -98,7 +109,9 @@ artifact_example = collections.artifacts()[0] artifact_example.download() ``` -### method Api.artifact_collection_exists() +## method Api.artifact_collection_exists + +Whether an artifact collection exists within a specified project and entity. ```python self, @@ -106,15 +119,19 @@ name: 'str', type: 'str' ``` -Whether an artifact collection exists within a specified project and entity. - ##### Arguments -- `name`: An artifact collection name. Optionally append the entity that logged the artifact as a prefix followed by a forward slash. If entity or project is not specified, infer the collection from the override params if they exist. Otherwise, entity is pulled from the user settings and project will default to "uncategorized". -- `type`: The type of artifact collection. + +An artifact collection name. Optionally append the entity that logged the artifact as a prefix followed by a forward slash. If entity or project is not specified, infer the collection from the override params if they exist. Otherwise, entity is pulled from the user settings and project will default to "uncategorized". + + +The type of artifact collection. + +##### Returns +True if the artifact collection exists, False otherwise. ##### Examples @@ -127,7 +144,9 @@ import wandb wandb.Api.artifact_collection_exists(type="type", name="collection_name") ``` -### method Api.artifact_collections() +## method Api.artifact_collections + +Returns a collection of matching artifact collections. ```python self, @@ -138,20 +157,35 @@ per_page: 'int' = 50, start: 'str | None' = None ``` -Returns a collection of matching artifact collections. - ##### Arguments -- `project_name`: The name of the project to filter on. -- `type_name`: The name of the artifact type to filter on. -- `order`: Optional string to specify the order of the results. If prefixed with '+', sorts ascending (default). If prefixed with '-', sorts descending. -- `per_page`: Sets the page size for query pagination. Usually there is no reason to change this. -- `start`: Pagination cursor for resuming a past query, captured from a previous paginator's `.cursor` attribute. + +The name of the project to filter on. + + + +The name of the artifact type to filter on. + + + +Optional string to specify the order of the results. If prefixed with '+', sorts ascending (default). If prefixed with '-', sorts descending. + + + +Sets the page size for query pagination. Usually there is no reason to change this. + + +Pagination cursor for resuming a past query, captured from a previous paginator's `.cursor` attribute. + +##### Returns +An iterable `ArtifactCollections` object. -### method Api.artifact_exists() +## method Api.artifact_exists + +Whether an artifact version exists within the specified project and entity. ```python self, @@ -159,15 +193,19 @@ name: 'str', type: 'str | None' = None ``` -Whether an artifact version exists within the specified project and entity. - ##### Arguments -- `name`: The name of artifact. Add the artifact's entity and project as a prefix. Append the version or the alias of the artifact with a colon. If the entity or project is not specified, W&B uses override parameters if populated. Otherwise, the entity is pulled from the user settings and the project is set to "Uncategorized". -- `type`: The type of artifact. + +The name of artifact. Add the artifact's entity and project as a prefix. Append the version or the alias of the artifact with a colon. If the entity or project is not specified, W&B uses override parameters if populated. Otherwise, the entity is pulled from the user settings and the project is set to "Uncategorized". + + +The type of artifact. + +##### Returns +True if the artifact version exists, False otherwise. ##### Examples @@ -183,7 +221,9 @@ wandb.Api().artifact_exists("entity/project/artifact:version") wandb.Api().artifact_exists("entity/project/artifact:alias") ``` -### method Api.artifact_type() +## method Api.artifact_type + +Returns the matching `ArtifactType`. ```python self, @@ -191,17 +231,23 @@ type_name: 'str', project: 'str | None' = None ``` -Returns the matching `ArtifactType`. - ##### Arguments -- `type_name`: The name of the artifact type to retrieve. -- `project`: If given, a project name or path to filter on. + +The name of the artifact type to retrieve. + + +If given, a project name or path to filter on. + +##### Returns +An `ArtifactType` object. -### method Api.artifact_types() +## method Api.artifact_types + +Returns a collection of matching artifact types. ```python self, @@ -209,34 +255,45 @@ project: 'str | None' = None, start: 'str | None' = None ``` -Returns a collection of matching artifact types. - ##### Arguments -- `project`: The project name or path to filter on. -- `start`: Pagination cursor for resuming a past query, captured from a previous paginator's `.cursor` attribute. + +The project name or path to filter on. + + +Pagination cursor for resuming a past query, captured from a previous paginator's `.cursor` attribute. + +##### Returns +An iterable `ArtifactTypes` object. -### method Api.artifact_versions() +## method Api.artifact_versions + +Deprecated. Use `Api.artifacts(type_name, name)` method instead. ```python (self, type_name, name, per_page=50) ``` -Deprecated. Use `Api.artifacts(type_name, name)` method instead. - ##### Arguments -- `type_name`: -- `name`: -- `per_page`: + + + + + + + + -### method Api.artifacts() +## method Api.artifacts + +Return an `Artifacts` collection. ```python self, @@ -248,19 +305,35 @@ tags: 'list[str] | None' = None, start: 'str | None' = None ``` -Return an `Artifacts` collection. - ##### Arguments -- `type_name`: The type of artifacts to fetch. -- `name`: The artifact's collection name. Optionally append the entity that logged the artifact as a prefix followed by a forward slash. -- `order`: Optional string to specify the order of the results. If prefixed with '+', sorts ascending (default). If prefixed with '-', sorts descending. -- `per_page`: Sets the page size for query pagination. Usually there is no reason to change this. -- `tags`: Only return artifacts with all of these tags. -- `start`: Pagination cursor for resuming a past query, captured from a previous paginator's `.cursor` attribute. + +The type of artifacts to fetch. + + + +The artifact's collection name. Optionally append the entity that logged the artifact as a prefix followed by a forward slash. + + +Optional string to specify the order of the results. If prefixed with '+', sorts ascending (default). If prefixed with '-', sorts descending. + + +Sets the page size for query pagination. Usually there is no reason to change this. + + +Only return artifacts with all of these tags. + + + +Pagination cursor for resuming a past query, captured from a previous paginator's `.cursor` attribute. + + +##### Returns + +An iterable `Artifacts` object. ##### Examples @@ -305,7 +378,9 @@ remaining_artifacts = api.artifacts( ) ``` -### method Api.automation() +## method Api.automation + +Returns the only Automation matching the parameters. ```python self, @@ -313,19 +388,20 @@ name: 'str', *, entity: 'str | None' = None ``` -Returns the only Automation matching the parameters. - ##### Arguments -- `name`: The name of the automation to fetch. -- `entity`: The entity to fetch the automation for. + +The name of the automation to fetch. + + +The entity to fetch the automation for. + ##### Raises - `ValueError`: If zero or multiple Automations match the search criteria. - ##### Examples Get an existing automation named "my-automation": @@ -343,7 +419,12 @@ Get an existing automation named "other-automation", from the entity "my-team": automation = api.automation(name="other-automation", entity="my-team") ``` -### method Api.automations() +## method Api.automations + +Returns an iterator over all Automations that match the given parameters. + +If no parameters are provided, the returned iterator will contain all +Automations that the user has access to. ```python self, @@ -353,20 +434,27 @@ per_page: 'int' = 50, start: 'str | None' = None ``` -Returns an iterator over all Automations that match the given parameters. +##### Arguments -If no parameters are provided, the returned iterator will contain all -Automations that the user has access to. + +The entity to fetch the automations for. + -##### Arguments + +The name of the automation to fetch. + -- `entity`: The entity to fetch the automations for. -- `name`: The name of the automation to fetch. -- `per_page`: The number of automations to fetch per page. Defaults to 50. Usually there is no reason to change this. -- `start`: Pagination cursor for resuming a past query, captured from a previous paginator's `.cursor` attribute. + +The number of automations to fetch per page. Defaults to 50. Usually there is no reason to change this. + + +Pagination cursor for resuming a past query, captured from a previous paginator's `.cursor` attribute. + +##### Returns +A list of automations. ##### Examples @@ -379,7 +467,9 @@ api = wandb.Api() automations = api.automations(entity="my-team") ``` -### method Api.create_automation() +## method Api.create_automation + +Create a new Automation. ```python self, @@ -387,16 +477,23 @@ obj: 'NewAutomation', *, fetch_existing: 'bool' = False, **kwargs: 'Unpack[WriteAutomationsKwargs]' ``` -Create a new Automation. - ##### Arguments -- `obj`: The automation to create. -- `fetch_existing`: If True, and a conflicting automation already exists, attempt to fetch the existing automation instead of raising an error. -- `kwargs`: + +The automation to create. + + +If True, and a conflicting automation already exists, attempt to fetch the existing automation instead of raising an error. + + + + +##### Returns + +The saved Automation. ##### Examples @@ -427,7 +524,9 @@ automation = api.create_automation( ) ``` -### method Api.create_custom_chart() +## method Api.create_custom_chart + +Create a custom chart preset and return its id. ```python self, @@ -439,26 +538,43 @@ access: "Literal['private', 'public']", spec: 'str | dict' ``` -Create a custom chart preset and return its id. - ##### Arguments -- `entity`: The entity (user or team) that owns the chart -- `name`: Unique identifier for the chart preset -- `display_name`: Human-readable name shown in the UI -- `spec_type`: Type of specification. Must be "vega2" for Vega-Lite v2 specifications. -- `access`: Access level for the chart: - - "private": Chart is only accessible to the entity that created it - - "public": Chart is publicly accessible -- `spec`: The Vega/Vega-Lite specification as a dictionary or JSON string + +The entity (user or team) that owns the chart + + + +Unique identifier for the chart preset + + + +Human-readable name shown in the UI + + + +Type of specification. Must be "vega2" for Vega-Lite v2 specifications. + + +Access level for the chart: +- "private": Chart is only accessible to the entity that created it +- "public": Chart is publicly accessible + + + +The Vega/Vega-Lite specification as a dictionary or JSON string + + +##### Returns + +The ID of the created chart preset in the format "entity/name" ##### Raises - `wandb.Error`: If chart creation fails - `UnsupportedError`: If the server doesn't support custom charts - ##### Examples ```python @@ -495,7 +611,9 @@ Create a custom chart preset and return its id. ) ``` -### method Api.create_project() +## method Api.create_project + +Create a new project. ```python self, @@ -503,17 +621,19 @@ name: 'str', entity: 'str' ``` -Create a new project. - ##### Arguments -- `name`: The name of the new project. -- `entity`: The entity of the new project. - + +The name of the new project. + + +The entity of the new project. + +## method Api.create_registry -### method Api.create_registry() +Create a new registry. ```python self, @@ -524,18 +644,31 @@ description: 'str | None' = None, artifact_types: 'list[str] | None' = None ``` -Create a new registry. - ##### Arguments -- `name`: The name of the registry. Name must be unique within the organization. -- `visibility`: The visibility of the registry. organization: Anyone in the organization can view this registry. You can edit their roles later from the settings in the UI. restricted: Only invited members via the UI can access this registry. Public sharing is disabled. -- `organization`: The organization of the registry. If no organization is set in the settings, the organization will be fetched from the entity if the entity only belongs to one organization. -- `description`: The description of the registry. -- `artifact_types`: The accepted artifact types of the registry. A type is no more than 128 characters and do not include characters `/` or `:`. If not specified, all types are accepted. Allowed types added to the registry cannot be removed later. + +The name of the registry. Name must be unique within the organization. + + + +The visibility of the registry. organization: Anyone in the organization can view this registry. You can edit their roles later from the settings in the UI. restricted: Only invited members via the UI can access this registry. Public sharing is disabled. + + + +The organization of the registry. If no organization is set in the settings, the organization will be fetched from the entity if the entity only belongs to one organization. + + +The description of the registry. + + +The accepted artifact types of the registry. A type is no more than 128 characters and do not include characters `/` or `:`. If not specified, all types are accepted. Allowed types added to the registry cannot be removed later. + +##### Returns + +A registry object. ##### Examples @@ -552,7 +685,9 @@ registry = api.create_registry( ) ``` -### method Api.create_run() +## method Api.create_run + +Create a new run. ```python self, *, @@ -561,18 +696,27 @@ project: 'str | None' = None, entity: 'str | None' = None ``` -Create a new run. - ##### Arguments -- `run_id`: The ID to assign to the run. If not specified, W&B creates a random ID. -- `project`: The project where to log the run to. If no project is specified, log the run to a project called "Uncategorized". -- `entity`: The entity that owns the project. If no entity is specified, log the run to the default entity. + +The ID to assign to the run. If not specified, W&B creates a random ID. + + + +The project where to log the run to. If no project is specified, log the run to a project called "Uncategorized". + + +The entity that owns the project. If no entity is specified, log the run to the default entity. + +##### Returns +The newly created `Run`. -### method Api.create_run_queue() +## method Api.create_run_queue + +Create a new run queue in W&B Launch. ```python self, @@ -584,21 +728,39 @@ config: 'dict | None' = None, template_variables: 'dict | None' = None ``` -Create a new run queue in W&B Launch. - ##### Arguments -- `name`: Name of the queue to create -- `type`: Type of resource to be used for the queue. One of "local-container", "local-process", "kubernetes","sagemaker", or "gcp-vertex". -- `entity`: Name of the entity to create the queue. If `None`, use the configured or default entity. -- `prioritization_mode`: Version of prioritization to use. Either "V0" or `None`. -- `config`: Default resource configuration to be used for the queue. Use handlebars (eg. `{{var}}`) to specify template variables. -- `template_variables`: A dictionary of template variable schemas to use with the config. + +Name of the queue to create + + + +Type of resource to be used for the queue. One of "local-container", "local-process", "kubernetes","sagemaker", or "gcp-vertex". + + + +Name of the entity to create the queue. If `None`, use the configured or default entity. + + + +Version of prioritization to use. Either "V0" or `None`. + + +Default resource configuration to be used for the queue. Use handlebars (eg. `{{var}}`) to specify template variables. + + +A dictionary of template variable schemas to use with the config. + +##### Returns -### method Api.create_team() +The newly created `RunQueue`. + +## method Api.create_team + +Create a new team. ```python self, @@ -606,17 +768,23 @@ team: 'str', admin_username: 'str | None' = None ``` -Create a new team. - ##### Arguments -- `team`: The name of the team -- `admin_username`: Username of the admin user of the team. Defaults to the current user. + +The name of the team + + +Username of the admin user of the team. Defaults to the current user. + +##### Returns +A `Team` object. -### method Api.create_user() +## method Api.create_user + +Create a new user. ```python self, @@ -624,37 +792,40 @@ email: 'str', admin: 'bool | None' = False ``` -Create a new user. - ##### Arguments -- `email`: The email address of the user. -- `admin`: Set user as a global instance administrator. + +The email address of the user. + + +Set user as a global instance administrator. + +##### Returns +A `User` object. -### method Api.delete_automation() +## method Api.delete_automation + +Delete an automation. ```python self, obj: 'Automation | str' ``` -Delete an automation. - ##### Arguments -- `obj`: The automation to delete, or its ID. - + +The automation to delete, or its ID. + +##### Returns +True if the automation was deleted successfully. -### method Api.flush() - -```python -(self) -``` +## method Api.flush Flush the local cache. @@ -662,25 +833,28 @@ The api object keeps a local cache of runs, so if the state of the run may change while executing your script you must clear the local cache with `api.flush()` to get the latest values associated with the run. +```python +(self) +``` +## method Api.from_path - - -### method Api.from_path() +Return a run, sweep, project or report from a path. ```python (self, path: 'str') ``` -Return a run, sweep, project or report from a path. - ##### Arguments -- `path`: The path to the project, run, sweep or report - + +The path to the project, run, sweep or report + +##### Returns +A `Project`, `Run`, `Sweep`, or `BetaReport` instance. ##### Examples @@ -700,7 +874,9 @@ sweep = api.from_path("team/project/sweeps/sweep_id") report = api.from_path("team/project/reports/report_name") ``` -### method Api.integrations() +## method Api.integrations + +Return an iterator of all integrations for an entity. ```python self, @@ -709,18 +885,23 @@ per_page: 'int' = 50, start: 'str | None' = None ``` -Return an iterator of all integrations for an entity. - ##### Arguments -- `entity`: The entity (e.g. team name) for which to fetch integrations. If not provided, the user's default entity will be used. -- `per_page`: Number of integrations to fetch per page. Defaults to 50. Usually there is no reason to change this. -- `start`: + +The entity (e.g. team name) for which to fetch integrations. If not provided, the user's default entity will be used. + + +Number of integrations to fetch per page. Defaults to 50. Usually there is no reason to change this. + + + -### method Api.job() +## method Api.job + +Return a `Job` object. ```python self, @@ -728,17 +909,23 @@ name: 'str | None', path: 'str | None' = None ``` -Return a `Job` object. - ##### Arguments -- `name`: The name of the job. -- `path`: The root path to download the job artifact. + +The name of the job. + + + +The root path to download the job artifact. + +##### Returns +A `Job` object. +## method Api.list_jobs -### method Api.list_jobs() +Return a list of jobs, if any, for the given entity and project. ```python self, @@ -746,33 +933,42 @@ entity: 'str', project: 'str' ``` -Return a list of jobs, if any, for the given entity and project. - ##### Arguments -- `entity`: The entity for the listed jobs. -- `project`: The project for the listed jobs. + +The entity for the listed jobs. + + +The project for the listed jobs. + +##### Returns +A list of matching jobs. -### method Api.organization() +## method Api.organization + +Return the matching `Organization`. ```python self, name: 'str | None' = None ``` -Return the matching `Organization`. - ##### Arguments -- `name`: The name of the organization. If omitted, this method will attempt to infer and return the current default organization. + +The name of the organization. If omitted, this method will attempt to infer and return the current default organization. + +##### Returns +An `Organization` object. +## method Api.project -### method Api.project() +Return the `Project` with the given name (and entity, if given). ```python self, @@ -780,17 +976,23 @@ name: 'str', entity: 'str | None' = None ``` -Return the `Project` with the given name (and entity, if given). - ##### Arguments -- `name`: The project name. -- `entity`: Name of the entity requested. If None, will fall back to the default entity passed to `Api`. If no default entity, will raise a `ValueError`. + +The project name. + + +Name of the entity requested. If None, will fall back to the default entity passed to `Api`. If no default entity, will raise a `ValueError`. + +##### Returns +A `Project` object. -### method Api.projects() +## method Api.projects + +Get projects for a given entity. ```python self, @@ -798,17 +1000,25 @@ entity: 'str | None' = None, per_page: 'int' = 200 ``` -Get projects for a given entity. - ##### Arguments -- `entity`: Name of the entity requested. If None, will fall back to the default entity passed to `Api`. If no default entity, will raise a `ValueError`. -- `per_page`: Sets the page size for query pagination. Usually there is no reason to change this. + +Name of the entity requested. If None, will fall back to the default entity passed to `Api`. If no default entity, will raise a `ValueError`. + + +Sets the page size for query pagination. Usually there is no reason to change this. + +##### Returns +A `Projects` object which is an iterable collection of `Project`objects. -### method Api.queued_run() +## method Api.queued_run + +Return a single queued run based on the path. + +Parses paths of the form `entity/project/queue_id/run_queue_item_id`. ```python (self, @@ -818,23 +1028,38 @@ queue_name: 'str', run_queue_item_id: 'str', project_queue=None, priority=None) ``` -Return a single queued run based on the path. +##### Arguments -Parses paths of the form `entity/project/queue_id/run_queue_item_id`. + -##### Arguments + + + + + + + + + + + + + -- `entity`: -- `project`: -- `queue_name`: -- `run_queue_item_id`: -- `project_queue`: -- `priority`: + + + + -### method Api.registries() +## method Api.registries + +Returns a lazy iterator of `Registry` objects. + +Use the iterator to search and filter registries, collections, +or artifact versions across your organization's registry. ```python self, @@ -845,21 +1070,31 @@ per_page: 'int' = 100, start: 'str | None' = None ``` -Returns a lazy iterator of `Registry` objects. +##### Arguments -Use the iterator to search and filter registries, collections, -or artifact versions across your organization's registry. + +The organization of the registry to fetch. If not specified, use the organization specified in the user's settings. + -##### Arguments + +Optional MongoDB-style filter to apply to each object in the lazy registry iterator. Fields available to filter for registries are `name`, `description`, `created_at`, `updated_at`. Fields available to filter for collections are `name`, `tag`, `description`, `created_at`, `updated_at` Fields available to filter for versions are `tag`, `alias`, `created_at`, `updated_at`, `metadata` + + + +Optional string to specify the order of the results. If prefixed with '+', sorts ascending (default). If prefixed with '-', sorts descending. + -- `organization`: The organization of the registry to fetch. If not specified, use the organization specified in the user's settings. -- `filter`: Optional MongoDB-style filter to apply to each object in the lazy registry iterator. Fields available to filter for registries are `name`, `description`, `created_at`, `updated_at`. Fields available to filter for collections are `name`, `tag`, `description`, `created_at`, `updated_at` Fields available to filter for versions are `tag`, `alias`, `created_at`, `updated_at`, `metadata` -- `order`: Optional string to specify the order of the results. If prefixed with '+', sorts ascending (default). If prefixed with '-', sorts descending. -- `per_page`: Sets the page size for query pagination. -- `start`: Pagination cursor for resuming a past query, captured from a previous paginator's `.cursor` attribute. + +Sets the page size for query pagination. + + +Pagination cursor for resuming a past query, captured from a previous paginator's `.cursor` attribute. + +##### Returns +A lazy iterator of `Registry` objects. ##### Examples @@ -915,7 +1150,9 @@ saved_cursor = registries.cursor remaining_registries = api.registries(per_page=page_size, start=saved_cursor) ``` -### method Api.registry() +## method Api.registry + +Return a registry given a registry name. ```python self, @@ -923,15 +1160,19 @@ name: 'str', organization: 'str | None' = None ``` -Return a registry given a registry name. - ##### Arguments -- `name`: The name of the registry. This is without the `wandb-registry-` prefix. -- `organization`: The organization of the registry. If no organization is set in the settings, the organization will be fetched from the entity if the entity only belongs to one organization. + +The name of the registry. This is without the `wandb-registry-` prefix. + + +The organization of the registry. If no organization is set in the settings, the organization will be fetched from the entity if the entity only belongs to one organization. + +##### Returns +A registry object. ##### Examples @@ -946,7 +1187,12 @@ registry.description = "This is an updated description" registry.save() ``` -### method Api.reports() +## method Api.reports + +Get reports for a given project path. + +Note: `wandb.Api.reports()` API is in beta and will likely change in +future releases. ```python self, @@ -955,19 +1201,23 @@ name: 'str | None' = None, per_page: 'int' = 50 ``` -Get reports for a given project path. - -Note: `wandb.Api.reports()` API is in beta and will likely change in -future releases. - ##### Arguments -- `path`: The path to the project the report resides in. Specify the entity that created the project as a prefix followed by a forward slash. -- `name`: Name of the report requested. -- `per_page`: Sets the page size for query pagination. Usually there is no reason to change this. + +The path to the project the report resides in. Specify the entity that created the project as a prefix followed by a forward slash. + + +Name of the report requested. + + +Sets the page size for query pagination. Usually there is no reason to change this. + +##### Returns + +A `Reports` object which is an iterable collection of `BetaReport` objects. ##### Examples @@ -977,25 +1227,33 @@ import wandb wandb.Api.reports("entity/project") ``` -### method Api.run() +## method Api.run + +Return a single run by parsing path in the form `entity/project/run_id`. ```python (self, path='') ``` -Return a single run by parsing path in the form `entity/project/run_id`. - ##### Arguments -- `path`: Path to run in the form `entity/project/run_id`. If `api.entity` is set, this can be in the form `project/run_id` and if `api.project` is set this can just be the run_id. + +Path to run in the form `entity/project/run_id`. If `api.entity` is set, this can be in the form `project/run_id` and if `api.project` is set this can just be the run_id. + +##### Returns + +A `Run` object. ##### Raises - `RunNotFoundError`: If a run is not found, or run data is not able to be loaded. +## method Api.run_queue -### method Api.run_queue() +Return the named `RunQueue` for entity. + +See `Api.create_run_queue` for more information on how to create a run queue. ```python (self, @@ -1003,29 +1261,17 @@ entity: 'str', name: 'str') ``` -Return the named `RunQueue` for entity. - -See `Api.create_run_queue` for more information on how to create a run queue. - ##### Arguments -- `entity`: -- `name`: + + + + -### method Api.runs() - -```python -(self, -path: 'str | None' = None, -filters: 'dict[str, Any] | None' = None, -order: 'str' = '+created_at', -per_page: 'int' = 50, -include_sweeps: 'bool' = False, -lazy: 'bool' = True) -``` +## method Api.runs Returns a `Runs` object, which lazily iterates over `Run` objects. @@ -1061,17 +1307,45 @@ The following operations are supported: - `$exists` - `$regex` +```python +(self, +path: 'str | None' = None, +filters: 'dict[str, Any] | None' = None, +order: 'str' = '+created_at', +per_page: 'int' = 50, +include_sweeps: 'bool' = False, +lazy: 'bool' = True) +``` + ##### Arguments -- `path`: (str) path to project, should be in the form: "entity/project" -- `filters`: (dict) queries for specific runs using the MongoDB query language. You can filter by run properties such as config.key, summary_metrics.key, state, entity, createdAt, etc. For example: `{"config.experiment_name": "foo"}` would find runs with a config entry of experiment name set to "foo" -- `order`: (str) Order can be `created_at`, `heartbeat_at`, `config.*.value`, or `summary_metrics.*`. If you prepend order with a + order is ascending (default). If you prepend order with a - order is descending. The default order is run.created_at from oldest to newest. -- `per_page`: (int) Sets the page size for query pagination. -- `include_sweeps`: (bool) Whether to eagerly fetch the sweep object in each run result. -- `lazy`: (bool) Whether to use lazy loading for faster performance. When True (default), only essential run metadata is loaded initially. Heavy fields like config, summaryMetrics, and systemMetrics are loaded on-demand when accessed. Set to False for full data upfront. + +(str) path to project, should be in the form: "entity/project" + + + +(dict) queries for specific runs using the MongoDB query language. You can filter by run properties such as config.key, summary_metrics.key, state, entity, createdAt, etc. For example: `{"config.experiment_name": "foo"}` would find runs with a config entry of experiment name set to "foo" + + +(str) Order can be `created_at`, `heartbeat_at`, `config.*.value`, or `summary_metrics.*`. If you prepend order with a + order is ascending (default). If you prepend order with a - order is descending. The default order is run.created_at from oldest to newest. + + +(int) Sets the page size for query pagination. + + +(bool) Whether to eagerly fetch the sweep object in each run result. + + + +(bool) Whether to use lazy loading for faster performance. When True (default), only essential run metadata is loaded initially. Heavy fields like config, summaryMetrics, and systemMetrics are loaded on-demand when accessed. Set to False for full data upfront. + + +##### Returns + +A `Runs` object, which is an iterable collection of `Run` objects. ##### Examples @@ -1120,7 +1394,9 @@ Api.runs( Api.runs(path="my_entity/project", order="+summary_metrics.loss") ``` -### method Api.slack_integrations() +## method Api.slack_integrations + +Returns an iterator of Slack integrations for an entity. ```python self, *, @@ -1129,16 +1405,19 @@ per_page: 'int' = 50, start: 'str | None' = None ``` -Returns an iterator of Slack integrations for an entity. - ##### Arguments -- `entity`: The entity (e.g. team name) for which to fetch integrations. If not provided, the user's default entity will be used. -- `per_page`: Number of integrations to fetch per page. Defaults to 50. Usually there is no reason to change this. -- `start`: + +The entity (e.g. team name) for which to fetch integrations. If not provided, the user's default entity will be used. + + +Number of integrations to fetch per page. Defaults to 50. Usually there is no reason to change this. + + + ##### Examples @@ -1162,56 +1441,72 @@ team_alert_integrations = [ ] ``` -### method Api.sweep() +## method Api.sweep + +Return a sweep by parsing path in the form `entity/project/sweep_id`. ```python (self, path='') ``` -Return a sweep by parsing path in the form `entity/project/sweep_id`. - ##### Arguments -- `path`: Path to sweep in the form entity/project/sweep_id. If `api.entity` is set, this can be in the form project/sweep_id and if `api.project` is set this can just be the sweep_id. + +Path to sweep in the form entity/project/sweep_id. If `api.entity` is set, this can be in the form project/sweep_id and if `api.project` is set this can just be the sweep_id. + +##### Returns +A `Sweep` object. +## method Api.sync_tensorboard -### method Api.sync_tensorboard() +Sync a local directory containing tfevent files to wandb. ```python (self, root_dir, run_id=None, project=None, entity=None) ``` -Sync a local directory containing tfevent files to wandb. - ##### Arguments -- `root_dir`: -- `run_id`: -- `project`: -- `entity`: + + + + + + + + + + + + -### method Api.team() +## method Api.team + +Return the matching `Team` with the given name. ```python self, team: 'str' ``` -Return the matching `Team` with the given name. - ##### Arguments -- `team`: The name of the team. + +The name of the team. + +##### Returns +A `Team` object. +## method Api.update_automation -### method Api.update_automation() +Update an existing automation. ```python self, @@ -1219,16 +1514,23 @@ obj: 'Automation', *, create_missing: 'bool' = False, **kwargs: 'Unpack[WriteAutomationsKwargs]' ``` -Update an existing automation. - ##### Arguments -- `obj`: The automation to update. Must be an existing automation. -- `create_missing`: If True, and the automation does not exist, create it. -- `kwargs`: + +The automation to update. Must be an existing automation. + + + +If True, and the automation does not exist, create it. + + + + +##### Returns +The updated automation. ##### Examples @@ -1262,7 +1564,9 @@ updated_automation = api.update_automation( ) ``` -### method Api.upsert_run_queue() +## method Api.upsert_run_queue + +Upsert a run queue in W&B Launch. ```python (self, @@ -1275,60 +1579,87 @@ external_links: 'dict | None' = None, prioritization_mode: 'public.RunQueuePrioritizationMode | None' = None) ``` -Upsert a run queue in W&B Launch. - ##### Arguments -- `name`: Name of the queue to create -- `resource_config`: Optional default resource configuration to be used for the queue. Use handlebars (eg. `{{var}}`) to specify template variables. -- `resource_type`: Type of resource to be used for the queue. One of "local-container", "local-process", "kubernetes", "sagemaker", or "gcp-vertex". -- `entity`: Optional name of the entity to create the queue. If `None`, use the configured or default entity. -- `template_variables`: A dictionary of template variable schemas to be used with the config. -- `external_links`: Optional dictionary of external links to be used with the queue. -- `prioritization_mode`: Optional version of prioritization to use. Either "V0" or None + +Name of the queue to create + + +Optional default resource configuration to be used for the queue. Use handlebars (eg. `{{var}}`) to specify template variables. + + +Type of resource to be used for the queue. One of "local-container", "local-process", "kubernetes", "sagemaker", or "gcp-vertex". + + +Optional name of the entity to create the queue. If `None`, use the configured or default entity. + -### method Api.user() + +A dictionary of template variable schemas to be used with the config. + -```python -self, -username_or_email: 'str' -``` + +Optional dictionary of external links to be used with the queue. + + + +Optional version of prioritization to use. Either "V0" or None + + +##### Returns + +The upserted `RunQueue`. + +## method Api.user Return a user from a username or email address. This function only works for local administrators. Use `api.viewer` to get your own user object. +```python +self, +username_or_email: 'str' +``` + ##### Arguments -- `username_or_email`: The username or email address of the user. + +The username or email address of the user. + +##### Returns +A `User` object or None if a user is not found. +## method Api.users -### method Api.users() +Return all users from a partial username or email address query. + +This function only works for local administrators. Use `api.viewer` + to get your own user object. ```python self, username_or_email: 'str' ``` -Return all users from a partial username or email address query. - -This function only works for local administrators. Use `api.viewer` - to get your own user object. - ##### Arguments -- `username_or_email`: The prefix or suffix of the user you want to find. + +The prefix or suffix of the user you want to find. + +##### Returns +An array of `User` objects. +## method Api.webhook_integrations -### method Api.webhook_integrations() +Returns an iterator of webhook integrations for an entity. ```python self, @@ -1337,16 +1668,19 @@ per_page: 'int' = 50, start: 'str | None' = None ``` -Returns an iterator of webhook integrations for an entity. - ##### Arguments -- `entity`: The entity (e.g. team name) for which to fetch integrations. If not provided, the user's default entity will be used. -- `per_page`: Number of integrations to fetch per page. Defaults to 50. Usually there is no reason to change this. -- `start`: + +The entity (e.g. team name) for which to fetch integrations. If not provided, the user's default entity will be used. + + +Number of integrations to fetch per page. Defaults to 50. Usually there is no reason to change this. + + + ##### Examples @@ -1370,5 +1704,3 @@ my_webhooks = [ ] ``` - - diff --git a/models/ref/python/public-api/api/api-properties.mdx b/models/ref/python/public-api/api/api-properties.mdx index a4dd321a46..fa043c0dc9 100644 --- a/models/ref/python/public-api/api/api-properties.mdx +++ b/models/ref/python/public-api/api/api-properties.mdx @@ -7,9 +7,7 @@ kind: class namespace: wandb.apis.public.api --- -## class wandb.Api - - +## Class wandb.Api ### property default_entity @@ -23,5 +21,3 @@ Returns W&B public user agent. Returns the viewer object. - - diff --git a/models/ref/python/public-api/artifactcollection.mdx b/models/ref/python/public-api/artifactcollection.mdx index 69722feecb..c2d9814a2f 100644 --- a/models/ref/python/public-api/artifactcollection.mdx +++ b/models/ref/python/public-api/artifactcollection.mdx @@ -7,11 +7,11 @@ namespace: wandb.apis.public.artifacts import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; - + -## class wandb.apis.public.ArtifactCollection +## Class wandb.apis.public.ArtifactCollection diff --git a/models/ref/python/public-api/artifactcollection/artifactcollection-methods.mdx b/models/ref/python/public-api/artifactcollection/artifactcollection-methods.mdx index b229959e8c..67f336a615 100644 --- a/models/ref/python/public-api/artifactcollection/artifactcollection-methods.mdx +++ b/models/ref/python/public-api/artifactcollection/artifactcollection-methods.mdx @@ -7,11 +7,11 @@ kind: class namespace: wandb.apis.public.artifacts --- -## class wandb.apis.public.ArtifactCollection +## Class wandb.apis.public.ArtifactCollection +## method ArtifactCollection.artifacts - -### method ArtifactCollection.artifacts() +Get all artifacts in the collection. ```python self, @@ -19,67 +19,52 @@ per_page: 'int' = 50, start: 'str | None' = None ``` -Get all artifacts in the collection. - ##### Arguments -- `per_page`: The number of artifacts to fetch per page. -- `start`: Pagination cursor for resuming a past query, captured from a previous paginator's `.cursor` attribute. + +The number of artifacts to fetch per page. + + +Pagination cursor for resuming a past query, captured from a previous paginator's `.cursor` attribute. + +## method ArtifactCollection.change_type - -### method ArtifactCollection.change_type() +Deprecated, change type directly with `save` instead. ```python self, new_type: 'str' ``` -Deprecated, change type directly with `save` instead. - ##### Arguments -- `new_type`: + + +## method ArtifactCollection.delete - -### method ArtifactCollection.delete() +Delete the entire artifact collection. ```python self ``` -Delete the entire artifact collection. - - - - +## method ArtifactCollection.is_sequence -### method ArtifactCollection.is_sequence() +Return whether the artifact collection is a sequence. ```python self ``` -Return whether the artifact collection is a sequence. - - +## method ArtifactCollection.save - - -### method ArtifactCollection.save() +Persist any changes made to the artifact collection. ```python self ``` -Persist any changes made to the artifact collection. - - - - - - - diff --git a/models/ref/python/public-api/artifactcollection/artifactcollection-properties.mdx b/models/ref/python/public-api/artifactcollection/artifactcollection-properties.mdx index 989f6e7cfd..ff8c919baf 100644 --- a/models/ref/python/public-api/artifactcollection/artifactcollection-properties.mdx +++ b/models/ref/python/public-api/artifactcollection/artifactcollection-properties.mdx @@ -7,9 +7,7 @@ kind: class namespace: wandb.apis.public.artifacts --- -## class wandb.apis.public.ArtifactCollection - - +## Class wandb.apis.public.ArtifactCollection ### property aliases @@ -51,5 +49,3 @@ Returns the type of the artifact collection. The date at which the artifact collection was last updated. - - diff --git a/models/ref/python/public-api/artifactcollections.mdx b/models/ref/python/public-api/artifactcollections.mdx index 18cc82f3eb..1d6dba4c18 100644 --- a/models/ref/python/public-api/artifactcollections.mdx +++ b/models/ref/python/public-api/artifactcollections.mdx @@ -7,11 +7,11 @@ namespace: wandb.apis.public.artifacts import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; - + -## class wandb.apis.public.ArtifactCollections +## Class wandb.apis.public.ArtifactCollections diff --git a/models/ref/python/public-api/artifactcollections/artifactcollections-methods.mdx b/models/ref/python/public-api/artifactcollections/artifactcollections-methods.mdx index d21a0c6f9d..373e14d4be 100644 --- a/models/ref/python/public-api/artifactcollections/artifactcollections-methods.mdx +++ b/models/ref/python/public-api/artifactcollections/artifactcollections-methods.mdx @@ -7,45 +7,29 @@ kind: class namespace: wandb.apis.public.artifacts --- -## class wandb.apis.public.ArtifactCollections +## Class wandb.apis.public.ArtifactCollections +## method RelayPaginator.convert_objects - -### method RelayPaginator.convert_objects() +Convert the last fetched response data into the iterated objects. ```python self ``` -Convert the last fetched response data into the iterated objects. - - - +## method Paginator.__next__ - -### method Paginator.__next__() +Return the next item from the iterator. When exhausted, raise StopIteration ```python self ``` -Return the next item from the iterator. When exhausted, raise StopIteration - - +## method Paginator.update_variables - - -### method Paginator.update_variables() +Update the query variables for the next page fetch. ```python self ``` -Update the query variables for the next page fetch. - - - - - - - diff --git a/models/ref/python/public-api/artifactfiles.mdx b/models/ref/python/public-api/artifactfiles.mdx index 74e8bddeb2..a44874668a 100644 --- a/models/ref/python/public-api/artifactfiles.mdx +++ b/models/ref/python/public-api/artifactfiles.mdx @@ -7,11 +7,11 @@ namespace: wandb.apis.public.artifacts import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; - + -## class wandb.apis.public.ArtifactFiles +## Class wandb.apis.public.ArtifactFiles diff --git a/models/ref/python/public-api/artifactfiles/artifactfiles-methods.mdx b/models/ref/python/public-api/artifactfiles/artifactfiles-methods.mdx index b209993f0f..5c5ca9935a 100644 --- a/models/ref/python/public-api/artifactfiles/artifactfiles-methods.mdx +++ b/models/ref/python/public-api/artifactfiles/artifactfiles-methods.mdx @@ -7,45 +7,29 @@ kind: class namespace: wandb.apis.public.artifacts --- -## class wandb.apis.public.ArtifactFiles +## Class wandb.apis.public.ArtifactFiles +## method RelayPaginator.convert_objects - -### method RelayPaginator.convert_objects() +Convert the last fetched response data into the iterated objects. ```python self ``` -Convert the last fetched response data into the iterated objects. - - - +## method Paginator.__next__ - -### method Paginator.__next__() +Return the next item from the iterator. When exhausted, raise StopIteration ```python self ``` -Return the next item from the iterator. When exhausted, raise StopIteration - - +## method Paginator.update_variables - - -### method Paginator.update_variables() +Update the query variables for the next page fetch. ```python self ``` -Update the query variables for the next page fetch. - - - - - - - diff --git a/models/ref/python/public-api/artifactfiles/artifactfiles-properties.mdx b/models/ref/python/public-api/artifactfiles/artifactfiles-properties.mdx index ea2f41ecc9..e116bba2ac 100644 --- a/models/ref/python/public-api/artifactfiles/artifactfiles-properties.mdx +++ b/models/ref/python/public-api/artifactfiles/artifactfiles-properties.mdx @@ -7,13 +7,9 @@ kind: class namespace: wandb.apis.public.artifacts --- -## class wandb.apis.public.ArtifactFiles - - +## Class wandb.apis.public.ArtifactFiles ### property path Returns the path of the artifact. - - diff --git a/models/ref/python/public-api/artifacts.mdx b/models/ref/python/public-api/artifacts.mdx index b7fbe1af97..8b61f80d76 100644 --- a/models/ref/python/public-api/artifacts.mdx +++ b/models/ref/python/public-api/artifacts.mdx @@ -7,11 +7,11 @@ namespace: wandb.apis.public.artifacts import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; - + -## class wandb.apis.public.Artifacts +## Class wandb.apis.public.Artifacts diff --git a/models/ref/python/public-api/artifacts/artifacts-methods.mdx b/models/ref/python/public-api/artifacts/artifacts-methods.mdx index 450480a49c..8e144d97ee 100644 --- a/models/ref/python/public-api/artifacts/artifacts-methods.mdx +++ b/models/ref/python/public-api/artifacts/artifacts-methods.mdx @@ -7,33 +7,21 @@ kind: class namespace: wandb.apis.public.artifacts --- -## class wandb.apis.public.Artifacts +## Class wandb.apis.public.Artifacts +## method Paginator.__next__ - -### method Paginator.__next__() +Return the next item from the iterator. When exhausted, raise StopIteration ```python self ``` -Return the next item from the iterator. When exhausted, raise StopIteration - +## method Paginator.update_variables - - - -### method Paginator.update_variables() +Update the query variables for the next page fetch. ```python self ``` -Update the query variables for the next page fetch. - - - - - - - diff --git a/models/ref/python/public-api/artifacttype.mdx b/models/ref/python/public-api/artifacttype.mdx index 76af3bc203..903eb1e367 100644 --- a/models/ref/python/public-api/artifacttype.mdx +++ b/models/ref/python/public-api/artifacttype.mdx @@ -7,11 +7,11 @@ namespace: wandb.apis.public.artifacts import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; - + -## class wandb.apis.public.ArtifactType +## Class wandb.apis.public.ArtifactType diff --git a/models/ref/python/public-api/artifacttype/artifacttype-methods.mdx b/models/ref/python/public-api/artifacttype/artifacttype-methods.mdx index f28e108eb3..3451c25585 100644 --- a/models/ref/python/public-api/artifacttype/artifacttype-methods.mdx +++ b/models/ref/python/public-api/artifacttype/artifacttype-methods.mdx @@ -7,27 +7,26 @@ kind: class namespace: wandb.apis.public.artifacts --- -## class wandb.apis.public.ArtifactType +## Class wandb.apis.public.ArtifactType +## method ArtifactType.collection - -### method ArtifactType.collection() +Get a specific artifact collection by name. ```python self, name: 'str' ``` -Get a specific artifact collection by name. - ##### Arguments -- `name`: The name of the artifact collection to retrieve. - - + +The name of the artifact collection to retrieve. + +## method ArtifactType.collections -### method ArtifactType.collections() +Get all artifact collections associated with this artifact type. ```python self, @@ -37,17 +36,21 @@ per_page: 'int' = 50, start: 'str | None' = None ``` -Get all artifact collections associated with this artifact type. - ##### Arguments -- `filters`: Optional mapping of filters to apply to the query. -- `order`: Optional string to specify the order of the results. If prefixed with '+', sorts ascending (default). If prefixed with '-', sorts descending. The default order is the collection ID in descending order. -- `per_page`: The number of artifact collections to fetch per page. Default is 50. -- `start`: Pagination cursor for resuming a past query, captured from a previous paginator's `.cursor` attribute. - - + +Optional mapping of filters to apply to the query. + + +Optional string to specify the order of the results. If prefixed with '+', sorts ascending (default). If prefixed with '-', sorts descending. The default order is the collection ID in descending order. + + +The number of artifact collections to fetch per page. Default is 50. + + +Pagination cursor for resuming a past query, captured from a previous paginator's `.cursor` attribute. + diff --git a/models/ref/python/public-api/artifacttype/artifacttype-properties.mdx b/models/ref/python/public-api/artifacttype/artifacttype-properties.mdx index b045dde233..ee55774615 100644 --- a/models/ref/python/public-api/artifacttype/artifacttype-properties.mdx +++ b/models/ref/python/public-api/artifacttype/artifacttype-properties.mdx @@ -7,9 +7,7 @@ kind: class namespace: wandb.apis.public.artifacts --- -## class wandb.apis.public.ArtifactType - - +## Class wandb.apis.public.ArtifactType ### property id @@ -19,5 +17,3 @@ The unique identifier of the artifact type. The name of the artifact type. - - diff --git a/models/ref/python/public-api/artifacttypes.mdx b/models/ref/python/public-api/artifacttypes.mdx index 33e96e687c..0651c450e4 100644 --- a/models/ref/python/public-api/artifacttypes.mdx +++ b/models/ref/python/public-api/artifacttypes.mdx @@ -7,11 +7,11 @@ namespace: wandb.apis.public.artifacts import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; - + -## class wandb.apis.public.ArtifactTypes +## Class wandb.apis.public.ArtifactTypes diff --git a/models/ref/python/public-api/artifacttypes/artifacttypes-methods.mdx b/models/ref/python/public-api/artifacttypes/artifacttypes-methods.mdx index c62ef05ac0..76ab4d4963 100644 --- a/models/ref/python/public-api/artifacttypes/artifacttypes-methods.mdx +++ b/models/ref/python/public-api/artifacttypes/artifacttypes-methods.mdx @@ -7,45 +7,29 @@ kind: class namespace: wandb.apis.public.artifacts --- -## class wandb.apis.public.ArtifactTypes +## Class wandb.apis.public.ArtifactTypes +## method RelayPaginator.convert_objects - -### method RelayPaginator.convert_objects() +Convert the last fetched response data into the iterated objects. ```python self ``` -Convert the last fetched response data into the iterated objects. - - - +## method Paginator.__next__ - -### method Paginator.__next__() +Return the next item from the iterator. When exhausted, raise StopIteration ```python self ``` -Return the next item from the iterator. When exhausted, raise StopIteration - - +## method Paginator.update_variables - - -### method Paginator.update_variables() +Update the query variables for the next page fetch. ```python self ``` -Update the query variables for the next page fetch. - - - - - - - diff --git a/models/ref/python/public-api/betareport.mdx b/models/ref/python/public-api/betareport.mdx index 83cde0e200..ab5d584664 100644 --- a/models/ref/python/public-api/betareport.mdx +++ b/models/ref/python/public-api/betareport.mdx @@ -7,11 +7,11 @@ namespace: wandb.apis.public.reports import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; - + -## class wandb.apis.public.BetaReport +## Class wandb.apis.public.BetaReport ```python (service_api: 'ServiceApi', attrs: 'dict', @@ -31,11 +31,21 @@ sections, and for rendering the report as HTML. ## Args -- `service_api`: -- `attrs`: -- `entity`: -- `project`: + + + + + + + + + + + + + + ## Attributes @@ -51,4 +61,3 @@ sections, and for rendering the report as HTML. - diff --git a/models/ref/python/public-api/betareport/betareport-methods.mdx b/models/ref/python/public-api/betareport/betareport-methods.mdx index 2858d6495d..e04cda3594 100644 --- a/models/ref/python/public-api/betareport/betareport-methods.mdx +++ b/models/ref/python/public-api/betareport/betareport-methods.mdx @@ -7,11 +7,11 @@ kind: class namespace: wandb.apis.public.reports --- -## class wandb.apis.public.BetaReport +## Class wandb.apis.public.BetaReport +## method BetaReport.runs - -### method BetaReport.runs() +Get runs associated with a section of the report. ```python self, @@ -20,18 +20,23 @@ per_page: 'int' = 50, only_selected: 'bool' = True ``` -Get runs associated with a section of the report. - ##### Arguments -- `section`: -- `per_page`: -- `only_selected`: + + + + + + + + -### method BetaReport.to_html() +## method BetaReport.to_html + +Generate HTML containing an iframe displaying this report. ```python self, @@ -39,15 +44,13 @@ height: 'int' = 1024, hidden: 'bool' = False ``` -Generate HTML containing an iframe displaying this report. - ##### Arguments -- `height`: -- `hidden`: - - + + + + diff --git a/models/ref/python/public-api/betareport/betareport-properties.mdx b/models/ref/python/public-api/betareport/betareport-properties.mdx index 7b016bb731..ce98654aaf 100644 --- a/models/ref/python/public-api/betareport/betareport-properties.mdx +++ b/models/ref/python/public-api/betareport/betareport-properties.mdx @@ -7,9 +7,7 @@ kind: class namespace: wandb.apis.public.reports --- -## class wandb.apis.public.BetaReport - - +## Class wandb.apis.public.BetaReport ### property created_at @@ -49,7 +47,3 @@ Get the panel sections (groups) from the report. ### property user - - - - diff --git a/models/ref/python/public-api/downloadhistoryresult.mdx b/models/ref/python/public-api/downloadhistoryresult.mdx index 9f8f90080a..1843ee7fb9 100644 --- a/models/ref/python/public-api/downloadhistoryresult.mdx +++ b/models/ref/python/public-api/downloadhistoryresult.mdx @@ -7,11 +7,11 @@ namespace: wandb.apis.public.runhistory.downloads import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; - + -## class wandb.apis.public.DownloadHistoryResult +## Class wandb.apis.public.DownloadHistoryResult ```python paths: 'list[pathlib.Path]', contains_live_data: 'bool', @@ -26,10 +26,17 @@ Result of downloading a run's history exports. ## Args -- `paths`: -- `contains_live_data`: -- `errors`: + + + + + + + + + + ## Attributes @@ -39,4 +46,3 @@ Result of downloading a run's history exports. - diff --git a/models/ref/python/public-api/file.mdx b/models/ref/python/public-api/file.mdx index 349f0ce3ec..4831a877d4 100644 --- a/models/ref/python/public-api/file.mdx +++ b/models/ref/python/public-api/file.mdx @@ -7,11 +7,11 @@ namespace: wandb.apis.public.files import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; - + -## class wandb.apis.public.File +## Class wandb.apis.public.File diff --git a/models/ref/python/public-api/file/file-methods.mdx b/models/ref/python/public-api/file/file-methods.mdx index 322734acd9..f9e2cf0587 100644 --- a/models/ref/python/public-api/file/file-methods.mdx +++ b/models/ref/python/public-api/file/file-methods.mdx @@ -7,23 +7,19 @@ kind: class namespace: wandb.apis.public.files --- -## class wandb.apis.public.File +## Class wandb.apis.public.File +## method File.delete - -### method File.delete() +Delete the file from the W&B server. ```python self ``` -Delete the file from the W&B server. - - - +## method File.download - -### method File.download() +Downloads a file previously saved by a run from the wandb server. ```python self, @@ -33,17 +29,21 @@ exist_ok: 'bool' = False, api: 'Api | None' = None ``` -Downloads a file previously saved by a run from the wandb server. - ##### Arguments -- `root`: Local directory to save the file. Defaults to the current working directory ("."). -- `replace`: If `True`, download will overwrite a local file if it exists. Defaults to `False`. -- `exist_ok`: If `True`, will not raise ValueError if file already exists and will not re-download unless replace=True. Defaults to `False`. -- `api`: If specified, the `Api` instance used to download the file. - - + +Local directory to save the file. Defaults to the current working directory ("."). + + +If `True`, download will overwrite a local file if it exists. Defaults to `False`. + + +If `True`, will not raise ValueError if file already exists and will not re-download unless replace=True. Defaults to `False`. + + +If specified, the `Api` instance used to download the file. + diff --git a/models/ref/python/public-api/file/file-properties.mdx b/models/ref/python/public-api/file/file-properties.mdx index 269f0cfd41..7de7eb25bf 100644 --- a/models/ref/python/public-api/file/file-properties.mdx +++ b/models/ref/python/public-api/file/file-properties.mdx @@ -7,9 +7,7 @@ kind: class namespace: wandb.apis.public.files --- -## class wandb.apis.public.File - - +## Class wandb.apis.public.File ### property path_uri @@ -19,5 +17,3 @@ Returns the URI path to the file in the storage bucket. Returns the size of the file in bytes. - - diff --git a/models/ref/python/public-api/files.mdx b/models/ref/python/public-api/files.mdx index 99c5375a65..fddedc1c60 100644 --- a/models/ref/python/public-api/files.mdx +++ b/models/ref/python/public-api/files.mdx @@ -7,11 +7,11 @@ namespace: wandb.apis.public.files import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; - + -## class wandb.apis.public.Files +## Class wandb.apis.public.Files ```python (service_api: 'ServiceApi', run: 'Run', @@ -32,13 +32,29 @@ automatically when iterating through large collections of files. ## Args -- `service_api`: The service API instance to use for querying W&B. -- `run`: The run object that contains the files -- `names`: A list of file names to filter the files -- `per_page`: The number of files to fetch per page -- `upload`: If `True`, fetch the upload URL for each file -- `pattern`: Pattern to match when returning files from W&B This pattern uses mySQL's LIKE syntax, so matching all files that end with .json would be "%.json". If both names and pattern are provided, a ValueError will be raised. + +The service API instance to use for querying W&B. + + +The run object that contains the files + + + +A list of file names to filter the files + + + +The number of files to fetch per page + + + +If `True`, fetch the upload URL for each file + + + +Pattern to match when returning files from W&B This pattern uses mySQL's LIKE syntax, so matching all files that end with .json would be "%.json". If both names and pattern are provided, a ValueError will be raised. + diff --git a/models/ref/python/public-api/files/files-methods.mdx b/models/ref/python/public-api/files/files-methods.mdx index e1a3b7865b..a79b5c532a 100644 --- a/models/ref/python/public-api/files/files-methods.mdx +++ b/models/ref/python/public-api/files/files-methods.mdx @@ -7,21 +7,13 @@ kind: class namespace: wandb.apis.public.files --- -## class wandb.apis.public.Files +## Class wandb.apis.public.Files +## method Paginator.__next__ - -### method Paginator.__next__() +Return the next item from the iterator. When exhausted, raise StopIteration ```python self ``` -Return the next item from the iterator. When exhausted, raise StopIteration - - - - - - - diff --git a/models/ref/python/public-api/incompleterunhistoryerror.mdx b/models/ref/python/public-api/incompleterunhistoryerror.mdx index 51ab6e1ff1..6361788667 100644 --- a/models/ref/python/public-api/incompleterunhistoryerror.mdx +++ b/models/ref/python/public-api/incompleterunhistoryerror.mdx @@ -7,11 +7,11 @@ namespace: wandb.apis.public.runhistory.downloads import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; - + -## class wandb.apis.public.IncompleteRunHistoryError +## Class wandb.apis.public.IncompleteRunHistoryError diff --git a/models/ref/python/public-api/incompleterunhistoryerror/incompleterunhistoryerror-methods.mdx b/models/ref/python/public-api/incompleterunhistoryerror/incompleterunhistoryerror-methods.mdx index c021f39479..c2bdd1bbdf 100644 --- a/models/ref/python/public-api/incompleterunhistoryerror/incompleterunhistoryerror-methods.mdx +++ b/models/ref/python/public-api/incompleterunhistoryerror/incompleterunhistoryerror-methods.mdx @@ -7,41 +7,35 @@ kind: class namespace: wandb.apis.public.runhistory.downloads --- -## class wandb.apis.public.IncompleteRunHistoryError +## Class wandb.apis.public.IncompleteRunHistoryError +## method BaseException.add_note - -### method BaseException.add_note() +Exception.add_note(note) -- +add a note to the exception ```python (self, object, /) ``` -Exception.add_note(note) -- -add a note to the exception - ##### Arguments -- `object`: + + +## method BaseException.with_traceback - -### method BaseException.with_traceback() +Exception.with_traceback(tb) -- +set self.__traceback__ to tb and return self. ```python (self, object, /) ``` -Exception.with_traceback(tb) -- -set self.__traceback__ to tb and return self. - ##### Arguments -- `object`: - - - - + + diff --git a/models/ref/python/public-api/member.mdx b/models/ref/python/public-api/member.mdx index 084acc2f51..1dfc017ab3 100644 --- a/models/ref/python/public-api/member.mdx +++ b/models/ref/python/public-api/member.mdx @@ -7,11 +7,11 @@ namespace: wandb.apis.public.teams import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; - + -## class wandb.apis.public.Member +## Class wandb.apis.public.Member ```python (service_api: 'ServiceApi', team: 'str', @@ -26,10 +26,17 @@ A member of a team. ## Args -- `service_api`: The service API instance to use for querying W&B. -- `team`: The name of the team this member belongs to -- `attrs`: The member attributes + +The service API instance to use for querying W&B. + + +The name of the team this member belongs to + + + +The member attributes + diff --git a/models/ref/python/public-api/member/member-methods.mdx b/models/ref/python/public-api/member/member-methods.mdx index fb8bd390a5..cdbe941fb3 100644 --- a/models/ref/python/public-api/member/member-methods.mdx +++ b/models/ref/python/public-api/member/member-methods.mdx @@ -7,21 +7,17 @@ kind: class namespace: wandb.apis.public.teams --- -## class wandb.apis.public.Member +## Class wandb.apis.public.Member +## method Member.delete - -### method Member.delete() +Remove a member from a team. ```python (self) ``` -Remove a member from a team. - - - - - +##### Returns +Boolean indicating success diff --git a/models/ref/python/public-api/organization.mdx b/models/ref/python/public-api/organization.mdx index dd3ff1a099..c963533c23 100644 --- a/models/ref/python/public-api/organization.mdx +++ b/models/ref/python/public-api/organization.mdx @@ -7,11 +7,11 @@ namespace: wandb.apis.public.organizations import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; - + -## class wandb.apis.public.Organization +## Class wandb.apis.public.Organization ```python service_api: 'InitVar[ServiceApi]', *, id: 'GQLId', @@ -30,11 +30,21 @@ Users should never need to instantiate this class directly. Use ## Args -- `service_api`: -- `id`: -- `name`: -- `org_entity`: + + + + + + + + + + + + + + diff --git a/models/ref/python/public-api/project.mdx b/models/ref/python/public-api/project.mdx index c297cd3f8f..1987d907d7 100644 --- a/models/ref/python/public-api/project.mdx +++ b/models/ref/python/public-api/project.mdx @@ -7,11 +7,11 @@ namespace: wandb.apis.public.projects import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; - + -## class wandb.apis.public.Project +## Class wandb.apis.public.Project ```python service_api: 'ServiceApi', entity: 'str', @@ -27,11 +27,21 @@ A project is a namespace for runs. ## Args -- `service_api`: The service API used to query W&B. -- `entity`: The entity which owns the project. -- `project`: The name of the project to query. -- `attrs`: The attributes of the project. + +The service API used to query W&B. + + +The entity which owns the project. + + + +The name of the project to query. + + + +The attributes of the project. + diff --git a/models/ref/python/public-api/project/project-methods.mdx b/models/ref/python/public-api/project/project-methods.mdx index 25faf797da..0e167df4fd 100644 --- a/models/ref/python/public-api/project/project-methods.mdx +++ b/models/ref/python/public-api/project/project-methods.mdx @@ -7,27 +7,26 @@ kind: class namespace: wandb.apis.public.projects --- -## class wandb.apis.public.Project +## Class wandb.apis.public.Project +## method Project.artifacts_types - -### method Project.artifacts_types() +Returns all artifact types associated with this project. ```python self, per_page: 'int' = 50 ``` -Returns all artifact types associated with this project. - ##### Arguments -- `per_page`: - + + +## method Project.collections -### method Project.collections() +Returns all artifact collections associated with this project. ```python self, @@ -36,18 +35,23 @@ order: 'str | None' = None, per_page: 'int' = 50 ``` -Returns all artifact collections associated with this project. - ##### Arguments -- `filters`: Optional mapping of filters to apply to the query. -- `order`: Optional string to specify the order of the results. If you prepend order with a + order is ascending (default). If you prepend order with a - order is descending. -- `per_page`: The number of artifact collections to fetch per page. Default is 50. + +Optional mapping of filters to apply to the query. + + +Optional string to specify the order of the results. If you prepend order with a + order is ascending (default). If you prepend order with a - order is descending. + + +The number of artifact collections to fetch per page. Default is 50. + +## method Project.sweeps -### method Project.sweeps() +Return a paginated collection of sweeps in this project. ```python self, @@ -56,16 +60,21 @@ filters: 'dict[str, Any] | None' = None, order: 'str | None' = None ``` -Return a paginated collection of sweeps in this project. - ##### Arguments -- `per_page`: The number of sweeps to fetch per request to the API. -- `filters`: (dict) queries for specific sweeps using the runs filters, See wandb/apis/public/api.py:runs for more details. -- `order`: + +The number of sweeps to fetch per request to the API. + + +(dict) queries for specific sweeps using the runs filters, See wandb/apis/public/api.py:runs for more details. + + + +##### Returns +A `Sweeps` object, which is an iterable collection of `Sweep` objects. diff --git a/models/ref/python/public-api/project/project-properties.mdx b/models/ref/python/public-api/project/project-properties.mdx index fbc5a7d966..666d0fc84c 100644 --- a/models/ref/python/public-api/project/project-properties.mdx +++ b/models/ref/python/public-api/project/project-properties.mdx @@ -7,9 +7,7 @@ kind: class namespace: wandb.apis.public.projects --- -## class wandb.apis.public.Project - - +## Class wandb.apis.public.Project ### property id @@ -28,5 +26,3 @@ entity and project name. Returns the URL of the project. - - diff --git a/models/ref/python/public-api/projectartifactcollections.mdx b/models/ref/python/public-api/projectartifactcollections.mdx index 4a8bbd65c3..b8e7e2d737 100644 --- a/models/ref/python/public-api/projectartifactcollections.mdx +++ b/models/ref/python/public-api/projectartifactcollections.mdx @@ -7,11 +7,11 @@ namespace: wandb.apis.public.artifacts import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; - + -## class wandb.apis.public.ProjectArtifactCollections +## Class wandb.apis.public.ProjectArtifactCollections diff --git a/models/ref/python/public-api/projectartifactcollections/projectartifactcollections-methods.mdx b/models/ref/python/public-api/projectartifactcollections/projectartifactcollections-methods.mdx index ef8184eb28..ef1fd052ed 100644 --- a/models/ref/python/public-api/projectartifactcollections/projectartifactcollections-methods.mdx +++ b/models/ref/python/public-api/projectartifactcollections/projectartifactcollections-methods.mdx @@ -7,45 +7,29 @@ kind: class namespace: wandb.apis.public.artifacts --- -## class wandb.apis.public.ProjectArtifactCollections +## Class wandb.apis.public.ProjectArtifactCollections +## method RelayPaginator.convert_objects - -### method RelayPaginator.convert_objects() +Convert the last fetched response data into the iterated objects. ```python self ``` -Convert the last fetched response data into the iterated objects. - - - +## method Paginator.__next__ - -### method Paginator.__next__() +Return the next item from the iterator. When exhausted, raise StopIteration ```python self ``` -Return the next item from the iterator. When exhausted, raise StopIteration - - +## method Paginator.update_variables - - -### method Paginator.update_variables() +Update the query variables for the next page fetch. ```python self ``` -Update the query variables for the next page fetch. - - - - - - - diff --git a/models/ref/python/public-api/projects.mdx b/models/ref/python/public-api/projects.mdx index c93c3231d0..2d04f4eaaf 100644 --- a/models/ref/python/public-api/projects.mdx +++ b/models/ref/python/public-api/projects.mdx @@ -7,11 +7,11 @@ namespace: wandb.apis.public.projects import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; - + -## class wandb.apis.public.Projects +## Class wandb.apis.public.Projects ```python service_api: 'ServiceApi', entity: 'str', @@ -28,10 +28,17 @@ An iterable interface to access projects created and saved by the entity. ## Args -- `service_api`: The service API used to query W&B. -- `entity`: The entity which owns the projects. -- `per_page`: The number of projects to fetch per request to the API. + +The service API used to query W&B. + + +The entity which owns the projects. + + + +The number of projects to fetch per request to the API. + diff --git a/models/ref/python/public-api/projects/projects-methods.mdx b/models/ref/python/public-api/projects/projects-methods.mdx index b183596f23..1f45ce76d0 100644 --- a/models/ref/python/public-api/projects/projects-methods.mdx +++ b/models/ref/python/public-api/projects/projects-methods.mdx @@ -7,45 +7,29 @@ kind: class namespace: wandb.apis.public.projects --- -## class wandb.apis.public.Projects +## Class wandb.apis.public.Projects +## method RelayPaginator.convert_objects - -### method RelayPaginator.convert_objects() +Convert the last fetched response data into the iterated objects. ```python self ``` -Convert the last fetched response data into the iterated objects. - - - +## method Paginator.__next__ - -### method Paginator.__next__() +Return the next item from the iterator. When exhausted, raise StopIteration ```python self ``` -Return the next item from the iterator. When exhausted, raise StopIteration - - +## method Paginator.update_variables - - -### method Paginator.update_variables() +Update the query variables for the next page fetch. ```python self ``` -Update the query variables for the next page fetch. - - - - - - - diff --git a/models/ref/python/public-api/registry.mdx b/models/ref/python/public-api/registry.mdx index 19fd81a0d8..98410dbda4 100644 --- a/models/ref/python/public-api/registry.mdx +++ b/models/ref/python/public-api/registry.mdx @@ -7,11 +7,11 @@ namespace: wandb.apis.public.registries.registry import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; - + -## class wandb.apis.public.Registry +## Class wandb.apis.public.Registry ```python (service_api: 'ServiceApi', organization: 'str', @@ -28,12 +28,25 @@ A single registry in the Registry. ## Args -- `service_api`: -- `organization`: -- `entity`: -- `name`: -- `attrs`: + + + + + + + + + + + + + + + + + + diff --git a/models/ref/python/public-api/registry/registry-methods.mdx b/models/ref/python/public-api/registry/registry-methods.mdx index 986f5329d4..8e7d8b5757 100644 --- a/models/ref/python/public-api/registry/registry-methods.mdx +++ b/models/ref/python/public-api/registry/registry-methods.mdx @@ -7,29 +7,31 @@ kind: class namespace: wandb.apis.public.registries.registry --- -## class wandb.apis.public.Registry +## Class wandb.apis.public.Registry +## method Registry.add_members - -### method Registry.add_members() +Adds users or teams to this registry. ```python self, *members: 'User | UserMember | Team | TeamMember | str' ``` -Adds users or teams to this registry. - ##### Arguments -- `members`: The users or teams to add to the registry. Accepts `User` objects, `Team` objects, or their string IDs. + +The users or teams to add to the registry. Accepts `User` objects, `Team` objects, or their string IDs. + + +##### Returns +This registry for further method chaining, if needed. ##### Raises - `TypeError`: If no members are passed as arguments. - `ValueError`: If unable to infer or parse the user or team IDs. - ##### Examples ```python @@ -48,7 +50,9 @@ my_team = api.team(name="my-team") registry.add_members(my_team) ``` -### method Registry.collections() +## method Registry.collections + +Returns the collections belonging to this registry. ```python self, @@ -58,19 +62,30 @@ per_page: 'PositiveInt' = 100, start: 'str | None' = None ``` -Returns the collections belonging to this registry. - ##### Arguments -- `filter`: Optional mapping of filters to apply to the collections query. -- `order`: Optional string to specify the order of the results. If prefixed with '+', sorts ascending (default). If prefixed with '-', sorts descending. -- `per_page`: The number of results to fetch per page. Usually there is no reason to change this. -- `start`: Pagination cursor for resuming a past query, captured from a previous paginator's `.cursor` attribute. + +Optional mapping of filters to apply to the collections query. + + +Optional string to specify the order of the results. If prefixed with '+', sorts ascending (default). If prefixed with '-', sorts descending. + + +The number of results to fetch per page. Usually there is no reason to change this. + + +Pagination cursor for resuming a past query, captured from a previous paginator's `.cursor` attribute. + -### method Registry.create() +## method Registry.create + +Create a new registry. + +The registry name must be unique within the organization. +This function should be called using `api.create_registry()` ```python api: 'Api', @@ -81,81 +96,87 @@ description: 'str | None' = None, artifact_types: 'list[str] | None' = None ``` -Create a new registry. - -The registry name must be unique within the organization. -This function should be called using `api.create_registry()` - ##### Arguments -- `api`: The W&B API instance. -- `organization`: The name of the organization. -- `name`: The name of the registry (without the `wandb-registry-` prefix). -- `visibility`: The visibility level ('organization' or 'restricted'). -- `description`: An optional description for the registry. -- `artifact_types`: An optional list of allowed artifact types. + +The W&B API instance. + + +The name of the organization. + -##### Raises - -- `ValueError`: If a registry with the same name already exists in the organization or if the creation fails. + +The name of the registry (without the `wandb-registry-` prefix). + + +The visibility level ('organization' or 'restricted'). + -### method Registry.delete() + +An optional description for the registry. + -```python -self -``` + +An optional list of allowed artifact types. + -Delete the registry. This is irreversible. +##### Returns +`Registry`: The newly created Registry object. +##### Raises +- `ValueError`: If a registry with the same name already exists in the organization or if the creation fails. +## method Registry.delete -### method Registry.load() +Delete the registry. This is irreversible. ```python self ``` -Load registry attributes from the backend. - - - - +## method Registry.load -### method Registry.members() +Load registry attributes from the backend. ```python self ``` -Returns the current members (users and teams) of this registry. - +## method Registry.members +Returns the current members (users and teams) of this registry. +```python +self +``` +## method Registry.remove_members -### method Registry.remove_members() +Removes users or teams from this registry. ```python self, *members: 'User | UserMember | Team | TeamMember | str' ``` -Removes users or teams from this registry. - ##### Arguments -- `members`: The users or teams to remove from the registry. Accepts `User` objects, `Team` objects, or their string IDs. + +The users or teams to remove from the registry. Accepts `User` objects, `Team` objects, or their string IDs. + +##### Returns + +This registry for further method chaining, if needed. ##### Raises - `TypeError`: If no members are passed as arguments. - `ValueError`: If unable to infer or parse the user or team IDs. - ##### Examples ```python @@ -174,31 +195,25 @@ old_team = api.team(name="old-team") registry.remove_members(old_team) ``` -### method Registry.save() +## method Registry.save + +Save registry attributes to the backend. ```python self ``` -Save registry attributes to the backend. - - - +## method Registry.team_members - -### method Registry.team_members() +Returns the current member teams of this registry. ```python self ``` -Returns the current member teams of this registry. - - - - +## method Registry.update_member -### method Registry.update_member() +Updates the role of a member (user or team) within this registry. ```python self, @@ -206,23 +221,28 @@ member: 'User | UserMember | Team | TeamMember | str', role: 'MemberRole | str' ``` -Updates the role of a member (user or team) within this registry. - ##### Arguments -- `member`: The user or team to update the role of. Accepts a `User` object, `Team` object, or their string ID. -- `role`: The new role to assign to the member. May be one of: - - "admin" - - "member" - - "viewer" - - "restricted_viewer" (if supported by the W&B server) + +The user or team to update the role of. Accepts a `User` object, `Team` object, or their string ID. + + + +The new role to assign to the member. May be one of: +- "admin" +- "member" +- "viewer" +- "restricted_viewer" (if supported by the W&B server) + + +##### Returns +This registry for further method chaining, if needed. ##### Raises - `ValueError`: If unable to infer the user or team ID. - ##### Examples Make all users in the registry admins @@ -238,19 +258,17 @@ for member in registry.user_members(): registry.update_member(member.user, role="admin") ``` -### method Registry.user_members() +## method Registry.user_members + +Returns the current member users of this registry. ```python self ``` -Returns the current member users of this registry. - +## method Registry.versions - - - -### method Registry.versions() +Returns the artifact versions belonging to this registry. ```python self, @@ -259,16 +277,17 @@ per_page: 'PositiveInt' = 100, start: 'str | None' = None ``` -Returns the artifact versions belonging to this registry. - ##### Arguments -- `filter`: Optional mapping of filters to apply to the artifact versions query. -- `per_page`: The number of results to fetch per page. Usually there is no reason to change this. -- `start`: Pagination cursor for resuming a past query, captured from a previous paginator's `.cursor` attribute. - - - + +Optional mapping of filters to apply to the artifact versions query. + + +The number of results to fetch per page. Usually there is no reason to change this. + + +Pagination cursor for resuming a past query, captured from a previous paginator's `.cursor` attribute. + diff --git a/models/ref/python/public-api/registry/registry-properties.mdx b/models/ref/python/public-api/registry/registry-properties.mdx index 43e54e4d5c..944e734c03 100644 --- a/models/ref/python/public-api/registry/registry-properties.mdx +++ b/models/ref/python/public-api/registry/registry-properties.mdx @@ -7,9 +7,7 @@ kind: class namespace: wandb.apis.public.registries.registry --- -## class wandb.apis.public.Registry - - +## Class wandb.apis.public.Registry ### property allow_all_artifact_types @@ -70,5 +68,3 @@ Timestamp of when the registry was last updated. Visibility of the registry. - - diff --git a/models/ref/python/public-api/reports.mdx b/models/ref/python/public-api/reports.mdx index 8dd8fe7e51..62b03a3924 100644 --- a/models/ref/python/public-api/reports.mdx +++ b/models/ref/python/public-api/reports.mdx @@ -7,11 +7,11 @@ namespace: wandb.apis.public.reports import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; - + -## class wandb.apis.public.Reports +## Class wandb.apis.public.Reports ```python (service_api: 'ServiceApi', project: 'Project', @@ -28,12 +28,25 @@ Reports is a lazy iterator of `BetaReport` objects. ## Args -- `service_api`: Interface to the wandb-core service that performs W&B API calls for this collection. -- `project`: The project to fetch reports from. -- `name`: The name of the report to filter by. If `None`, fetches all reports. -- `entity`: The entity name for the project. Defaults to the project entity. -- `per_page`: Number of reports to fetch per page (default is 50). + +Interface to the wandb-core service that performs W&B API calls for this collection. + + +The project to fetch reports from. + + + +The name of the report to filter by. If `None`, fetches all reports. + + + +The entity name for the project. Defaults to the project entity. + + + +Number of reports to fetch per page (default is 50). + diff --git a/models/ref/python/public-api/reports/reports-methods.mdx b/models/ref/python/public-api/reports/reports-methods.mdx index b97459dc7c..83053868aa 100644 --- a/models/ref/python/public-api/reports/reports-methods.mdx +++ b/models/ref/python/public-api/reports/reports-methods.mdx @@ -7,45 +7,29 @@ kind: class namespace: wandb.apis.public.reports --- -## class wandb.apis.public.Reports +## Class wandb.apis.public.Reports +## method Reports.convert_objects - -### method Reports.convert_objects() +Converts GraphQL edges to File objects. ```python self ``` -Converts GraphQL edges to File objects. - - - +## method Paginator.__next__ - -### method Paginator.__next__() +Return the next item from the iterator. When exhausted, raise StopIteration ```python self ``` -Return the next item from the iterator. When exhausted, raise StopIteration - - +## method Reports.update_variables - - -### method Reports.update_variables() +Updates the GraphQL query variables for pagination. ```python self ``` -Updates the GraphQL query variables for pagination. - - - - - - - diff --git a/models/ref/python/public-api/run.mdx b/models/ref/python/public-api/run.mdx index 661de7de31..e06b1279ed 100644 --- a/models/ref/python/public-api/run.mdx +++ b/models/ref/python/public-api/run.mdx @@ -7,11 +7,11 @@ namespace: wandb.apis.public.runs import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; - + -## class wandb.apis.public.Run +## Class wandb.apis.public.Run ```python (service_api: 'ServiceApi', entity: 'str', @@ -31,15 +31,37 @@ A single run associated with an entity and project. ## Args -- `service_api`: Interface to the wandb-core service that performs W&B API calls for this run. -- `entity`: The entity associated with the run. -- `project`: The project associated with the run. -- `run_id`: The unique identifier for the run. -- `attrs`: The attributes of the run. -- `include_sweeps`: Whether to include sweeps in the run. -- `lazy`: -- `api_key`: + +Interface to the wandb-core service that performs W&B API calls for this run. + + +The entity associated with the run. + + + +The project associated with the run. + + + +The unique identifier for the run. + + + +The attributes of the run. + + + +Whether to include sweeps in the run. + + + + + + + + + ## Attributes @@ -64,4 +86,3 @@ A single run associated with an entity and project. - diff --git a/models/ref/python/public-api/run/run-methods.mdx b/models/ref/python/public-api/run/run-methods.mdx index 80bc41462e..c3b0028cfe 100644 --- a/models/ref/python/public-api/run/run-methods.mdx +++ b/models/ref/python/public-api/run/run-methods.mdx @@ -7,11 +7,9 @@ kind: class namespace: wandb.apis.public.runs --- -## class wandb.apis.public.Run +## Class wandb.apis.public.Run - - -### method Run.beta_scan_history() +## method Run.beta_scan_history ```python self, @@ -22,28 +20,29 @@ max_step: 'int | None' = None, use_cache: 'bool' = True ``` +##### Arguments + -##### Arguments + -- `keys`: -- `page_size`: -- `min_step`: -- `max_step`: -- `use_cache`: + + + + -### method Run.create() + -```python -api: 'public.Api', -run_id: 'str | None' = None, -project: 'str | None' = None, -entity: 'str | None' = None, -state: "Literal['running', 'pending']" = 'running' -``` + + + + + + +## method Run.create Create a run for the given project. @@ -57,16 +56,39 @@ contention). These pending runs can later be resumed and tracked by W&B. Runs created with this method have limited functionality. Calling `update()` on a run created this way may not work as expected. +```python +api: 'public.Api', +run_id: 'str | None' = None, +project: 'str | None' = None, +entity: 'str | None' = None, +state: "Literal['running', 'pending']" = 'running' +``` + ##### Arguments -- `api`: The W&B API instance. -- `run_id`: Optional run ID. If not provided, a random ID will be generated. -- `project`: Optional project name. Defaults to the project in API settings or "uncategorized". -- `entity`: Optional entity (user or team) name. -- `state`: Initial state of the run. Use "pending" for runs that will be resumed later, or "running" for immediate execution. + +The W&B API instance. + + + +Optional run ID. If not provided, a random ID will be generated. + + + +Optional project name. Defaults to the project in API settings or "uncategorized". + + + +Optional entity (user or team) name. + + +Initial state of the run. Use "pending" for runs that will be resumed later, or "running" for immediate execution. + +##### Returns +A Run object representing the created run. ##### Examples @@ -88,23 +110,24 @@ run = Run.create( ) ``` -### method Run.delete() +## method Run.delete + +Delete the given run from the wandb backend. ```python self, delete_artifacts: 'bool' = False ``` -Delete the given run from the wandb backend. - ##### Arguments -- `delete_artifacts`: Whether to delete the artifacts associated with the run. - + +Whether to delete the artifacts associated with the run. + +## method Run.download_history_exports - -### method Run.download_history_exports() +Download any parquet history files for the run to the provided directory. ```python self, @@ -112,37 +135,50 @@ download_dir: 'pathlib.Path | str', require_complete_history: 'bool' = True ``` -Download any parquet history files for the run to the provided directory. - ##### Arguments -- `download_dir`: The directory to download the history files to. -- `require_complete_history`: Whether to require the complete history to be downloaded. If true, and the run contains data that has not been exported to parquet files yet, an IncompleteRunHistoryError will be raised. + +The directory to download the history files to. + + + +Whether to require the complete history to be downloaded. If true, and the run contains data that has not been exported to parquet files yet, an IncompleteRunHistoryError will be raised. + +##### Returns + +A DownloadHistoryResult. ##### Raises - `IncompleteRunHistoryError`: If require_complete_history is True and the run contains data not yet exported to parquet files. - `WandbApiFailedError`: If the API request fails for reasons other than incomplete history. +## method Run.file -### method Run.file() +Return the path of a file with a given name in the artifact. ```python self, name: 'str' ``` -Return the path of a file with a given name in the artifact. - ##### Arguments -- `name`: name of requested file. + +name of requested file. + +##### Returns +A `File` matching the name argument. +## method Run.files -### method Run.files() +Returns a `Files` object for all files in the run which match the given criteria. + +You can specify a list of exact file names to match, or a pattern to match against. +If both are provided, the pattern will be ignored. ```python self, @@ -151,21 +187,29 @@ pattern: 'str | None' = None, per_page: 'int' = 50 ``` -Returns a `Files` object for all files in the run which match the given criteria. +##### Arguments -You can specify a list of exact file names to match, or a pattern to match against. -If both are provided, the pattern will be ignored. + +names of the requested files, if empty returns all files + -##### Arguments + +Pattern to match when returning files from W&B. This pattern uses mySQL's LIKE syntax, so matching all files that end with .json would be "%.json". If both names and pattern are provided, a ValueError will be raised. + -- `names`: names of the requested files, if empty returns all files -- `pattern`: Pattern to match when returning files from W&B. This pattern uses mySQL's LIKE syntax, so matching all files that end with .json would be "%.json". If both names and pattern are provided, a ValueError will be raised. -- `per_page`: number of results per page. + +number of results per page. + +##### Returns +A `Files` object, which is an iterator over `File` objects. +## method Run.history -### method Run.history() +Return sampled history metrics for a run. + +This is simpler and faster if you are ok with the history records being sampled. ```python self, @@ -176,60 +220,80 @@ pandas: 'bool' = True, stream: "Literal['default', 'system']" = 'default' ``` -Return sampled history metrics for a run. +##### Arguments -This is simpler and faster if you are ok with the history records being sampled. + +(int, optional) The number of samples to return + -##### Arguments + +(list, optional) Only return metrics for specific keys + + + +(str, optional) Use this metric as the xAxis defaults to _step + -- `samples`: (int, optional) The number of samples to return -- `keys`: (list, optional) Only return metrics for specific keys -- `x_axis`: (str, optional) Use this metric as the xAxis defaults to _step -- `pandas`: (bool, optional) Return a pandas dataframe -- `stream`: (str, optional) "default" for metrics, "system" for machine metrics + +(bool, optional) Return a pandas dataframe + + +(str, optional) "default" for metrics, "system" for machine metrics + +##### Returns +`pandas.DataFrame`: If pandas=True returns a `pandas.DataFrame` of history metrics. -### method Run.load() +## method Run.load + +Load run data using appropriate fragment based on lazy mode. ```python self, force: 'bool' = False ``` -Load run data using appropriate fragment based on lazy mode. - ##### Arguments -- `force`: If True, re-fetch the run data from the server, even if it is already loaded. + +If True, re-fetch the run data from the server, even if it is already loaded. + + +##### Returns +A dictionary of the run data. ##### Raises - `RunNotFoundError`: If the run is not found, or the run data can not be loaded. +## method Run.load_full_data + +Load full run data including heavy fields like config, systemMetrics, summaryMetrics. -### method Run.load_full_data() +This method is useful when you initially used lazy=True for listing runs, +but need access to the full data for specific runs. ```python self, force: 'bool' = False ``` -Load full run data including heavy fields like config, systemMetrics, summaryMetrics. - -This method is useful when you initially used lazy=True for listing runs, -but need access to the full data for specific runs. - ##### Arguments -- `force`: Force reload even if data is already loaded + +Force reload even if data is already loaded + +##### Returns +The loaded run attributes +## method Run.log_artifact -### method Run.log_artifact() +Declare an artifact as output of a run. ```python self, @@ -238,35 +302,45 @@ aliases: 'Collection[str] | None' = None, tags: 'Collection[str] | None' = None ``` -Declare an artifact as output of a run. - ##### Arguments -- `artifact`: An artifact returned from `wandb.Api().artifact(name)`. -- `aliases`: Aliases to apply to this artifact. -- `tags`: (list, optional) Tags to apply to this artifact, if any. + +An artifact returned from `wandb.Api().artifact(name)`. + + +Aliases to apply to this artifact. + + +(list, optional) Tags to apply to this artifact, if any. + +##### Returns -### method Run.logged_artifacts() +A `Artifact` object. -```python -self, -per_page: 'int' = 100 -``` +## method Run.logged_artifacts Fetches all artifacts logged by this run. Retrieves all output artifacts that were logged during the run. Returns a paginated result that can be iterated over or collected into a single list. -##### Arguments +```python +self, +per_page: 'int' = 100 +``` -- `per_page`: Number of artifacts to fetch per API request. +##### Arguments + +Number of artifacts to fetch per API request. + +##### Returns +An iterable collection of all Artifact objects logged as outputs during this run. ##### Examples @@ -291,19 +365,17 @@ for logged_artifact in finished_run.logged_artifacts(): print(logged_artifact.name) ``` -### method Run.save() +## method Run.save + +Persist changes to the run object to the W&B backend. ```python self ``` -Persist changes to the run object to the W&B backend. - +## method Run.scan_history - - - -### method Run.scan_history() +Returns an iterable collection of all history records for a run. ```python self, @@ -314,24 +386,33 @@ max_step: 'int | None' = None, use_cache: 'bool' = True ``` -Returns an iterable collection of all history records for a run. - ##### Arguments -- `keys`: list of metrics to read from the run's history. if no keys are provided then all metrics will be returned. -- `page_size`: the number of history records to read at a time. -- `min_step`: The minimum step to start reading history from (inclusive). -- `max_step`: The maximum step to read history up to (exclusive). -- `use_cache`: When set to True, checks the WANDB_CACHE_DIR for a run history. If the run history is not found in the cache, it will be downloaded from the server. If set to False, the run history will be downloaded every time. + +list of metrics to read from the run's history. if no keys are provided then all metrics will be returned. + + +the number of history records to read at a time. + + +The minimum step to start reading history from (inclusive). + + +The maximum step to read history up to (exclusive). + -### method Run.stop() + +When set to True, checks the WANDB_CACHE_DIR for a run history. If the run history is not found in the cache, it will be downloaded from the server. If set to False, the run history will be downloaded every time. + -```python -self -``` +##### Returns + +A HistoryScan object, which can be iterator over to get history records. + +## method Run.stop Request that this run stop gracefully. @@ -345,13 +426,14 @@ Stopping is asynchronous: this method returns once the backend has flagged the run, not once the run terminates. Calling it again, or on a run that is no longer running, has no effect. - +```python +self +``` ##### Raises - ``wandb.Error``: If the request fails. - ##### Examples ```python @@ -361,7 +443,9 @@ run = wandb.Api().run("entity/project/run_id") run.stop() ``` -### method Run.to_html() +## method Run.to_html + +Generate HTML containing an iframe displaying this run. ```python self, @@ -369,35 +453,26 @@ height: 'int' = 420, hidden: 'bool' = False ``` -Generate HTML containing an iframe displaying this run. - ##### Arguments -- `height`: -- `hidden`: + + + + -### method Run.update() - -```python -self -``` +## method Run.update Persist changes to the run object to the wandb backend. - - - - -### method Run.update_state() - ```python -self, -state: 'str' +self ``` +## method Run.update_state + Update the state of a run. Supported transitions: @@ -410,17 +485,28 @@ Sweep runs cannot have their state updated. See `Run.state` for the list of possible run states. +```python +self, +state: 'str' +``` + ##### Arguments -- `state`: The target run state. One of `"pending"` or `"failed"`. + +The target run state. One of `"pending"` or `"failed"`. + + +##### Returns +`True` if the state was successfully updated. ##### Raises - ``wandb.Error``: If the requested state transition is not allowed, or the server does not support this operation. +## method Run.upload_file -### method Run.upload_file() +Upload a local file to W&B, associating it with this run. ```python self, @@ -428,17 +514,23 @@ path: 'str', root: 'str' = '.' ``` -Upload a local file to W&B, associating it with this run. - ##### Arguments -- `path`: Path to the file to upload. Can be absolute or relative. -- `root`: The root path to save the file relative to. For example, if you want to have the file saved in the run as "my_dir/file.txt" and you're currently in "my_dir" you would set root to "../". Defaults to current directory ("."). + +Path to the file to upload. Can be absolute or relative. + + +The root path to save the file relative to. For example, if you want to have the file saved in the run as "my_dir/file.txt" and you're currently in "my_dir" you would set root to "../". Defaults to current directory ("."). + +##### Returns +A `File` object representing the uploaded file. -### method Run.use_artifact() +## method Run.use_artifact + +Declare an artifact as an input to a run. ```python self, @@ -446,22 +538,21 @@ artifact: 'wandb.Artifact', use_as: 'str | None' = None ``` -Declare an artifact as an input to a run. - ##### Arguments -- `artifact`: An artifact returned from `wandb.Api().artifact(name)` -- `use_as`: A string identifying how the artifact is used in the script. Used to easily differentiate artifacts used in a run, when using the beta wandb launch feature's artifact swapping functionality. + +An artifact returned from `wandb.Api().artifact(name)` + + +A string identifying how the artifact is used in the script. Used to easily differentiate artifacts used in a run, when using the beta wandb launch feature's artifact swapping functionality. + +##### Returns +An `Artifact` object. -### method Run.used_artifacts() - -```python -self, -per_page: 'int' = 100 -``` +## method Run.used_artifacts Fetches artifacts explicitly used by this run. @@ -469,12 +560,20 @@ Retrieves only the input artifacts that were explicitly declared as used during the run, typically via `run.use_artifact()`. Returns a paginated result that can be iterated over or collected into a single list. -##### Arguments +```python +self, +per_page: 'int' = 100 +``` -- `per_page`: Number of artifacts to fetch per API request. +##### Arguments + +Number of artifacts to fetch per API request. + +##### Returns +An iterable collection of Artifact objects explicitly used as inputs in this run. ##### Examples @@ -492,17 +591,11 @@ for used_artifact in finished_run.used_artifacts(): test_artifact ``` -### method Run.wait_until_finished() +## method Run.wait_until_finished + +Check the state of the run until it is finished. ```python self ``` -Check the state of the run until it is finished. - - - - - - - diff --git a/models/ref/python/public-api/run/run-properties.mdx b/models/ref/python/public-api/run/run-properties.mdx index 8fa266f9f5..b176470ca0 100644 --- a/models/ref/python/public-api/run/run-properties.mdx +++ b/models/ref/python/public-api/run/run-properties.mdx @@ -7,9 +7,7 @@ kind: class namespace: wandb.apis.public.runs --- -## class wandb.apis.public.Run - - +## Class wandb.apis.public.Run ### property config @@ -96,5 +94,3 @@ SaaS users, it takes the form of `https://wandb.ai/entity/project/run_id`. This API is deprecated. Use `entity` instead. - - diff --git a/models/ref/python/public-api/runartifacts.mdx b/models/ref/python/public-api/runartifacts.mdx index 6e0798bab0..d36dbba179 100644 --- a/models/ref/python/public-api/runartifacts.mdx +++ b/models/ref/python/public-api/runartifacts.mdx @@ -7,11 +7,11 @@ namespace: wandb.apis.public.artifacts import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; - + -## class wandb.apis.public.RunArtifacts +## Class wandb.apis.public.RunArtifacts diff --git a/models/ref/python/public-api/runartifacts/runartifacts-methods.mdx b/models/ref/python/public-api/runartifacts/runartifacts-methods.mdx index b5563d378e..f4e397e240 100644 --- a/models/ref/python/public-api/runartifacts/runartifacts-methods.mdx +++ b/models/ref/python/public-api/runartifacts/runartifacts-methods.mdx @@ -7,45 +7,29 @@ kind: class namespace: wandb.apis.public.artifacts --- -## class wandb.apis.public.RunArtifacts +## Class wandb.apis.public.RunArtifacts +## method RelayPaginator.convert_objects - -### method RelayPaginator.convert_objects() +Convert the last fetched response data into the iterated objects. ```python self ``` -Convert the last fetched response data into the iterated objects. - - - +## method Paginator.__next__ - -### method Paginator.__next__() +Return the next item from the iterator. When exhausted, raise StopIteration ```python self ``` -Return the next item from the iterator. When exhausted, raise StopIteration - - +## method Paginator.update_variables - - -### method Paginator.update_variables() +Update the query variables for the next page fetch. ```python self ``` -Update the query variables for the next page fetch. - - - - - - - diff --git a/models/ref/python/public-api/runs.mdx b/models/ref/python/public-api/runs.mdx index da91ad4ea5..237ce40044 100644 --- a/models/ref/python/public-api/runs.mdx +++ b/models/ref/python/public-api/runs.mdx @@ -7,11 +7,11 @@ namespace: wandb.apis.public.runs import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; - + -## class wandb.apis.public.Runs +## Class wandb.apis.public.Runs ```python (service_api: 'ServiceApi', entity: 'str', @@ -36,16 +36,41 @@ This is generally used indirectly using the `Api.runs` namespace. ## Args -- `service_api`: The service API to use for requests. -- `entity`: The entity (username or team) that owns the project. -- `project`: The name of the project to fetch runs from. -- `filters`: Filters to apply to the runs query. -- `order`: Order can be `created_at`, `heartbeat_at`, `config.*.value`, or `summary_metrics.*`. If you prepend order with a + order is ascending (default). If you prepend order with a - order is descending. The default order is run.created_at from oldest to newest. -- `per_page`: The number of runs to fetch per request (default is 50). -- `include_sweeps`: Whether to include sweep information in the runs. Defaults to True. -- `lazy`: Whether to defer loading heavy fields (config, summaryMetrics, systemMetrics) until they are accessed. Defaults to True. -- `api_key`: + +The service API to use for requests. + + +The entity (username or team) that owns the project. + + + +The name of the project to fetch runs from. + + + +Filters to apply to the runs query. + + + +Order can be `created_at`, `heartbeat_at`, `config.*.value`, or `summary_metrics.*`. If you prepend order with a + order is ascending (default). If you prepend order with a - order is descending. The default order is run.created_at from oldest to newest. + + + +The number of runs to fetch per request (default is 50). + + + +Whether to include sweep information in the runs. Defaults to True. + + + +Whether to defer loading heavy fields (config, summaryMetrics, systemMetrics) until they are accessed. Defaults to True. + + + + + diff --git a/models/ref/python/public-api/runs/runs-methods.mdx b/models/ref/python/public-api/runs/runs-methods.mdx index 6d1da3a2b4..8f277f458e 100644 --- a/models/ref/python/public-api/runs/runs-methods.mdx +++ b/models/ref/python/public-api/runs/runs-methods.mdx @@ -7,11 +7,11 @@ kind: class namespace: wandb.apis.public.runs --- -## class wandb.apis.public.Runs +## Class wandb.apis.public.Runs +## method Runs.histories - -### method Runs.histories() +Return sampled history metrics for all runs that fit the filters conditions. ```python self, @@ -22,58 +22,57 @@ format: "Literal['default', 'pandas', 'polars']" = 'default', stream: "Literal['default', 'system']" = 'default' ``` -Return sampled history metrics for all runs that fit the filters conditions. - ##### Arguments -- `samples`: The number of samples to return per run -- `keys`: Only return metrics for specific keys -- `x_axis`: Use this metric as the xAxis defaults to _step -- `format`: Format to return data in, options are "default", "pandas", "polars" -- `stream`: "default" for metrics, "system" for machine metrics - - - + +The number of samples to return per run + -### method Paginator.__next__() + +Only return metrics for specific keys + -```python -self -``` + +Use this metric as the xAxis defaults to _step + -Return the next item from the iterator. When exhausted, raise StopIteration + +Format to return data in, options are "default", "pandas", "polars" + + +"default" for metrics, "system" for machine metrics + +##### Returns +`pandas.DataFrame`: If `format="pandas"`, returns a `pandas.DataFrame` of history metrics. +## method Paginator.__next__ -### method Paginator.update_variables() +Return the next item from the iterator. When exhausted, raise StopIteration ```python self ``` -Update the query variables for the next page fetch. - +## method Paginator.update_variables - - - -### method Runs.upgrade_to_full() +Update the query variables for the next page fetch. ```python self ``` +## method Runs.upgrade_to_full + Upgrade this Runs collection from lazy to full mode. This switches to fetching full run data and upgrades any already-loaded Run objects to have full data. Uses parallel loading for better performance when upgrading multiple runs. - - - - - +```python +self +``` diff --git a/models/ref/python/public-api/sweep.mdx b/models/ref/python/public-api/sweep.mdx index 82d787c4d7..f686241186 100644 --- a/models/ref/python/public-api/sweep.mdx +++ b/models/ref/python/public-api/sweep.mdx @@ -7,11 +7,11 @@ namespace: wandb.apis.public.sweeps import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; - + -## class wandb.apis.public.Sweep +## Class wandb.apis.public.Sweep ```python (service_api: 'ServiceApi', entity: 'str', @@ -28,12 +28,25 @@ The set of runs associated with the sweep. ## Args -- `service_api`: -- `entity`: -- `project`: -- `sweep_id`: -- `attrs`: + + + + + + + + + + + + + + + + + + ## Attributes @@ -46,4 +59,3 @@ The set of runs associated with the sweep. - diff --git a/models/ref/python/public-api/sweep/sweep-methods.mdx b/models/ref/python/public-api/sweep/sweep-methods.mdx index 4762a0249b..67f7f920d2 100644 --- a/models/ref/python/public-api/sweep/sweep-methods.mdx +++ b/models/ref/python/public-api/sweep/sweep-methods.mdx @@ -7,54 +7,48 @@ kind: class namespace: wandb.apis.public.sweeps --- -## class wandb.apis.public.Sweep +## Class wandb.apis.public.Sweep +## method Sweep.agent - -### method Sweep.agent() +Query an agent by ID for this sweep. ```python self, agent_id: 'str' ``` -Query an agent by ID for this sweep. - ##### Arguments -- `agent_id`: The ID of the agent to look up. + +The ID of the agent to look up. + +## method Sweep.agents - - -### method Sweep.agents() +Query the list of all agents for this sweep. ```python self ``` -Query the list of all agents for this sweep. +## method Sweep.best_run - - - - -### method Sweep.best_run() +Return the best run sorted by the metric defined in config or the order passed in. ```python (self, order=None) ``` -Return the best run sorted by the metric defined in config or the order passed in. - ##### Arguments -- `order`: + + +## method Sweep.get - -### method Sweep.get() +Execute a query against the cloud backend. ```python (api: 'Api', @@ -65,22 +59,39 @@ order: 'str | None' = None, query: 'str | None' = None, **kwargs) ``` -Execute a query against the cloud backend. - ##### Arguments -- `api`: The W&B API instance. -- `entity`: The entity (username or team) that owns the project. -- `project`: The name of the project to fetch sweep from. -- `sid`: The sweep ID to query. -- `order`: The order in which the sweep's runs are returned. -- `query`: The query to use to execute the query. -- `kwargs`: + +The W&B API instance. + + + +The entity (username or team) that owns the project. + + + +The name of the project to fetch sweep from. + + + +The sweep ID to query. + + +The order in which the sweep's runs are returned. + + +The query to use to execute the query. + + -### method Sweep.to_html() + + +## method Sweep.to_html + +Generate HTML containing an iframe displaying this sweep. ```python self, @@ -88,15 +99,13 @@ height: 'int' = 420, hidden: 'bool' = False ``` -Generate HTML containing an iframe displaying this sweep. - ##### Arguments -- `height`: -- `hidden`: - - + + + + diff --git a/models/ref/python/public-api/sweep/sweep-properties.mdx b/models/ref/python/public-api/sweep/sweep-properties.mdx index 56d3c41e55..0c386b5084 100644 --- a/models/ref/python/public-api/sweep/sweep-properties.mdx +++ b/models/ref/python/public-api/sweep/sweep-properties.mdx @@ -7,9 +7,7 @@ kind: class namespace: wandb.apis.public.sweeps --- -## class wandb.apis.public.Sweep - - +## Class wandb.apis.public.Sweep ### property config @@ -56,5 +54,3 @@ of `https://wandb.ai/entity/project/sweeps/sweeps_ID`. Deprecated. Use `Sweep.entity` instead. - - diff --git a/models/ref/python/public-api/sweeps.mdx b/models/ref/python/public-api/sweeps.mdx index a00ff99795..da2727047c 100644 --- a/models/ref/python/public-api/sweeps.mdx +++ b/models/ref/python/public-api/sweeps.mdx @@ -7,11 +7,11 @@ namespace: wandb.apis.public.sweeps import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; - + -## class wandb.apis.public.Sweeps +## Class wandb.apis.public.Sweeps ```python service_api: 'ServiceApi', entity: 'str', @@ -28,12 +28,25 @@ A lazy iterator over a collection of `Sweep` objects. ## Args -- `service_api`: The service API used to query W&B. -- `entity`: The entity which owns the sweeps. -- `project`: The project which contains the sweeps. -- `per_page`: The number of sweeps to fetch per request to the API. -- `filters`: (dict) queries for specific sweeps using the runs filters, See wandb/apis/public/api.py:runs for more details. + +The service API used to query W&B. + + +The entity which owns the sweeps. + + + +The project which contains the sweeps. + + + +The number of sweeps to fetch per request to the API. + + + +(dict) queries for specific sweeps using the runs filters, See wandb/apis/public/api.py:runs for more details. + diff --git a/models/ref/python/public-api/sweeps/sweeps-methods.mdx b/models/ref/python/public-api/sweeps/sweeps-methods.mdx index 338f9dd1f1..b3385692a7 100644 --- a/models/ref/python/public-api/sweeps/sweeps-methods.mdx +++ b/models/ref/python/public-api/sweeps/sweeps-methods.mdx @@ -7,33 +7,21 @@ kind: class namespace: wandb.apis.public.sweeps --- -## class wandb.apis.public.Sweeps +## Class wandb.apis.public.Sweeps +## method Paginator.__next__ - -### method Paginator.__next__() +Return the next item from the iterator. When exhausted, raise StopIteration ```python self ``` -Return the next item from the iterator. When exhausted, raise StopIteration - +## method Paginator.update_variables - - - -### method Paginator.update_variables() +Update the query variables for the next page fetch. ```python self ``` -Update the query variables for the next page fetch. - - - - - - - diff --git a/models/ref/python/public-api/team.mdx b/models/ref/python/public-api/team.mdx index b4eab1d8f0..9d04435c8d 100644 --- a/models/ref/python/public-api/team.mdx +++ b/models/ref/python/public-api/team.mdx @@ -7,11 +7,11 @@ namespace: wandb.apis.public.teams import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; - + -## class wandb.apis.public.Team +## Class wandb.apis.public.Team ```python (service_api: 'ServiceApi', name: 'str', @@ -30,10 +30,17 @@ to handle team attributes. ## Args -- `service_api`: The service API instance to use for querying W&B. -- `name`: The name of the team -- `attrs`: Optional dictionary of team attributes + +The service API instance to use for querying W&B. + + +The name of the team + + + +Optional dictionary of team attributes + diff --git a/models/ref/python/public-api/team/team-methods.mdx b/models/ref/python/public-api/team/team-methods.mdx index 45fe614ea9..d67b1efcce 100644 --- a/models/ref/python/public-api/team/team-methods.mdx +++ b/models/ref/python/public-api/team/team-methods.mdx @@ -7,11 +7,11 @@ kind: class namespace: wandb.apis.public.teams --- -## class wandb.apis.public.Team +## Class wandb.apis.public.Team +## method Team.create - -### method Team.create() +Create a new team. ```python api: 'Api', @@ -19,34 +19,46 @@ team: 'str', admin_username: 'str | None' = None ``` -Create a new team. - ##### Arguments -- `api`: (`Api`) The api instance to use -- `team`: (str) The name of the team -- `admin_username`: (str) optional username of the admin user of the team, defaults to the current user. + +(`Api`) The api instance to use + + +(str) The name of the team + + +(str) optional username of the admin user of the team, defaults to the current user. + +##### Returns -### method Team.create_service_account() +A `Team` object + +## method Team.create_service_account + +Create a service account for the team. ```python self, description: 'str' ``` -Create a service account for the team. - ##### Arguments -- `description`: (str) A description for this service account + +(str) A description for this service account + +##### Returns +The service account `Member` object, or None on failure +## method Team.invite -### method Team.invite() +Invite a user to a team. ```python self, @@ -54,15 +66,17 @@ username_or_email: 'str', admin: 'bool' = False ``` -Invite a user to a team. - ##### Arguments -- `username_or_email`: (str) The username or email address of the user you want to invite. -- `admin`: (bool) Whether to make this user a team admin. Defaults to `False`. - - + +(str) The username or email address of the user you want to invite. + + +(bool) Whether to make this user a team admin. Defaults to `False`. + +##### Returns +`True` on success, `False` if user was already invited or didn't exist. diff --git a/models/ref/python/public-api/user.mdx b/models/ref/python/public-api/user.mdx index 5f6a0ec1c4..df0d39ea8e 100644 --- a/models/ref/python/public-api/user.mdx +++ b/models/ref/python/public-api/user.mdx @@ -7,11 +7,11 @@ namespace: wandb.apis.public.users import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; - + -## class wandb.apis.public.User +## Class wandb.apis.public.User diff --git a/models/ref/python/public-api/user/user-methods.mdx b/models/ref/python/public-api/user/user-methods.mdx index 80ed5ed487..142cf8b37b 100644 --- a/models/ref/python/public-api/user/user-methods.mdx +++ b/models/ref/python/public-api/user/user-methods.mdx @@ -7,11 +7,14 @@ kind: class namespace: wandb.apis.public.users --- -## class wandb.apis.public.User +## Class wandb.apis.public.User +## method User.create +Create a new user. -### method User.create() +This is an internal method. Use the `create_user()` method of +`wandb.Api` instead. ```python api: 'Api', @@ -19,53 +22,61 @@ email: 'str', admin: 'bool | None' = False ``` -Create a new user. +##### Arguments -This is an internal method. Use the `create_user()` method of -`wandb.Api` instead. + +The API instance to use to create the user. + -##### Arguments + +The email for the user. + -- `api`: The API instance to use to create the user. -- `email`: The email for the user. -- `admin`: Whether this user should be a global instance admin. + +Whether this user should be a global instance admin. + +##### Returns +A `User` object. +## method User.delete_api_key -### method User.delete_api_key() +Delete a user's API key. + +Only the owner of the key or an admin can delete it. ```python self, api_key: 'str' ``` -Delete a user's API key. - -Only the owner of the key or an admin can delete it. - ##### Arguments -- `api_key`: The name of the API key to delete. Use one of the names returned by the `api_keys` property. + +The name of the API key to delete. Use one of the names returned by the `api_keys` property. + +##### Returns +True on success, false on failure. +## method User.generate_api_key -### method User.generate_api_key() +Generate a new API key. ```python self, description: 'str | None' = None ``` -Generate a new API key. - ##### Arguments -- `description`: A description for the new API key. This can be used to identify the purpose of the API key. - - - + +A description for the new API key. This can be used to identify the purpose of the API key. + +##### Returns +The generated API key (the full secret, not just the name), or None on failure. diff --git a/models/ref/python/public-api/user/user-properties.mdx b/models/ref/python/public-api/user/user-properties.mdx index 8ecc7f20e3..a24a6cc2e9 100644 --- a/models/ref/python/public-api/user/user-properties.mdx +++ b/models/ref/python/public-api/user/user-properties.mdx @@ -7,9 +7,7 @@ kind: class namespace: wandb.apis.public.users --- -## class wandb.apis.public.User - - +## Class wandb.apis.public.User ### property api_keys @@ -33,5 +31,3 @@ data was not loaded. A `wandb.Api` instance using the user's credentials. - - diff --git a/snippets/_includes/github-source-link.mdx b/snippets/_includes/github-source-link.mdx index 866aaec570..21eea76ad0 100644 --- a/snippets/_includes/github-source-link.mdx +++ b/snippets/_includes/github-source-link.mdx @@ -1,10 +1,14 @@ -export const GitHubLink = ({ url }) => ( +export const GitHubLink = ({ url, compact = false }) => ( + {compact ? ( + "View source" + ) : ( + <> ( GitHub source + + )} -); +); \ No newline at end of file From 845e0b8813b1ba92b508effdc7486ca0c75f119e Mon Sep 17 00:00:00 2001 From: Noah Luna <15202580+ngrayluna@users.noreply.github.com> Date: Mon, 3 Aug 2026 18:28:28 -0700 Subject: [PATCH 3/4] more formatting --- models/ref/python/automations/automation.mdx | 13 +- models/ref/python/automations/donothing.mdx | 11 +- .../python/automations/metricchangefilter.mdx | 19 +- .../automations/metricthresholdfilter.mdx | 17 +- .../python/automations/metriczscorefilter.mdx | 13 +- .../ref/python/automations/newautomation.mdx | 13 +- .../python/automations/onaddartifactalias.mdx | 13 +- .../python/automations/onaddartifacttag.mdx | 13 +- .../python/automations/onaddcollectiontag.mdx | 13 +- .../python/automations/oncreateartifact.mdx | 13 +- .../ref/python/automations/onlinkartifact.mdx | 13 +- .../automations/onremoveartifacttag.mdx | 13 +- .../automations/onremovecollectiontag.mdx | 13 +- models/ref/python/automations/onrunmetric.mdx | 13 +- models/ref/python/automations/onrunstate.mdx | 13 +- .../python/automations/onunlinkartifact.mdx | 13 +- .../ref/python/automations/runstatefilter.mdx | 11 +- .../python/automations/sendnotification.mdx | 13 +- .../sendnotification-methods.mdx | 2 +- models/ref/python/automations/sendwebhook.mdx | 13 +- .../sendwebhook/sendwebhook-methods.mdx | 2 +- models/ref/python/data-types/audio.mdx | 11 +- .../python/data-types/audio/audio-methods.mdx | 4 +- models/ref/python/data-types/histogram.mdx | 11 +- models/ref/python/data-types/html.mdx | 11 +- models/ref/python/data-types/image.mdx | 13 +- models/ref/python/data-types/molecule.mdx | 9 +- .../data-types/molecule/molecule-methods.mdx | 4 +- models/ref/python/data-types/object3d.mdx | 9 +- .../data-types/object3d/object3d-methods.mdx | 6 +- models/ref/python/data-types/plotly.mdx | 7 +- models/ref/python/data-types/table.mdx | 21 +-- .../python/data-types/table/table-methods.mdx | 18 +- models/ref/python/data-types/video.mdx | 13 +- models/ref/python/experiments/artifact.mdx | 17 +- .../experiments/artifact/artifact-methods.mdx | 163 ++++++++++++------ models/ref/python/experiments/run.mdx | 3 +- .../python/experiments/run/run-methods.mdx | 83 +++++---- models/ref/python/experiments/settings.mdx | 79 ++++----- .../experiments/settings/settings-methods.mdx | 6 +- models/ref/python/public-api/api.mdx | 11 +- .../ref/python/public-api/api/api-methods.mdx | 114 ++++++------ .../python/public-api/artifactcollection.mdx | 3 +- .../artifactcollection-methods.mdx | 10 +- .../python/public-api/artifactcollections.mdx | 3 +- .../artifactcollections-methods.mdx | 6 +- .../ref/python/public-api/artifactfiles.mdx | 3 +- .../artifactfiles/artifactfiles-methods.mdx | 6 +- models/ref/python/public-api/artifacts.mdx | 3 +- .../artifacts/artifacts-methods.mdx | 4 +- models/ref/python/public-api/artifacttype.mdx | 3 +- .../artifacttype/artifacttype-methods.mdx | 4 +- .../ref/python/public-api/artifacttypes.mdx | 3 +- .../artifacttypes/artifacttypes-methods.mdx | 6 +- models/ref/python/public-api/betareport.mdx | 13 +- .../betareport/betareport-methods.mdx | 4 +- .../public-api/downloadhistoryresult.mdx | 11 +- models/ref/python/public-api/file.mdx | 3 +- .../python/public-api/file/file-methods.mdx | 4 +- models/ref/python/public-api/files.mdx | 17 +- .../python/public-api/files/files-methods.mdx | 2 +- .../public-api/incompleterunhistoryerror.mdx | 3 +- .../incompleterunhistoryerror-methods.mdx | 4 +- models/ref/python/public-api/member.mdx | 11 +- .../public-api/member/member-methods.mdx | 2 +- models/ref/python/public-api/organization.mdx | 13 +- models/ref/python/public-api/project.mdx | 13 +- .../public-api/project/project-methods.mdx | 6 +- .../public-api/projectartifactcollections.mdx | 3 +- .../projectartifactcollections-methods.mdx | 6 +- models/ref/python/public-api/projects.mdx | 11 +- .../public-api/projects/projects-methods.mdx | 6 +- models/ref/python/public-api/registry.mdx | 13 +- .../public-api/registry/registry-methods.mdx | 50 ++++-- models/ref/python/public-api/reports.mdx | 13 +- .../public-api/reports/reports-methods.mdx | 6 +- models/ref/python/public-api/run.mdx | 13 +- .../ref/python/public-api/run/run-methods.mdx | 63 ++++--- models/ref/python/public-api/runartifacts.mdx | 3 +- .../runartifacts/runartifacts-methods.mdx | 6 +- models/ref/python/public-api/runs.mdx | 21 +-- .../python/public-api/runs/runs-methods.mdx | 8 +- models/ref/python/public-api/sweep.mdx | 13 +- .../python/public-api/sweep/sweep-methods.mdx | 10 +- models/ref/python/public-api/sweeps.mdx | 13 +- .../public-api/sweeps/sweeps-methods.mdx | 4 +- models/ref/python/public-api/team.mdx | 11 +- .../python/public-api/team/team-methods.mdx | 6 +- models/ref/python/public-api/user.mdx | 3 +- .../python/public-api/user/user-methods.mdx | 6 +- 90 files changed, 744 insertions(+), 574 deletions(-) diff --git a/models/ref/python/automations/automation.mdx b/models/ref/python/automations/automation.mdx index b906668e92..c25ba020ea 100644 --- a/models/ref/python/automations/automation.mdx +++ b/models/ref/python/automations/automation.mdx @@ -12,6 +12,13 @@ import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; ## Class wandb.automations.Automation + + + +A local instance of a saved W&B automation that supports editing. + + + ```python *, __typename: Literal['Trigger'] = 'Trigger', @@ -26,12 +33,6 @@ 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=, json_schema_input_type=PydanticUndefined)] ``` - - -A local instance of a saved W&B automation that supports editing. - - - ## Args diff --git a/models/ref/python/automations/donothing.mdx b/models/ref/python/automations/donothing.mdx index 641ea3eddb..5156cb243b 100644 --- a/models/ref/python/automations/donothing.mdx +++ b/models/ref/python/automations/donothing.mdx @@ -12,11 +12,6 @@ import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; ## Class wandb.automations.DoNothing -```python -*, -no_op: Annotated[bool, BeforeValidator(func=, json_schema_input_type=PydanticUndefined)] = True, -action_type: Literal[NO_OP] = NO_OP -``` @@ -24,6 +19,12 @@ Defines an automation action that intentionally does nothing. +```python +*, +no_op: Annotated[bool, BeforeValidator(func=, json_schema_input_type=PydanticUndefined)] = True, +action_type: Literal[NO_OP] = NO_OP +``` + ## Args diff --git a/models/ref/python/automations/metricchangefilter.mdx b/models/ref/python/automations/metricchangefilter.mdx index 05674df2c1..bb82c4e83d 100644 --- a/models/ref/python/automations/metricchangefilter.mdx +++ b/models/ref/python/automations/metricchangefilter.mdx @@ -12,6 +12,16 @@ import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; ## Class 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. + + + ```python *, name: str, @@ -24,15 +34,6 @@ change_type: wandb.automations._filters.run_metrics.ChangeType, change_dir: wandb.automations._filters.run_metrics.ChangeDir ``` - - -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. - - - ## Args diff --git a/models/ref/python/automations/metricthresholdfilter.mdx b/models/ref/python/automations/metricthresholdfilter.mdx index 37eab577fb..fa405320fc 100644 --- a/models/ref/python/automations/metricthresholdfilter.mdx +++ b/models/ref/python/automations/metricthresholdfilter.mdx @@ -12,14 +12,6 @@ import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; ## Class wandb.automations.MetricThresholdFilter -```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)]] -``` @@ -30,6 +22,15 @@ 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 diff --git a/models/ref/python/automations/metriczscorefilter.mdx b/models/ref/python/automations/metriczscorefilter.mdx index 06fc0cef02..24ae47c0d3 100644 --- a/models/ref/python/automations/metriczscorefilter.mdx +++ b/models/ref/python/automations/metriczscorefilter.mdx @@ -12,6 +12,13 @@ import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; ## Class wandb.automations.MetricZScoreFilter + + + +Filter that compares a metric's z-score against a user-defined threshold. + + + ```python *, name: str, @@ -20,12 +27,6 @@ threshold: Union[Annotated[int, Gt(gt=0)], Annotated[float, Gt(gt=0)]] = 3.0, change_dir: wandb.automations._filters.run_metrics.ChangeDir = ANY ``` - - -Filter that compares a metric's z-score against a user-defined threshold. - - - ## Args diff --git a/models/ref/python/automations/newautomation.mdx b/models/ref/python/automations/newautomation.mdx index b6124ead54..8a65e85341 100644 --- a/models/ref/python/automations/newautomation.mdx +++ b/models/ref/python/automations/newautomation.mdx @@ -12,6 +12,13 @@ import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; ## Class wandb.automations.NewAutomation + + + +A new automation to be created. + + + ```python *, name: str | None = None, @@ -21,12 +28,6 @@ event: Optional[Annotated[wandb.automations.events.OnLinkArtifact | wandb.automa action: Optional[Annotated[wandb.automations.actions.SendNotification | wandb.automations.actions.SendWebhook | wandb.automations.actions.DoNothing, BeforeValidator(func=, json_schema_input_type=PydanticUndefined), FieldInfo(annotation=NoneType, required=True, discriminator='action_type')]] = None ``` - - -A new automation to be created. - - - ## Args diff --git a/models/ref/python/automations/onaddartifactalias.mdx b/models/ref/python/automations/onaddartifactalias.mdx index 3853ff3692..51f10cdf51 100644 --- a/models/ref/python/automations/onaddartifactalias.mdx +++ b/models/ref/python/automations/onaddartifactalias.mdx @@ -12,12 +12,6 @@ import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; ## Class wandb.automations.OnAddArtifactAlias -```python -*, -event_type: Literal[ADD_ARTIFACT_ALIAS] = ADD_ARTIFACT_ALIAS, -scope: Annotated[wandb.automations.scopes._ArtifactSequenceScope | wandb.automations.scopes._ArtifactPortfolioScope | wandb.automations.scopes.ProjectScope, BeforeValidator(func=, json_schema_input_type=PydanticUndefined)], -filter: Annotated[wandb.automations._filters.operators.And | wandb.automations._filters.operators.Or | wandb.automations._filters.operators.Nor | wandb.automations._filters.operators.Not | wandb.automations._filters.operators.Lt | wandb.automations._filters.operators.Gt | wandb.automations._filters.operators.Lte | wandb.automations._filters.operators.Gte | wandb.automations._filters.operators.Eq | wandb.automations._filters.operators.Ne | wandb.automations._filters.operators.In | wandb.automations._filters.operators.NotIn | wandb.automations._filters.operators.Exists | wandb.automations._filters.operators.Regex | wandb.automations._filters.operators.Contains | wandb.automations._filters.expressions.FilterExpr | dict[str, Any], Json, BeforeValidator(func=, json_schema_input_type=PydanticUndefined), PlainSerializer(func=, return_type=PydanticUndefined, when_used='always'), AfterValidator(func=)] = And(()) -``` @@ -25,6 +19,13 @@ A new alias is assigned to an artifact. +```python +*, +event_type: Literal[ADD_ARTIFACT_ALIAS] = ADD_ARTIFACT_ALIAS, +scope: Annotated[wandb.automations.scopes._ArtifactSequenceScope | wandb.automations.scopes._ArtifactPortfolioScope | wandb.automations.scopes.ProjectScope, BeforeValidator(func=, json_schema_input_type=PydanticUndefined)], +filter: Annotated[wandb.automations._filters.operators.And | wandb.automations._filters.operators.Or | wandb.automations._filters.operators.Nor | wandb.automations._filters.operators.Not | wandb.automations._filters.operators.Lt | wandb.automations._filters.operators.Gt | wandb.automations._filters.operators.Lte | wandb.automations._filters.operators.Gte | wandb.automations._filters.operators.Eq | wandb.automations._filters.operators.Ne | wandb.automations._filters.operators.In | wandb.automations._filters.operators.NotIn | wandb.automations._filters.operators.Exists | wandb.automations._filters.operators.Regex | wandb.automations._filters.operators.Contains | wandb.automations._filters.expressions.FilterExpr | dict[str, Any], Json, BeforeValidator(func=, json_schema_input_type=PydanticUndefined), PlainSerializer(func=, return_type=PydanticUndefined, when_used='always'), AfterValidator(func=)] = And(()) +``` + ## Args diff --git a/models/ref/python/automations/onaddartifacttag.mdx b/models/ref/python/automations/onaddartifacttag.mdx index f1f264baa9..a7debf9086 100644 --- a/models/ref/python/automations/onaddartifacttag.mdx +++ b/models/ref/python/automations/onaddartifacttag.mdx @@ -12,12 +12,6 @@ import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; ## Class wandb.automations.OnAddArtifactTag -```python -*, -event_type: Literal[ADD_ARTIFACT_TAG] = ADD_ARTIFACT_TAG, -scope: Annotated[wandb.automations.scopes._ArtifactSequenceScope | wandb.automations.scopes._ArtifactPortfolioScope | wandb.automations.scopes.ProjectScope, BeforeValidator(func=, json_schema_input_type=PydanticUndefined)], -filter: Annotated[wandb.automations._filters.operators.And | wandb.automations._filters.operators.Or | wandb.automations._filters.operators.Nor | wandb.automations._filters.operators.Not | wandb.automations._filters.operators.Lt | wandb.automations._filters.operators.Gt | wandb.automations._filters.operators.Lte | wandb.automations._filters.operators.Gte | wandb.automations._filters.operators.Eq | wandb.automations._filters.operators.Ne | wandb.automations._filters.operators.In | wandb.automations._filters.operators.NotIn | wandb.automations._filters.operators.Exists | wandb.automations._filters.operators.Regex | wandb.automations._filters.operators.Contains | wandb.automations._filters.expressions.FilterExpr | dict[str, Any], Json, BeforeValidator(func=, json_schema_input_type=PydanticUndefined), PlainSerializer(func=, return_type=PydanticUndefined, when_used='always'), AfterValidator(func=)] = And(()) -``` @@ -25,6 +19,13 @@ A new tag is assigned to an artifact version. +```python +*, +event_type: Literal[ADD_ARTIFACT_TAG] = ADD_ARTIFACT_TAG, +scope: Annotated[wandb.automations.scopes._ArtifactSequenceScope | wandb.automations.scopes._ArtifactPortfolioScope | wandb.automations.scopes.ProjectScope, BeforeValidator(func=, json_schema_input_type=PydanticUndefined)], +filter: Annotated[wandb.automations._filters.operators.And | wandb.automations._filters.operators.Or | wandb.automations._filters.operators.Nor | wandb.automations._filters.operators.Not | wandb.automations._filters.operators.Lt | wandb.automations._filters.operators.Gt | wandb.automations._filters.operators.Lte | wandb.automations._filters.operators.Gte | wandb.automations._filters.operators.Eq | wandb.automations._filters.operators.Ne | wandb.automations._filters.operators.In | wandb.automations._filters.operators.NotIn | wandb.automations._filters.operators.Exists | wandb.automations._filters.operators.Regex | wandb.automations._filters.operators.Contains | wandb.automations._filters.expressions.FilterExpr | dict[str, Any], Json, BeforeValidator(func=, json_schema_input_type=PydanticUndefined), PlainSerializer(func=, return_type=PydanticUndefined, when_used='always'), AfterValidator(func=)] = And(()) +``` + ## Args diff --git a/models/ref/python/automations/onaddcollectiontag.mdx b/models/ref/python/automations/onaddcollectiontag.mdx index ddc40721f6..52d08d6bd9 100644 --- a/models/ref/python/automations/onaddcollectiontag.mdx +++ b/models/ref/python/automations/onaddcollectiontag.mdx @@ -12,12 +12,6 @@ import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; ## Class wandb.automations.OnAddCollectionTag -```python -*, -event_type: Literal[ADD_COLLECTION_TAG] = ADD_COLLECTION_TAG, -scope: Annotated[wandb.automations.scopes._ArtifactSequenceScope | wandb.automations.scopes._ArtifactPortfolioScope | wandb.automations.scopes.ProjectScope, BeforeValidator(func=, json_schema_input_type=PydanticUndefined)], -filter: Annotated[wandb.automations._filters.operators.And | wandb.automations._filters.operators.Or | wandb.automations._filters.operators.Nor | wandb.automations._filters.operators.Not | wandb.automations._filters.operators.Lt | wandb.automations._filters.operators.Gt | wandb.automations._filters.operators.Lte | wandb.automations._filters.operators.Gte | wandb.automations._filters.operators.Eq | wandb.automations._filters.operators.Ne | wandb.automations._filters.operators.In | wandb.automations._filters.operators.NotIn | wandb.automations._filters.operators.Exists | wandb.automations._filters.operators.Regex | wandb.automations._filters.operators.Contains | wandb.automations._filters.expressions.FilterExpr | dict[str, Any], Json, BeforeValidator(func=, json_schema_input_type=PydanticUndefined), PlainSerializer(func=, return_type=PydanticUndefined, when_used='always'), AfterValidator(func=)] = And(()) -``` @@ -25,6 +19,13 @@ A new tag is assigned to an artifact collection. +```python +*, +event_type: Literal[ADD_COLLECTION_TAG] = ADD_COLLECTION_TAG, +scope: Annotated[wandb.automations.scopes._ArtifactSequenceScope | wandb.automations.scopes._ArtifactPortfolioScope | wandb.automations.scopes.ProjectScope, BeforeValidator(func=, json_schema_input_type=PydanticUndefined)], +filter: Annotated[wandb.automations._filters.operators.And | wandb.automations._filters.operators.Or | wandb.automations._filters.operators.Nor | wandb.automations._filters.operators.Not | wandb.automations._filters.operators.Lt | wandb.automations._filters.operators.Gt | wandb.automations._filters.operators.Lte | wandb.automations._filters.operators.Gte | wandb.automations._filters.operators.Eq | wandb.automations._filters.operators.Ne | wandb.automations._filters.operators.In | wandb.automations._filters.operators.NotIn | wandb.automations._filters.operators.Exists | wandb.automations._filters.operators.Regex | wandb.automations._filters.operators.Contains | wandb.automations._filters.expressions.FilterExpr | dict[str, Any], Json, BeforeValidator(func=, json_schema_input_type=PydanticUndefined), PlainSerializer(func=, return_type=PydanticUndefined, when_used='always'), AfterValidator(func=)] = And(()) +``` + ## Args diff --git a/models/ref/python/automations/oncreateartifact.mdx b/models/ref/python/automations/oncreateartifact.mdx index a8c8b60009..638c682550 100644 --- a/models/ref/python/automations/oncreateartifact.mdx +++ b/models/ref/python/automations/oncreateartifact.mdx @@ -12,12 +12,6 @@ import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; ## Class wandb.automations.OnCreateArtifact -```python -*, -event_type: Literal[CREATE_ARTIFACT] = CREATE_ARTIFACT, -scope: Annotated[wandb.automations.scopes._ArtifactSequenceScope | wandb.automations.scopes._ArtifactPortfolioScope, BeforeValidator(func=, json_schema_input_type=PydanticUndefined)], -filter: Annotated[wandb.automations._filters.operators.And | wandb.automations._filters.operators.Or | wandb.automations._filters.operators.Nor | wandb.automations._filters.operators.Not | wandb.automations._filters.operators.Lt | wandb.automations._filters.operators.Gt | wandb.automations._filters.operators.Lte | wandb.automations._filters.operators.Gte | wandb.automations._filters.operators.Eq | wandb.automations._filters.operators.Ne | wandb.automations._filters.operators.In | wandb.automations._filters.operators.NotIn | wandb.automations._filters.operators.Exists | wandb.automations._filters.operators.Regex | wandb.automations._filters.operators.Contains | wandb.automations._filters.expressions.FilterExpr | dict[str, Any], Json, BeforeValidator(func=, json_schema_input_type=PydanticUndefined), PlainSerializer(func=, return_type=PydanticUndefined, when_used='always'), AfterValidator(func=)] = And(()) -``` @@ -25,6 +19,13 @@ A new artifact is created. +```python +*, +event_type: Literal[CREATE_ARTIFACT] = CREATE_ARTIFACT, +scope: Annotated[wandb.automations.scopes._ArtifactSequenceScope | wandb.automations.scopes._ArtifactPortfolioScope, BeforeValidator(func=, json_schema_input_type=PydanticUndefined)], +filter: Annotated[wandb.automations._filters.operators.And | wandb.automations._filters.operators.Or | wandb.automations._filters.operators.Nor | wandb.automations._filters.operators.Not | wandb.automations._filters.operators.Lt | wandb.automations._filters.operators.Gt | wandb.automations._filters.operators.Lte | wandb.automations._filters.operators.Gte | wandb.automations._filters.operators.Eq | wandb.automations._filters.operators.Ne | wandb.automations._filters.operators.In | wandb.automations._filters.operators.NotIn | wandb.automations._filters.operators.Exists | wandb.automations._filters.operators.Regex | wandb.automations._filters.operators.Contains | wandb.automations._filters.expressions.FilterExpr | dict[str, Any], Json, BeforeValidator(func=, json_schema_input_type=PydanticUndefined), PlainSerializer(func=, return_type=PydanticUndefined, when_used='always'), AfterValidator(func=)] = And(()) +``` + ## Args diff --git a/models/ref/python/automations/onlinkartifact.mdx b/models/ref/python/automations/onlinkartifact.mdx index 4d73829ca6..b1ecbdfa02 100644 --- a/models/ref/python/automations/onlinkartifact.mdx +++ b/models/ref/python/automations/onlinkartifact.mdx @@ -12,12 +12,6 @@ import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; ## Class wandb.automations.OnLinkArtifact -```python -*, -event_type: Literal[LINK_ARTIFACT] = LINK_ARTIFACT, -scope: Annotated[wandb.automations.scopes._ArtifactSequenceScope | wandb.automations.scopes._ArtifactPortfolioScope | wandb.automations.scopes.ProjectScope, BeforeValidator(func=, json_schema_input_type=PydanticUndefined)], -filter: Annotated[wandb.automations._filters.operators.And | wandb.automations._filters.operators.Or | wandb.automations._filters.operators.Nor | wandb.automations._filters.operators.Not | wandb.automations._filters.operators.Lt | wandb.automations._filters.operators.Gt | wandb.automations._filters.operators.Lte | wandb.automations._filters.operators.Gte | wandb.automations._filters.operators.Eq | wandb.automations._filters.operators.Ne | wandb.automations._filters.operators.In | wandb.automations._filters.operators.NotIn | wandb.automations._filters.operators.Exists | wandb.automations._filters.operators.Regex | wandb.automations._filters.operators.Contains | wandb.automations._filters.expressions.FilterExpr | dict[str, Any], Json, BeforeValidator(func=, json_schema_input_type=PydanticUndefined), PlainSerializer(func=, return_type=PydanticUndefined, when_used='always'), AfterValidator(func=)] = And(()) -``` @@ -25,6 +19,13 @@ A new artifact is linked to a collection. +```python +*, +event_type: Literal[LINK_ARTIFACT] = LINK_ARTIFACT, +scope: Annotated[wandb.automations.scopes._ArtifactSequenceScope | wandb.automations.scopes._ArtifactPortfolioScope | wandb.automations.scopes.ProjectScope, BeforeValidator(func=, json_schema_input_type=PydanticUndefined)], +filter: Annotated[wandb.automations._filters.operators.And | wandb.automations._filters.operators.Or | wandb.automations._filters.operators.Nor | wandb.automations._filters.operators.Not | wandb.automations._filters.operators.Lt | wandb.automations._filters.operators.Gt | wandb.automations._filters.operators.Lte | wandb.automations._filters.operators.Gte | wandb.automations._filters.operators.Eq | wandb.automations._filters.operators.Ne | wandb.automations._filters.operators.In | wandb.automations._filters.operators.NotIn | wandb.automations._filters.operators.Exists | wandb.automations._filters.operators.Regex | wandb.automations._filters.operators.Contains | wandb.automations._filters.expressions.FilterExpr | dict[str, Any], Json, BeforeValidator(func=, json_schema_input_type=PydanticUndefined), PlainSerializer(func=, return_type=PydanticUndefined, when_used='always'), AfterValidator(func=)] = And(()) +``` + ## Args diff --git a/models/ref/python/automations/onremoveartifacttag.mdx b/models/ref/python/automations/onremoveartifacttag.mdx index 6b557bcac4..19bd765cc6 100644 --- a/models/ref/python/automations/onremoveartifacttag.mdx +++ b/models/ref/python/automations/onremoveartifacttag.mdx @@ -12,12 +12,6 @@ import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; ## Class wandb.automations.OnRemoveArtifactTag -```python -*, -event_type: Literal[REMOVE_ARTIFACT_TAG] = REMOVE_ARTIFACT_TAG, -scope: Annotated[wandb.automations.scopes._ArtifactSequenceScope | wandb.automations.scopes._ArtifactPortfolioScope | wandb.automations.scopes.ProjectScope, BeforeValidator(func=, json_schema_input_type=PydanticUndefined)], -filter: Annotated[wandb.automations._filters.operators.And | wandb.automations._filters.operators.Or | wandb.automations._filters.operators.Nor | wandb.automations._filters.operators.Not | wandb.automations._filters.operators.Lt | wandb.automations._filters.operators.Gt | wandb.automations._filters.operators.Lte | wandb.automations._filters.operators.Gte | wandb.automations._filters.operators.Eq | wandb.automations._filters.operators.Ne | wandb.automations._filters.operators.In | wandb.automations._filters.operators.NotIn | wandb.automations._filters.operators.Exists | wandb.automations._filters.operators.Regex | wandb.automations._filters.operators.Contains | wandb.automations._filters.expressions.FilterExpr | dict[str, Any], Json, BeforeValidator(func=, json_schema_input_type=PydanticUndefined), PlainSerializer(func=, return_type=PydanticUndefined, when_used='always'), AfterValidator(func=)] = And(()) -``` @@ -25,6 +19,13 @@ A tag is removed from an artifact version. +```python +*, +event_type: Literal[REMOVE_ARTIFACT_TAG] = REMOVE_ARTIFACT_TAG, +scope: Annotated[wandb.automations.scopes._ArtifactSequenceScope | wandb.automations.scopes._ArtifactPortfolioScope | wandb.automations.scopes.ProjectScope, BeforeValidator(func=, json_schema_input_type=PydanticUndefined)], +filter: Annotated[wandb.automations._filters.operators.And | wandb.automations._filters.operators.Or | wandb.automations._filters.operators.Nor | wandb.automations._filters.operators.Not | wandb.automations._filters.operators.Lt | wandb.automations._filters.operators.Gt | wandb.automations._filters.operators.Lte | wandb.automations._filters.operators.Gte | wandb.automations._filters.operators.Eq | wandb.automations._filters.operators.Ne | wandb.automations._filters.operators.In | wandb.automations._filters.operators.NotIn | wandb.automations._filters.operators.Exists | wandb.automations._filters.operators.Regex | wandb.automations._filters.operators.Contains | wandb.automations._filters.expressions.FilterExpr | dict[str, Any], Json, BeforeValidator(func=, json_schema_input_type=PydanticUndefined), PlainSerializer(func=, return_type=PydanticUndefined, when_used='always'), AfterValidator(func=)] = And(()) +``` + ## Args diff --git a/models/ref/python/automations/onremovecollectiontag.mdx b/models/ref/python/automations/onremovecollectiontag.mdx index fb8d0c0240..78fbeecd83 100644 --- a/models/ref/python/automations/onremovecollectiontag.mdx +++ b/models/ref/python/automations/onremovecollectiontag.mdx @@ -12,12 +12,6 @@ import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; ## Class wandb.automations.OnRemoveCollectionTag -```python -*, -event_type: Literal[REMOVE_COLLECTION_TAG] = REMOVE_COLLECTION_TAG, -scope: Annotated[wandb.automations.scopes._ArtifactSequenceScope | wandb.automations.scopes._ArtifactPortfolioScope | wandb.automations.scopes.ProjectScope, BeforeValidator(func=, json_schema_input_type=PydanticUndefined)], -filter: Annotated[wandb.automations._filters.operators.And | wandb.automations._filters.operators.Or | wandb.automations._filters.operators.Nor | wandb.automations._filters.operators.Not | wandb.automations._filters.operators.Lt | wandb.automations._filters.operators.Gt | wandb.automations._filters.operators.Lte | wandb.automations._filters.operators.Gte | wandb.automations._filters.operators.Eq | wandb.automations._filters.operators.Ne | wandb.automations._filters.operators.In | wandb.automations._filters.operators.NotIn | wandb.automations._filters.operators.Exists | wandb.automations._filters.operators.Regex | wandb.automations._filters.operators.Contains | wandb.automations._filters.expressions.FilterExpr | dict[str, Any], Json, BeforeValidator(func=, json_schema_input_type=PydanticUndefined), PlainSerializer(func=, return_type=PydanticUndefined, when_used='always'), AfterValidator(func=)] = And(()) -``` @@ -25,6 +19,13 @@ A tag is removed from an artifact collection. +```python +*, +event_type: Literal[REMOVE_COLLECTION_TAG] = REMOVE_COLLECTION_TAG, +scope: Annotated[wandb.automations.scopes._ArtifactSequenceScope | wandb.automations.scopes._ArtifactPortfolioScope | wandb.automations.scopes.ProjectScope, BeforeValidator(func=, json_schema_input_type=PydanticUndefined)], +filter: Annotated[wandb.automations._filters.operators.And | wandb.automations._filters.operators.Or | wandb.automations._filters.operators.Nor | wandb.automations._filters.operators.Not | wandb.automations._filters.operators.Lt | wandb.automations._filters.operators.Gt | wandb.automations._filters.operators.Lte | wandb.automations._filters.operators.Gte | wandb.automations._filters.operators.Eq | wandb.automations._filters.operators.Ne | wandb.automations._filters.operators.In | wandb.automations._filters.operators.NotIn | wandb.automations._filters.operators.Exists | wandb.automations._filters.operators.Regex | wandb.automations._filters.operators.Contains | wandb.automations._filters.expressions.FilterExpr | dict[str, Any], Json, BeforeValidator(func=, json_schema_input_type=PydanticUndefined), PlainSerializer(func=, return_type=PydanticUndefined, when_used='always'), AfterValidator(func=)] = And(()) +``` + ## Args diff --git a/models/ref/python/automations/onrunmetric.mdx b/models/ref/python/automations/onrunmetric.mdx index 5bd573c82a..ced9e46a64 100644 --- a/models/ref/python/automations/onrunmetric.mdx +++ b/models/ref/python/automations/onrunmetric.mdx @@ -12,12 +12,6 @@ import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; ## Class wandb.automations.OnRunMetric -```python -*, -event_type: Literal[RUN_METRIC_THRESHOLD, RUN_METRIC_CHANGE, RUN_METRIC_ZSCORE], -scope: wandb.automations.scopes.ProjectScope, -filter: Annotated[wandb.automations.events.RunMetricFilter, Json, BeforeValidator(func=, json_schema_input_type=PydanticUndefined), PlainSerializer(func=, return_type=PydanticUndefined, when_used='always')] -``` @@ -25,6 +19,13 @@ A run metric satisfies a user-defined condition. +```python +*, +event_type: Literal[RUN_METRIC_THRESHOLD, RUN_METRIC_CHANGE, RUN_METRIC_ZSCORE], +scope: wandb.automations.scopes.ProjectScope, +filter: Annotated[wandb.automations.events.RunMetricFilter, Json, BeforeValidator(func=, json_schema_input_type=PydanticUndefined), PlainSerializer(func=, return_type=PydanticUndefined, when_used='always')] +``` + ## Args diff --git a/models/ref/python/automations/onrunstate.mdx b/models/ref/python/automations/onrunstate.mdx index 523e1aa9d1..f9a0950efd 100644 --- a/models/ref/python/automations/onrunstate.mdx +++ b/models/ref/python/automations/onrunstate.mdx @@ -12,12 +12,6 @@ import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; ## Class wandb.automations.OnRunState -```python -*, -event_type: Literal[RUN_STATE] = RUN_STATE, -scope: wandb.automations.scopes.ProjectScope, -filter: Annotated[wandb.automations.events.RunStateFilter, Json, BeforeValidator(func=, json_schema_input_type=PydanticUndefined), PlainSerializer(func=, return_type=PydanticUndefined, when_used='always')] -``` @@ -25,6 +19,13 @@ A run state changes. +```python +*, +event_type: Literal[RUN_STATE] = RUN_STATE, +scope: wandb.automations.scopes.ProjectScope, +filter: Annotated[wandb.automations.events.RunStateFilter, Json, BeforeValidator(func=, json_schema_input_type=PydanticUndefined), PlainSerializer(func=, return_type=PydanticUndefined, when_used='always')] +``` + ## Args diff --git a/models/ref/python/automations/onunlinkartifact.mdx b/models/ref/python/automations/onunlinkartifact.mdx index 7551120b13..30f5ba382f 100644 --- a/models/ref/python/automations/onunlinkartifact.mdx +++ b/models/ref/python/automations/onunlinkartifact.mdx @@ -12,12 +12,6 @@ import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; ## Class wandb.automations.OnUnlinkArtifact -```python -*, -event_type: Literal[UNLINK_ARTIFACT] = UNLINK_ARTIFACT, -scope: Annotated[wandb.automations.scopes._ArtifactSequenceScope | wandb.automations.scopes._ArtifactPortfolioScope | wandb.automations.scopes.ProjectScope, BeforeValidator(func=, json_schema_input_type=PydanticUndefined)], -filter: Annotated[wandb.automations._filters.operators.And | wandb.automations._filters.operators.Or | wandb.automations._filters.operators.Nor | wandb.automations._filters.operators.Not | wandb.automations._filters.operators.Lt | wandb.automations._filters.operators.Gt | wandb.automations._filters.operators.Lte | wandb.automations._filters.operators.Gte | wandb.automations._filters.operators.Eq | wandb.automations._filters.operators.Ne | wandb.automations._filters.operators.In | wandb.automations._filters.operators.NotIn | wandb.automations._filters.operators.Exists | wandb.automations._filters.operators.Regex | wandb.automations._filters.operators.Contains | wandb.automations._filters.expressions.FilterExpr | dict[str, Any], Json, BeforeValidator(func=, json_schema_input_type=PydanticUndefined), PlainSerializer(func=, return_type=PydanticUndefined, when_used='always'), AfterValidator(func=)] = And(()) -``` @@ -25,6 +19,13 @@ An artifact version is unlinked from a collection. +```python +*, +event_type: Literal[UNLINK_ARTIFACT] = UNLINK_ARTIFACT, +scope: Annotated[wandb.automations.scopes._ArtifactSequenceScope | wandb.automations.scopes._ArtifactPortfolioScope | wandb.automations.scopes.ProjectScope, BeforeValidator(func=, json_schema_input_type=PydanticUndefined)], +filter: Annotated[wandb.automations._filters.operators.And | wandb.automations._filters.operators.Or | wandb.automations._filters.operators.Nor | wandb.automations._filters.operators.Not | wandb.automations._filters.operators.Lt | wandb.automations._filters.operators.Gt | wandb.automations._filters.operators.Lte | wandb.automations._filters.operators.Gte | wandb.automations._filters.operators.Eq | wandb.automations._filters.operators.Ne | wandb.automations._filters.operators.In | wandb.automations._filters.operators.NotIn | wandb.automations._filters.operators.Exists | wandb.automations._filters.operators.Regex | wandb.automations._filters.operators.Contains | wandb.automations._filters.expressions.FilterExpr | dict[str, Any], Json, BeforeValidator(func=, json_schema_input_type=PydanticUndefined), PlainSerializer(func=, return_type=PydanticUndefined, when_used='always'), AfterValidator(func=)] = And(()) +``` + ## Args diff --git a/models/ref/python/automations/runstatefilter.mdx b/models/ref/python/automations/runstatefilter.mdx index 9780ae1dda..71c6545ad5 100644 --- a/models/ref/python/automations/runstatefilter.mdx +++ b/models/ref/python/automations/runstatefilter.mdx @@ -12,11 +12,6 @@ import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; ## Class wandb.automations.RunStateFilter -```python -*, -run_filter: Annotated[wandb.automations._filters.operators.And | wandb.automations._filters.operators.Or | wandb.automations._filters.operators.Nor | wandb.automations._filters.operators.Not | wandb.automations._filters.operators.Lt | wandb.automations._filters.operators.Gt | wandb.automations._filters.operators.Lte | wandb.automations._filters.operators.Gte | wandb.automations._filters.operators.Eq | wandb.automations._filters.operators.Ne | wandb.automations._filters.operators.In | wandb.automations._filters.operators.NotIn | wandb.automations._filters.operators.Exists | wandb.automations._filters.operators.Regex | wandb.automations._filters.operators.Contains | wandb.automations._filters.expressions.FilterExpr | dict[str, Any], Json, BeforeValidator(func=, json_schema_input_type=PydanticUndefined), PlainSerializer(func=, return_type=PydanticUndefined, when_used='always'), AfterValidator(func=)] = And(()), -run_state_filter: wandb.automations._filters.run_states.StateFilter -``` @@ -24,6 +19,12 @@ Represents a filter for triggering events based on changes in run states. +```python +*, +run_filter: Annotated[wandb.automations._filters.operators.And | wandb.automations._filters.operators.Or | wandb.automations._filters.operators.Nor | wandb.automations._filters.operators.Not | wandb.automations._filters.operators.Lt | wandb.automations._filters.operators.Gt | wandb.automations._filters.operators.Lte | wandb.automations._filters.operators.Gte | wandb.automations._filters.operators.Eq | wandb.automations._filters.operators.Ne | wandb.automations._filters.operators.In | wandb.automations._filters.operators.NotIn | wandb.automations._filters.operators.Exists | wandb.automations._filters.operators.Regex | wandb.automations._filters.operators.Contains | wandb.automations._filters.expressions.FilterExpr | dict[str, Any], Json, BeforeValidator(func=, json_schema_input_type=PydanticUndefined), PlainSerializer(func=, return_type=PydanticUndefined, when_used='always'), AfterValidator(func=)] = And(()), +run_state_filter: wandb.automations._filters.run_states.StateFilter +``` + ## Args diff --git a/models/ref/python/automations/sendnotification.mdx b/models/ref/python/automations/sendnotification.mdx index 89b172752f..641464aa78 100644 --- a/models/ref/python/automations/sendnotification.mdx +++ b/models/ref/python/automations/sendnotification.mdx @@ -12,6 +12,13 @@ import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; ## Class wandb.automations.SendNotification + + + +Defines an automation action that sends a (Slack) notification. + + + ```python *, integration_id: Annotated[str, Strict(strict=True)], @@ -21,12 +28,6 @@ title: Annotated[str, BeforeValidator(func=, json_sche action_type: Literal[NOTIFICATION] = NOTIFICATION ``` - - -Defines an automation action that sends a (Slack) notification. - - - ## Args diff --git a/models/ref/python/automations/sendnotification/sendnotification-methods.mdx b/models/ref/python/automations/sendnotification/sendnotification-methods.mdx index 607092ccef..d66a166ff3 100644 --- a/models/ref/python/automations/sendnotification/sendnotification-methods.mdx +++ b/models/ref/python/automations/sendnotification/sendnotification-methods.mdx @@ -9,7 +9,7 @@ namespace: wandb.automations.actions ## Class wandb.automations.SendNotification -## method SendNotification.from_integration +## method SendNotification.from_integration() Define a notification action that sends to the given (Slack) integration. diff --git a/models/ref/python/automations/sendwebhook.mdx b/models/ref/python/automations/sendwebhook.mdx index e14deb75a0..2718bcd7ce 100644 --- a/models/ref/python/automations/sendwebhook.mdx +++ b/models/ref/python/automations/sendwebhook.mdx @@ -12,12 +12,6 @@ import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; ## Class wandb.automations.SendWebhook -```python -*, -integration_id: Annotated[str, Strict(strict=True)], -requestPayload: Optional[Annotated[dict[str, Any], Json, BeforeValidator(func=, json_schema_input_type=PydanticUndefined), PlainSerializer(func=, return_type=PydanticUndefined, when_used='always')]] = None, -action_type: Literal[GENERIC_WEBHOOK] = GENERIC_WEBHOOK -``` @@ -25,6 +19,13 @@ Defines an automation action that sends a webhook request. +```python +*, +integration_id: Annotated[str, Strict(strict=True)], +requestPayload: Optional[Annotated[dict[str, Any], Json, BeforeValidator(func=, json_schema_input_type=PydanticUndefined), PlainSerializer(func=, return_type=PydanticUndefined, when_used='always')]] = None, +action_type: Literal[GENERIC_WEBHOOK] = GENERIC_WEBHOOK +``` + ## Args diff --git a/models/ref/python/automations/sendwebhook/sendwebhook-methods.mdx b/models/ref/python/automations/sendwebhook/sendwebhook-methods.mdx index b96fc6a6f1..6b1d0dd0d3 100644 --- a/models/ref/python/automations/sendwebhook/sendwebhook-methods.mdx +++ b/models/ref/python/automations/sendwebhook/sendwebhook-methods.mdx @@ -9,7 +9,7 @@ namespace: wandb.automations.actions ## Class wandb.automations.SendWebhook -## method SendWebhook.from_integration +## method SendWebhook.from_integration() Define a webhook action that sends to the given (webhook) integration. diff --git a/models/ref/python/data-types/audio.mdx b/models/ref/python/data-types/audio.mdx index a3a467e613..b456220ad4 100644 --- a/models/ref/python/data-types/audio.mdx +++ b/models/ref/python/data-types/audio.mdx @@ -12,11 +12,6 @@ import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; ## Class wandb.Audio -```python -(data_or_path: 'str | pathlib.Path | list | np.ndarray', -sample_rate: 'int | None' = None, -caption: 'str | None' = None) -``` @@ -24,6 +19,12 @@ W&B class for audio clips. +```python +(data_or_path: 'str | pathlib.Path | list | np.ndarray', +sample_rate: 'int | None' = None, +caption: 'str | None' = None) +``` + ## Args diff --git a/models/ref/python/data-types/audio/audio-methods.mdx b/models/ref/python/data-types/audio/audio-methods.mdx index 37b8e226f0..717be86fb5 100644 --- a/models/ref/python/data-types/audio/audio-methods.mdx +++ b/models/ref/python/data-types/audio/audio-methods.mdx @@ -9,7 +9,7 @@ namespace: wandb.sdk.data_types.audio ## Class wandb.Audio -## method Audio.durations +## method Audio.durations() Calculate the duration of the audio files. @@ -23,7 +23,7 @@ Calculate the duration of the audio files. -## method Audio.sample_rates +## method Audio.sample_rates() Get sample rates of the audio files. diff --git a/models/ref/python/data-types/histogram.mdx b/models/ref/python/data-types/histogram.mdx index 44fba53998..f1940e68e4 100644 --- a/models/ref/python/data-types/histogram.mdx +++ b/models/ref/python/data-types/histogram.mdx @@ -12,11 +12,6 @@ import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; ## Class wandb.Histogram -```python -sequence: 'Sequence | None' = None, -np_histogram: 'NumpyHistogram | None' = None, -num_bins: 'int' = 64 -``` @@ -27,6 +22,12 @@ https://docs.scipy.org/doc/numpy/reference/generated/numpy.histogram.html +```python +sequence: 'Sequence | None' = None, +np_histogram: 'NumpyHistogram | None' = None, +num_bins: 'int' = 64 +``` + ## Args diff --git a/models/ref/python/data-types/html.mdx b/models/ref/python/data-types/html.mdx index 8c4f81a17d..f72feb0f76 100644 --- a/models/ref/python/data-types/html.mdx +++ b/models/ref/python/data-types/html.mdx @@ -12,11 +12,6 @@ import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; ## Class wandb.Html -```python -data: 'str | pathlib.Path | TextIO', -inject: 'bool' = True, -data_is_not_path: 'bool' = False -``` @@ -24,6 +19,12 @@ W&B class for logging HTML content to W&B. +```python +data: 'str | pathlib.Path | TextIO', +inject: 'bool' = True, +data_is_not_path: 'bool' = False +``` + ## Args diff --git a/models/ref/python/data-types/image.mdx b/models/ref/python/data-types/image.mdx index 76ede88282..81ae56a772 100644 --- a/models/ref/python/data-types/image.mdx +++ b/models/ref/python/data-types/image.mdx @@ -12,6 +12,13 @@ import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; ## Class wandb.Image + + + +A class for logging images to W&B. + + + ```python data_or_path: 'ImageDataOrPathType', mode: 'str | None' = None, @@ -24,12 +31,6 @@ file_type: 'str | None' = None, normalize: 'bool' = True ``` - - -A class for logging images to W&B. - - - ## Args diff --git a/models/ref/python/data-types/molecule.mdx b/models/ref/python/data-types/molecule.mdx index 16cef4de6f..0dc54fe6a9 100644 --- a/models/ref/python/data-types/molecule.mdx +++ b/models/ref/python/data-types/molecule.mdx @@ -12,10 +12,6 @@ import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; ## Class wandb.Molecule -```python -data_or_path: 'str | pathlib.Path | TextIO', -caption: 'str | None' = None, **kwargs: 'str' -``` @@ -23,6 +19,11 @@ W&B class for 3D Molecular data. +```python +data_or_path: 'str | pathlib.Path | TextIO', +caption: 'str | None' = None, **kwargs: 'str' +``` + ## Args diff --git a/models/ref/python/data-types/molecule/molecule-methods.mdx b/models/ref/python/data-types/molecule/molecule-methods.mdx index c87d4c8a5b..45bb7c8170 100644 --- a/models/ref/python/data-types/molecule/molecule-methods.mdx +++ b/models/ref/python/data-types/molecule/molecule-methods.mdx @@ -9,7 +9,7 @@ namespace: wandb.sdk.data_types.molecule ## Class wandb.Molecule -## method Molecule.from_rdkit +## method Molecule.from_rdkit() Convert RDKit-supported file/object types to wandb.Molecule. @@ -34,7 +34,7 @@ mmff_optimize_molecule_max_iterations: 'int' = 200 (bool) Convert to rdkit.Chem.rdchem.Mol with 3D coordinates. This is an expensive operation that may take a long time for complicated molecules. -## method Molecule.from_smiles +## method Molecule.from_smiles() Convert SMILES string to wandb.Molecule. diff --git a/models/ref/python/data-types/object3d.mdx b/models/ref/python/data-types/object3d.mdx index 8b602a631b..65b8cd58d5 100644 --- a/models/ref/python/data-types/object3d.mdx +++ b/models/ref/python/data-types/object3d.mdx @@ -12,10 +12,6 @@ import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; ## Class wandb.Object3D -```python -data_or_path: 'np.ndarray | str | pathlib.Path | TextIO | dict', -caption: 'str | None' = None, **kwargs: 'str | FileFormat3D | None' -``` @@ -23,6 +19,11 @@ W&B class for 3D point clouds. +```python +data_or_path: 'np.ndarray | str | pathlib.Path | TextIO | dict', +caption: 'str | None' = None, **kwargs: 'str | FileFormat3D | None' +``` + ## Args diff --git a/models/ref/python/data-types/object3d/object3d-methods.mdx b/models/ref/python/data-types/object3d/object3d-methods.mdx index a24e3d7ff9..acb87de8f9 100644 --- a/models/ref/python/data-types/object3d/object3d-methods.mdx +++ b/models/ref/python/data-types/object3d/object3d-methods.mdx @@ -9,7 +9,7 @@ namespace: wandb.sdk.data_types.object_3d ## Class wandb.Object3D -## method Object3D.from_file +## method Object3D.from_file() Initializes Object3D from a file or stream. @@ -24,7 +24,7 @@ file_type: 'FileFormat3D | None' = None A path to a file or a `TextIO` stream. -## method Object3D.from_numpy +## method Object3D.from_numpy() Initializes Object3D from a numpy array. @@ -32,7 +32,7 @@ Initializes Object3D from a numpy array. data: 'np.ndarray' ``` -## method Object3D.from_point_cloud +## method Object3D.from_point_cloud() Initializes Object3D from a python object. diff --git a/models/ref/python/data-types/plotly.mdx b/models/ref/python/data-types/plotly.mdx index fecfd0a221..39d36ee127 100644 --- a/models/ref/python/data-types/plotly.mdx +++ b/models/ref/python/data-types/plotly.mdx @@ -12,9 +12,6 @@ import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; ## Class wandb.Plotly -```python -(val: 'plotly.Figure | matplotlib.artist.Artist') -``` @@ -22,6 +19,10 @@ W&B class for Plotly plots. +```python +(val: 'plotly.Figure | matplotlib.artist.Artist') +``` + ## Args diff --git a/models/ref/python/data-types/table.mdx b/models/ref/python/data-types/table.mdx index 10bfa983ce..2f65c9c0eb 100644 --- a/models/ref/python/data-types/table.mdx +++ b/models/ref/python/data-types/table.mdx @@ -12,16 +12,6 @@ import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; ## Class wandb.Table -```python -columns: 'list[ColumnKey] | None' = None, -data: 'list[InputRow] | np.ndarray | pd.DataFrame | None' = None, -rows: 'list[InputRow] | None' = None, -dataframe: 'pd.DataFrame | None' = None, -dtype: 'Any' = None, -optional: 'bool | list[bool]' = True, -allow_mixed_types: 'bool' = False, -log_mode: 'LogMode | None' = 'IMMUTABLE' -``` @@ -37,6 +27,17 @@ https://docs.wandb.ai/models/tables +```python +columns: 'list[ColumnKey] | None' = None, +data: 'list[InputRow] | np.ndarray | pd.DataFrame | None' = None, +rows: 'list[InputRow] | None' = None, +dataframe: 'pd.DataFrame | None' = None, +dtype: 'Any' = None, +optional: 'bool | list[bool]' = True, +allow_mixed_types: 'bool' = False, +log_mode: 'LogMode | None' = 'IMMUTABLE' +``` + ## Args diff --git a/models/ref/python/data-types/table/table-methods.mdx b/models/ref/python/data-types/table/table-methods.mdx index 57b26bab0c..437ae44b88 100644 --- a/models/ref/python/data-types/table/table-methods.mdx +++ b/models/ref/python/data-types/table/table-methods.mdx @@ -9,7 +9,7 @@ namespace: wandb.sdk.data_types.table ## Class wandb.Table -## method Table.add_column +## method Table.add_column() Adds a column of data to the table. @@ -34,7 +34,7 @@ A column of homogeneous data. If null-like values are permitted. -## method Table.add_computed_columns +## method Table.add_computed_columns() Adds one or more computed columns based on existing data. @@ -52,12 +52,14 @@ A function which accepts an index and row dict, and returns a dict representing ##### Examples table = wandb.Table(columns=["x", "y"], data=[[3, 1], [4, 6]]) + table.add_computed_columns( + ) In the callback: - `ndx` is an integer representing the index of the row. - `row` is a dictionary keyed by existing columns. -## method Table.add_data +## method Table.add_data() Adds a new row of data to the table. @@ -76,7 +78,7 @@ self, *data: 'Any' -## method Table.add_row +## method Table.add_row() Deprecated. Use `Table.add_data` method instead. @@ -90,7 +92,7 @@ self, *row: 'Any' -## method Table.cast +## method Table.cast() Casts a column to a specific data type. @@ -119,7 +121,7 @@ The target dtype. If the column should allow Nones. -## method Table.get_column +## method Table.get_column() Retrieves a column from the table and optionally converts it to a NumPy object. @@ -139,7 +141,7 @@ The name of the column. "numpy" will convert the underlying data to a NumPy object. -## method Table.get_dataframe +## method Table.get_dataframe() Returns a `pandas.DataFrame` of the table. @@ -147,7 +149,7 @@ Returns a `pandas.DataFrame` of the table. self ``` -## method Table.get_index +## method Table.get_index() Returns an array of row indexes for use in other tables to create links. diff --git a/models/ref/python/data-types/video.mdx b/models/ref/python/data-types/video.mdx index c2bd38cc90..f1e05f115f 100644 --- a/models/ref/python/data-types/video.mdx +++ b/models/ref/python/data-types/video.mdx @@ -12,12 +12,6 @@ import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; ## Class wandb.Video -```python -(data_or_path: 'str | pathlib.Path | np.ndarray | TextIO | BytesIO', -caption: 'str | None' = None, -fps: 'int | None' = None, -format: "Literal['gif', 'mp4', 'webm', 'ogg'] | None" = None) -``` @@ -25,6 +19,13 @@ A class for logging videos to W&B. +```python +(data_or_path: 'str | pathlib.Path | np.ndarray | TextIO | BytesIO', +caption: 'str | None' = None, +fps: 'int | None' = None, +format: "Literal['gif', 'mp4', 'webm', 'ogg'] | None" = None) +``` + ## Args diff --git a/models/ref/python/experiments/artifact.mdx b/models/ref/python/experiments/artifact.mdx index e964bf4060..67be207f61 100644 --- a/models/ref/python/experiments/artifact.mdx +++ b/models/ref/python/experiments/artifact.mdx @@ -9,8 +9,12 @@ import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; + + ## Class wandb.Artifact + + Flexible and lightweight building block for dataset and model versioning. Construct an empty W&B Artifact. Populate an artifacts contents with methods that @@ -19,7 +23,6 @@ begin with `add`. Once the artifact has all the desired files, you can call - ```python name: 'str', type: 'str', @@ -30,17 +33,7 @@ use_as: 'str | None' = None, storage_region: 'str | None' = None ``` - - -{/* Flexible and lightweight building block for dataset and model versioning. - -Construct an empty W&B Artifact. Populate an artifacts contents with methods that -begin with `add`. Once the artifact has all the desired files, you can call -`run.log_artifact()` to log it. */} - - - -### Args +## Args 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. diff --git a/models/ref/python/experiments/artifact/artifact-methods.mdx b/models/ref/python/experiments/artifact/artifact-methods.mdx index 85200c27e8..7be57a09e7 100644 --- a/models/ref/python/experiments/artifact/artifact-methods.mdx +++ b/models/ref/python/experiments/artifact/artifact-methods.mdx @@ -9,7 +9,7 @@ namespace: wandb.sdk.artifacts.artifact ## Class wandb.Artifact -## method Artifact.add +## method Artifact.add() Add wandb.WBValue `obj` to the artifact. @@ -40,9 +40,11 @@ The added manifest entry ##### Raises -- `ArtifactFinalizedError`: You cannot make changes to the current artifact version because it is finalized. Log a new artifact version instead. + +You cannot make changes to the current artifact version because it is finalized. Log a new artifact version instead. + -## method Artifact.add_dir +## method Artifact.add_dir() Add a local directory to the artifact. @@ -83,10 +85,15 @@ If `False` (default), throws ValueError if a file was already added in a previou ##### Raises -- `ArtifactFinalizedError`: You cannot make changes to the current artifact version because it is finalized. Log a new artifact version instead. -- `ValueError`: Policy must be "mutable" or "immutable" + +You cannot make changes to the current artifact version because it is finalized. Log a new artifact version instead. + -## method Artifact.add_file + +Policy must be "mutable" or "immutable" + + +## method Artifact.add_file() Add a local file to the artifact. @@ -132,10 +139,15 @@ The added manifest entry. ##### Raises -- `ArtifactFinalizedError`: You cannot make changes to the current artifact version because it is finalized. Log a new artifact version instead. -- `ValueError`: Policy must be "mutable" or "immutable" + +You cannot make changes to the current artifact version because it is finalized. Log a new artifact version instead. + -## method Artifact.add_reference + +Policy must be "mutable" or "immutable" + + +## method Artifact.add_reference() Add a reference denoted by a URI to the artifact. @@ -194,9 +206,11 @@ The added manifest entries. ##### Raises -- `ArtifactFinalizedError`: You cannot make changes to the current artifact version because it is finalized. Log a new artifact version instead. + +You cannot make changes to the current artifact version because it is finalized. Log a new artifact version instead. + -## method Artifact.checkout +## method Artifact.checkout() Replace the specified root directory with the contents of the artifact. @@ -220,9 +234,11 @@ The path of the checked out contents. ##### Raises -- `ArtifactNotLoggedError`: If the artifact is not logged. + +If the artifact is not logged. + -## method Artifact.delete +## method Artifact.delete() Delete an artifact and its files. @@ -245,9 +261,11 @@ If set to `True`, delete all aliases associated with the artifact. If `False`, r ##### Raises -- `ArtifactNotLoggedError`: If the artifact is not logged. + +If the artifact is not logged. + -## method Artifact.download +## method Artifact.download() Download the contents of the artifact to the specified root directory. @@ -292,9 +310,11 @@ The path to the downloaded contents. ##### Raises -- `ArtifactNotLoggedError`: If the artifact is not logged. + +If the artifact is not logged. + -## method Artifact.file +## method Artifact.file() Download a single file artifact to the directory you specify with `root`. @@ -315,10 +335,15 @@ The full path of the downloaded file. ##### Raises -- `ArtifactNotLoggedError`: If the artifact is not logged. -- `ValueError`: If the artifact contains more than one file. + +If the artifact is not logged. + + + +If the artifact contains more than one file. + -## method Artifact.files +## method Artifact.files() Iterate over all files stored in this artifact. @@ -349,9 +374,11 @@ An iterator containing `File` objects. ##### Raises -- `ArtifactNotLoggedError`: If the artifact is not logged. + +If the artifact is not logged. + -## method Artifact.finalize +## method Artifact.finalize() Finalize the artifact version. @@ -364,7 +391,7 @@ when you log the artifact with `log_artifact`. self ``` -## method Artifact.get +## method Artifact.get() Get the WBValue object located at the artifact relative `name`. @@ -385,9 +412,11 @@ W&B object that can be logged with `run.log()` and visualized in the W&B UI. ##### Raises -- `ArtifactNotLoggedError`: if the artifact isn't logged or the run is offline. + +if the artifact isn't logged or the run is offline. + -## method Artifact.get_added_local_path_name +## method Artifact.get_added_local_path_name() Get the artifact relative name of a file added by a local filesystem path. @@ -406,7 +435,7 @@ The local path to resolve into an artifact relative name. The artifact relative name. -## method Artifact.get_entry +## method Artifact.get_entry() Get the entry with the given name. @@ -427,10 +456,15 @@ A `W&B` object. ##### Raises -- `ArtifactNotLoggedError`: if the artifact isn't logged or the run is offline. -- `KeyError`: if the artifact doesn't contain an entry with the given name. + +if the artifact isn't logged or the run is offline. + -## method Artifact.get_path + +if the artifact doesn't contain an entry with the given name. + + +## method Artifact.get_path() Deprecated. Use `get_entry(name)`. @@ -445,7 +479,7 @@ name: 'StrPath' -## method Artifact.is_draft +## method Artifact.is_draft() Check if artifact is not saved. @@ -457,7 +491,7 @@ self Boolean. `False` if artifact is saved. `True` if artifact is not saved. -## method Artifact.json_encode +## method Artifact.json_encode() Returns the artifact encoded to the JSON format. @@ -469,7 +503,7 @@ self A `dict` with `string` keys representing attributes of the artifact. -## method Artifact.link +## method Artifact.link() Link this artifact to a collection. @@ -495,9 +529,11 @@ The linked artifact. ##### Raises -- `ArtifactNotLoggedError`: If the artifact is not logged. + +If the artifact is not logged. + -## method Artifact.logged_by +## method Artifact.logged_by() Get the W&B run that originally logged the artifact. @@ -511,9 +547,11 @@ The name of the W&B run that originally logged the artifact. ##### Raises -- `ArtifactNotLoggedError`: If the artifact is not logged. + +If the artifact is not logged. + -## method Artifact.new_draft +## method Artifact.new_draft() Create a new draft artifact with the same content as this committed artifact. @@ -531,9 +569,11 @@ An `Artifact` object. ##### Raises -- `ArtifactNotLoggedError`: If the artifact is not logged. + +If the artifact is not logged. + -## method Artifact.new_file +## method Artifact.new_file() Open a new temporary file and add it to the artifact. @@ -564,9 +604,11 @@ A new file object that can be written to. Upon closing, the file is automaticall ##### Raises -- `ArtifactFinalizedError`: You cannot make changes to the current artifact version because it is finalized. Log a new artifact version instead. + +You cannot make changes to the current artifact version because it is finalized. Log a new artifact version instead. + -## method Artifact.remove +## method Artifact.remove() Remove an item from the artifact. @@ -583,10 +625,15 @@ The item to remove. Can be a specific manifest entry or the name of an artifact- ##### Raises -- `ArtifactFinalizedError`: You cannot make changes to the current artifact version because it is finalized. Log a new artifact version instead. -- `FileNotFoundError`: If the item isn't found in the artifact. + +You cannot make changes to the current artifact version because it is finalized. Log a new artifact version instead. + + + +If the item isn't found in the artifact. + -## method Artifact.save +## method Artifact.save() Persist any changes made to the artifact. @@ -609,7 +656,7 @@ A project to use for the artifact in the case that a run is not already in conte A settings object to use when initializing an automatic run. Most commonly used in testing harness. -## method Artifact.unlink +## method Artifact.unlink() Unlink this artifact if it is a linked member of an artifact collection. @@ -619,10 +666,15 @@ self ##### Raises -- `ArtifactNotLoggedError`: If the artifact is not logged. -- `ValueError`: If the artifact is not linked to any collection. + +If the artifact is not logged. + + + +If the artifact is not linked to any collection. + -## method Artifact.used_by +## method Artifact.used_by() Get a list of the runs that have used this artifact and its linked artifacts. @@ -636,9 +688,11 @@ A list of `Run` objects. ##### Raises -- `ArtifactNotLoggedError`: If the artifact is not logged. + +If the artifact is not logged. + -## method Artifact.verify +## method Artifact.verify() Verify that the contents of an artifact match the manifest. @@ -658,10 +712,15 @@ The directory to verify. If None artifact will be downloaded to './artifacts/sel ##### Raises -- `ArtifactNotLoggedError`: If the artifact is not logged. -- `ValueError`: If the verification fails. + +If the artifact is not logged. + + + +If the verification fails. + -## method Artifact.wait +## method Artifact.wait() If needed, wait for this artifact to finish logging. diff --git a/models/ref/python/experiments/run.mdx b/models/ref/python/experiments/run.mdx index d07f516dac..922d9cbec4 100644 --- a/models/ref/python/experiments/run.mdx +++ b/models/ref/python/experiments/run.mdx @@ -15,7 +15,6 @@ import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; - A unit of computation logged by W&B. Typically, this is an ML experiment. Call [`wandb.init()`](https://docs.wandb.ai/models/ref/python/functions/init) to create a @@ -43,6 +42,8 @@ created. + + ## Attributes - `summary`: (Summary) A summary of the run, which is a dictionary-like object. For more information, see [Log summary metrics](https://docs.wandb.ai/models/track/log/log-summary). diff --git a/models/ref/python/experiments/run/run-methods.mdx b/models/ref/python/experiments/run/run-methods.mdx index 67b6a7b77c..a67e112376 100644 --- a/models/ref/python/experiments/run/run-methods.mdx +++ b/models/ref/python/experiments/run/run-methods.mdx @@ -9,7 +9,7 @@ namespace: wandb.sdk.wandb_run ## Class wandb.Run -## method Run.alert +## method Run.alert() Create an alert with the given title and text. @@ -39,7 +39,7 @@ The alert level to use, either: `INFO`, `WARN`, or `ERROR`. The time to wait (in seconds) before sending another alert with this title. -## method Run.define_metric +## method Run.define_metric() Customize metrics logged with `wandb.Run.log()`. @@ -88,7 +88,7 @@ If false, then this call is merged with previous `define_metric` calls for the s An object that represents this call but can otherwise be discarded. -## method Run.display +## method Run.display() Display this run in Jupyter. @@ -108,7 +108,7 @@ hidden: 'bool' = False -## method Run.finish +## method Run.finish() Finish a run and upload any remaining data. @@ -138,7 +138,7 @@ Integer indicating the run's exit status. Use 0 for success, any other value mar Deprecated. Configure logging verbosity using `wandb.Settings(quiet=...)`. -## method Run.finish_artifact +## method Run.finish_artifact() Finishes a non-finalized artifact as output of a run. @@ -191,7 +191,7 @@ Unique string that all distributed jobs share. If None, defaults to the run's gr An `Artifact` object. -## method Run.link_artifact +## method Run.link_artifact() Link the artifact to a collection. @@ -226,7 +226,7 @@ Add one or more aliases to the linked artifact. The "latest" alias is automatica The linked artifact. -## method Run.link_model +## method Run.link_model() Log a model artifact version and link it to a registered model in the model registry. @@ -277,10 +277,15 @@ The linked artifact if linking was successful, otherwise `None`. ##### Raises -- `AssertionError`: If registered_model_name is a path or if model artifact 'name' is of a type that does not contain the substring 'model'. -- `ValueError`: If name has invalid special characters. + +If registered_model_name is a path or if model artifact 'name' is of a type that does not contain the substring 'model'. + + + +If name has invalid special characters. + -## method Run.log +## method Run.log() Upload run data. @@ -398,8 +403,13 @@ If true, finalize and upload the step. If false, then accumulate data for the st ##### Raises -- `wandb.Error`: If called before `wandb.init()`. -- `ValueError`: If invalid data is passed. + +If called before `wandb.init()`. + + + +If invalid data is passed. + ##### Examples @@ -533,7 +543,7 @@ with wandb.init() as run: ) ``` -## method Run.log_artifact +## method Run.log_artifact() Declare an artifact as an output of a run. @@ -583,7 +593,7 @@ run id if not specified. An `Artifact` object. -## method Run.log_code +## method Run.log_code() Save the current state of your code to a W&B Artifact. @@ -645,7 +655,7 @@ with wandb.init() as run: ) ``` -## method Run.log_model +## method Run.log_model() Logs a model artifact containing the contents inside the 'path' to a run and marks it as an output to this run. @@ -683,9 +693,11 @@ None ##### Raises -- `ValueError`: If name has invalid special characters. + +If name has invalid special characters. + -## method Run.mark_preempting +## method Run.mark_preempting() Mark this run as preempting. @@ -695,7 +707,7 @@ Also tells the internal process to immediately report this to server. self ``` -## method Run.pin_config_keys +## method Run.pin_config_keys() Pin config keys to display in the References section on Run Overview. @@ -714,7 +726,7 @@ keys: 'Sequence[str]' = () Config key names to pin, matching keys set via ``run.config``. These are exact key strings (dots and slashes are treated literally, not as path separators). Order is preserved and determines display order. -## method Run.restore +## method Run.restore() Download the specified file from cloud storage. @@ -753,10 +765,15 @@ None if it can't find the file, otherwise a file object open for reading. ##### Raises -- `CommError`: If W&B can't connect to the W&B backend. -- `ValueError`: If the file is not found or can't find run_path. + +If W&B can't connect to the W&B backend. + + + +If the file is not found or can't find run_path. + -## method Run.save +## method Run.save() Sync one or more files to W&B. @@ -819,7 +836,7 @@ Whether to treat `glob_str` as a glob pattern. Defaults to `True` for backward c Paths to the symlinks created for the matched files. For historical reasons, this may return a boolean in legacy code. ```python import wandb run = wandb.init() run.save("these/are/myfiles/*") # => Saves files in a "these/are/myfiles/" folder in the run. run.save("these/are/myfiles/*", base_path="these") # => Saves files in an "are/myfiles/" folder in the run. run.save("/Users/username/Documents/run123/*.txt") # => Saves files in a "run123/" folder in the run. See note below. run.save("/Users/username/Documents/run123/*.txt", base_path="/Users") # => Saves files in a "username/Documents/run123/" folder in the run. run.save("files/*/saveme.txt") # => Saves each "saveme.txt" file in an appropriate subdirectory # of "files/". run.save("files/myfile[1].txt", glob=False) # => Saves the literal file "files/myfile[1].txt" without # interpreting "[1]" as a glob character class. # Explicitly finish the run since a context manager is not used. run.finish() ``` -## method Run.status +## method Run.status() Get sync info from the internal backend, about the current run's sync status. @@ -827,7 +844,7 @@ Get sync info from the internal backend, about the current run's sync status. self ``` -## method Run.unwatch +## method Run.unwatch() Remove pytorch model topology, gradient and parameter hooks. @@ -842,7 +859,7 @@ models: 'torch.nn.Module | Sequence[torch.nn.Module] | None' = None Optional list of pytorch models that have had watch called on them. -## method Run.upsert_artifact +## method Run.upsert_artifact() Declare (or append to) a non-finalized artifact as output of a run. @@ -893,7 +910,7 @@ Unique string that all distributed jobs share. If None, defaults to the run's gr An `Artifact` object. -## method Run.use_artifact +## method Run.use_artifact() Declare an artifact as an input to a run. @@ -962,7 +979,7 @@ artifact_d = run.use_artifact( run.finish() ``` -## method Run.use_model +## method Run.use_model() Download the files logged in a model artifact 'name'. @@ -987,9 +1004,11 @@ can be in the following forms ##### Raises -- `AssertionError`: If model artifact 'name' is of a type that does not contain the substring 'model'. + +If model artifact 'name' is of a type that does not contain the substring 'model'. + -## method Run.watch +## method Run.watch() Hook into given PyTorch model to monitor gradients and the model's computational graph. @@ -1033,9 +1052,11 @@ Whether to log the model's computational graph. (default=False) ##### Raises -- `ValueError`: If `wandb.init()` has not been called or if any of the models are not instances of `torch.nn.Module`. + +If `wandb.init()` has not been called or if any of the models are not instances of `torch.nn.Module`. + -## method Run.write_logs +## method Run.write_logs() Write text to the run's Logs tab. diff --git a/models/ref/python/experiments/settings.mdx b/models/ref/python/experiments/settings.mdx index 55f460232f..25dc9567ca 100644 --- a/models/ref/python/experiments/settings.mdx +++ b/models/ref/python/experiments/settings.mdx @@ -12,6 +12,45 @@ import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; ## Class wandb.Settings + + + +Settings for the W&B SDK. + +This class manages configuration settings for the W&B SDK, +ensuring type safety and validation of all settings. Settings are accessible +as attributes and can be initialized programmatically, through environment +variables (`WANDB_ prefix`), and with configuration files. + +The settings are organized into three categories: +1. Public settings: Core configuration options that users can safely modify to customize + W&B's behavior for their specific needs. +2. Internal settings: Settings prefixed with 'x_' that handle low-level SDK behavior. + These settings are primarily for internal use and debugging. While they can be modified, + they are not considered part of the public API and may change without notice in future + versions. +3. Computed settings: Read-only settings that are automatically derived from other settings or + the environment. + +Settings are loaded from multiple sources. When the same setting is supplied +by more than one source, the source listed later wins. From lowest to highest +precedence: + +1. Default values defined on this `Settings` model. +2. Configuration files (`~/.config/wandb/settings`, or the `settings` file in + the directory named by the `WANDB_CONFIG_DIR` environment variable). +3. Environment variables (those prefixed with `WANDB_`, e.g. `WANDB_MODE`). +4. Values detected from the runtime environment, such as the hostname, the + running program/script path, the Python executable, the Docker image, and + Jupyter notebook details. +5. SageMaker settings, when running in an Amazon SageMaker environment. +6. The `settings` parameter of `wandb.setup()`. +7. The `settings` parameter of `wandb.init()`. +8. Certain `wandb.init()` parameters (for example, `mode=` overrides the + `mode` setting). + + + ```python *, allow_media_symlink: bool = False, @@ -147,7 +186,7 @@ x_service_transport: str | None = None, x_service_wait: float = 30.0, x_skip_transaction_log: bool = False, x_start_time: float | None = None, -x_stats_pid: int = 20783, +x_stats_pid: int = 43778, x_stats_sampling_interval: float = 15.0, x_stats_neuron_monitor_config_path: str | None = None, x_stats_dcgm_exporter: str | None = None, @@ -170,44 +209,6 @@ x_sync_dir_suffix: str = '', x_update_finish_state: bool = True ``` - - -Settings for the W&B SDK. - -This class manages configuration settings for the W&B SDK, -ensuring type safety and validation of all settings. Settings are accessible -as attributes and can be initialized programmatically, through environment -variables (`WANDB_ prefix`), and with configuration files. - -The settings are organized into three categories: -1. Public settings: Core configuration options that users can safely modify to customize - W&B's behavior for their specific needs. -2. Internal settings: Settings prefixed with 'x_' that handle low-level SDK behavior. - These settings are primarily for internal use and debugging. While they can be modified, - they are not considered part of the public API and may change without notice in future - versions. -3. Computed settings: Read-only settings that are automatically derived from other settings or - the environment. - -Settings are loaded from multiple sources. When the same setting is supplied -by more than one source, the source listed later wins. From lowest to highest -precedence: - -1. Default values defined on this `Settings` model. -2. Configuration files (`~/.config/wandb/settings`, or the `settings` file in - the directory named by the `WANDB_CONFIG_DIR` environment variable). -3. Environment variables (those prefixed with `WANDB_`, e.g. `WANDB_MODE`). -4. Values detected from the runtime environment, such as the hostname, the - running program/script path, the Python executable, the Docker image, and - Jupyter notebook details. -5. SageMaker settings, when running in an Amazon SageMaker environment. -6. The `settings` parameter of `wandb.setup()`. -7. The `settings` parameter of `wandb.init()`. -8. Certain `wandb.init()` parameters (for example, `mode=` overrides the - `mode` setting). - - - ## Args diff --git a/models/ref/python/experiments/settings/settings-methods.mdx b/models/ref/python/experiments/settings/settings-methods.mdx index 7c5c8374ae..54a0579ffa 100644 --- a/models/ref/python/experiments/settings/settings-methods.mdx +++ b/models/ref/python/experiments/settings/settings-methods.mdx @@ -9,7 +9,7 @@ namespace: wandb.sdk.wandb_settings ## Class wandb.Settings -## method Settings.validate_anonymous +## method Settings.validate_anonymous() ```python value: 'object' @@ -21,7 +21,7 @@ value: 'object' -## method Settings.validate_x_extra_http_headers +## method Settings.validate_x_extra_http_headers() ```python (value) @@ -33,7 +33,7 @@ value: 'object' -## method Settings.validate_x_stats_coreweave_metadata_base_url +## method Settings.validate_x_stats_coreweave_metadata_base_url() ```python (value) diff --git a/models/ref/python/public-api/api.mdx b/models/ref/python/public-api/api.mdx index 3ab2ad462e..9ce37caed2 100644 --- a/models/ref/python/public-api/api.mdx +++ b/models/ref/python/public-api/api.mdx @@ -12,11 +12,6 @@ import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; ## Class wandb.Api -```python -overrides: 'dict[str, Any] | None' = None, -timeout: 'int | None' = None, -api_key: 'str | None' = None -``` @@ -24,6 +19,12 @@ Used for querying the W&B server. +```python +overrides: 'dict[str, Any] | None' = None, +timeout: 'int | None' = None, +api_key: 'str | None' = None +``` + ## Args diff --git a/models/ref/python/public-api/api/api-methods.mdx b/models/ref/python/public-api/api/api-methods.mdx index 322d371fac..9c432b7327 100644 --- a/models/ref/python/public-api/api/api-methods.mdx +++ b/models/ref/python/public-api/api/api-methods.mdx @@ -9,7 +9,7 @@ namespace: wandb.apis.public.api ## Class wandb.Api -## method Api.artifact +## method Api.artifact() Returns a single artifact. @@ -35,8 +35,13 @@ An `Artifact` object. ##### Raises -- `ValueError`: If the artifact name is not specified. -- `ValueError`: If the artifact type is specified but does not match the type of the fetched artifact. + +If the artifact name is not specified. + + + +If the artifact type is specified but does not match the type of the fetched artifact. + ##### Examples @@ -61,7 +66,7 @@ wandb.Api().artifact(name="entity/project/artifact:alias") wandb.Api().artifact(name="entity/project/artifact:version") ``` -## method Api.artifact_collection +## method Api.artifact_collection() Returns a single artifact collection by type. @@ -109,7 +114,7 @@ artifact_example = collections.artifacts()[0] artifact_example.download() ``` -## method Api.artifact_collection_exists +## method Api.artifact_collection_exists() Whether an artifact collection exists within a specified project and entity. @@ -144,7 +149,7 @@ import wandb wandb.Api.artifact_collection_exists(type="type", name="collection_name") ``` -## method Api.artifact_collections +## method Api.artifact_collections() Returns a collection of matching artifact collections. @@ -183,7 +188,7 @@ Pagination cursor for resuming a past query, captured from a previous paginator' An iterable `ArtifactCollections` object. -## method Api.artifact_exists +## method Api.artifact_exists() Whether an artifact version exists within the specified project and entity. @@ -221,7 +226,7 @@ wandb.Api().artifact_exists("entity/project/artifact:version") wandb.Api().artifact_exists("entity/project/artifact:alias") ``` -## method Api.artifact_type +## method Api.artifact_type() Returns the matching `ArtifactType`. @@ -245,7 +250,7 @@ If given, a project name or path to filter on. An `ArtifactType` object. -## method Api.artifact_types +## method Api.artifact_types() Returns a collection of matching artifact types. @@ -269,7 +274,7 @@ Pagination cursor for resuming a past query, captured from a previous paginator' An iterable `ArtifactTypes` object. -## method Api.artifact_versions +## method Api.artifact_versions() Deprecated. Use `Api.artifacts(type_name, name)` method instead. @@ -291,7 +296,7 @@ Deprecated. Use `Api.artifacts(type_name, name)` method instead. -## method Api.artifacts +## method Api.artifacts() Return an `Artifacts` collection. @@ -378,7 +383,7 @@ remaining_artifacts = api.artifacts( ) ``` -## method Api.automation +## method Api.automation() Returns the only Automation matching the parameters. @@ -400,7 +405,9 @@ The entity to fetch the automation for. ##### Raises -- `ValueError`: If zero or multiple Automations match the search criteria. + +If zero or multiple Automations match the search criteria. + ##### Examples @@ -419,7 +426,7 @@ Get an existing automation named "other-automation", from the entity "my-team": automation = api.automation(name="other-automation", entity="my-team") ``` -## method Api.automations +## method Api.automations() Returns an iterator over all Automations that match the given parameters. @@ -467,7 +474,7 @@ api = wandb.Api() automations = api.automations(entity="my-team") ``` -## method Api.create_automation +## method Api.create_automation() Create a new Automation. @@ -524,7 +531,7 @@ automation = api.create_automation( ) ``` -## method Api.create_custom_chart +## method Api.create_custom_chart() Create a custom chart preset and return its id. @@ -572,8 +579,13 @@ The ID of the created chart preset in the format "entity/name" ##### Raises -- `wandb.Error`: If chart creation fails -- `UnsupportedError`: If the server doesn't support custom charts + +If chart creation fails + + + +If the server doesn't support custom charts + ##### Examples @@ -611,7 +623,7 @@ The ID of the created chart preset in the format "entity/name" ) ``` -## method Api.create_project +## method Api.create_project() Create a new project. @@ -631,7 +643,7 @@ The name of the new project. The entity of the new project. -## method Api.create_registry +## method Api.create_registry() Create a new registry. @@ -685,7 +697,7 @@ registry = api.create_registry( ) ``` -## method Api.create_run +## method Api.create_run() Create a new run. @@ -714,7 +726,7 @@ The entity that owns the project. If no entity is specified, log the run to the The newly created `Run`. -## method Api.create_run_queue +## method Api.create_run_queue() Create a new run queue in W&B Launch. @@ -758,7 +770,7 @@ A dictionary of template variable schemas to use with the config. The newly created `RunQueue`. -## method Api.create_team +## method Api.create_team() Create a new team. @@ -782,7 +794,7 @@ Username of the admin user of the team. Defaults to the current user. A `Team` object. -## method Api.create_user +## method Api.create_user() Create a new user. @@ -806,7 +818,7 @@ Set user as a global instance administrator. A `User` object. -## method Api.delete_automation +## method Api.delete_automation() Delete an automation. @@ -825,7 +837,7 @@ The automation to delete, or its ID. True if the automation was deleted successfully. -## method Api.flush +## method Api.flush() Flush the local cache. @@ -837,7 +849,7 @@ with `api.flush()` to get the latest values associated with the run. (self) ``` -## method Api.from_path +## method Api.from_path() Return a run, sweep, project or report from a path. @@ -874,7 +886,7 @@ sweep = api.from_path("team/project/sweeps/sweep_id") report = api.from_path("team/project/reports/report_name") ``` -## method Api.integrations +## method Api.integrations() Return an iterator of all integrations for an entity. @@ -899,7 +911,7 @@ Number of integrations to fetch per page. Defaults to 50. Usually there is no r -## method Api.job +## method Api.job() Return a `Job` object. @@ -923,7 +935,7 @@ The root path to download the job artifact. A `Job` object. -## method Api.list_jobs +## method Api.list_jobs() Return a list of jobs, if any, for the given entity and project. @@ -947,7 +959,7 @@ The project for the listed jobs. A list of matching jobs. -## method Api.organization +## method Api.organization() Return the matching `Organization`. @@ -966,7 +978,7 @@ The name of the organization. If omitted, this method will attempt to infer and An `Organization` object. -## method Api.project +## method Api.project() Return the `Project` with the given name (and entity, if given). @@ -990,7 +1002,7 @@ Name of the entity requested. If None, will fall back to the default entity pas A `Project` object. -## method Api.projects +## method Api.projects() Get projects for a given entity. @@ -1014,7 +1026,7 @@ Sets the page size for query pagination. Usually there is no reason to change th A `Projects` object which is an iterable collection of `Project`objects. -## method Api.queued_run +## method Api.queued_run() Return a single queued run based on the path. @@ -1054,7 +1066,7 @@ run_queue_item_id: 'str', project_queue=None, priority=None) -## method Api.registries +## method Api.registries() Returns a lazy iterator of `Registry` objects. @@ -1150,7 +1162,7 @@ saved_cursor = registries.cursor remaining_registries = api.registries(per_page=page_size, start=saved_cursor) ``` -## method Api.registry +## method Api.registry() Return a registry given a registry name. @@ -1187,7 +1199,7 @@ registry.description = "This is an updated description" registry.save() ``` -## method Api.reports +## method Api.reports() Get reports for a given project path. @@ -1227,7 +1239,7 @@ import wandb wandb.Api.reports("entity/project") ``` -## method Api.run +## method Api.run() Return a single run by parsing path in the form `entity/project/run_id`. @@ -1247,9 +1259,11 @@ A `Run` object. ##### Raises -- `RunNotFoundError`: If a run is not found, or run data is not able to be loaded. + +If a run is not found, or run data is not able to be loaded. + -## method Api.run_queue +## method Api.run_queue() Return the named `RunQueue` for entity. @@ -1271,7 +1285,7 @@ name: 'str') -## method Api.runs +## method Api.runs() Returns a `Runs` object, which lazily iterates over `Run` objects. @@ -1394,7 +1408,7 @@ Api.runs( Api.runs(path="my_entity/project", order="+summary_metrics.loss") ``` -## method Api.slack_integrations +## method Api.slack_integrations() Returns an iterator of Slack integrations for an entity. @@ -1441,7 +1455,7 @@ team_alert_integrations = [ ] ``` -## method Api.sweep +## method Api.sweep() Return a sweep by parsing path in the form `entity/project/sweep_id`. @@ -1459,7 +1473,7 @@ Path to sweep in the form entity/project/sweep_id. If `api.entity` is set, this A `Sweep` object. -## method Api.sync_tensorboard +## method Api.sync_tensorboard() Sync a local directory containing tfevent files to wandb. @@ -1485,7 +1499,7 @@ Sync a local directory containing tfevent files to wandb. -## method Api.team +## method Api.team() Return the matching `Team` with the given name. @@ -1504,7 +1518,7 @@ The name of the team. A `Team` object. -## method Api.update_automation +## method Api.update_automation() Update an existing automation. @@ -1564,7 +1578,7 @@ updated_automation = api.update_automation( ) ``` -## method Api.upsert_run_queue +## method Api.upsert_run_queue() Upsert a run queue in W&B Launch. @@ -1613,7 +1627,7 @@ Optional version of prioritization to use. Either "V0" or None The upserted `RunQueue`. -## method Api.user +## method Api.user() Return a user from a username or email address. @@ -1635,7 +1649,7 @@ The username or email address of the user. A `User` object or None if a user is not found. -## method Api.users +## method Api.users() Return all users from a partial username or email address query. @@ -1657,7 +1671,7 @@ The prefix or suffix of the user you want to find. An array of `User` objects. -## method Api.webhook_integrations +## method Api.webhook_integrations() Returns an iterator of webhook integrations for an entity. diff --git a/models/ref/python/public-api/artifactcollection.mdx b/models/ref/python/public-api/artifactcollection.mdx index c2d9814a2f..70be9860d5 100644 --- a/models/ref/python/public-api/artifactcollection.mdx +++ b/models/ref/python/public-api/artifactcollection.mdx @@ -15,7 +15,6 @@ import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; - An artifact collection that represents a group of related artifacts. @@ -26,3 +25,5 @@ An artifact collection that represents a group of related artifacts. + + diff --git a/models/ref/python/public-api/artifactcollection/artifactcollection-methods.mdx b/models/ref/python/public-api/artifactcollection/artifactcollection-methods.mdx index 67f336a615..9f6a0310e6 100644 --- a/models/ref/python/public-api/artifactcollection/artifactcollection-methods.mdx +++ b/models/ref/python/public-api/artifactcollection/artifactcollection-methods.mdx @@ -9,7 +9,7 @@ namespace: wandb.apis.public.artifacts ## Class wandb.apis.public.ArtifactCollection -## method ArtifactCollection.artifacts +## method ArtifactCollection.artifacts() Get all artifacts in the collection. @@ -29,7 +29,7 @@ The number of artifacts to fetch per page. Pagination cursor for resuming a past query, captured from a previous paginator's `.cursor` attribute. -## method ArtifactCollection.change_type +## method ArtifactCollection.change_type() Deprecated, change type directly with `save` instead. @@ -44,7 +44,7 @@ new_type: 'str' -## method ArtifactCollection.delete +## method ArtifactCollection.delete() Delete the entire artifact collection. @@ -52,7 +52,7 @@ Delete the entire artifact collection. self ``` -## method ArtifactCollection.is_sequence +## method ArtifactCollection.is_sequence() Return whether the artifact collection is a sequence. @@ -60,7 +60,7 @@ Return whether the artifact collection is a sequence. self ``` -## method ArtifactCollection.save +## method ArtifactCollection.save() Persist any changes made to the artifact collection. diff --git a/models/ref/python/public-api/artifactcollections.mdx b/models/ref/python/public-api/artifactcollections.mdx index 1d6dba4c18..feba6b737f 100644 --- a/models/ref/python/public-api/artifactcollections.mdx +++ b/models/ref/python/public-api/artifactcollections.mdx @@ -15,7 +15,6 @@ import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; - Artifact collections of a specific type in a project. @@ -26,3 +25,5 @@ Artifact collections of a specific type in a project. + + diff --git a/models/ref/python/public-api/artifactcollections/artifactcollections-methods.mdx b/models/ref/python/public-api/artifactcollections/artifactcollections-methods.mdx index 373e14d4be..510272faa3 100644 --- a/models/ref/python/public-api/artifactcollections/artifactcollections-methods.mdx +++ b/models/ref/python/public-api/artifactcollections/artifactcollections-methods.mdx @@ -9,7 +9,7 @@ namespace: wandb.apis.public.artifacts ## Class wandb.apis.public.ArtifactCollections -## method RelayPaginator.convert_objects +## method RelayPaginator.convert_objects() Convert the last fetched response data into the iterated objects. @@ -17,7 +17,7 @@ Convert the last fetched response data into the iterated objects. self ``` -## method Paginator.__next__ +## method Paginator.__next__() Return the next item from the iterator. When exhausted, raise StopIteration @@ -25,7 +25,7 @@ Return the next item from the iterator. When exhausted, raise StopIteration self ``` -## method Paginator.update_variables +## method Paginator.update_variables() Update the query variables for the next page fetch. diff --git a/models/ref/python/public-api/artifactfiles.mdx b/models/ref/python/public-api/artifactfiles.mdx index a44874668a..48997ca88e 100644 --- a/models/ref/python/public-api/artifactfiles.mdx +++ b/models/ref/python/public-api/artifactfiles.mdx @@ -15,7 +15,6 @@ import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; - A paginator for files in an artifact. @@ -26,3 +25,5 @@ A paginator for files in an artifact. + + diff --git a/models/ref/python/public-api/artifactfiles/artifactfiles-methods.mdx b/models/ref/python/public-api/artifactfiles/artifactfiles-methods.mdx index 5c5ca9935a..3801fb6ef7 100644 --- a/models/ref/python/public-api/artifactfiles/artifactfiles-methods.mdx +++ b/models/ref/python/public-api/artifactfiles/artifactfiles-methods.mdx @@ -9,7 +9,7 @@ namespace: wandb.apis.public.artifacts ## Class wandb.apis.public.ArtifactFiles -## method RelayPaginator.convert_objects +## method RelayPaginator.convert_objects() Convert the last fetched response data into the iterated objects. @@ -17,7 +17,7 @@ Convert the last fetched response data into the iterated objects. self ``` -## method Paginator.__next__ +## method Paginator.__next__() Return the next item from the iterator. When exhausted, raise StopIteration @@ -25,7 +25,7 @@ Return the next item from the iterator. When exhausted, raise StopIteration self ``` -## method Paginator.update_variables +## method Paginator.update_variables() Update the query variables for the next page fetch. diff --git a/models/ref/python/public-api/artifacts.mdx b/models/ref/python/public-api/artifacts.mdx index 8b61f80d76..d56f30b1c9 100644 --- a/models/ref/python/public-api/artifacts.mdx +++ b/models/ref/python/public-api/artifacts.mdx @@ -15,7 +15,6 @@ import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; - An iterable collection of artifact versions associated with a project. Optionally pass in filters to narrow down the results based on specific criteria. @@ -28,3 +27,5 @@ Optionally pass in filters to narrow down the results based on specific criteria + + diff --git a/models/ref/python/public-api/artifacts/artifacts-methods.mdx b/models/ref/python/public-api/artifacts/artifacts-methods.mdx index 8e144d97ee..f44b51d4de 100644 --- a/models/ref/python/public-api/artifacts/artifacts-methods.mdx +++ b/models/ref/python/public-api/artifacts/artifacts-methods.mdx @@ -9,7 +9,7 @@ namespace: wandb.apis.public.artifacts ## Class wandb.apis.public.Artifacts -## method Paginator.__next__ +## method Paginator.__next__() Return the next item from the iterator. When exhausted, raise StopIteration @@ -17,7 +17,7 @@ Return the next item from the iterator. When exhausted, raise StopIteration self ``` -## method Paginator.update_variables +## method Paginator.update_variables() Update the query variables for the next page fetch. diff --git a/models/ref/python/public-api/artifacttype.mdx b/models/ref/python/public-api/artifacttype.mdx index 903eb1e367..4e5a36427c 100644 --- a/models/ref/python/public-api/artifacttype.mdx +++ b/models/ref/python/public-api/artifacttype.mdx @@ -15,7 +15,6 @@ import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; - An artifact object that satisfies query based on the specified type. @@ -26,3 +25,5 @@ An artifact object that satisfies query based on the specified type. + + diff --git a/models/ref/python/public-api/artifacttype/artifacttype-methods.mdx b/models/ref/python/public-api/artifacttype/artifacttype-methods.mdx index 3451c25585..5bb6c46cf6 100644 --- a/models/ref/python/public-api/artifacttype/artifacttype-methods.mdx +++ b/models/ref/python/public-api/artifacttype/artifacttype-methods.mdx @@ -9,7 +9,7 @@ namespace: wandb.apis.public.artifacts ## Class wandb.apis.public.ArtifactType -## method ArtifactType.collection +## method ArtifactType.collection() Get a specific artifact collection by name. @@ -24,7 +24,7 @@ name: 'str' The name of the artifact collection to retrieve. -## method ArtifactType.collections +## method ArtifactType.collections() Get all artifact collections associated with this artifact type. diff --git a/models/ref/python/public-api/artifacttypes.mdx b/models/ref/python/public-api/artifacttypes.mdx index 0651c450e4..6b0e0f31f3 100644 --- a/models/ref/python/public-api/artifacttypes.mdx +++ b/models/ref/python/public-api/artifacttypes.mdx @@ -15,7 +15,6 @@ import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; - An lazy iterator of `ArtifactType` objects for a specific project. @@ -26,3 +25,5 @@ An lazy iterator of `ArtifactType` objects for a specific project. + + diff --git a/models/ref/python/public-api/artifacttypes/artifacttypes-methods.mdx b/models/ref/python/public-api/artifacttypes/artifacttypes-methods.mdx index 76ab4d4963..a1d4c2d57d 100644 --- a/models/ref/python/public-api/artifacttypes/artifacttypes-methods.mdx +++ b/models/ref/python/public-api/artifacttypes/artifacttypes-methods.mdx @@ -9,7 +9,7 @@ namespace: wandb.apis.public.artifacts ## Class wandb.apis.public.ArtifactTypes -## method RelayPaginator.convert_objects +## method RelayPaginator.convert_objects() Convert the last fetched response data into the iterated objects. @@ -17,7 +17,7 @@ Convert the last fetched response data into the iterated objects. self ``` -## method Paginator.__next__ +## method Paginator.__next__() Return the next item from the iterator. When exhausted, raise StopIteration @@ -25,7 +25,7 @@ Return the next item from the iterator. When exhausted, raise StopIteration self ``` -## method Paginator.update_variables +## method Paginator.update_variables() Update the query variables for the next page fetch. diff --git a/models/ref/python/public-api/betareport.mdx b/models/ref/python/public-api/betareport.mdx index ab5d584664..356a1e09d7 100644 --- a/models/ref/python/public-api/betareport.mdx +++ b/models/ref/python/public-api/betareport.mdx @@ -12,12 +12,6 @@ import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; ## Class wandb.apis.public.BetaReport -```python -(service_api: 'ServiceApi', -attrs: 'dict', -entity: 'str | None' = None, -project: 'str | None' = None) -``` @@ -29,6 +23,13 @@ sections, and for rendering the report as HTML. +```python +(service_api: 'ServiceApi', +attrs: 'dict', +entity: 'str | None' = None, +project: 'str | None' = None) +``` + ## Args diff --git a/models/ref/python/public-api/betareport/betareport-methods.mdx b/models/ref/python/public-api/betareport/betareport-methods.mdx index e04cda3594..bba60ee32f 100644 --- a/models/ref/python/public-api/betareport/betareport-methods.mdx +++ b/models/ref/python/public-api/betareport/betareport-methods.mdx @@ -9,7 +9,7 @@ namespace: wandb.apis.public.reports ## Class wandb.apis.public.BetaReport -## method BetaReport.runs +## method BetaReport.runs() Get runs associated with a section of the report. @@ -34,7 +34,7 @@ only_selected: 'bool' = True -## method BetaReport.to_html +## method BetaReport.to_html() Generate HTML containing an iframe displaying this report. diff --git a/models/ref/python/public-api/downloadhistoryresult.mdx b/models/ref/python/public-api/downloadhistoryresult.mdx index 1843ee7fb9..ea452b64b7 100644 --- a/models/ref/python/public-api/downloadhistoryresult.mdx +++ b/models/ref/python/public-api/downloadhistoryresult.mdx @@ -12,11 +12,6 @@ import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; ## Class wandb.apis.public.DownloadHistoryResult -```python -paths: 'list[pathlib.Path]', -contains_live_data: 'bool', -errors: 'dict[pathlib.Path, str] | None' = None -``` @@ -24,6 +19,12 @@ Result of downloading a run's history exports. +```python +paths: 'list[pathlib.Path]', +contains_live_data: 'bool', +errors: 'dict[pathlib.Path, str] | None' = None +``` + ## Args diff --git a/models/ref/python/public-api/file.mdx b/models/ref/python/public-api/file.mdx index 4831a877d4..0788a32f7b 100644 --- a/models/ref/python/public-api/file.mdx +++ b/models/ref/python/public-api/file.mdx @@ -15,7 +15,6 @@ import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; - File saved to W&B. Represents a single file stored in W&B. Includes access to file metadata. @@ -45,3 +44,5 @@ file logged to a specific run. You can search using the following keys: + + diff --git a/models/ref/python/public-api/file/file-methods.mdx b/models/ref/python/public-api/file/file-methods.mdx index f9e2cf0587..c018a35fcf 100644 --- a/models/ref/python/public-api/file/file-methods.mdx +++ b/models/ref/python/public-api/file/file-methods.mdx @@ -9,7 +9,7 @@ namespace: wandb.apis.public.files ## Class wandb.apis.public.File -## method File.delete +## method File.delete() Delete the file from the W&B server. @@ -17,7 +17,7 @@ Delete the file from the W&B server. self ``` -## method File.download +## method File.download() Downloads a file previously saved by a run from the wandb server. diff --git a/models/ref/python/public-api/files.mdx b/models/ref/python/public-api/files.mdx index fddedc1c60..56a2c9db4e 100644 --- a/models/ref/python/public-api/files.mdx +++ b/models/ref/python/public-api/files.mdx @@ -12,14 +12,6 @@ import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; ## Class wandb.apis.public.Files -```python -(service_api: 'ServiceApi', -run: 'Run', -names: 'list[str] | None' = None, -per_page: 'int' = 50, -upload: 'bool' = False, -pattern: 'str | None' = None) -``` @@ -30,6 +22,15 @@ automatically when iterating through large collections of files. +```python +(service_api: 'ServiceApi', +run: 'Run', +names: 'list[str] | None' = None, +per_page: 'int' = 50, +upload: 'bool' = False, +pattern: 'str | None' = None) +``` + ## Args diff --git a/models/ref/python/public-api/files/files-methods.mdx b/models/ref/python/public-api/files/files-methods.mdx index a79b5c532a..fcecbae0d0 100644 --- a/models/ref/python/public-api/files/files-methods.mdx +++ b/models/ref/python/public-api/files/files-methods.mdx @@ -9,7 +9,7 @@ namespace: wandb.apis.public.files ## Class wandb.apis.public.Files -## method Paginator.__next__ +## method Paginator.__next__() Return the next item from the iterator. When exhausted, raise StopIteration diff --git a/models/ref/python/public-api/incompleterunhistoryerror.mdx b/models/ref/python/public-api/incompleterunhistoryerror.mdx index 6361788667..8ce15f9e65 100644 --- a/models/ref/python/public-api/incompleterunhistoryerror.mdx +++ b/models/ref/python/public-api/incompleterunhistoryerror.mdx @@ -15,7 +15,6 @@ import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; - Raised when run history has incomplete history. Incomplete history occurs when some data has not been exported to @@ -29,3 +28,5 @@ parquet files yet, typically because the run is still ongoing. + + diff --git a/models/ref/python/public-api/incompleterunhistoryerror/incompleterunhistoryerror-methods.mdx b/models/ref/python/public-api/incompleterunhistoryerror/incompleterunhistoryerror-methods.mdx index c2bdd1bbdf..031c52071c 100644 --- a/models/ref/python/public-api/incompleterunhistoryerror/incompleterunhistoryerror-methods.mdx +++ b/models/ref/python/public-api/incompleterunhistoryerror/incompleterunhistoryerror-methods.mdx @@ -9,7 +9,7 @@ namespace: wandb.apis.public.runhistory.downloads ## Class wandb.apis.public.IncompleteRunHistoryError -## method BaseException.add_note +## method BaseException.add_note() Exception.add_note(note) -- add a note to the exception @@ -24,7 +24,7 @@ add a note to the exception -## method BaseException.with_traceback +## method BaseException.with_traceback() Exception.with_traceback(tb) -- set self.__traceback__ to tb and return self. diff --git a/models/ref/python/public-api/member.mdx b/models/ref/python/public-api/member.mdx index 1dfc017ab3..cfaa7b52d4 100644 --- a/models/ref/python/public-api/member.mdx +++ b/models/ref/python/public-api/member.mdx @@ -12,11 +12,6 @@ import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; ## Class wandb.apis.public.Member -```python -(service_api: 'ServiceApi', -team: 'str', -attrs: 'Mapping[str, Any]') -``` @@ -24,6 +19,12 @@ A member of a team. +```python +(service_api: 'ServiceApi', +team: 'str', +attrs: 'Mapping[str, Any]') +``` + ## Args diff --git a/models/ref/python/public-api/member/member-methods.mdx b/models/ref/python/public-api/member/member-methods.mdx index cdbe941fb3..b4d0cf8f10 100644 --- a/models/ref/python/public-api/member/member-methods.mdx +++ b/models/ref/python/public-api/member/member-methods.mdx @@ -9,7 +9,7 @@ namespace: wandb.apis.public.teams ## Class wandb.apis.public.Member -## method Member.delete +## method Member.delete() Remove a member from a team. diff --git a/models/ref/python/public-api/organization.mdx b/models/ref/python/public-api/organization.mdx index c963533c23..7c8394e3b0 100644 --- a/models/ref/python/public-api/organization.mdx +++ b/models/ref/python/public-api/organization.mdx @@ -12,12 +12,6 @@ import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; ## Class wandb.apis.public.Organization -```python -service_api: 'InitVar[ServiceApi]', *, -id: 'GQLId', -name: 'str', -org_entity: '_OrgEntity' -``` @@ -28,6 +22,13 @@ Users should never need to instantiate this class directly. Use +```python +service_api: 'InitVar[ServiceApi]', *, +id: 'GQLId', +name: 'str', +org_entity: '_OrgEntity' +``` + ## Args diff --git a/models/ref/python/public-api/project.mdx b/models/ref/python/public-api/project.mdx index 1987d907d7..47bcc1961e 100644 --- a/models/ref/python/public-api/project.mdx +++ b/models/ref/python/public-api/project.mdx @@ -12,12 +12,6 @@ import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; ## Class wandb.apis.public.Project -```python -service_api: 'ServiceApi', -entity: 'str', -project: 'str', -attrs: 'Mapping[str, Any]' -``` @@ -25,6 +19,13 @@ A project is a namespace for runs. +```python +service_api: 'ServiceApi', +entity: 'str', +project: 'str', +attrs: 'Mapping[str, Any]' +``` + ## Args diff --git a/models/ref/python/public-api/project/project-methods.mdx b/models/ref/python/public-api/project/project-methods.mdx index 0e167df4fd..0d2cc02bba 100644 --- a/models/ref/python/public-api/project/project-methods.mdx +++ b/models/ref/python/public-api/project/project-methods.mdx @@ -9,7 +9,7 @@ namespace: wandb.apis.public.projects ## Class wandb.apis.public.Project -## method Project.artifacts_types +## method Project.artifacts_types() Returns all artifact types associated with this project. @@ -24,7 +24,7 @@ per_page: 'int' = 50 -## method Project.collections +## method Project.collections() Returns all artifact collections associated with this project. @@ -49,7 +49,7 @@ Optional string to specify the order of the results. If you prepend order with a The number of artifact collections to fetch per page. Default is 50. -## method Project.sweeps +## method Project.sweeps() Return a paginated collection of sweeps in this project. diff --git a/models/ref/python/public-api/projectartifactcollections.mdx b/models/ref/python/public-api/projectartifactcollections.mdx index b8e7e2d737..ed868af60e 100644 --- a/models/ref/python/public-api/projectartifactcollections.mdx +++ b/models/ref/python/public-api/projectartifactcollections.mdx @@ -15,7 +15,6 @@ import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; - Artifact collections in a project. @@ -26,3 +25,5 @@ Artifact collections in a project. + + diff --git a/models/ref/python/public-api/projectartifactcollections/projectartifactcollections-methods.mdx b/models/ref/python/public-api/projectartifactcollections/projectartifactcollections-methods.mdx index ef1fd052ed..8ec6cb1ff7 100644 --- a/models/ref/python/public-api/projectartifactcollections/projectartifactcollections-methods.mdx +++ b/models/ref/python/public-api/projectartifactcollections/projectartifactcollections-methods.mdx @@ -9,7 +9,7 @@ namespace: wandb.apis.public.artifacts ## Class wandb.apis.public.ProjectArtifactCollections -## method RelayPaginator.convert_objects +## method RelayPaginator.convert_objects() Convert the last fetched response data into the iterated objects. @@ -17,7 +17,7 @@ Convert the last fetched response data into the iterated objects. self ``` -## method Paginator.__next__ +## method Paginator.__next__() Return the next item from the iterator. When exhausted, raise StopIteration @@ -25,7 +25,7 @@ Return the next item from the iterator. When exhausted, raise StopIteration self ``` -## method Paginator.update_variables +## method Paginator.update_variables() Update the query variables for the next page fetch. diff --git a/models/ref/python/public-api/projects.mdx b/models/ref/python/public-api/projects.mdx index 2d04f4eaaf..3e9d4f760d 100644 --- a/models/ref/python/public-api/projects.mdx +++ b/models/ref/python/public-api/projects.mdx @@ -12,11 +12,6 @@ import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; ## Class wandb.apis.public.Projects -```python -service_api: 'ServiceApi', -entity: 'str', -per_page: 'int' = 50 -``` @@ -26,6 +21,12 @@ An iterable interface to access projects created and saved by the entity. +```python +service_api: 'ServiceApi', +entity: 'str', +per_page: 'int' = 50 +``` + ## Args diff --git a/models/ref/python/public-api/projects/projects-methods.mdx b/models/ref/python/public-api/projects/projects-methods.mdx index 1f45ce76d0..3083b1ea33 100644 --- a/models/ref/python/public-api/projects/projects-methods.mdx +++ b/models/ref/python/public-api/projects/projects-methods.mdx @@ -9,7 +9,7 @@ namespace: wandb.apis.public.projects ## Class wandb.apis.public.Projects -## method RelayPaginator.convert_objects +## method RelayPaginator.convert_objects() Convert the last fetched response data into the iterated objects. @@ -17,7 +17,7 @@ Convert the last fetched response data into the iterated objects. self ``` -## method Paginator.__next__ +## method Paginator.__next__() Return the next item from the iterator. When exhausted, raise StopIteration @@ -25,7 +25,7 @@ Return the next item from the iterator. When exhausted, raise StopIteration self ``` -## method Paginator.update_variables +## method Paginator.update_variables() Update the query variables for the next page fetch. diff --git a/models/ref/python/public-api/registry.mdx b/models/ref/python/public-api/registry.mdx index 98410dbda4..bcf7ae3689 100644 --- a/models/ref/python/public-api/registry.mdx +++ b/models/ref/python/public-api/registry.mdx @@ -12,6 +12,13 @@ import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; ## Class wandb.apis.public.Registry + + + +A single registry in the Registry. + + + ```python (service_api: 'ServiceApi', organization: 'str', @@ -20,12 +27,6 @@ name: 'str', attrs: 'RegistryFragment | None' = None) ``` - - -A single registry in the Registry. - - - ## Args diff --git a/models/ref/python/public-api/registry/registry-methods.mdx b/models/ref/python/public-api/registry/registry-methods.mdx index 8e7d8b5757..352585ca9d 100644 --- a/models/ref/python/public-api/registry/registry-methods.mdx +++ b/models/ref/python/public-api/registry/registry-methods.mdx @@ -9,7 +9,7 @@ namespace: wandb.apis.public.registries.registry ## Class wandb.apis.public.Registry -## method Registry.add_members +## method Registry.add_members() Adds users or teams to this registry. @@ -29,8 +29,13 @@ This registry for further method chaining, if needed. ##### Raises -- `TypeError`: If no members are passed as arguments. -- `ValueError`: If unable to infer or parse the user or team IDs. + +If no members are passed as arguments. + + + +If unable to infer or parse the user or team IDs. + ##### Examples @@ -50,7 +55,7 @@ my_team = api.team(name="my-team") registry.add_members(my_team) ``` -## method Registry.collections +## method Registry.collections() Returns the collections belonging to this registry. @@ -80,7 +85,7 @@ The number of results to fetch per page. Usually there is no reason to change th Pagination cursor for resuming a past query, captured from a previous paginator's `.cursor` attribute. -## method Registry.create +## method Registry.create() Create a new registry. @@ -128,9 +133,11 @@ An optional list of allowed artifact types. ##### Raises -- `ValueError`: If a registry with the same name already exists in the organization or if the creation fails. + +If a registry with the same name already exists in the organization or if the creation fails. + -## method Registry.delete +## method Registry.delete() Delete the registry. This is irreversible. @@ -138,7 +145,7 @@ Delete the registry. This is irreversible. self ``` -## method Registry.load +## method Registry.load() Load registry attributes from the backend. @@ -146,7 +153,7 @@ Load registry attributes from the backend. self ``` -## method Registry.members +## method Registry.members() Returns the current members (users and teams) of this registry. @@ -154,7 +161,7 @@ Returns the current members (users and teams) of this registry. self ``` -## method Registry.remove_members +## method Registry.remove_members() Removes users or teams from this registry. @@ -174,8 +181,13 @@ This registry for further method chaining, if needed. ##### Raises -- `TypeError`: If no members are passed as arguments. -- `ValueError`: If unable to infer or parse the user or team IDs. + +If no members are passed as arguments. + + + +If unable to infer or parse the user or team IDs. + ##### Examples @@ -195,7 +207,7 @@ old_team = api.team(name="old-team") registry.remove_members(old_team) ``` -## method Registry.save +## method Registry.save() Save registry attributes to the backend. @@ -203,7 +215,7 @@ Save registry attributes to the backend. self ``` -## method Registry.team_members +## method Registry.team_members() Returns the current member teams of this registry. @@ -211,7 +223,7 @@ Returns the current member teams of this registry. self ``` -## method Registry.update_member +## method Registry.update_member() Updates the role of a member (user or team) within this registry. @@ -241,7 +253,9 @@ This registry for further method chaining, if needed. ##### Raises -- `ValueError`: If unable to infer the user or team ID. + +If unable to infer the user or team ID. + ##### Examples @@ -258,7 +272,7 @@ for member in registry.user_members(): registry.update_member(member.user, role="admin") ``` -## method Registry.user_members +## method Registry.user_members() Returns the current member users of this registry. @@ -266,7 +280,7 @@ Returns the current member users of this registry. self ``` -## method Registry.versions +## method Registry.versions() Returns the artifact versions belonging to this registry. diff --git a/models/ref/python/public-api/reports.mdx b/models/ref/python/public-api/reports.mdx index 62b03a3924..a483d8d7b2 100644 --- a/models/ref/python/public-api/reports.mdx +++ b/models/ref/python/public-api/reports.mdx @@ -12,6 +12,13 @@ import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; ## Class wandb.apis.public.Reports + + + +Reports is a lazy iterator of `BetaReport` objects. + + + ```python (service_api: 'ServiceApi', project: 'Project', @@ -20,12 +27,6 @@ entity: 'str | None' = None, per_page: 'int' = 50) ``` - - -Reports is a lazy iterator of `BetaReport` objects. - - - ## Args diff --git a/models/ref/python/public-api/reports/reports-methods.mdx b/models/ref/python/public-api/reports/reports-methods.mdx index 83053868aa..272011f844 100644 --- a/models/ref/python/public-api/reports/reports-methods.mdx +++ b/models/ref/python/public-api/reports/reports-methods.mdx @@ -9,7 +9,7 @@ namespace: wandb.apis.public.reports ## Class wandb.apis.public.Reports -## method Reports.convert_objects +## method Reports.convert_objects() Converts GraphQL edges to File objects. @@ -17,7 +17,7 @@ Converts GraphQL edges to File objects. self ``` -## method Paginator.__next__ +## method Paginator.__next__() Return the next item from the iterator. When exhausted, raise StopIteration @@ -25,7 +25,7 @@ Return the next item from the iterator. When exhausted, raise StopIteration self ``` -## method Reports.update_variables +## method Reports.update_variables() Updates the GraphQL query variables for pagination. diff --git a/models/ref/python/public-api/run.mdx b/models/ref/python/public-api/run.mdx index e06b1279ed..702263b2af 100644 --- a/models/ref/python/public-api/run.mdx +++ b/models/ref/python/public-api/run.mdx @@ -12,6 +12,13 @@ import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; ## Class wandb.apis.public.Run + + + +A single run associated with an entity and project. + + + ```python (service_api: 'ServiceApi', entity: 'str', @@ -23,12 +30,6 @@ lazy: 'bool' = True, api_key: 'str | None' = None) ``` - - -A single run associated with an entity and project. - - - ## Args diff --git a/models/ref/python/public-api/run/run-methods.mdx b/models/ref/python/public-api/run/run-methods.mdx index c3b0028cfe..57fb9a6076 100644 --- a/models/ref/python/public-api/run/run-methods.mdx +++ b/models/ref/python/public-api/run/run-methods.mdx @@ -9,7 +9,7 @@ namespace: wandb.apis.public.runs ## Class wandb.apis.public.Run -## method Run.beta_scan_history +## method Run.beta_scan_history() ```python self, @@ -42,7 +42,7 @@ use_cache: 'bool' = True -## method Run.create +## method Run.create() Create a run for the given project. @@ -110,7 +110,7 @@ run = Run.create( ) ``` -## method Run.delete +## method Run.delete() Delete the given run from the wandb backend. @@ -125,7 +125,7 @@ delete_artifacts: 'bool' = False Whether to delete the artifacts associated with the run. -## method Run.download_history_exports +## method Run.download_history_exports() Download any parquet history files for the run to the provided directory. @@ -151,10 +151,15 @@ A DownloadHistoryResult. ##### Raises -- `IncompleteRunHistoryError`: If require_complete_history is True and the run contains data not yet exported to parquet files. -- `WandbApiFailedError`: If the API request fails for reasons other than incomplete history. + +If require_complete_history is True and the run contains data not yet exported to parquet files. + + + +If the API request fails for reasons other than incomplete history. + -## method Run.file +## method Run.file() Return the path of a file with a given name in the artifact. @@ -173,7 +178,7 @@ name of requested file. A `File` matching the name argument. -## method Run.files +## method Run.files() Returns a `Files` object for all files in the run which match the given criteria. @@ -205,7 +210,7 @@ number of results per page. A `Files` object, which is an iterator over `File` objects. -## method Run.history +## method Run.history() Return sampled history metrics for a run. @@ -246,7 +251,7 @@ stream: "Literal['default', 'system']" = 'default' `pandas.DataFrame`: If pandas=True returns a `pandas.DataFrame` of history metrics. -## method Run.load +## method Run.load() Load run data using appropriate fragment based on lazy mode. @@ -267,9 +272,11 @@ A dictionary of the run data. ##### Raises -- `RunNotFoundError`: If the run is not found, or the run data can not be loaded. + +If the run is not found, or the run data can not be loaded. + -## method Run.load_full_data +## method Run.load_full_data() Load full run data including heavy fields like config, systemMetrics, summaryMetrics. @@ -291,7 +298,7 @@ Force reload even if data is already loaded The loaded run attributes -## method Run.log_artifact +## method Run.log_artifact() Declare an artifact as output of a run. @@ -320,7 +327,7 @@ Aliases to apply to this artifact. A `Artifact` object. -## method Run.logged_artifacts +## method Run.logged_artifacts() Fetches all artifacts logged by this run. @@ -365,7 +372,7 @@ for logged_artifact in finished_run.logged_artifacts(): print(logged_artifact.name) ``` -## method Run.save +## method Run.save() Persist changes to the run object to the W&B backend. @@ -373,7 +380,7 @@ Persist changes to the run object to the W&B backend. self ``` -## method Run.scan_history +## method Run.scan_history() Returns an iterable collection of all history records for a run. @@ -412,7 +419,7 @@ When set to True, checks the WANDB_CACHE_DIR for a run history. If the run histo A HistoryScan object, which can be iterator over to get history records. -## method Run.stop +## method Run.stop() Request that this run stop gracefully. @@ -432,7 +439,9 @@ self ##### Raises -- ``wandb.Error``: If the request fails. + +If the request fails. + ##### Examples @@ -443,7 +452,7 @@ run = wandb.Api().run("entity/project/run_id") run.stop() ``` -## method Run.to_html +## method Run.to_html() Generate HTML containing an iframe displaying this run. @@ -463,7 +472,7 @@ hidden: 'bool' = False -## method Run.update +## method Run.update() Persist changes to the run object to the wandb backend. @@ -471,7 +480,7 @@ Persist changes to the run object to the wandb backend. self ``` -## method Run.update_state +## method Run.update_state() Update the state of a run. @@ -502,9 +511,11 @@ The target run state. One of `"pending"` or `"failed"`. ##### Raises -- ``wandb.Error``: If the requested state transition is not allowed, or the server does not support this operation. + +If the requested state transition is not allowed, or the server does not support this operation. + -## method Run.upload_file +## method Run.upload_file() Upload a local file to W&B, associating it with this run. @@ -528,7 +539,7 @@ The root path to save the file relative to. For example, if you want to have the A `File` object representing the uploaded file. -## method Run.use_artifact +## method Run.use_artifact() Declare an artifact as an input to a run. @@ -552,7 +563,7 @@ A string identifying how the artifact is used in the script. Used to easily diff An `Artifact` object. -## method Run.used_artifacts +## method Run.used_artifacts() Fetches artifacts explicitly used by this run. @@ -591,7 +602,7 @@ for used_artifact in finished_run.used_artifacts(): test_artifact ``` -## method Run.wait_until_finished +## method Run.wait_until_finished() Check the state of the run until it is finished. diff --git a/models/ref/python/public-api/runartifacts.mdx b/models/ref/python/public-api/runartifacts.mdx index d36dbba179..182fbdcb77 100644 --- a/models/ref/python/public-api/runartifacts.mdx +++ b/models/ref/python/public-api/runartifacts.mdx @@ -15,7 +15,6 @@ import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; - An iterable collection of artifacts associated with a specific run. @@ -26,3 +25,5 @@ An iterable collection of artifacts associated with a specific run. + + diff --git a/models/ref/python/public-api/runartifacts/runartifacts-methods.mdx b/models/ref/python/public-api/runartifacts/runartifacts-methods.mdx index f4e397e240..a33737974a 100644 --- a/models/ref/python/public-api/runartifacts/runartifacts-methods.mdx +++ b/models/ref/python/public-api/runartifacts/runartifacts-methods.mdx @@ -9,7 +9,7 @@ namespace: wandb.apis.public.artifacts ## Class wandb.apis.public.RunArtifacts -## method RelayPaginator.convert_objects +## method RelayPaginator.convert_objects() Convert the last fetched response data into the iterated objects. @@ -17,7 +17,7 @@ Convert the last fetched response data into the iterated objects. self ``` -## method Paginator.__next__ +## method Paginator.__next__() Return the next item from the iterator. When exhausted, raise StopIteration @@ -25,7 +25,7 @@ Return the next item from the iterator. When exhausted, raise StopIteration self ``` -## method Paginator.update_variables +## method Paginator.update_variables() Update the query variables for the next page fetch. diff --git a/models/ref/python/public-api/runs.mdx b/models/ref/python/public-api/runs.mdx index 237ce40044..5649978e8c 100644 --- a/models/ref/python/public-api/runs.mdx +++ b/models/ref/python/public-api/runs.mdx @@ -12,6 +12,17 @@ import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; ## Class wandb.apis.public.Runs + + + +A lazy iterator of `Run` objects associated with a project and optional filter. + +Runs are retrieved in pages from the W&B server as needed. + +This is generally used indirectly using the `Api.runs` namespace. + + + ```python (service_api: 'ServiceApi', entity: 'str', @@ -24,16 +35,6 @@ lazy: 'bool' = True, api_key: 'str | None' = None) ``` - - -A lazy iterator of `Run` objects associated with a project and optional filter. - -Runs are retrieved in pages from the W&B server as needed. - -This is generally used indirectly using the `Api.runs` namespace. - - - ## Args diff --git a/models/ref/python/public-api/runs/runs-methods.mdx b/models/ref/python/public-api/runs/runs-methods.mdx index 8f277f458e..4314db9e8e 100644 --- a/models/ref/python/public-api/runs/runs-methods.mdx +++ b/models/ref/python/public-api/runs/runs-methods.mdx @@ -9,7 +9,7 @@ namespace: wandb.apis.public.runs ## Class wandb.apis.public.Runs -## method Runs.histories +## method Runs.histories() Return sampled history metrics for all runs that fit the filters conditions. @@ -48,7 +48,7 @@ Format to return data in, options are "default", "pandas", "polars" `pandas.DataFrame`: If `format="pandas"`, returns a `pandas.DataFrame` of history metrics. -## method Paginator.__next__ +## method Paginator.__next__() Return the next item from the iterator. When exhausted, raise StopIteration @@ -56,7 +56,7 @@ Return the next item from the iterator. When exhausted, raise StopIteration self ``` -## method Paginator.update_variables +## method Paginator.update_variables() Update the query variables for the next page fetch. @@ -64,7 +64,7 @@ Update the query variables for the next page fetch. self ``` -## method Runs.upgrade_to_full +## method Runs.upgrade_to_full() Upgrade this Runs collection from lazy to full mode. diff --git a/models/ref/python/public-api/sweep.mdx b/models/ref/python/public-api/sweep.mdx index f686241186..1e67b2aa85 100644 --- a/models/ref/python/public-api/sweep.mdx +++ b/models/ref/python/public-api/sweep.mdx @@ -12,6 +12,13 @@ import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; ## Class wandb.apis.public.Sweep + + + +The set of runs associated with the sweep. + + + ```python (service_api: 'ServiceApi', entity: 'str', @@ -20,12 +27,6 @@ sweep_id: 'str', attrs: 'Mapping[str, Any] | None' = None) ``` - - -The set of runs associated with the sweep. - - - ## Args diff --git a/models/ref/python/public-api/sweep/sweep-methods.mdx b/models/ref/python/public-api/sweep/sweep-methods.mdx index 67f7f920d2..b1db51d664 100644 --- a/models/ref/python/public-api/sweep/sweep-methods.mdx +++ b/models/ref/python/public-api/sweep/sweep-methods.mdx @@ -9,7 +9,7 @@ namespace: wandb.apis.public.sweeps ## Class wandb.apis.public.Sweep -## method Sweep.agent +## method Sweep.agent() Query an agent by ID for this sweep. @@ -24,7 +24,7 @@ agent_id: 'str' The ID of the agent to look up. -## method Sweep.agents +## method Sweep.agents() Query the list of all agents for this sweep. @@ -32,7 +32,7 @@ Query the list of all agents for this sweep. self ``` -## method Sweep.best_run +## method Sweep.best_run() Return the best run sorted by the metric defined in config or the order passed in. @@ -46,7 +46,7 @@ Return the best run sorted by the metric defined in config or the order passed i -## method Sweep.get +## method Sweep.get() Execute a query against the cloud backend. @@ -89,7 +89,7 @@ The query to use to execute the query. -## method Sweep.to_html +## method Sweep.to_html() Generate HTML containing an iframe displaying this sweep. diff --git a/models/ref/python/public-api/sweeps.mdx b/models/ref/python/public-api/sweeps.mdx index da2727047c..89af53a839 100644 --- a/models/ref/python/public-api/sweeps.mdx +++ b/models/ref/python/public-api/sweeps.mdx @@ -12,6 +12,13 @@ import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; ## Class wandb.apis.public.Sweeps + + + +A lazy iterator over a collection of `Sweep` objects. + + + ```python service_api: 'ServiceApi', entity: 'str', @@ -20,12 +27,6 @@ per_page: 'int' = 50, filters: 'dict[str, Any] | None' = None ``` - - -A lazy iterator over a collection of `Sweep` objects. - - - ## Args diff --git a/models/ref/python/public-api/sweeps/sweeps-methods.mdx b/models/ref/python/public-api/sweeps/sweeps-methods.mdx index b3385692a7..aeecd7506a 100644 --- a/models/ref/python/public-api/sweeps/sweeps-methods.mdx +++ b/models/ref/python/public-api/sweeps/sweeps-methods.mdx @@ -9,7 +9,7 @@ namespace: wandb.apis.public.sweeps ## Class wandb.apis.public.Sweeps -## method Paginator.__next__ +## method Paginator.__next__() Return the next item from the iterator. When exhausted, raise StopIteration @@ -17,7 +17,7 @@ Return the next item from the iterator. When exhausted, raise StopIteration self ``` -## method Paginator.update_variables +## method Paginator.update_variables() Update the query variables for the next page fetch. diff --git a/models/ref/python/public-api/team.mdx b/models/ref/python/public-api/team.mdx index 9d04435c8d..6b01feb1e0 100644 --- a/models/ref/python/public-api/team.mdx +++ b/models/ref/python/public-api/team.mdx @@ -12,11 +12,6 @@ import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; ## Class wandb.apis.public.Team -```python -(service_api: 'ServiceApi', -name: 'str', -attrs: 'Mapping[str, Any] | None' = None) -``` @@ -28,6 +23,12 @@ to handle team attributes. +```python +(service_api: 'ServiceApi', +name: 'str', +attrs: 'Mapping[str, Any] | None' = None) +``` + ## Args diff --git a/models/ref/python/public-api/team/team-methods.mdx b/models/ref/python/public-api/team/team-methods.mdx index d67b1efcce..9a51a7c5db 100644 --- a/models/ref/python/public-api/team/team-methods.mdx +++ b/models/ref/python/public-api/team/team-methods.mdx @@ -9,7 +9,7 @@ namespace: wandb.apis.public.teams ## Class wandb.apis.public.Team -## method Team.create +## method Team.create() Create a new team. @@ -37,7 +37,7 @@ admin_username: 'str | None' = None A `Team` object -## method Team.create_service_account +## method Team.create_service_account() Create a service account for the team. @@ -56,7 +56,7 @@ description: 'str' The service account `Member` object, or None on failure -## method Team.invite +## method Team.invite() Invite a user to a team. diff --git a/models/ref/python/public-api/user.mdx b/models/ref/python/public-api/user.mdx index df0d39ea8e..8231f9dead 100644 --- a/models/ref/python/public-api/user.mdx +++ b/models/ref/python/public-api/user.mdx @@ -15,7 +15,6 @@ import { GitHubLink } from '/snippets/_includes/github-source-link.mdx'; - A user on a W&B instance. This allows managing a user's API keys and accessing information like @@ -30,3 +29,5 @@ user. + + diff --git a/models/ref/python/public-api/user/user-methods.mdx b/models/ref/python/public-api/user/user-methods.mdx index 142cf8b37b..4295add7ad 100644 --- a/models/ref/python/public-api/user/user-methods.mdx +++ b/models/ref/python/public-api/user/user-methods.mdx @@ -9,7 +9,7 @@ namespace: wandb.apis.public.users ## Class wandb.apis.public.User -## method User.create +## method User.create() Create a new user. @@ -40,7 +40,7 @@ Whether this user should be a global instance admin. A `User` object. -## method User.delete_api_key +## method User.delete_api_key() Delete a user's API key. @@ -61,7 +61,7 @@ The name of the API key to delete. Use one of the names returned by the `api_key True on success, false on failure. -## method User.generate_api_key +## method User.generate_api_key() Generate a new API key. From 5501ef1097f808412f3df593eff769640a464e7b Mon Sep 17 00:00:00 2001 From: Noah Luna <15202580+ngrayluna@users.noreply.github.com> Date: Mon, 3 Aug 2026 19:40:36 -0700 Subject: [PATCH 4/4] format properties --- .../newautomation-properties.mdx | 2 +- .../data-types/image/image-properties.mdx | 2 +- .../artifact/artifact-properties.mdx | 66 +++++++++---------- .../python/experiments/run/run-properties.mdx | 44 ++++++------- models/ref/python/experiments/settings.mdx | 2 +- .../settings/settings-properties.mdx | 42 ++++++------ .../python/public-api/api/api-properties.mdx | 6 +- .../artifactcollection-properties.mdx | 20 +++--- .../artifactfiles-properties.mdx | 2 +- .../artifacttype/artifacttype-properties.mdx | 4 +- .../betareport/betareport-properties.mdx | 20 +++--- .../public-api/file/file-properties.mdx | 4 +- .../public-api/project/project-properties.mdx | 8 +-- .../registry/registry-properties.mdx | 24 +++---- .../python/public-api/run/run-properties.mdx | 34 +++++----- .../public-api/sweep/sweep-properties.mdx | 16 ++--- .../public-api/user/user-properties.mdx | 6 +- 17 files changed, 151 insertions(+), 151 deletions(-) diff --git a/models/ref/python/automations/newautomation/newautomation-properties.mdx b/models/ref/python/automations/newautomation/newautomation-properties.mdx index 2850082895..bcb4b82d2f 100644 --- a/models/ref/python/automations/newautomation/newautomation-properties.mdx +++ b/models/ref/python/automations/newautomation/newautomation-properties.mdx @@ -9,7 +9,7 @@ namespace: wandb.automations.automations ## Class wandb.automations.NewAutomation -### property scope +## property scope The scope in which the triggering event must occur. diff --git a/models/ref/python/data-types/image/image-properties.mdx b/models/ref/python/data-types/image/image-properties.mdx index 37088e0a4a..80070cfadb 100644 --- a/models/ref/python/data-types/image/image-properties.mdx +++ b/models/ref/python/data-types/image/image-properties.mdx @@ -9,5 +9,5 @@ namespace: wandb.sdk.data_types.image ## Class wandb.Image -### property image +## property image diff --git a/models/ref/python/experiments/artifact/artifact-properties.mdx b/models/ref/python/experiments/artifact/artifact-properties.mdx index 0bbdec5722..b567a84ec7 100644 --- a/models/ref/python/experiments/artifact/artifact-properties.mdx +++ b/models/ref/python/experiments/artifact/artifact-properties.mdx @@ -9,7 +9,7 @@ namespace: wandb.sdk.artifacts.artifact ## Class wandb.Artifact -### property aliases +## property aliases List of one or more semantically-friendly references or @@ -20,7 +20,7 @@ Change an artifact's alias with the W&B App UI or programmatically. See [Create new artifact versions](https://docs.wandb.ai/models/artifacts/create-a-new-artifact-version) for more information. -### property collection +## property collection The collection this artifact is retrieved from. @@ -32,51 +32,51 @@ that the artifact version originates from. The collection that an artifact originates from is known as the source sequence. -### property commit_hash +## property commit_hash The hash returned when this artifact was committed. -### property created_at +## property created_at Timestamp when the artifact was created. -### property description +## property description A description of the artifact. -### property digest +## property digest The logical digest of the artifact. The digest is the checksum of the artifact's contents. If an artifact has the same digest as the current `latest` version, then `log_artifact` is a no-op. -### property entity +## property entity The name of the entity that the artifact collection belongs to. If the artifact is a link, the entity will be the entity of the linked artifact. -### property file_count +## property file_count The number of files (including references). -### property history_step +## property history_step The nearest step which logged history metrics for this artifact's source run. -### property id +## property id The artifact's ID. -### property is_link +## property is_link Boolean flag indicating if the artifact is a link artifact. True: The artifact is a link artifact to a source artifact. False: The artifact is a source artifact. -### property linked_artifacts +## property linked_artifacts Returns a list of all the linked artifacts of a source artifact. @@ -85,20 +85,20 @@ it will return an empty list. Limited to 500 results. -### property manifest +## property manifest The artifact's manifest. The manifest lists all of its contents, and can't be changed once the artifact has been logged. -### property metadata +## property metadata User-defined artifact metadata. Structured data associated with the artifact. -### property name +## property name The artifact name and version of the artifact. @@ -106,72 +106,72 @@ A string with the format `{collection}:{alias}`. If fetched before an artifact i logged/saved, the name won't contain the alias. If the artifact is a link, the name will be the name of the linked artifact. -### property project +## property project The name of the project that the artifact collection belongs to. If the artifact is a link, the project will be the project of the linked artifact. -### property qualified_name +## property qualified_name The entity/project/name of the artifact. If the artifact is a link, the qualified name will be the qualified name of the linked artifact path. -### property size +## property size The total size of the artifact in bytes. Includes any references tracked by this artifact. -### property source_artifact +## property source_artifact Returns the source artifact, which is the original logged artifact. If this artifact is a source artifact (`artifact.is_link == False`), it will return itself. -### property source_collection +## property source_collection The artifact's source collection. The source collection is the collection that the artifact was logged from. -### property source_entity +## property source_entity The name of the entity of the source artifact. -### property source_name +## property source_name The artifact name and version of the source artifact. A string with the format `{source_collection}:{alias}`. Before the artifact is saved, contains only the name since the version is not yet known. -### property source_project +## property source_project The name of the project of the source artifact. -### property source_qualified_name +## property source_qualified_name The source_entity/source_project/source_name of the source artifact. -### property source_version +## property source_version The source artifact's version. A string with the format `v{number}`. -### property state +## property state The status of the artifact. One of: "PENDING", "COMMITTED", or "DELETED". -### property tags +## property tags List of one or more tags assigned to this artifact version. -### property ttl +## property ttl The time-to-live (TTL) policy of an artifact. @@ -182,23 +182,23 @@ An artifact inherits a TTL policy from the team default if the team administrator defines a default TTL and there is no custom policy set on an artifact. -### property type +## property type The artifact's type. Common types include `dataset` or `model`. -### property updated_at +## property updated_at The time when the artifact was last updated. -### property url +## property url Constructs the URL of the artifact. -### property use_as +## property use_as Deprecated. -### property version +## property version The artifact's version. diff --git a/models/ref/python/experiments/run/run-properties.mdx b/models/ref/python/experiments/run/run-properties.mdx index c4c8663caa..88c1d1d490 100644 --- a/models/ref/python/experiments/run/run-properties.mdx +++ b/models/ref/python/experiments/run/run-properties.mdx @@ -9,29 +9,29 @@ namespace: wandb.sdk.wandb_run ## Class wandb.Run -### property config +## property config Config object associated with this run. -### property config_static +## property config_static Static config object associated with this run. -### property dir +## property dir The directory where files associated with the run are saved. -### property disabled +## property disabled True if the run is disabled, False otherwise. -### property entity +## property entity The name of the W&B entity associated with the run. Entity can be a username or the name of a team or organization. -### property group +## property group Returns the name of the group associated with this run. @@ -44,11 +44,11 @@ In shared mode, where all processes share the same run object, setting a group is usually unnecessary, since there is only one run and no grouping is required. -### property id +## property id Identifier for this run. -### property job_type +## property job_type Name of the job type associated with the run. @@ -60,74 +60,74 @@ and filtering runs in the W&B UI, especially when you have multiple runs with different job types in the same project. For more information, see [Organize runs](https://docs.wandb.ai/models/runs#organize-runs). -### property name +## property name Display name of the run. Display names are not guaranteed to be unique and may be descriptive. By default, they are randomly generated. -### property notes +## property notes Notes associated with the run, if there are any. Notes can be a multiline string and can also use markdown and latex equations inside `$$`, like `$x + 3$`. -### property offline +## property offline True if the run is offline, False otherwise. -### property path +## property path Path to the run. Run paths include entity, project, and run ID, in the format `entity/project/run_id`. -### property project +## property project Name of the W&B project associated with the run. -### property project_url +## property project_url URL of the W&B project associated with the run, if there is one. Offline runs do not have a project URL. -### property resumed +## property resumed True if the run was resumed, False otherwise. -### property settings +## property settings A frozen copy of run's Settings object. -### property start_time +## property start_time Unix timestamp (in seconds) of when the run started. -### property step +## property step The W&B step of the next `log()` call. Raises an error in mode="shared" runs. -### property sweep_id +## property sweep_id Identifier for the sweep associated with the run, if there is one. -### property sweep_url +## property sweep_url URL of the sweep associated with the run, if there is one. Offline runs do not have a sweep URL. -### property tags +## property tags Tags associated with the run, if there are any. -### property url +## property url The url for the W&B run, if there is one. diff --git a/models/ref/python/experiments/settings.mdx b/models/ref/python/experiments/settings.mdx index 25dc9567ca..f917640777 100644 --- a/models/ref/python/experiments/settings.mdx +++ b/models/ref/python/experiments/settings.mdx @@ -186,7 +186,7 @@ x_service_transport: str | None = None, x_service_wait: float = 30.0, x_skip_transaction_log: bool = False, x_start_time: float | None = None, -x_stats_pid: int = 43778, +x_stats_pid: int = 62075, x_stats_sampling_interval: float = 15.0, x_stats_neuron_monitor_config_path: str | None = None, x_stats_dcgm_exporter: str | None = None, diff --git a/models/ref/python/experiments/settings/settings-properties.mdx b/models/ref/python/experiments/settings/settings-properties.mdx index 4eb3eaba3b..e025c274bd 100644 --- a/models/ref/python/experiments/settings/settings-properties.mdx +++ b/models/ref/python/experiments/settings/settings-properties.mdx @@ -9,90 +9,90 @@ namespace: wandb.sdk.wandb_settings ## Class wandb.Settings -### property app_url +## property app_url The URL for the W&B UI, usually https://wandb.ai. This is different from `base_url` (like https://api.wandb.ai) which is used to access W&B APIs programmatically. -### property colab_url +## property colab_url The URL to the Colab notebook, if running in Colab. -### property deployment +## property deployment -### property files_dir +## property files_dir Absolute path to the local directory where the run's files are stored. -### property is_local +## property is_local -### property log_dir +## property log_dir The directory for storing log files. -### property log_internal +## property log_internal The path to the file to use for internal logs. -### property log_symlink_internal +## property log_symlink_internal The path to the symlink to the internal log file of the most recent run. -### property log_symlink_user +## property log_symlink_user The path to the symlink to the user-process log file of the most recent run. -### property log_user +## property log_user The path to the file to use for user-process logs. -### property project_url +## property project_url The W&B URL where the project can be viewed. -### property resume_fname +## property resume_fname The path to the resume file. -### property run_mode +## property run_mode The mode of the run. Can be either "run" or "offline-run". -### property run_url +## property run_url The W&B URL where the run can be viewed. -### property settings_workspace +## property settings_workspace The path to the workspace settings file. -### property sweep_url +## property sweep_url The W&B URL where the sweep can be viewed. -### property sync_dir +## property sync_dir The directory for storing the run's files. -### property sync_file +## property sync_file Path to the append-only binary transaction log file. -### property sync_symlink_latest +## property sync_symlink_latest Path to the symlink to the most recent run's transaction log file. -### property timespec +## property timespec The time specification for the run. -### property wandb_dir +## property wandb_dir Full path to the wandb directory. diff --git a/models/ref/python/public-api/api/api-properties.mdx b/models/ref/python/public-api/api/api-properties.mdx index fa043c0dc9..9be18af634 100644 --- a/models/ref/python/public-api/api/api-properties.mdx +++ b/models/ref/python/public-api/api/api-properties.mdx @@ -9,15 +9,15 @@ namespace: wandb.apis.public.api ## Class wandb.Api -### property default_entity +## property default_entity Returns the default W&B entity. -### property user_agent +## property user_agent Returns W&B public user agent. -### property viewer +## property viewer Returns the viewer object. diff --git a/models/ref/python/public-api/artifactcollection/artifactcollection-properties.mdx b/models/ref/python/public-api/artifactcollection/artifactcollection-properties.mdx index ff8c919baf..fefa5000f0 100644 --- a/models/ref/python/public-api/artifactcollection/artifactcollection-properties.mdx +++ b/models/ref/python/public-api/artifactcollection/artifactcollection-properties.mdx @@ -9,43 +9,43 @@ namespace: wandb.apis.public.artifacts ## Class wandb.apis.public.ArtifactCollection -### property aliases +## property aliases The aliases for all artifact versions contained in this collection. -### property created_at +## property created_at The creation date of the artifact collection. -### property description +## property description A description of the artifact collection. -### property entity +## property entity The entity (user or team) that owns the project. -### property id +## property id The unique identifier of the artifact collection. -### property name +## property name The name of the artifact collection. -### property project +## property project The project that contains the artifact collection. -### property tags +## property tags The tags associated with the artifact collection. -### property type +## property type Returns the type of the artifact collection. -### property updated_at +## property updated_at The date at which the artifact collection was last updated. diff --git a/models/ref/python/public-api/artifactfiles/artifactfiles-properties.mdx b/models/ref/python/public-api/artifactfiles/artifactfiles-properties.mdx index e116bba2ac..915c4c581a 100644 --- a/models/ref/python/public-api/artifactfiles/artifactfiles-properties.mdx +++ b/models/ref/python/public-api/artifactfiles/artifactfiles-properties.mdx @@ -9,7 +9,7 @@ namespace: wandb.apis.public.artifacts ## Class wandb.apis.public.ArtifactFiles -### property path +## property path Returns the path of the artifact. diff --git a/models/ref/python/public-api/artifacttype/artifacttype-properties.mdx b/models/ref/python/public-api/artifacttype/artifacttype-properties.mdx index ee55774615..14d1f554eb 100644 --- a/models/ref/python/public-api/artifacttype/artifacttype-properties.mdx +++ b/models/ref/python/public-api/artifacttype/artifacttype-properties.mdx @@ -9,11 +9,11 @@ namespace: wandb.apis.public.artifacts ## Class wandb.apis.public.ArtifactType -### property id +## property id The unique identifier of the artifact type. -### property name +## property name The name of the artifact type. diff --git a/models/ref/python/public-api/betareport/betareport-properties.mdx b/models/ref/python/public-api/betareport/betareport-properties.mdx index ce98654aaf..39031ffc32 100644 --- a/models/ref/python/public-api/betareport/betareport-properties.mdx +++ b/models/ref/python/public-api/betareport/betareport-properties.mdx @@ -9,41 +9,41 @@ namespace: wandb.apis.public.reports ## Class wandb.apis.public.BetaReport -### property created_at +## property created_at -### property description +## property description -### property display_name +## property display_name -### property id +## property id -### property name +## property name -### property sections +## property sections Get the panel sections (groups) from the report. -### property spec +## property spec -### property updated_at +## property updated_at -### property url +## property url -### property user +## property user diff --git a/models/ref/python/public-api/file/file-properties.mdx b/models/ref/python/public-api/file/file-properties.mdx index 7de7eb25bf..79f8b8a1a0 100644 --- a/models/ref/python/public-api/file/file-properties.mdx +++ b/models/ref/python/public-api/file/file-properties.mdx @@ -9,11 +9,11 @@ namespace: wandb.apis.public.files ## Class wandb.apis.public.File -### property path_uri +## property path_uri Returns the URI path to the file in the storage bucket. -### property size +## property size Returns the size of the file in bytes. diff --git a/models/ref/python/public-api/project/project-properties.mdx b/models/ref/python/public-api/project/project-properties.mdx index 666d0fc84c..f77d47c96d 100644 --- a/models/ref/python/public-api/project/project-properties.mdx +++ b/models/ref/python/public-api/project/project-properties.mdx @@ -9,20 +9,20 @@ namespace: wandb.apis.public.projects ## Class wandb.apis.public.Project -### property id +## property id -### property owner +## property owner Returns the project owner as a User object. -### property path +## property path Returns the path of the project. The path is a list containing the entity and project name. -### property url +## property url Returns the URL of the project. diff --git a/models/ref/python/public-api/registry/registry-properties.mdx b/models/ref/python/public-api/registry/registry-properties.mdx index 944e734c03..26ef988ae2 100644 --- a/models/ref/python/public-api/registry/registry-properties.mdx +++ b/models/ref/python/public-api/registry/registry-properties.mdx @@ -9,14 +9,14 @@ namespace: wandb.apis.public.registries.registry ## Class wandb.apis.public.Registry -### property allow_all_artifact_types +## property allow_all_artifact_types Return whether all artifact types are allowed in the registry. If `True`, artifacts of any type can be added. If `False`, artifacts are restricted to the types listed in `artifact_types`. -### property artifact_types +## property artifact_types Returns the artifact types allowed in the registry. @@ -28,43 +28,43 @@ types in `artifact_types`. Note: Previously saved artifact types cannot be removed. -### property created_at +## property created_at Timestamp of when the registry was created. -### property description +## property description Description of the registry. -### property entity +## property entity Organization entity of the registry. -### property full_name +## property full_name Full name of the registry including the `wandb-registry-` prefix. -### property id +## property id The unique ID for this registry. -### property name +## property name Name of the registry without the `wandb-registry-` prefix. -### property organization +## property organization Organization name of the registry. -### property path +## property path -### property updated_at +## property updated_at Timestamp of when the registry was last updated. -### property visibility +## property visibility Visibility of the registry. diff --git a/models/ref/python/public-api/run/run-properties.mdx b/models/ref/python/public-api/run/run-properties.mdx index b176470ca0..1bec1bdda0 100644 --- a/models/ref/python/public-api/run/run-properties.mdx +++ b/models/ref/python/public-api/run/run-properties.mdx @@ -9,42 +9,42 @@ namespace: wandb.apis.public.runs ## Class wandb.apis.public.Run -### property config +## property config Get run config. Auto-loads full data if in lazy mode. -### property entity +## property entity The entity associated with the run. -### property id +## property id The unique identifier for the run. -### property lastHistoryStep +## property lastHistoryStep Returns the last step logged in the run's history. -### property metadata +## property metadata Metadata about the run from wandb-metadata.json. Metadata includes the run's description, tags, start time, memory usage and more. -### property name +## property name The name of the run. -### property path +## property path The path of the run. The path is a list containing the entity, project, and run_id. -### property rawconfig +## property rawconfig Get raw run config including internal keys. Auto-loads full data if in lazy mode. -### property state +## property state The state of the run. @@ -59,38 +59,38 @@ The following table describes the possible states a run can be in: | Running | Run is still running and has recently sent a heartbeat. | | Pending | Run is scheduled but not yet started (common in sweeps and Launch jobs). | -### property storage_id +## property storage_id The unique storage identifier for the run. -### property summary +## property summary Get run summary metrics. Auto-loads full data if in lazy mode. -### property summary_metrics +## property summary_metrics Get run summary metrics. Auto-loads full data if in lazy mode. -### property sweep +## property sweep The sweep associated with this run. Loads sweep data if include_sweeps is False. -### property sweep_name +## property sweep_name Get sweep name. Always available since sweepName is in lightweight fragment. -### property system_metrics +## property system_metrics Get run system metrics. Auto-loads full data if in lazy mode. -### property url +## property url The URL of the run. The run URL is generated from the entity, project, and run_id. For SaaS users, it takes the form of `https://wandb.ai/entity/project/run_id`. -### property username +## property username This API is deprecated. Use `entity` instead. diff --git a/models/ref/python/public-api/sweep/sweep-properties.mdx b/models/ref/python/public-api/sweep/sweep-properties.mdx index 0c386b5084..fe976312a8 100644 --- a/models/ref/python/public-api/sweep/sweep-properties.mdx +++ b/models/ref/python/public-api/sweep/sweep-properties.mdx @@ -9,19 +9,19 @@ namespace: wandb.apis.public.sweeps ## Class wandb.apis.public.Sweep -### property config +## property config The sweep configuration used for the sweep. -### property entity +## property entity The entity associated with the sweep. -### property expected_run_count +## property expected_run_count Return the number of expected runs in the sweep or None for infinite runs. -### property name +## property name The name of the sweep. @@ -31,17 +31,17 @@ Returns the first name that exists in the following priority order: 2. Name configured at creation time 3. Sweep ID -### property order +## property order Return the order key for the sweep. -### property path +## property path Returns the path of the project. The path is a list containing the entity, project name, and sweep ID. -### property url +## property url The URL of the sweep. @@ -50,7 +50,7 @@ The sweep URL is generated from the entity, project, the term SaaS users, it takes the form of `https://wandb.ai/entity/project/sweeps/sweeps_ID`. -### property username +## property username Deprecated. Use `Sweep.entity` instead. diff --git a/models/ref/python/public-api/user/user-properties.mdx b/models/ref/python/public-api/user/user-properties.mdx index a24a6cc2e9..01e61c4c0e 100644 --- a/models/ref/python/public-api/user/user-properties.mdx +++ b/models/ref/python/public-api/user/user-properties.mdx @@ -9,7 +9,7 @@ namespace: wandb.apis.public.users ## Class wandb.apis.public.User -### property api_keys +## property api_keys Names of the user's API keys. @@ -20,14 +20,14 @@ key. The list is empty if the user has no API keys or if API keys have not been loaded. -### property teams +## property teams Names of the user's teams. This is an empty list if the user has no team memberships or if teams data was not loaded. -### property user_api +## property user_api A `wandb.Api` instance using the user's credentials.