wandb 0.17.8rc1__py3-none-any.whl → 0.18.0__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
Files changed (55) hide show
  1. package_readme.md +47 -53
  2. wandb/__init__.py +8 -7
  3. wandb/__init__.pyi +134 -14
  4. wandb/analytics/sentry.py +1 -1
  5. wandb/bin/nvidia_gpu_stats +0 -0
  6. wandb/cli/cli.py +15 -10
  7. wandb/data_types.py +1 -0
  8. wandb/env.py +4 -3
  9. wandb/integration/keras/__init__.py +2 -5
  10. wandb/integration/keras/callbacks/metrics_logger.py +10 -4
  11. wandb/integration/keras/callbacks/model_checkpoint.py +0 -5
  12. wandb/integration/keras/keras.py +12 -1
  13. wandb/integration/openai/fine_tuning.py +5 -5
  14. wandb/integration/tensorboard/log.py +1 -4
  15. wandb/jupyter.py +18 -3
  16. wandb/proto/v3/wandb_internal_pb2.py +238 -228
  17. wandb/proto/v3/wandb_settings_pb2.py +2 -2
  18. wandb/proto/v3/wandb_telemetry_pb2.py +12 -12
  19. wandb/proto/v4/wandb_internal_pb2.py +230 -228
  20. wandb/proto/v4/wandb_settings_pb2.py +2 -2
  21. wandb/proto/v4/wandb_telemetry_pb2.py +12 -12
  22. wandb/proto/v5/wandb_internal_pb2.py +230 -228
  23. wandb/proto/v5/wandb_settings_pb2.py +2 -2
  24. wandb/proto/v5/wandb_telemetry_pb2.py +12 -12
  25. wandb/proto/wandb_deprecated.py +4 -0
  26. wandb/sdk/__init__.py +1 -1
  27. wandb/sdk/artifacts/_validators.py +45 -0
  28. wandb/sdk/artifacts/artifact.py +109 -56
  29. wandb/sdk/artifacts/artifact_manifest_entry.py +10 -2
  30. wandb/sdk/artifacts/artifact_saver.py +6 -0
  31. wandb/sdk/artifacts/storage_handlers/gcs_handler.py +31 -0
  32. wandb/sdk/interface/interface.py +7 -4
  33. wandb/sdk/internal/internal_api.py +16 -6
  34. wandb/sdk/internal/sender.py +1 -0
  35. wandb/sdk/internal/system/assets/gpu_amd.py +11 -2
  36. wandb/sdk/internal/system/assets/trainium.py +2 -1
  37. wandb/sdk/internal/tb_watcher.py +1 -1
  38. wandb/sdk/launch/inputs/internal.py +2 -2
  39. wandb/sdk/lib/_settings_toposort_generated.py +3 -3
  40. wandb/sdk/service/server_sock.py +1 -1
  41. wandb/sdk/service/service.py +6 -2
  42. wandb/sdk/wandb_init.py +12 -3
  43. wandb/sdk/wandb_login.py +1 -0
  44. wandb/sdk/wandb_manager.py +0 -3
  45. wandb/sdk/wandb_require.py +7 -2
  46. wandb/sdk/wandb_run.py +40 -14
  47. wandb/sdk/wandb_settings.py +32 -12
  48. wandb/sdk/wandb_setup.py +3 -0
  49. {wandb-0.17.8rc1.dist-info → wandb-0.18.0.dist-info}/METADATA +52 -58
  50. {wandb-0.17.8rc1.dist-info → wandb-0.18.0.dist-info}/RECORD +54 -54
  51. wandb/testing/relay.py +0 -874
  52. /wandb/{viz.py → sdk/lib/viz.py} +0 -0
  53. {wandb-0.17.8rc1.dist-info → wandb-0.18.0.dist-info}/WHEEL +0 -0
  54. {wandb-0.17.8rc1.dist-info → wandb-0.18.0.dist-info}/entry_points.txt +0 -0
  55. {wandb-0.17.8rc1.dist-info → wandb-0.18.0.dist-info}/licenses/LICENSE +0 -0
@@ -37,23 +37,23 @@ from openai.types.fine_tuning.fine_tuning_job import ( # noqa: E402
37
37
  np = util.get_module(
38
38
  name="numpy",
39
39
  required="`numpy` not installed >> This integration requires numpy! To fix, please `pip install numpy`",
40
- lazy="False",
40
+ lazy=False,
41
41
  )
42
42
 
43
43
  pd = util.get_module(
44
44
  name="pandas",
45
45
  required="`pandas` not installed >> This integration requires pandas! To fix, please `pip install pandas`",
46
- lazy="False",
46
+ lazy=False,
47
47
  )
48
48
 
49
49
 
50
50
  class WandbLogger:
51
51
  """Log OpenAI fine-tunes to [Weights & Biases](https://wandb.me/openai-docs)."""
52
52
 
53
- _wandb_api: wandb.Api = None
53
+ _wandb_api: Optional[wandb.Api] = None
54
54
  _logged_in: bool = False
55
- openai_client: OpenAI = None
56
- _run: Run = None
55
+ openai_client: Optional[OpenAI] = None
56
+ _run: Optional[Run] = None
57
57
 
58
58
  @classmethod
59
59
  def sync(
@@ -6,7 +6,7 @@ from typing import TYPE_CHECKING, Any, Dict, List, Optional, Union
6
6
  import wandb
7
7
  import wandb.util
8
8
  from wandb.sdk.lib import telemetry
9
- from wandb.viz import custom_chart
9
+ from wandb.sdk.lib.viz import custom_chart
10
10
 
11
11
  if TYPE_CHECKING:
12
12
  import numpy as np
@@ -54,9 +54,6 @@ def make_ndarray(tensor: Any) -> Optional["np.ndarray"]:
54
54
  def namespaced_tag(tag: str, namespace: str = "") -> str:
55
55
  if not namespace:
56
56
  return tag
57
- elif tag in namespace:
58
- # This happens with tensorboardX
59
- return namespace
60
57
  else:
61
58
  return namespace + "/" + tag
62
59
 
wandb/jupyter.py CHANGED
@@ -167,8 +167,6 @@ def notebook_metadata_from_jupyter_servers_and_kernel_id():
167
167
  urljoin(s["url"], "api/sessions"), params={"token": s.get("token", "")}
168
168
  ).json()
169
169
  for nn in res:
170
- # TODO: wandb/client#400 found a case where res returned an array of
171
- # strings...
172
170
  if isinstance(nn, dict) and nn.get("kernel") and "notebook" in nn:
173
171
  if nn["kernel"]["id"] == kernel_id:
174
172
  return {
@@ -176,7 +174,24 @@ def notebook_metadata_from_jupyter_servers_and_kernel_id():
176
174
  "path": nn["notebook"]["path"],
177
175
  "name": nn["notebook"]["name"],
178
176
  }
179
- return None
177
+
178
+ if not kernel_id:
179
+ return None
180
+
181
+ # Built-in notebook server in VS Code
182
+ try:
183
+ from IPython import get_ipython
184
+
185
+ ipython = get_ipython()
186
+ notebook_path = ipython.kernel.shell.user_ns.get("__vsc_ipynb_file__")
187
+ if notebook_path:
188
+ return {
189
+ "root": os.path.dirname(notebook_path),
190
+ "path": notebook_path,
191
+ "name": os.path.basename(notebook_path),
192
+ }
193
+ except Exception:
194
+ return None
180
195
 
181
196
 
182
197
  def notebook_metadata(silent: bool) -> Dict[str, str]: