wandb 0.19.10__py3-none-musllinux_1_2_aarch64.whl → 0.19.11__py3-none-musllinux_1_2_aarch64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- wandb/__init__.py +1 -1
- wandb/__init__.pyi +3 -3
- wandb/_pydantic/__init__.py +2 -3
- wandb/_pydantic/base.py +11 -31
- wandb/_pydantic/utils.py +8 -1
- wandb/_pydantic/v1_compat.py +3 -3
- wandb/apis/public/api.py +590 -22
- wandb/apis/public/artifacts.py +13 -5
- wandb/apis/public/automations.py +1 -1
- wandb/apis/public/integrations.py +22 -10
- wandb/apis/public/registries/__init__.py +0 -0
- wandb/apis/public/registries/_freezable_list.py +179 -0
- wandb/apis/public/{registries.py → registries/registries_search.py} +22 -129
- wandb/apis/public/registries/registry.py +357 -0
- wandb/apis/public/registries/utils.py +140 -0
- wandb/apis/public/runs.py +58 -56
- wandb/automations/__init__.py +16 -24
- wandb/automations/_filters/expressions.py +12 -10
- wandb/automations/_filters/operators.py +10 -19
- wandb/automations/_filters/run_metrics.py +231 -82
- wandb/automations/_generated/__init__.py +27 -34
- wandb/automations/_generated/create_automation.py +17 -0
- wandb/automations/_generated/delete_automation.py +17 -0
- wandb/automations/_generated/fragments.py +40 -25
- wandb/automations/_generated/{get_triggers.py → get_automations.py} +5 -5
- wandb/automations/_generated/{get_triggers_by_entity.py → get_automations_by_entity.py} +7 -5
- wandb/automations/_generated/operations.py +35 -98
- wandb/automations/_generated/update_automation.py +17 -0
- wandb/automations/_utils.py +178 -64
- wandb/automations/_validators.py +94 -2
- wandb/automations/actions.py +113 -98
- wandb/automations/automations.py +47 -69
- wandb/automations/events.py +139 -87
- wandb/automations/integrations.py +23 -4
- wandb/automations/scopes.py +22 -20
- wandb/bin/gpu_stats +0 -0
- wandb/bin/wandb-core +0 -0
- wandb/env.py +11 -0
- wandb/old/settings.py +4 -1
- wandb/proto/v3/wandb_internal_pb2.py +240 -236
- wandb/proto/v3/wandb_telemetry_pb2.py +10 -10
- wandb/proto/v4/wandb_internal_pb2.py +236 -236
- wandb/proto/v4/wandb_telemetry_pb2.py +10 -10
- wandb/proto/v5/wandb_internal_pb2.py +236 -236
- wandb/proto/v5/wandb_telemetry_pb2.py +10 -10
- wandb/proto/v6/wandb_internal_pb2.py +236 -236
- wandb/proto/v6/wandb_telemetry_pb2.py +10 -10
- wandb/sdk/artifacts/_generated/__init__.py +42 -1
- wandb/sdk/artifacts/_generated/add_aliases.py +21 -0
- wandb/sdk/artifacts/_generated/delete_aliases.py +21 -0
- wandb/sdk/artifacts/_generated/fetch_linked_artifacts.py +67 -0
- wandb/sdk/artifacts/_generated/fragments.py +35 -0
- wandb/sdk/artifacts/_generated/input_types.py +12 -0
- wandb/sdk/artifacts/_generated/operations.py +101 -0
- wandb/sdk/artifacts/_generated/update_artifact.py +26 -0
- wandb/sdk/artifacts/_graphql_fragments.py +1 -0
- wandb/sdk/artifacts/_validators.py +120 -1
- wandb/sdk/artifacts/artifact.py +380 -203
- wandb/sdk/artifacts/artifact_file_cache.py +4 -6
- wandb/sdk/artifacts/artifact_manifest_entry.py +11 -2
- wandb/sdk/artifacts/storage_policies/wandb_storage_policy.py +182 -1
- wandb/sdk/artifacts/storage_policy.py +3 -0
- wandb/sdk/data_types/video.py +46 -32
- wandb/sdk/interface/interface.py +2 -3
- wandb/sdk/internal/internal_api.py +21 -31
- wandb/sdk/internal/sender.py +5 -2
- wandb/sdk/launch/sweeps/utils.py +8 -0
- wandb/sdk/projects/_generated/__init__.py +47 -0
- wandb/sdk/projects/_generated/delete_project.py +22 -0
- wandb/sdk/projects/_generated/enums.py +4 -0
- wandb/sdk/projects/_generated/fetch_registry.py +22 -0
- wandb/sdk/projects/_generated/fragments.py +41 -0
- wandb/sdk/projects/_generated/input_types.py +13 -0
- wandb/sdk/projects/_generated/operations.py +88 -0
- wandb/sdk/projects/_generated/rename_project.py +27 -0
- wandb/sdk/projects/_generated/upsert_registry_project.py +27 -0
- wandb/sdk/service/service.py +9 -1
- wandb/sdk/wandb_init.py +32 -5
- wandb/sdk/wandb_run.py +37 -9
- wandb/sdk/wandb_settings.py +6 -7
- wandb/sdk/wandb_setup.py +12 -0
- wandb/util.py +7 -3
- {wandb-0.19.10.dist-info → wandb-0.19.11.dist-info}/METADATA +1 -1
- {wandb-0.19.10.dist-info → wandb-0.19.11.dist-info}/RECORD +87 -70
- wandb/automations/_generated/create_filter_trigger.py +0 -21
- wandb/automations/_generated/delete_trigger.py +0 -19
- wandb/automations/_generated/update_filter_trigger.py +0 -21
- {wandb-0.19.10.dist-info → wandb-0.19.11.dist-info}/WHEEL +0 -0
- {wandb-0.19.10.dist-info → wandb-0.19.11.dist-info}/entry_points.txt +0 -0
- {wandb-0.19.10.dist-info → wandb-0.19.11.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,41 @@
|
|
1
|
+
# Generated by ariadne-codegen
|
2
|
+
# Source: tools/graphql_codegen/projects/
|
3
|
+
|
4
|
+
from __future__ import annotations
|
5
|
+
|
6
|
+
from typing import List, Optional
|
7
|
+
|
8
|
+
from pydantic import Field
|
9
|
+
|
10
|
+
from wandb._pydantic import GQLBase, GQLId
|
11
|
+
|
12
|
+
|
13
|
+
class RegistryFragment(GQLBase):
|
14
|
+
id: GQLId
|
15
|
+
allow_all_artifact_types_in_registry: bool = Field(
|
16
|
+
alias="allowAllArtifactTypesInRegistry"
|
17
|
+
)
|
18
|
+
artifact_types: RegistryFragmentArtifactTypes = Field(alias="artifactTypes")
|
19
|
+
name: str
|
20
|
+
description: Optional[str]
|
21
|
+
created_at: str = Field(alias="createdAt")
|
22
|
+
updated_at: Optional[str] = Field(alias="updatedAt")
|
23
|
+
access: Optional[str]
|
24
|
+
|
25
|
+
|
26
|
+
class RegistryFragmentArtifactTypes(GQLBase):
|
27
|
+
edges: List[RegistryFragmentArtifactTypesEdges]
|
28
|
+
|
29
|
+
|
30
|
+
class RegistryFragmentArtifactTypesEdges(GQLBase):
|
31
|
+
node: Optional[RegistryFragmentArtifactTypesEdgesNode]
|
32
|
+
|
33
|
+
|
34
|
+
class RegistryFragmentArtifactTypesEdgesNode(GQLBase):
|
35
|
+
name: str
|
36
|
+
|
37
|
+
|
38
|
+
RegistryFragment.model_rebuild()
|
39
|
+
RegistryFragmentArtifactTypes.model_rebuild()
|
40
|
+
RegistryFragmentArtifactTypesEdges.model_rebuild()
|
41
|
+
RegistryFragmentArtifactTypesEdgesNode.model_rebuild()
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# Generated by ariadne-codegen
|
2
|
+
# Source: core/api/graphql/schemas/schema-latest.graphql
|
3
|
+
|
4
|
+
from __future__ import annotations
|
5
|
+
|
6
|
+
from typing import Optional
|
7
|
+
|
8
|
+
from wandb._pydantic import GQLBase
|
9
|
+
|
10
|
+
|
11
|
+
class ArtifactTypeInput(GQLBase):
|
12
|
+
name: str
|
13
|
+
description: Optional[str] = None
|
@@ -0,0 +1,88 @@
|
|
1
|
+
# Generated by ariadne-codegen
|
2
|
+
# Source: tools/graphql_codegen/projects/
|
3
|
+
|
4
|
+
__all__ = [
|
5
|
+
"DELETE_PROJECT_GQL",
|
6
|
+
"FETCH_REGISTRY_GQL",
|
7
|
+
"RENAME_PROJECT_GQL",
|
8
|
+
"UPSERT_REGISTRY_PROJECT_GQL",
|
9
|
+
]
|
10
|
+
|
11
|
+
FETCH_REGISTRY_GQL = """
|
12
|
+
query FetchRegistry($name: String, $entityName: String) {
|
13
|
+
entity(name: $entityName) {
|
14
|
+
project(name: $name) {
|
15
|
+
...RegistryFragment
|
16
|
+
}
|
17
|
+
}
|
18
|
+
}
|
19
|
+
|
20
|
+
fragment RegistryFragment on Project {
|
21
|
+
id
|
22
|
+
allowAllArtifactTypesInRegistry
|
23
|
+
artifactTypes(includeAll: true) {
|
24
|
+
edges {
|
25
|
+
node {
|
26
|
+
name
|
27
|
+
}
|
28
|
+
}
|
29
|
+
}
|
30
|
+
name
|
31
|
+
description
|
32
|
+
createdAt
|
33
|
+
updatedAt
|
34
|
+
access
|
35
|
+
}
|
36
|
+
"""
|
37
|
+
|
38
|
+
RENAME_PROJECT_GQL = """
|
39
|
+
mutation renameProject($entityName: String!, $oldProjectName: String!, $newProjectName: String!) {
|
40
|
+
renameProject(
|
41
|
+
input: {entityName: $entityName, oldProjectName: $oldProjectName, newProjectName: $newProjectName}
|
42
|
+
) {
|
43
|
+
project {
|
44
|
+
name
|
45
|
+
}
|
46
|
+
inserted
|
47
|
+
}
|
48
|
+
}
|
49
|
+
"""
|
50
|
+
|
51
|
+
UPSERT_REGISTRY_PROJECT_GQL = """
|
52
|
+
mutation UpsertRegistryProject($description: String, $entityName: String, $name: String, $access: String, $allowAllArtifactTypesInRegistry: Boolean, $artifactTypes: [ArtifactTypeInput!]) {
|
53
|
+
upsertModel(
|
54
|
+
input: {description: $description, entityName: $entityName, name: $name, access: $access, allowAllArtifactTypesInRegistry: $allowAllArtifactTypesInRegistry, artifactTypes: $artifactTypes}
|
55
|
+
) {
|
56
|
+
project {
|
57
|
+
...RegistryFragment
|
58
|
+
}
|
59
|
+
inserted
|
60
|
+
}
|
61
|
+
}
|
62
|
+
|
63
|
+
fragment RegistryFragment on Project {
|
64
|
+
id
|
65
|
+
allowAllArtifactTypesInRegistry
|
66
|
+
artifactTypes(includeAll: true) {
|
67
|
+
edges {
|
68
|
+
node {
|
69
|
+
name
|
70
|
+
}
|
71
|
+
}
|
72
|
+
}
|
73
|
+
name
|
74
|
+
description
|
75
|
+
createdAt
|
76
|
+
updatedAt
|
77
|
+
access
|
78
|
+
}
|
79
|
+
"""
|
80
|
+
|
81
|
+
DELETE_PROJECT_GQL = """
|
82
|
+
mutation deleteProject($id: String!) {
|
83
|
+
deleteModel(input: {id: $id}) {
|
84
|
+
success
|
85
|
+
__typename
|
86
|
+
}
|
87
|
+
}
|
88
|
+
"""
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# Generated by ariadne-codegen
|
2
|
+
# Source: tools/graphql_codegen/projects/
|
3
|
+
|
4
|
+
from __future__ import annotations
|
5
|
+
|
6
|
+
from typing import Optional
|
7
|
+
|
8
|
+
from pydantic import Field
|
9
|
+
|
10
|
+
from wandb._pydantic import GQLBase
|
11
|
+
|
12
|
+
|
13
|
+
class RenameProject(GQLBase):
|
14
|
+
rename_project: Optional[RenameProjectRenameProject] = Field(alias="renameProject")
|
15
|
+
|
16
|
+
|
17
|
+
class RenameProjectRenameProject(GQLBase):
|
18
|
+
project: Optional[RenameProjectRenameProjectProject]
|
19
|
+
inserted: Optional[bool]
|
20
|
+
|
21
|
+
|
22
|
+
class RenameProjectRenameProjectProject(GQLBase):
|
23
|
+
name: str
|
24
|
+
|
25
|
+
|
26
|
+
RenameProject.model_rebuild()
|
27
|
+
RenameProjectRenameProject.model_rebuild()
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# Generated by ariadne-codegen
|
2
|
+
# Source: tools/graphql_codegen/projects/
|
3
|
+
|
4
|
+
from __future__ import annotations
|
5
|
+
|
6
|
+
from typing import Optional
|
7
|
+
|
8
|
+
from pydantic import Field
|
9
|
+
|
10
|
+
from wandb._pydantic import GQLBase
|
11
|
+
|
12
|
+
from .fragments import RegistryFragment
|
13
|
+
|
14
|
+
|
15
|
+
class UpsertRegistryProject(GQLBase):
|
16
|
+
upsert_model: Optional[UpsertRegistryProjectUpsertModel] = Field(
|
17
|
+
alias="upsertModel"
|
18
|
+
)
|
19
|
+
|
20
|
+
|
21
|
+
class UpsertRegistryProjectUpsertModel(GQLBase):
|
22
|
+
project: Optional[RegistryFragment]
|
23
|
+
inserted: Optional[bool]
|
24
|
+
|
25
|
+
|
26
|
+
UpsertRegistryProject.model_rebuild()
|
27
|
+
UpsertRegistryProjectUpsertModel.model_rebuild()
|
wandb/sdk/service/service.py
CHANGED
@@ -15,7 +15,12 @@ import time
|
|
15
15
|
from typing import TYPE_CHECKING, Any, Dict, Optional
|
16
16
|
|
17
17
|
from wandb import _sentry
|
18
|
-
from wandb.env import
|
18
|
+
from wandb.env import (
|
19
|
+
core_debug,
|
20
|
+
dcgm_profiling_enabled,
|
21
|
+
error_reporting_enabled,
|
22
|
+
is_require_legacy_service,
|
23
|
+
)
|
19
24
|
from wandb.errors import Error, WandbCoreNotAvailableError
|
20
25
|
from wandb.errors.term import termlog, termwarn
|
21
26
|
from wandb.util import get_core_path, get_module
|
@@ -162,6 +167,9 @@ class _Service:
|
|
162
167
|
if core_debug(default="False"):
|
163
168
|
service_args.extend(["--log-level", "-4"])
|
164
169
|
|
170
|
+
if dcgm_profiling_enabled():
|
171
|
+
service_args.append("--enable-dcgm-profiling")
|
172
|
+
|
165
173
|
exec_cmd_list = []
|
166
174
|
else:
|
167
175
|
service_args.extend(["wandb", "service", "--debug"])
|
wandb/sdk/wandb_init.py
CHANGED
@@ -984,6 +984,9 @@ class _WandbInit:
|
|
984
984
|
if settings.x_label:
|
985
985
|
tel.feature.user_provided_label = True
|
986
986
|
|
987
|
+
if wandb.env.dcgm_profiling_enabled():
|
988
|
+
tel.feature.dcgm_profiling_enabled = True
|
989
|
+
|
987
990
|
tel.env.maybe_mp = _maybe_mp_process(backend)
|
988
991
|
|
989
992
|
if not settings.label_disable:
|
@@ -1280,16 +1283,40 @@ def try_create_root_dir(settings: Settings) -> None:
|
|
1280
1283
|
This function may update the root_dir to a temporary directory
|
1281
1284
|
if the parent directory is not writable.
|
1282
1285
|
"""
|
1286
|
+
fallback_to_temp_dir = False
|
1287
|
+
|
1283
1288
|
try:
|
1284
|
-
|
1285
|
-
os.makedirs(settings.root_dir, exist_ok=True)
|
1289
|
+
os.makedirs(settings.root_dir, exist_ok=True)
|
1286
1290
|
except OSError:
|
1287
|
-
temp_dir = tempfile.gettempdir()
|
1288
1291
|
wandb.termwarn(
|
1289
|
-
f"
|
1292
|
+
f"Unable to create root directory {settings.root_dir}",
|
1290
1293
|
repeat=False,
|
1291
1294
|
)
|
1292
|
-
|
1295
|
+
fallback_to_temp_dir = True
|
1296
|
+
else:
|
1297
|
+
if not os.access(settings.root_dir, os.W_OK | os.R_OK):
|
1298
|
+
wandb.termwarn(
|
1299
|
+
f"Path {settings.root_dir} wasn't read/writable",
|
1300
|
+
repeat=False,
|
1301
|
+
)
|
1302
|
+
fallback_to_temp_dir = True
|
1303
|
+
|
1304
|
+
if not fallback_to_temp_dir:
|
1305
|
+
return
|
1306
|
+
|
1307
|
+
tmp_dir = tempfile.gettempdir()
|
1308
|
+
if not os.access(tmp_dir, os.W_OK | os.R_OK):
|
1309
|
+
raise ValueError(
|
1310
|
+
f"System temp directory ({tmp_dir}) is not writable/readable, "
|
1311
|
+
"please set the `dir` argument in `wandb.init()` to a writable/readable directory."
|
1312
|
+
)
|
1313
|
+
|
1314
|
+
settings.root_dir = tmp_dir
|
1315
|
+
wandb.termwarn(
|
1316
|
+
f"Falling back to temporary directory {tmp_dir}.",
|
1317
|
+
repeat=False,
|
1318
|
+
)
|
1319
|
+
os.makedirs(settings.root_dir, exist_ok=True)
|
1293
1320
|
|
1294
1321
|
|
1295
1322
|
def init( # noqa: C901
|
wandb/sdk/wandb_run.py
CHANGED
@@ -1222,7 +1222,14 @@ class Run:
|
|
1222
1222
|
)
|
1223
1223
|
return None
|
1224
1224
|
|
1225
|
-
|
1225
|
+
artifact = self._log_artifact(art)
|
1226
|
+
|
1227
|
+
self._config.update(
|
1228
|
+
{"_wandb": {"code_path": artifact.name}},
|
1229
|
+
allow_val_change=True,
|
1230
|
+
)
|
1231
|
+
|
1232
|
+
return artifact
|
1226
1233
|
|
1227
1234
|
@_log_to_run
|
1228
1235
|
def get_sweep_url(self) -> str | None:
|
@@ -3086,7 +3093,7 @@ class Run:
|
|
3086
3093
|
artifact: Artifact,
|
3087
3094
|
target_path: str,
|
3088
3095
|
aliases: list[str] | None = None,
|
3089
|
-
) -> None:
|
3096
|
+
) -> Artifact | None:
|
3090
3097
|
"""Link the given artifact to a portfolio (a promoted collection of artifacts).
|
3091
3098
|
|
3092
3099
|
The linked artifact will be visible in the UI for the specified portfolio.
|
@@ -3100,7 +3107,7 @@ class Run:
|
|
3100
3107
|
The alias "latest" will always be applied to the latest version of an artifact that is linked.
|
3101
3108
|
|
3102
3109
|
Returns:
|
3103
|
-
None
|
3110
|
+
The linked artifact if linking was successful, otherwise None.
|
3104
3111
|
|
3105
3112
|
"""
|
3106
3113
|
portfolio, project, entity = wandb.util._parse_entity_project_item(target_path)
|
@@ -3108,7 +3115,7 @@ class Run:
|
|
3108
3115
|
aliases = []
|
3109
3116
|
|
3110
3117
|
if not self._backend or not self._backend.interface:
|
3111
|
-
return
|
3118
|
+
return None
|
3112
3119
|
|
3113
3120
|
if artifact.is_draft() and not artifact._is_draft_save_started():
|
3114
3121
|
artifact = self._log_artifact(artifact)
|
@@ -3122,12 +3129,13 @@ class Run:
|
|
3122
3129
|
|
3123
3130
|
organization = ""
|
3124
3131
|
if is_artifact_registry_project(project):
|
3125
|
-
organization = entity
|
3132
|
+
organization = entity or self.settings.organization or ""
|
3126
3133
|
# In a Registry linking, the entity is used to fetch the organization of the artifact
|
3127
3134
|
# therefore the source artifact's entity is passed to the backend
|
3128
3135
|
entity = artifact._source_entity
|
3136
|
+
project = project or self.project
|
3137
|
+
entity = entity or self.entity
|
3129
3138
|
handle = self._backend.interface.deliver_link_artifact(
|
3130
|
-
self,
|
3131
3139
|
artifact,
|
3132
3140
|
portfolio,
|
3133
3141
|
aliases,
|
@@ -3143,6 +3151,24 @@ class Run:
|
|
3143
3151
|
response = result.response.link_artifact_response
|
3144
3152
|
if response.error_message:
|
3145
3153
|
wandb.termerror(response.error_message)
|
3154
|
+
if response.version_index is None:
|
3155
|
+
wandb.termerror(
|
3156
|
+
"Error fetching the linked artifact's version index after linking"
|
3157
|
+
)
|
3158
|
+
return None
|
3159
|
+
|
3160
|
+
try:
|
3161
|
+
artifact_name = f"{entity}/{project}/{portfolio}:v{response.version_index}"
|
3162
|
+
if is_artifact_registry_project(project):
|
3163
|
+
if organization:
|
3164
|
+
artifact_name = f"{organization}/{project}/{portfolio}:v{response.version_index}"
|
3165
|
+
else:
|
3166
|
+
artifact_name = f"{project}/{portfolio}:v{response.version_index}"
|
3167
|
+
linked_artifact = self._public_api()._artifact(artifact_name)
|
3168
|
+
except Exception as e:
|
3169
|
+
wandb.termerror(f"Error fetching link artifact after linking: {e}")
|
3170
|
+
return None
|
3171
|
+
return linked_artifact
|
3146
3172
|
|
3147
3173
|
@_log_to_run
|
3148
3174
|
@_raise_if_finished
|
@@ -3687,7 +3713,7 @@ class Run:
|
|
3687
3713
|
registered_model_name: str,
|
3688
3714
|
name: str | None = None,
|
3689
3715
|
aliases: list[str] | None = None,
|
3690
|
-
) -> None:
|
3716
|
+
) -> Artifact | None:
|
3691
3717
|
"""Log a model artifact version and link it to a registered model in the model registry.
|
3692
3718
|
|
3693
3719
|
The linked model version will be visible in the UI for the specified registered model.
|
@@ -3749,7 +3775,7 @@ class Run:
|
|
3749
3775
|
ValueError: if name has invalid special characters
|
3750
3776
|
|
3751
3777
|
Returns:
|
3752
|
-
None
|
3778
|
+
The linked artifact if linking was successful, otherwise None.
|
3753
3779
|
"""
|
3754
3780
|
name_parts = registered_model_name.split("/")
|
3755
3781
|
if len(name_parts) != 1:
|
@@ -3778,7 +3804,9 @@ class Run:
|
|
3778
3804
|
artifact = self._log_artifact(
|
3779
3805
|
artifact_or_path=path, name=name, type="model"
|
3780
3806
|
)
|
3781
|
-
self.link_artifact(
|
3807
|
+
return self.link_artifact(
|
3808
|
+
artifact=artifact, target_path=target_path, aliases=aliases
|
3809
|
+
)
|
3782
3810
|
|
3783
3811
|
@_log_to_run
|
3784
3812
|
@_raise_if_finished
|
wandb/sdk/wandb_settings.py
CHANGED
@@ -465,11 +465,7 @@ class Settings(BaseModel, validate_assignment=True):
|
|
465
465
|
save_code: Optional[bool] = None
|
466
466
|
"""Whether to save the code associated with the run."""
|
467
467
|
|
468
|
-
settings_system: str =
|
469
|
-
default_factory=lambda: _path_convert(
|
470
|
-
os.path.join("~", ".config", "wandb", "settings")
|
471
|
-
)
|
472
|
-
)
|
468
|
+
settings_system: Optional[str] = None
|
473
469
|
"""Path to the system-wide settings file."""
|
474
470
|
|
475
471
|
show_colors: Optional[bool] = None
|
@@ -1065,9 +1061,12 @@ class Settings(BaseModel, validate_assignment=True):
|
|
1065
1061
|
@field_validator("settings_system", mode="after")
|
1066
1062
|
@classmethod
|
1067
1063
|
def validate_settings_system(cls, value):
|
1068
|
-
if
|
1064
|
+
if value is None:
|
1065
|
+
return None
|
1066
|
+
elif isinstance(value, pathlib.Path):
|
1069
1067
|
return str(_path_convert(value))
|
1070
|
-
|
1068
|
+
else:
|
1069
|
+
return _path_convert(value)
|
1071
1070
|
|
1072
1071
|
@field_validator("x_service_wait", mode="after")
|
1073
1072
|
@classmethod
|
wandb/sdk/wandb_setup.py
CHANGED
@@ -15,12 +15,14 @@ from __future__ import annotations
|
|
15
15
|
|
16
16
|
import logging
|
17
17
|
import os
|
18
|
+
import pathlib
|
18
19
|
import sys
|
19
20
|
import threading
|
20
21
|
from typing import TYPE_CHECKING, Any, Union
|
21
22
|
|
22
23
|
import wandb
|
23
24
|
import wandb.integration.sagemaker as sagemaker
|
25
|
+
from wandb.env import CONFIG_DIR
|
24
26
|
from wandb.sdk.lib import import_hooks, wb_logging
|
25
27
|
|
26
28
|
from . import wandb_settings
|
@@ -161,6 +163,16 @@ class _WandbSetup:
|
|
161
163
|
self._logger.info(f"Configure stats pid to {pid}")
|
162
164
|
s.x_stats_pid = pid
|
163
165
|
|
166
|
+
if settings and settings.settings_system:
|
167
|
+
s.settings_system = settings.settings_system
|
168
|
+
elif config_dir_str := os.getenv(CONFIG_DIR, None):
|
169
|
+
config_dir = pathlib.Path(config_dir_str).expanduser()
|
170
|
+
s.settings_system = str(config_dir / "settings")
|
171
|
+
else:
|
172
|
+
s.settings_system = str(
|
173
|
+
pathlib.Path("~", ".config", "wandb", "settings").expanduser()
|
174
|
+
)
|
175
|
+
|
164
176
|
# load settings from the system config
|
165
177
|
if s.settings_system:
|
166
178
|
self._logger.info(f"Loading settings from {s.settings_system}")
|
wandb/util.py
CHANGED
@@ -1447,9 +1447,13 @@ def are_paths_on_same_drive(path1: str, path2: str) -> bool:
|
|
1447
1447
|
if platform.system() != "Windows":
|
1448
1448
|
return True
|
1449
1449
|
|
1450
|
-
|
1451
|
-
|
1452
|
-
|
1450
|
+
try:
|
1451
|
+
path1_drive = pathlib.Path(path1).resolve().drive
|
1452
|
+
path2_drive = pathlib.Path(path2).resolve().drive
|
1453
|
+
return path1_drive == path2_drive
|
1454
|
+
# If either path is not a valid windows path, an OSError is raised.
|
1455
|
+
except OSError:
|
1456
|
+
return False
|
1453
1457
|
|
1454
1458
|
|
1455
1459
|
# TODO(hugh): Deprecate version here and use wandb/sdk/lib/paths.py
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: wandb
|
3
|
-
Version: 0.19.
|
3
|
+
Version: 0.19.11
|
4
4
|
Summary: A CLI and library for interacting with the Weights & Biases API.
|
5
5
|
Project-URL: Source, https://github.com/wandb/wandb
|
6
6
|
Project-URL: Bug Reports, https://github.com/wandb/wandb/issues
|