wandb 0.22.0__py3-none-win_amd64.whl → 0.22.1__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.
Files changed (82) hide show
  1. wandb/__init__.py +1 -1
  2. wandb/__init__.pyi +3 -3
  3. wandb/_pydantic/__init__.py +12 -11
  4. wandb/_pydantic/base.py +49 -19
  5. wandb/apis/__init__.py +2 -0
  6. wandb/apis/attrs.py +2 -0
  7. wandb/apis/importers/internals/internal.py +16 -23
  8. wandb/apis/internal.py +2 -0
  9. wandb/apis/normalize.py +2 -0
  10. wandb/apis/public/__init__.py +3 -2
  11. wandb/apis/public/api.py +215 -164
  12. wandb/apis/public/artifacts.py +23 -20
  13. wandb/apis/public/const.py +2 -0
  14. wandb/apis/public/files.py +33 -24
  15. wandb/apis/public/history.py +2 -0
  16. wandb/apis/public/jobs.py +20 -18
  17. wandb/apis/public/projects.py +4 -2
  18. wandb/apis/public/query_generator.py +3 -0
  19. wandb/apis/public/registries/__init__.py +7 -0
  20. wandb/apis/public/registries/_freezable_list.py +9 -12
  21. wandb/apis/public/registries/registries_search.py +8 -6
  22. wandb/apis/public/registries/registry.py +22 -17
  23. wandb/apis/public/reports.py +2 -0
  24. wandb/apis/public/runs.py +261 -57
  25. wandb/apis/public/sweeps.py +10 -9
  26. wandb/apis/public/teams.py +2 -0
  27. wandb/apis/public/users.py +2 -0
  28. wandb/apis/public/utils.py +16 -15
  29. wandb/automations/_generated/__init__.py +54 -127
  30. wandb/automations/_generated/create_generic_webhook_integration.py +1 -7
  31. wandb/automations/_generated/fragments.py +26 -91
  32. wandb/bin/gpu_stats.exe +0 -0
  33. wandb/bin/wandb-core +0 -0
  34. wandb/cli/beta_sync.py +9 -11
  35. wandb/errors/errors.py +3 -3
  36. wandb/proto/v3/wandb_sync_pb2.py +19 -6
  37. wandb/proto/v4/wandb_sync_pb2.py +10 -6
  38. wandb/proto/v5/wandb_sync_pb2.py +10 -6
  39. wandb/proto/v6/wandb_sync_pb2.py +10 -6
  40. wandb/sdk/artifacts/_factories.py +7 -2
  41. wandb/sdk/artifacts/_generated/__init__.py +112 -412
  42. wandb/sdk/artifacts/_generated/fragments.py +65 -0
  43. wandb/sdk/artifacts/_generated/operations.py +52 -22
  44. wandb/sdk/artifacts/_generated/run_input_artifacts.py +3 -23
  45. wandb/sdk/artifacts/_generated/run_output_artifacts.py +3 -23
  46. wandb/sdk/artifacts/_generated/type_info.py +19 -0
  47. wandb/sdk/artifacts/_gqlutils.py +47 -0
  48. wandb/sdk/artifacts/_models/__init__.py +4 -0
  49. wandb/sdk/artifacts/_models/base_model.py +20 -0
  50. wandb/sdk/artifacts/_validators.py +40 -12
  51. wandb/sdk/artifacts/artifact.py +69 -88
  52. wandb/sdk/artifacts/artifact_file_cache.py +6 -1
  53. wandb/sdk/artifacts/artifact_manifest_entry.py +61 -2
  54. wandb/sdk/artifacts/storage_policies/wandb_storage_policy.py +10 -0
  55. wandb/sdk/data_types/bokeh.py +5 -1
  56. wandb/sdk/data_types/image.py +17 -6
  57. wandb/sdk/interface/interface.py +31 -4
  58. wandb/sdk/interface/interface_queue.py +10 -0
  59. wandb/sdk/interface/interface_shared.py +0 -7
  60. wandb/sdk/interface/interface_sock.py +9 -3
  61. wandb/sdk/internal/_generated/__init__.py +2 -12
  62. wandb/sdk/internal/sender.py +1 -1
  63. wandb/sdk/internal/settings_static.py +2 -82
  64. wandb/sdk/launch/runner/kubernetes_runner.py +25 -20
  65. wandb/sdk/launch/utils.py +82 -1
  66. wandb/sdk/lib/progress.py +7 -4
  67. wandb/sdk/lib/service/service_client.py +5 -9
  68. wandb/sdk/lib/service/service_connection.py +39 -23
  69. wandb/sdk/mailbox/mailbox_handle.py +2 -0
  70. wandb/sdk/projects/_generated/__init__.py +12 -33
  71. wandb/sdk/wandb_init.py +22 -2
  72. wandb/sdk/wandb_login.py +53 -27
  73. wandb/sdk/wandb_run.py +5 -3
  74. wandb/sdk/wandb_settings.py +50 -13
  75. wandb/sync/sync.py +7 -2
  76. wandb/util.py +1 -1
  77. {wandb-0.22.0.dist-info → wandb-0.22.1.dist-info}/METADATA +1 -1
  78. {wandb-0.22.0.dist-info → wandb-0.22.1.dist-info}/RECORD +81 -78
  79. wandb/sdk/artifacts/_graphql_fragments.py +0 -19
  80. {wandb-0.22.0.dist-info → wandb-0.22.1.dist-info}/WHEEL +0 -0
  81. {wandb-0.22.0.dist-info → wandb-0.22.1.dist-info}/entry_points.txt +0 -0
  82. {wandb-0.22.0.dist-info → wandb-0.22.1.dist-info}/licenses/LICENSE +0 -0
@@ -1,99 +1,5 @@
1
1
  # Generated by ariadne-codegen
2
2
 
