wandb 0.22.1__py3-none-musllinux_1_2_aarch64.whl → 0.22.2__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.
Files changed (49) hide show
  1. wandb/__init__.py +1 -1
  2. wandb/__init__.pyi +6 -3
  3. wandb/bin/gpu_stats +0 -0
  4. wandb/bin/wandb-core +0 -0
  5. wandb/cli/beta.py +16 -2
  6. wandb/cli/beta_leet.py +74 -0
  7. wandb/cli/cli.py +34 -7
  8. wandb/proto/v3/wandb_api_pb2.py +86 -0
  9. wandb/proto/v3/wandb_internal_pb2.py +352 -351
  10. wandb/proto/v3/wandb_settings_pb2.py +2 -2
  11. wandb/proto/v4/wandb_api_pb2.py +37 -0
  12. wandb/proto/v4/wandb_internal_pb2.py +352 -351
  13. wandb/proto/v4/wandb_settings_pb2.py +2 -2
  14. wandb/proto/v5/wandb_api_pb2.py +38 -0
  15. wandb/proto/v5/wandb_internal_pb2.py +352 -351
  16. wandb/proto/v5/wandb_settings_pb2.py +2 -2
  17. wandb/proto/v6/wandb_api_pb2.py +48 -0
  18. wandb/proto/v6/wandb_internal_pb2.py +352 -351
  19. wandb/proto/v6/wandb_settings_pb2.py +2 -2
  20. wandb/proto/wandb_api_pb2.py +18 -0
  21. wandb/proto/wandb_generate_proto.py +1 -0
  22. wandb/sdk/artifacts/artifact.py +30 -30
  23. wandb/sdk/artifacts/artifact_manifest_entry.py +6 -12
  24. wandb/sdk/artifacts/storage_handler.py +18 -12
  25. wandb/sdk/artifacts/storage_handlers/azure_handler.py +11 -6
  26. wandb/sdk/artifacts/storage_handlers/gcs_handler.py +9 -6
  27. wandb/sdk/artifacts/storage_handlers/http_handler.py +9 -4
  28. wandb/sdk/artifacts/storage_handlers/local_file_handler.py +10 -6
  29. wandb/sdk/artifacts/storage_handlers/multi_handler.py +5 -4
  30. wandb/sdk/artifacts/storage_handlers/s3_handler.py +10 -8
  31. wandb/sdk/artifacts/storage_handlers/tracking_handler.py +6 -4
  32. wandb/sdk/artifacts/storage_handlers/wb_artifact_handler.py +24 -21
  33. wandb/sdk/artifacts/storage_handlers/wb_local_artifact_handler.py +4 -2
  34. wandb/sdk/artifacts/storage_policies/_multipart.py +187 -0
  35. wandb/sdk/artifacts/storage_policies/wandb_storage_policy.py +61 -242
  36. wandb/sdk/artifacts/storage_policy.py +25 -12
  37. wandb/sdk/data_types/object_3d.py +67 -2
  38. wandb/sdk/internal/job_builder.py +27 -10
  39. wandb/sdk/internal/sender.py +4 -1
  40. wandb/sdk/launch/create_job.py +2 -1
  41. wandb/sdk/lib/progress.py +1 -70
  42. wandb/sdk/wandb_init.py +1 -1
  43. wandb/sdk/wandb_run.py +5 -2
  44. wandb/sdk/wandb_settings.py +13 -12
  45. {wandb-0.22.1.dist-info → wandb-0.22.2.dist-info}/METADATA +1 -1
  46. {wandb-0.22.1.dist-info → wandb-0.22.2.dist-info}/RECORD +49 -42
  47. {wandb-0.22.1.dist-info → wandb-0.22.2.dist-info}/WHEEL +0 -0
  48. {wandb-0.22.1.dist-info → wandb-0.22.2.dist-info}/entry_points.txt +0 -0
  49. {wandb-0.22.1.dist-info → wandb-0.22.2.dist-info}/licenses/LICENSE +0 -0
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.22.1"
13
+ __version__ = "0.22.2"
14
14
 
15
15
 
16
16
  from wandb.errors import Error
wandb/__init__.pyi CHANGED
@@ -107,7 +107,7 @@ if TYPE_CHECKING:
107
107
  import wandb
