wandb 0.21.1__py3-none-musllinux_1_2_aarch64.whl → 0.21.3__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.
Files changed (94) hide show
  1. wandb/__init__.py +1 -1
  2. wandb/__init__.pyi +1 -1
  3. wandb/apis/public/api.py +1 -2
  4. wandb/apis/public/artifacts.py +3 -5
  5. wandb/apis/public/registries/_utils.py +14 -16
  6. wandb/apis/public/registries/registries_search.py +176 -289
  7. wandb/apis/public/reports.py +13 -10
  8. wandb/automations/_generated/delete_automation.py +1 -3
  9. wandb/automations/_generated/enums.py +13 -11
  10. wandb/bin/gpu_stats +0 -0
  11. wandb/bin/wandb-core +0 -0
  12. wandb/cli/cli.py +47 -2
  13. wandb/integration/metaflow/data_pandas.py +2 -2
  14. wandb/integration/metaflow/data_pytorch.py +75 -0
  15. wandb/integration/metaflow/data_sklearn.py +76 -0
  16. wandb/integration/metaflow/metaflow.py +16 -87
  17. wandb/integration/weave/__init__.py +6 -0
  18. wandb/integration/weave/interface.py +49 -0
  19. wandb/integration/weave/weave.py +63 -0
  20. wandb/proto/v3/wandb_internal_pb2.py +3 -2
  21. wandb/proto/v4/wandb_internal_pb2.py +2 -2
  22. wandb/proto/v5/wandb_internal_pb2.py +2 -2
  23. wandb/proto/v6/wandb_internal_pb2.py +2 -2
  24. wandb/sdk/artifacts/_factories.py +17 -0
  25. wandb/sdk/artifacts/_generated/__init__.py +221 -13
  26. wandb/sdk/artifacts/_generated/artifact_by_id.py +17 -0
  27. wandb/sdk/artifacts/_generated/artifact_by_name.py +22 -0
  28. wandb/sdk/artifacts/_generated/artifact_collection_membership_file_urls.py +43 -0
  29. wandb/sdk/artifacts/_generated/artifact_created_by.py +47 -0
  30. wandb/sdk/artifacts/_generated/artifact_file_urls.py +22 -0
  31. wandb/sdk/artifacts/_generated/artifact_type.py +31 -0
  32. wandb/sdk/artifacts/_generated/artifact_used_by.py +43 -0
  33. wandb/sdk/artifacts/_generated/artifact_via_membership_by_name.py +26 -0
  34. wandb/sdk/artifacts/_generated/delete_artifact.py +28 -0
  35. wandb/sdk/artifacts/_generated/enums.py +5 -0
  36. wandb/sdk/artifacts/_generated/fetch_artifact_manifest.py +38 -0
  37. wandb/sdk/artifacts/_generated/fetch_registries.py +32 -0
  38. wandb/sdk/artifacts/_generated/fragments.py +279 -41
  39. wandb/sdk/artifacts/_generated/link_artifact.py +6 -0
  40. wandb/sdk/artifacts/_generated/operations.py +654 -51
  41. wandb/sdk/artifacts/_generated/registry_collections.py +34 -0
  42. wandb/sdk/artifacts/_generated/registry_versions.py +34 -0
  43. wandb/sdk/artifacts/_generated/unlink_artifact.py +25 -0
  44. wandb/sdk/artifacts/_graphql_fragments.py +3 -86
  45. wandb/sdk/artifacts/_validators.py +6 -4
  46. wandb/sdk/artifacts/artifact.py +410 -547
  47. wandb/sdk/artifacts/artifact_file_cache.py +11 -7
  48. wandb/sdk/artifacts/artifact_manifest.py +10 -9
  49. wandb/sdk/artifacts/artifact_manifest_entry.py +15 -18
  50. wandb/sdk/artifacts/artifact_manifests/artifact_manifest_v1.py +5 -3
  51. wandb/sdk/artifacts/storage_handlers/gcs_handler.py +1 -1
  52. wandb/sdk/artifacts/storage_handlers/http_handler.py +1 -1
  53. wandb/sdk/artifacts/storage_handlers/s3_handler.py +1 -1
  54. wandb/sdk/artifacts/storage_policies/wandb_storage_policy.py +1 -1
  55. wandb/sdk/data_types/video.py +2 -2
  56. wandb/sdk/interface/interface_queue.py +1 -4
  57. wandb/sdk/interface/interface_shared.py +26 -37
  58. wandb/sdk/interface/interface_sock.py +24 -14
  59. wandb/sdk/internal/settings_static.py +2 -3
  60. wandb/sdk/launch/create_job.py +12 -1
  61. wandb/sdk/launch/inputs/internal.py +25 -24
  62. wandb/sdk/launch/inputs/schema.py +31 -1
  63. wandb/sdk/launch/runner/kubernetes_runner.py +24 -29
  64. wandb/sdk/lib/asyncio_compat.py +16 -16
  65. wandb/sdk/lib/asyncio_manager.py +252 -0
  66. wandb/sdk/lib/hashutil.py +13 -4
  67. wandb/sdk/lib/paths.py +23 -21
  68. wandb/sdk/lib/printer.py +2 -2
  69. wandb/sdk/lib/printer_asyncio.py +3 -1
  70. wandb/sdk/lib/retry.py +185 -78
  71. wandb/sdk/lib/service/service_client.py +106 -0
  72. wandb/sdk/lib/service/service_connection.py +20 -26
  73. wandb/sdk/lib/service/service_token.py +30 -13
  74. wandb/sdk/mailbox/mailbox.py +13 -5
  75. wandb/sdk/mailbox/mailbox_handle.py +22 -13
  76. wandb/sdk/mailbox/response_handle.py +42 -106
  77. wandb/sdk/mailbox/wait_with_progress.py +7 -42
  78. wandb/sdk/wandb_init.py +11 -25
  79. wandb/sdk/wandb_login.py +1 -1
  80. wandb/sdk/wandb_run.py +92 -56
  81. wandb/sdk/wandb_settings.py +45 -32
  82. wandb/sdk/wandb_setup.py +176 -96
  83. wandb/util.py +1 -1
  84. {wandb-0.21.1.dist-info → wandb-0.21.3.dist-info}/METADATA +2 -2
  85. {wandb-0.21.1.dist-info → wandb-0.21.3.dist-info}/RECORD +88 -72
  86. wandb/sdk/interface/interface_relay.py +0 -38
  87. wandb/sdk/interface/router.py +0 -89
  88. wandb/sdk/interface/router_queue.py +0 -43
  89. wandb/sdk/interface/router_relay.py +0 -50
  90. wandb/sdk/interface/router_sock.py +0 -32
  91. wandb/sdk/lib/sock_client.py +0 -232
  92. {wandb-0.21.1.dist-info → wandb-0.21.3.dist-info}/WHEEL +0 -0
  93. {wandb-0.21.1.dist-info → wandb-0.21.3.dist-info}/entry_points.txt +0 -0
  94. {wandb-0.21.1.dist-info → wandb-0.21.3.dist-info}/licenses/LICENSE +0 -0
