wandb 0.21.1__py3-none-win32.whl → 0.21.3__py3-none-win32.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- wandb/__init__.py +1 -1
- wandb/__init__.pyi +1 -1
- wandb/apis/public/api.py +1 -2
- wandb/apis/public/artifacts.py +3 -5
- wandb/apis/public/registries/_utils.py +14 -16
- wandb/apis/public/registries/registries_search.py +176 -289
- wandb/apis/public/reports.py +13 -10
- wandb/automations/_generated/delete_automation.py +1 -3
- wandb/automations/_generated/enums.py +13 -11
- wandb/bin/gpu_stats.exe +0 -0
- wandb/bin/wandb-core +0 -0
- wandb/cli/cli.py +47 -2
- wandb/integration/metaflow/data_pandas.py +2 -2
- wandb/integration/metaflow/data_pytorch.py +75 -0
- wandb/integration/metaflow/data_sklearn.py +76 -0
- wandb/integration/metaflow/metaflow.py +16 -87
- wandb/integration/weave/__init__.py +6 -0
- wandb/integration/weave/interface.py +49 -0
- wandb/integration/weave/weave.py +63 -0
- wandb/proto/v3/wandb_internal_pb2.py +3 -2
- wandb/proto/v4/wandb_internal_pb2.py +2 -2
- wandb/proto/v5/wandb_internal_pb2.py +2 -2
- wandb/proto/v6/wandb_internal_pb2.py +2 -2
- wandb/sdk/artifacts/_factories.py +17 -0
- wandb/sdk/artifacts/_generated/__init__.py +221 -13
- wandb/sdk/artifacts/_generated/artifact_by_id.py +17 -0
- wandb/sdk/artifacts/_generated/artifact_by_name.py +22 -0
- wandb/sdk/artifacts/_generated/artifact_collection_membership_file_urls.py +43 -0
- wandb/sdk/artifacts/_generated/artifact_created_by.py +47 -0
- wandb/sdk/artifacts/_generated/artifact_file_urls.py +22 -0
- wandb/sdk/artifacts/_generated/artifact_type.py +31 -0
- wandb/sdk/artifacts/_generated/artifact_used_by.py +43 -0
- wandb/sdk/artifacts/_generated/artifact_via_membership_by_name.py +26 -0
- wandb/sdk/artifacts/_generated/delete_artifact.py +28 -0
- wandb/sdk/artifacts/_generated/enums.py +5 -0
- wandb/sdk/artifacts/_generated/fetch_artifact_manifest.py +38 -0
- wandb/sdk/artifacts/_generated/fetch_registries.py +32 -0
- wandb/sdk/artifacts/_generated/fragments.py +279 -41
- wandb/sdk/artifacts/_generated/link_artifact.py +6 -0
- wandb/sdk/artifacts/_generated/operations.py +654 -51
- wandb/sdk/artifacts/_generated/registry_collections.py +34 -0
- wandb/sdk/artifacts/_generated/registry_versions.py +34 -0
- wandb/sdk/artifacts/_generated/unlink_artifact.py +25 -0
- wandb/sdk/artifacts/_graphql_fragments.py +3 -86
- wandb/sdk/artifacts/_validators.py +6 -4
- wandb/sdk/artifacts/artifact.py +410 -547
- wandb/sdk/artifacts/artifact_file_cache.py +11 -7
- wandb/sdk/artifacts/artifact_manifest.py +10 -9
- wandb/sdk/artifacts/artifact_manifest_entry.py +15 -18
- wandb/sdk/artifacts/artifact_manifests/artifact_manifest_v1.py +5 -3
- wandb/sdk/artifacts/storage_handlers/gcs_handler.py +1 -1
- wandb/sdk/artifacts/storage_handlers/http_handler.py +1 -1
- wandb/sdk/artifacts/storage_handlers/s3_handler.py +1 -1
- wandb/sdk/artifacts/storage_policies/wandb_storage_policy.py +1 -1
- wandb/sdk/data_types/video.py +2 -2
- wandb/sdk/interface/interface_queue.py +1 -4
- wandb/sdk/interface/interface_shared.py +26 -37
- wandb/sdk/interface/interface_sock.py +24 -14
- wandb/sdk/internal/settings_static.py +2 -3
- wandb/sdk/launch/create_job.py +12 -1
- wandb/sdk/launch/inputs/internal.py +25 -24
- wandb/sdk/launch/inputs/schema.py +31 -1
- wandb/sdk/launch/runner/kubernetes_runner.py +24 -29
- wandb/sdk/lib/asyncio_compat.py +16 -16
- wandb/sdk/lib/asyncio_manager.py +252 -0
- wandb/sdk/lib/hashutil.py +13 -4
- wandb/sdk/lib/paths.py +23 -21
- wandb/sdk/lib/printer.py +2 -2
- wandb/sdk/lib/printer_asyncio.py +3 -1
- wandb/sdk/lib/retry.py +185 -78
- wandb/sdk/lib/service/service_client.py +106 -0
- wandb/sdk/lib/service/service_connection.py +20 -26
- wandb/sdk/lib/service/service_token.py +30 -13
- wandb/sdk/mailbox/mailbox.py +13 -5
- wandb/sdk/mailbox/mailbox_handle.py +22 -13
- wandb/sdk/mailbox/response_handle.py +42 -106
- wandb/sdk/mailbox/wait_with_progress.py +7 -42
- wandb/sdk/wandb_init.py +11 -25
- wandb/sdk/wandb_login.py +1 -1
- wandb/sdk/wandb_run.py +92 -56
- wandb/sdk/wandb_settings.py +45 -32
- wandb/sdk/wandb_setup.py +176 -96
- wandb/util.py +1 -1
- {wandb-0.21.1.dist-info → wandb-0.21.3.dist-info}/METADATA +2 -2
- {wandb-0.21.1.dist-info → wandb-0.21.3.dist-info}/RECORD +88 -72
- wandb/sdk/interface/interface_relay.py +0 -38
- wandb/sdk/interface/router.py +0 -89
- wandb/sdk/interface/router_queue.py +0 -43
- wandb/sdk/interface/router_relay.py +0 -50
- wandb/sdk/interface/router_sock.py +0 -32
- wandb/sdk/lib/sock_client.py +0 -232
- {wandb-0.21.1.dist-info → wandb-0.21.3.dist-info}/WHEEL +0 -0
- {wandb-0.21.1.dist-info → wandb-0.21.3.dist-info}/entry_points.txt +0 -0
- {wandb-0.21.1.dist-info → wandb-0.21.3.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,34 @@
|
|
1
|
+
# Generated by ariadne-codegen
|
2
|
+
# Source: tools/graphql_codegen/artifacts/
|
3
|
+
|
4
|
+
from __future__ import annotations
|
5
|
+
|
6
|
+
from typing import Optional
|
7
|
+
|
8
|
+
from pydantic import Field
|
9
|
+
|
10
|
+
from wandb._pydantic import GQLBase
|
11
|
+
|
12
|
+
from .fragments import RegistryCollectionsPage
|
13
|
+
|
14
|
+
|
15
|
+
class RegistryCollections(GQLBase):
|
16
|
+
organization: Optional[RegistryCollectionsOrganization]
|
17
|
+
|
18
|
+
|
19
|
+
class RegistryCollectionsOrganization(GQLBase):
|
20
|
+
org_entity: Optional[RegistryCollectionsOrganizationOrgEntity] = Field(
|
21
|
+
alias="orgEntity"
|
22
|
+
)
|
23
|
+
|
24
|
+
|
25
|
+
class RegistryCollectionsOrganizationOrgEntity(GQLBase):
|
26
|
+
name: str
|
27
|
+
artifact_collections: Optional[RegistryCollectionsPage] = Field(
|
28
|
+
alias="artifactCollections"
|
29
|
+
)
|
30
|
+
|
31
|
+
|
32
|
+
RegistryCollections.model_rebuild()
|
33
|
+
RegistryCollectionsOrganization.model_rebuild()
|
34
|
+
RegistryCollectionsOrganizationOrgEntity.model_rebuild()
|
@@ -0,0 +1,34 @@
|
|
1
|
+
# Generated by ariadne-codegen
|
2
|
+
# Source: tools/graphql_codegen/artifacts/
|
3
|
+
|
4
|
+
from __future__ import annotations
|
5
|
+
|
6
|
+
from typing import Optional
|
7
|
+
|
8
|
+
from pydantic import Field
|
9
|
+
|
10
|
+
from wandb._pydantic import GQLBase
|
11
|
+
|
12
|
+
from .fragments import RegistryVersionsPage
|
13
|
+
|
14
|
+
|
15
|
+
class RegistryVersions(GQLBase):
|
16
|
+
organization: Optional[RegistryVersionsOrganization]
|
17
|
+
|
18
|
+
|
19
|
+
class RegistryVersionsOrganization(GQLBase):
|
20
|
+
org_entity: Optional[RegistryVersionsOrganizationOrgEntity] = Field(
|
21
|
+
alias="orgEntity"
|
22
|
+
)
|
23
|
+
|
24
|
+
|
25
|
+
class RegistryVersionsOrganizationOrgEntity(GQLBase):
|
26
|
+
name: str
|
27
|
+
artifact_memberships: Optional[RegistryVersionsPage] = Field(
|
28
|
+
alias="artifactMemberships"
|
29
|
+
)
|
30
|
+
|
31
|
+
|
32
|
+
RegistryVersions.model_rebuild()
|
33
|
+
RegistryVersionsOrganization.model_rebuild()
|
34
|
+
RegistryVersionsOrganizationOrgEntity.model_rebuild()
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# Generated by ariadne-codegen
|
2
|
+
# Source: tools/graphql_codegen/artifacts/
|
3
|
+
|
4
|
+
from __future__ import annotations
|
5
|
+
|
6
|
+
from typing import Optional
|
7
|
+
|
8
|
+
from pydantic import Field
|
9
|
+
|
10
|
+
from wandb._pydantic import GQLBase, GQLId
|
11
|
+
|
12
|
+
|
13
|
+
class UnlinkArtifact(GQLBase):
|
14
|
+
unlink_artifact: Optional[UnlinkArtifactUnlinkArtifact] = Field(
|
15
|
+
alias="unlinkArtifact"
|
16
|
+
)
|
17
|
+
|
18
|
+
|
19
|
+
class UnlinkArtifactUnlinkArtifact(GQLBase):
|
20
|
+
artifact_id: GQLId = Field(alias="artifactID")
|
21
|
+
success: bool
|
22
|
+
client_mutation_id: Optional[str] = Field(alias="clientMutationId")
|
23
|
+
|
24
|
+
|
25
|
+
UnlinkArtifact.model_rebuild()
|
@@ -1,10 +1,5 @@
|
|
1
1
|
from __future__ import annotations
|
2
2
|
|
3
|
-
from textwrap import dedent
|
4
|
-
|
5
|
-
from wandb_graphql.language.printer import print_ast
|
6
|
-
|
7
|
-
from wandb.apis.public.utils import gql_compat
|
8
3
|
from wandb.sdk.internal.internal_api import Api as InternalApi
|
9
4
|
|
10
5
|
OMITTABLE_ARTIFACT_FIELDS = frozenset(
|
@@ -18,85 +13,7 @@ OMITTABLE_ARTIFACT_FIELDS = frozenset(
|
|
18
13
|
)
|
19
14
|
|
20
15
|
|
21
|
-
def omit_artifact_fields(api: InternalApi) -> set[str]:
|
16
|
+
def omit_artifact_fields(api: InternalApi | None = None) -> set[str]:
|
22
17
|
"""Return names of Artifact fields to remove from GraphQL requests (for server compatibility)."""
|
23
|
-
allowed_fields =
|
24
|
-
return set(OMITTABLE_ARTIFACT_FIELDS - allowed_fields)
|
25
|
-
|
26
|
-
|
27
|
-
def _gql_artifact_fragment(include_aliases: bool = True) -> str:
|
28
|
-
"""Return a GraphQL query fragment with all parseable Artifact attributes."""
|
29
|
-
omit_fields = omit_artifact_fields(api=InternalApi())
|
30
|
-
|
31
|
-
# Respect the `include_aliases` flag
|
32
|
-
if not include_aliases:
|
33
|
-
omit_fields.add("aliases")
|
34
|
-
|
35
|
-
artifact_fragment_str = dedent(
|
36
|
-
"""\
|
37
|
-
fragment ArtifactFragment on Artifact {
|
38
|
-
id
|
39
|
-
artifactSequence {
|
40
|
-
project {
|
41
|
-
entityName
|
42
|
-
name
|
43
|
-
}
|
44
|
-
name
|
45
|
-
}
|
46
|
-
versionIndex
|
47
|
-
artifactType {
|
48
|
-
name
|
49
|
-
}
|
50
|
-
description
|
51
|
-
metadata
|
52
|
-
ttlDurationSeconds
|
53
|
-
ttlIsInherited
|
54
|
-
aliases {
|
55
|
-
artifactCollection {
|
56
|
-
project {
|
57
|
-
entityName
|
58
|
-
name
|
59
|
-
}
|
60
|
-
name
|
61
|
-
}
|
62
|
-
alias
|
63
|
-
}
|
64
|
-
tags {
|
65
|
-
name
|
66
|
-
}
|
67
|
-
historyStep
|
68
|
-
state
|
69
|
-
currentManifest {
|
70
|
-
file {
|
71
|
-
directUrl
|
72
|
-
}
|
73
|
-
}
|
74
|
-
commitHash
|
75
|
-
fileCount
|
76
|
-
createdAt
|
77
|
-
updatedAt
|
78
|
-
}"""
|
79
|
-
)
|
80
|
-
compat_doc = gql_compat(artifact_fragment_str, omit_fields=omit_fields)
|
81
|
-
return print_ast(compat_doc)
|
82
|
-
|
83
|
-
|
84
|
-
def _gql_registry_fragment() -> str:
|
85
|
-
return """
|
86
|
-
fragment RegistryFragment on Project {
|
87
|
-
id
|
88
|
-
allowAllArtifactTypesInRegistry
|
89
|
-
artifactTypes(includeAll: true) {
|
90
|
-
edges {
|
91
|
-
node {
|
92
|
-
name
|
93
|
-
}
|
94
|
-
}
|
95
|
-
}
|
96
|
-
name
|
97
|
-
description
|
98
|
-
createdAt
|
99
|
-
updatedAt
|
100
|
-
access
|
101
|
-
}
|
102
|
-
"""
|
18
|
+
allowed_fields = (api or InternalApi()).server_artifact_introspection()
|
19
|
+
return set(OMITTABLE_ARTIFACT_FIELDS) - set(allowed_fields)
|
@@ -12,7 +12,7 @@ from pydantic.dataclasses import dataclass as pydantic_dataclass
|
|
12
12
|
from typing_extensions import Self
|
13
13
|
|
14
14
|
from wandb._iterutils import always_list
|
15
|
-
from wandb._pydantic import gql_typename
|
15
|
+
from wandb._pydantic import from_json, gql_typename
|
16
16
|
from wandb.util import json_friendly_val
|
17
17
|
|
18
18
|
from ._generated import ArtifactPortfolioTypeFields, ArtifactSequenceTypeFields
|
@@ -207,9 +207,11 @@ def validate_metadata(metadata: dict[str, Any] | None) -> dict[str, Any]:
|
|
207
207
|
"""Validate the artifact metadata and return it as a dict."""
|
208
208
|
if metadata is None:
|
209
209
|
return {}
|
210
|
-
if
|
211
|
-
|
212
|
-
|
210
|
+
if isinstance(metadata, str):
|
211
|
+
return from_json(metadata) if metadata else {}
|
212
|
+
if isinstance(metadata, dict):
|
213
|
+
return cast(Dict[str, Any], json.loads(json.dumps(json_friendly_val(metadata))))
|
214
|
+
raise TypeError(f"metadata must be dict, not {type(metadata)}")
|
213
215
|
|
214
216
|
|
215
217
|
def validate_ttl_duration_seconds(gql_ttl_duration_seconds: int | None) -> int | None:
|