wandb 0.18.7__py3-none-macosx_11_0_x86_64.whl → 0.19.0rc1__py3-none-macosx_11_0_x86_64.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 +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.0rc1.dist-info}/METADATA +14 -4
- {wandb-0.18.7.dist-info → wandb-0.19.0rc1.dist-info}/RECORD +101 -106
- {wandb-0.18.7.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 -251
- wandb/sdk/lib/reporting.py +0 -99
- {wandb-0.18.7.dist-info → wandb-0.19.0rc1.dist-info}/entry_points.txt +0 -0
- {wandb-0.18.7.dist-info → wandb-0.19.0rc1.dist-info}/licenses/LICENSE +0 -0
package_readme.md
CHANGED
@@ -68,6 +68,14 @@ Use your favorite framework with W&B. W&B integrations make it fast and easy to
|
|
68
68
|
|
69
69
|
|
70
70
|
|
71
|
+
# Python Version Support
|
72
|
+
|
73
|
+
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/).
|
74
|
+
|
75
|
+
When we discontinue support for a Python version, we will increment the library’s minor version number to reflect this change.
|
76
|
+
|
77
|
+
|
78
|
+
|
71
79
|
# Contribution guidelines
|
72
80
|
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.
|
73
81
|
|
wandb/__init__.py
CHANGED
@@ -10,7 +10,7 @@ For reference documentation, see https://docs.wandb.com/ref/python.
|
|
10
10
|
"""
|
11
11
|
from __future__ import annotations
|
12
12
|
|
13
|
-
__version__ = "0.
|
13
|
+
__version__ = "0.19.0rc1"
|
14
14
|
|
15
15
|
|
16
16
|
from wandb.errors import Error
|
@@ -75,7 +75,7 @@ from wandb.data_types import JoinedTable
|
|
75
75
|
|
76
76
|
from wandb.wandb_agent import agent
|
77
77
|
|
78
|
-
from wandb.plot import visualize
|
78
|
+
from wandb.plot import visualize, plot_table
|
79
79
|
from wandb.integration.sagemaker import sagemaker_auth
|
80
80
|
from wandb.sdk.internal import profiler
|
81
81
|
|
@@ -142,9 +142,6 @@ mark_preempting = _preinit.PreInitCallable(
|
|
142
142
|
"wandb.mark_preempting", wandb_sdk.wandb_run.Run.mark_preempting # type: ignore
|
143
143
|
)
|
144
144
|
|
145
|
-
plot_table = _preinit.PreInitCallable(
|
146
|
-
"wandb.plot_table", wandb_sdk.wandb_run.Run.plot_table
|
147
|
-
)
|
148
145
|
alert = _preinit.PreInitCallable("wandb.alert", wandb_sdk.wandb_run.Run.alert) # type: ignore
|
149
146
|
|
150
147
|
# record of patched libraries
|
@@ -208,8 +205,8 @@ if "dev" in __version__:
|
|
208
205
|
)
|
209
206
|
|
210
207
|
# Enable new features in dev versions.
|
211
|
-
os.environ["
|
212
|
-
"
|
208
|
+
os.environ["WANDB_X_SHOW_OPERATION_STATS"] = os.environ.get(
|
209
|
+
"WANDB_X_SHOW_OPERATION_STATS",
|
213
210
|
"true",
|
214
211
|
)
|
215
212
|
|
@@ -251,4 +248,5 @@ __all__ = (
|
|
251
248
|
"define_metric",
|
252
249
|
"watch",
|
253
250
|
"unwatch",
|
251
|
+
"plot_table",
|
254
252
|
)
|
wandb/__init__.pyi
CHANGED
@@ -54,6 +54,7 @@ __all__ = (
|
|
54
54
|
"watch",
|
55
55
|
"unwatch",
|
56
56
|
"plot",
|
57
|
+
"plot_table",
|
57
58
|
)
|
58
59
|
|
59
60
|
import os
|
@@ -71,7 +72,8 @@ from typing import (
|
|
71
72
|
|
72
73
|
import wandb.plot as plot
|
73
74
|
from wandb.analytics import Sentry
|
74
|
-
from wandb.apis import InternalApi
|
75
|
+
from wandb.apis import InternalApi
|
76
|
+
from wandb.apis import PublicApi as Api
|
75
77
|
from wandb.data_types import (
|
76
78
|
Audio,
|
77
79
|
Graph,
|
@@ -98,14 +100,14 @@ from wandb.wandb_controller import _WandbController
|
|
98
100
|
if TYPE_CHECKING:
|
99
101
|
import torch # type: ignore [import-not-found]
|
100
102
|
|
103
|
+
import wandb
|
101
104
|
from wandb.plot import CustomChart
|
102
105
|
|
103
|
-
__version__: str = "0.
|
106
|
+
__version__: str = "0.19.0rc1"
|
104
107
|
|
105
108
|
run: Run | None
|
106
109
|
config: wandb_config.Config
|
107
110
|
summary: wandb_summary.Summary
|
108
|
-
Api: type[PublicApi]
|
109
111
|
|
110
112
|
# private attributes
|
111
113
|
_sentry: Sentry
|
@@ -113,7 +115,7 @@ api: InternalApi
|
|
113
115
|
patched: Dict[str, List[Callable]]
|
114
116
|
|
115
117
|
def setup(
|
116
|
-
settings:
|
118
|
+
settings: Settings | None = None,
|
117
119
|
) -> Optional[_WandbSetup]:
|
118
120
|
"""Prepares W&B for use in the current process and its children.
|
119
121
|
|
@@ -129,8 +131,8 @@ def setup(
|
|
129
131
|
See also `wandb.teardown()`.
|
130
132
|
|
131
133
|
Args:
|
132
|
-
settings
|
133
|
-
|
134
|
+
settings: Configuration settings to apply globally. These can be
|
135
|
+
overridden by subsequent `wandb.init()` calls.
|
134
136
|
|
135
137
|
Example:
|
136
138
|
```python
|
@@ -172,7 +174,7 @@ def setup(
|
|
172
174
|
"""
|
173
175
|
...
|
174
176
|
|
175
|
-
def teardown(exit_code:
|
177
|
+
def teardown(exit_code: int | None = None) -> None:
|
176
178
|
"""Waits for wandb to finish and frees resources.
|
177
179
|
|
178
180
|
Completes any runs that were not explicitly finished
|
@@ -192,11 +194,10 @@ def init(
|
|
192
194
|
project: str | None = None,
|
193
195
|
entity: str | None = None,
|
194
196
|
reinit: bool | None = None,
|
195
|
-
tags: Sequence | None = None,
|
197
|
+
tags: Sequence[str] | None = None,
|
196
198
|
group: str | None = None,
|
197
199
|
name: str | None = None,
|
198
200
|
notes: str | None = None,
|
199
|
-
magic: dict | str | bool | None = None,
|
200
201
|
config_exclude_keys: list[str] | None = None,
|
201
202
|
config_include_keys: list[str] | None = None,
|
202
203
|
anonymous: str | None = None,
|
@@ -335,10 +336,6 @@ def init(
|
|
335
336
|
for more.
|
336
337
|
reinit: (bool, optional) Allow multiple `wandb.init()` calls in the same
|
337
338
|
process. (default: `False`)
|
338
|
-
magic: (bool, dict, or str, optional) The bool controls whether we try to
|
339
|
-
auto-instrument your script, capturing basic details of your run
|
340
|
-
without you having to add more wandb code. (default: `False`)
|
341
|
-
You can also pass a dict, json string, or yaml filename.
|
342
339
|
config_exclude_keys: (list, optional) string keys to exclude from
|
343
340
|
`wandb.config`.
|
344
341
|
config_include_keys: (list, optional) string keys to include in
|
@@ -425,15 +422,25 @@ def init(
|
|
425
422
|
"""
|
426
423
|
...
|
427
424
|
|
428
|
-
def finish(
|
429
|
-
|
425
|
+
def finish(
|
426
|
+
exit_code: int | None = None,
|
427
|
+
quiet: bool | None = None,
|
428
|
+
) -> None:
|
429
|
+
"""Finish a run and upload any remaining data.
|
430
|
+
|
431
|
+
Marks the completion of a W&B run and ensures all data is synced to the server.
|
432
|
+
The run's final state is determined by its exit conditions and sync status.
|
430
433
|
|
431
|
-
|
432
|
-
|
434
|
+
Run States:
|
435
|
+
- Running: Active run that is logging data and/or sending heartbeats.
|
436
|
+
- Crashed: Run that stopped sending heartbeats unexpectedly.
|
437
|
+
- Finished: Run completed successfully (`exit_code=0`) with all data synced.
|
438
|
+
- Failed: Run completed with errors (`exit_code!=0`).
|
433
439
|
|
434
440
|
Args:
|
435
|
-
exit_code:
|
436
|
-
|
441
|
+
exit_code: Integer indicating the run's exit status. Use 0 for success,
|
442
|
+
any other value marks the run as failed.
|
443
|
+
quiet: Deprecated. Configure logging verbosity using `wandb.Settings(quiet=...)`.
|
437
444
|
"""
|
438
445
|
...
|
439
446
|
|
@@ -1107,23 +1114,37 @@ def link_model(
|
|
1107
1114
|
|
1108
1115
|
def plot_table(
|
1109
1116
|
vega_spec_name: str,
|
1110
|
-
data_table: Table,
|
1117
|
+
data_table: wandb.Table,
|
1111
1118
|
fields: dict[str, Any],
|
1112
1119
|
string_fields: dict[str, Any] | None = None,
|
1113
1120
|
split_table: bool = False,
|
1114
1121
|
) -> CustomChart:
|
1115
|
-
"""
|
1122
|
+
"""Creates a custom charts using a Vega-Lite specification and a `wandb.Table`.
|
1123
|
+
|
1124
|
+
This function creates a custom chart based on a Vega-Lite specification and
|
1125
|
+
a data table represented by a `wandb.Table` object. The specification needs
|
1126
|
+
to be predefined and stored in the W&B backend. The function returns a custom
|
1127
|
+
chart object that can be logged to W&B using `wandb.log()`.
|
1116
1128
|
|
1117
1129
|
Args:
|
1118
|
-
vega_spec_name:
|
1119
|
-
|
1120
|
-
|
1121
|
-
|
1122
|
-
|
1123
|
-
|
1124
|
-
|
1125
|
-
|
1126
|
-
|
1130
|
+
vega_spec_name (str): The name or identifier of the Vega-Lite spec
|
1131
|
+
that defines the visualization structure.
|
1132
|
+
data_table (wandb.Table): A `wandb.Table` object containing the data to be
|
1133
|
+
visualized.
|
1134
|
+
fields (dict[str, Any]): A mapping between the fields in the Vega-Lite spec and the
|
1135
|
+
corresponding columns in the data table to be visualized.
|
1136
|
+
string_fields (dict[str, Any] | None): A dictionary for providing values for any string constants
|
1137
|
+
required by the custom visualization.
|
1138
|
+
split_table (bool): Whether the table should be split into a separate section
|
1139
|
+
in the W&B UI. If `True`, the table will be displayed in a section named
|
1140
|
+
"Custom Chart Tables". Default is `False`.
|
1141
|
+
|
1142
|
+
Returns:
|
1143
|
+
CustomChart: A custom chart object that can be logged to W&B. To log the
|
1144
|
+
chart, pass it to `wandb.log()`.
|
1145
|
+
|
1146
|
+
Raises:
|
1147
|
+
wandb.Error: If `data_table` is not a `wandb.Table` object.
|
1127
1148
|
"""
|
1128
1149
|
...
|
1129
1150
|
|
wandb/analytics/sentry.py
CHANGED
@@ -9,14 +9,9 @@ import os
|
|
9
9
|
import pathlib
|
10
10
|
import sys
|
11
11
|
from types import TracebackType
|
12
|
-
from typing import TYPE_CHECKING, Any, Callable
|
12
|
+
from typing import TYPE_CHECKING, Any, Callable, Literal
|
13
13
|
from urllib.parse import quote
|
14
14
|
|
15
|
-
if sys.version_info >= (3, 8):
|
16
|
-
from typing import Literal
|
17
|
-
else:
|
18
|
-
from typing_extensions import Literal
|
19
|
-
|
20
15
|
import sentry_sdk # type: ignore
|
21
16
|
import sentry_sdk.scope # type: ignore
|
22
17
|
import sentry_sdk.utils # type: ignore
|
@@ -214,13 +209,12 @@ class Sentry:
|
|
214
209
|
"sweep_url",
|
215
210
|
"sweep_id",
|
216
211
|
"deployment",
|
217
|
-
"
|
218
|
-
"
|
212
|
+
"x_disable_service",
|
213
|
+
"x_require_legacy_service",
|
219
214
|
"launch",
|
215
|
+
"_platform",
|
220
216
|
)
|
221
217
|
|
222
|
-
self.scope.set_tag("platform", wandb.util.get_platform_name())
|
223
|
-
|
224
218
|
# set context
|
225
219
|
if process_context:
|
226
220
|
self.scope.set_tag("process_context", process_context)
|
@@ -311,19 +311,19 @@ def _make_settings(
|
|
311
311
|
_settings_override = coalesce(settings_override, {})
|
312
312
|
|
313
313
|
default_settings: Dict[str, Any] = {
|
314
|
-
"
|
314
|
+
"x_files_dir": os.path.join(root_dir, "files"),
|
315
315
|
"root_dir": root_dir,
|
316
316
|
"sync_file": os.path.join(root_dir, "txlog.wandb"),
|
317
317
|
"resume": "false",
|
318
318
|
"program": None,
|
319
319
|
"ignore_globs": [],
|
320
320
|
"disable_job_creation": True,
|
321
|
-
"
|
321
|
+
"x_start_time": 0,
|
322
322
|
"_offline": None,
|
323
|
-
"
|
324
|
-
"
|
325
|
-
"
|
326
|
-
"
|
323
|
+
"x_sync": True,
|
324
|
+
"x_live_policy_rate_limit": 15, # matches dir_watcher
|
325
|
+
"x_live_policy_wait_time": 600, # matches dir_watcher
|
326
|
+
"x_file_stream_timeout_seconds": 60,
|
327
327
|
}
|
328
328
|
|
329
329
|
combined_settings = {**default_settings, **_settings_override}
|
@@ -1,14 +1,18 @@
|
|
1
1
|
import logging
|
2
|
-
import
|
3
|
-
|
2
|
+
from typing import (
|
3
|
+
Any,
|
4
|
+
Dict,
|
5
|
+
Iterable,
|
6
|
+
List,
|
7
|
+
Literal,
|
8
|
+
Optional,
|
9
|
+
Protocol,
|
10
|
+
Tuple,
|
11
|
+
runtime_checkable,
|
12
|
+
)
|
4
13
|
|
5
14
|
from wandb.sdk.artifacts.artifact import Artifact
|
6
15
|
|
7
|
-
if sys.version_info >= (3, 8):
|
8
|
-
from typing import Protocol, runtime_checkable
|
9
|
-
else:
|
10
|
-
from typing_extensions import Protocol, runtime_checkable
|
11
|
-
|
12
16
|
logger = logging.getLogger("import_logger")
|
13
17
|
|
14
18
|
PathStr = str
|
wandb/apis/public/jobs.py
CHANGED
@@ -3,14 +3,8 @@
|
|
3
3
|
import json
|
4
4
|
import os
|
5
5
|
import shutil
|
6
|
-
import sys
|
7
6
|
import time
|
8
|
-
from typing import TYPE_CHECKING, Any, Dict, List, Mapping, Optional
|
9
|
-
|
10
|
-
if sys.version_info >= (3, 8):
|
11
|
-
from typing import Literal
|
12
|
-
else:
|
13
|
-
from typing_extensions import Literal
|
7
|
+
from typing import TYPE_CHECKING, Any, Dict, List, Literal, Mapping, Optional
|
14
8
|
|
15
9
|
from wandb_gql import gql
|
16
10
|
|
wandb/apis/public/reports.py
CHANGED
@@ -2,7 +2,6 @@
|
|
2
2
|
|
3
3
|
import ast
|
4
4
|
import json
|
5
|
-
import sys
|
6
5
|
import urllib
|
7
6
|
|
8
7
|
from wandb_gql import gql
|
@@ -228,22 +227,12 @@ class PythonMongoishQueryGenerator:
|
|
228
227
|
ast.Not: "$not",
|
229
228
|
}
|
230
229
|
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
}
|
238
|
-
else:
|
239
|
-
AST_FIELDS = {
|
240
|
-
ast.Str: "s",
|
241
|
-
ast.Num: "n",
|
242
|
-
ast.Name: "id",
|
243
|
-
ast.List: "elts",
|
244
|
-
ast.Tuple: "elts",
|
245
|
-
ast.NameConstant: "value",
|
246
|
-
}
|
230
|
+
AST_FIELDS = {
|
231
|
+
ast.Constant: "value",
|
232
|
+
ast.Name: "id",
|
233
|
+
ast.List: "elts",
|
234
|
+
ast.Tuple: "elts",
|
235
|
+
}
|
247
236
|
|
248
237
|
def __init__(self, run_set):
|
249
238
|
self.run_set = run_set
|
wandb/apis/public/runs.py
CHANGED
@@ -2,16 +2,19 @@
|
|
2
2
|
|
3
3
|
import json
|
4
4
|
import os
|
5
|
-
import sys
|
6
5
|
import tempfile
|
7
6
|
import time
|
8
7
|
import urllib
|
9
|
-
from typing import
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
8
|
+
from typing import (
|
9
|
+
TYPE_CHECKING,
|
10
|
+
Any,
|
11
|
+
Collection,
|
12
|
+
Dict,
|
13
|
+
List,
|
14
|
+
Literal,
|
15
|
+
Mapping,
|
16
|
+
Optional,
|
17
|
+
)
|
15
18
|
|
16
19
|
from wandb_gql import gql
|
17
20
|
|
@@ -233,7 +236,6 @@ class Runs(Paginator):
|
|
233
236
|
if not histories:
|
234
237
|
return pd.DataFrame()
|
235
238
|
combined_df = pd.concat(histories)
|
236
|
-
combined_df.sort_values("run_id", inplace=True)
|
237
239
|
combined_df.reset_index(drop=True, inplace=True)
|
238
240
|
# sort columns for consistency
|
239
241
|
combined_df = combined_df[(sorted(combined_df.columns))]
|
@@ -259,9 +261,9 @@ class Runs(Paginator):
|
|
259
261
|
histories.append(df)
|
260
262
|
if not histories:
|
261
263
|
return pl.DataFrame()
|
262
|
-
combined_df = pl.concat(histories, how="
|
264
|
+
combined_df = pl.concat(histories, how="vertical")
|
263
265
|
# sort columns for consistency
|
264
|
-
combined_df = combined_df.select(sorted(combined_df.columns))
|
266
|
+
combined_df = combined_df.select(sorted(combined_df.columns))
|
265
267
|
|
266
268
|
return combined_df
|
267
269
|
|
wandb/bin/gpu_stats
CHANGED
Binary file
|
wandb/bin/wandb-core
CHANGED
Binary file
|
wandb/cli/cli.py
CHANGED
@@ -31,7 +31,6 @@ from wandb import Config, Error, env, util, wandb_agent, wandb_sdk
|
|
31
31
|
from wandb.apis import InternalApi, PublicApi
|
32
32
|
from wandb.apis.public import RunQueue
|
33
33
|
from wandb.errors.links import url_registry
|
34
|
-
from wandb.integration.magic import magic_install
|
35
34
|
from wandb.sdk.artifacts._validators import is_artifact_registry_project
|
36
35
|
from wandb.sdk.artifacts.artifact_file_cache import get_artifact_file_cache
|
37
36
|
from wandb.sdk.launch import utils as launch_utils
|
@@ -129,7 +128,7 @@ def _get_cling_api(reset=None):
|
|
129
128
|
if _api is None:
|
130
129
|
# TODO(jhr): make a settings object that is better for non runs.
|
131
130
|
# only override the necessary setting
|
132
|
-
wandb.setup(settings=
|
131
|
+
wandb.setup(settings=wandb.Settings(x_cli_only_mode=True))
|
133
132
|
_api = InternalApi()
|
134
133
|
return _api
|
135
134
|
|
@@ -238,15 +237,18 @@ def login(key, host, cloud, relogin, anonymously, verify, no_offline=False):
|
|
238
237
|
relogin = True
|
239
238
|
|
240
239
|
login_settings = dict(
|
241
|
-
|
242
|
-
|
240
|
+
x_cli_only_mode=True,
|
241
|
+
x_disable_viewer=relogin and not verify,
|
243
242
|
anonymous=anon_mode,
|
243
|
+
base_url=host,
|
244
244
|
)
|
245
|
-
if host is not None:
|
246
|
-
login_settings["base_url"] = host
|
247
245
|
|
248
246
|
try:
|
249
|
-
wandb.setup(
|
247
|
+
wandb.setup(
|
248
|
+
settings=wandb.Settings(
|
249
|
+
**{k: v for k, v in login_settings.items() if v is not None}
|
250
|
+
)
|
251
|
+
)
|
250
252
|
except TypeError as e:
|
251
253
|
wandb.termerror(str(e))
|
252
254
|
sys.exit(1)
|
@@ -2656,44 +2658,6 @@ Run `git clone {}` and restore from there or pass the --no-git flag.""".format(r
|
|
2656
2658
|
return commit, json_config, patch_content, repo, metadata
|
2657
2659
|
|
2658
2660
|
|
2659
|
-
@cli.command(context_settings=CONTEXT, help="Run any script with wandb", hidden=True)
|
2660
|
-
@click.pass_context
|
2661
|
-
@click.argument("program")
|
2662
|
-
@click.argument("args", nargs=-1)
|
2663
|
-
@display_error
|
2664
|
-
def magic(ctx, program, args):
|
2665
|
-
def magic_run(cmd, globals, locals):
|
2666
|
-
try:
|
2667
|
-
exec(cmd, globals, locals)
|
2668
|
-
finally:
|
2669
|
-
pass
|
2670
|
-
|
2671
|
-
sys.argv[:] = args
|
2672
|
-
sys.argv.insert(0, program)
|
2673
|
-
sys.path.insert(0, os.path.dirname(program))
|
2674
|
-
try:
|
2675
|
-
with open(program, "rb") as fp:
|
2676
|
-
code = compile(fp.read(), program, "exec")
|
2677
|
-
except OSError:
|
2678
|
-
click.echo(
|
2679
|
-
click.style("Could not launch program: {}".format(program), fg="red")
|
2680
|
-
)
|
2681
|
-
sys.exit(1)
|
2682
|
-
globs = {
|
2683
|
-
"__file__": program,
|
2684
|
-
"__name__": "__main__",
|
2685
|
-
"__package__": None,
|
2686
|
-
"wandb_magic_install": magic_install,
|
2687
|
-
}
|
2688
|
-
prep = """
|
2689
|
-
import __main__
|
2690
|
-
__main__.__file__ = "{}"
|
2691
|
-
wandb_magic_install()
|
2692
|
-
""".format(program)
|
2693
|
-
magic_run(prep, globs, None)
|
2694
|
-
magic_run(code, globs, None)
|
2695
|
-
|
2696
|
-
|
2697
2661
|
@cli.command("online", help="Enable W&B sync")
|
2698
2662
|
@display_error
|
2699
2663
|
def online():
|
wandb/env.py
CHANGED
@@ -82,11 +82,11 @@ SENTRY_DSN = "WANDB_SENTRY_DSN"
|
|
82
82
|
INIT_TIMEOUT = "WANDB_INIT_TIMEOUT"
|
83
83
|
GIT_COMMIT = "WANDB_GIT_COMMIT"
|
84
84
|
GIT_REMOTE_URL = "WANDB_GIT_REMOTE_URL"
|
85
|
-
_EXECUTABLE = "
|
85
|
+
_EXECUTABLE = "WANDB_X_EXECUTABLE"
|
86
86
|
LAUNCH_QUEUE_NAME = "WANDB_LAUNCH_QUEUE_NAME"
|
87
87
|
LAUNCH_QUEUE_ENTITY = "WANDB_LAUNCH_QUEUE_ENTITY"
|
88
88
|
LAUNCH_TRACE_ID = "WANDB_LAUNCH_TRACE_ID"
|
89
|
-
_REQUIRE_LEGACY_SERVICE = "
|
89
|
+
_REQUIRE_LEGACY_SERVICE = "WANDB_X_REQUIRE_LEGACY_SERVICE"
|
90
90
|
|
91
91
|
# For testing, to be removed in future version
|
92
92
|
USE_V1_ARTIFACTS = "_WANDB_USE_V1_ARTIFACTS"
|
@@ -290,9 +290,7 @@ def get_base_url(
|
|
290
290
|
if env is None:
|
291
291
|
env = os.environ
|
292
292
|
|
293
|
-
|
294
|
-
|
295
|
-
return base_url.rstrip("/") if base_url is not None else base_url
|
293
|
+
return env.get(BASE_URL, default)
|
296
294
|
|
297
295
|
|
298
296
|
def get_app_url(
|
wandb/errors/links.py
CHANGED
wandb/errors/term.py
CHANGED
@@ -7,12 +7,7 @@ import logging
|
|
7
7
|
import os
|
8
8
|
import sys
|
9
9
|
import threading
|
10
|
-
from typing import TYPE_CHECKING, Iterator
|
11
|
-
|
12
|
-
if sys.version_info < (3, 8):
|
13
|
-
from typing_extensions import Protocol
|
14
|
-
else:
|
15
|
-
from typing import Protocol
|
10
|
+
from typing import TYPE_CHECKING, Iterator, Protocol
|
16
11
|
|
17
12
|
import click
|
18
13
|
|
wandb/filesync/dir_watcher.py
CHANGED
@@ -122,9 +122,9 @@ class PolicyLive(FileEventHandler):
|
|
122
122
|
self._last_uploaded_time: Optional[float] = None
|
123
123
|
self._last_uploaded_size: int = 0
|
124
124
|
if settings is not None:
|
125
|
-
if settings.
|
126
|
-
self.RATE_LIMIT_SECONDS = settings.
|
127
|
-
self._min_wait_time: Optional[float] = settings.
|
125
|
+
if settings.x_live_policy_rate_limit is not None:
|
126
|
+
self.RATE_LIMIT_SECONDS = settings.x_live_policy_rate_limit
|
127
|
+
self._min_wait_time: Optional[float] = settings.x_live_policy_wait_time
|
128
128
|
else:
|
129
129
|
self._min_wait_time = None
|
130
130
|
|
wandb/filesync/step_upload.py
CHANGED
@@ -21,15 +21,12 @@ from wandb.filesync import upload_job
|
|
21
21
|
from wandb.sdk.lib.paths import LogicalPath
|
22
22
|
|
23
23
|
if TYPE_CHECKING:
|
24
|
+
from typing import TypedDict
|
25
|
+
|
24
26
|
from wandb.filesync import stats
|
25
27
|
from wandb.sdk.internal import file_stream, internal_api, progress
|
26
28
|
from wandb.sdk.internal.settings_static import SettingsStatic
|
27
29
|
|
28
|
-
if sys.version_info >= (3, 8):
|
29
|
-
from typing import TypedDict
|
30
|
-
else:
|
31
|
-
from typing_extensions import TypedDict
|
32
|
-
|
33
30
|
class ArtifactStatus(TypedDict):
|
34
31
|
finalize: bool
|
35
32
|
pending_count: int
|
@@ -39,12 +39,7 @@ Examples:
|
|
39
39
|
import random
|
40
40
|
import sys
|
41
41
|
from pathlib import Path
|
42
|
-
from typing import Any, Optional
|
43
|
-
|
44
|
-
if sys.version_info >= (3, 8):
|
45
|
-
from typing import Literal
|
46
|
-
else:
|
47
|
-
from typing_extensions import Literal
|
42
|
+
from typing import Any, Literal, Optional
|
48
43
|
|
49
44
|
import fastai
|
50
45
|
from fastai.callbacks import TrackerCallback
|
@@ -1,16 +1,10 @@
|
|
1
1
|
import re
|
2
2
|
import sys
|
3
|
-
from typing import Optional
|
3
|
+
from typing import Literal, Optional
|
4
4
|
|
5
5
|
import wandb
|
6
6
|
import wandb.util
|
7
7
|
|
8
|
-
if sys.version_info >= (3, 8):
|
9
|
-
from typing import Literal
|
10
|
-
else:
|
11
|
-
from typing_extensions import Literal
|
12
|
-
|
13
|
-
|
14
8
|
_gym_version_lt_0_26: Optional[bool] = None
|
15
9
|
_gymnasium_version_lt_1_0_0: Optional[bool] = None
|
16
10
|
|
@@ -1,5 +1,4 @@
|
|
1
|
-
import
|
2
|
-
from typing import Any, Dict, Optional, Union
|
1
|
+
from typing import Any, Dict, Literal, Optional, Union
|
3
2
|
|
4
3
|
import tensorflow as tf # type: ignore
|
5
4
|
from tensorflow.keras import callbacks
|
@@ -8,12 +7,6 @@ import wandb
|
|
8
7
|
from wandb.integration.keras.keras import patch_tf_keras
|
9
8
|
from wandb.sdk.lib import telemetry
|
10
9
|
|
11
|
-
if sys.version_info >= (3, 8):
|
12
|
-
from typing import Literal
|
13
|
-
else:
|
14
|
-
from typing_extensions import Literal
|
15
|
-
|
16
|
-
|
17
10
|
LogStrategy = Literal["epoch", "batch"]
|
18
11
|
|
19
12
|
|
@@ -1,7 +1,6 @@
|
|
1
1
|
import os
|
2
2
|
import string
|
3
|
-
import
|
4
|
-
from typing import Any, Dict, List, Optional, Union
|
3
|
+
from typing import Any, Dict, List, Literal, Optional, Union
|
5
4
|
|
6
5
|
import tensorflow as tf # type: ignore
|
7
6
|
from tensorflow.keras import callbacks # type: ignore
|
@@ -12,12 +11,6 @@ from wandb.sdk.lib.paths import StrPath
|
|
12
11
|
|
13
12
|
from ..keras import patch_tf_keras
|
14
13
|
|
15
|
-
if sys.version_info >= (3, 8):
|
16
|
-
from typing import Literal
|
17
|
-
else:
|
18
|
-
from typing_extensions import Literal
|
19
|
-
|
20
|
-
|
21
14
|
Mode = Literal["auto", "min", "max"]
|
22
15
|
SaveStrategy = Literal["epoch"]
|
23
16
|
|