wandb 0.19.9__py3-none-win_amd64.whl → 0.19.11__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.
- wandb/__init__.py +1 -1
- wandb/__init__.pyi +6 -3
- wandb/_pydantic/__init__.py +14 -8
- wandb/_pydantic/base.py +51 -36
- wandb/_pydantic/utils.py +73 -0
- wandb/_pydantic/v1_compat.py +79 -57
- wandb/apis/public/__init__.py +2 -2
- wandb/apis/public/api.py +684 -4
- wandb/apis/public/artifacts.py +377 -677
- wandb/apis/public/automations.py +69 -0
- wandb/apis/public/integrations.py +180 -0
- wandb/apis/public/projects.py +29 -0
- 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/apis/public/utils.py +107 -1
- wandb/automations/__init__.py +73 -0
- wandb/automations/_filters/__init__.py +40 -0
- wandb/automations/_filters/expressions.py +181 -0
- wandb/automations/_filters/operators.py +258 -0
- wandb/automations/_filters/run_metrics.py +332 -0
- wandb/automations/_generated/__init__.py +177 -0
- wandb/automations/_generated/create_automation.py +17 -0
- wandb/automations/_generated/create_generic_webhook_integration.py +43 -0
- wandb/automations/_generated/delete_automation.py +17 -0
- wandb/automations/_generated/enums.py +33 -0
- wandb/automations/_generated/fragments.py +358 -0
- wandb/automations/_generated/generic_webhook_integrations_by_entity.py +22 -0
- wandb/automations/_generated/get_automations.py +24 -0
- wandb/automations/_generated/get_automations_by_entity.py +26 -0
- wandb/automations/_generated/input_types.py +104 -0
- wandb/automations/_generated/integrations_by_entity.py +22 -0
- wandb/automations/_generated/operations.py +647 -0
- wandb/automations/_generated/slack_integrations_by_entity.py +22 -0
- wandb/automations/_generated/update_automation.py +17 -0
- wandb/automations/_utils.py +237 -0
- wandb/automations/_validators.py +165 -0
- wandb/automations/actions.py +220 -0
- wandb/automations/automations.py +87 -0
- wandb/automations/events.py +287 -0
- wandb/automations/integrations.py +45 -0
- wandb/automations/scopes.py +78 -0
- wandb/beta/workflows.py +9 -10
- wandb/bin/gpu_stats.exe +0 -0
- wandb/bin/wandb-core +0 -0
- wandb/cli/cli.py +3 -3
- wandb/env.py +11 -0
- wandb/integration/keras/keras.py +2 -1
- wandb/integration/langchain/wandb_tracer.py +2 -1
- wandb/jupyter.py +137 -118
- wandb/old/settings.py +4 -1
- wandb/old/summary.py +0 -2
- wandb/proto/v3/wandb_internal_pb2.py +297 -292
- wandb/proto/v3/wandb_settings_pb2.py +2 -2
- wandb/proto/v3/wandb_telemetry_pb2.py +10 -10
- wandb/proto/v4/wandb_internal_pb2.py +292 -292
- wandb/proto/v4/wandb_settings_pb2.py +2 -2
- wandb/proto/v4/wandb_telemetry_pb2.py +10 -10
- wandb/proto/v5/wandb_internal_pb2.py +292 -292
- wandb/proto/v5/wandb_settings_pb2.py +2 -2
- wandb/proto/v5/wandb_telemetry_pb2.py +10 -10
- wandb/proto/v6/wandb_base_pb2.py +41 -0
- wandb/proto/v6/wandb_internal_pb2.py +393 -0
- wandb/proto/v6/wandb_server_pb2.py +78 -0
- wandb/proto/v6/wandb_settings_pb2.py +58 -0
- wandb/proto/v6/wandb_telemetry_pb2.py +52 -0
- wandb/proto/wandb_base_pb2.py +2 -0
- wandb/proto/wandb_deprecated.py +8 -0
- wandb/proto/wandb_internal_pb2.py +3 -1
- wandb/proto/wandb_server_pb2.py +2 -0
- wandb/proto/wandb_settings_pb2.py +2 -0
- wandb/proto/wandb_telemetry_pb2.py +2 -0
- wandb/sdk/artifacts/_generated/__init__.py +289 -0
- wandb/sdk/artifacts/_generated/add_aliases.py +21 -0
- wandb/sdk/artifacts/_generated/artifact_collection_membership_files.py +43 -0
- wandb/sdk/artifacts/_generated/artifact_version_files.py +36 -0
- wandb/sdk/artifacts/_generated/create_artifact_collection_tag_assignments.py +36 -0
- wandb/sdk/artifacts/_generated/delete_aliases.py +21 -0
- wandb/sdk/artifacts/_generated/delete_artifact_collection_tag_assignments.py +25 -0
- wandb/sdk/artifacts/_generated/delete_artifact_portfolio.py +35 -0
- wandb/sdk/artifacts/_generated/delete_artifact_sequence.py +35 -0
- wandb/sdk/artifacts/_generated/enums.py +17 -0
- wandb/sdk/artifacts/_generated/fetch_linked_artifacts.py +67 -0
- wandb/sdk/artifacts/_generated/fragments.py +221 -0
- wandb/sdk/artifacts/_generated/input_types.py +28 -0
- wandb/sdk/artifacts/_generated/move_artifact_collection.py +35 -0
- wandb/sdk/artifacts/_generated/operations.py +611 -0
- wandb/sdk/artifacts/_generated/project_artifact_collection.py +101 -0
- wandb/sdk/artifacts/_generated/project_artifact_collections.py +33 -0
- wandb/sdk/artifacts/_generated/project_artifact_type.py +24 -0
- wandb/sdk/artifacts/_generated/project_artifact_types.py +24 -0
- wandb/sdk/artifacts/_generated/project_artifacts.py +42 -0
- wandb/sdk/artifacts/_generated/run_input_artifacts.py +51 -0
- wandb/sdk/artifacts/_generated/run_output_artifacts.py +51 -0
- wandb/sdk/artifacts/_generated/update_artifact.py +26 -0
- wandb/sdk/artifacts/_generated/update_artifact_portfolio.py +35 -0
- wandb/sdk/artifacts/_generated/update_artifact_sequence.py +35 -0
- wandb/sdk/artifacts/_graphql_fragments.py +57 -79
- wandb/sdk/artifacts/_validators.py +120 -1
- wandb/sdk/artifacts/artifact.py +419 -215
- wandb/sdk/artifacts/artifact_file_cache.py +4 -6
- wandb/sdk/artifacts/artifact_manifest_entry.py +13 -3
- wandb/sdk/artifacts/storage_handlers/azure_handler.py +1 -0
- wandb/sdk/artifacts/storage_policies/wandb_storage_policy.py +182 -1
- wandb/sdk/artifacts/storage_policy.py +3 -0
- wandb/sdk/data_types/base_types/media.py +2 -3
- wandb/sdk/data_types/base_types/wb_value.py +34 -11
- wandb/sdk/data_types/html.py +36 -9
- wandb/sdk/data_types/image.py +12 -12
- wandb/sdk/data_types/table.py +5 -0
- wandb/sdk/data_types/trace_tree.py +2 -0
- wandb/sdk/data_types/utils.py +1 -1
- wandb/sdk/data_types/video.py +59 -57
- wandb/sdk/interface/interface.py +4 -3
- wandb/sdk/internal/internal_api.py +21 -31
- wandb/sdk/internal/profiler.py +6 -5
- wandb/sdk/internal/run.py +13 -6
- wandb/sdk/internal/sender.py +5 -2
- wandb/sdk/launch/sweeps/utils.py +8 -0
- wandb/sdk/lib/apikey.py +25 -4
- wandb/sdk/lib/asyncio_compat.py +1 -1
- wandb/sdk/lib/deprecate.py +13 -22
- wandb/sdk/lib/disabled.py +2 -1
- wandb/sdk/lib/printer.py +37 -8
- wandb/sdk/lib/printer_asyncio.py +46 -0
- wandb/sdk/lib/redirect.py +10 -5
- 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/server_sock.py +19 -14
- wandb/sdk/service/service.py +18 -8
- wandb/sdk/service/streams.py +5 -0
- wandb/sdk/verify/verify.py +6 -3
- wandb/sdk/wandb_init.py +217 -70
- wandb/sdk/wandb_login.py +13 -4
- wandb/sdk/wandb_run.py +419 -295
- wandb/sdk/wandb_settings.py +27 -10
- wandb/sdk/wandb_setup.py +61 -0
- wandb/util.py +33 -29
- {wandb-0.19.9.dist-info → wandb-0.19.11.dist-info}/METADATA +5 -5
- {wandb-0.19.9.dist-info → wandb-0.19.11.dist-info}/RECORD +153 -83
- wandb/_globals.py +0 -19
- wandb/sdk/internal/_generated/base.py +0 -226
- wandb/sdk/internal/_generated/typing_compat.py +0 -14
- {wandb-0.19.9.dist-info → wandb-0.19.11.dist-info}/WHEEL +0 -0
- {wandb-0.19.9.dist-info → wandb-0.19.11.dist-info}/entry_points.txt +0 -0
- {wandb-0.19.9.dist-info → wandb-0.19.11.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,46 @@
|
|
1
|
+
import asyncio
|
2
|
+
from typing import Callable, TypeVar
|
3
|
+
|
4
|
+
from wandb.sdk.lib import asyncio_compat, printer
|
5
|
+
|
6
|
+
_T = TypeVar("_T")
|
7
|
+
|
8
|
+
|
9
|
+
def run_async_with_spinner(
|
10
|
+
spinner_printer: printer.Printer,
|
11
|
+
text: str,
|
12
|
+
func: Callable[[], _T],
|
13
|
+
) -> _T:
|
14
|
+
"""Run a slow function while displaying a loading icon.
|
15
|
+
|
16
|
+
Args:
|
17
|
+
spinner_printer: The printer to use to display text.
|
18
|
+
text: The text to display next to the spinner while the function runs.
|
19
|
+
func: The function to run.
|
20
|
+
|
21
|
+
Returns:
|
22
|
+
The result of func.
|
23
|
+
"""
|
24
|
+
|
25
|
+
async def _loop_run_with_spinner() -> _T:
|
26
|
+
func_running = asyncio.Event()
|
27
|
+
|
28
|
+
async def update_spinner() -> None:
|
29
|
+
tick = 0
|
30
|
+
with spinner_printer.dynamic_text() as text_area:
|
31
|
+
if text_area:
|
32
|
+
while not func_running.is_set():
|
33
|
+
spinner = spinner_printer.loading_symbol(tick)
|
34
|
+
text_area.set_text(f"{spinner} {text}")
|
35
|
+
tick += 1
|
36
|
+
await asyncio.sleep(0.1)
|
37
|
+
else:
|
38
|
+
spinner_printer.display(text)
|
39
|
+
|
40
|
+
async with asyncio_compat.open_task_group() as group:
|
41
|
+
group.start_soon(update_spinner())
|
42
|
+
res = await asyncio.get_running_loop().run_in_executor(None, func)
|
43
|
+
func_running.set()
|
44
|
+
return res
|
45
|
+
|
46
|
+
return asyncio_compat.run(_loop_run_with_spinner)
|
wandb/sdk/lib/redirect.py
CHANGED
@@ -534,12 +534,15 @@ class StreamWrapper(RedirectBase):
|
|
534
534
|
self,
|
535
535
|
src: Literal["stdout", "stderr"],
|
536
536
|
cbs: Iterable[Callable[[str], None]] = (),
|
537
|
+
*,
|
538
|
+
flush_periodically: bool,
|
537
539
|
) -> None:
|
538
540
|
super().__init__(src=src, cbs=cbs)
|
539
541
|
self._uninstall: Callable[[], None] | None = None
|
540
542
|
self._emulator = TerminalEmulator()
|
541
543
|
self._queue: queue.Queue[str] = queue.Queue()
|
542
544
|
self._stopped = threading.Event()
|
545
|
+
self._flush_periodically = flush_periodically
|
543
546
|
|
544
547
|
def _emulator_write(self) -> None:
|
545
548
|
while True:
|
@@ -600,7 +603,7 @@ class StreamWrapper(RedirectBase):
|
|
600
603
|
self._emulator_write_thread.daemon = True
|
601
604
|
self._emulator_write_thread.start()
|
602
605
|
|
603
|
-
if
|
606
|
+
if self._flush_periodically:
|
604
607
|
self._callback_thread = threading.Thread(target=self._callback)
|
605
608
|
self._callback_thread.daemon = True
|
606
609
|
self._callback_thread.start()
|
@@ -732,10 +735,11 @@ _redirects: dict[str, Redirect | None] = {"stdout": None, "stderr": None}
|
|
732
735
|
class Redirect(RedirectBase):
|
733
736
|
"""Redirect low level file descriptors."""
|
734
737
|
|
735
|
-
def __init__(self, src, cbs=()):
|
738
|
+
def __init__(self, src, cbs=(), *, flush_periodically: bool):
|
736
739
|
super().__init__(src=src, cbs=cbs)
|
737
740
|
self._installed = False
|
738
741
|
self._emulator = TerminalEmulator()
|
742
|
+
self._flush_periodically = flush_periodically
|
739
743
|
|
740
744
|
def _pipe(self):
|
741
745
|
if pty:
|
@@ -767,7 +771,7 @@ class Redirect(RedirectBase):
|
|
767
771
|
self._emulator_write_thread = threading.Thread(target=self._emulator_write)
|
768
772
|
self._emulator_write_thread.daemon = True
|
769
773
|
self._emulator_write_thread.start()
|
770
|
-
if
|
774
|
+
if self._flush_periodically:
|
771
775
|
self._callback_thread = threading.Thread(target=self._callback)
|
772
776
|
self._callback_thread.daemon = True
|
773
777
|
self._callback_thread.start()
|
@@ -776,8 +780,9 @@ class Redirect(RedirectBase):
|
|
776
780
|
if not self._installed:
|
777
781
|
return
|
778
782
|
self._installed = False
|
779
|
-
# If the user printed a very long string (millions of chars) right
|
780
|
-
# it will take a while for it to reach pipe relay.
|
783
|
+
# If the user printed a very long string (millions of chars) right
|
784
|
+
# before run.finish(), it will take a while for it to reach pipe relay.
|
785
|
+
# 1 second is enough time for ~5 million chars.
|
781
786
|
time.sleep(1)
|
782
787
|
self._stopped.set()
|
783
788
|
os.dup2(self._orig_src_fd, self.src_fd)
|
@@ -0,0 +1,47 @@
|
|
1
|
+
# Generated by ariadne-codegen
|
2
|
+
|
3
|
+
from .delete_project import DeleteProject, DeleteProjectDeleteModel
|
4
|
+
from .fetch_registry import FetchRegistry, FetchRegistryEntity
|
5
|
+
from .fragments import (
|
6
|
+
RegistryFragment,
|
7
|
+
RegistryFragmentArtifactTypes,
|
8
|
+
RegistryFragmentArtifactTypesEdges,
|
9
|
+
RegistryFragmentArtifactTypesEdgesNode,
|
10
|
+
)
|
11
|
+
from .input_types import ArtifactTypeInput
|
12
|
+
from .operations import (
|
13
|
+
DELETE_PROJECT_GQL,
|
14
|
+
FETCH_REGISTRY_GQL,
|
15
|
+
RENAME_PROJECT_GQL,
|
16
|
+
UPSERT_REGISTRY_PROJECT_GQL,
|
17
|
+
)
|
18
|
+
from .rename_project import (
|
19
|
+
RenameProject,
|
20
|
+
RenameProjectRenameProject,
|
21
|
+
RenameProjectRenameProjectProject,
|
22
|
+
)
|
23
|
+
from .upsert_registry_project import (
|
24
|
+
UpsertRegistryProject,
|
25
|
+
UpsertRegistryProjectUpsertModel,
|
26
|
+
)
|
27
|
+
|
28
|
+
__all__ = [
|
29
|
+
"DELETE_PROJECT_GQL",
|
30
|
+
"FETCH_REGISTRY_GQL",
|
31
|
+
"RENAME_PROJECT_GQL",
|
32
|
+
"UPSERT_REGISTRY_PROJECT_GQL",
|
33
|
+
"FetchRegistry",
|
34
|
+
"FetchRegistryEntity",
|
35
|
+
"RenameProject",
|
36
|
+
"RenameProjectRenameProject",
|
37
|
+
"RenameProjectRenameProjectProject",
|
38
|
+
"UpsertRegistryProject",
|
39
|
+
"UpsertRegistryProjectUpsertModel",
|
40
|
+
"DeleteProject",
|
41
|
+
"DeleteProjectDeleteModel",
|
42
|
+
"ArtifactTypeInput",
|
43
|
+
"RegistryFragment",
|
44
|
+
"RegistryFragmentArtifactTypes",
|
45
|
+
"RegistryFragmentArtifactTypesEdges",
|
46
|
+
"RegistryFragmentArtifactTypesEdgesNode",
|
47
|
+
]
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# Generated by ariadne-codegen
|
2
|
+
# Source: tools/graphql_codegen/projects/
|
3
|
+
|
4
|
+
from __future__ import annotations
|
5
|
+
|
6
|
+
from typing import Literal, Optional
|
7
|
+
|
8
|
+
from pydantic import Field
|
9
|
+
|
10
|
+
from wandb._pydantic import GQLBase, Typename
|
11
|
+
|
12
|
+
|
13
|
+
class DeleteProject(GQLBase):
|
14
|
+
delete_model: Optional[DeleteProjectDeleteModel] = Field(alias="deleteModel")
|
15
|
+
|
16
|
+
|
17
|
+
class DeleteProjectDeleteModel(GQLBase):
|
18
|
+
success: Optional[bool]
|
19
|
+
typename__: Typename[Literal["DeleteModelPayload"]]
|
20
|
+
|
21
|
+
|
22
|
+
DeleteProject.model_rebuild()
|
@@ -0,0 +1,22 @@
|
|
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 wandb._pydantic import GQLBase
|
9
|
+
|
10
|
+
from .fragments import RegistryFragment
|
11
|
+
|
12
|
+
|
13
|
+
class FetchRegistry(GQLBase):
|
14
|
+
entity: Optional[FetchRegistryEntity]
|
15
|
+
|
16
|
+
|
17
|
+
class FetchRegistryEntity(GQLBase):
|
18
|
+
project: Optional[RegistryFragment]
|
19
|
+
|
20
|
+
|
21
|
+
FetchRegistry.model_rebuild()
|
22
|
+
FetchRegistryEntity.model_rebuild()
|
@@ -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/server_sock.py
CHANGED
@@ -5,6 +5,7 @@ import time
|
|
5
5
|
from typing import TYPE_CHECKING, Any, Callable, Dict, Optional
|
6
6
|
|
7
7
|
import wandb
|
8
|
+
from wandb.proto import wandb_internal_pb2 as pb
|
8
9
|
from wandb.proto import wandb_server_pb2 as spb
|
9
10
|
from wandb.sdk.internal.settings_static import SettingsStatic
|
10
11
|
|
@@ -156,27 +157,31 @@ class SockServerReadThread(threading.Thread):
|
|
156
157
|
inform_attach_response=inform_attach_response,
|
157
158
|
)
|
158
159
|
self._sock_client.send_server_response(response)
|
159
|
-
iface = self._mux.get_stream(stream_id).interface
|
160
|
-
|
161
|
-
assert iface
|
162
160
|
|
163
161
|
def server_record_communicate(self, sreq: "spb.ServerRequest") -> None:
|
164
|
-
|
165
|
-
# encode relay information so the right socket picks up the data
|
166
|
-
record.control.relay_id = self._sock_client._sockid
|
167
|
-
stream_id = record._info.stream_id
|
168
|
-
iface = self._mux.get_stream(stream_id).interface
|
169
|
-
assert iface.record_q
|
170
|
-
iface.record_q.put(record)
|
162
|
+
self._put_record(sreq.record_communicate)
|
171
163
|
|
172
164
|
def server_record_publish(self, sreq: "spb.ServerRequest") -> None:
|
173
|
-
|
165
|
+
self._put_record(sreq.record_publish)
|
166
|
+
|
167
|
+
def _put_record(self, record: "pb.Record") -> None:
|
174
168
|
# encode relay information so the right socket picks up the data
|
175
169
|
record.control.relay_id = self._sock_client._sockid
|
176
170
|
stream_id = record._info.stream_id
|
177
|
-
|
178
|
-
|
179
|
-
|
171
|
+
|
172
|
+
try:
|
173
|
+
iface = self._mux.get_stream(stream_id).interface
|
174
|
+
|
175
|
+
except KeyError:
|
176
|
+
# We should log the error but cannot because it may print to console
|
177
|
+
# due to how logging is set up. This error usually happens if
|
178
|
+
# a record is sent when no run is active, but during this time the
|
179
|
+
# logger prints to the console.
|
180
|
+
pass
|
181
|
+
|
182
|
+
else:
|
183
|
+
assert iface.record_q
|
184
|
+
iface.record_q.put(record)
|
180
185
|
|
181
186
|
def server_inform_finish(self, sreq: "spb.ServerRequest") -> None:
|
182
187
|
request = sreq.inform_finish
|
wandb/sdk/service/service.py
CHANGED
@@ -14,10 +14,15 @@ import tempfile
|
|
14
14
|
import time
|
15
15
|
from typing import TYPE_CHECKING, Any, Dict, Optional
|
16
16
|
|
17
|
-
from wandb import _sentry
|
18
|
-
from wandb.env import
|
17
|
+
from wandb import _sentry
|
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
|
-
from wandb.errors.
|
25
|
+
from wandb.errors.term import termlog, termwarn
|
21
26
|
from wandb.util import get_core_path, get_module
|
22
27
|
|
23
28
|
from . import _startup_debug, port_file
|
@@ -162,14 +167,19 @@ 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
|
-
termlog(
|
167
|
-
"Using wandb-core as the SDK backend. Please refer to "
|
168
|
-
f"{url_registry.url('wandb-core')} for more information.",
|
169
|
-
repeat=False,
|
170
|
-
)
|
171
174
|
else:
|
172
175
|
service_args.extend(["wandb", "service", "--debug"])
|
176
|
+
termwarn(
|
177
|
+
"Using legacy-service, which is deprecated. If this is"
|
178
|
+
" unintentional, you can fix it by ensuring you do not call"
|
179
|
+
" `wandb.require('legacy-service')` and do not set the"
|
180
|
+
" WANDB_X_REQUIRE_LEGACY_SERVICE environment"
|
181
|
+
" variable."
|
182
|
+
)
|
173
183
|
|
174
184
|
service_args += [
|
175
185
|
"--port-filename",
|
wandb/sdk/service/streams.py
CHANGED
@@ -198,6 +198,11 @@ class StreamMux:
|
|
198
198
|
return stream_id in self._streams
|
199
199
|
|
200
200
|
def get_stream(self, stream_id: str) -> StreamRecord:
|
201
|
+
"""Returns the StreamRecord for the ID.
|
202
|
+
|
203
|
+
Raises:
|
204
|
+
KeyError: If a corresponding StreamRecord does not exist.
|
205
|
+
"""
|
201
206
|
with self._streams_lock:
|
202
207
|
stream = self._streams[stream_id]
|
203
208
|
return stream
|
wandb/sdk/verify/verify.py
CHANGED
@@ -132,7 +132,10 @@ def check_run(api: Api) -> bool:
|
|
132
132
|
f.close()
|
133
133
|
|
134
134
|
with wandb.init(
|
135
|
-
id=nice_id("check_run"),
|
135
|
+
id=nice_id("check_run"),
|
136
|
+
reinit=True,
|
137
|
+
config=config,
|
138
|
+
project=PROJECT_NAME,
|
136
139
|
) as run:
|
137
140
|
run_id = run.id
|
138
141
|
entity = run.entity
|
@@ -155,7 +158,7 @@ def check_run(api: Api) -> bool:
|
|
155
158
|
"Failed to log to media. Contact W&B for support."
|
156
159
|
)
|
157
160
|
|
158
|
-
|
161
|
+
run.save(filepath)
|
159
162
|
public_api = wandb.Api()
|
160
163
|
prev_run = public_api.run(f"{entity}/{PROJECT_NAME}/{run_id}")
|
161
164
|
# raise Exception(prev_run.__dict__)
|
@@ -379,7 +382,7 @@ def check_graphql_put(api: Api, host: str) -> Tuple[bool, Optional[str]]:
|
|
379
382
|
project=PROJECT_NAME,
|
380
383
|
config={"test": "put to graphql"},
|
381
384
|
) as run:
|
382
|
-
|
385
|
+
run.save(gql_fp)
|
383
386
|
public_api = wandb.Api()
|
384
387
|
prev_run = public_api.run(f"{run.entity}/{PROJECT_NAME}/{run.id}")
|
385
388
|
if prev_run is None:
|