wandb 0.18.6__py3-none-win32.whl → 0.19.0rc1__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/api.py +5 -1
- 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/v3/wandb_telemetry_pb2.py +4 -4
- wandb/proto/v4/wandb_internal_pb2.py +31 -31
- wandb/proto/v4/wandb_settings_pb2.py +2 -2
- wandb/proto/v4/wandb_telemetry_pb2.py +4 -4
- wandb/proto/v5/wandb_internal_pb2.py +31 -31
- wandb/proto/v5/wandb_settings_pb2.py +2 -2
- wandb/proto/v5/wandb_telemetry_pb2.py +4 -4
- wandb/proto/wandb_deprecated.py +3 -11
- wandb/proto/wandb_generate_deprecated.py +3 -7
- wandb/sdk/artifacts/artifact.py +3 -11
- 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/base_types/wb_value.py +20 -10
- 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_queue.py +0 -6
- wandb/sdk/interface/interface_shared.py +9 -0
- wandb/sdk/interface/router.py +1 -2
- wandb/sdk/interface/router_queue.py +0 -3
- wandb/sdk/interface/router_relay.py +0 -2
- wandb/sdk/internal/file_stream.py +1 -4
- wandb/sdk/internal/flow_control.py +1 -1
- wandb/sdk/internal/handler.py +8 -5
- wandb/sdk/internal/internal.py +3 -17
- wandb/sdk/internal/internal_api.py +3 -10
- wandb/sdk/internal/internal_util.py +0 -3
- wandb/sdk/internal/job_builder.py +20 -12
- wandb/sdk/internal/progress.py +1 -5
- wandb/sdk/internal/sender.py +9 -15
- 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 +2 -4
- wandb/sdk/launch/__init__.py +2 -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/lib/sock_client.py +0 -5
- wandb/sdk/service/server.py +3 -12
- wandb/sdk/service/server_sock.py +0 -2
- 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 +129 -161
- wandb/sdk/wandb_settings.py +978 -1760
- wandb/sdk/wandb_setup.py +87 -94
- wandb/sdk/wandb_watch.py +1 -1
- wandb/sync/sync.py +1 -2
- wandb/util.py +7 -40
- wandb/wandb_controller.py +10 -12
- {wandb-0.18.6.dist-info → wandb-0.19.0rc1.dist-info}/METADATA +14 -4
- {wandb-0.18.6.dist-info → wandb-0.19.0rc1.dist-info}/RECORD +114 -120
- {wandb-0.18.6.dist-info → wandb-0.19.0rc1.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 -250
- wandb/sdk/lib/reporting.py +0 -99
- wandb/sdk/lib/tracelog.py +0 -255
- {wandb-0.18.6.dist-info → wandb-0.19.0rc1.dist-info}/entry_points.txt +0 -0
- {wandb-0.18.6.dist-info → wandb-0.19.0rc1.dist-info}/licenses/LICENSE +0 -0
wandb/sdk/wandb_setup.py
CHANGED
@@ -11,43 +11,32 @@ run_id can be resolved.
|
|
11
11
|
|
12
12
|
"""
|
13
13
|
|
14
|
+
from __future__ import annotations
|
15
|
+
|
14
16
|
import logging
|
15
17
|
import os
|
16
18
|
import sys
|
17
19
|
import threading
|
18
|
-
from typing import TYPE_CHECKING, Any,
|
20
|
+
from typing import TYPE_CHECKING, Any, Union
|
19
21
|
|
20
22
|
import wandb
|
21
23
|
from wandb.sdk.lib import import_hooks
|
22
24
|
|
23
25
|
from . import wandb_settings
|
24
|
-
from .lib import config_util, server
|
25
|
-
|
26
|
-
Settings = Union["wandb.sdk.wandb_settings.Settings", Dict[str, Any]]
|
27
|
-
|
28
|
-
Logger = Union[logging.Logger, "_EarlyLogger"]
|
26
|
+
from .lib import config_util, server
|
29
27
|
|
30
28
|
if TYPE_CHECKING:
|
31
|
-
from wandb.sdk.lib import
|
32
|
-
|
33
|
-
from . import
|
34
|
-
|
35
|
-
# logger will be configured to be either a standard logger instance or _EarlyLogger
|
36
|
-
logger: Optional[Logger] = None
|
37
|
-
|
38
|
-
|
39
|
-
def _set_logger(log_object: Logger) -> None:
|
40
|
-
"""Configure module logger."""
|
41
|
-
global logger
|
42
|
-
logger = log_object
|
29
|
+
from wandb.sdk.lib.service_connection import ServiceConnection
|
30
|
+
from wandb.sdk.wandb_run import Run
|
31
|
+
from wandb.sdk.wandb_settings import Settings
|
43
32
|
|
44
33
|
|
45
34
|
class _EarlyLogger:
|
46
35
|
"""Early logger which captures logs in memory until logging can be configured."""
|
47
36
|
|
48
37
|
def __init__(self) -> None:
|
49
|
-
self._log:
|
50
|
-
self._exception:
|
38
|
+
self._log: list[tuple] = []
|
39
|
+
self._exception: list[tuple] = []
|
51
40
|
# support old warn() as alias of warning()
|
52
41
|
self.warn = self.warning
|
53
42
|
|
@@ -81,25 +70,37 @@ class _EarlyLogger:
|
|
81
70
|
logger.exception(msg, *args, **kwargs)
|
82
71
|
|
83
72
|
|
73
|
+
Logger = Union[logging.Logger, _EarlyLogger]
|
74
|
+
|
75
|
+
# logger will be configured to be either a standard logger instance or _EarlyLogger
|
76
|
+
logger: Logger | None = None
|
77
|
+
|
78
|
+
|
79
|
+
def _set_logger(log_object: Logger) -> None:
|
80
|
+
"""Configure module logger."""
|
81
|
+
global logger
|
82
|
+
logger = log_object
|
83
|
+
|
84
|
+
|
84
85
|
class _WandbSetup__WandbSetup: # noqa: N801
|
85
86
|
"""Inner class of _WandbSetup."""
|
86
87
|
|
87
88
|
def __init__(
|
88
89
|
self,
|
89
90
|
pid: int,
|
90
|
-
settings:
|
91
|
-
environ:
|
91
|
+
settings: Settings | None = None,
|
92
|
+
environ: dict | None = None,
|
92
93
|
) -> None:
|
93
|
-
self._connection:
|
94
|
+
self._connection: ServiceConnection | None = None
|
94
95
|
|
95
96
|
self._environ = environ or dict(os.environ)
|
96
|
-
self._sweep_config:
|
97
|
-
self._config:
|
98
|
-
self._server:
|
97
|
+
self._sweep_config: dict | None = None
|
98
|
+
self._config: dict | None = None
|
99
|
+
self._server: server.Server | None = None
|
99
100
|
self._pid = pid
|
100
101
|
|
101
102
|
# keep track of multiple runs, so we can unwind with join()s
|
102
|
-
self._global_run_stack:
|
103
|
+
self._global_run_stack: list[Run] = []
|
103
104
|
|
104
105
|
# TODO(jhr): defer strict checks until settings are fully initialized
|
105
106
|
# and logging is ready
|
@@ -107,79 +108,76 @@ class _WandbSetup__WandbSetup: # noqa: N801
|
|
107
108
|
_set_logger(self._early_logger)
|
108
109
|
|
109
110
|
self._settings = self._settings_setup(settings, self._early_logger)
|
110
|
-
# self._settings.freeze()
|
111
111
|
|
112
112
|
wandb.termsetup(self._settings, logger)
|
113
113
|
|
114
114
|
self._check()
|
115
115
|
self._setup()
|
116
116
|
|
117
|
-
tracelog_mode = self._settings._tracelog
|
118
|
-
if tracelog_mode:
|
119
|
-
tracelog.enable(tracelog_mode)
|
120
|
-
|
121
117
|
def _settings_setup(
|
122
118
|
self,
|
123
|
-
settings:
|
124
|
-
early_logger:
|
125
|
-
) ->
|
119
|
+
settings: Settings | None = None,
|
120
|
+
early_logger: _EarlyLogger | None = None,
|
121
|
+
) -> wandb_settings.Settings:
|
126
122
|
s = wandb_settings.Settings()
|
127
|
-
s._apply_base(pid=self._pid, _logger=early_logger)
|
128
|
-
s._apply_config_files(_logger=early_logger)
|
129
|
-
s._apply_env_vars(self._environ, _logger=early_logger)
|
130
123
|
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
124
|
+
# the pid of the process to monitor for system stats
|
125
|
+
pid = os.getpid()
|
126
|
+
if early_logger:
|
127
|
+
early_logger.info(f"Current SDK version is {wandb.__version__}")
|
128
|
+
early_logger.info(f"Configure stats pid to {pid}")
|
129
|
+
s.x_stats_pid = pid
|
130
|
+
|
131
|
+
# load settings from the system config
|
132
|
+
if s.settings_system and early_logger:
|
133
|
+
early_logger.info(f"Loading settings from {s.settings_system}")
|
134
|
+
s.update_from_system_config_file()
|
135
|
+
|
136
|
+
# load settings from the workspace config
|
137
|
+
if s.settings_workspace and early_logger:
|
138
|
+
early_logger.info(f"Loading settings from {s.settings_workspace}")
|
139
|
+
s.update_from_workspace_config_file()
|
140
|
+
|
141
|
+
# load settings from the environment variables
|
142
|
+
if early_logger:
|
143
|
+
early_logger.info("Loading settings from environment variables")
|
144
|
+
s.update_from_env_vars(self._environ)
|
145
|
+
|
146
|
+
# infer settings from the system environment
|
147
|
+
s.update_from_system_environment()
|
136
148
|
|
137
|
-
|
138
|
-
if
|
139
|
-
s.
|
149
|
+
# load settings from the passed init/setup settings
|
150
|
+
if settings:
|
151
|
+
s.update_from_settings(settings)
|
140
152
|
|
141
153
|
return s
|
142
154
|
|
143
|
-
def _update(
|
144
|
-
|
145
|
-
settings: Optional[Settings] = None,
|
146
|
-
) -> None:
|
147
|
-
if settings is None:
|
155
|
+
def _update(self, settings: Settings | None = None) -> None:
|
156
|
+
if not settings:
|
148
157
|
return
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
self._settings._apply_settings(settings)
|
153
|
-
elif isinstance(settings, dict):
|
154
|
-
# if it is a mapping, update the settings with it
|
155
|
-
self._settings.update(settings, source=wandb_settings.Source.SETUP)
|
156
|
-
# self._settings.freeze()
|
157
|
-
|
158
|
-
def _update_user_settings(self, settings: Optional[Settings] = None) -> None:
|
159
|
-
settings = settings or self._settings
|
158
|
+
self._settings.update_from_settings(settings)
|
159
|
+
|
160
|
+
def _update_user_settings(self) -> None:
|
160
161
|
# Get rid of cached results to force a refresh.
|
161
162
|
self._server = None
|
162
|
-
user_settings = self._load_user_settings(
|
163
|
+
user_settings = self._load_user_settings()
|
163
164
|
if user_settings is not None:
|
164
|
-
|
165
|
-
self._settings._apply_user(user_settings)
|
166
|
-
# self._settings.freeze()
|
165
|
+
self._settings.update_from_dict(user_settings)
|
167
166
|
|
168
167
|
def _early_logger_flush(self, new_logger: Logger) -> None:
|
169
168
|
if not self._early_logger:
|
170
169
|
return
|
171
170
|
_set_logger(new_logger)
|
172
|
-
# self._settings._clear_early_logger()
|
173
171
|
self._early_logger._flush()
|
174
172
|
|
175
|
-
def _get_logger(self) ->
|
173
|
+
def _get_logger(self) -> Logger | None:
|
176
174
|
return logger
|
177
175
|
|
178
176
|
@property
|
179
|
-
def settings(self) ->
|
177
|
+
def settings(self) -> wandb_settings.Settings:
|
180
178
|
return self._settings
|
181
179
|
|
182
|
-
def _get_entity(self) ->
|
180
|
+
def _get_entity(self) -> str | None:
|
183
181
|
if self._settings and self._settings._offline:
|
184
182
|
return None
|
185
183
|
if self._server is None:
|
@@ -188,16 +186,15 @@ class _WandbSetup__WandbSetup: # noqa: N801
|
|
188
186
|
entity = self._server._viewer.get("entity")
|
189
187
|
return entity
|
190
188
|
|
191
|
-
def _get_username(self) ->
|
189
|
+
def _get_username(self) -> str | None:
|
192
190
|
if self._settings and self._settings._offline:
|
193
191
|
return None
|
194
192
|
if self._server is None:
|
195
193
|
self._load_viewer()
|
196
194
|
assert self._server is not None
|
197
|
-
|
198
|
-
return username
|
195
|
+
return self._server._viewer.get("username")
|
199
196
|
|
200
|
-
def _get_teams(self) ->
|
197
|
+
def _get_teams(self) -> list[str]:
|
201
198
|
if self._settings and self._settings._offline:
|
202
199
|
return []
|
203
200
|
if self._server is None:
|
@@ -208,20 +205,16 @@ class _WandbSetup__WandbSetup: # noqa: N801
|
|
208
205
|
teams = [team["node"]["name"] for team in teams["edges"]]
|
209
206
|
return teams or []
|
210
207
|
|
211
|
-
def _load_viewer(self
|
208
|
+
def _load_viewer(self) -> None:
|
212
209
|
if self._settings and self._settings._offline:
|
213
210
|
return
|
214
|
-
|
215
|
-
settings = wandb_settings.Settings(**settings)
|
216
|
-
s = server.Server(settings=settings)
|
211
|
+
s = server.Server(settings=self._settings)
|
217
212
|
s.query_with_timeout()
|
218
213
|
self._server = s
|
219
214
|
|
220
|
-
def _load_user_settings(
|
221
|
-
self, settings: Optional[Settings] = None
|
222
|
-
) -> Optional[Dict[str, Any]]:
|
215
|
+
def _load_user_settings(self) -> dict[str, Any] | None:
|
223
216
|
if self._server is None:
|
224
|
-
self._load_viewer(
|
217
|
+
self._load_viewer()
|
225
218
|
|
226
219
|
# offline?
|
227
220
|
if self._server is None:
|
@@ -248,7 +241,7 @@ class _WandbSetup__WandbSetup: # noqa: N801
|
|
248
241
|
print("frozen, could be trouble")
|
249
242
|
|
250
243
|
def _setup(self) -> None:
|
251
|
-
if not self._settings._noop and not self._settings.
|
244
|
+
if not self._settings._noop and not self._settings.x_disable_service:
|
252
245
|
from wandb.sdk.lib import service_connection
|
253
246
|
|
254
247
|
self._connection = service_connection.connect_to_service(self._settings)
|
@@ -271,7 +264,7 @@ class _WandbSetup__WandbSetup: # noqa: N801
|
|
271
264
|
else:
|
272
265
|
self._config = config_dict
|
273
266
|
|
274
|
-
def _teardown(self, exit_code:
|
267
|
+
def _teardown(self, exit_code: int | None = None) -> None:
|
275
268
|
import_hooks.unregister_all_post_import_hooks()
|
276
269
|
|
277
270
|
if not self._connection:
|
@@ -286,7 +279,7 @@ class _WandbSetup__WandbSetup: # noqa: N801
|
|
286
279
|
sys.exit(internal_exit_code)
|
287
280
|
|
288
281
|
@property
|
289
|
-
def service(self) ->
|
282
|
+
def service(self) -> ServiceConnection | None:
|
290
283
|
"""Returns a connection to the service process, if it exists."""
|
291
284
|
return self._connection
|
292
285
|
|
@@ -298,9 +291,9 @@ class _WandbSetup:
|
|
298
291
|
(Forked processes will get a new copy of the object)
|
299
292
|
"""
|
300
293
|
|
301
|
-
_instance:
|
294
|
+
_instance: _WandbSetup__WandbSetup | None = None
|
302
295
|
|
303
|
-
def __init__(self, settings:
|
296
|
+
def __init__(self, settings: Settings | None = None) -> None:
|
304
297
|
pid = os.getpid()
|
305
298
|
if _WandbSetup._instance and _WandbSetup._instance._pid == pid:
|
306
299
|
_WandbSetup._instance._update(settings=settings)
|
@@ -308,7 +301,7 @@ class _WandbSetup:
|
|
308
301
|
_WandbSetup._instance = _WandbSetup__WandbSetup(settings=settings, pid=pid)
|
309
302
|
|
310
303
|
@property
|
311
|
-
def service(self) ->
|
304
|
+
def service(self) -> ServiceConnection | None:
|
312
305
|
"""Returns a connection to the service process, if it exists."""
|
313
306
|
if not self._instance:
|
314
307
|
return None
|
@@ -319,9 +312,9 @@ class _WandbSetup:
|
|
319
312
|
|
320
313
|
|
321
314
|
def _setup(
|
322
|
-
settings:
|
315
|
+
settings: Settings | None = None,
|
323
316
|
_reset: bool = False,
|
324
|
-
) ->
|
317
|
+
) -> _WandbSetup | None:
|
325
318
|
"""Set up library context."""
|
326
319
|
if _reset:
|
327
320
|
teardown()
|
@@ -331,7 +324,7 @@ def _setup(
|
|
331
324
|
return wl
|
332
325
|
|
333
326
|
|
334
|
-
def setup(settings:
|
327
|
+
def setup(settings: Settings | None = None) -> _WandbSetup | None:
|
335
328
|
"""Prepares W&B for use in the current process and its children.
|
336
329
|
|
337
330
|
You can usually ignore this as it is implicitly called by `wandb.init()`.
|
@@ -346,8 +339,8 @@ def setup(settings: Optional[Settings] = None) -> Optional["_WandbSetup"]:
|
|
346
339
|
See also `wandb.teardown()`.
|
347
340
|
|
348
341
|
Args:
|
349
|
-
settings
|
350
|
-
|
342
|
+
settings: Configuration settings to apply globally. These can be
|
343
|
+
overridden by subsequent `wandb.init()` calls.
|
351
344
|
|
352
345
|
Example:
|
353
346
|
```python
|
@@ -391,7 +384,7 @@ def setup(settings: Optional[Settings] = None) -> Optional["_WandbSetup"]:
|
|
391
384
|
return ret
|
392
385
|
|
393
386
|
|
394
|
-
def teardown(exit_code:
|
387
|
+
def teardown(exit_code: int | None = None) -> None:
|
395
388
|
"""Waits for wandb to finish and frees resources.
|
396
389
|
|
397
390
|
Completes any runs that were not explicitly finished
|
wandb/sdk/wandb_watch.py
CHANGED
@@ -100,7 +100,7 @@ def _watch(
|
|
100
100
|
_global_watch_idx += 1
|
101
101
|
if global_idx > 0:
|
102
102
|
# TODO: this makes ugly chart names like gradients/graph_1conv1d.bias
|
103
|
-
prefix = "graph_
|
103
|
+
prefix = f"graph_{global_idx}"
|
104
104
|
|
105
105
|
if log_parameters:
|
106
106
|
run._torch.add_log_parameters_hook(
|
wandb/sync/sync.py
CHANGED
@@ -183,8 +183,7 @@ class SyncThread(threading.Thread):
|
|
183
183
|
settings = wandb.Settings(
|
184
184
|
root_dir=self._tmp_dir.name,
|
185
185
|
run_id=proto_run.run_id,
|
186
|
-
|
187
|
-
_start_time=time.time(),
|
186
|
+
x_start_time=time.time(),
|
188
187
|
)
|
189
188
|
|
190
189
|
settings_static = SettingsStatic(settings.to_proto())
|
wandb/util.py
CHANGED
@@ -82,6 +82,8 @@ T = TypeVar("T")
|
|
82
82
|
logger = logging.getLogger(__name__)
|
83
83
|
_not_importable = set()
|
84
84
|
|
85
|
+
LAUNCH_JOB_ARTIFACT_SLOT_NAME = "_wandb_job"
|
86
|
+
|
85
87
|
MAX_LINE_BYTES = (10 << 20) - (100 << 10) # imposed by back end
|
86
88
|
IS_GIT = os.path.exists(os.path.join(os.path.dirname(__file__), "..", ".git"))
|
87
89
|
|
@@ -102,35 +104,6 @@ else:
|
|
102
104
|
SENTRY_ENV = "production"
|
103
105
|
|
104
106
|
|
105
|
-
PLATFORM_WINDOWS = "windows"
|
106
|
-
PLATFORM_LINUX = "linux"
|
107
|
-
PLATFORM_BSD = "bsd"
|
108
|
-
PLATFORM_DARWIN = "darwin"
|
109
|
-
PLATFORM_UNKNOWN = "unknown"
|
110
|
-
|
111
|
-
LAUNCH_JOB_ARTIFACT_SLOT_NAME = "_wandb_job"
|
112
|
-
|
113
|
-
|
114
|
-
def get_platform_name() -> str:
|
115
|
-
if sys.platform.startswith("win"):
|
116
|
-
return PLATFORM_WINDOWS
|
117
|
-
elif sys.platform.startswith("darwin"):
|
118
|
-
return PLATFORM_DARWIN
|
119
|
-
elif sys.platform.startswith("linux"):
|
120
|
-
return PLATFORM_LINUX
|
121
|
-
elif sys.platform.startswith(
|
122
|
-
(
|
123
|
-
"dragonfly",
|
124
|
-
"freebsd",
|
125
|
-
"netbsd",
|
126
|
-
"openbsd",
|
127
|
-
)
|
128
|
-
):
|
129
|
-
return PLATFORM_BSD
|
130
|
-
else:
|
131
|
-
return PLATFORM_UNKNOWN
|
132
|
-
|
133
|
-
|
134
107
|
POW_10_BYTES = [
|
135
108
|
("B", 10**0),
|
136
109
|
("KB", 10**3),
|
@@ -1906,14 +1879,8 @@ class InstalledDistribution:
|
|
1906
1879
|
|
1907
1880
|
|
1908
1881
|
def working_set() -> Iterable[InstalledDistribution]:
|
1909
|
-
"""Return the working set of installed distributions.
|
1910
|
-
|
1911
|
-
Uses importlib.metadata in Python versions above 3.7, and importlib_metadata otherwise.
|
1912
|
-
"""
|
1913
|
-
try:
|
1914
|
-
from importlib.metadata import distributions
|
1915
|
-
except ImportError:
|
1916
|
-
from importlib_metadata import distributions # type: ignore
|
1882
|
+
"""Return the working set of installed distributions."""
|
1883
|
+
from importlib.metadata import distributions
|
1917
1884
|
|
1918
1885
|
for d in distributions():
|
1919
1886
|
try:
|
@@ -1971,9 +1938,9 @@ def get_core_path() -> str:
|
|
1971
1938
|
bin_path = pathlib.Path(__file__).parent / "bin" / "wandb-core"
|
1972
1939
|
if not bin_path.exists():
|
1973
1940
|
raise WandbCoreNotAvailableError(
|
1974
|
-
f"
|
1975
|
-
" Please contact support at support@wandb.com
|
1976
|
-
"
|
1941
|
+
f"File not found: {bin_path}."
|
1942
|
+
" Please contact support at support@wandb.com."
|
1943
|
+
f" Your platform is: {platform.platform()}."
|
1977
1944
|
)
|
1978
1945
|
|
1979
1946
|
return str(bin_path)
|
wandb/wandb_controller.py
CHANGED
@@ -590,13 +590,11 @@ class _WandbController:
|
|
590
590
|
stopper = self._custom_stopping or sweeps.stop_runs
|
591
591
|
stop_runs = stopper(self._sweep_config, self._sweep_runs or [])
|
592
592
|
|
593
|
-
debug_lines =
|
594
|
-
[
|
595
|
-
|
596
|
-
|
597
|
-
|
598
|
-
]
|
599
|
-
)
|
593
|
+
debug_lines = [
|
594
|
+
" ".join([f"{k}={v}" for k, v in run.early_terminate_info.items()])
|
595
|
+
for run in stop_runs
|
596
|
+
if run.early_terminate_info is not None
|
597
|
+
]
|
600
598
|
if debug_lines:
|
601
599
|
self._log_debug += debug_lines
|
602
600
|
|
@@ -680,7 +678,7 @@ def _get_runs_status(metrics):
|
|
680
678
|
for c in categories:
|
681
679
|
if not metrics.get(c):
|
682
680
|
continue
|
683
|
-
mlist.append("
|
681
|
+
mlist.append(f"{c.capitalize()}: {metrics[c]}")
|
684
682
|
s = ", ".join(mlist)
|
685
683
|
return s
|
686
684
|
|
@@ -698,9 +696,9 @@ def _sweep_status(
|
|
698
696
|
stopping = len([r for r in sweep_runs if r.should_stop])
|
699
697
|
stopstr = ""
|
700
698
|
if stopped or stopping:
|
701
|
-
stopstr = "Stopped:
|
699
|
+
stopstr = f"Stopped: {stopped}"
|
702
700
|
if stopping:
|
703
|
-
stopstr += " (Stopping:
|
701
|
+
stopstr += f" (Stopping: {stopping})"
|
704
702
|
runs_status = _get_runs_status(run_type_counts)
|
705
703
|
method = sweep_conf.get("method", "unknown")
|
706
704
|
stopping = sweep_conf.get("early_terminate", None)
|
@@ -712,9 +710,9 @@ def _sweep_status(
|
|
712
710
|
sections = []
|
713
711
|
sections.append(f"Sweep: {sweep} ({sweep_options})")
|
714
712
|
if runs_status:
|
715
|
-
sections.append("Runs:
|
713
|
+
sections.append(f"Runs: {run_count} ({runs_status})")
|
716
714
|
else:
|
717
|
-
sections.append("Runs:
|
715
|
+
sections.append(f"Runs: {run_count}")
|
718
716
|
if stopstr:
|
719
717
|
sections.append(stopstr)
|
720
718
|
sections = " | ".join(sections)
|
@@ -1,6 +1,6 @@
|
|
1
|
-
Metadata-Version: 2.
|
1
|
+
Metadata-Version: 2.3
|
2
2
|
Name: wandb
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.19.0rc1
|
4
4
|
Summary: A CLI and library for interacting with the Weights & Biases API.
|
5
5
|
Project-URL: Source, https://github.com/wandb/wandb
|
6
6
|
Project-URL: Bug Reports, https://github.com/wandb/wandb/issues
|
@@ -36,19 +36,20 @@ Classifier: Natural Language :: English
|
|
36
36
|
Classifier: Programming Language :: Go
|
37
37
|
Classifier: Programming Language :: Python :: 3
|
38
38
|
Classifier: Programming Language :: Python :: 3 :: Only
|
39
|
-
Classifier: Programming Language :: Python :: 3.7
|
40
39
|
Classifier: Programming Language :: Python :: 3.8
|
41
40
|
Classifier: Programming Language :: Python :: 3.9
|
42
41
|
Classifier: Programming Language :: Python :: 3.10
|
43
42
|
Classifier: Programming Language :: Python :: 3.11
|
44
43
|
Classifier: Programming Language :: Python :: 3.12
|
44
|
+
Classifier: Programming Language :: Python :: 3.13
|
45
45
|
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
46
46
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
47
47
|
Classifier: Topic :: System :: Logging
|
48
48
|
Classifier: Topic :: System :: Monitoring
|
49
|
-
Requires-Python: >=3.
|
49
|
+
Requires-Python: >=3.8
|
50
50
|
Requires-Dist: click!=8.0.0,>=7.1
|
51
51
|
Requires-Dist: docker-pycreds>=0.4.0
|
52
|
+
Requires-Dist: eval-type-backport; python_version < '3.10'
|
52
53
|
Requires-Dist: gitpython!=3.1.29,>=1.0.0
|
53
54
|
Requires-Dist: platformdirs
|
54
55
|
Requires-Dist: protobuf!=4.21.0,!=5.28.0,<6,>=3.12.0; python_version < '3.9' and sys_platform == 'linux'
|
@@ -56,6 +57,7 @@ Requires-Dist: protobuf!=4.21.0,!=5.28.0,<6,>=3.15.0; python_version == '3.9' an
|
|
56
57
|
Requires-Dist: protobuf!=4.21.0,!=5.28.0,<6,>=3.19.0; python_version > '3.9' and sys_platform == 'linux'
|
57
58
|
Requires-Dist: protobuf!=4.21.0,!=5.28.0,<6,>=3.19.0; sys_platform != 'linux'
|
58
59
|
Requires-Dist: psutil>=5.0.0
|
60
|
+
Requires-Dist: pydantic<3,>=2.6
|
59
61
|
Requires-Dist: pyyaml
|
60
62
|
Requires-Dist: requests<3,>=2.0.0
|
61
63
|
Requires-Dist: sentry-sdk>=2.0.0
|
@@ -193,6 +195,14 @@ Use your favorite framework with W&B. W&B integrations make it fast and easy to
|
|
193
195
|
|
194
196
|
|
195
197
|
|
198
|
+
# Python Version Support
|
199
|
+
|
200
|
+
We are committed to supporting our minimum required Python version for *at least* six months after its official end-of-life (EOL) date, as defined by the Python Software Foundation. You can find a list of Python EOL dates [here](https://devguide.python.org/versions/).
|
201
|
+
|
202
|
+
When we discontinue support for a Python version, we will increment the library’s minor version number to reflect this change.
|
203
|
+
|
204
|
+
|
205
|
+
|
196
206
|
# Contribution guidelines
|
197
207
|
Weights & Biases ❤️ open source, and we welcome contributions from the community! See the [Contribution guide](https://github.com/wandb/wandb/blob/main/CONTRIBUTING.md) for more information on the development workflow and the internals of the wandb library. For wandb bugs and feature requests, visit [GitHub Issues](https://github.com/wandb/wandb/issues) or contact support@wandb.com.
|
198
208
|
|