wandb/__init__.py CHANGED
@@ -10,7 +10,7 @@ For reference documentation, see https://docs.wandb.com/ref/python.
10
10
  """
11
11
  from __future__ import annotations
12
12
 
13
- __version__ = "0.21.1"
13
+ __version__ = "0.21.3"
14
14
 
15
15
 
16
16
  from wandb.errors import Error
wandb/__init__.pyi CHANGED
@@ -107,7 +107,7 @@ if TYPE_CHECKING:
107
107
  import wandb
108
108
  from wandb.plot import CustomChart
109
109
 
110
- __version__: str = "0.21.1"
110
+ __version__: str = "0.21.3"
111
111
 
112
112
  run: Run | None
113
113
  config: wandb_config.Config
wandb/apis/public/api.py CHANGED
@@ -989,7 +989,7 @@ class Api:
989
989
  future releases.
990
990
 
991
991
  Args:
992
- path: The path to project the report resides in. Specify the
992
+ path: The path to the project the report resides in. Specify the
993
993
  entity that created the project as a prefix followed by a
994
994
  forward slash.
995
995
  name: Name of the report requested.
@@ -1007,7 +1007,6 @@ class Api:
1007
1007
 
1008
1008
  wandb.Api.reports("entity/project")
1009
1009
  ```
1010
-
1011
1010
  """
1012
1011
  entity, project, _ = self._parse_path(path + "/fake_run")
1013
1012
 
@@ -714,7 +714,7 @@ class Artifacts(SizedPaginator["Artifact"]):
714
714
 
715
715
  self.QUERY = gql_compat(
716
716
  PROJECT_ARTIFACTS_GQL,
717
- omit_fields=omit_artifact_fields(api=InternalApi()),
717
+ omit_fields=omit_artifact_fields(),
718
718
  rename_fields=rename_fields,
719
719
  )
720
720
 
@@ -818,15 +818,13 @@ class RunArtifacts(SizedPaginator["Artifact"]):
818
818
  if mode == "logged":
819
819
  self.run_key = "outputArtifacts"
