wandb 0.18.6__py3-none-any.whl → 0.19.0rc1__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
Files changed (119) hide show
  1. package_readme.md +8 -0
  2. wandb/__init__.py +5 -7
  3. wandb/__init__.pyi +51 -30
  4. wandb/analytics/sentry.py +4 -10
  5. wandb/apis/importers/internals/internal.py +6 -6
  6. wandb/apis/importers/internals/protocols.py +11 -7
  7. wandb/apis/public/api.py +5 -1
  8. wandb/apis/public/jobs.py +1 -7
  9. wandb/apis/public/reports.py +6 -17
  10. wandb/apis/public/runs.py +12 -10
  11. wandb/bin/gpu_stats +0 -0
  12. wandb/cli/cli.py +9 -45
  13. wandb/env.py +3 -5
  14. wandb/errors/links.py +1 -1
  15. wandb/errors/term.py +1 -6
  16. wandb/filesync/dir_watcher.py +3 -3
  17. wandb/filesync/step_upload.py +2 -5
  18. wandb/integration/fastai/__init__.py +1 -6
  19. wandb/integration/gym/__init__.py +1 -7
  20. wandb/integration/keras/callbacks/metrics_logger.py +1 -8
  21. wandb/integration/keras/callbacks/model_checkpoint.py +1 -8
  22. wandb/integration/keras/keras.py +3 -5
  23. wandb/integration/lightgbm/__init__.py +1 -1
  24. wandb/integration/sb3/sb3.py +1 -7
  25. wandb/integration/sklearn/utils.py +1 -1
  26. wandb/integration/tensorboard/log.py +1 -2
  27. wandb/integration/torch/wandb_torch.py +1 -1
  28. wandb/integration/ultralytics/bbox_utils.py +9 -2
  29. wandb/jupyter.py +4 -4
  30. wandb/proto/v3/wandb_internal_pb2.py +31 -31
  31. wandb/proto/v3/wandb_settings_pb2.py +2 -2
  32. wandb/proto/v3/wandb_telemetry_pb2.py +4 -4
  33. wandb/proto/v4/wandb_internal_pb2.py +31 -31
  34. wandb/proto/v4/wandb_settings_pb2.py +2 -2
  35. wandb/proto/v4/wandb_telemetry_pb2.py +4 -4
  36. wandb/proto/v5/wandb_internal_pb2.py +31 -31
  37. wandb/proto/v5/wandb_settings_pb2.py +2 -2
  38. wandb/proto/v5/wandb_telemetry_pb2.py +4 -4
  39. wandb/proto/wandb_deprecated.py +3 -11
  40. wandb/proto/wandb_generate_deprecated.py +3 -7
  41. wandb/sdk/artifacts/artifact.py +3 -11
  42. wandb/sdk/artifacts/artifact_file_cache.py +2 -5
  43. wandb/sdk/artifacts/artifact_saver.py +2 -6
  44. wandb/sdk/artifacts/storage_handlers/gcs_handler.py +2 -4
  45. wandb/sdk/artifacts/storage_handlers/local_file_handler.py +2 -4
  46. wandb/sdk/artifacts/storage_handlers/s3_handler.py +2 -4
  47. wandb/sdk/backend/backend.py +1 -1
  48. wandb/sdk/data_types/base_types/wb_value.py +20 -10
  49. wandb/sdk/data_types/histogram.py +1 -3
  50. wandb/sdk/data_types/object_3d.py +2 -6
  51. wandb/sdk/data_types/table.py +1 -1
  52. wandb/sdk/data_types/utils.py +1 -2
  53. wandb/sdk/data_types/video.py +15 -4
  54. wandb/sdk/integration_utils/auto_logging.py +1 -8
  55. wandb/sdk/interface/interface.py +12 -5
  56. wandb/sdk/interface/interface_queue.py +0 -6
  57. wandb/sdk/interface/interface_shared.py +9 -0
  58. wandb/sdk/interface/router.py +1 -2
  59. wandb/sdk/interface/router_queue.py +0 -3
  60. wandb/sdk/interface/router_relay.py +0 -2
  61. wandb/sdk/internal/file_stream.py +1 -4
  62. wandb/sdk/internal/flow_control.py +1 -1
  63. wandb/sdk/internal/handler.py +8 -5
  64. wandb/sdk/internal/internal.py +3 -17
  65. wandb/sdk/internal/internal_api.py +3 -10
  66. wandb/sdk/internal/internal_util.py +0 -3
  67. wandb/sdk/internal/job_builder.py +20 -12
  68. wandb/sdk/internal/progress.py +1 -5
  69. wandb/sdk/internal/sender.py +9 -15
  70. wandb/sdk/internal/settings_static.py +4 -10
  71. wandb/sdk/internal/system/assets/cpu.py +2 -2
  72. wandb/sdk/internal/system/assets/disk.py +3 -3
  73. wandb/sdk/internal/system/assets/gpu.py +7 -7
  74. wandb/sdk/internal/system/assets/gpu_amd.py +1 -7
  75. wandb/sdk/internal/system/assets/interfaces.py +11 -13
  76. wandb/sdk/internal/system/assets/ipu.py +1 -1
  77. wandb/sdk/internal/system/assets/memory.py +2 -2
  78. wandb/sdk/internal/system/assets/open_metrics.py +2 -8
  79. wandb/sdk/internal/system/assets/trainium.py +3 -9
  80. wandb/sdk/internal/system/system_info.py +14 -13
  81. wandb/sdk/internal/system/system_monitor.py +5 -12
  82. wandb/sdk/internal/tb_watcher.py +1 -1
  83. wandb/sdk/internal/writer.py +2 -4
  84. wandb/sdk/launch/__init__.py +2 -1
  85. wandb/sdk/launch/agent/run_queue_item_file_saver.py +1 -7
  86. wandb/sdk/launch/create_job.py +2 -3
  87. wandb/sdk/launch/runner/abstract.py +1 -6
  88. wandb/sdk/launch/runner/kubernetes_monitor.py +2 -4
  89. wandb/sdk/lib/apikey.py +2 -6
  90. wandb/sdk/lib/fsm.py +12 -6
  91. wandb/sdk/lib/ipython.py +1 -6
  92. wandb/sdk/lib/module.py +0 -3
  93. wandb/sdk/lib/progress.py +2 -3
  94. wandb/sdk/lib/run_moment.py +1 -7
  95. wandb/sdk/lib/server.py +10 -24
  96. wandb/sdk/lib/sock_client.py +0 -5
  97. wandb/sdk/service/server.py +3 -12
  98. wandb/sdk/service/server_sock.py +0 -2
  99. wandb/sdk/service/service.py +5 -5
  100. wandb/sdk/wandb_init.py +215 -166
  101. wandb/sdk/wandb_login.py +17 -27
  102. wandb/sdk/wandb_run.py +129 -161
  103. wandb/sdk/wandb_settings.py +978 -1760
  104. wandb/sdk/wandb_setup.py +87 -94
  105. wandb/sdk/wandb_watch.py +1 -1
  106. wandb/sync/sync.py +1 -2
  107. wandb/util.py +7 -40
  108. wandb/wandb_controller.py +10 -12
  109. {wandb-0.18.6.dist-info → wandb-0.19.0rc1.dist-info}/METADATA +13 -4
  110. {wandb-0.18.6.dist-info → wandb-0.19.0rc1.dist-info}/RECORD +113 -119
  111. {wandb-0.18.6.dist-info → wandb-0.19.0rc1.dist-info}/WHEEL +1 -1
  112. wandb/integration/magic.py +0 -556
  113. wandb/magic.py +0 -3
  114. wandb/sdk/lib/_settings_toposort_generate.py +0 -159
  115. wandb/sdk/lib/_settings_toposort_generated.py +0 -250
  116. wandb/sdk/lib/reporting.py +0 -99
  117. wandb/sdk/lib/tracelog.py +0 -255
  118. {wandb-0.18.6.dist-info → wandb-0.19.0rc1.dist-info}/entry_points.txt +0 -0
  119. {wandb-0.18.6.dist-info → wandb-0.19.0rc1.dist-info}/licenses/LICENSE +0 -0