3
- from .create_automation import CreateAutomation
4
- from .create_generic_webhook_integration import (
5
- CreateGenericWebhookIntegration,
6
- CreateGenericWebhookIntegrationCreateGenericWebhookIntegration,
7
- CreateGenericWebhookIntegrationCreateGenericWebhookIntegrationIntegrationGenericWebhookIntegration,
8
- CreateGenericWebhookIntegrationCreateGenericWebhookIntegrationIntegrationIntegration,
9
- )
10
- from .delete_automation import DeleteAutomation
11
- from .enums import (
12
- AlertSeverity,
13
- EventTriggeringConditionType,
14
- TriggeredActionType,
15
- TriggerScopeType,
16
- )
17
- from .fragments import (
18
- ArtifactPortfolioScopeFields,
19
- ArtifactSequenceScopeFields,
20
- FilterEventFields,
21
- GenericWebhookActionFields,
22
- GenericWebhookActionFieldsIntegrationGenericWebhookIntegration,
23
- GenericWebhookActionFieldsIntegrationIntegration,
24
- GenericWebhookIntegrationConnectionFields,
25
- GenericWebhookIntegrationConnectionFieldsEdges,
26
- GenericWebhookIntegrationConnectionFieldsEdgesNodeGenericWebhookIntegration,
27
- GenericWebhookIntegrationConnectionFieldsEdgesNodeIntegration,
28
- GenericWebhookIntegrationFields,
29
- IntegrationConnectionFields,
30
- IntegrationConnectionFieldsEdges,
31
- IntegrationConnectionFieldsEdgesNodeGenericWebhookIntegration,
32
- IntegrationConnectionFieldsEdgesNodeIntegration,
33
- IntegrationConnectionFieldsEdgesNodeSlackIntegration,
34
- NoOpActionFields,
35
- NotificationActionFields,
36
- NotificationActionFieldsIntegrationIntegration,
37
- NotificationActionFieldsIntegrationSlackIntegration,
38
- PageInfoFields,
39
- ProjectConnectionFields,
40
- ProjectConnectionFieldsEdges,
41
- ProjectConnectionFieldsEdgesNode,
42
- ProjectScopeFields,
43
- QueueJobActionFields,
44
- QueueJobActionFieldsQueue,
45
- SlackIntegrationConnectionFields,
46
- SlackIntegrationConnectionFieldsEdges,
47
- SlackIntegrationConnectionFieldsEdgesNodeIntegration,
48
- SlackIntegrationConnectionFieldsEdgesNodeSlackIntegration,
49
- SlackIntegrationFields,
50
- TriggerFields,
51
- TriggerFieldsActionGenericWebhookTriggeredAction,
52
- TriggerFieldsActionNoOpTriggeredAction,
53
- TriggerFieldsActionNotificationTriggeredAction,
54
- TriggerFieldsActionQueueJobTriggeredAction,
55
- TriggerFieldsEventFilterEventTriggeringCondition,
56
- TriggerFieldsScopeArtifactPortfolio,
57
- TriggerFieldsScopeArtifactSequence,
58
- TriggerFieldsScopeProject,
59
- )
60
- from .generic_webhook_integrations_by_entity import (
61
- GenericWebhookIntegrationsByEntity,
62
- GenericWebhookIntegrationsByEntityEntity,
63
- )
64
- from .get_automations import GetAutomations, GetAutomationsSearchScope
65
- from .get_automations_by_entity import (
66
- GetAutomationsByEntity,
67
- GetAutomationsByEntitySearchScope,
68
- )
69
- from .input_types import (
70
- CreateFilterTriggerInput,
71
- CreateGenericWebhookIntegrationInput,
72
- GenericWebhookActionInput,
73
- NoOpTriggeredActionInput,
74
- NotificationActionInput,
75
- QueueJobActionInput,
76
- TriggeredActionConfig,
77
- UpdateFilterTriggerInput,
78
- )
79
- from .integrations_by_entity import IntegrationsByEntity, IntegrationsByEntityEntity
80
- from .operations import (
81
- CREATE_AUTOMATION_GQL,
82
- CREATE_GENERIC_WEBHOOK_INTEGRATION_GQL,
83
- DELETE_AUTOMATION_GQL,
84
- GENERIC_WEBHOOK_INTEGRATIONS_BY_ENTITY_GQL,
85
- GET_AUTOMATIONS_BY_ENTITY_GQL,
86
- GET_AUTOMATIONS_GQL,
87
- INTEGRATIONS_BY_ENTITY_GQL,
88
- SLACK_INTEGRATIONS_BY_ENTITY_GQL,
89
- UPDATE_AUTOMATION_GQL,
90
- )
91
- from .slack_integrations_by_entity import (
92
- SlackIntegrationsByEntity,
93
- SlackIntegrationsByEntityEntity,
94
- )
95
- from .update_automation import UpdateAutomation
96
-
97
3
  __all__ = [
98
4
  "CREATE_AUTOMATION_GQL",
99
5
  "CREATE_GENERIC_WEBHOOK_INTEGRATION_GQL",
@@ -105,22 +11,14 @@ __all__ = [
105
11
  "SLACK_INTEGRATIONS_BY_ENTITY_GQL",
106
12
  "UPDATE_AUTOMATION_GQL",
107
13
  "GetAutomations",
108
- "GetAutomationsSearchScope",
109
14
  "GetAutomationsByEntity",
110
- "GetAutomationsByEntitySearchScope",
111
15
  "CreateAutomation",
112
16
  "UpdateAutomation",
113
17
  "DeleteAutomation",
114
18
  "IntegrationsByEntity",
115
- "IntegrationsByEntityEntity",
116
19
  "SlackIntegrationsByEntity",
117
- "SlackIntegrationsByEntityEntity",
118
20
  "GenericWebhookIntegrationsByEntity",
119
- "GenericWebhookIntegrationsByEntityEntity",
120
21
  "CreateGenericWebhookIntegration",
121
- "CreateGenericWebhookIntegrationCreateGenericWebhookIntegration",
122
- "CreateGenericWebhookIntegrationCreateGenericWebhookIntegrationIntegrationGenericWebhookIntegration",
123
- "CreateGenericWebhookIntegrationCreateGenericWebhookIntegrationIntegrationIntegration",
124
22
  "CreateFilterTriggerInput",
125
23
  "CreateGenericWebhookIntegrationInput",
126
24
  "GenericWebhookActionInput",
@@ -133,45 +31,74 @@ __all__ = [
133
31
  "ArtifactSequenceScopeFields",
134
32
  "FilterEventFields",
135
33
  "GenericWebhookActionFields",
136
- "GenericWebhookActionFieldsIntegrationGenericWebhookIntegration",
137
- "GenericWebhookActionFieldsIntegrationIntegration",
138
34
  "GenericWebhookIntegrationConnectionFields",
139
- "GenericWebhookIntegrationConnectionFieldsEdges",
140
- "GenericWebhookIntegrationConnectionFieldsEdgesNodeGenericWebhookIntegration",
141
- "GenericWebhookIntegrationConnectionFieldsEdgesNodeIntegration",
142
35
  "GenericWebhookIntegrationFields",
143
36
  "IntegrationConnectionFields",
144
- "IntegrationConnectionFieldsEdges",
145
- "IntegrationConnectionFieldsEdgesNodeGenericWebhookIntegration",
146
- "IntegrationConnectionFieldsEdgesNodeIntegration",
147
- "IntegrationConnectionFieldsEdgesNodeSlackIntegration",
148
37
  "NoOpActionFields",
149
38
  "NotificationActionFields",
150
- "NotificationActionFieldsIntegrationIntegration",
151
- "NotificationActionFieldsIntegrationSlackIntegration",
152
39
  "PageInfoFields",
153
40
  "ProjectConnectionFields",
154
- "ProjectConnectionFieldsEdges",
155
- "ProjectConnectionFieldsEdgesNode",
156
41
  "ProjectScopeFields",
157
42
  "QueueJobActionFields",
158
- "QueueJobActionFieldsQueue",
159
43
  "SlackIntegrationConnectionFields",
160
- "SlackIntegrationConnectionFieldsEdges",
161
- "SlackIntegrationConnectionFieldsEdgesNodeIntegration",
162
- "SlackIntegrationConnectionFieldsEdgesNodeSlackIntegration",
163
44
  "SlackIntegrationFields",
164
45
  "TriggerFields",
165
- "TriggerFieldsActionGenericWebhookTriggeredAction",
166
- "TriggerFieldsActionNoOpTriggeredAction",
167
- "TriggerFieldsActionNotificationTriggeredAction",
168
- "TriggerFieldsActionQueueJobTriggeredAction",
169
- "TriggerFieldsEventFilterEventTriggeringCondition",
170
- "TriggerFieldsScopeArtifactPortfolio",
171
- "TriggerFieldsScopeArtifactSequence",
172
- "TriggerFieldsScopeProject",
173
46
  "AlertSeverity",
174
47
  "EventTriggeringConditionType",
175
48
  "TriggerScopeType",
176
49
  "TriggeredActionType",
177
50
  ]
51
+ from .create_automation import CreateAutomation
52
+ from .create_generic_webhook_integration import CreateGenericWebhookIntegration
53
+ from .delete_automation import DeleteAutomation
54
+ from .enums import (
55
+ AlertSeverity,
56
+ EventTriggeringConditionType,
57
+ TriggeredActionType,
58
+ TriggerScopeType,
59
+ )
60
+ from .fragments import (
61
+ ArtifactPortfolioScopeFields,
62
+ ArtifactSequenceScopeFields,
63
+ FilterEventFields,
64
+ GenericWebhookActionFields,
65
+ GenericWebhookIntegrationConnectionFields,
66
+ GenericWebhookIntegrationFields,
67
+ IntegrationConnectionFields,
68
+ NoOpActionFields,
69
+ NotificationActionFields,
70
+ PageInfoFields,
71
+ ProjectConnectionFields,
72
+ ProjectScopeFields,
73
+ QueueJobActionFields,
74
+ SlackIntegrationConnectionFields,
75
+ SlackIntegrationFields,
76
+ TriggerFields,
77
+ )
78
+ from .generic_webhook_integrations_by_entity import GenericWebhookIntegrationsByEntity
79
+ from .get_automations import GetAutomations
80
+ from .get_automations_by_entity import GetAutomationsByEntity
81
+ from .input_types import (
82
+ CreateFilterTriggerInput,
83
+ CreateGenericWebhookIntegrationInput,
84
+ GenericWebhookActionInput,
85
+ NoOpTriggeredActionInput,
86
+ NotificationActionInput,
87
+ QueueJobActionInput,
88
+ TriggeredActionConfig,
89
+ UpdateFilterTriggerInput,
90
+ )
91
+ from .integrations_by_entity import IntegrationsByEntity
92
+ from .operations import (
93
+ CREATE_AUTOMATION_GQL,
94
+ CREATE_GENERIC_WEBHOOK_INTEGRATION_GQL,
95
+ DELETE_AUTOMATION_GQL,
96
+ GENERIC_WEBHOOK_INTEGRATIONS_BY_ENTITY_GQL,
97
+ GET_AUTOMATIONS_BY_ENTITY_GQL,
98
+ GET_AUTOMATIONS_GQL,
99
+ INTEGRATIONS_BY_ENTITY_GQL,
100
+ SLACK_INTEGRATIONS_BY_ENTITY_GQL,
101
+ UPDATE_AUTOMATION_GQL,
102
+ )
103
+ from .slack_integrations_by_entity import SlackIntegrationsByEntity
104
+ from .update_automation import UpdateAutomation
@@ -21,7 +21,7 @@ class CreateGenericWebhookIntegration(GQLBase):
21
21
  class CreateGenericWebhookIntegrationCreateGenericWebhookIntegration(GQLBase):
22
22
  integration: Union[
23
23
  CreateGenericWebhookIntegrationCreateGenericWebhookIntegrationIntegrationIntegration,
24
- CreateGenericWebhookIntegrationCreateGenericWebhookIntegrationIntegrationGenericWebhookIntegration,
24
+ GenericWebhookIntegrationFields,
25
25
  ] = Field(discriminator="typename__")
26
26
 
27
27
 
@@ -33,11 +33,5 @@ class CreateGenericWebhookIntegrationCreateGenericWebhookIntegrationIntegrationI
33
33
  ]
34
34
 
35
35
 
36
- class CreateGenericWebhookIntegrationCreateGenericWebhookIntegrationIntegrationGenericWebhookIntegration(
37
- GenericWebhookIntegrationFields
38
- ):
39
- typename__: Typename[Literal["GenericWebhookIntegration"]]
40
-
41
-
42
36
  CreateGenericWebhookIntegration.model_rebuild()
43
37
  CreateGenericWebhookIntegrationCreateGenericWebhookIntegration.model_rebuild()
@@ -52,7 +52,7 @@ class GenericWebhookActionFields(GQLBase):
52
52
  )
