wandb 0.19.10__py3-none-macosx_11_0_arm64.whl → 0.19.11__py3-none-macosx_11_0_arm64.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 +3 -3
- wandb/_pydantic/__init__.py +2 -3
- wandb/_pydantic/base.py +11 -31
- wandb/_pydantic/utils.py +8 -1
- wandb/_pydantic/v1_compat.py +3 -3
- wandb/apis/public/api.py +590 -22
- wandb/apis/public/artifacts.py +13 -5
- wandb/apis/public/automations.py +1 -1
- wandb/apis/public/integrations.py +22 -10
- wandb/apis/public/registries/__init__.py +0 -0
- wandb/apis/public/registries/_freezable_list.py +179 -0
- wandb/apis/public/{registries.py → registries/registries_search.py} +22 -129
- wandb/apis/public/registries/registry.py +357 -0
- wandb/apis/public/registries/utils.py +140 -0
- wandb/apis/public/runs.py +58 -56
- wandb/automations/__init__.py +16 -24
- wandb/automations/_filters/expressions.py +12 -10
- wandb/automations/_filters/operators.py +10 -19
- wandb/automations/_filters/run_metrics.py +231 -82
- wandb/automations/_generated/__init__.py +27 -34
- wandb/automations/_generated/create_automation.py +17 -0
- wandb/automations/_generated/delete_automation.py +17 -0
- wandb/automations/_generated/fragments.py +40 -25
- wandb/automations/_generated/{get_triggers.py → get_automations.py} +5 -5
- wandb/automations/_generated/{get_triggers_by_entity.py → get_automations_by_entity.py} +7 -5
- wandb/automations/_generated/operations.py +35 -98
- wandb/automations/_generated/update_automation.py +17 -0
- wandb/automations/_utils.py +178 -64
- wandb/automations/_validators.py +94 -2
- wandb/automations/actions.py +113 -98
- wandb/automations/automations.py +47 -69
- wandb/automations/events.py +139 -87
- wandb/automations/integrations.py +23 -4
- wandb/automations/scopes.py +22 -20
- wandb/bin/gpu_stats +0 -0
- wandb/bin/wandb-core +0 -0
- wandb/env.py +11 -0
- wandb/old/settings.py +4 -1
- wandb/proto/v3/wandb_internal_pb2.py +240 -236
- wandb/proto/v3/wandb_telemetry_pb2.py +10 -10
- wandb/proto/v4/wandb_internal_pb2.py +236 -236
- wandb/proto/v4/wandb_telemetry_pb2.py +10 -10
- wandb/proto/v5/wandb_internal_pb2.py +236 -236
- wandb/proto/v5/wandb_telemetry_pb2.py +10 -10
- wandb/proto/v6/wandb_internal_pb2.py +236 -236
- wandb/proto/v6/wandb_telemetry_pb2.py +10 -10
- wandb/sdk/artifacts/_generated/__init__.py +42 -1
- wandb/sdk/artifacts/_generated/add_aliases.py +21 -0
- wandb/sdk/artifacts/_generated/delete_aliases.py +21 -0
- wandb/sdk/artifacts/_generated/fetch_linked_artifacts.py +67 -0
- wandb/sdk/artifacts/_generated/fragments.py +35 -0
- wandb/sdk/artifacts/_generated/input_types.py +12 -0
- wandb/sdk/artifacts/_generated/operations.py +101 -0
- wandb/sdk/artifacts/_generated/update_artifact.py +26 -0
- wandb/sdk/artifacts/_graphql_fragments.py +1 -0
- wandb/sdk/artifacts/_validators.py +120 -1
- wandb/sdk/artifacts/artifact.py +380 -203
- wandb/sdk/artifacts/artifact_file_cache.py +4 -6
- wandb/sdk/artifacts/artifact_manifest_entry.py +11 -2
- wandb/sdk/artifacts/storage_policies/wandb_storage_policy.py +182 -1
- wandb/sdk/artifacts/storage_policy.py +3 -0
- wandb/sdk/data_types/video.py +46 -32
- wandb/sdk/interface/interface.py +2 -3
- wandb/sdk/internal/internal_api.py +21 -31
- wandb/sdk/internal/sender.py +5 -2
- wandb/sdk/launch/sweeps/utils.py +8 -0
- wandb/sdk/projects/_generated/__init__.py +47 -0
- wandb/sdk/projects/_generated/delete_project.py +22 -0
- wandb/sdk/projects/_generated/enums.py +4 -0
- wandb/sdk/projects/_generated/fetch_registry.py +22 -0
- wandb/sdk/projects/_generated/fragments.py +41 -0
- wandb/sdk/projects/_generated/input_types.py +13 -0
- wandb/sdk/projects/_generated/operations.py +88 -0
- wandb/sdk/projects/_generated/rename_project.py +27 -0
- wandb/sdk/projects/_generated/upsert_registry_project.py +27 -0
- wandb/sdk/service/service.py +9 -1
- wandb/sdk/wandb_init.py +32 -5
- wandb/sdk/wandb_run.py +37 -9
- wandb/sdk/wandb_settings.py +6 -7
- wandb/sdk/wandb_setup.py +12 -0
- wandb/util.py +7 -3
- {wandb-0.19.10.dist-info → wandb-0.19.11.dist-info}/METADATA +1 -1
- {wandb-0.19.10.dist-info → wandb-0.19.11.dist-info}/RECORD +87 -70
- wandb/automations/_generated/create_filter_trigger.py +0 -21
- wandb/automations/_generated/delete_trigger.py +0 -19
- wandb/automations/_generated/update_filter_trigger.py +0 -21
- {wandb-0.19.10.dist-info → wandb-0.19.11.dist-info}/WHEEL +0 -0
- {wandb-0.19.10.dist-info → wandb-0.19.11.dist-info}/entry_points.txt +0 -0
- {wandb-0.19.10.dist-info → wandb-0.19.11.dist-info}/licenses/LICENSE +0 -0
wandb/__init__.py
CHANGED
wandb/__init__.pyi
CHANGED
@@ -106,7 +106,7 @@ if TYPE_CHECKING:
|
|
106
106
|
import wandb
|
107
107
|
from wandb.plot import CustomChart
|
108
108
|
|
109
|
-
__version__: str = "0.19.
|
109
|
+
__version__: str = "0.19.11"
|
110
110
|
|
111
111
|
run: Run | None
|
112
112
|
config: wandb_config.Config
|
@@ -1078,7 +1078,7 @@ def link_model(
|
|
1078
1078
|
registered_model_name: str,
|
1079
1079
|
name: str | None = None,
|
1080
1080
|
aliases: list[str] | None = None,
|
1081
|
-
) -> None:
|
1081
|
+
) -> Artifact | None:
|
1082
1082
|
"""Log a model artifact version and link it to a registered model in the model registry.
|
1083
1083
|
|
1084
1084
|
The linked model version will be visible in the UI for the specified registered model.
|
@@ -1140,7 +1140,7 @@ def link_model(
|
|
1140
1140
|
ValueError: if name has invalid special characters
|
1141
1141
|
|
1142
1142
|
Returns:
|
1143
|
-
None
|
1143
|
+
The linked artifact if linking was successful, otherwise None.
|
1144
1144
|
"""
|
1145
1145
|
...
|
1146
1146
|
|
wandb/_pydantic/__init__.py
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
"""Internal utilities for working with pydantic."""
|
2
2
|
|
3
3
|
from .base import (
|
4
|
-
Base,
|
5
4
|
CompatBaseModel,
|
6
5
|
GQLBase,
|
7
6
|
GQLId,
|
@@ -9,13 +8,12 @@ from .base import (
|
|
9
8
|
Typename,
|
10
9
|
ensure_json,
|
11
10
|
)
|
12
|
-
from .utils import IS_PYDANTIC_V2, pydantic_isinstance, to_json
|
11
|
+
from .utils import IS_PYDANTIC_V2, from_json, pydantic_isinstance, to_json
|
13
12
|
from .v1_compat import AliasChoices, computed_field, field_validator, model_validator
|
14
13
|
|
15
14
|
__all__ = [
|
16
15
|
"IS_PYDANTIC_V2",
|
17
16
|
"CompatBaseModel",
|
18
|
-
"Base",
|
19
17
|
"GQLBase",
|
20
18
|
"Typename",
|
21
19
|
"GQLId",
|
@@ -26,5 +24,6 @@ __all__ = [
|
|
26
24
|
"model_validator",
|
27
25
|
"pydantic_isinstance",
|
28
26
|
"to_json",
|
27
|
+
"from_json",
|
29
28
|
"ensure_json",
|
30
29
|
]
|
wandb/_pydantic/base.py
CHANGED
@@ -42,17 +42,20 @@ class CompatBaseModel(PydanticCompatMixin, BaseModel):
|
|
42
42
|
__doc__ = None # Prevent subclasses from inheriting the BaseModel docstring
|
43
43
|
|
44
44
|
|
45
|
-
# Base class for all generated
|
45
|
+
# Base class for all GraphQL-generated types.
|
46
46
|
# Omitted from docstring to avoid inclusion in generated docs.
|
47
|
-
class
|
47
|
+
class GQLBase(CompatBaseModel):
|
48
48
|
model_config = ConfigDict(
|
49
|
-
populate_by_name=True,
|
49
|
+
populate_by_name=True, # Discouraged in pydantic v2.11+, will be deprecated in v3
|
50
|
+
validate_by_name=True, # Introduced in pydantic v2.11
|
51
|
+
validate_by_alias=True, # Introduced in pydantic v2.11
|
52
|
+
serialize_by_alias=True, # Introduced in pydantic v2.11
|
50
53
|
validate_assignment=True,
|
51
54
|
validate_default=True,
|
52
|
-
extra="forbid",
|
53
55
|
use_attribute_docstrings=True,
|
54
56
|
from_attributes=True,
|
55
57
|
revalidate_instances="always",
|
58
|
+
protected_namespaces=(), # Some GraphQL fields may begin with "model_"
|
56
59
|
)
|
57
60
|
|
58
61
|
@override
|
@@ -76,20 +79,11 @@ class Base(CompatBaseModel):
|
|
76
79
|
return super().model_dump_json(indent=indent, **kwargs)
|
77
80
|
|
78
81
|
|
79
|
-
# Base class with extra customization for GQL generated types.
|
80
|
-
# Omitted from docstring to avoid inclusion in generated docs.
|
81
|
-
class GQLBase(Base):
|
82
|
-
model_config = ConfigDict(
|
83
|
-
extra="ignore",
|
84
|
-
protected_namespaces=(),
|
85
|
-
)
|
86
|
-
|
87
|
-
|
88
82
|
# ------------------------------------------------------------------------------
|
89
83
|
# Reusable annotations for field types
|
90
84
|
T = TypeVar("T")
|
91
85
|
|
92
|
-
if IS_PYDANTIC_V2:
|
86
|
+
if IS_PYDANTIC_V2 or TYPE_CHECKING:
|
93
87
|
GQLId = Annotated[
|
94
88
|
StrictStr,
|
95
89
|
Field(repr=False, frozen=True),
|
@@ -121,28 +115,14 @@ def ensure_json(v: Any) -> Any:
|
|
121
115
|
|
122
116
|
|
123
117
|
if IS_PYDANTIC_V2 or TYPE_CHECKING:
|
124
|
-
from pydantic import BeforeValidator
|
118
|
+
from pydantic import BeforeValidator, PlainSerializer
|
125
119
|
|
126
120
|
SerializedToJson = Annotated[
|
127
121
|
Json[T],
|
128
122
|
# Allow lenient instantiation/validation: incoming data may already be deserialized.
|
129
123
|
BeforeValidator(ensure_json),
|
124
|
+
PlainSerializer(to_json),
|
130
125
|
]
|
131
126
|
else:
|
127
|
+
# FIXME: Restore, modify, or replace this later after ensuring pydantic v1 compatibility.
|
132
128
|
SerializedToJson = Json[T] # type: ignore[misc]
|
133
|
-
|
134
|
-
# FIXME: Restore, modify, or replace this later after ensuring pydantic v1 compatibility.
|
135
|
-
# def validate_maybe_json(v: Any, handler: ValidatorFunctionWrapHandler) -> Any:
|
136
|
-
# """Wraps default Json[...] field validator to allow instantiation with an already-decoded value."""
|
137
|
-
# try:
|
138
|
-
# return handler(v)
|
139
|
-
# except ValidationError:
|
140
|
-
# # Try revalidating after properly jsonifying the value
|
141
|
-
# return handler(to_json(v, by_alias=True, round_trip=True))
|
142
|
-
#
|
143
|
-
#
|
144
|
-
# SerializedToJson = Annotated[
|
145
|
-
# Json[T],
|
146
|
-
# # Allow lenient instantiation/validation: incoming data may already be deserialized.
|
147
|
-
# WrapValidator(validate_maybe_json),
|
148
|
-
# ]
|
wandb/_pydantic/utils.py
CHANGED
@@ -23,8 +23,12 @@ BaseModelType: TypeAlias = Type[BaseModel]
|
|
23
23
|
if IS_PYDANTIC_V2:
|
24
24
|
import pydantic_core # pydantic_core is only installed by pydantic v2
|
25
25
|
|
26
|
+
def from_json(s: str) -> Any:
|
27
|
+
"""Quickly deserialize a JSON string to a Python object."""
|
28
|
+
return pydantic_core.from_json(s)
|
29
|
+
|
26
30
|
def to_json(v: Any) -> str:
|
27
|
-
"""
|
31
|
+
"""Quickly serialize a (possibly Pydantic) object to a JSON string."""
|
28
32
|
return pydantic_core.to_json(v, by_alias=True, round_trip=True).decode("utf-8")
|
29
33
|
|
30
34
|
def pydantic_isinstance(
|
@@ -52,6 +56,9 @@ else:
|
|
52
56
|
|
53
57
|
from pydantic.json import pydantic_encoder # Only valid in pydantic v1
|
54
58
|
|
59
|
+
def from_json(s: str) -> Any:
|
60
|
+
return json.loads(s)
|
61
|
+
|
55
62
|
def to_json(v: Any) -> str:
|
56
63
|
return json.dumps(v, default=pydantic_encoder)
|
57
64
|
|
wandb/_pydantic/v1_compat.py
CHANGED
@@ -101,7 +101,7 @@ class V1MixinMetaclass(PydanticModelMetaclass):
|
|
101
101
|
|
102
102
|
@property
|
103
103
|
def model_fields(self) -> dict[str, Any]:
|
104
|
-
return self.__fields__
|
104
|
+
return self.__fields__ # type: ignore[deprecated]
|
105
105
|
|
106
106
|
|
107
107
|
# Mixin to ensure compatibility of Pydantic models if Pydantic v1 is detected.
|
@@ -117,7 +117,7 @@ class V1Mixin(metaclass=V1MixinMetaclass):
|
|
117
117
|
"""Reserialize values from `Json`-typed fields after dumping the model to dict."""
|
118
118
|
# Get the expected keys (after `.model_dump()`) for `Json`-typed fields.
|
119
119
|
# Note: In v1, `Json` fields have `ModelField.parse_json == True`
|
120
|
-
json_fields = (f for f in cls.__fields__.values() if f.parse_json)
|
120
|
+
json_fields = (f for f in cls.__fields__.values() if f.parse_json) # type: ignore[deprecated]
|
121
121
|
get_key = attrgetter("alias" if by_alias else "name")
|
122
122
|
json_field_keys = set(map(get_key, json_fields))
|
123
123
|
|
@@ -213,7 +213,7 @@ else:
|
|
213
213
|
check_fields: bool | None = None,
|
214
214
|
**_: Any,
|
215
215
|
) -> Callable:
|
216
|
-
return pydantic.validator(
|
216
|
+
return pydantic.validator( # type: ignore[deprecated]
|
217
217
|
field,
|
218
218
|
*fields,
|
219
219
|
pre=(mode == "before"),
|