wandb 0.21.4__py3-none-win32.whl → 0.22.0__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 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.4"
13
+ __version__ = "0.22.0"
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.4"
110
+ __version__: str = "0.22.0"
111
111
 
112
112
  run: Run | None
113
113
  config: wandb_config.Config
@@ -1,3 +1,45 @@
1
+ __all__ = (
2
+ "Api",
3
+ "RetryingClient", # doc:exclude
4
+ "requests", # doc:exclude
5
+ "ArtifactCollection",
6
+ "ArtifactCollections",
7
+ "ArtifactFiles",
8
+ "Artifacts",
9
+ "ArtifactType",
10
+ "ArtifactTypes",
11
+ "RunArtifacts",
12
+ "Automations",
13
+ "File", # doc:exclude
14
+ "Files",
15
+ "HistoryScan", # doc:exclude
16
+ "SampledHistoryScan", # doc:exclude
17
+ "SlackIntegrations", # doc:exclude
18
+ "WebhookIntegrations", # doc:exclude
19
+ "Job", # doc:exclude
20
+ "QueuedRun", # doc:exclude
21
+ "RunQueue", # doc:exclude
22
+ "RunQueueAccessType", # doc:exclude
23
+ "RunQueuePrioritizationMode", # doc:exclude
24
+ "RunQueueResourceType", # doc:exclude
25
+ "Project",
26
+ "Projects",
27
+ "Sweeps",
28
+ "QueryGenerator", # doc:exclude
29
+ "Registry",
30
+ "BetaReport",
31
+ "PanelMetricsHelper", # doc:exclude
32
+ "PythonMongoishQueryGenerator", # doc:exclude
33
+ "Reports",
34
+ "Run",
35
+ "Runs",
36
+ "Sweep",
37
+ "Member",
38
+ "Team",
39
+ "User",
40
+ )
41
+
42
+
1
43
  from wandb.apis.public.api import Api, RetryingClient, requests
2
44
  from wandb.apis.public.artifacts import (
3
45
  ArtifactCollection,
wandb/apis/public/runs.py CHANGED
@@ -88,10 +88,28 @@ RUN_FRAGMENT = """fragment RunFragment on Run {
88
88
 
89
89
  @normalize_exceptions
90
90
  def _server_provides_internal_id_for_project(client) -> bool:
91
- """Returns True if the server allows us to query the internalId field for a project.
92
-
93
- This check is done by utilizing GraphQL introspection in the available fields on the Project type.
91
+ """Returns True if the server allows us to query the internalId field for a project."""
92
+ query_string = """
93
+ query ProbeProjectInput {
94
+ ProjectType: __type(name:"Project") {
95
+ fields {
96
+ name
97
+ }
98
+ }
99
+ }
94
100
  """
101
+
102
+ # Only perform the query once to avoid extra network calls
103
+ query = gql(query_string)
104
+ res = client.execute(query)
105
+ return "internalId" in [
106
+ x["name"] for x in (res.get("ProjectType", {}).get("fields", [{}]))
107
+ ]
108
+
109
+
110
+ @normalize_exceptions
111
+ def _server_provides_project_id_for_run(client) -> bool:
112
+ """Returns True if the server allows us to query the projectId field for a run."""
95
113
  query_string = """
96
114
  query ProbeRunInput {
97
115
  RunType: __type(name:"Run") {
@@ -209,13 +227,13 @@ class Runs(SizedPaginator["Run"]):
209
227
  f"""#graphql
210
228
  query Runs($project: String!, $entity: String!, $cursor: String, $perPage: Int = 50, $order: String, $filters: JSONString) {{
211
229
  project(name: $project, entityName: $entity) {{
212
- internalId
230
+ {"internalId" if _server_provides_internal_id_for_project(client) else ""}
213
231
  runCount(filters: $filters)
214
232
  readOnly
215
233
  runs(filters: $filters, after: $cursor, first: $perPage, order: $order) {{
216
234
  edges {{
217
235
  node {{
218
- {"projectId" if _server_provides_internal_id_for_project(client) else ""}
236
+ {"projectId" if _server_provides_project_id_for_run(client) else ""}
219
237
  ...RunFragment
220
238
  }}
221
239
  cursor
@@ -603,7 +621,7 @@ class Run(Attrs):
603
621
  query Run($project: String!, $entity: String!, $name: String!) {{
604
622
  project(name: $project, entityName: $entity) {{
605
623
  run(name: $name) {{
606
- {"projectId" if _server_provides_internal_id_for_project(self.client) else ""}
624
+ {"projectId" if _server_provides_project_id_for_run(self.client) else ""}
607
625
  ...RunFragment
608
626
  }}
609
627
  }}
wandb/bin/gpu_stats.exe CHANGED
Binary file
wandb/bin/wandb-core CHANGED
Binary file