53
53
  integration: Union[
54
54
  GenericWebhookActionFieldsIntegrationIntegration,
55
- GenericWebhookActionFieldsIntegrationGenericWebhookIntegration,
55
+ GenericWebhookIntegrationFields,
56
56
  ] = Field(discriminator="typename__")
57
57
  request_payload: Optional[str] = Field(alias="requestPayload")
58
58
 
@@ -75,7 +75,7 @@ class GenericWebhookIntegrationConnectionFieldsEdges(GQLBase):
75
75
  Annotated[
76
76
  Union[
77
77
  GenericWebhookIntegrationConnectionFieldsEdgesNodeIntegration,
78
- GenericWebhookIntegrationConnectionFieldsEdgesNodeGenericWebhookIntegration,
78
+ GenericWebhookIntegrationFields,
79
79
  ],
80
80
  Field(discriminator="typename__"),
81
81
  ]
@@ -109,8 +109,8 @@ class IntegrationConnectionFieldsEdges(GQLBase):
109
109
  Annotated[
110
110
  Union[
111
111
  IntegrationConnectionFieldsEdgesNodeIntegration,
112
- IntegrationConnectionFieldsEdgesNodeGenericWebhookIntegration,
113
- IntegrationConnectionFieldsEdgesNodeSlackIntegration,
112
+ GenericWebhookIntegrationFields,
113
+ SlackIntegrationFields,
114
114
  ],
115
115
  Field(discriminator="typename__"),
116
116
  ]