820
820
  self.QUERY = gql_compat(
821
- RUN_OUTPUT_ARTIFACTS_GQL,
822
- omit_fields=omit_artifact_fields(api=InternalApi()),
821
+ RUN_OUTPUT_ARTIFACTS_GQL, omit_fields=omit_artifact_fields()
823
822
  )
824
823
  self._response_cls = RunOutputArtifactsProjectRunOutputArtifacts
825
824
  elif mode == "used":
826
825
  self.run_key = "inputArtifacts"
827
826
  self.QUERY = gql_compat(
828
- RUN_INPUT_ARTIFACTS_GQL,
829
- omit_fields=omit_artifact_fields(api=InternalApi()),
827
+ RUN_INPUT_ARTIFACTS_GQL, omit_fields=omit_artifact_fields()
830
828
  )
831
829
  self._response_cls = RunInputArtifactsProjectRunInputArtifacts
832
830
  else:
@@ -1,6 +1,8 @@
1
+ from __future__ import annotations
2
+
1
3
  from enum import Enum
2
4
  from functools import lru_cache
3
- from typing import TYPE_CHECKING, Any, List, Literal, Mapping, Optional, Sequence
5
+ from typing import TYPE_CHECKING, Any, Literal, Mapping, Sequence
4
6
 
5
7
  from wandb.sdk.artifacts._validators import (
6
8
  REGISTRY_PREFIX,
@@ -21,15 +23,12 @@ class Visibility(str, Enum):
21
23
 
22
24
  @classmethod
23
25
  def _missing_(cls, value: object) -> Any:
24
- return next(
25
- (e for e in cls if e.name == value),
26
- None,
27
- )
26
+ return next((e for e in cls if e.name == value), None)
28
27
 
29
28
 
30
29
  def format_gql_artifact_types_input(
31
- artifact_types: Optional[List[str]] = None,
32
- ):
30
+ artifact_types: list[str] | None,
31
+ ) -> list[dict[str, str]]:
33
32
  """Format the artifact types for the GQL input.
34
33
 
35
34
  Args:
@@ -40,8 +39,7 @@ def format_gql_artifact_types_input(
40
39
  """
41
40
  if artifact_types is None:
42
41
  return []
43
- new_types = validate_artifact_types_list(artifact_types)
44
- return [{"name": type} for type in new_types]
42
+ return [{"name": typ} for typ in validate_artifact_types_list(artifact_types)]
45
43
 
46
44
 
47
45
  def gql_to_registry_visibility(
@@ -67,14 +65,14 @@ def registry_visibility_to_gql(
67
65
  """Convert the registry visibility to the GQL visibility."""
68
66
  try:
69
67
  return Visibility[visibility].value
70
- except KeyError:
68
+ except LookupError:
69
+ allowed_str = ", ".join(map(repr, (e.name for e in Visibility)))
71
70
  raise ValueError(
72
- f"Invalid visibility: {visibility!r}. "
73
- f"Must be one of: {', '.join(map(repr, (e.name for e in Visibility)))}"
71
+ f"Invalid visibility: {visibility!r}. Must be one of: {allowed_str}"
74
72
  )
75
73
 
76
74
 
77
- def ensure_registry_prefix_on_names(query, in_name=False):
75
+ def ensure_registry_prefix_on_names(query: Any, in_name: bool = False) -> Any:
78
76
  """Traverse the filter to prepend the `name` key value with the registry prefix unless the value is a regex.
79
77
 
80
78
  - in_name: True if we are under a "name" key (or propagating from one).
@@ -105,7 +103,7 @@ def ensure_registry_prefix_on_names(query, in_name=False):
105
103
 
106
104
 
107
105
  @lru_cache(maxsize=10)
108
- def fetch_org_entity_from_organization(client: "Client", organization: str) -> str:
106
+ def fetch_org_entity_from_organization(client: Client, organization: str) -> str:
109
107
  """Fetch the org entity from the organization.
110
108
 
111
109
  Args:
@@ -127,7 +125,7 @@ def fetch_org_entity_from_organization(client: "Client", organization: str) -> s
127
125
  response = client.execute(query, variable_values={"organization": organization})
128
126
  except Exception as e:
129
127
  raise ValueError(
130
- f"Error fetching org entity for organization: {organization}"
128
+ f"Error fetching org entity for organization: {organization!r}"
131
129
  ) from e
132
130
 
133
131
  if (
@@ -135,6 +133,6 @@ def fetch_org_entity_from_organization(client: "Client", organization: str) -> s
135
133
  or not (org_entity := org["orgEntity"])
136
134
  or not (org_name := org_entity["name"])
137
135
  ):
138
- raise ValueError(f"Organization entity for {organization} not found.")
136
+ raise ValueError(f"Organization entity for {organization!r} not found.")
139
137
 
140
138
  return org_name