108
108
  from wandb.plot import CustomChart
109
109
 
110
- __version__: str = "0.22.1"
110
+ __version__: str = "0.22.2"
111
111
 
112
112
  run: Run | None
113
113
  config: wandb_config.Config
@@ -754,6 +754,9 @@ def save(
754
754
  When given an absolute path or glob and no `base_path`, one
755
755
  directory level is preserved as in the example above.
756
756
 
757
+ Files are automatically deduplicated: calling `save()` multiple times
758
+ on the same file without modifications will not re-upload it.
759
+
757
760
  Args:
758
761
  glob_str: A relative or absolute path or Unix glob.
759
762
  base_path: A path to use to infer a directory structure; see examples.
@@ -778,10 +781,10 @@ def save(
778
781
  run.save("these/are/myfiles/*", base_path="these")
779
782
  # => Saves files in an "are/myfiles/" folder in the run.
780
783
 
781
- run.save("/User/username/Documents/run123/*.txt")
784
+ run.save("/Users/username/Documents/run123/*.txt")
782
785
  # => Saves files in a "run123/" folder in the run. See note below.
783
786
 
784
- run.save("/User/username/Documents/run123/*.txt", base_path="/User")
787
+ run.save("/Users/username/Documents/run123/*.txt", base_path="/Users")
785
788
  # => Saves files in a "username/Documents/run123/" folder in the run.
786
789
 
787
790
  run.save("files/*/saveme.txt")
wandb/bin/gpu_stats CHANGED
Binary file
wandb/bin/wandb-core CHANGED
Binary file
wandb/cli/beta.py CHANGED
@@ -15,8 +15,7 @@ from wandb.util import get_core_path
15
15
 
16
16
  @click.group()
17
17
  def beta():
18
- """Beta versions of wandb CLI commands. Requires wandb-core."""
19
- # this is the future that requires wandb-core!
18
+ """Beta versions of wandb CLI commands."""
20
19
  import wandb.env
21
20
 
22
21
  wandb._sentry.configure_scope(process_context="wandb_beta")
@@ -32,6 +31,21 @@ def beta():
32
31
  )
33
32
 
34
33
 
34
+ @beta.command()
35
+ @click.argument("path", nargs=1, type=click.Path(exists=True), required=False)
36
+ def leet(path: str | None = None) -> None:
37
+ """Launch W&B LEET: the Lightweight Experiment Exploration Tool.
38
+
39
+ LEET is a terminal UI for viewing a W&B run specified by an optional PATH.
40
+
41
+ PATH can include a .wandb file or a run directory containing a .wandb file.
42
+ If PATH is not provided, the command will look for the latest run.
43
+ """
44
+ from . import beta_leet
45
+
46
+ beta_leet.launch(path)
47
+
48
+
35
49
  @beta.command()
36
50
  @click.argument("paths", type=click.Path(exists=True), nargs=-1)
37
51
  @click.option(
wandb/cli/beta_leet.py ADDED
@@ -0,0 +1,74 @@
1
+ from __future__ import annotations
2
+
3
+ import os
4
+ import pathlib
5
+ import subprocess
6
+ import sys
7
+
8
+ import click
9
+ from typing_extensions import Never
10
+
11
+ import wandb
12
+ from wandb.env import error_reporting_enabled, is_debug
13
+ from wandb.sdk import wandb_setup
14
+ from wandb.util import get_core_path
15
+
16
+ from .beta_sync import _find_wandb_files
17
+
18
+
19
+ def _fatal(message: str) -> Never:
20
+ """Print an error message and exit with code 1."""
21
+ click.echo(f"Error: {message}", err=True)
22
+ sys.exit(1)
23
+
24
+
25
+ def _wandb_file_path(path: str | None) -> str:
26
+ """Returns absolute path to the .wandb file to display with LEET.
27
+
28
+ If `path` is not provided, looks for the latest W&B run.
29
+
30
+ Prints an error and exits if a valid path is not found.
31
+ """
32
+ if not path:
33
+ wandb_dir = wandb_setup.singleton().settings.wandb_dir
34
+
35
+ wandb_run_path = (pathlib.Path(wandb_dir) / "latest-run").resolve()
36
+ else:
37
+ wandb_run_path = pathlib.Path(path).resolve()
38
+
39
+ wandb_files = list(_find_wandb_files(wandb_run_path, skip_synced=False))
40
+
41
+ if len(wandb_files) == 0:
42
+ _fatal(f"Could not find a .wandb file in {wandb_run_path}.")
43
+ elif len(wandb_files) > 1:
44
+ _fatal(f"Found multiple .wandb files in {wandb_run_path}.")
45
+
46
+ return wandb_files[0]
47
+
48
+
49
+ def launch(path: str | None) -> Never:
50
+ wandb._sentry.configure_scope(process_context="leet")
51
+
52
+ wandb_file = _wandb_file_path(path)
53
+
54
+ try:
55
+ core_path = get_core_path()
56
+
57
+ args = [core_path, "leet"]
58
+ args.append(wandb_file)
59
+
60
+ if not error_reporting_enabled():
61
+ args.append("--no-observability")
62
+
63
+ if is_debug(default="False"):
64
+ args.extend(["--log-level", "-4"])
65
+
66
+ result = subprocess.run(
67
+ args,
68
+ env=os.environ,
69
+ close_fds=True,
70
+ )
71
+ sys.exit(result.returncode)
72
+
73
+ except Exception as e:
74
+ wandb._sentry.reraise(e)
wandb/cli/cli.py CHANGED
@@ -244,7 +244,7 @@ def projects(entity, display=True):
244
244
  return projects
245
245
 
246
246
 
247
- @cli.command(context_settings=CONTEXT, help="Login to Weights & Biases")
247
+ @cli.command(context_settings=CONTEXT)
248
248
  @click.argument("key", nargs=-1)
249
249
  @click.option("--cloud", is_flag=True, help="Login to the cloud instead of local")
250
250
  @click.option(
@@ -262,6 +262,16 @@ def projects(entity, display=True):
262
262
  )
263
263
  @display_error
264
264
  def login(key, host, cloud, relogin, anonymously, verify, no_offline=False):
265
+ """Verify and store your API key for authentication with W&B services.
266
+
267
+ By default, only store credentials locally without verifying them with W&B.
268
+ To verify credentials, set `--verify=True`.
269
+
270
+ For server deployments (dedicated cloud or customer-managed instances),
271
+ specify the host URL using the `--host` flag. You can also set environment
272
+ variables `WANDB_BASE_URL` and `WANDB_API_KEY` instead of running
273
+ the `login` command with host parameters.
274
+ """
265
275
  # TODO: handle no_offline
266
276
  anon_mode = "must" if anonymously else "never"
267
277
 
@@ -422,9 +432,7 @@ def init(ctx, project, entity, reset, mode):
422
432
  )
423
433
 
424
434
 
425
- @cli.command(
426
- context_settings=CONTEXT, help="Upload an offline training directory to W&B"
427
- )
435
+ @cli.command(context_settings=CONTEXT)
428
436
  @click.pass_context
429
437
  @click.argument("path", nargs=-1, type=click.Path(exists=True))
430
438
  @click.option("--view", is_flag=True, default=False, help="View runs", hidden=True)
@@ -518,9 +526,23 @@ def sync(
518
526
  skip_console=None,
519
527
  replace_tags=None,
520
528
  ):
529
+ """Synchronize W&B run data to the cloud.
530
+
531
+ If PATH is provided, sync runs found at the given path. If a path
532
+ is not specified, search for `./wandb` first, then search for a
533
+ `wandb/` subdirectory.
534
+
535
+ To sync a specific run:
536
+
537
+ wandb sync ./wandb/run-20250813_124246-n67z9ude
538
+
539
+ Or equivalently:
540
+
541
+ wandb sync ./wandb/run-20250813_124246-n67z9ude/run-n67z9ude.wandb
542
+ """
521
543
  api = _get_cling_api()
522
544
  if not api.is_authenticated:
523
- wandb.termlog("Login to W&B to sync offline runs")
545
+ wandb.termlog("Login to W&B to sync runs")
524
546
  ctx.invoke(login, no_offline=True)
525
547
  api = _get_cling_api(reset=True)
526
548
 
@@ -2700,9 +2722,10 @@ Run `git clone {repo}` and restore from there or pass the --no-git flag."""
2700
2722
  return commit, json_config, patch_content, repo, metadata
2701
2723
 
2702
2724
 
2703
- @cli.command("online", help="Enable W&B sync")
2725
+ @cli.command("online")
2704
2726
  @display_error
2705
2727
  def online():
2728
+ """Undo `wandb offline`."""
2706
2729
  api = InternalApi()
2707
2730
  try:
2708
2731
  api.clear_setting("mode", persist=True)
@@ -2713,9 +2736,13 @@ def online():
2713
2736
  )
2714
2737
 
2715
2738
 
2716
- @cli.command("offline", help="Disable W&B sync")
2739
+ @cli.command("offline")
2717
2740
  @display_error
2718
2741
  def offline():
2742
+ """Save data logged to W&B locally without uploading it to the cloud.
2743
+
2744
+ Use `wandb online` or `wandb sync` to upload offline runs.
2745
+ """
2719
2746
  api = InternalApi()
2720
2747
  try:
2721
2748
  api.set_setting("mode", "offline", persist=True)
@@ -0,0 +1,86 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # source: wandb/proto/wandb_api.proto
4
+ """Generated protocol buffer code."""
5
+ from google.protobuf import descriptor as _descriptor
6
+ from google.protobuf import descriptor_pool as _descriptor_pool
7
+ from google.protobuf import message as _message
8
+ from google.protobuf import reflection as _reflection
9
+ from google.protobuf import symbol_database as _symbol_database
10
+ # @@protoc_insertion_point(imports)
11
+
12
+ _sym_db = _symbol_database.Default()
13
+
14
+
15
+ from wandb.proto import wandb_base_pb2 as wandb_dot_proto_dot_wandb__base__pb2
16
+
17
+
18
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1bwandb/proto/wandb_api.proto\x12\x0ewandb_internal\x1a\x1cwandb/proto/wandb_base.proto\"]\n\nApiRequest\x12\x44\n\x10read_run_history\x18\x01 \x01(\x0b\x32(.wandb_internal.ReadRunHistoryApiRequestH\x00\x42\t\n\x07request\"`\n\x0b\x41piResponse\x12\x45\n\x10read_run_history\x18\x01 \x01(\x0b\x32).wandb_internal.ReadRunHistoryApiResponseH\x00\x42\n\n\x08response\"\xaa\x01\n\x18ReadRunHistoryApiRequest\x12\x0e\n\x06\x65ntity\x18\x01 \x01(\t\x12\x0f\n\x07project\x18\x02 \x01(\t\x12\x0e\n\x06run_id\x18\x03 \x01(\t\x12\x0c\n\x04keys\x18\x04 \x03(\t\x12\x10\n\x08min_step\x18\x05 \x01(\x03\x12\x10\n\x08max_step\x18\x06 \x01(\x03\x12+\n\x05_info\x18\xc8\x01 \x01(\x0b\x32\x1b.wandb_internal._RecordInfo\"d\n\x19ReadRunHistoryApiResponse\x12\x30\n\x0chistory_rows\x18\x01 \x03(\x0b\x32\x1a.wandb_internal.HistoryRow\x12\x15\n\rerror_message\x18\x02 \x01(\t\"G\n\nHistoryRow\x12\x39\n\rhistory_items\x18\x01 \x03(\x0b\x32\".wandb_internal.ParquetHistoryItem\"5\n\x12ParquetHistoryItem\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x12\n\nvalue_json\x18\x10 \x01(\tB\x1bZ\x19\x63ore/pkg/service_go_protob\x06proto3')
19
+
20
+
21
+
22
+ _APIREQUEST = DESCRIPTOR.message_types_by_name['ApiRequest']
23
+ _APIRESPONSE = DESCRIPTOR.message_types_by_name['ApiResponse']
24
+ _READRUNHISTORYAPIREQUEST = DESCRIPTOR.message_types_by_name['ReadRunHistoryApiRequest']
25
+ _READRUNHISTORYAPIRESPONSE = DESCRIPTOR.message_types_by_name['ReadRunHistoryApiResponse']
26
+ _HISTORYROW = DESCRIPTOR.message_types_by_name['HistoryRow']
27
+ _PARQUETHISTORYITEM = DESCRIPTOR.message_types_by_name['ParquetHistoryItem']
28
+ ApiRequest = _reflection.GeneratedProtocolMessageType('ApiRequest', (_message.Message,), {
29
+ 'DESCRIPTOR' : _APIREQUEST,
30
+ '__module__' : 'wandb.proto.wandb_api_pb2'
31
+ # @@protoc_insertion_point(class_scope:wandb_internal.ApiRequest)
32
+ })
33
+ _sym_db.RegisterMessage(ApiRequest)
34
+
35
+ ApiResponse = _reflection.GeneratedProtocolMessageType('ApiResponse', (_message.Message,), {
36
+ 'DESCRIPTOR' : _APIRESPONSE,
37
+ '__module__' : 'wandb.proto.wandb_api_pb2'
38
+ # @@protoc_insertion_point(class_scope:wandb_internal.ApiResponse)
39
+ })
40
+ _sym_db.RegisterMessage(ApiResponse)
41
+
42
+ ReadRunHistoryApiRequest = _reflection.GeneratedProtocolMessageType('ReadRunHistoryApiRequest', (_message.Message,), {
43
+ 'DESCRIPTOR' : _READRUNHISTORYAPIREQUEST,
44
+ '__module__' : 'wandb.proto.wandb_api_pb2'
45
+ # @@protoc_insertion_point(class_scope:wandb_internal.ReadRunHistoryApiRequest)
46
+ })
47
+ _sym_db.RegisterMessage(ReadRunHistoryApiRequest)
48
+
49
+ ReadRunHistoryApiResponse = _reflection.GeneratedProtocolMessageType('ReadRunHistoryApiResponse', (_message.Message,), {
50
+ 'DESCRIPTOR' : _READRUNHISTORYAPIRESPONSE,
51
+ '__module__' : 'wandb.proto.wandb_api_pb2'
52
+ # @@protoc_insertion_point(class_scope:wandb_internal.ReadRunHistoryApiResponse)
53
+ })
54
+ _sym_db.RegisterMessage(ReadRunHistoryApiResponse)
55
+
56
+ HistoryRow = _reflection.GeneratedProtocolMessageType('HistoryRow', (_message.Message,), {
57
+ 'DESCRIPTOR' : _HISTORYROW,
58
+ '__module__' : 'wandb.proto.wandb_api_pb2'
59
+ # @@protoc_insertion_point(class_scope:wandb_internal.HistoryRow)
60
+ })
61
+ _sym_db.RegisterMessage(HistoryRow)
62
+
63
+ ParquetHistoryItem = _reflection.GeneratedProtocolMessageType('ParquetHistoryItem', (_message.Message,), {
64
+ 'DESCRIPTOR' : _PARQUETHISTORYITEM,
65
+ '__module__' : 'wandb.proto.wandb_api_pb2'
66
+ # @@protoc_insertion_point(class_scope:wandb_internal.ParquetHistoryItem)
67
+ })
68
+ _sym_db.RegisterMessage(ParquetHistoryItem)
69
+
70
+ if _descriptor._USE_C_DESCRIPTORS == False:
71
+
72
+ DESCRIPTOR._options = None
73
+ DESCRIPTOR._serialized_options = b'Z\031core/pkg/service_go_proto'
74
+ _APIREQUEST._serialized_start=77
75
+ _APIREQUEST._serialized_end=170
76
+ _APIRESPONSE._serialized_start=172
77
+ _APIRESPONSE._serialized_end=268
78
+ _READRUNHISTORYAPIREQUEST._serialized_start=271
79
+ _READRUNHISTORYAPIREQUEST._serialized_end=441
80
+ _READRUNHISTORYAPIRESPONSE._serialized_start=443
81
+ _READRUNHISTORYAPIRESPONSE._serialized_end=543
82
+ _HISTORYROW._serialized_start=545
83
+ _HISTORYROW._serialized_end=616
84
+ _PARQUETHISTORYITEM._serialized_start=618
85
+ _PARQUETHISTORYITEM._serialized_end=671
86
+ # @@protoc_insertion_point(module_scope)