@@ -131,8 +131,7 @@ class NotificationActionFields(GQLBase):
131
131
  "NotificationTriggeredAction"
132
132
  )
133
133
  integration: Union[
134
- NotificationActionFieldsIntegrationIntegration,
135
- NotificationActionFieldsIntegrationSlackIntegration,
134
+ NotificationActionFieldsIntegrationIntegration, SlackIntegrationFields
136
135
  ] = Field(discriminator="typename__")
137
136
  title: Optional[str]
138
137
  message: Optional[str]
@@ -194,7 +193,7 @@ class SlackIntegrationConnectionFieldsEdges(GQLBase):
194
193
  Annotated[
195
194
  Union[
196
195
  SlackIntegrationConnectionFieldsEdgesNodeIntegration,
197
- SlackIntegrationConnectionFieldsEdgesNodeSlackIntegration,
196
+ SlackIntegrationFields,
198
197
  ],
199
198
  Field(discriminator="typename__"),
200
199
  ]
@@ -223,16 +222,14 @@ class TriggerFields(GQLBase):
223
222
  description: Optional[str]
224
223
  enabled: bool
225
224
  scope: Union[
226
- TriggerFieldsScopeProject,
227
- TriggerFieldsScopeArtifactSequence,
228
- TriggerFieldsScopeArtifactPortfolio,
225
+ ProjectScopeFields, ArtifactSequenceScopeFields, ArtifactPortfolioScopeFields
229
226
  ] = Field(discriminator="typename__")
230
- event: TriggerFieldsEventFilterEventTriggeringCondition
227
+ event: FilterEventFields
231
228
  action: Union[
232
- TriggerFieldsActionQueueJobTriggeredAction,
233
- TriggerFieldsActionNotificationTriggeredAction,
234
- TriggerFieldsActionGenericWebhookTriggeredAction,
235
- TriggerFieldsActionNoOpTriggeredAction,
229
+ QueueJobActionFields,
230
+ NotificationActionFields,
231
+ GenericWebhookActionFields,
232
+ NoOpActionFields,
236
233
  ] = Field(discriminator="typename__")
237
234
 
238
235
 
@@ -243,68 +240,6 @@ class UpdateAutomationResult(GQLBase):
243
240
  trigger: Optional[TriggerFields]
244
241
 
245
242
 
