wandb 0.21.1__py3-none-win32.whl → 0.21.2__py3-none-win32.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/apis/public/api.py +1 -2
- wandb/apis/public/artifacts.py +3 -5
- wandb/apis/public/registries/_utils.py +14 -16
- wandb/apis/public/registries/registries_search.py +176 -289
- wandb/apis/public/reports.py +13 -10
- wandb/automations/_generated/delete_automation.py +1 -3
- wandb/automations/_generated/enums.py +13 -11
- wandb/bin/gpu_stats.exe +0 -0
- wandb/bin/wandb-core +0 -0
- wandb/cli/cli.py +47 -2
- wandb/integration/metaflow/data_pandas.py +2 -2
- wandb/integration/metaflow/data_pytorch.py +75 -0
- wandb/integration/metaflow/data_sklearn.py +76 -0
- wandb/integration/metaflow/metaflow.py +16 -87
- wandb/integration/weave/__init__.py +6 -0
- wandb/integration/weave/interface.py +49 -0
- wandb/integration/weave/weave.py +63 -0
- wandb/proto/v3/wandb_internal_pb2.py +3 -2
- wandb/proto/v4/wandb_internal_pb2.py +2 -2
- wandb/proto/v5/wandb_internal_pb2.py +2 -2
- wandb/proto/v6/wandb_internal_pb2.py +2 -2
- wandb/sdk/artifacts/_factories.py +17 -0
- wandb/sdk/artifacts/_generated/__init__.py +221 -13
- wandb/sdk/artifacts/_generated/artifact_by_id.py +17 -0
- wandb/sdk/artifacts/_generated/artifact_by_name.py +22 -0
- wandb/sdk/artifacts/_generated/artifact_collection_membership_file_urls.py +43 -0
- wandb/sdk/artifacts/_generated/artifact_created_by.py +47 -0
- wandb/sdk/artifacts/_generated/artifact_file_urls.py +22 -0
- wandb/sdk/artifacts/_generated/artifact_type.py +31 -0
- wandb/sdk/artifacts/_generated/artifact_used_by.py +43 -0
- wandb/sdk/artifacts/_generated/artifact_via_membership_by_name.py +26 -0
- wandb/sdk/artifacts/_generated/delete_artifact.py +28 -0
- wandb/sdk/artifacts/_generated/enums.py +5 -0
- wandb/sdk/artifacts/_generated/fetch_artifact_manifest.py +38 -0
- wandb/sdk/artifacts/_generated/fetch_registries.py +32 -0
- wandb/sdk/artifacts/_generated/fragments.py +279 -41
- wandb/sdk/artifacts/_generated/link_artifact.py +6 -0
- wandb/sdk/artifacts/_generated/operations.py +654 -51
- wandb/sdk/artifacts/_generated/registry_collections.py +34 -0
- wandb/sdk/artifacts/_generated/registry_versions.py +34 -0
- wandb/sdk/artifacts/_generated/unlink_artifact.py +25 -0
- wandb/sdk/artifacts/_graphql_fragments.py +3 -86
- wandb/sdk/artifacts/_validators.py +6 -4
- wandb/sdk/artifacts/artifact.py +406 -543
- wandb/sdk/artifacts/artifact_file_cache.py +10 -6
- wandb/sdk/artifacts/artifact_manifest.py +10 -9
- wandb/sdk/artifacts/artifact_manifest_entry.py +9 -10
- wandb/sdk/artifacts/artifact_manifests/artifact_manifest_v1.py +5 -3
- wandb/sdk/artifacts/storage_handlers/http_handler.py +1 -1
- wandb/sdk/artifacts/storage_handlers/s3_handler.py +1 -1
- wandb/sdk/artifacts/storage_policies/wandb_storage_policy.py +1 -1
- wandb/sdk/data_types/video.py +2 -2
- wandb/sdk/interface/interface_queue.py +1 -4
- wandb/sdk/interface/interface_shared.py +26 -37
- wandb/sdk/interface/interface_sock.py +24 -14
- wandb/sdk/internal/settings_static.py +2 -3
- wandb/sdk/launch/create_job.py +12 -1
- wandb/sdk/launch/runner/kubernetes_runner.py +24 -29
- wandb/sdk/lib/asyncio_compat.py +16 -16
- wandb/sdk/lib/asyncio_manager.py +252 -0
- wandb/sdk/lib/hashutil.py +13 -4
- wandb/sdk/lib/printer.py +2 -2
- wandb/sdk/lib/printer_asyncio.py +3 -1
- wandb/sdk/lib/retry.py +185 -78
- wandb/sdk/lib/service/service_client.py +106 -0
- wandb/sdk/lib/service/service_connection.py +20 -26
- wandb/sdk/lib/service/service_token.py +30 -13
- wandb/sdk/mailbox/mailbox.py +13 -5
- wandb/sdk/mailbox/mailbox_handle.py +22 -13
- wandb/sdk/mailbox/response_handle.py +42 -106
- wandb/sdk/mailbox/wait_with_progress.py +7 -42
- wandb/sdk/wandb_init.py +11 -25
- wandb/sdk/wandb_login.py +1 -1
- wandb/sdk/wandb_run.py +91 -55
- wandb/sdk/wandb_settings.py +45 -32
- wandb/sdk/wandb_setup.py +176 -96
- wandb/util.py +1 -1
- {wandb-0.21.1.dist-info → wandb-0.21.2.dist-info}/METADATA +1 -1
- {wandb-0.21.1.dist-info → wandb-0.21.2.dist-info}/RECORD +84 -68
- wandb/sdk/interface/interface_relay.py +0 -38
- wandb/sdk/interface/router.py +0 -89
- wandb/sdk/interface/router_queue.py +0 -43
- wandb/sdk/interface/router_relay.py +0 -50
- wandb/sdk/interface/router_sock.py +0 -32
- wandb/sdk/lib/sock_client.py +0 -232
- {wandb-0.21.1.dist-info → wandb-0.21.2.dist-info}/WHEEL +0 -0
- {wandb-0.21.1.dist-info → wandb-0.21.2.dist-info}/entry_points.txt +0 -0
- {wandb-0.21.1.dist-info → wandb-0.21.2.dist-info}/licenses/LICENSE +0 -0
wandb/sdk/wandb_run.py
CHANGED
@@ -2723,7 +2723,6 @@ class Run:
|
|
2723
2723
|
wait_with_progress(
|
2724
2724
|
exit_handle,
|
2725
2725
|
timeout=None,
|
2726
|
-
progress_after=1,
|
2727
2726
|
display_progress=functools.partial(
|
2728
2727
|
self._display_finish_stats,
|
2729
2728
|
progress_printer,
|
@@ -2962,7 +2961,7 @@ class Run:
|
|
2962
2961
|
artifact: Artifact,
|
2963
2962
|
target_path: str,
|
2964
2963
|
aliases: list[str] | None = None,
|
2965
|
-
) -> Artifact
|
2964
|
+
) -> Artifact:
|
2966
2965
|
"""Link the given artifact to a portfolio (a promoted collection of artifacts).
|
2967
2966
|
|
2968
2967
|
Linked artifacts are visible in the UI for the specified portfolio.
|
@@ -2976,7 +2975,7 @@ class Run:
|
|
2976
2975
|
The alias "latest" will always be applied to the latest version of an artifact that is linked.
|
2977
2976
|
|
2978
2977
|
Returns:
|
2979
|
-
The linked artifact
|
2978
|
+
The linked artifact.
|
2980
2979
|
|
2981
2980
|
"""
|
2982
2981
|
if artifact.is_draft() and not artifact._is_draft_save_started():
|
@@ -3888,64 +3887,101 @@ class Run:
|
|
3888
3887
|
if settings.quiet or settings.silent:
|
3889
3888
|
return
|
3890
3889
|
|
3891
|
-
panel = []
|
3890
|
+
panel: list[str] = []
|
3892
3891
|
|
3893
|
-
|
3894
|
-
|
3895
|
-
|
3892
|
+
if history and (
|
3893
|
+
history_grid := Run._footer_history(history, printer, settings)
|
3894
|
+
):
|
3895
|
+
panel.append(history_grid)
|
3896
3896
|
|
3897
|
-
|
3898
|
-
|
3899
|
-
|
3900
|
-
|
3901
|
-
for item in history.item
|
3902
|
-
if not item.key.startswith("_")
|
3903
|
-
}
|
3897
|
+
if summary and (
|
3898
|
+
summary_grid := Run._footer_summary(summary, printer, settings)
|
3899
|
+
):
|
3900
|
+
panel.append(summary_grid)
|
3904
3901
|
|
3905
|
-
|
3906
|
-
|
3907
|
-
if any(not isinstance(value, numbers.Number) for value in values):
|
3908
|
-
continue
|
3909
|
-
sparkline = printer.sparklines(values)
|
3910
|
-
if sparkline:
|
3911
|
-
history_rows.append([key, sparkline])
|
3912
|
-
if history_rows:
|
3913
|
-
history_grid = printer.grid(
|
3914
|
-
history_rows,
|
3915
|
-
"Run history:",
|
3916
|
-
)
|
3917
|
-
panel.append(history_grid)
|
3902
|
+
if panel:
|
3903
|
+
printer.display(printer.panel(panel))
|
3918
3904
|
|
3919
|
-
|
3920
|
-
|
3921
|
-
|
3922
|
-
|
3923
|
-
|
3924
|
-
|
3925
|
-
|
3926
|
-
|
3927
|
-
|
3928
|
-
|
3929
|
-
|
3930
|
-
# arrays etc. might be too large. for now, we just don't print them
|
3931
|
-
if isinstance(value, str):
|
3932
|
-
value = value[:20] + "..." * (len(value) >= 20)
|
3933
|
-
summary_rows.append([key, value])
|
3934
|
-
elif isinstance(value, numbers.Number):
|
3935
|
-
value = round(value, 5) if isinstance(value, float) else value
|
3936
|
-
summary_rows.append([key, str(value)])
|
3937
|
-
else:
|
3938
|
-
continue
|
3905
|
+
@staticmethod
|
3906
|
+
def _footer_history(
|
3907
|
+
history: SampledHistoryResponse,
|
3908
|
+
printer: printer.Printer,
|
3909
|
+
settings: Settings,
|
3910
|
+
) -> str | None:
|
3911
|
+
"""Returns the run history formatted for printing to the console."""
|
3912
|
+
sorted_history_items = sorted(
|
3913
|
+
(item for item in history.item if not item.key.startswith("_")),
|
3914
|
+
key=lambda item: item.key,
|
3915
|
+
)
|
3939
3916
|
|
3940
|
-
|
3941
|
-
|
3942
|
-
|
3943
|
-
|
3944
|
-
)
|
3945
|
-
panel.append(summary_grid)
|
3917
|
+
history_rows: list[list[str]] = []
|
3918
|
+
for item in sorted_history_items:
|
3919
|
+
if len(history_rows) >= settings.max_end_of_run_history_metrics:
|
3920
|
+
break
|
3946
3921
|
|
3947
|
-
|
3948
|
-
|
3922
|
+
values = wandb.util.downsample(
|
3923
|
+
item.values_float or item.values_int,
|
3924
|
+
40,
|
3925
|
+
)
|
3926
|
+
|
3927
|
+
if sparkline := printer.sparklines(values):
|
3928
|
+
history_rows.append([item.key, sparkline])
|
3929
|
+
|
3930
|
+
if not history_rows:
|
3931
|
+
return None
|
3932
|
+
|
3933
|
+
if len(history_rows) < len(sorted_history_items):
|
3934
|
+
remaining = len(sorted_history_items) - len(history_rows)
|
3935
|
+
history_rows.append([f"+{remaining:,d}", "..."])
|
3936
|
+
|
3937
|
+
return printer.grid(history_rows, "Run history:")
|
3938
|
+
|
3939
|
+
@staticmethod
|
3940
|
+
def _footer_summary(
|
3941
|
+
summary: GetSummaryResponse,
|
3942
|
+
printer: printer.Printer,
|
3943
|
+
settings: Settings,
|
3944
|
+
) -> str | None:
|
3945
|
+
"""Returns the run summary formatted for printing to the console."""
|
3946
|
+
sorted_summary_items = sorted(
|
3947
|
+
(
|
3948
|
+
item
|
3949
|
+
for item in summary.item
|
3950
|
+
if not item.key.startswith("_") and not item.nested_key
|
3951
|
+
),
|
3952
|
+
key=lambda item: item.key,
|
3953
|
+
)
|
3954
|
+
|
3955
|
+
summary_rows: list[list[str]] = []
|
3956
|
+
skipped = 0
|
3957
|
+
for item in sorted_summary_items:
|
3958
|
+
if len(summary_rows) >= settings.max_end_of_run_summary_metrics:
|
3959
|
+
break
|
3960
|
+
|
3961
|
+
try:
|
3962
|
+
value = json.loads(item.value_json)
|
3963
|
+
except json.JSONDecodeError:
|
3964
|
+
logger.exception(f"Error decoding summary[{item.key!r}]")
|
3965
|
+
skipped += 1
|
3966
|
+
continue
|
3967
|
+
|
3968
|
+
if isinstance(value, str):
|
3969
|
+
value = value[:20] + "..." * (len(value) >= 20)
|
3970
|
+
summary_rows.append([item.key, value])
|
3971
|
+
elif isinstance(value, numbers.Number):
|
3972
|
+
value = round(value, 5) if isinstance(value, float) else value
|
3973
|
+
summary_rows.append([item.key, str(value)])
|
3974
|
+
else:
|
3975
|
+
skipped += 1
|
3976
|
+
|
3977
|
+
if not summary_rows:
|
3978
|
+
return None
|
3979
|
+
|
3980
|
+
if len(summary_rows) < len(sorted_summary_items) - skipped:
|
3981
|
+
remaining = len(sorted_summary_items) - len(summary_rows) - skipped
|
3982
|
+
summary_rows.append([f"+{remaining:,d}", "..."])
|
3983
|
+
|
3984
|
+
return printer.grid(summary_rows, "Run summary:")
|
3949
3985
|
|
3950
3986
|
@staticmethod
|
3951
3987
|
def _footer_internal_messages(
|
wandb/sdk/wandb_settings.py
CHANGED
@@ -156,6 +156,14 @@ def _path_convert(*args: str) -> str:
|
|
156
156
|
return os.path.expanduser(os.path.join(*args))
|
157
157
|
|
158
158
|
|
159
|
+
CLIENT_ONLY_SETTINGS = (
|
160
|
+
"reinit",
|
161
|
+
"max_end_of_run_history_metrics",
|
162
|
+
"max_end_of_run_summary_metrics",
|
163
|
+
)
|
164
|
+
"""Python-only keys that are not fields on the settings proto."""
|
165
|
+
|
166
|
+
|
159
167
|
class Settings(BaseModel, validate_assignment=True):
|
160
168
|
"""Settings for the W&B SDK.
|
161
169
|
|
@@ -469,6 +477,12 @@ class Settings(BaseModel, validate_assignment=True):
|
|
469
477
|
settings_system: Optional[str] = None
|
470
478
|
"""Path to the system-wide settings file."""
|
471
479
|
|
480
|
+
max_end_of_run_history_metrics: int = 10
|
481
|
+
"""Maximum number of history sparklines to display at the end of a run."""
|
482
|
+
|
483
|
+
max_end_of_run_summary_metrics: int = 10
|
484
|
+
"""Maximum number of summary metrics to display at the end of a run."""
|
485
|
+
|
472
486
|
show_colors: Optional[bool] = None
|
473
487
|
"""Whether to use colored output in the console.
|
474
488
|
|
@@ -1008,7 +1022,7 @@ class Settings(BaseModel, validate_assignment=True):
|
|
1008
1022
|
def validate_api_key(cls, value):
|
1009
1023
|
"""Validate the API key.
|
1010
1024
|
|
1011
|
-
<!-- lazydoc-ignore: internal -->
|
1025
|
+
<!-- lazydoc-ignore-classmethod: internal -->
|
1012
1026
|
"""
|
1013
1027
|
if value is not None and (len(value) > len(value.strip())):
|
1014
1028
|
raise UsageError("API key cannot start or end with whitespace")
|
@@ -1019,7 +1033,7 @@ class Settings(BaseModel, validate_assignment=True):
|
|
1019
1033
|
def validate_base_url(cls, value):
|
1020
1034
|
"""Validate the base URL.
|
1021
1035
|
|
1022
|
-
<!-- lazydoc-ignore: internal -->
|
1036
|
+
<!-- lazydoc-ignore-classmethod: internal -->
|
1023
1037
|
"""
|
1024
1038
|
validate_url(value)
|
1025
1039
|
# wandb.ai-specific checks
|
@@ -1037,7 +1051,7 @@ class Settings(BaseModel, validate_assignment=True):
|
|
1037
1051
|
def validate_code_dir(cls, value):
|
1038
1052
|
"""Validate the code directory.
|
1039
1053
|
|
1040
|
-
<!-- lazydoc-ignore: internal -->
|
1054
|
+
<!-- lazydoc-ignore-classmethod: internal -->
|
1041
1055
|
"""
|
1042
1056
|
# TODO: add native support for pathlib.Path
|
1043
1057
|
if isinstance(value, pathlib.Path):
|
@@ -1049,7 +1063,7 @@ class Settings(BaseModel, validate_assignment=True):
|
|
1049
1063
|
def validate_console(cls, value, values):
|
1050
1064
|
"""Validate the console capture method.
|
1051
1065
|
|
1052
|
-
<!-- lazydoc-ignore: internal -->
|
1066
|
+
<!-- lazydoc-ignore-classmethod: internal -->
|
1053
1067
|
"""
|
1054
1068
|
if value != "auto":
|
1055
1069
|
return value
|
@@ -1061,7 +1075,7 @@ class Settings(BaseModel, validate_assignment=True):
|
|
1061
1075
|
def validate_x_executable(cls, value):
|
1062
1076
|
"""Validate the Python executable path.
|
1063
1077
|
|
1064
|
-
<!-- lazydoc-ignore: internal -->
|
1078
|
+
<!-- lazydoc-ignore-classmethod: internal -->
|
1065
1079
|
"""
|
1066
1080
|
# TODO: add native support for pathlib.Path
|
1067
1081
|
if isinstance(value, pathlib.Path):
|
@@ -1080,7 +1094,7 @@ class Settings(BaseModel, validate_assignment=True):
|
|
1080
1094
|
def validate_file_stream_max_line_bytes(cls, value):
|
1081
1095
|
"""Validate the maximum line length for filestream JSONL files.
|
1082
1096
|
|
1083
|
-
<!-- lazydoc-ignore: internal -->
|
1097
|
+
<!-- lazydoc-ignore-classmethod: internal -->
|
1084
1098
|
"""
|
1085
1099
|
if value is not None and value < 1:
|
1086
1100
|
raise ValueError("File stream max line bytes must be greater than 0")
|
@@ -1091,7 +1105,7 @@ class Settings(BaseModel, validate_assignment=True):
|
|
1091
1105
|
def validate_x_files_dir(cls, value):
|
1092
1106
|
"""Validate the files directory.
|
1093
1107
|
|
1094
|
-
<!-- lazydoc-ignore: internal -->
|
1108
|
+
<!-- lazydoc-ignore-classmethod: internal -->
|
1095
1109
|
"""
|
1096
1110
|
# TODO: add native support for pathlib.Path
|
1097
1111
|
if isinstance(value, pathlib.Path):
|
@@ -1103,7 +1117,7 @@ class Settings(BaseModel, validate_assignment=True):
|
|
1103
1117
|
def validate_fork_from(cls, value, values) -> Optional[RunMoment]:
|
1104
1118
|
"""Validate the fork_from field.
|
1105
1119
|
|
1106
|
-
<!-- lazydoc-ignore: internal -->
|
1120
|
+
<!-- lazydoc-ignore-classmethod: internal -->
|
1107
1121
|
"""
|
1108
1122
|
run_moment = cls._runmoment_preprocessor(value)
|
1109
1123
|
|
@@ -1131,7 +1145,7 @@ class Settings(BaseModel, validate_assignment=True):
|
|
1131
1145
|
def validate_http_proxy(cls, value):
|
1132
1146
|
"""Validate the HTTP proxy.
|
1133
1147
|
|
1134
|
-
<!-- lazydoc-ignore: internal -->
|
1148
|
+
<!-- lazydoc-ignore-classmethod: internal -->
|
1135
1149
|
"""
|
1136
1150
|
if value is None:
|
1137
1151
|
return None
|
@@ -1143,7 +1157,7 @@ class Settings(BaseModel, validate_assignment=True):
|
|
1143
1157
|
def validate_https_proxy(cls, value):
|
1144
1158
|
"""Validate the HTTPS proxy.
|
1145
1159
|
|
1146
|
-
<!-- lazydoc-ignore: internal -->
|
1160
|
+
<!-- lazydoc-ignore-classmethod: internal -->
|
1147
1161
|
"""
|
1148
1162
|
if value is None:
|
1149
1163
|
return None
|
@@ -1155,7 +1169,7 @@ class Settings(BaseModel, validate_assignment=True):
|
|
1155
1169
|
def validate_ignore_globs(cls, value):
|
1156
1170
|
"""Validate the ignore globs.
|
1157
1171
|
|
1158
|
-
<!-- lazydoc-ignore: internal -->
|
1172
|
+
<!-- lazydoc-ignore-classmethod: internal -->
|
1159
1173
|
"""
|
1160
1174
|
return tuple(value) if not isinstance(value, tuple) else value
|
1161
1175
|
|
@@ -1164,7 +1178,7 @@ class Settings(BaseModel, validate_assignment=True):
|
|
1164
1178
|
def validate_program(cls, value):
|
1165
1179
|
"""Validate the program path.
|
1166
1180
|
|
1167
|
-
<!-- lazydoc-ignore: internal -->
|
1181
|
+
<!-- lazydoc-ignore-classmethod: internal -->
|
1168
1182
|
"""
|
1169
1183
|
# TODO: add native support for pathlib.Path
|
1170
1184
|
if isinstance(value, pathlib.Path):
|
@@ -1176,7 +1190,7 @@ class Settings(BaseModel, validate_assignment=True):
|
|
1176
1190
|
def validate_program_abspath(cls, value):
|
1177
1191
|
"""Validate the absolute program path.
|
1178
1192
|
|
1179
|
-
<!-- lazydoc-ignore: internal -->
|
1193
|
+
<!-- lazydoc-ignore-classmethod: internal -->
|
1180
1194
|
"""
|
1181
1195
|
# TODO: add native support for pathlib.Path
|
1182
1196
|
if isinstance(value, pathlib.Path):
|
@@ -1188,7 +1202,7 @@ class Settings(BaseModel, validate_assignment=True):
|
|
1188
1202
|
def validate_program_relpath(cls, value):
|
1189
1203
|
"""Validate the relative program path.
|
1190
1204
|
|
1191
|
-
<!-- lazydoc-ignore: internal -->
|
1205
|
+
<!-- lazydoc-ignore-classmethod: internal -->
|
1192
1206
|
"""
|
1193
1207
|
# TODO: add native support for pathlib.Path
|
1194
1208
|
if isinstance(value, pathlib.Path):
|
@@ -1200,7 +1214,7 @@ class Settings(BaseModel, validate_assignment=True):
|
|
1200
1214
|
def validate_project(cls, value, values):
|
1201
1215
|
"""Validate the project name.
|
1202
1216
|
|
1203
|
-
<!-- lazydoc-ignore: internal -->
|
1217
|
+
<!-- lazydoc-ignore-classmethod: internal -->
|
1204
1218
|
"""
|
1205
1219
|
if value is None:
|
1206
1220
|
return None
|
@@ -1221,7 +1235,7 @@ class Settings(BaseModel, validate_assignment=True):
|
|
1221
1235
|
def validate_resume(cls, value):
|
1222
1236
|
"""Validate the resume behavior.
|
1223
1237
|
|
1224
|
-
<!-- lazydoc-ignore: internal -->
|
1238
|
+
<!-- lazydoc-ignore-classmethod: internal -->
|
1225
1239
|
"""
|
1226
1240
|
if value is False:
|
1227
1241
|
return None
|
@@ -1234,7 +1248,7 @@ class Settings(BaseModel, validate_assignment=True):
|
|
1234
1248
|
def validate_resume_from(cls, value, values) -> Optional[RunMoment]:
|
1235
1249
|
"""Validate the resume_from field.
|
1236
1250
|
|
1237
|
-
<!-- lazydoc-ignore: internal -->
|
1251
|
+
<!-- lazydoc-ignore-classmethod: internal -->
|
1238
1252
|
"""
|
1239
1253
|
run_moment = cls._runmoment_preprocessor(value)
|
1240
1254
|
|
@@ -1260,7 +1274,7 @@ class Settings(BaseModel, validate_assignment=True):
|
|
1260
1274
|
def validate_root_dir(cls, value):
|
1261
1275
|
"""Validate the root directory.
|
1262
1276
|
|
1263
|
-
<!-- lazydoc-ignore: internal -->
|
1277
|
+
<!-- lazydoc-ignore-classmethod: internal -->
|
1264
1278
|
"""
|
1265
1279
|
# TODO: add native support for pathlib.Path
|
1266
1280
|
if isinstance(value, pathlib.Path):
|
@@ -1272,7 +1286,7 @@ class Settings(BaseModel, validate_assignment=True):
|
|
1272
1286
|
def validate_run_id(cls, value, values):
|
1273
1287
|
"""Validate the run ID.
|
1274
1288
|
|
1275
|
-
<!-- lazydoc-ignore: internal -->
|
1289
|
+
<!-- lazydoc-ignore-classmethod: internal -->
|
1276
1290
|
"""
|
1277
1291
|
if value is None:
|
1278
1292
|
return None
|
@@ -1295,7 +1309,7 @@ class Settings(BaseModel, validate_assignment=True):
|
|
1295
1309
|
def validate_settings_system(cls, value):
|
1296
1310
|
"""Validate the system settings file path.
|
1297
1311
|
|
1298
|
-
<!-- lazydoc-ignore: internal -->
|
1312
|
+
<!-- lazydoc-ignore-classmethod: internal -->
|
1299
1313
|
"""
|
1300
1314
|
if value is None:
|
1301
1315
|
return None
|
@@ -1309,7 +1323,7 @@ class Settings(BaseModel, validate_assignment=True):
|
|
1309
1323
|
def validate_service_wait(cls, value):
|
1310
1324
|
"""Validate the service wait time.
|
1311
1325
|
|
1312
|
-
<!-- lazydoc-ignore: internal -->
|
1326
|
+
<!-- lazydoc-ignore-classmethod: internal -->
|
1313
1327
|
"""
|
1314
1328
|
if value < 0:
|
1315
1329
|
raise UsageError("Service wait time cannot be negative")
|
@@ -1320,7 +1334,7 @@ class Settings(BaseModel, validate_assignment=True):
|
|
1320
1334
|
def validate_start_method(cls, value):
|
1321
1335
|
"""Validate the start method for subprocesses.
|
1322
1336
|
|
1323
|
-
<!-- lazydoc-ignore: internal -->
|
1337
|
+
<!-- lazydoc-ignore-classmethod: internal -->
|
1324
1338
|
"""
|
1325
1339
|
if value is None:
|
1326
1340
|
return value
|
@@ -1342,7 +1356,7 @@ class Settings(BaseModel, validate_assignment=True):
|
|
1342
1356
|
def validate_x_stats_gpu_device_ids(cls, value):
|
1343
1357
|
"""Validate the GPU device IDs.
|
1344
1358
|
|
1345
|
-
<!-- lazydoc-ignore: internal -->
|
1359
|
+
<!-- lazydoc-ignore-classmethod: internal -->
|
1346
1360
|
"""
|
1347
1361
|
if isinstance(value, str):
|
1348
1362
|
return json.loads(value)
|
@@ -1353,7 +1367,7 @@ class Settings(BaseModel, validate_assignment=True):
|
|
1353
1367
|
def validate_x_stats_neuron_monitor_config_path(cls, value):
|
1354
1368
|
"""Validate the path to the neuron-monitor config file.
|
1355
1369
|
|
1356
|
-
<!-- lazydoc-ignore: internal -->
|
1370
|
+
<!-- lazydoc-ignore-classmethod: internal -->
|
1357
1371
|
"""
|
1358
1372
|
# TODO: add native support for pathlib.Path
|
1359
1373
|
if isinstance(value, pathlib.Path):
|
@@ -1365,7 +1379,7 @@ class Settings(BaseModel, validate_assignment=True):
|
|
1365
1379
|
def validate_stats_open_metrics_endpoints(cls, value):
|
1366
1380
|
"""Validate the OpenMetrics endpoints.
|
1367
1381
|
|
1368
|
-
<!-- lazydoc-ignore: internal -->
|
1382
|
+
<!-- lazydoc-ignore-classmethod: internal -->
|
1369
1383
|
"""
|
1370
1384
|
if isinstance(value, str):
|
1371
1385
|
return json.loads(value)
|
@@ -1376,7 +1390,7 @@ class Settings(BaseModel, validate_assignment=True):
|
|
1376
1390
|
def validate_stats_open_metrics_filters(cls, value):
|
1377
1391
|
"""Validate the OpenMetrics filters.
|
1378
1392
|
|
1379
|
-
<!-- lazydoc-ignore: internal -->
|
1393
|
+
<!-- lazydoc-ignore-classmethod: internal -->
|
1380
1394
|
"""
|
1381
1395
|
if isinstance(value, str):
|
1382
1396
|
return json.loads(value)
|
@@ -1387,7 +1401,7 @@ class Settings(BaseModel, validate_assignment=True):
|
|
1387
1401
|
def validate_stats_open_metrics_http_headers(cls, value):
|
1388
1402
|
"""Validate the OpenMetrics HTTP headers.
|
1389
1403
|
|
1390
|
-
<!-- lazydoc-ignore: internal -->
|
1404
|
+
<!-- lazydoc-ignore-classmethod: internal -->
|
1391
1405
|
"""
|
1392
1406
|
if isinstance(value, str):
|
1393
1407
|
return json.loads(value)
|
@@ -1398,7 +1412,7 @@ class Settings(BaseModel, validate_assignment=True):
|
|
1398
1412
|
def validate_stats_sampling_interval(cls, value):
|
1399
1413
|
"""Validate the stats sampling interval.
|
1400
1414
|
|
1401
|
-
<!-- lazydoc-ignore: internal -->
|
1415
|
+
<!-- lazydoc-ignore-classmethod: internal -->
|
1402
1416
|
"""
|
1403
1417
|
if value < 0.1:
|
1404
1418
|
raise UsageError("Stats sampling interval cannot be less than 0.1 seconds")
|
@@ -1409,7 +1423,7 @@ class Settings(BaseModel, validate_assignment=True):
|
|
1409
1423
|
def validate_sweep_id(cls, value):
|
1410
1424
|
"""Validate the sweep ID.
|
1411
1425
|
|
1412
|
-
<!-- lazydoc-ignore: internal -->
|
1426
|
+
<!-- lazydoc-ignore-classmethod: internal -->
|
1413
1427
|
"""
|
1414
1428
|
if value is None:
|
1415
1429
|
return None
|
@@ -1426,7 +1440,7 @@ class Settings(BaseModel, validate_assignment=True):
|
|
1426
1440
|
def validate_sweep_param_path(cls, value):
|
1427
1441
|
"""Validate the sweep parameter path.
|
1428
1442
|
|
1429
|
-
<!-- lazydoc-ignore: internal -->
|
1443
|
+
<!-- lazydoc-ignore-classmethod: internal -->
|
1430
1444
|
"""
|
1431
1445
|
# TODO: add native support for pathlib.Path
|
1432
1446
|
if isinstance(value, pathlib.Path):
|
@@ -1857,8 +1871,7 @@ class Settings(BaseModel, validate_assignment=True):
|
|
1857
1871
|
"""Generate a protobuf representation of the settings."""
|
1858
1872
|
settings_proto = wandb_settings_pb2.Settings()
|
1859
1873
|
for k, v in self.model_dump(exclude_none=True).items():
|
1860
|
-
|
1861
|
-
if k in ("reinit",):
|
1874
|
+
if k in CLIENT_ONLY_SETTINGS:
|
1862
1875
|
continue
|
1863
1876
|
|
1864
1877
|
# Special case for x_stats_open_metrics_filters.
|