wandb 0.19.6rc4__py3-none-win_amd64.whl → 0.19.8__py3-none-win_amd64.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 +56 -6
- wandb/apis/public/_generated/__init__.py +21 -0
- wandb/apis/public/_generated/base.py +128 -0
- wandb/apis/public/_generated/enums.py +4 -0
- wandb/apis/public/_generated/input_types.py +4 -0
- wandb/apis/public/_generated/operations.py +15 -0
- wandb/apis/public/_generated/server_features_query.py +27 -0
- wandb/apis/public/_generated/typing_compat.py +14 -0
- wandb/apis/public/api.py +192 -6
- wandb/apis/public/artifacts.py +13 -45
- wandb/apis/public/registries.py +573 -0
- wandb/apis/public/utils.py +36 -0
- wandb/bin/gpu_stats.exe +0 -0
- wandb/bin/wandb-core +0 -0
- wandb/cli/cli.py +11 -20
- wandb/data_types.py +1 -1
- wandb/env.py +10 -0
- wandb/filesync/dir_watcher.py +2 -1
- wandb/proto/v3/wandb_internal_pb2.py +243 -222
- wandb/proto/v3/wandb_server_pb2.py +4 -4
- 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 +226 -222
- wandb/proto/v4/wandb_server_pb2.py +4 -4
- 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 +226 -222
- wandb/proto/v5/wandb_server_pb2.py +4 -4
- wandb/proto/v5/wandb_settings_pb2.py +2 -2
- wandb/proto/v5/wandb_telemetry_pb2.py +10 -10
- wandb/sdk/artifacts/_graphql_fragments.py +126 -0
- wandb/sdk/artifacts/artifact.py +51 -95
- wandb/sdk/backend/backend.py +17 -6
- wandb/sdk/data_types/helper_types/bounding_boxes_2d.py +14 -6
- wandb/sdk/data_types/helper_types/image_mask.py +12 -6
- wandb/sdk/data_types/saved_model.py +35 -46
- wandb/sdk/data_types/video.py +7 -16
- wandb/sdk/interface/interface.py +87 -49
- wandb/sdk/interface/interface_queue.py +5 -15
- wandb/sdk/interface/interface_relay.py +7 -22
- wandb/sdk/interface/interface_shared.py +65 -136
- wandb/sdk/interface/interface_sock.py +3 -21
- wandb/sdk/interface/router.py +42 -68
- wandb/sdk/interface/router_queue.py +13 -11
- wandb/sdk/interface/router_relay.py +26 -13
- wandb/sdk/interface/router_sock.py +12 -16
- wandb/sdk/internal/handler.py +4 -3
- wandb/sdk/internal/internal_api.py +12 -1
- wandb/sdk/internal/sender.py +3 -19
- wandb/sdk/lib/apikey.py +87 -26
- wandb/sdk/lib/asyncio_compat.py +210 -0
- wandb/sdk/lib/console_capture.py +172 -0
- wandb/sdk/lib/progress.py +78 -16
- wandb/sdk/lib/redirect.py +102 -76
- wandb/sdk/lib/service_connection.py +37 -17
- wandb/sdk/lib/sock_client.py +6 -56
- wandb/sdk/mailbox/__init__.py +23 -0
- wandb/sdk/mailbox/mailbox.py +135 -0
- wandb/sdk/mailbox/mailbox_handle.py +127 -0
- wandb/sdk/mailbox/response_handle.py +167 -0
- wandb/sdk/mailbox/wait_with_progress.py +135 -0
- wandb/sdk/service/server_sock.py +9 -3
- wandb/sdk/service/streams.py +75 -78
- wandb/sdk/verify/verify.py +54 -2
- wandb/sdk/wandb_init.py +72 -75
- wandb/sdk/wandb_login.py +7 -4
- wandb/sdk/wandb_metadata.py +65 -34
- wandb/sdk/wandb_require.py +14 -8
- wandb/sdk/wandb_run.py +90 -97
- wandb/sdk/wandb_settings.py +10 -4
- wandb/sdk/wandb_setup.py +19 -8
- wandb/sdk/wandb_sync.py +2 -10
- wandb/util.py +3 -1
- {wandb-0.19.6rc4.dist-info → wandb-0.19.8.dist-info}/METADATA +2 -2
- {wandb-0.19.6rc4.dist-info → wandb-0.19.8.dist-info}/RECORD +79 -66
- wandb/sdk/interface/message_future.py +0 -27
- wandb/sdk/interface/message_future_poll.py +0 -50
- wandb/sdk/lib/mailbox.py +0 -442
- {wandb-0.19.6rc4.dist-info → wandb-0.19.8.dist-info}/WHEEL +0 -0
- {wandb-0.19.6rc4.dist-info → wandb-0.19.8.dist-info}/entry_points.txt +0 -0
- {wandb-0.19.6rc4.dist-info → wandb-0.19.8.dist-info}/licenses/LICENSE +0 -0
wandb/apis/public/utils.py
CHANGED
@@ -1,8 +1,11 @@
|
|
1
1
|
import re
|
2
2
|
from enum import Enum
|
3
|
+
from typing import Optional
|
3
4
|
from urllib.parse import urlparse
|
4
5
|
|
6
|
+
from wandb._iterutils import one
|
5
7
|
from wandb.sdk.artifacts._validators import is_artifact_registry_project
|
8
|
+
from wandb.sdk.internal.internal_api import Api as InternalApi
|
6
9
|
|
7
10
|
|
8
11
|
def parse_s3_url_to_s3_uri(url) -> str:
|
@@ -66,3 +69,36 @@ def parse_org_from_registry_path(path: str, path_type: PathType) -> str:
|
|
66
69
|
if is_artifact_registry_project(project):
|
67
70
|
return org
|
68
71
|
return ""
|
72
|
+
|
73
|
+
|
74
|
+
def fetch_org_from_settings_or_entity(
|
75
|
+
settings: dict, default_entity: Optional[str] = None
|
76
|
+
) -> str:
|
77
|
+
"""Fetch the org from either the settings or deriving it from the entity.
|
78
|
+
|
79
|
+
Returns the org from the settings if available. If no org is passed in or set, the entity is used to fetch the org.
|
80
|
+
|
81
|
+
Args:
|
82
|
+
organization (str | None): The organization to fetch the org for.
|
83
|
+
settings (dict): The settings to fetch the org for.
|
84
|
+
default_entity (str | None): The default entity to fetch the org for.
|
85
|
+
"""
|
86
|
+
if (organization := settings.get("organization")) is None:
|
87
|
+
# Fetch the org via the Entity. Won't work if default entity is a personal entity and belongs to multiple orgs
|
88
|
+
entity = settings.get("entity") or default_entity
|
89
|
+
if entity is None:
|
90
|
+
raise ValueError(
|
91
|
+
"No entity specified and can't fetch organization from the entity"
|
92
|
+
)
|
93
|
+
entity_orgs = InternalApi()._fetch_orgs_and_org_entities_from_entity(entity)
|
94
|
+
entity_org = one(
|
95
|
+
entity_orgs,
|
96
|
+
too_short=ValueError(
|
97
|
+
"No organizations found for entity. Please specify an organization in the settings."
|
98
|
+
),
|
99
|
+
too_long=ValueError(
|
100
|
+
"Multiple organizations found for entity. Please specify an organization in the settings."
|
101
|
+
),
|
102
|
+
)
|
103
|
+
organization = entity_org.display_name
|
104
|
+
return organization
|
wandb/bin/gpu_stats.exe
CHANGED
Binary file
|
wandb/bin/wandb-core
CHANGED
Binary file
|
wandb/cli/cli.py
CHANGED
@@ -241,32 +241,21 @@ def login(key, host, cloud, relogin, anonymously, verify, no_offline=False):
|
|
241
241
|
wandb_sdk.wandb_login._handle_host_wandb_setting(host, cloud)
|
242
242
|
# A change in click or the test harness means key can be none...
|
243
243
|
key = key[0] if key is not None and len(key) > 0 else None
|
244
|
-
if key
|
245
|
-
relogin = True
|
244
|
+
relogin = True if key or relogin else False
|
246
245
|
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
base_url=host,
|
252
|
-
)
|
253
|
-
|
254
|
-
try:
|
255
|
-
wandb.setup(
|
256
|
-
settings=wandb.Settings(
|
257
|
-
**{k: v for k, v in login_settings.items() if v is not None}
|
258
|
-
)
|
246
|
+
wandb.setup(
|
247
|
+
settings=wandb.Settings(
|
248
|
+
x_cli_only_mode=True,
|
249
|
+
x_disable_viewer=relogin and not verify,
|
259
250
|
)
|
260
|
-
|
261
|
-
wandb.termerror(str(e))
|
262
|
-
sys.exit(1)
|
251
|
+
)
|
263
252
|
|
264
253
|
wandb.login(
|
265
|
-
relogin=relogin,
|
266
|
-
key=key,
|
267
254
|
anonymous=anon_mode,
|
268
|
-
host=host,
|
269
255
|
force=True,
|
256
|
+
host=host,
|
257
|
+
key=key,
|
258
|
+
relogin=relogin,
|
270
259
|
verify=verify,
|
271
260
|
)
|
272
261
|
|
@@ -2805,11 +2794,13 @@ def verify(host):
|
|
2805
2794
|
wandb_verify.check_wandb_version(api)
|
2806
2795
|
check_run_success = wandb_verify.check_run(api)
|
2807
2796
|
check_artifacts_success = wandb_verify.check_artifacts()
|
2797
|
+
check_sweeps_success = wandb_verify.check_sweeps(api)
|
2808
2798
|
if not (
|
2809
2799
|
check_artifacts_success
|
2810
2800
|
and check_run_success
|
2811
2801
|
and large_post_success
|
2812
2802
|
and url_success
|
2803
|
+
and check_sweeps_success
|
2813
2804
|
):
|
2814
2805
|
sys.exit(1)
|
2815
2806
|
|
wandb/data_types.py
CHANGED
@@ -6,7 +6,7 @@ flexible containers for information, like tables and HTML, and more.
|
|
6
6
|
For more on logging media, see [our guide](https://docs.wandb.com/guides/track/log/media)
|
7
7
|
|
8
8
|
For more on logging structured data for interactive dataset and model analysis,
|
9
|
-
see [our guide to W&B Tables](https://docs.wandb.com/guides/tables/).
|
9
|
+
see [our guide to W&B Tables](https://docs.wandb.com/guides/models/tables/).
|
10
10
|
|
11
11
|
All of these special data types are subclasses of WBValue. All the data types
|
12
12
|
serialize to JSON, since that is what wandb uses to save the objects locally
|
wandb/env.py
CHANGED
@@ -34,6 +34,7 @@ USERNAME = "WANDB_USERNAME"
|
|
34
34
|
USER_EMAIL = "WANDB_USER_EMAIL"
|
35
35
|
PROJECT = "WANDB_PROJECT"
|
36
36
|
ENTITY = "WANDB_ENTITY"
|
37
|
+
ORGANIZATION = "WANDB_ORGANIZATION"
|
37
38
|
BASE_URL = "WANDB_BASE_URL"
|
38
39
|
APP_URL = "WANDB_APP_URL"
|
39
40
|
PROGRAM = "WANDB_PROGRAM"
|
@@ -284,6 +285,15 @@ def get_entity(
|
|
284
285
|
return env.get(ENTITY, default)
|
285
286
|
|
286
287
|
|
288
|
+
def get_organization(
|
289
|
+
default: str | None = None, env: MutableMapping | None = None
|
290
|
+
) -> str | None:
|
291
|
+
if env is None:
|
292
|
+
env = os.environ
|
293
|
+
|
294
|
+
return env.get(ORGANIZATION, default)
|
295
|
+
|
296
|
+
|
287
297
|
def get_base_url(
|
288
298
|
default: str | None = None, env: MutableMapping | None = None
|
289
299
|
) -> str | None:
|
wandb/filesync/dir_watcher.py
CHANGED
@@ -233,6 +233,7 @@ class DirWatcher:
|
|
233
233
|
self._savename_file_policies[save_name] = policy
|
234
234
|
else:
|
235
235
|
self._user_file_policies[policy].add(path)
|
236
|
+
|
236
237
|
for src_path in glob.glob(os.path.join(self._dir, path)):
|
237
238
|
save_name = LogicalPath(os.path.relpath(src_path, self._dir))
|
238
239
|
feh = self._get_file_event_handler(src_path, save_name)
|
@@ -285,7 +286,7 @@ class DirWatcher:
|
|
285
286
|
# return LogicalPath(os.path.relpath(path, self._dir))
|
286
287
|
|
287
288
|
def _on_file_modified(self, event: "wd_events.FileModifiedEvent") -> None:
|
288
|
-
logger.info(f"file/dir modified: {
|
289
|
+
logger.info(f"file/dir modified: {event.src_path}")
|
289
290
|
if os.path.isdir(event.src_path):
|
290
291
|
return None
|
291
292
|
save_name = LogicalPath(os.path.relpath(event.src_path, self._dir))
|