wandb/sdk/wandb_login.py CHANGED
@@ -5,13 +5,7 @@ This authenticates your machine to log data to your account.
5
5
 
6
6
  import enum
7
7
  import os
8
- import sys
9
- from typing import Optional, Tuple
10
-
11
- if sys.version_info >= (3, 8):
12
- from typing import Literal
13
- else:
14
- from typing_extensions import Literal
8
+ from typing import Literal, Optional, Tuple
15
9
 
16
10
  import click
17
11
 
@@ -124,7 +118,7 @@ class _WandbLogin:
124
118
  def setup(
125
119
  self,
126
120
  *,
127
- anonymous: Optional[Literal["must", "allow", "never"]] = None,
121
+ anonymous: Optional[Literal["allow", "must", "never"]] = None,
128
122
  key: Optional[str] = None,
129
123
  relogin: Optional[bool] = None,
130
124
  host: Optional[str] = None,
@@ -134,23 +128,20 @@ class _WandbLogin:
134
128
  """Updates login-related settings on the global setup object."""
135
129
  self._relogin = relogin
136
130
 
137
- # built up login settings
138
- login_settings: Settings = wandb.Settings()
139
- logger = wandb.setup()._get_logger()
140
-
141
- login_settings._apply_login(
142
- {
143
- "anonymous": anonymous,
144
- "key": key,
145
- "host": host,
146
- "force": force,
147
- "timeout": timeout,
148
- },
149
- _logger=logger,
150
- )
131
+ login_settings = {
132
+ "anonymous": anonymous,
133
+ "api_key": key,
134
+ "base_url": host,
135
+ "force": force,
136
+ "login_timeout": timeout,
137
+ }
151
138
 
152
139
  # make sure they are applied globally
153
- self._wl = wandb.setup(settings=login_settings)
140
+ self._wl = wandb.setup(
141
+ settings=wandb.Settings(
142
+ **{k: v for k, v in login_settings.items() if v is not None}
143
+ )
144
+ )
154
145
  self._settings = self._wl.settings
155
146
 
156
147
  def is_apikey_configured(self) -> bool:
@@ -232,7 +223,6 @@ class _WandbLogin:
232
223
 
233
224
  If we're online, this also pulls in user settings from the server.
234
225
  """
235
- _logger = wandb.setup()._get_logger()
236
226
  login_settings = dict()
237
227
  if status == ApiKeyStatus.OFFLINE:
238
228
  login_settings = dict(mode="offline")
@@ -240,7 +230,7 @@ class _WandbLogin:
240
230
  login_settings = dict(mode="disabled")
241
231
  elif key:
242
232
  login_settings = dict(api_key=key)
243
- self._wl._settings._apply_login(login_settings, _logger=_logger)
233
+ self._wl._settings.update_from_dict(login_settings)
244
234
  # Whenever the key changes, make sure to pull in user settings
245
235
  # from server.
246
236
  if not self._wl.settings._offline:
@@ -275,7 +265,7 @@ class _WandbLogin:
275
265
  if status == ApiKeyStatus.NOTTY:
276
266
  directive = (
277
267
  "wandb login [your_api_key]"
278
- if self._settings._cli_only_mode
268
+ if self._settings.x_cli_only_mode
279
269
  else "wandb.login(key=[your_api_key])"
280
270
  )
281
271
  raise UsageError("api_key not configured (no-tty). call " + directive)
@@ -286,7 +276,7 @@ class _WandbLogin:
286
276
 
287
277
  def _login(
288
278
  *,
289
- anonymous: Optional[Literal["must", "allow", "never"]] = None,
279
+ anonymous: Optional[Literal["allow", "must", "never"]] = None,
290
280
  key: Optional[str] = None,
291
281
  relogin: Optional[bool] = None,
292
282
  host: Optional[str] = None,