wandb 0.21.3__py3-none-macosx_12_0_arm64.whl → 0.22.0__py3-none-macosx_12_0_arm64.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 +1 -1
- wandb/_analytics.py +65 -0
- wandb/_iterutils.py +8 -0
- wandb/_pydantic/__init__.py +10 -11
- wandb/_pydantic/base.py +3 -53
- wandb/_pydantic/field_types.py +29 -0
- wandb/_pydantic/v1_compat.py +47 -30
- wandb/_strutils.py +40 -0
- wandb/apis/public/__init__.py +42 -0
- wandb/apis/public/api.py +17 -4
- wandb/apis/public/artifacts.py +5 -4
- wandb/apis/public/automations.py +2 -1
- wandb/apis/public/registries/_freezable_list.py +6 -6
- wandb/apis/public/registries/_utils.py +2 -1
- wandb/apis/public/registries/registries_search.py +4 -0
- wandb/apis/public/registries/registry.py +7 -0
- wandb/apis/public/runs.py +24 -6
- wandb/automations/_filters/expressions.py +3 -2
- wandb/automations/_filters/operators.py +2 -1
- wandb/automations/_validators.py +20 -0
- wandb/automations/actions.py +4 -2
- wandb/automations/events.py +4 -5
- wandb/bin/gpu_stats +0 -0
- wandb/bin/wandb-core +0 -0
- wandb/cli/beta.py +48 -130
- wandb/cli/beta_sync.py +226 -0
- wandb/integration/dspy/__init__.py +5 -0
- wandb/integration/dspy/dspy.py +422 -0
- wandb/integration/weave/weave.py +55 -0
- wandb/proto/v3/wandb_internal_pb2.py +234 -224
- wandb/proto/v3/wandb_server_pb2.py +38 -57
- wandb/proto/v3/wandb_sync_pb2.py +87 -0
- wandb/proto/v3/wandb_telemetry_pb2.py +12 -12
- wandb/proto/v4/wandb_internal_pb2.py +226 -224
- wandb/proto/v4/wandb_server_pb2.py +38 -41
- wandb/proto/v4/wandb_sync_pb2.py +38 -0
- wandb/proto/v4/wandb_telemetry_pb2.py +12 -12
- wandb/proto/v5/wandb_internal_pb2.py +226 -224
- wandb/proto/v5/wandb_server_pb2.py +38 -41
- wandb/proto/v5/wandb_sync_pb2.py +39 -0
- wandb/proto/v5/wandb_telemetry_pb2.py +12 -12
- wandb/proto/v6/wandb_base_pb2.py +3 -3
- wandb/proto/v6/wandb_internal_pb2.py +229 -227
- wandb/proto/v6/wandb_server_pb2.py +41 -44
- wandb/proto/v6/wandb_settings_pb2.py +3 -3
- wandb/proto/v6/wandb_sync_pb2.py +49 -0
- wandb/proto/v6/wandb_telemetry_pb2.py +15 -15
- wandb/proto/wandb_generate_proto.py +1 -0
- wandb/proto/wandb_sync_pb2.py +12 -0
- wandb/sdk/artifacts/_validators.py +50 -49
- wandb/sdk/artifacts/artifact.py +7 -7
- wandb/sdk/artifacts/exceptions.py +2 -1
- wandb/sdk/artifacts/storage_handlers/gcs_handler.py +1 -1
- wandb/sdk/artifacts/storage_handlers/http_handler.py +1 -3
- wandb/sdk/artifacts/storage_handlers/local_file_handler.py +1 -1
- wandb/sdk/artifacts/storage_handlers/s3_handler.py +3 -2
- wandb/sdk/artifacts/storage_policies/_factories.py +63 -0
- wandb/sdk/artifacts/storage_policies/wandb_storage_policy.py +59 -124
- wandb/sdk/interface/interface.py +10 -0
- wandb/sdk/interface/interface_shared.py +9 -0
- wandb/sdk/lib/asyncio_compat.py +88 -23
- wandb/sdk/lib/gql_request.py +18 -7
- wandb/sdk/lib/printer.py +9 -13
- wandb/sdk/lib/progress.py +8 -6
- wandb/sdk/lib/service/service_connection.py +42 -12
- wandb/sdk/mailbox/wait_with_progress.py +1 -1
- wandb/sdk/wandb_init.py +9 -9
- wandb/sdk/wandb_run.py +13 -1
- wandb/sdk/wandb_settings.py +55 -0
- wandb/wandb_agent.py +35 -4
- {wandb-0.21.3.dist-info → wandb-0.22.0.dist-info}/METADATA +1 -1
- {wandb-0.21.3.dist-info → wandb-0.22.0.dist-info}/RECORD +76 -64
- {wandb-0.21.3.dist-info → wandb-0.22.0.dist-info}/WHEEL +0 -0
- {wandb-0.21.3.dist-info → wandb-0.22.0.dist-info}/entry_points.txt +0 -0
- {wandb-0.21.3.dist-info → wandb-0.22.0.dist-info}/licenses/LICENSE +0 -0
@@ -2,7 +2,7 @@
|
|
2
2
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
3
3
|
# NO CHECKED-IN PROTOBUF GENCODE
|
4
4
|
# source: wandb/proto/wandb_server.proto
|
5
|
-
# Protobuf Python Version: 6.
|
5
|
+
# Protobuf Python Version: 6.31.1
|
6
6
|
"""Generated protocol buffer code."""
|
7
7
|
from google.protobuf import descriptor as _descriptor
|
8
8
|
from google.protobuf import descriptor_pool as _descriptor_pool
|
@@ -12,8 +12,8 @@ from google.protobuf.internal import builder as _builder
|
|
12
12
|
_runtime_version.ValidateProtobufRuntimeVersion(
|
13
13
|
_runtime_version.Domain.PUBLIC,
|
14
14
|
6,
|
15
|
-
|
16
|
-
|
15
|
+
31,
|
16
|
+
1,
|
17
17
|
'',
|
18
18
|
'wandb/proto/wandb_server.proto'
|
19
19
|
)
|
@@ -25,9 +25,10 @@ _sym_db = _symbol_database.Default()
|
|
25
25
|
from wandb.proto import wandb_base_pb2 as wandb_dot_proto_dot_wandb__base__pb2
|
26
26
|
from wandb.proto import wandb_internal_pb2 as wandb_dot_proto_dot_wandb__internal__pb2
|
27
27
|
from wandb.proto import wandb_settings_pb2 as wandb_dot_proto_dot_wandb__settings__pb2
|
28
|
+
from wandb.proto import wandb_sync_pb2 as wandb_dot_proto_dot_wandb__sync__pb2
|
28
29
|
|
29
30
|
|
30
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1ewandb/proto/wandb_server.proto\x12\x0ewandb_internal\x1a\x1cwandb/proto/wandb_base.proto\x1a wandb/proto/wandb_internal.proto\x1a wandb/proto/wandb_settings.proto\"k\n\x19ServerAuthenticateRequest\x12\x0f\n\x07\x61pi_key\x18\x01 \x01(\t\x12\x10\n\x08\x62\x61se_url\x18\x02 \x01(\t\x12+\n\x05_info\x18\xc8\x01 \x01(\x0b\x32\x1b.wandb_internal._RecordInfo\"w\n\x1aServerAuthenticateResponse\x12\x16\n\x0e\x64\x65\x66\x61ult_entity\x18\x01 \x01(\t\x12\x14\n\x0c\x65rror_status\x18\x02 \x01(\t\x12+\n\x05_info\x18\xc8\x01 \x01(\x0b\x32\x1b.wandb_internal._RecordInfo\"D\n\x15ServerShutdownRequest\x12+\n\x05_info\x18\xc8\x01 \x01(\x0b\x32\x1b.wandb_internal._RecordInfo\"\x18\n\x16ServerShutdownResponse\"B\n\x13ServerStatusRequest\x12+\n\x05_info\x18\xc8\x01 \x01(\x0b\x32\x1b.wandb_internal._RecordInfo\"\x16\n\x14ServerStatusResponse\"r\n\x17ServerInformInitRequest\x12*\n\x08settings\x18\x01 \x01(\x0b\x32\x18.wandb_internal.Settings\x12+\n\x05_info\x18\xc8\x01 \x01(\x0b\x32\x1b.wandb_internal._RecordInfo\"\x1a\n\x18ServerInformInitResponse\"
|
31
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1ewandb/proto/wandb_server.proto\x12\x0ewandb_internal\x1a\x1cwandb/proto/wandb_base.proto\x1a wandb/proto/wandb_internal.proto\x1a wandb/proto/wandb_settings.proto\x1a\x1cwandb/proto/wandb_sync.proto\"k\n\x19ServerAuthenticateRequest\x12\x0f\n\x07\x61pi_key\x18\x01 \x01(\t\x12\x10\n\x08\x62\x61se_url\x18\x02 \x01(\t\x12+\n\x05_info\x18\xc8\x01 \x01(\x0b\x32\x1b.wandb_internal._RecordInfo\"w\n\x1aServerAuthenticateResponse\x12\x16\n\x0e\x64\x65\x66\x61ult_entity\x18\x01 \x01(\t\x12\x14\n\x0c\x65rror_status\x18\x02 \x01(\t\x12+\n\x05_info\x18\xc8\x01 \x01(\x0b\x32\x1b.wandb_internal._RecordInfo\"D\n\x15ServerShutdownRequest\x12+\n\x05_info\x18\xc8\x01 \x01(\x0b\x32\x1b.wandb_internal._RecordInfo\"\x18\n\x16ServerShutdownResponse\"B\n\x13ServerStatusRequest\x12+\n\x05_info\x18\xc8\x01 \x01(\x0b\x32\x1b.wandb_internal._RecordInfo\"\x16\n\x14ServerStatusResponse\"r\n\x17ServerInformInitRequest\x12*\n\x08settings\x18\x01 \x01(\x0b\x32\x18.wandb_internal.Settings\x12+\n\x05_info\x18\xc8\x01 \x01(\x0b\x32\x1b.wandb_internal._RecordInfo\"\x1a\n\x18ServerInformInitResponse\"H\n\x19ServerInformFinishRequest\x12+\n\x05_info\x18\xc8\x01 \x01(\x0b\x32\x1b.wandb_internal._RecordInfo\"\x1c\n\x1aServerInformFinishResponse\"H\n\x19ServerInformAttachRequest\x12+\n\x05_info\x18\xc8\x01 \x01(\x0b\x32\x1b.wandb_internal._RecordInfo\"u\n\x1aServerInformAttachResponse\x12*\n\x08settings\x18\x01 \x01(\x0b\x32\x18.wandb_internal.Settings\x12+\n\x05_info\x18\xc8\x01 \x01(\x0b\x32\x1b.wandb_internal._RecordInfo\"H\n\x19ServerInformDetachRequest\x12+\n\x05_info\x18\xc8\x01 \x01(\x0b\x32\x1b.wandb_internal._RecordInfo\"\x1c\n\x1aServerInformDetachResponse\"]\n\x1bServerInformTeardownRequest\x12\x11\n\texit_code\x18\x01 \x01(\x05\x12+\n\x05_info\x18\xc8\x01 \x01(\x0b\x32\x1b.wandb_internal._RecordInfo\"\x1e\n\x1cServerInformTeardownResponse\"\xee\x05\n\rServerRequest\x12\x12\n\nrequest_id\x18\n \x01(\t\x12\x30\n\x0erecord_publish\x18\x01 \x01(\x0b\x32\x16.wandb_internal.RecordH\x00\x12\x34\n\x12record_communicate\x18\x02 \x01(\x0b\x32\x16.wandb_internal.RecordH\x00\x12>\n\x0binform_init\x18\x03 \x01(\x0b\x32\'.wandb_internal.ServerInformInitRequestH\x00\x12\x42\n\rinform_finish\x18\x04 \x01(\x0b\x32).wandb_internal.ServerInformFinishRequestH\x00\x12\x42\n\rinform_attach\x18\x05 \x01(\x0b\x32).wandb_internal.ServerInformAttachRequestH\x00\x12\x42\n\rinform_detach\x18\x06 \x01(\x0b\x32).wandb_internal.ServerInformDetachRequestH\x00\x12\x46\n\x0finform_teardown\x18\x07 \x01(\x0b\x32+.wandb_internal.ServerInformTeardownRequestH\x00\x12\x41\n\x0c\x61uthenticate\x18\t \x01(\x0b\x32).wandb_internal.ServerAuthenticateRequestH\x00\x12:\n\tinit_sync\x18\x0b \x01(\x0b\x32%.wandb_internal.ServerInitSyncRequestH\x00\x12\x31\n\x04sync\x18\x0c \x01(\x0b\x32!.wandb_internal.ServerSyncRequestH\x00\x12>\n\x0bsync_status\x18\r \x01(\x0b\x32\'.wandb_internal.ServerSyncStatusRequestH\x00\x42\x15\n\x13server_request_typeJ\x04\x08\x08\x10\t\"\x98\x06\n\x0eServerResponse\x12\x12\n\nrequest_id\x18\n \x01(\t\x12\x34\n\x12result_communicate\x18\x02 \x01(\x0b\x32\x16.wandb_internal.ResultH\x00\x12H\n\x14inform_init_response\x18\x03 \x01(\x0b\x32(.wandb_internal.ServerInformInitResponseH\x00\x12L\n\x16inform_finish_response\x18\x04 \x01(\x0b\x32*.wandb_internal.ServerInformFinishResponseH\x00\x12L\n\x16inform_attach_response\x18\x05 \x01(\x0b\x32*.wandb_internal.ServerInformAttachResponseH\x00\x12L\n\x16inform_detach_response\x18\x06 \x01(\x0b\x32*.wandb_internal.ServerInformDetachResponseH\x00\x12P\n\x18inform_teardown_response\x18\x07 \x01(\x0b\x32,.wandb_internal.ServerInformTeardownResponseH\x00\x12K\n\x15\x61uthenticate_response\x18\t \x01(\x0b\x32*.wandb_internal.ServerAuthenticateResponseH\x00\x12\x44\n\x12init_sync_response\x18\x0b \x01(\x0b\x32&.wandb_internal.ServerInitSyncResponseH\x00\x12;\n\rsync_response\x18\x0c \x01(\x0b\x32\".wandb_internal.ServerSyncResponseH\x00\x12H\n\x14sync_status_response\x18\r \x01(\x0b\x32(.wandb_internal.ServerSyncStatusResponseH\x00\x42\x16\n\x14server_response_typeJ\x04\x08\x08\x10\tB\x1bZ\x19\x63ore/pkg/service_go_protob\x06proto3')
|
31
32
|
|
32
33
|
_globals = globals()
|
33
34
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
@@ -35,44 +36,40 @@ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'wandb.proto.wandb_server_pb
|
|
35
36
|
if not _descriptor._USE_C_DESCRIPTORS:
|
36
37
|
_globals['DESCRIPTOR']._loaded_options = None
|
37
38
|
_globals['DESCRIPTOR']._serialized_options = b'Z\031core/pkg/service_go_proto'
|
38
|
-
_globals['_SERVERAUTHENTICATEREQUEST']._serialized_start=
|
39
|
-
_globals['_SERVERAUTHENTICATEREQUEST']._serialized_end=
|
40
|
-
_globals['_SERVERAUTHENTICATERESPONSE']._serialized_start=
|
41
|
-
_globals['_SERVERAUTHENTICATERESPONSE']._serialized_end=
|
42
|
-
_globals['_SERVERSHUTDOWNREQUEST']._serialized_start=
|
43
|
-
_globals['_SERVERSHUTDOWNREQUEST']._serialized_end=
|
44
|
-
_globals['_SERVERSHUTDOWNRESPONSE']._serialized_start=
|
45
|
-
_globals['_SERVERSHUTDOWNRESPONSE']._serialized_end=
|
46
|
-
_globals['_SERVERSTATUSREQUEST']._serialized_start=
|
47
|
-
_globals['_SERVERSTATUSREQUEST']._serialized_end=
|
48
|
-
_globals['_SERVERSTATUSRESPONSE']._serialized_start=
|
49
|
-
_globals['_SERVERSTATUSRESPONSE']._serialized_end=
|
50
|
-
_globals['_SERVERINFORMINITREQUEST']._serialized_start=
|
51
|
-
_globals['_SERVERINFORMINITREQUEST']._serialized_end=
|
52
|
-
_globals['_SERVERINFORMINITRESPONSE']._serialized_start=
|
53
|
-
_globals['_SERVERINFORMINITRESPONSE']._serialized_end=
|
54
|
-
_globals['
|
55
|
-
_globals['
|
56
|
-
_globals['
|
57
|
-
_globals['
|
58
|
-
_globals['
|
59
|
-
_globals['
|
60
|
-
_globals['
|
61
|
-
_globals['
|
62
|
-
_globals['
|
63
|
-
_globals['
|
64
|
-
_globals['
|
65
|
-
_globals['
|
66
|
-
_globals['
|
67
|
-
_globals['
|
68
|
-
_globals['
|
69
|
-
_globals['
|
70
|
-
_globals['
|
71
|
-
_globals['
|
72
|
-
_globals['
|
73
|
-
_globals['
|
74
|
-
_globals['_SERVERREQUEST']._serialized_start=1385
|
75
|
-
_globals['_SERVERREQUEST']._serialized_end=2020
|
76
|
-
_globals['_SERVERRESPONSE']._serialized_start=2023
|
77
|
-
_globals['_SERVERRESPONSE']._serialized_end=2680
|
39
|
+
_globals['_SERVERAUTHENTICATEREQUEST']._serialized_start=178
|
40
|
+
_globals['_SERVERAUTHENTICATEREQUEST']._serialized_end=285
|
41
|
+
_globals['_SERVERAUTHENTICATERESPONSE']._serialized_start=287
|
42
|
+
_globals['_SERVERAUTHENTICATERESPONSE']._serialized_end=406
|
43
|
+
_globals['_SERVERSHUTDOWNREQUEST']._serialized_start=408
|
44
|
+
_globals['_SERVERSHUTDOWNREQUEST']._serialized_end=476
|
45
|
+
_globals['_SERVERSHUTDOWNRESPONSE']._serialized_start=478
|
46
|
+
_globals['_SERVERSHUTDOWNRESPONSE']._serialized_end=502
|
47
|
+
_globals['_SERVERSTATUSREQUEST']._serialized_start=504
|
48
|
+
_globals['_SERVERSTATUSREQUEST']._serialized_end=570
|
49
|
+
_globals['_SERVERSTATUSRESPONSE']._serialized_start=572
|
50
|
+
_globals['_SERVERSTATUSRESPONSE']._serialized_end=594
|
51
|
+
_globals['_SERVERINFORMINITREQUEST']._serialized_start=596
|
52
|
+
_globals['_SERVERINFORMINITREQUEST']._serialized_end=710
|
53
|
+
_globals['_SERVERINFORMINITRESPONSE']._serialized_start=712
|
54
|
+
_globals['_SERVERINFORMINITRESPONSE']._serialized_end=738
|
55
|
+
_globals['_SERVERINFORMFINISHREQUEST']._serialized_start=740
|
56
|
+
_globals['_SERVERINFORMFINISHREQUEST']._serialized_end=812
|
57
|
+
_globals['_SERVERINFORMFINISHRESPONSE']._serialized_start=814
|
58
|
+
_globals['_SERVERINFORMFINISHRESPONSE']._serialized_end=842
|
59
|
+
_globals['_SERVERINFORMATTACHREQUEST']._serialized_start=844
|
60
|
+
_globals['_SERVERINFORMATTACHREQUEST']._serialized_end=916
|
61
|
+
_globals['_SERVERINFORMATTACHRESPONSE']._serialized_start=918
|
62
|
+
_globals['_SERVERINFORMATTACHRESPONSE']._serialized_end=1035
|
63
|
+
_globals['_SERVERINFORMDETACHREQUEST']._serialized_start=1037
|
64
|
+
_globals['_SERVERINFORMDETACHREQUEST']._serialized_end=1109
|
65
|
+
_globals['_SERVERINFORMDETACHRESPONSE']._serialized_start=1111
|
66
|
+
_globals['_SERVERINFORMDETACHRESPONSE']._serialized_end=1139
|
67
|
+
_globals['_SERVERINFORMTEARDOWNREQUEST']._serialized_start=1141
|
68
|
+
_globals['_SERVERINFORMTEARDOWNREQUEST']._serialized_end=1234
|
69
|
+
_globals['_SERVERINFORMTEARDOWNRESPONSE']._serialized_start=1236
|
70
|
+
_globals['_SERVERINFORMTEARDOWNRESPONSE']._serialized_end=1266
|
71
|
+
_globals['_SERVERREQUEST']._serialized_start=1269
|
72
|
+
_globals['_SERVERREQUEST']._serialized_end=2019
|
73
|
+
_globals['_SERVERRESPONSE']._serialized_start=2022
|
74
|
+
_globals['_SERVERRESPONSE']._serialized_end=2814
|
78
75
|
# @@protoc_insertion_point(module_scope)
|
@@ -2,7 +2,7 @@
|
|
2
2
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
3
3
|
# NO CHECKED-IN PROTOBUF GENCODE
|
4
4
|
# source: wandb/proto/wandb_settings.proto
|
5
|
-
# Protobuf Python Version: 6.
|
5
|
+
# Protobuf Python Version: 6.31.1
|
6
6
|
"""Generated protocol buffer code."""
|
7
7
|
from google.protobuf import descriptor as _descriptor
|
8
8
|
from google.protobuf import descriptor_pool as _descriptor_pool
|
@@ -12,8 +12,8 @@ from google.protobuf.internal import builder as _builder
|
|
12
12
|
_runtime_version.ValidateProtobufRuntimeVersion(
|
13
13
|
_runtime_version.Domain.PUBLIC,
|
14
14
|
6,
|
15
|
-
|
16
|
-
|
15
|
+
31,
|
16
|
+
1,
|
17
17
|
'',
|
18
18
|
'wandb/proto/wandb_settings.proto'
|
19
19
|
)
|
@@ -0,0 +1,49 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
3
|
+
# NO CHECKED-IN PROTOBUF GENCODE
|
4
|
+
# source: wandb/proto/wandb_sync.proto
|
5
|
+
# Protobuf Python Version: 6.31.1
|
6
|
+
"""Generated protocol buffer code."""
|
7
|
+
from google.protobuf import descriptor as _descriptor
|
8
|
+
from google.protobuf import descriptor_pool as _descriptor_pool
|
9
|
+
from google.protobuf import runtime_version as _runtime_version
|
10
|
+
from google.protobuf import symbol_database as _symbol_database
|
11
|
+
from google.protobuf.internal import builder as _builder
|
12
|
+
_runtime_version.ValidateProtobufRuntimeVersion(
|
13
|
+
_runtime_version.Domain.PUBLIC,
|
14
|
+
6,
|
15
|
+
31,
|
16
|
+
1,
|
17
|
+
'',
|
18
|
+
'wandb/proto/wandb_sync.proto'
|
19
|
+
)
|
20
|
+
# @@protoc_insertion_point(imports)
|
21
|
+
|
22
|
+
_sym_db = _symbol_database.Default()
|
23
|
+
|
24
|
+
|
25
|
+
from wandb.proto import wandb_internal_pb2 as wandb_dot_proto_dot_wandb__internal__pb2
|
26
|
+
from wandb.proto import wandb_settings_pb2 as wandb_dot_proto_dot_wandb__settings__pb2
|
27
|
+
|
28
|
+
|
29
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1cwandb/proto/wandb_sync.proto\x12\x0ewandb_internal\x1a wandb/proto/wandb_internal.proto\x1a wandb/proto/wandb_settings.proto\"Q\n\x15ServerInitSyncRequest\x12\x0c\n\x04path\x18\x01 \x03(\t\x12*\n\x08settings\x18\x02 \x01(\x0b\x32\x18.wandb_internal.Settings\"$\n\x16ServerInitSyncResponse\x12\n\n\x02id\x18\x01 \x01(\t\"4\n\x11ServerSyncRequest\x12\n\n\x02id\x18\x01 \x01(\t\x12\x13\n\x0bparallelism\x18\x02 \x01(\r\"$\n\x12ServerSyncResponse\x12\x0e\n\x06\x65rrors\x18\x02 \x03(\t\"%\n\x17ServerSyncStatusRequest\x12\n\n\x02id\x18\x01 \x01(\t\"]\n\x18ServerSyncStatusResponse\x12-\n\x05stats\x18\x01 \x01(\x0b\x32\x1e.wandb_internal.OperationStats\x12\x12\n\nnew_errors\x18\x02 \x03(\tB\x1bZ\x19\x63ore/pkg/service_go_protob\x06proto3')
|
30
|
+
|
31
|
+
_globals = globals()
|
32
|
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
33
|
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'wandb.proto.wandb_sync_pb2', _globals)
|
34
|
+
if not _descriptor._USE_C_DESCRIPTORS:
|
35
|
+
_globals['DESCRIPTOR']._loaded_options = None
|
36
|
+
_globals['DESCRIPTOR']._serialized_options = b'Z\031core/pkg/service_go_proto'
|
37
|
+
_globals['_SERVERINITSYNCREQUEST']._serialized_start=116
|
38
|
+
_globals['_SERVERINITSYNCREQUEST']._serialized_end=197
|
39
|
+
_globals['_SERVERINITSYNCRESPONSE']._serialized_start=199
|
40
|
+
_globals['_SERVERINITSYNCRESPONSE']._serialized_end=235
|
41
|
+
_globals['_SERVERSYNCREQUEST']._serialized_start=237
|
42
|
+
_globals['_SERVERSYNCREQUEST']._serialized_end=289
|
43
|
+
_globals['_SERVERSYNCRESPONSE']._serialized_start=291
|
44
|
+
_globals['_SERVERSYNCRESPONSE']._serialized_end=327
|
45
|
+
_globals['_SERVERSYNCSTATUSREQUEST']._serialized_start=329
|
46
|
+
_globals['_SERVERSYNCSTATUSREQUEST']._serialized_end=366
|
47
|
+
_globals['_SERVERSYNCSTATUSRESPONSE']._serialized_start=368
|
48
|
+
_globals['_SERVERSYNCSTATUSRESPONSE']._serialized_end=461
|
49
|
+
# @@protoc_insertion_point(module_scope)
|
@@ -2,7 +2,7 @@
|
|
2
2
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
3
3
|
# NO CHECKED-IN PROTOBUF GENCODE
|
4
4
|
# source: wandb/proto/wandb_telemetry.proto
|
5
|
-
# Protobuf Python Version: 6.
|
5
|
+
# Protobuf Python Version: 6.31.1
|
6
6
|
"""Generated protocol buffer code."""
|
7
7
|
from google.protobuf import descriptor as _descriptor
|
8
8
|
from google.protobuf import descriptor_pool as _descriptor_pool
|
@@ -12,8 +12,8 @@ from google.protobuf.internal import builder as _builder
|
|
12
12
|
_runtime_version.ValidateProtobufRuntimeVersion(
|
13
13
|
_runtime_version.Domain.PUBLIC,
|
14
14
|
6,
|
15
|
-
|
16
|
-
|
15
|
+
31,
|
16
|
+
1,
|
17
17
|
'',
|
18
18
|
'wandb/proto/wandb_telemetry.proto'
|
19
19
|
)
|
@@ -25,7 +25,7 @@ _sym_db = _symbol_database.Default()
|
|
25
25
|
from wandb.proto import wandb_base_pb2 as wandb_dot_proto_dot_wandb__base__pb2
|
26
26
|
|
27
27
|
|
28
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n!wandb/proto/wandb_telemetry.proto\x12\x0ewandb_internal\x1a\x1cwandb/proto/wandb_base.proto\"\xdb\x03\n\x0fTelemetryRecord\x12-\n\x0cimports_init\x18\x01 \x01(\x0b\x32\x17.wandb_internal.Imports\x12/\n\x0eimports_finish\x18\x02 \x01(\x0b\x32\x17.wandb_internal.Imports\x12(\n\x07\x66\x65\x61ture\x18\x03 \x01(\x0b\x32\x17.wandb_internal.Feature\x12\x16\n\x0epython_version\x18\x04 \x01(\t\x12\x13\n\x0b\x63li_version\x18\x05 \x01(\t\x12\x1b\n\x13huggingface_version\x18\x06 \x01(\t\x12 \n\x03\x65nv\x18\x08 \x01(\x0b\x32\x13.wandb_internal.Env\x12%\n\x05label\x18\t \x01(\x0b\x32\x16.wandb_internal.Labels\x12.\n\ndeprecated\x18\n \x01(\x0b\x32\x1a.wandb_internal.Deprecated\x12&\n\x06issues\x18\x0b \x01(\x0b\x32\x16.wandb_internal.Issues\x12\x14\n\x0c\x63ore_version\x18\x0c \x01(\t\x12\x10\n\x08platform\x18\r \x01(\t\x12+\n\x05_info\x18\xc8\x01 \x01(\x0b\x32\x1b.wandb_internal._RecordInfo\"\x11\n\x0fTelemetryResult\"\x9a\x0e\n\x07Imports\x12\r\n\x05torch\x18\x01 \x01(\x08\x12\r\n\x05keras\x18\x02 \x01(\x08\x12\x12\n\ntensorflow\x18\x03 \x01(\x08\x12\x0e\n\x06\x66\x61stai\x18\x04 \x01(\x08\x12\x0f\n\x07sklearn\x18\x05 \x01(\x08\x12\x0f\n\x07xgboost\x18\x06 \x01(\x08\x12\x10\n\x08\x63\x61tboost\x18\x07 \x01(\x08\x12\x10\n\x08lightgbm\x18\x08 \x01(\x08\x12\x19\n\x11pytorch_lightning\x18\t \x01(\x08\x12\x0e\n\x06ignite\x18\n \x01(\x08\x12\x14\n\x0ctransformers\x18\x0b \x01(\x08\x12\x0b\n\x03jax\x18\x0c \x01(\x08\x12\x10\n\x08metaflow\x18\r \x01(\x08\x12\x10\n\x08\x61llennlp\x18\x0e \x01(\x08\x12\x11\n\tautogluon\x18\x0f \x01(\x08\x12\x11\n\tautokeras\x18\x10 \x01(\x08\x12\x10\n\x08\x63\x61talyst\x18\x12 \x01(\x08\x12\x10\n\x08\x64\x65\x65pchem\x18\x15 \x01(\x08\x12\x0f\n\x07\x64\x65\x65pctr\x18\x16 \x01(\x08\x12\x0f\n\x07pycaret\x18\x1c \x01(\x08\x12\x14\n\x0cpytorchvideo\x18\x1d \x01(\x08\x12\x0b\n\x03ray\x18\x1e \x01(\x08\x12\x1a\n\x12simpletransformers\x18\x1f \x01(\x08\x12\x0e\n\x06skorch\x18 \x01(\x08\x12\r\n\x05spacy\x18! \x01(\x08\x12\r\n\x05\x66lash\x18\" \x01(\x08\x12\x0e\n\x06optuna\x18# \x01(\x08\x12\x0f\n\x07recbole\x18$ \x01(\x08\x12\x0c\n\x04mmcv\x18% \x01(\x08\x12\r\n\x05mmdet\x18& \x01(\x08\x12\x11\n\ttorchdrug\x18\' \x01(\x08\x12\x11\n\ttorchtext\x18( \x01(\x08\x12\x13\n\x0btorchvision\x18) \x01(\x08\x12\r\n\x05\x65legy\x18* \x01(\x08\x12\x12\n\ndetectron2\x18+ \x01(\x08\x12\r\n\x05\x66lair\x18, \x01(\x08\x12\x0c\n\x04\x66lax\x18- \x01(\x08\x12\x0c\n\x04syft\x18. \x01(\x08\x12\x0b\n\x03TTS\x18/ \x01(\x08\x12\r\n\x05monai\x18\x30 \x01(\x08\x12\x17\n\x0fhuggingface_hub\x18\x31 \x01(\x08\x12\r\n\x05hydra\x18\x32 \x01(\x08\x12\x10\n\x08\x64\x61tasets\x18\x33 \x01(\x08\x12\x0e\n\x06sacred\x18\x34 \x01(\x08\x12\x0e\n\x06joblib\x18\x35 \x01(\x08\x12\x0c\n\x04\x64\x61sk\x18\x36 \x01(\x08\x12\x11\n\tpaddleocr\x18\x38 \x01(\x08\x12\r\n\x05ppdet\x18\x39 \x01(\x08\x12\x11\n\tpaddleseg\x18: \x01(\x08\x12\x11\n\tpaddlenlp\x18; \x01(\x08\x12\r\n\x05mmseg\x18< \x01(\x08\x12\r\n\x05mmocr\x18= \x01(\x08\x12\r\n\x05mmcls\x18> \x01(\x08\x12\x0c\n\x04timm\x18? \x01(\x08\x12\x0f\n\x07\x66\x61irseq\x18@ \x01(\x08\x12\x12\n\ndeepchecks\x18\x41 \x01(\x08\x12\x10\n\x08\x63omposer\x18\x42 \x01(\x08\x12\x10\n\x08sparseml\x18\x43 \x01(\x08\x12\x10\n\x08\x61nomalib\x18\x44 \x01(\x08\x12\r\n\x05zenml\x18\x45 \x01(\x08\x12\x12\n\ncolossalai\x18\x46 \x01(\x08\x12\x12\n\naccelerate\x18G \x01(\x08\x12\x0e\n\x06merlin\x18H \x01(\x08\x12\x0f\n\x07nanodet\x18I \x01(\x08\x12#\n\x1bsegmentation_models_pytorch\x18J \x01(\x08\x12\x1d\n\x15sentence_transformers\x18K \x01(\x08\x12\x0b\n\x03\x64gl\x18L \x01(\x08\x12\x17\n\x0ftorch_geometric\x18M \x01(\x08\x12\x0c\n\x04jina\x18N \x01(\x08\x12\x0e\n\x06kornia\x18O \x01(\x08\x12\x16\n\x0e\x61lbumentations\x18P \x01(\x08\x12\x10\n\x08keras_cv\x18Q \x01(\x08\x12\x10\n\x08mmengine\x18R \x01(\x08\x12\x11\n\tdiffusers\x18S \x01(\x08\x12\x0b\n\x03trl\x18T \x01(\x08\x12\x0c\n\x04trlx\x18U \x01(\x08\x12\x11\n\tlangchain\x18V \x01(\x08\x12\x13\n\x0bllama_index\x18W \x01(\x08\x12\x15\n\rstability_sdk\x18X \x01(\x08\x12\x0f\n\x07prefect\x18Y \x01(\x08\x12\x13\n\x0bprefect_ray\x18Z \x01(\x08\x12\x10\n\x08pinecone\x18[ \x01(\x08\x12\x10\n\x08\x63hromadb\x18\\ \x01(\x08\x12\x10\n\x08weaviate\x18] \x01(\x08\x12\x13\n\x0bpromptlayer\x18^ \x01(\x08\x12\x0e\n\x06openai\x18_ \x01(\x08\x12\x0e\n\x06\x63ohere\x18` \x01(\x08\x12\x11\n\tanthropic\x18\x61 \x01(\x08\x12\x0c\n\x04peft\x18\x62 \x01(\x08\x12\x0f\n\x07optimum\x18\x63 \x01(\x08\x12\x10\n\x08\x65valuate\x18\x64 \x01(\x08\x12\x10\n\x08langflow\x18\x65 \x01(\x08\x12\x12\n\nkeras_core\x18\x66 \x01(\x08\x12\x18\n\x10lightning_fabric\x18g \x01(\x08\x12\x1c\n\x14\x63urated_transformers\x18h \x01(\x08\x12\x0e\n\x06orjson\x18i \x01(\x08\x12\x11\n\tlightning\x18j \x01(\x08J\x04\x08\x11\x10\x12J\x04\x08\x13\x10\x14J\x04\x08\x14\x10\x15J\x04\x08\x17\x10\x18J\x04\x08\x18\x10\x19J\x04\x08\x19\x10\x1aJ\x04\x08\x1a\x10\x1bJ\x04\x08\x1b\x10\x1cJ\x04\x08\x37\x10\x38\"\x95\r\n\x07\x46\x65\x61ture\x12\r\n\x05watch\x18\x01 \x01(\x08\x12\x0e\n\x06\x66inish\x18\x02 \x01(\x08\x12\x0c\n\x04save\x18\x03 \x01(\x08\x12\x0f\n\x07offline\x18\x04 \x01(\x08\x12\x0f\n\x07resumed\x18\x05 \x01(\x08\x12\x0c\n\x04grpc\x18\x06 \x01(\x08\x12\x0e\n\x06metric\x18\x07 \x01(\x08\x12\r\n\x05keras\x18\x08 \x01(\x08\x12\x11\n\tsagemaker\x18\t \x01(\x08\x12\x1c\n\x14\x61rtifact_incremental\x18\n \x01(\x08\x12\x10\n\x08metaflow\x18\x0b \x01(\x08\x12\x0f\n\x07prodigy\x18\x0c \x01(\x08\x12\x15\n\rset_init_name\x18\r \x01(\x08\x12\x13\n\x0bset_init_id\x18\x0e \x01(\x08\x12\x15\n\rset_init_tags\x18\x0f \x01(\x08\x12\x17\n\x0fset_init_config\x18\x10 \x01(\x08\x12\x14\n\x0cset_run_name\x18\x11 \x01(\x08\x12\x14\n\x0cset_run_tags\x18\x12 \x01(\x08\x12\x17\n\x0fset_config_item\x18\x13 \x01(\x08\x12\x0e\n\x06launch\x18\x14 \x01(\x08\x12\x1c\n\x14torch_profiler_trace\x18\x15 \x01(\x08\x12\x0b\n\x03sb3\x18\x16 \x01(\x08\x12\x17\n\x0finit_return_run\x18\x18 \x01(\x08\x12\x1f\n\x17lightgbm_wandb_callback\x18\x19 \x01(\x08\x12\x1c\n\x14lightgbm_log_summary\x18\x1a \x01(\x08\x12\x1f\n\x17\x63\x61tboost_wandb_callback\x18\x1b \x01(\x08\x12\x1c\n\x14\x63\x61tboost_log_summary\x18\x1c \x01(\x08\x12\x17\n\x0ftensorboard_log\x18\x1d \x01(\x08\x12\x16\n\x0e\x65stimator_hook\x18\x1e \x01(\x08\x12\x1e\n\x16xgboost_wandb_callback\x18\x1f \x01(\x08\x12\"\n\x1axgboost_old_wandb_callback\x18 \x01(\x08\x12\x0e\n\x06\x61ttach\x18! \x01(\x08\x12\x19\n\x11tensorboard_patch\x18\" \x01(\x08\x12\x18\n\x10tensorboard_sync\x18# \x01(\x08\x12\x15\n\rkfp_wandb_log\x18$ \x01(\x08\x12\x1b\n\x13maybe_run_overwrite\x18% \x01(\x08\x12\x1c\n\x14keras_metrics_logger\x18& \x01(\x08\x12\x1e\n\x16keras_model_checkpoint\x18\' \x01(\x08\x12!\n\x19keras_wandb_eval_callback\x18( \x01(\x08\x12\x1d\n\x15\x66low_control_overflow\x18) \x01(\x08\x12\x0c\n\x04sync\x18* \x01(\x08\x12\x1d\n\x15\x66low_control_disabled\x18+ \x01(\x08\x12\x1b\n\x13\x66low_control_custom\x18, \x01(\x08\x12\x14\n\x0copen_metrics\x18. \x01(\x08\x12\x1a\n\x12ultralytics_yolov8\x18/ \x01(\x08\x12\x17\n\x0fimporter_mlflow\x18\x30 \x01(\x08\x12\x15\n\rsync_tfevents\x18\x31 \x01(\x08\x12\x15\n\rasync_uploads\x18\x32 \x01(\x08\x12\x16\n\x0eopenai_autolog\x18\x33 \x01(\x08\x12\x18\n\x10langchain_tracer\x18\x34 \x01(\x08\x12\x16\n\x0e\x63ohere_autolog\x18\x35 \x01(\x08\x12\x1b\n\x13hf_pipeline_autolog\x18\x36 \x01(\x08\x12\r\n\x05lib_c\x18\x38 \x01(\x08\x12\x0f\n\x07lib_cpp\x18\x39 \x01(\x08\x12\x19\n\x11openai_finetuning\x18: \x01(\x08\x12\x19\n\x11\x64iffusers_autolog\x18; \x01(\x08\x12\x1f\n\x17lightning_fabric_logger\x18< \x01(\x08\x12\x14\n\x0cset_step_log\x18= \x01(\x08\x12\x13\n\x0bset_summary\x18> \x01(\x08\x12\x16\n\x0emetric_summary\x18? \x01(\x08\x12\x13\n\x0bmetric_goal\x18@ \x01(\x08\x12\x15\n\rmetric_hidden\x18\x41 \x01(\x08\x12\x18\n\x10metric_step_sync\x18\x42 \x01(\x08\x12\x13\n\x0bshared_mode\x18\x43 \x01(\x08\x12#\n\x1bserver_side_derived_summary\x18\x44 \x01(\x08\x12\x1b\n\x13user_provided_label\x18\x45 \x01(\x08\x12\x1e\n\x16\x64\x63gm_profiling_enabled\x18\x46 \x01(\x08\x12\x11\n\tfork_mode\x18G \x01(\x08\x12\x13\n\x0brewind_mode\x18H \x01(\x08J\x04\x08\x17\x10\x18J\x04\x08-\x10.J\x04\x08\x37\x10\x38\"\xc9\x01\n\x03\x45nv\x12\x0f\n\x07jupyter\x18\x01 \x01(\x08\x12\x0e\n\x06kaggle\x18\x02 \x01(\x08\x12\x0f\n\x07windows\x18\x03 \x01(\x08\x12\x0e\n\x06m1_gpu\x18\x04 \x01(\x08\x12\x10\n\x08trainium\x18\n \x01(\x08\x12\x0b\n\x03pex\x18\x0b \x01(\x08\x12\r\n\x05\x63olab\x18\x0c \x01(\x08\x12\x0f\n\x07ipython\x18\r \x01(\x08\x12\x12\n\naws_lambda\x18\x0e \x01(\x08\x12\x0f\n\x07\x61md_gpu\x18\x0f \x01(\x08J\x04\x08\x05\x10\x06J\x04\x08\x06\x10\x07J\x04\x08\x07\x10\x08J\x04\x08\x08\x10\tJ\x04\x08\t\x10\n\"H\n\x06Labels\x12\x13\n\x0b\x63ode_string\x18\x01 \x01(\t\x12\x13\n\x0brepo_string\x18\x02 \x01(\t\x12\x14\n\x0c\x63ode_version\x18\x03 \x01(\t\"\xc2\x06\n\nDeprecated\x12!\n\x19keras_callback__data_type\x18\x01 \x01(\x08\x12\r\n\x05plots\x18\x05 \x01(\x08\x12!\n\x19init__config_include_keys\x18\x07 \x01(\x08\x12!\n\x19init__config_exclude_keys\x18\x08 \x01(\x08\x12\"\n\x1akeras_callback__save_model\x18\t \x01(\x08\x12\x18\n\x10langchain_tracer\x18\n \x01(\x08\x12\x1a\n\x12\x61rtifact__get_path\x18\x0b \x01(\x08\x12#\n\x1b\x61rtifactmanifestentry__name\x18\x0c \x01(\x08\x12\x1e\n\x16\x61pi__artifact_versions\x18\r \x01(\x08\x12(\n artifact_collection__change_type\x18\x0e \x01(\x08\x12\x1f\n\x17run__define_metric_copy\x18\x0f \x01(\x08\x12\x14\n\x0crun_disabled\x18\x10 \x01(\x08\x12\x16\n\x0ekeras_callback\x18\x11 \x01(\x08\x12$\n\x1crun__define_metric_best_goal\x18\x12 \x01(\x08\x12\x19\n\x11run__finish_quiet\x18\x13 \x01(\x08\x12\x18\n\x10run__reinit_bool\x18\x14 \x01(\x08\x12\x14\n\x0crun__get_url\x18\x15 \x01(\x08\x12\x19\n\x11run__project_name\x18\x16 \x01(\x08\x12\x1c\n\x14run__get_project_url\x18\x17 \x01(\x08\x12\x1a\n\x12run__get_sweep_url\x18\x18 \x01(\x08\x12 \n\x18run__use_artifact_use_as\x18\x19 \x01(\x08\x12\x18\n\x10\x61rtifact__use_as\x18\x1a \x01(\x08\x12\x1d\n\x15\x61rtifact__init_use_as\x18\x1b \x01(\x08\x12\"\n\x1a\x62\x65ta__workflows__log_model\x18\x1c \x01(\x08\x12\"\n\x1a\x62\x65ta__workflows__use_model\x18\x1d \x01(\x08\x12#\n\x1b\x62\x65ta__workflows__link_model\x18\x1e \x01(\x08J\x04\x08\x02\x10\x03J\x04\x08\x03\x10\x04J\x04\x08\x04\x10\x05J\x04\x08\x06\x10\x07\"|\n\x06Issues\x12%\n\x1dsettings__validation_warnings\x18\x01 \x01(\x08\x12!\n\x19settings__unexpected_args\x18\x02 \x01(\x08\x12(\n settings__preprocessing_warnings\x18\x03 \x01(\x08\x42\x1bZ\x19\x63ore/pkg/service_go_protob\x06proto3')
|
28
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n!wandb/proto/wandb_telemetry.proto\x12\x0ewandb_internal\x1a\x1cwandb/proto/wandb_base.proto\"\xdb\x03\n\x0fTelemetryRecord\x12-\n\x0cimports_init\x18\x01 \x01(\x0b\x32\x17.wandb_internal.Imports\x12/\n\x0eimports_finish\x18\x02 \x01(\x0b\x32\x17.wandb_internal.Imports\x12(\n\x07\x66\x65\x61ture\x18\x03 \x01(\x0b\x32\x17.wandb_internal.Feature\x12\x16\n\x0epython_version\x18\x04 \x01(\t\x12\x13\n\x0b\x63li_version\x18\x05 \x01(\t\x12\x1b\n\x13huggingface_version\x18\x06 \x01(\t\x12 \n\x03\x65nv\x18\x08 \x01(\x0b\x32\x13.wandb_internal.Env\x12%\n\x05label\x18\t \x01(\x0b\x32\x16.wandb_internal.Labels\x12.\n\ndeprecated\x18\n \x01(\x0b\x32\x1a.wandb_internal.Deprecated\x12&\n\x06issues\x18\x0b \x01(\x0b\x32\x16.wandb_internal.Issues\x12\x14\n\x0c\x63ore_version\x18\x0c \x01(\t\x12\x10\n\x08platform\x18\r \x01(\t\x12+\n\x05_info\x18\xc8\x01 \x01(\x0b\x32\x1b.wandb_internal._RecordInfo\"\x11\n\x0fTelemetryResult\"\xa8\x0e\n\x07Imports\x12\r\n\x05torch\x18\x01 \x01(\x08\x12\r\n\x05keras\x18\x02 \x01(\x08\x12\x12\n\ntensorflow\x18\x03 \x01(\x08\x12\x0e\n\x06\x66\x61stai\x18\x04 \x01(\x08\x12\x0f\n\x07sklearn\x18\x05 \x01(\x08\x12\x0f\n\x07xgboost\x18\x06 \x01(\x08\x12\x10\n\x08\x63\x61tboost\x18\x07 \x01(\x08\x12\x10\n\x08lightgbm\x18\x08 \x01(\x08\x12\x19\n\x11pytorch_lightning\x18\t \x01(\x08\x12\x0e\n\x06ignite\x18\n \x01(\x08\x12\x14\n\x0ctransformers\x18\x0b \x01(\x08\x12\x0b\n\x03jax\x18\x0c \x01(\x08\x12\x10\n\x08metaflow\x18\r \x01(\x08\x12\x10\n\x08\x61llennlp\x18\x0e \x01(\x08\x12\x11\n\tautogluon\x18\x0f \x01(\x08\x12\x11\n\tautokeras\x18\x10 \x01(\x08\x12\x10\n\x08\x63\x61talyst\x18\x12 \x01(\x08\x12\x10\n\x08\x64\x65\x65pchem\x18\x15 \x01(\x08\x12\x0f\n\x07\x64\x65\x65pctr\x18\x16 \x01(\x08\x12\x0f\n\x07pycaret\x18\x1c \x01(\x08\x12\x14\n\x0cpytorchvideo\x18\x1d \x01(\x08\x12\x0b\n\x03ray\x18\x1e \x01(\x08\x12\x1a\n\x12simpletransformers\x18\x1f \x01(\x08\x12\x0e\n\x06skorch\x18 \x01(\x08\x12\r\n\x05spacy\x18! \x01(\x08\x12\r\n\x05\x66lash\x18\" \x01(\x08\x12\x0e\n\x06optuna\x18# \x01(\x08\x12\x0f\n\x07recbole\x18$ \x01(\x08\x12\x0c\n\x04mmcv\x18% \x01(\x08\x12\r\n\x05mmdet\x18& \x01(\x08\x12\x11\n\ttorchdrug\x18\' \x01(\x08\x12\x11\n\ttorchtext\x18( \x01(\x08\x12\x13\n\x0btorchvision\x18) \x01(\x08\x12\r\n\x05\x65legy\x18* \x01(\x08\x12\x12\n\ndetectron2\x18+ \x01(\x08\x12\r\n\x05\x66lair\x18, \x01(\x08\x12\x0c\n\x04\x66lax\x18- \x01(\x08\x12\x0c\n\x04syft\x18. \x01(\x08\x12\x0b\n\x03TTS\x18/ \x01(\x08\x12\r\n\x05monai\x18\x30 \x01(\x08\x12\x17\n\x0fhuggingface_hub\x18\x31 \x01(\x08\x12\r\n\x05hydra\x18\x32 \x01(\x08\x12\x10\n\x08\x64\x61tasets\x18\x33 \x01(\x08\x12\x0e\n\x06sacred\x18\x34 \x01(\x08\x12\x0e\n\x06joblib\x18\x35 \x01(\x08\x12\x0c\n\x04\x64\x61sk\x18\x36 \x01(\x08\x12\x11\n\tpaddleocr\x18\x38 \x01(\x08\x12\r\n\x05ppdet\x18\x39 \x01(\x08\x12\x11\n\tpaddleseg\x18: \x01(\x08\x12\x11\n\tpaddlenlp\x18; \x01(\x08\x12\r\n\x05mmseg\x18< \x01(\x08\x12\r\n\x05mmocr\x18= \x01(\x08\x12\r\n\x05mmcls\x18> \x01(\x08\x12\x0c\n\x04timm\x18? \x01(\x08\x12\x0f\n\x07\x66\x61irseq\x18@ \x01(\x08\x12\x12\n\ndeepchecks\x18\x41 \x01(\x08\x12\x10\n\x08\x63omposer\x18\x42 \x01(\x08\x12\x10\n\x08sparseml\x18\x43 \x01(\x08\x12\x10\n\x08\x61nomalib\x18\x44 \x01(\x08\x12\r\n\x05zenml\x18\x45 \x01(\x08\x12\x12\n\ncolossalai\x18\x46 \x01(\x08\x12\x12\n\naccelerate\x18G \x01(\x08\x12\x0e\n\x06merlin\x18H \x01(\x08\x12\x0f\n\x07nanodet\x18I \x01(\x08\x12#\n\x1bsegmentation_models_pytorch\x18J \x01(\x08\x12\x1d\n\x15sentence_transformers\x18K \x01(\x08\x12\x0b\n\x03\x64gl\x18L \x01(\x08\x12\x17\n\x0ftorch_geometric\x18M \x01(\x08\x12\x0c\n\x04jina\x18N \x01(\x08\x12\x0e\n\x06kornia\x18O \x01(\x08\x12\x16\n\x0e\x61lbumentations\x18P \x01(\x08\x12\x10\n\x08keras_cv\x18Q \x01(\x08\x12\x10\n\x08mmengine\x18R \x01(\x08\x12\x11\n\tdiffusers\x18S \x01(\x08\x12\x0b\n\x03trl\x18T \x01(\x08\x12\x0c\n\x04trlx\x18U \x01(\x08\x12\x11\n\tlangchain\x18V \x01(\x08\x12\x13\n\x0bllama_index\x18W \x01(\x08\x12\x15\n\rstability_sdk\x18X \x01(\x08\x12\x0f\n\x07prefect\x18Y \x01(\x08\x12\x13\n\x0bprefect_ray\x18Z \x01(\x08\x12\x10\n\x08pinecone\x18[ \x01(\x08\x12\x10\n\x08\x63hromadb\x18\\ \x01(\x08\x12\x10\n\x08weaviate\x18] \x01(\x08\x12\x13\n\x0bpromptlayer\x18^ \x01(\x08\x12\x0e\n\x06openai\x18_ \x01(\x08\x12\x0e\n\x06\x63ohere\x18` \x01(\x08\x12\x11\n\tanthropic\x18\x61 \x01(\x08\x12\x0c\n\x04peft\x18\x62 \x01(\x08\x12\x0f\n\x07optimum\x18\x63 \x01(\x08\x12\x10\n\x08\x65valuate\x18\x64 \x01(\x08\x12\x10\n\x08langflow\x18\x65 \x01(\x08\x12\x12\n\nkeras_core\x18\x66 \x01(\x08\x12\x18\n\x10lightning_fabric\x18g \x01(\x08\x12\x1c\n\x14\x63urated_transformers\x18h \x01(\x08\x12\x0e\n\x06orjson\x18i \x01(\x08\x12\x11\n\tlightning\x18j \x01(\x08\x12\x0c\n\x04\x64spy\x18k \x01(\x08J\x04\x08\x11\x10\x12J\x04\x08\x13\x10\x14J\x04\x08\x14\x10\x15J\x04\x08\x17\x10\x18J\x04\x08\x18\x10\x19J\x04\x08\x19\x10\x1aJ\x04\x08\x1a\x10\x1bJ\x04\x08\x1b\x10\x1cJ\x04\x08\x37\x10\x38\"\xac\r\n\x07\x46\x65\x61ture\x12\r\n\x05watch\x18\x01 \x01(\x08\x12\x0e\n\x06\x66inish\x18\x02 \x01(\x08\x12\x0c\n\x04save\x18\x03 \x01(\x08\x12\x0f\n\x07offline\x18\x04 \x01(\x08\x12\x0f\n\x07resumed\x18\x05 \x01(\x08\x12\x0c\n\x04grpc\x18\x06 \x01(\x08\x12\x0e\n\x06metric\x18\x07 \x01(\x08\x12\r\n\x05keras\x18\x08 \x01(\x08\x12\x11\n\tsagemaker\x18\t \x01(\x08\x12\x1c\n\x14\x61rtifact_incremental\x18\n \x01(\x08\x12\x10\n\x08metaflow\x18\x0b \x01(\x08\x12\x0f\n\x07prodigy\x18\x0c \x01(\x08\x12\x15\n\rset_init_name\x18\r \x01(\x08\x12\x13\n\x0bset_init_id\x18\x0e \x01(\x08\x12\x15\n\rset_init_tags\x18\x0f \x01(\x08\x12\x17\n\x0fset_init_config\x18\x10 \x01(\x08\x12\x14\n\x0cset_run_name\x18\x11 \x01(\x08\x12\x14\n\x0cset_run_tags\x18\x12 \x01(\x08\x12\x17\n\x0fset_config_item\x18\x13 \x01(\x08\x12\x0e\n\x06launch\x18\x14 \x01(\x08\x12\x1c\n\x14torch_profiler_trace\x18\x15 \x01(\x08\x12\x0b\n\x03sb3\x18\x16 \x01(\x08\x12\x17\n\x0finit_return_run\x18\x18 \x01(\x08\x12\x1f\n\x17lightgbm_wandb_callback\x18\x19 \x01(\x08\x12\x1c\n\x14lightgbm_log_summary\x18\x1a \x01(\x08\x12\x1f\n\x17\x63\x61tboost_wandb_callback\x18\x1b \x01(\x08\x12\x1c\n\x14\x63\x61tboost_log_summary\x18\x1c \x01(\x08\x12\x17\n\x0ftensorboard_log\x18\x1d \x01(\x08\x12\x16\n\x0e\x65stimator_hook\x18\x1e \x01(\x08\x12\x1e\n\x16xgboost_wandb_callback\x18\x1f \x01(\x08\x12\"\n\x1axgboost_old_wandb_callback\x18 \x01(\x08\x12\x0e\n\x06\x61ttach\x18! \x01(\x08\x12\x19\n\x11tensorboard_patch\x18\" \x01(\x08\x12\x18\n\x10tensorboard_sync\x18# \x01(\x08\x12\x15\n\rkfp_wandb_log\x18$ \x01(\x08\x12\x1b\n\x13maybe_run_overwrite\x18% \x01(\x08\x12\x1c\n\x14keras_metrics_logger\x18& \x01(\x08\x12\x1e\n\x16keras_model_checkpoint\x18\' \x01(\x08\x12!\n\x19keras_wandb_eval_callback\x18( \x01(\x08\x12\x1d\n\x15\x66low_control_overflow\x18) \x01(\x08\x12\x0c\n\x04sync\x18* \x01(\x08\x12\x1d\n\x15\x66low_control_disabled\x18+ \x01(\x08\x12\x1b\n\x13\x66low_control_custom\x18, \x01(\x08\x12\x14\n\x0copen_metrics\x18. \x01(\x08\x12\x1a\n\x12ultralytics_yolov8\x18/ \x01(\x08\x12\x17\n\x0fimporter_mlflow\x18\x30 \x01(\x08\x12\x15\n\rsync_tfevents\x18\x31 \x01(\x08\x12\x15\n\rasync_uploads\x18\x32 \x01(\x08\x12\x16\n\x0eopenai_autolog\x18\x33 \x01(\x08\x12\x18\n\x10langchain_tracer\x18\x34 \x01(\x08\x12\x16\n\x0e\x63ohere_autolog\x18\x35 \x01(\x08\x12\x1b\n\x13hf_pipeline_autolog\x18\x36 \x01(\x08\x12\r\n\x05lib_c\x18\x38 \x01(\x08\x12\x0f\n\x07lib_cpp\x18\x39 \x01(\x08\x12\x19\n\x11openai_finetuning\x18: \x01(\x08\x12\x19\n\x11\x64iffusers_autolog\x18; \x01(\x08\x12\x1f\n\x17lightning_fabric_logger\x18< \x01(\x08\x12\x14\n\x0cset_step_log\x18= \x01(\x08\x12\x13\n\x0bset_summary\x18> \x01(\x08\x12\x16\n\x0emetric_summary\x18? \x01(\x08\x12\x13\n\x0bmetric_goal\x18@ \x01(\x08\x12\x15\n\rmetric_hidden\x18\x41 \x01(\x08\x12\x18\n\x10metric_step_sync\x18\x42 \x01(\x08\x12\x13\n\x0bshared_mode\x18\x43 \x01(\x08\x12#\n\x1bserver_side_derived_summary\x18\x44 \x01(\x08\x12\x1b\n\x13user_provided_label\x18\x45 \x01(\x08\x12\x1e\n\x16\x64\x63gm_profiling_enabled\x18\x46 \x01(\x08\x12\x11\n\tfork_mode\x18G \x01(\x08\x12\x13\n\x0brewind_mode\x18H \x01(\x08\x12\x15\n\rdspy_callback\x18I \x01(\x08J\x04\x08\x17\x10\x18J\x04\x08-\x10.J\x04\x08\x37\x10\x38\"\xc9\x01\n\x03\x45nv\x12\x0f\n\x07jupyter\x18\x01 \x01(\x08\x12\x0e\n\x06kaggle\x18\x02 \x01(\x08\x12\x0f\n\x07windows\x18\x03 \x01(\x08\x12\x0e\n\x06m1_gpu\x18\x04 \x01(\x08\x12\x10\n\x08trainium\x18\n \x01(\x08\x12\x0b\n\x03pex\x18\x0b \x01(\x08\x12\r\n\x05\x63olab\x18\x0c \x01(\x08\x12\x0f\n\x07ipython\x18\r \x01(\x08\x12\x12\n\naws_lambda\x18\x0e \x01(\x08\x12\x0f\n\x07\x61md_gpu\x18\x0f \x01(\x08J\x04\x08\x05\x10\x06J\x04\x08\x06\x10\x07J\x04\x08\x07\x10\x08J\x04\x08\x08\x10\tJ\x04\x08\t\x10\n\"H\n\x06Labels\x12\x13\n\x0b\x63ode_string\x18\x01 \x01(\t\x12\x13\n\x0brepo_string\x18\x02 \x01(\t\x12\x14\n\x0c\x63ode_version\x18\x03 \x01(\t\"\xc2\x06\n\nDeprecated\x12!\n\x19keras_callback__data_type\x18\x01 \x01(\x08\x12\r\n\x05plots\x18\x05 \x01(\x08\x12!\n\x19init__config_include_keys\x18\x07 \x01(\x08\x12!\n\x19init__config_exclude_keys\x18\x08 \x01(\x08\x12\"\n\x1akeras_callback__save_model\x18\t \x01(\x08\x12\x18\n\x10langchain_tracer\x18\n \x01(\x08\x12\x1a\n\x12\x61rtifact__get_path\x18\x0b \x01(\x08\x12#\n\x1b\x61rtifactmanifestentry__name\x18\x0c \x01(\x08\x12\x1e\n\x16\x61pi__artifact_versions\x18\r \x01(\x08\x12(\n artifact_collection__change_type\x18\x0e \x01(\x08\x12\x1f\n\x17run__define_metric_copy\x18\x0f \x01(\x08\x12\x14\n\x0crun_disabled\x18\x10 \x01(\x08\x12\x16\n\x0ekeras_callback\x18\x11 \x01(\x08\x12$\n\x1crun__define_metric_best_goal\x18\x12 \x01(\x08\x12\x19\n\x11run__finish_quiet\x18\x13 \x01(\x08\x12\x18\n\x10run__reinit_bool\x18\x14 \x01(\x08\x12\x14\n\x0crun__get_url\x18\x15 \x01(\x08\x12\x19\n\x11run__project_name\x18\x16 \x01(\x08\x12\x1c\n\x14run__get_project_url\x18\x17 \x01(\x08\x12\x1a\n\x12run__get_sweep_url\x18\x18 \x01(\x08\x12 \n\x18run__use_artifact_use_as\x18\x19 \x01(\x08\x12\x18\n\x10\x61rtifact__use_as\x18\x1a \x01(\x08\x12\x1d\n\x15\x61rtifact__init_use_as\x18\x1b \x01(\x08\x12\"\n\x1a\x62\x65ta__workflows__log_model\x18\x1c \x01(\x08\x12\"\n\x1a\x62\x65ta__workflows__use_model\x18\x1d \x01(\x08\x12#\n\x1b\x62\x65ta__workflows__link_model\x18\x1e \x01(\x08J\x04\x08\x02\x10\x03J\x04\x08\x03\x10\x04J\x04\x08\x04\x10\x05J\x04\x08\x06\x10\x07\"|\n\x06Issues\x12%\n\x1dsettings__validation_warnings\x18\x01 \x01(\x08\x12!\n\x19settings__unexpected_args\x18\x02 \x01(\x08\x12(\n settings__preprocessing_warnings\x18\x03 \x01(\x08\x42\x1bZ\x19\x63ore/pkg/service_go_protob\x06proto3')
|
29
29
|
|
30
30
|
_globals = globals()
|
31
31
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
@@ -38,15 +38,15 @@ if not _descriptor._USE_C_DESCRIPTORS:
|
|
38
38
|
_globals['_TELEMETRYRESULT']._serialized_start=561
|
39
39
|
_globals['_TELEMETRYRESULT']._serialized_end=578
|
40
40
|
_globals['_IMPORTS']._serialized_start=581
|
41
|
-
_globals['_IMPORTS']._serialized_end=
|
42
|
-
_globals['_FEATURE']._serialized_start=
|
43
|
-
_globals['_FEATURE']._serialized_end=
|
44
|
-
_globals['_ENV']._serialized_start=
|
45
|
-
_globals['_ENV']._serialized_end=
|
46
|
-
_globals['_LABELS']._serialized_start=
|
47
|
-
_globals['_LABELS']._serialized_end=
|
48
|
-
_globals['_DEPRECATED']._serialized_start=
|
49
|
-
_globals['_DEPRECATED']._serialized_end=
|
50
|
-
_globals['_ISSUES']._serialized_start=
|
51
|
-
_globals['_ISSUES']._serialized_end=
|
41
|
+
_globals['_IMPORTS']._serialized_end=2413
|
42
|
+
_globals['_FEATURE']._serialized_start=2416
|
43
|
+
_globals['_FEATURE']._serialized_end=4124
|
44
|
+
_globals['_ENV']._serialized_start=4127
|
45
|
+
_globals['_ENV']._serialized_end=4328
|
46
|
+
_globals['_LABELS']._serialized_start=4330
|
47
|
+
_globals['_LABELS']._serialized_end=4402
|
48
|
+
_globals['_DEPRECATED']._serialized_start=4405
|
49
|
+
_globals['_DEPRECATED']._serialized_end=5239
|
50
|
+
_globals['_ISSUES']._serialized_start=5241
|
51
|
+
_globals['_ISSUES']._serialized_end=5365
|
52
52
|
# @@protoc_insertion_point(module_scope)
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import google.protobuf
|
2
|
+
|
3
|
+
protobuf_version = google.protobuf.__version__[0]
|
4
|
+
|
5
|
+
if protobuf_version == "3":
|
6
|
+
from wandb.proto.v3.wandb_sync_pb2 import *
|
7
|
+
elif protobuf_version == "4":
|
8
|
+
from wandb.proto.v4.wandb_sync_pb2 import *
|
9
|
+
elif protobuf_version == "5":
|
10
|
+
from wandb.proto.v5.wandb_sync_pb2 import *
|
11
|
+
elif protobuf_version == "6":
|
12
|
+
from wandb.proto.v6.wandb_sync_pb2 import *
|
@@ -9,10 +9,11 @@ from functools import wraps
|
|
9
9
|
from typing import TYPE_CHECKING, Any, Callable, Dict, Literal, Optional, TypeVar, cast
|
10
10
|
|
11
11
|
from pydantic.dataclasses import dataclass as pydantic_dataclass
|
12
|
-
from typing_extensions import Self
|
12
|
+
from typing_extensions import Concatenate, ParamSpec, Self
|
13
13
|
|
14
|
-
from wandb._iterutils import always_list
|
14
|
+
from wandb._iterutils import always_list, unique_list
|
15
15
|
from wandb._pydantic import from_json, gql_typename
|
16
|
+
from wandb._strutils import nameof, removeprefix
|
16
17
|
from wandb.util import json_friendly_val
|
17
18
|
|
18
19
|
from ._generated import ArtifactPortfolioTypeFields, ArtifactSequenceTypeFields
|
@@ -23,9 +24,10 @@ if TYPE_CHECKING:
|
|
23
24
|
|
24
25
|
from wandb.sdk.artifacts.artifact import Artifact
|
25
26
|
|
26
|
-
|
27
|
-
|
28
|
-
|
27
|
+
ArtifactT = TypeVar("ArtifactT", bound="Artifact")
|
28
|
+
SelfT = TypeVar("SelfT")
|
29
|
+
R = TypeVar("R")
|
30
|
+
P = ParamSpec("P")
|
29
31
|
|
30
32
|
REGISTRY_PREFIX: Final[str] = "wandb-registry-"
|
31
33
|
MAX_ARTIFACT_METADATA_KEYS: Final[int] = 100
|
@@ -97,24 +99,17 @@ def validate_project_name(name: str) -> None:
|
|
97
99
|
"""
|
98
100
|
max_len = 128
|
99
101
|
|
100
|
-
if
|
102
|
+
if not name:
|
101
103
|
raise ValueError("Project name cannot be empty")
|
102
|
-
|
103
|
-
|
104
|
-
if name.startswith(REGISTRY_PREFIX):
|
105
|
-
registry_name = name[len(REGISTRY_PREFIX) :]
|
106
|
-
if len(registry_name) == 0:
|
107
|
-
raise ValueError("Registry name cannot be empty")
|
104
|
+
if not (registry_name := removeprefix(name, REGISTRY_PREFIX)):
|
105
|
+
raise ValueError("Registry name cannot be empty")
|
108
106
|
|
109
107
|
if len(name) > max_len:
|
110
|
-
if registry_name:
|
111
|
-
|
112
|
-
f"Invalid registry name {registry_name!r}, must be {max_len - len(REGISTRY_PREFIX)} characters or less"
|
113
|
-
)
|
108
|
+
if registry_name != name:
|
109
|
+
msg = f"Invalid registry name {registry_name!r}, must be {max_len - len(REGISTRY_PREFIX)} characters or less"
|
114
110
|
else:
|
115
|
-
|
116
|
-
|
117
|
-
)
|
111
|
+
msg = f"Invalid project name {name!r}, must be {max_len} characters or less"
|
112
|
+
raise ValueError(msg)
|
118
113
|
|
119
114
|
# Find the first occurrence of any invalid character
|
120
115
|
if invalid_chars := set(INVALID_URL_CHARACTERS).intersection(name):
|
@@ -157,7 +152,8 @@ def validate_artifact_types_list(artifact_types: list[str]) -> list[str]:
|
|
157
152
|
return artifact_types
|
158
153
|
|
159
154
|
|
160
|
-
|
155
|
+
TAG_REGEX: re.Pattern[str] = re.compile(r"^[-\w]+( +[-\w]+)*$")
|
156
|
+
"""Regex pattern for valid tag names."""
|
161
157
|
|
162
158
|
|
163
159
|
def validate_tags(tags: Collection[str] | str) -> list[str]:
|
@@ -168,34 +164,39 @@ def validate_tags(tags: Collection[str] | str) -> list[str]:
|
|
168
164
|
Raises:
|
169
165
|
ValueError: If any of the tags contain invalid characters.
|
170
166
|
"""
|
171
|
-
tags_list = always_list(tags)
|
172
|
-
|
173
|
-
if any(not _VALID_TAG_PATTERN.match(tag) for tag in tags_list):
|
167
|
+
tags_list = unique_list(always_list(tags))
|
168
|
+
if any(not TAG_REGEX.match(tag) for tag in tags_list):
|
174
169
|
raise ValueError(
|
175
170
|
"Invalid tag(s). "
|
176
171
|
"Tags must only contain alphanumeric characters separated by hyphens, underscores, and/or spaces."
|
177
172
|
)
|
178
|
-
return
|
173
|
+
return tags_list
|
179
174
|
|
180
175
|
|
181
176
|
RESERVED_ARTIFACT_TYPE_PREFIX: Final[str] = "wandb-"
|
182
|
-
|
183
|
-
|
177
|
+
"""Internal, reserved artifact type prefix."""
|
178
|
+
|
179
|
+
RESERVED_ARTIFACT_NAME_PREFIX_BY_TYPE: Final[dict[str, str]] = {
|
180
|
+
"job": "", # Empty prefix means ALL artifact names are reserved for this artifact type
|
184
181
|
"run_table": "run-",
|
185
182
|
"code": "source-",
|
186
183
|
}
|
184
|
+
"""Lookup of internal, reserved `Artifact.name` prefixes by `Artifact.type`."""
|
187
185
|
|
188
186
|
|
189
187
|
def validate_artifact_type(typ: str, name: str) -> str:
|
190
188
|
"""Validate the artifact type and return it as a string."""
|
191
|
-
if
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
189
|
+
if (
|
190
|
+
# Check if the artifact name is disallowed, based on the artifact type
|
191
|
+
(
|
192
|
+
# This check MUST be against `None`, since "" disallows ALL artifact names
|
193
|
+
(bad_prefix := RESERVED_ARTIFACT_NAME_PREFIX_BY_TYPE.get(typ)) is not None
|
194
|
+
and name.startswith(bad_prefix)
|
195
|
+
)
|
196
|
+
or
|
197
|
+
# Check if the artifact type is disallowed
|
198
|
+
typ.startswith(RESERVED_ARTIFACT_TYPE_PREFIX)
|
199
|
+
):
|
199
200
|
raise ValueError(
|
200
201
|
f"Artifact type {typ!r} is reserved for internal use. "
|
201
202
|
"Please use a different type."
|
@@ -224,42 +225,42 @@ def validate_ttl_duration_seconds(gql_ttl_duration_seconds: int | None) -> int |
|
|
224
225
|
|
225
226
|
|
226
227
|
# ----------------------------------------------------------------------------
|
227
|
-
|
228
|
-
"""
|
228
|
+
MethodT = Callable[Concatenate[SelfT, P], R]
|
229
|
+
"""Generic type hint for an instance method, e.g. for use with decorators."""
|
229
230
|
|
230
231
|
|
231
|
-
def ensure_logged(method:
|
232
|
+
def ensure_logged(method: MethodT[ArtifactT, P, R]) -> MethodT[ArtifactT, P, R]:
|
232
233
|
"""Decorator to ensure that an Artifact method can only be called if the artifact has been logged.
|
233
234
|
|
234
235
|
If the method is called on an artifact that's not logged, `ArtifactNotLoggedError` is raised.
|
235
236
|
"""
|
236
237
|
# For clarity, use the qualified (full) name of the method
|
237
|
-
method_fullname = method
|
238
|
+
method_fullname = nameof(method)
|
238
239
|
|
239
240
|
@wraps(method)
|
240
|
-
def wrapper(self: ArtifactT, *args:
|
241
|
+
def wrapper(self: ArtifactT, *args: P.args, **kwargs: P.kwargs) -> R:
|
241
242
|
if self.is_draft():
|
242
243
|
raise ArtifactNotLoggedError(fullname=method_fullname, obj=self)
|
243
244
|
return method(self, *args, **kwargs)
|
244
245
|
|
245
|
-
return
|
246
|
+
return wrapper
|
246
247
|
|
247
248
|
|
248
|
-
def ensure_not_finalized(method:
|
249
|
+
def ensure_not_finalized(method: MethodT[ArtifactT, P, R]) -> MethodT[ArtifactT, P, R]:
|
249
250
|
"""Decorator to ensure that an `Artifact` method can only be called if the artifact isn't finalized.
|
250
251
|
|
251
252
|
If the method is called on an artifact that's not logged, `ArtifactFinalizedError` is raised.
|
252
253
|
"""
|
253
254
|
# For clarity, use the qualified (full) name of the method
|
254
|
-
method_fullname = method
|
255
|
+
method_fullname = nameof(method)
|
255
256
|
|
256
257
|
@wraps(method)
|
257
|
-
def wrapper(self: ArtifactT, *args:
|
258
|
+
def wrapper(self: ArtifactT, *args: P.args, **kwargs: P.kwargs) -> R:
|
258
259
|
if self._final:
|
259
260
|
raise ArtifactFinalizedError(fullname=method_fullname, obj=self)
|
260
261
|
return method(self, *args, **kwargs)
|
261
262
|
|
262
|
-
return
|
263
|
+
return wrapper
|
263
264
|
|
264
265
|
|
265
266
|
def is_artifact_registry_project(project: str) -> bool:
|
@@ -267,11 +268,11 @@ def is_artifact_registry_project(project: str) -> bool:
|
|
267
268
|
|
268
269
|
|
269
270
|
def remove_registry_prefix(project: str) -> str:
|
270
|
-
if is_artifact_registry_project(project):
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
)
|
271
|
+
if not is_artifact_registry_project(project):
|
272
|
+
raise ValueError(
|
273
|
+
f"Project {project!r} does not have the prefix {REGISTRY_PREFIX}. It is not a registry project"
|
274
|
+
)
|
275
|
+
return removeprefix(project, REGISTRY_PREFIX)
|
275
276
|
|
276
277
|
|
277
278
|
@pydantic_dataclass
|
wandb/sdk/artifacts/artifact.py
CHANGED
@@ -39,7 +39,8 @@ import requests
|
|
39
39
|
|
40
40
|
import wandb
|
41
41
|
from wandb import data_types, env
|
42
|
-
from wandb._iterutils import one
|
42
|
+
from wandb._iterutils import one, unique_list
|
43
|
+
from wandb._strutils import nameof
|
43
44
|
from wandb.apis.normalize import normalize_exceptions
|
44
45
|
from wandb.apis.public import ArtifactCollection, ArtifactFiles, Run
|
45
46
|
from wandb.apis.public.utils import gql_compat
|
@@ -912,7 +913,7 @@ class Artifact:
|
|
912
913
|
artifact has not been logged or saved.
|
913
914
|
"""
|
914
915
|
if self._ttl_is_inherited and (self.is_draft() or self._ttl_changed):
|
915
|
-
raise ArtifactNotLoggedError(f"{type(self)
|
916
|
+
raise ArtifactNotLoggedError(f"{nameof(type(self))}.ttl", self)
|
916
917
|
if self._ttl_duration_seconds is None:
|
917
918
|
return None
|
918
919
|
return timedelta(seconds=self._ttl_duration_seconds)
|
@@ -1215,7 +1216,7 @@ class Artifact:
|
|
1215
1216
|
"""
|
1216
1217
|
if self.is_draft():
|
1217
1218
|
if self._save_handle is None:
|
1218
|
-
raise ArtifactNotLoggedError(
|
1219
|
+
raise ArtifactNotLoggedError(nameof(self.wait), self)
|
1219
1220
|
|
1220
1221
|
try:
|
1221
1222
|
result = self._save_handle.wait_or(timeout=timeout)
|
@@ -1445,7 +1446,7 @@ class Artifact:
|
|
1445
1446
|
raise ValueError(f"File with name {name!r} already exists at {path!r}")
|
1446
1447
|
except UnicodeEncodeError as e:
|
1447
1448
|
termerror(
|
1448
|
-
f"Failed to open the provided file ({type(e)
|
1449
|
+
f"Failed to open the provided file ({nameof(type(e))}: {e}). Please "
|
1449
1450
|
f"provide the proper encoding."
|
1450
1451
|
)
|
1451
1452
|
raise
|
@@ -2490,7 +2491,7 @@ class Artifact:
|
|
2490
2491
|
if not self.is_link:
|
2491
2492
|
raise ValueError(
|
2492
2493
|
f"Artifact {self.qualified_name!r} is not a linked artifact and cannot be unlinked. "
|
2493
|
-
f"To delete it, use {self.delete
|
2494
|
+
f"To delete it, use {nameof(self.delete)!r} instead."
|
2494
2495
|
)
|
2495
2496
|
|
2496
2497
|
self._unlink()
|
@@ -2649,8 +2650,7 @@ class Artifact:
|
|
2649
2650
|
)
|
2650
2651
|
)
|
2651
2652
|
for node in linked_nodes:
|
2652
|
-
|
2653
|
-
alias_names = dict.fromkeys(a.alias for a in node.aliases)
|
2653
|
+
alias_names = unique_list(a.alias for a in node.aliases)
|
2654
2654
|
version = f"v{node.version_index}"
|
2655
2655
|
aliases = (
|
2656
2656
|
[*alias_names, version]
|
@@ -5,6 +5,7 @@ from __future__ import annotations
|
|
5
5
|
from typing import TYPE_CHECKING, TypeVar
|
6
6
|
|
7
7
|
from wandb import errors
|
8
|
+
from wandb._strutils import nameof
|
8
9
|
|
9
10
|
if TYPE_CHECKING:
|
10
11
|
from wandb.sdk.artifacts.artifact import Artifact
|
@@ -39,7 +40,7 @@ class ArtifactNotLoggedError(ArtifactStatusError):
|
|
39
40
|
*_, name = fullname.split(".")
|
40
41
|
msg = (
|
41
42
|
f"{fullname!r} used prior to logging artifact or while in offline mode. "
|
42
|
-
f"Call {
|
43
|
+
f"Call {nameof(obj.wait)}() before accessing logged artifact properties."
|
43
44
|
)
|
44
45
|
super().__init__(msg=msg, name=name, obj=obj)
|
45
46
|
|
@@ -65,7 +65,7 @@ class GCSHandler(StorageHandler):
|
|
65
65
|
path, hit, cache_open = self._cache.check_etag_obj_path(
|
66
66
|
url=URIStr(manifest_entry.ref),
|
67
67
|
etag=ETag(manifest_entry.digest),
|
68
|
-
size=manifest_entry.size
|
68
|
+
size=manifest_entry.size or 0,
|
69
69
|
)
|
70
70
|
if hit:
|
71
71
|
return path
|
@@ -43,7 +43,7 @@ class HTTPHandler(StorageHandler):
|
|
43
43
|
path, hit, cache_open = self._cache.check_etag_obj_path(
|
44
44
|
URIStr(manifest_entry.ref),
|
45
45
|
ETag(manifest_entry.digest),
|
46
|
-
manifest_entry.size
|
46
|
+
manifest_entry.size or 0,
|
47
47
|
)
|
48
48
|
if hit:
|
49
49
|
return path
|
@@ -54,7 +54,6 @@ class HTTPHandler(StorageHandler):
|
|
54
54
|
cookies=_thread_local_api_settings.cookies,
|
55
55
|
headers=_thread_local_api_settings.headers,
|
56
56
|
)
|
57
|
-
response.raise_for_status()
|
58
57
|
|
59
58
|
digest: ETag | FilePathStr | URIStr | None
|
60
59
|
digest, size, extra = self._entry_from_headers(response.headers)
|
@@ -87,7 +86,6 @@ class HTTPHandler(StorageHandler):
|
|
87
86
|
cookies=_thread_local_api_settings.cookies,
|
88
87
|
headers=_thread_local_api_settings.headers,
|
89
88
|
) as response:
|
90
|
-
response.raise_for_status()
|
91
89
|
digest: ETag | FilePathStr | URIStr | None
|
92
90
|
digest, size, extra = self._entry_from_headers(response.headers)
|
93
91
|
digest = digest or path
|
@@ -51,7 +51,7 @@ class LocalFileHandler(StorageHandler):
|
|
51
51
|
|
52
52
|
path, hit, cache_open = self._cache.check_md5_obj_path(
|
53
53
|
B64MD5(manifest_entry.digest), # TODO(spencerpearson): unsafe cast
|
54
|
-
manifest_entry.size
|
54
|
+
manifest_entry.size or 0,
|
55
55
|
)
|
56
56
|
if hit:
|
57
57
|
return path
|