246
- class TriggerFieldsScopeArtifactPortfolio(ArtifactPortfolioScopeFields):
247
- typename__: Typename[Literal["ArtifactPortfolio"]]
248
-
249
-
250
- class TriggerFieldsScopeArtifactSequence(ArtifactSequenceScopeFields):
251
- typename__: Typename[Literal["ArtifactSequence"]]
252
-
253
-
254
- class TriggerFieldsEventFilterEventTriggeringCondition(FilterEventFields):
255
- typename__: Typename[Literal["FilterEventTriggeringCondition"]]
256
-
257
-
258
- class TriggerFieldsActionGenericWebhookTriggeredAction(GenericWebhookActionFields):
259
- typename__: Typename[Literal["GenericWebhookTriggeredAction"]]
260
-
261
-
262
- class GenericWebhookActionFieldsIntegrationGenericWebhookIntegration(
263
- GenericWebhookIntegrationFields
264
- ):
265
- typename__: Typename[Literal["GenericWebhookIntegration"]]
266
-
267
-
268
- class GenericWebhookIntegrationConnectionFieldsEdgesNodeGenericWebhookIntegration(
269
- GenericWebhookIntegrationFields
270
- ):
271
- typename__: Typename[Literal["GenericWebhookIntegration"]]
272
-
273
-
274
- class IntegrationConnectionFieldsEdgesNodeGenericWebhookIntegration(
275
- GenericWebhookIntegrationFields
276
- ):
277
- typename__: Typename[Literal["GenericWebhookIntegration"]]
278
-
279
-
280
- class TriggerFieldsActionNoOpTriggeredAction(NoOpActionFields):
281
- typename__: Typename[Literal["NoOpTriggeredAction"]]
282
-
283
-
284
- class TriggerFieldsActionNotificationTriggeredAction(NotificationActionFields):
285
- typename__: Typename[Literal["NotificationTriggeredAction"]]
286
-
287
-
288
- class TriggerFieldsScopeProject(ProjectScopeFields):
289
- typename__: Typename[Literal["Project"]]
290
-
291
-
292
- class TriggerFieldsActionQueueJobTriggeredAction(QueueJobActionFields):
293
- typename__: Typename[Literal["QueueJobTriggeredAction"]]
294
-
295
-
296
- class IntegrationConnectionFieldsEdgesNodeSlackIntegration(SlackIntegrationFields):
297
- typename__: Typename[Literal["SlackIntegration"]]
298
-
299
-
300
- class NotificationActionFieldsIntegrationSlackIntegration(SlackIntegrationFields):
301
- typename__: Typename[Literal["SlackIntegration"]]
302
-
303
-
304
- class SlackIntegrationConnectionFieldsEdgesNodeSlackIntegration(SlackIntegrationFields):
305
- typename__: Typename[Literal["SlackIntegration"]]
306
-
307
-
308
243
  ArtifactPortfolioScopeFields.model_rebuild()
309
244
  ArtifactSequenceScopeFields.model_rebuild()
310
245
  CreateAutomationResult.model_rebuild()
@@ -335,24 +270,24 @@ SlackIntegrationConnectionFieldsEdgesNodeIntegration.model_rebuild()
335
270
  SlackIntegrationFields.model_rebuild()
336
271
  TriggerFields.model_rebuild()
337
272
  UpdateAutomationResult.model_rebuild()
338
- TriggerFieldsScopeArtifactPortfolio.model_rebuild()
339
- TriggerFieldsScopeArtifactSequence.model_rebuild()
340
- TriggerFieldsEventFilterEventTriggeringCondition.model_rebuild()
341
- TriggerFieldsActionGenericWebhookTriggeredAction.model_rebuild()
342
- GenericWebhookActionFieldsIntegrationGenericWebhookIntegration.model_rebuild()
343
- GenericWebhookIntegrationConnectionFieldsEdgesNodeGenericWebhookIntegration.model_rebuild()
344
- IntegrationConnectionFieldsEdgesNodeGenericWebhookIntegration.model_rebuild()
345
- TriggerFieldsActionNoOpTriggeredAction.model_rebuild()
346
- TriggerFieldsActionNotificationTriggeredAction.model_rebuild()
273
+ ArtifactPortfolioScopeFields.model_rebuild()
274
+ ArtifactSequenceScopeFields.model_rebuild()
275
+ FilterEventFields.model_rebuild()
276
+ GenericWebhookActionFields.model_rebuild()
277
+ GenericWebhookIntegrationFields.model_rebuild()
278
+ GenericWebhookIntegrationFields.model_rebuild()
279
+ GenericWebhookIntegrationFields.model_rebuild()
280
+ NoOpActionFields.model_rebuild()
281
+ NotificationActionFields.model_rebuild()
347
282
  PageInfoFields.model_rebuild()
348
283
  PageInfoFields.model_rebuild()
349
284
  PageInfoFields.model_rebuild()
350
285
  PageInfoFields.model_rebuild()
351
- TriggerFieldsScopeProject.model_rebuild()
352
- TriggerFieldsActionQueueJobTriggeredAction.model_rebuild()
353
- IntegrationConnectionFieldsEdgesNodeSlackIntegration.model_rebuild()
354
- NotificationActionFieldsIntegrationSlackIntegration.model_rebuild()
355
- SlackIntegrationConnectionFieldsEdgesNodeSlackIntegration.model_rebuild()
286
+ ProjectScopeFields.model_rebuild()
287
+ QueueJobActionFields.model_rebuild()
288
+ SlackIntegrationFields.model_rebuild()
289
+ SlackIntegrationFields.model_rebuild()
290
+ SlackIntegrationFields.model_rebuild()
356
291
  TriggerFields.model_rebuild()
357
292
  TriggerFields.model_rebuild()
358
293
  TriggerFields.model_rebuild()
wandb/bin/gpu_stats.exe CHANGED
Binary file
wandb/bin/wandb-core CHANGED
Binary file
wandb/cli/beta_sync.py CHANGED
@@ -14,7 +14,7 @@ import wandb
14
14
  from wandb.proto.wandb_sync_pb2 import ServerSyncResponse
15
15
  from wandb.sdk import wandb_setup
16
16
  from wandb.sdk.lib import asyncio_compat
17
- from wandb.sdk.lib.printer import ERROR, Printer, new_printer
17
+ from wandb.sdk.lib.printer import Printer, new_printer
18
18
  from wandb.sdk.lib.progress import progress_printer
19
19
  from wandb.sdk.lib.service.service_connection import ServiceConnection
20
20
  from wandb.sdk.mailbox.mailbox_handle import MailboxHandle
