wandb 0.18.7__py3-none-win32.whl → 0.19.0__py3-none-win32.whl
Sign up to get free protection for your applications and to get access to all the features.
- package_readme.md +8 -0
- wandb/__init__.py +5 -7
- wandb/__init__.pyi +51 -30
- wandb/analytics/sentry.py +4 -10
- wandb/apis/importers/internals/internal.py +6 -6
- wandb/apis/importers/internals/protocols.py +11 -7
- wandb/apis/public/jobs.py +1 -7
- wandb/apis/public/reports.py +6 -17
- wandb/apis/public/runs.py +12 -10
- wandb/bin/gpu_stats.exe +0 -0
- wandb/bin/wandb-core +0 -0
- wandb/cli/cli.py +9 -45
- wandb/env.py +3 -5
- wandb/errors/links.py +1 -1
- wandb/errors/term.py +1 -6
- wandb/filesync/dir_watcher.py +3 -3
- wandb/filesync/step_upload.py +2 -5
- wandb/integration/fastai/__init__.py +1 -6
- wandb/integration/gym/__init__.py +1 -7
- wandb/integration/keras/callbacks/metrics_logger.py +1 -8
- wandb/integration/keras/callbacks/model_checkpoint.py +1 -8
- wandb/integration/keras/keras.py +3 -5
- wandb/integration/lightgbm/__init__.py +1 -1
- wandb/integration/sb3/sb3.py +1 -7
- wandb/integration/sklearn/utils.py +1 -1
- wandb/integration/tensorboard/log.py +1 -2
- wandb/integration/torch/wandb_torch.py +1 -1
- wandb/integration/ultralytics/bbox_utils.py +9 -2
- wandb/jupyter.py +4 -4
- wandb/proto/v3/wandb_internal_pb2.py +31 -31
- wandb/proto/v3/wandb_settings_pb2.py +2 -2
- wandb/proto/v4/wandb_internal_pb2.py +31 -31
- wandb/proto/v4/wandb_settings_pb2.py +2 -2
- wandb/proto/v5/wandb_internal_pb2.py +31 -31
- wandb/proto/v5/wandb_settings_pb2.py +2 -2
- wandb/proto/wandb_deprecated.py +1 -11
- wandb/proto/wandb_generate_deprecated.py +3 -7
- wandb/sdk/artifacts/artifact.py +2 -10
- wandb/sdk/artifacts/artifact_file_cache.py +2 -5
- wandb/sdk/artifacts/artifact_saver.py +2 -6
- wandb/sdk/artifacts/storage_handlers/gcs_handler.py +2 -4
- wandb/sdk/artifacts/storage_handlers/local_file_handler.py +2 -4
- wandb/sdk/artifacts/storage_handlers/s3_handler.py +2 -4
- wandb/sdk/backend/backend.py +1 -1
- wandb/sdk/data_types/histogram.py +1 -3
- wandb/sdk/data_types/object_3d.py +2 -6
- wandb/sdk/data_types/table.py +1 -1
- wandb/sdk/data_types/utils.py +1 -2
- wandb/sdk/data_types/video.py +15 -4
- wandb/sdk/integration_utils/auto_logging.py +1 -8
- wandb/sdk/interface/interface.py +12 -5
- wandb/sdk/interface/interface_shared.py +9 -0
- wandb/sdk/internal/file_stream.py +1 -4
- wandb/sdk/internal/flow_control.py +1 -1
- wandb/sdk/internal/handler.py +7 -2
- wandb/sdk/internal/internal.py +3 -3
- wandb/sdk/internal/internal_api.py +3 -10
- wandb/sdk/internal/job_builder.py +20 -12
- wandb/sdk/internal/progress.py +1 -5
- wandb/sdk/internal/sender.py +9 -13
- wandb/sdk/internal/settings_static.py +4 -10
- wandb/sdk/internal/system/assets/cpu.py +2 -2
- wandb/sdk/internal/system/assets/disk.py +3 -3
- wandb/sdk/internal/system/assets/gpu.py +7 -7
- wandb/sdk/internal/system/assets/gpu_amd.py +1 -7
- wandb/sdk/internal/system/assets/interfaces.py +11 -13
- wandb/sdk/internal/system/assets/ipu.py +1 -1
- wandb/sdk/internal/system/assets/memory.py +2 -2
- wandb/sdk/internal/system/assets/open_metrics.py +2 -8
- wandb/sdk/internal/system/assets/trainium.py +3 -9
- wandb/sdk/internal/system/system_info.py +14 -13
- wandb/sdk/internal/system/system_monitor.py +5 -12
- wandb/sdk/internal/tb_watcher.py +1 -1
- wandb/sdk/internal/writer.py +1 -1
- wandb/sdk/launch/agent/run_queue_item_file_saver.py +1 -7
- wandb/sdk/launch/create_job.py +2 -3
- wandb/sdk/launch/runner/abstract.py +1 -6
- wandb/sdk/launch/runner/kubernetes_monitor.py +2 -4
- wandb/sdk/lib/apikey.py +2 -6
- wandb/sdk/lib/fsm.py +12 -6
- wandb/sdk/lib/ipython.py +1 -6
- wandb/sdk/lib/module.py +0 -3
- wandb/sdk/lib/progress.py +2 -3
- wandb/sdk/lib/run_moment.py +1 -7
- wandb/sdk/lib/server.py +10 -24
- wandb/sdk/service/server.py +1 -1
- wandb/sdk/service/service.py +5 -5
- wandb/sdk/wandb_init.py +215 -166
- wandb/sdk/wandb_login.py +17 -27
- wandb/sdk/wandb_run.py +90 -116
- wandb/sdk/wandb_settings.py +978 -1778
- wandb/sdk/wandb_setup.py +86 -89
- wandb/sdk/wandb_watch.py +1 -1
- wandb/sync/sync.py +1 -2
- wandb/util.py +6 -39
- wandb/wandb_controller.py +10 -12
- {wandb-0.18.7.dist-info → wandb-0.19.0.dist-info}/METADATA +14 -4
- {wandb-0.18.7.dist-info → wandb-0.19.0.dist-info}/RECORD +101 -106
- {wandb-0.18.7.dist-info → wandb-0.19.0.dist-info}/WHEEL +1 -1
- wandb/integration/magic.py +0 -556
- wandb/magic.py +0 -3
- wandb/sdk/lib/_settings_toposort_generate.py +0 -159
- wandb/sdk/lib/_settings_toposort_generated.py +0 -251
- wandb/sdk/lib/reporting.py +0 -99
- {wandb-0.18.7.dist-info → wandb-0.19.0.dist-info}/entry_points.txt +0 -0
- {wandb-0.18.7.dist-info → wandb-0.19.0.dist-info}/licenses/LICENSE +0 -0
wandb/sdk/lib/ipython.py
CHANGED
wandb/sdk/lib/module.py
CHANGED
@@ -14,7 +14,6 @@ def set_global(
|
|
14
14
|
log_artifact=None,
|
15
15
|
define_metric=None,
|
16
16
|
alert=None,
|
17
|
-
plot_table=None,
|
18
17
|
mark_preempting=None,
|
19
18
|
log_model=None,
|
20
19
|
use_model=None,
|
@@ -38,8 +37,6 @@ def set_global(
|
|
38
37
|
wandb.log_artifact = log_artifact
|
39
38
|
if define_metric:
|
40
39
|
wandb.define_metric = define_metric
|
41
|
-
if plot_table:
|
42
|
-
wandb.plot_table = plot_table
|
43
40
|
if alert:
|
44
41
|
wandb.alert = alert
|
45
42
|
if mark_preempting:
|
wandb/sdk/lib/progress.py
CHANGED
@@ -50,7 +50,7 @@ class ProgressPrinter:
|
|
50
50
|
progress_text_area: p.DynamicText | None,
|
51
51
|
settings: wandb.Settings | None,
|
52
52
|
) -> None:
|
53
|
-
self._show_operation_stats = settings and settings.
|
53
|
+
self._show_operation_stats = settings and settings.x_show_operation_stats
|
54
54
|
self._printer = printer
|
55
55
|
self._progress_text_area = progress_text_area
|
56
56
|
self._tick = 0
|
@@ -189,8 +189,7 @@ class _DynamicOperationStatsPrinter:
|
|
189
189
|
total_operations += stats.total_operations
|
190
190
|
|
191
191
|
if self._ops_shown < total_operations:
|
192
|
-
|
193
|
-
if 1 <= self._max_lines and self._max_lines <= len(self._lines):
|
192
|
+
if 1 <= self._max_lines <= len(self._lines):
|
194
193
|
self._lines.pop()
|
195
194
|
|
196
195
|
remaining = total_operations - self._ops_shown
|
wandb/sdk/lib/run_moment.py
CHANGED
@@ -1,13 +1,7 @@
|
|
1
|
-
import sys
|
2
1
|
from dataclasses import dataclass
|
3
|
-
from typing import Union, cast
|
2
|
+
from typing import Literal, Union, cast
|
4
3
|
from urllib import parse
|
5
4
|
|
6
|
-
if sys.version_info >= (3, 8):
|
7
|
-
from typing import Literal
|
8
|
-
else:
|
9
|
-
from typing_extensions import Literal
|
10
|
-
|
11
5
|
_STEP = Literal["_step"]
|
12
6
|
|
13
7
|
|
wandb/sdk/lib/server.py
CHANGED
@@ -1,7 +1,9 @@
|
|
1
1
|
"""module server."""
|
2
2
|
|
3
|
+
from __future__ import annotations
|
4
|
+
|
3
5
|
import json
|
4
|
-
from typing import TYPE_CHECKING, Any
|
6
|
+
from typing import TYPE_CHECKING, Any
|
5
7
|
|
6
8
|
from wandb import util
|
7
9
|
from wandb.apis import InternalApi
|
@@ -10,43 +12,27 @@ if TYPE_CHECKING:
|
|
10
12
|
from wandb.sdk.wandb_settings import Settings
|
11
13
|
|
12
14
|
|
13
|
-
class ServerError(Exception):
|
14
|
-
pass
|
15
|
-
|
16
|
-
|
17
15
|
class Server:
|
18
16
|
def __init__(
|
19
17
|
self,
|
20
|
-
|
21
|
-
settings: Optional["Settings"] = None,
|
18
|
+
settings: Settings,
|
22
19
|
) -> None:
|
23
|
-
self._api =
|
24
|
-
self.
|
25
|
-
self.
|
26
|
-
self.
|
27
|
-
self._settings = settings
|
20
|
+
self._api = InternalApi(default_settings=settings)
|
21
|
+
self._viewer: dict[str, Any] = {}
|
22
|
+
self._flags: dict[str, Any] = {}
|
23
|
+
self._settings: Settings = settings
|
28
24
|
|
29
|
-
def query_with_timeout(self, timeout:
|
30
|
-
if self._settings
|
25
|
+
def query_with_timeout(self, timeout: int | float = 5) -> None:
|
26
|
+
if self._settings.x_disable_viewer:
|
31
27
|
return
|
32
|
-
timeout = timeout or 5
|
33
28
|
async_viewer = util.async_call(self._api.viewer_server_info, timeout=timeout)
|
34
29
|
try:
|
35
30
|
viewer_tuple, viewer_thread = async_viewer()
|
36
31
|
except Exception:
|
37
|
-
# TODO: currently a bare exception as lots can happen, we should classify
|
38
|
-
self._error_network = True
|
39
32
|
return
|
40
33
|
if viewer_thread.is_alive():
|
41
34
|
# this is likely a DNS hang
|
42
|
-
self._error_network = True
|
43
35
|
return
|
44
|
-
self._error_network = False
|
45
36
|
# TODO(jhr): should we kill the thread?
|
46
37
|
self._viewer, self._serverinfo = viewer_tuple
|
47
38
|
self._flags = json.loads(self._viewer.get("flags", "{}"))
|
48
|
-
|
49
|
-
def is_valid(self) -> bool:
|
50
|
-
if self._error_network is None:
|
51
|
-
raise Exception("invalid usage: must query server")
|
52
|
-
return self._error_network
|
wandb/sdk/service/server.py
CHANGED
@@ -76,7 +76,7 @@ class WandbServer:
|
|
76
76
|
def _setup_proctitle(self, sock_port: Optional[int]) -> None:
|
77
77
|
# TODO: the internal_process should have a better way to have access to
|
78
78
|
# settings.
|
79
|
-
disable_setproctitle = os.environ.get("
|
79
|
+
disable_setproctitle = os.environ.get("WANDB_X_DISABLE_SETPROCTITLE")
|
80
80
|
if disable_setproctitle:
|
81
81
|
return
|
82
82
|
|
wandb/sdk/service/service.py
CHANGED
@@ -76,7 +76,7 @@ class _Service:
|
|
76
76
|
ServiceStartProcessError: If the service process exits unexpectedly.
|
77
77
|
|
78
78
|
"""
|
79
|
-
time_max = time.monotonic() + self._settings.
|
79
|
+
time_max = time.monotonic() + self._settings.x_service_wait
|
80
80
|
while time.monotonic() < time_max:
|
81
81
|
if proc and proc.poll():
|
82
82
|
# process finished
|
@@ -97,7 +97,7 @@ class _Service:
|
|
97
97
|
f"The wandb service process exited with {proc.returncode}. "
|
98
98
|
"Ensure that `sys.executable` is a valid python interpreter. "
|
99
99
|
"You can override it with the `_executable` setting "
|
100
|
-
"or with the `
|
100
|
+
"or with the `WANDB_X_EXECUTABLE` environment variable."
|
101
101
|
f"\n{context}",
|
102
102
|
context=context,
|
103
103
|
)
|
@@ -120,7 +120,7 @@ class _Service:
|
|
120
120
|
return
|
121
121
|
raise ServiceStartTimeoutError(
|
122
122
|
"Timed out waiting for wandb service to start after "
|
123
|
-
f"{self._settings.
|
123
|
+
f"{self._settings.x_service_wait} seconds. "
|
124
124
|
"Try increasing the timeout with the `_service_wait` setting."
|
125
125
|
)
|
126
126
|
|
@@ -143,7 +143,7 @@ class _Service:
|
|
143
143
|
with tempfile.TemporaryDirectory() as tmpdir:
|
144
144
|
fname = os.path.join(tmpdir, f"port-{pid}.txt")
|
145
145
|
|
146
|
-
executable = self._settings.
|
146
|
+
executable = self._settings.x_executable
|
147
147
|
exec_cmd_list = [executable, "-m"]
|
148
148
|
|
149
149
|
service_args = []
|
@@ -212,7 +212,7 @@ class _Service:
|
|
212
212
|
|
213
213
|
try:
|
214
214
|
internal_proc = subprocess.Popen(
|
215
|
-
exec_cmd_list + service_args,
|
215
|
+
exec_cmd_list + service_args, # type: ignore[arg-type]
|
216
216
|
env=os.environ,
|
217
217
|
**kwargs,
|
218
218
|
)
|