wandb 0.19.7__py3-none-musllinux_1_2_aarch64.whl → 0.19.9__py3-none-musllinux_1_2_aarch64.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 +5 -1
- wandb/__init__.pyi +43 -9
- wandb/_pydantic/__init__.py +23 -0
- wandb/_pydantic/base.py +113 -0
- wandb/_pydantic/v1_compat.py +262 -0
- wandb/apis/paginator.py +82 -38
- wandb/apis/public/api.py +10 -64
- wandb/apis/public/artifacts.py +73 -17
- wandb/apis/public/files.py +2 -2
- wandb/apis/public/projects.py +3 -2
- wandb/apis/public/reports.py +2 -2
- wandb/apis/public/runs.py +19 -11
- wandb/bin/gpu_stats +0 -0
- wandb/bin/wandb-core +0 -0
- wandb/data_types.py +1 -1
- wandb/filesync/dir_watcher.py +2 -1
- wandb/integration/metaflow/metaflow.py +19 -17
- wandb/integration/sacred/__init__.py +1 -1
- wandb/jupyter.py +18 -15
- wandb/proto/v3/wandb_internal_pb2.py +7 -3
- wandb/proto/v3/wandb_settings_pb2.py +2 -2
- wandb/proto/v3/wandb_telemetry_pb2.py +10 -10
- wandb/proto/v4/wandb_internal_pb2.py +3 -3
- wandb/proto/v4/wandb_settings_pb2.py +2 -2
- wandb/proto/v4/wandb_telemetry_pb2.py +10 -10
- wandb/proto/v5/wandb_internal_pb2.py +3 -3
- wandb/proto/v5/wandb_settings_pb2.py +2 -2
- wandb/proto/v5/wandb_telemetry_pb2.py +10 -10
- wandb/proto/wandb_deprecated.py +2 -0
- wandb/sdk/artifacts/_graphql_fragments.py +18 -20
- wandb/sdk/artifacts/_validators.py +1 -0
- wandb/sdk/artifacts/artifact.py +81 -46
- wandb/sdk/artifacts/artifact_saver.py +16 -2
- wandb/sdk/artifacts/storage_policies/wandb_storage_policy.py +23 -2
- wandb/sdk/backend/backend.py +16 -5
- wandb/sdk/data_types/audio.py +1 -3
- wandb/sdk/data_types/base_types/media.py +11 -4
- wandb/sdk/data_types/image.py +44 -25
- wandb/sdk/data_types/molecule.py +1 -5
- wandb/sdk/data_types/object_3d.py +2 -1
- wandb/sdk/data_types/saved_model.py +7 -9
- wandb/sdk/data_types/video.py +1 -4
- wandb/sdk/interface/interface.py +65 -43
- wandb/sdk/interface/interface_queue.py +0 -7
- wandb/sdk/interface/interface_relay.py +6 -16
- wandb/sdk/interface/interface_shared.py +47 -40
- wandb/sdk/interface/interface_sock.py +1 -8
- wandb/sdk/interface/router.py +22 -54
- wandb/sdk/interface/router_queue.py +11 -10
- wandb/sdk/interface/router_relay.py +24 -12
- wandb/sdk/interface/router_sock.py +6 -11
- wandb/{apis/public → sdk/internal}/_generated/__init__.py +0 -6
- wandb/sdk/internal/_generated/base.py +226 -0
- wandb/{apis/public → sdk/internal}/_generated/server_features_query.py +3 -3
- wandb/{apis/public → sdk/internal}/_generated/typing_compat.py +1 -1
- wandb/sdk/internal/internal_api.py +138 -47
- wandb/sdk/internal/sender.py +5 -1
- wandb/sdk/internal/sender_config.py +8 -11
- wandb/sdk/internal/settings_static.py +24 -2
- wandb/sdk/lib/apikey.py +15 -16
- wandb/sdk/lib/console_capture.py +172 -0
- wandb/sdk/lib/redirect.py +102 -76
- wandb/sdk/lib/run_moment.py +4 -6
- wandb/sdk/lib/service_connection.py +37 -17
- wandb/sdk/lib/sock_client.py +2 -52
- wandb/sdk/lib/wb_logging.py +161 -0
- wandb/sdk/mailbox/__init__.py +3 -3
- wandb/sdk/mailbox/mailbox.py +31 -17
- wandb/sdk/mailbox/mailbox_handle.py +127 -0
- wandb/sdk/mailbox/{handles.py → response_handle.py} +34 -66
- wandb/sdk/mailbox/wait_with_progress.py +16 -15
- wandb/sdk/service/server_sock.py +4 -2
- wandb/sdk/service/streams.py +10 -5
- wandb/sdk/wandb_config.py +44 -43
- wandb/sdk/wandb_init.py +151 -92
- wandb/sdk/wandb_metadata.py +107 -91
- wandb/sdk/wandb_run.py +160 -54
- wandb/sdk/wandb_settings.py +410 -202
- wandb/sdk/wandb_setup.py +3 -1
- wandb/sdk/wandb_sync.py +1 -7
- {wandb-0.19.7.dist-info → wandb-0.19.9.dist-info}/METADATA +3 -3
- {wandb-0.19.7.dist-info → wandb-0.19.9.dist-info}/RECORD +644 -640
- wandb/apis/public/_generated/base.py +0 -128
- wandb/sdk/interface/message_future.py +0 -27
- wandb/sdk/interface/message_future_poll.py +0 -50
- /wandb/{apis/public → sdk/internal}/_generated/enums.py +0 -0
- /wandb/{apis/public → sdk/internal}/_generated/input_types.py +0 -0
- /wandb/{apis/public → sdk/internal}/_generated/operations.py +0 -0
- {wandb-0.19.7.dist-info → wandb-0.19.9.dist-info}/WHEEL +0 -0
- {wandb-0.19.7.dist-info → wandb-0.19.9.dist-info}/entry_points.txt +0 -0
- {wandb-0.19.7.dist-info → wandb-0.19.9.dist-info}/licenses/LICENSE +0 -0
@@ -1,128 +0,0 @@
|
|
1
|
-
# Generated by ariadne-codegen
|
2
|
-
|
3
|
-
from __future__ import annotations
|
4
|
-
|
5
|
-
from typing import Any, Literal, TypeVar
|
6
|
-
|
7
|
-
from pydantic import BaseModel, ConfigDict, Field, Json, ValidationError, WrapValidator
|
8
|
-
from pydantic.alias_generators import to_camel
|
9
|
-
from pydantic.main import IncEx
|
10
|
-
from pydantic_core import to_json
|
11
|
-
from pydantic_core.core_schema import ValidatorFunctionWrapHandler
|
12
|
-
|
13
|
-
from .typing_compat import Annotated, override
|
14
|
-
|
15
|
-
|
16
|
-
# Base class for all automation classes/types.
|
17
|
-
# Omitted from docstring to avoid inclusion in generated docs.
|
18
|
-
class Base(BaseModel):
|
19
|
-
model_config = ConfigDict(
|
20
|
-
populate_by_name=True,
|
21
|
-
validate_assignment=True,
|
22
|
-
validate_default=True,
|
23
|
-
extra="forbid",
|
24
|
-
alias_generator=to_camel,
|
25
|
-
use_attribute_docstrings=True,
|
26
|
-
from_attributes=True,
|
27
|
-
revalidate_instances="always",
|
28
|
-
)
|
29
|
-
|
30
|
-
@override
|
31
|
-
def model_dump(
|
32
|
-
self,
|
33
|
-
*,
|
34
|
-
mode: Literal["json", "python"] | str = "json", # NOTE: changed default
|
35
|
-
include: IncEx | None = None,
|
36
|
-
exclude: IncEx | None = None,
|
37
|
-
context: dict[str, Any] | None = None,
|
38
|
-
by_alias: bool = True, # NOTE: changed default
|
39
|
-
exclude_unset: bool = False,
|
40
|
-
exclude_defaults: bool = False,
|
41
|
-
exclude_none: bool = False,
|
42
|
-
round_trip: bool = True, # NOTE: changed default
|
43
|
-
warnings: bool | Literal["none", "warn", "error"] = True,
|
44
|
-
serialize_as_any: bool = False,
|
45
|
-
) -> dict[str, Any]:
|
46
|
-
return super().model_dump(
|
47
|
-
mode=mode,
|
48
|
-
include=include,
|
49
|
-
exclude=exclude,
|
50
|
-
context=context,
|
51
|
-
by_alias=by_alias,
|
52
|
-
exclude_unset=exclude_unset,
|
53
|
-
exclude_defaults=exclude_defaults,
|
54
|
-
exclude_none=exclude_none,
|
55
|
-
round_trip=round_trip,
|
56
|
-
warnings=warnings,
|
57
|
-
serialize_as_any=serialize_as_any,
|
58
|
-
)
|
59
|
-
|
60
|
-
@override
|
61
|
-
def model_dump_json(
|
62
|
-
self,
|
63
|
-
*,
|
64
|
-
indent: int | None = None,
|
65
|
-
include: IncEx | None = None,
|
66
|
-
exclude: IncEx | None = None,
|
67
|
-
context: dict[str, Any] | None = None,
|
68
|
-
by_alias: bool = True, # NOTE: changed default
|
69
|
-
exclude_unset: bool = False,
|
70
|
-
exclude_defaults: bool = False,
|
71
|
-
exclude_none: bool = False,
|
72
|
-
round_trip: bool = True, # NOTE: changed default
|
73
|
-
warnings: bool | Literal["none", "warn", "error"] = True,
|
74
|
-
serialize_as_any: bool = False,
|
75
|
-
) -> str:
|
76
|
-
return super().model_dump_json(
|
77
|
-
indent=indent,
|
78
|
-
include=include,
|
79
|
-
exclude=exclude,
|
80
|
-
context=context,
|
81
|
-
by_alias=by_alias,
|
82
|
-
exclude_unset=exclude_unset,
|
83
|
-
exclude_defaults=exclude_defaults,
|
84
|
-
exclude_none=exclude_none,
|
85
|
-
round_trip=round_trip,
|
86
|
-
warnings=warnings,
|
87
|
-
serialize_as_any=serialize_as_any,
|
88
|
-
)
|
89
|
-
|
90
|
-
|
91
|
-
# Base class with extra customization for GQL generated types.
|
92
|
-
# Omitted from docstring to avoid inclusion in generated docs.
|
93
|
-
class GQLBase(Base):
|
94
|
-
model_config = ConfigDict(
|
95
|
-
extra="ignore",
|
96
|
-
protected_namespaces=(),
|
97
|
-
)
|
98
|
-
|
99
|
-
|
100
|
-
# ------------------------------------------------------------------------------
|
101
|
-
# Reusable annotations for field types
|
102
|
-
T = TypeVar("T")
|
103
|
-
|
104
|
-
GQLId = Annotated[
|
105
|
-
str,
|
106
|
-
Field(repr=False, strict=True, frozen=True),
|
107
|
-
]
|
108
|
-
|
109
|
-
Typename = Annotated[
|
110
|
-
T,
|
111
|
-
Field(repr=False, alias="__typename", frozen=True),
|
112
|
-
]
|
113
|
-
|
114
|
-
|
115
|
-
def validate_maybe_json(v: Any, handler: ValidatorFunctionWrapHandler) -> Any:
|
116
|
-
"""Wraps default Json[...] field validator to allow instantiation with an already-decoded value."""
|
117
|
-
try:
|
118
|
-
return handler(v)
|
119
|
-
except ValidationError:
|
120
|
-
# Try revalidating after properly jsonifying the value
|
121
|
-
return handler(to_json(v, by_alias=True, round_trip=True))
|
122
|
-
|
123
|
-
|
124
|
-
SerializedToJson = Annotated[
|
125
|
-
Json[T],
|
126
|
-
# Allow lenient instantiation/validation: incoming data may already be deserialized.
|
127
|
-
WrapValidator(validate_maybe_json),
|
128
|
-
]
|
@@ -1,27 +0,0 @@
|
|
1
|
-
"""MessageFuture - represents a message result of an asynchronous operation.
|
2
|
-
|
3
|
-
Base class MessageFuture for MessageFutureObject and MessageFuturePoll
|
4
|
-
|
5
|
-
"""
|
6
|
-
|
7
|
-
import threading
|
8
|
-
from abc import abstractmethod
|
9
|
-
from typing import Optional
|
10
|
-
|
11
|
-
from wandb.proto import wandb_internal_pb2 as pb
|
12
|
-
|
13
|
-
|
14
|
-
class MessageFuture:
|
15
|
-
_object: Optional[pb.Result]
|
16
|
-
|
17
|
-
def __init__(self) -> None:
|
18
|
-
self._object = None
|
19
|
-
self._object_ready = threading.Event()
|
20
|
-
|
21
|
-
def _set_object(self, obj: pb.Result) -> None:
|
22
|
-
self._object = obj
|
23
|
-
self._object_ready.set()
|
24
|
-
|
25
|
-
@abstractmethod
|
26
|
-
def get(self, timeout: Optional[int] = None) -> Optional[pb.Result]:
|
27
|
-
raise NotImplementedError
|
@@ -1,50 +0,0 @@
|
|
1
|
-
"""MessageFuturePoll - Derived from MessageFuture but implementing polling loop.
|
2
|
-
|
3
|
-
MessageFuture represents a message result of an asynchronous operation.
|
4
|
-
|
5
|
-
MessageFuturePoll implements a polling loop to periodically query for a
|
6
|
-
completed async operation.
|
7
|
-
|
8
|
-
"""
|
9
|
-
|
10
|
-
import time
|
11
|
-
from typing import Any, Optional
|
12
|
-
|
13
|
-
from wandb.proto import wandb_internal_pb2 as pb
|
14
|
-
|
15
|
-
from .message_future import MessageFuture
|
16
|
-
|
17
|
-
|
18
|
-
class MessageFuturePoll(MessageFuture):
|
19
|
-
_fn: Any
|
20
|
-
_xid: str
|
21
|
-
|
22
|
-
def __init__(self, fn: Any, xid: str) -> None:
|
23
|
-
super().__init__()
|
24
|
-
self._fn = fn
|
25
|
-
self._xid = xid
|
26
|
-
|
27
|
-
def get(self, timeout: Optional[int] = None) -> Optional[pb.Result]:
|
28
|
-
self._poll(timeout=timeout)
|
29
|
-
if self._object_ready.is_set():
|
30
|
-
return self._object
|
31
|
-
return None
|
32
|
-
|
33
|
-
def _poll(self, timeout: Optional[int] = None) -> None:
|
34
|
-
if self._object_ready.is_set():
|
35
|
-
return
|
36
|
-
done = False
|
37
|
-
start_time = time.time()
|
38
|
-
sleep_time = 0.5
|
39
|
-
while not done:
|
40
|
-
result = self._fn(xid=self._xid)
|
41
|
-
if result:
|
42
|
-
self._set_object(result)
|
43
|
-
done = True
|
44
|
-
continue
|
45
|
-
now_time = time.time()
|
46
|
-
if timeout and start_time - now_time > timeout:
|
47
|
-
done = True
|
48
|
-
continue
|
49
|
-
time.sleep(sleep_time)
|
50
|
-
sleep_time = min(sleep_time * 2, 5)
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|