@@ -86,12 +86,10 @@ async def _do_sync(
86
86
 
87
87
  This is factored out to make the progress animation testable.
88
88
  """
89
- init_result = await service.init_sync(
90
- wandb_files,
91
- settings,
92
- ).wait_async(timeout=5)
89
+ init_handle = await service.init_sync(wandb_files, settings)
90
+ init_result = await init_handle.wait_async(timeout=5)
93
91
 
94
- sync_handle = service.sync(init_result.id, parallelism=parallelism)
92
+ sync_handle = await service.sync(init_result.id, parallelism=parallelism)
95
93
 
96
94
  await _SyncStatusLoop(
97
95
  init_result.id,
@@ -130,19 +128,19 @@ class _SyncStatusLoop:
130
128
  handle: MailboxHandle[ServerSyncResponse],
131
129
  ) -> None:
132
130
  response = await handle.wait_async(timeout=None)
133
- if messages := list(response.errors):
134
- self._printer.display(messages, level=ERROR)
131
+ for msg in response.messages:
132
+ self._printer.display(msg.content, level=msg.severity)
135
133
  self._done.set()
136
134
 
137
135
  async def _show_progress_until_done(self) -> None:
138
136
  """Show rate-limited status updates until _done is set."""
139
137
  with progress_printer(self._printer, "Syncing...") as progress:
140
138
  while not await self._rate_limit_check_done():
141
- handle = self._service.sync_status(self._id)
139
+ handle = await self._service.sync_status(self._id)
142
140
  response = await handle.wait_async(timeout=None)
143
141
 
144
- if messages := list(response.new_errors):
145
- self._printer.display(messages, level=ERROR)
142
+ for msg in response.new_messages:
143
+ self._printer.display(msg.content, level=msg.severity)
146
144
  progress.update(response.stats)
147
145
 
148
146
  async def _rate_limit_check_done(self) -> bool:
wandb/errors/errors.py CHANGED
@@ -1,4 +1,4 @@
1
- from typing import Optional
1
+ from __future__ import annotations
2
2
 
3
3
 
4
4
  class Error(Exception):
@@ -7,7 +7,7 @@ class Error(Exception):
7
7
  <!-- lazydoc-ignore-class: internal -->
8
8
  """
9
9
 
10
- def __init__(self, message, context: Optional[dict] = None) -> None:
10
+ def __init__(self, message: str, context: dict | None = None) -> None:
11
11
  super().__init__(message)
12
12
  self.message = message
13
13
  # sentry context capture
@@ -18,7 +18,7 @@ class Error(Exception):
18
18
  class CommError(Error):
19
19
  """Error communicating with W&B servers."""
20
20
 
21
- def __init__(self, msg, exc=None) -> None:
21
+ def __init__(self, msg: str, exc: Exception | None = None) -> None:
22
22
  self.exc = exc
23
23
  self.message = msg
24
24
  super().__init__(self.message)
@@ -16,7 +16,7 @@ from wandb.proto import wandb_internal_pb2 as wandb_dot_proto_dot_wandb__interna
16
16
  from wandb.proto import wandb_settings_pb2 as wandb_dot_proto_dot_wandb__settings__pb2
17
17
 
18
18
 
19
- 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')
19
+ 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\"I\n\x12ServerSyncResponse\x12\x33\n\x08messages\x18\x01 \x03(\x0b\x32!.wandb_internal.ServerSyncMessage\"%\n\x17ServerSyncStatusRequest\x12\n\n\x02id\x18\x01 \x01(\t\"\x82\x01\n\x18ServerSyncStatusResponse\x12-\n\x05stats\x18\x01 \x01(\x0b\x32\x1e.wandb_internal.OperationStats\x12\x37\n\x0cnew_messages\x18\x02 \x03(\x0b\x32!.wandb_internal.ServerSyncMessage\"\xaa\x01\n\x11ServerSyncMessage\x12<\n\x08severity\x18\x01 \x01(\x0e\x32*.wandb_internal.ServerSyncMessage.Severity\x12\x0f\n\x07\x63ontent\x18\x02 \x01(\t\"F\n\x08Severity\x12\x13\n\x0fSEVERITY_NOTSET\x10\x00\x12\x11\n\rSEVERITY_INFO\x10\x14\x12\x12\n\x0eSEVERITY_ERROR\x10(B\x1bZ\x19\x63ore/pkg/service_go_protob\x06proto3')
20
20
 
21
21
 
22
22
 
@@ -26,6 +26,8 @@ _SERVERSYNCREQUEST = DESCRIPTOR.message_types_by_name['ServerSyncRequest']
26
26
  _SERVERSYNCRESPONSE = DESCRIPTOR.message_types_by_name['ServerSyncResponse']
27
27
  _SERVERSYNCSTATUSREQUEST = DESCRIPTOR.message_types_by_name['ServerSyncStatusRequest']
28
28
  _SERVERSYNCSTATUSRESPONSE = DESCRIPTOR.message_types_by_name['ServerSyncStatusResponse']
29
+ _SERVERSYNCMESSAGE = DESCRIPTOR.message_types_by_name['ServerSyncMessage']
30
+ _SERVERSYNCMESSAGE_SEVERITY = _SERVERSYNCMESSAGE.enum_types_by_name['Severity']
29
31
  ServerInitSyncRequest = _reflection.GeneratedProtocolMessageType('ServerInitSyncRequest', (_message.Message,), {
30
32
  'DESCRIPTOR' : _SERVERINITSYNCREQUEST,
31
33
  '__module__' : 'wandb.proto.wandb_sync_pb2'
@@ -68,6 +70,13 @@ ServerSyncStatusResponse = _reflection.GeneratedProtocolMessageType('ServerSyncS
68
70
  })
69
71
  _sym_db.RegisterMessage(ServerSyncStatusResponse)
70
72
 
73
+ ServerSyncMessage = _reflection.GeneratedProtocolMessageType('ServerSyncMessage', (_message.Message,), {
74
+ 'DESCRIPTOR' : _SERVERSYNCMESSAGE,
75
+ '__module__' : 'wandb.proto.wandb_sync_pb2'
76
+ # @@protoc_insertion_point(class_scope:wandb_internal.ServerSyncMessage)
77
+ })
78
+ _sym_db.RegisterMessage(ServerSyncMessage)
79
+
71
80
  if _descriptor._USE_C_DESCRIPTORS == False:
72
81
 
73
82
  DESCRIPTOR._options = None
@@ -79,9 +88,13 @@ if _descriptor._USE_C_DESCRIPTORS == False:
79
88
  _SERVERSYNCREQUEST._serialized_start=237
80
89
  _SERVERSYNCREQUEST._serialized_end=289
81
90
  _SERVERSYNCRESPONSE._serialized_start=291
82
- _SERVERSYNCRESPONSE._serialized_end=327
83
- _SERVERSYNCSTATUSREQUEST._serialized_start=329
84
- _SERVERSYNCSTATUSREQUEST._serialized_end=366
85
- _SERVERSYNCSTATUSRESPONSE._serialized_start=368
86
- _SERVERSYNCSTATUSRESPONSE._serialized_end=461
91
+ _SERVERSYNCRESPONSE._serialized_end=364
92
+ _SERVERSYNCSTATUSREQUEST._serialized_start=366
93
+ _SERVERSYNCSTATUSREQUEST._serialized_end=403
94
+ _SERVERSYNCSTATUSRESPONSE._serialized_start=406
95
+ _SERVERSYNCSTATUSRESPONSE._serialized_end=536
96
+ _SERVERSYNCMESSAGE._serialized_start=539
97
+ _SERVERSYNCMESSAGE._serialized_end=709
98
+ _SERVERSYNCMESSAGE_SEVERITY._serialized_start=639
99
+ _SERVERSYNCMESSAGE_SEVERITY._serialized_end=709
87
100
  # @@protoc_insertion_point(module_scope)
@@ -15,7 +15,7 @@ from wandb.proto import wandb_internal_pb2 as wandb_dot_proto_dot_wandb__interna
15
15
  from wandb.proto import wandb_settings_pb2 as wandb_dot_proto_dot_wandb__settings__pb2
16
16
 
17
17
 
18
- 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')
18
+ 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\"I\n\x12ServerSyncResponse\x12\x33\n\x08messages\x18\x01 \x03(\x0b\x32!.wandb_internal.ServerSyncMessage\"%\n\x17ServerSyncStatusRequest\x12\n\n\x02id\x18\x01 \x01(\t\"\x82\x01\n\x18ServerSyncStatusResponse\x12-\n\x05stats\x18\x01 \x01(\x0b\x32\x1e.wandb_internal.OperationStats\x12\x37\n\x0cnew_messages\x18\x02 \x03(\x0b\x32!.wandb_internal.ServerSyncMessage\"\xaa\x01\n\x11ServerSyncMessage\x12<\n\x08severity\x18\x01 \x01(\x0e\x32*.wandb_internal.ServerSyncMessage.Severity\x12\x0f\n\x07\x63ontent\x18\x02 \x01(\t\"F\n\x08Severity\x12\x13\n\x0fSEVERITY_NOTSET\x10\x00\x12\x11\n\rSEVERITY_INFO\x10\x14\x12\x12\n\x0eSEVERITY_ERROR\x10(B\x1bZ\x19\x63ore/pkg/service_go_protob\x06proto3')
19
19
 
20
20
  _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals())
21
21
  _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'wandb.proto.wandb_sync_pb2', globals())
@@ -30,9 +30,13 @@ if _descriptor._USE_C_DESCRIPTORS == False:
30
30
  _SERVERSYNCREQUEST._serialized_start=237
31
31
  _SERVERSYNCREQUEST._serialized_end=289
32
32
  _SERVERSYNCRESPONSE._serialized_start=291
33
- _SERVERSYNCRESPONSE._serialized_end=327
34
- _SERVERSYNCSTATUSREQUEST._serialized_start=329
35
- _SERVERSYNCSTATUSREQUEST._serialized_end=366
36
- _SERVERSYNCSTATUSRESPONSE._serialized_start=368
37
- _SERVERSYNCSTATUSRESPONSE._serialized_end=461
33
+ _SERVERSYNCRESPONSE._serialized_end=364
34
+ _SERVERSYNCSTATUSREQUEST._serialized_start=366
35
+ _SERVERSYNCSTATUSREQUEST._serialized_end=403
36
+ _SERVERSYNCSTATUSRESPONSE._serialized_start=406
37
+ _SERVERSYNCSTATUSRESPONSE._serialized_end=536
38
+ _SERVERSYNCMESSAGE._serialized_start=539
39
+ _SERVERSYNCMESSAGE._serialized_end=709
40
+ _SERVERSYNCMESSAGE_SEVERITY._serialized_start=639
41
+ _SERVERSYNCMESSAGE_SEVERITY._serialized_end=709
38
42
  # @@protoc_insertion_point(module_scope)
@@ -16,7 +16,7 @@ from wandb.proto import wandb_internal_pb2 as wandb_dot_proto_dot_wandb__interna
16
16
  from wandb.proto import wandb_settings_pb2 as wandb_dot_proto_dot_wandb__settings__pb2
17
17
 
18
18
 
19
- 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')
19
+ 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\"I\n\x12ServerSyncResponse\x12\x33\n\x08messages\x18\x01 \x03(\x0b\x32!.wandb_internal.ServerSyncMessage\"%\n\x17ServerSyncStatusRequest\x12\n\n\x02id\x18\x01 \x01(\t\"\x82\x01\n\x18ServerSyncStatusResponse\x12-\n\x05stats\x18\x01 \x01(\x0b\x32\x1e.wandb_internal.OperationStats\x12\x37\n\x0cnew_messages\x18\x02 \x03(\x0b\x32!.wandb_internal.ServerSyncMessage\"\xaa\x01\n\x11ServerSyncMessage\x12<\n\x08severity\x18\x01 \x01(\x0e\x32*.wandb_internal.ServerSyncMessage.Severity\x12\x0f\n\x07\x63ontent\x18\x02 \x01(\t\"F\n\x08Severity\x12\x13\n\x0fSEVERITY_NOTSET\x10\x00\x12\x11\n\rSEVERITY_INFO\x10\x14\x12\x12\n\x0eSEVERITY_ERROR\x10(B\x1bZ\x19\x63ore/pkg/service_go_protob\x06proto3')
20
20
 
21
21
  _globals = globals()
22
22
  _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
@@ -31,9 +31,13 @@ if not _descriptor._USE_C_DESCRIPTORS:
31
31
  _globals['_SERVERSYNCREQUEST']._serialized_start=237
32
32
  _globals['_SERVERSYNCREQUEST']._serialized_end=289
33
33
  _globals['_SERVERSYNCRESPONSE']._serialized_start=291
34
- _globals['_SERVERSYNCRESPONSE']._serialized_end=327
35
- _globals['_SERVERSYNCSTATUSREQUEST']._serialized_start=329
36
- _globals['_SERVERSYNCSTATUSREQUEST']._serialized_end=366
37
- _globals['_SERVERSYNCSTATUSRESPONSE']._serialized_start=368
38
- _globals['_SERVERSYNCSTATUSRESPONSE']._serialized_end=461
34
+ _globals['_SERVERSYNCRESPONSE']._serialized_end=364
35
+ _globals['_SERVERSYNCSTATUSREQUEST']._serialized_start=366
36
+ _globals['_SERVERSYNCSTATUSREQUEST']._serialized_end=403
37
+ _globals['_SERVERSYNCSTATUSRESPONSE']._serialized_start=406
38
+ _globals['_SERVERSYNCSTATUSRESPONSE']._serialized_end=536
39
+ _globals['_SERVERSYNCMESSAGE']._serialized_start=539
40
+ _globals['_SERVERSYNCMESSAGE']._serialized_end=709
41
+ _globals['_SERVERSYNCMESSAGE_SEVERITY']._serialized_start=639
42
+ _globals['_SERVERSYNCMESSAGE_SEVERITY']._serialized_end=709
39
43
  # @@protoc_insertion_point(module_scope)
@@ -26,7 +26,7 @@ from wandb.proto import wandb_internal_pb2 as wandb_dot_proto_dot_wandb__interna
26
26
  from wandb.proto import wandb_settings_pb2 as wandb_dot_proto_dot_wandb__settings__pb2
27
27
 
28
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')
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\"I\n\x12ServerSyncResponse\x12\x33\n\x08messages\x18\x01 \x03(\x0b\x32!.wandb_internal.ServerSyncMessage\"%\n\x17ServerSyncStatusRequest\x12\n\n\x02id\x18\x01 \x01(\t\"\x82\x01\n\x18ServerSyncStatusResponse\x12-\n\x05stats\x18\x01 \x01(\x0b\x32\x1e.wandb_internal.OperationStats\x12\x37\n\x0cnew_messages\x18\x02 \x03(\x0b\x32!.wandb_internal.ServerSyncMessage\"\xaa\x01\n\x11ServerSyncMessage\x12<\n\x08severity\x18\x01 \x01(\x0e\x32*.wandb_internal.ServerSyncMessage.Severity\x12\x0f\n\x07\x63ontent\x18\x02 \x01(\t\"F\n\x08Severity\x12\x13\n\x0fSEVERITY_NOTSET\x10\x00\x12\x11\n\rSEVERITY_INFO\x10\x14\x12\x12\n\x0eSEVERITY_ERROR\x10(B\x1bZ\x19\x63ore/pkg/service_go_protob\x06proto3')
30
30
 
31
31
  _globals = globals()
32
32
  _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
@@ -41,9 +41,13 @@ if not _descriptor._USE_C_DESCRIPTORS:
41
41
  _globals['_SERVERSYNCREQUEST']._serialized_start=237
42
42
  _globals['_SERVERSYNCREQUEST']._serialized_end=289
43
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
44
+ _globals['_SERVERSYNCRESPONSE']._serialized_end=364
45
+ _globals['_SERVERSYNCSTATUSREQUEST']._serialized_start=366
46
+ _globals['_SERVERSYNCSTATUSREQUEST']._serialized_end=403
47
+ _globals['_SERVERSYNCSTATUSRESPONSE']._serialized_start=406
48
+ _globals['_SERVERSYNCSTATUSRESPONSE']._serialized_end=536
49
+ _globals['_SERVERSYNCMESSAGE']._serialized_start=539
50
+ _globals['_SERVERSYNCMESSAGE']._serialized_end=709
51
+ _globals['_SERVERSYNCMESSAGE_SEVERITY']._serialized_start=639
52
+ _globals['_SERVERSYNCMESSAGE_SEVERITY']._serialized_end=709
49
53
  # @@protoc_insertion_point(module_scope)
@@ -11,7 +11,12 @@ if TYPE_CHECKING:
11
11
  from .storage_policy import StoragePolicy
12
12
 
13
13
 
14
- def make_storage_policy() -> StoragePolicy:
14
+ def make_storage_policy(storage_region: str | None = None) -> StoragePolicy:
15
15
  """A factory function that returns the default StoragePolicy for the current environment."""
16
16
  layout = StorageLayout.V1 if env.get_use_v1_artifacts() else StorageLayout.V2
17
- return WandbStoragePolicy.from_config({"storageLayout": layout})
17
+ config = {"storageLayout": layout}
18
+ # Only set storage region if is not None for backward compatibility
19
+ # Validation such as non empty string is done in WandbStoragePolicy.__init__
20
+ if storage_region is not None:
21
+ config["storageRegion"] = storage_region
22
+ return WandbStoragePolicy.from_config(config)