wandb 0.18.5__py3-none-win_amd64.whl → 0.18.6__py3-none-win_amd64.whl

Sign up to get free protection for your applications and to get access to all the features.
Files changed (129) hide show
  1. wandb/__init__.py +2 -2
  2. wandb/__init__.pyi +21 -19
  3. wandb/agents/pyagent.py +1 -1
  4. wandb/apis/importers/wandb.py +1 -1
  5. wandb/apis/normalize.py +2 -18
  6. wandb/apis/public/api.py +122 -62
  7. wandb/apis/public/artifacts.py +8 -3
  8. wandb/apis/public/files.py +17 -2
  9. wandb/apis/public/jobs.py +2 -2
  10. wandb/apis/public/query_generator.py +1 -1
  11. wandb/apis/public/runs.py +8 -8
  12. wandb/apis/public/teams.py +3 -3
  13. wandb/apis/public/users.py +1 -1
  14. wandb/apis/public/utils.py +68 -0
  15. wandb/bin/gpu_stats.exe +0 -0
  16. wandb/bin/wandb-core +0 -0
  17. wandb/cli/cli.py +12 -3
  18. wandb/data_types.py +1 -1
  19. wandb/docker/__init__.py +2 -1
  20. wandb/docker/auth.py +2 -3
  21. wandb/errors/links.py +73 -0
  22. wandb/errors/term.py +7 -6
  23. wandb/filesync/step_prepare.py +1 -1
  24. wandb/filesync/upload_job.py +1 -1
  25. wandb/integration/catboost/catboost.py +2 -2
  26. wandb/integration/diffusers/pipeline_resolver.py +1 -1
  27. wandb/integration/diffusers/resolvers/multimodal.py +6 -6
  28. wandb/integration/diffusers/resolvers/utils.py +1 -1
  29. wandb/integration/fastai/__init__.py +3 -2
  30. wandb/integration/keras/callbacks/metrics_logger.py +1 -1
  31. wandb/integration/keras/callbacks/model_checkpoint.py +1 -1
  32. wandb/integration/keras/keras.py +1 -1
  33. wandb/integration/kfp/kfp_patch.py +1 -1
  34. wandb/integration/lightgbm/__init__.py +2 -2
  35. wandb/integration/magic.py +2 -2
  36. wandb/integration/metaflow/metaflow.py +1 -1
  37. wandb/integration/sacred/__init__.py +1 -1
  38. wandb/integration/sagemaker/auth.py +1 -1
  39. wandb/integration/sklearn/plot/classifier.py +7 -7
  40. wandb/integration/sklearn/plot/clusterer.py +3 -3
  41. wandb/integration/sklearn/plot/regressor.py +3 -3
  42. wandb/integration/sklearn/plot/shared.py +2 -2
  43. wandb/integration/tensorboard/log.py +2 -2
  44. wandb/integration/ultralytics/callback.py +2 -2
  45. wandb/integration/xgboost/xgboost.py +1 -1
  46. wandb/jupyter.py +0 -1
  47. wandb/plot/__init__.py +17 -8
  48. wandb/plot/bar.py +53 -27
  49. wandb/plot/confusion_matrix.py +151 -70
  50. wandb/plot/custom_chart.py +124 -0
  51. wandb/plot/histogram.py +46 -20
  52. wandb/plot/line.py +57 -26
  53. wandb/plot/line_series.py +148 -60
  54. wandb/plot/pr_curve.py +89 -44
  55. wandb/plot/roc_curve.py +82 -37
  56. wandb/plot/scatter.py +53 -20
  57. wandb/plot/viz.py +20 -102
  58. wandb/sdk/artifacts/artifact.py +280 -328
  59. wandb/sdk/artifacts/artifact_manifest.py +10 -9
  60. wandb/sdk/artifacts/artifact_manifest_entry.py +1 -1
  61. wandb/sdk/artifacts/storage_handlers/azure_handler.py +9 -4
  62. wandb/sdk/artifacts/storage_handlers/gcs_handler.py +1 -3
  63. wandb/sdk/artifacts/storage_handlers/s3_handler.py +1 -1
  64. wandb/sdk/artifacts/storage_handlers/wb_artifact_handler.py +2 -2
  65. wandb/sdk/artifacts/storage_handlers/wb_local_artifact_handler.py +1 -1
  66. wandb/sdk/backend/backend.py +0 -1
  67. wandb/sdk/data_types/audio.py +1 -1
  68. wandb/sdk/data_types/base_types/media.py +66 -5
  69. wandb/sdk/data_types/bokeh.py +1 -1
  70. wandb/sdk/data_types/helper_types/bounding_boxes_2d.py +1 -1
  71. wandb/sdk/data_types/helper_types/image_mask.py +2 -2
  72. wandb/sdk/data_types/histogram.py +1 -1
  73. wandb/sdk/data_types/html.py +1 -1
  74. wandb/sdk/data_types/image.py +1 -1
  75. wandb/sdk/data_types/molecule.py +3 -3
  76. wandb/sdk/data_types/object_3d.py +4 -4
  77. wandb/sdk/data_types/plotly.py +1 -1
  78. wandb/sdk/data_types/saved_model.py +0 -1
  79. wandb/sdk/data_types/table.py +7 -7
  80. wandb/sdk/data_types/trace_tree.py +1 -1
  81. wandb/sdk/data_types/video.py +4 -3
  82. wandb/sdk/interface/router.py +0 -2
  83. wandb/sdk/internal/datastore.py +1 -1
  84. wandb/sdk/internal/file_pusher.py +1 -1
  85. wandb/sdk/internal/file_stream.py +4 -4
  86. wandb/sdk/internal/handler.py +3 -2
  87. wandb/sdk/internal/internal.py +1 -1
  88. wandb/sdk/internal/internal_api.py +178 -63
  89. wandb/sdk/internal/job_builder.py +4 -3
  90. wandb/sdk/internal/system/assets/__init__.py +0 -2
  91. wandb/sdk/internal/tb_watcher.py +11 -10
  92. wandb/sdk/launch/_launch.py +4 -3
  93. wandb/sdk/launch/_launch_add.py +2 -2
  94. wandb/sdk/launch/builder/kaniko_builder.py +0 -1
  95. wandb/sdk/launch/create_job.py +1 -0
  96. wandb/sdk/launch/environment/local_environment.py +0 -1
  97. wandb/sdk/launch/errors.py +0 -6
  98. wandb/sdk/launch/registry/local_registry.py +0 -2
  99. wandb/sdk/launch/runner/abstract.py +0 -5
  100. wandb/sdk/launch/sweeps/__init__.py +0 -2
  101. wandb/sdk/launch/sweeps/scheduler.py +0 -2
  102. wandb/sdk/launch/sweeps/scheduler_sweep.py +0 -1
  103. wandb/sdk/lib/apikey.py +3 -3
  104. wandb/sdk/lib/file_stream_utils.py +1 -1
  105. wandb/sdk/lib/filesystem.py +1 -1
  106. wandb/sdk/lib/ipython.py +16 -9
  107. wandb/sdk/lib/mailbox.py +0 -4
  108. wandb/sdk/lib/printer.py +44 -8
  109. wandb/sdk/lib/retry.py +1 -1
  110. wandb/sdk/service/service.py +3 -3
  111. wandb/sdk/service/streams.py +2 -4
  112. wandb/sdk/wandb_init.py +20 -20
  113. wandb/sdk/wandb_login.py +1 -1
  114. wandb/sdk/wandb_require.py +1 -4
  115. wandb/sdk/wandb_run.py +57 -69
  116. wandb/sdk/wandb_settings.py +3 -4
  117. wandb/sdk/wandb_sync.py +2 -1
  118. wandb/util.py +46 -18
  119. wandb/wandb_agent.py +3 -3
  120. wandb/wandb_controller.py +2 -2
  121. {wandb-0.18.5.dist-info → wandb-0.18.6.dist-info}/METADATA +1 -1
  122. {wandb-0.18.5.dist-info → wandb-0.18.6.dist-info}/RECORD +125 -126
  123. wandb/sdk/internal/system/assets/gpu_apple.py +0 -177
  124. wandb/sdk/lib/_wburls_generate.py +0 -25
  125. wandb/sdk/lib/_wburls_generated.py +0 -22
  126. wandb/sdk/lib/wburls.py +0 -46
  127. {wandb-0.18.5.dist-info → wandb-0.18.6.dist-info}/WHEEL +0 -0
  128. {wandb-0.18.5.dist-info → wandb-0.18.6.dist-info}/entry_points.txt +0 -0
  129. {wandb-0.18.5.dist-info → wandb-0.18.6.dist-info}/licenses/LICENSE +0 -0
@@ -82,7 +82,6 @@ class AbstractRun(ABC):
82
82
  @abstractmethod
83
83
  async def get_logs(self) -> Optional[str]:
84
84
  """Return the logs associated with the run."""
85
- pass
86
85
 
87
86
  def _run_cmd(
88
87
  self, cmd: List[str], output_only: Optional[bool] = False
@@ -111,12 +110,10 @@ class AbstractRun(ABC):
111
110
 
112
111
  Note that in some cases, we may wait until the remote job completes rather than until the W&B run completes.
113
112
  """
114
- pass
115
113
 
116
114
  @abstractmethod
117
115
  async def get_status(self) -> Status:
118
116
  """Get status of the run."""
119
- pass
120
117
 
121
118
  @abstractmethod
122
119
  async def cancel(self) -> None:
@@ -125,7 +122,6 @@ class AbstractRun(ABC):
125
122
  Cancels the run and waits for it to terminate. The W&B run status may not be
126
123
  set correctly upon run cancellation.
127
124
  """
128
- pass
129
125
 
130
126
  @property
131
127
  @abstractmethod
@@ -192,4 +188,3 @@ class AbstractRunner(ABC):
192
188
  the project asynchronously, i.e. it should trigger project execution and then
193
189
  immediately return a `SubmittedRun` to track execution status.
194
190
  """
195
- pass
@@ -7,8 +7,6 @@ log = logging.getLogger(__name__)
7
7
  class SchedulerError(Exception):
8
8
  """Raised when a known error occurs with wandb sweep scheduler."""
9
9
 
10
- pass
11
-
12
10
 
13
11
  def _import_sweep_scheduler() -> Any:
14
12
  from .scheduler_sweep import SweepScheduler
@@ -183,12 +183,10 @@ class Scheduler(ABC):
183
183
  @abstractmethod
184
184
  def _get_next_sweep_run(self, worker_id: int) -> Optional[SweepRun]:
185
185
  """Called when worker available."""
186
- pass
187
186
 
188
187
  @abstractmethod
189
188
  def _poll(self) -> None:
190
189
  """Called every polling loop."""
191
- pass
192
190
 
193
191
  @abstractmethod
194
192
  def _exit(self) -> None:
@@ -82,7 +82,6 @@ class SweepScheduler(Scheduler):
82
82
 
83
83
  def _poll(self) -> None:
84
84
  _logger.debug(f"_poll. _runs: {self._runs}")
85
- pass
86
85
 
87
86
  def _load_state(self) -> None:
88
87
  pass
wandb/sdk/lib/apikey.py CHANGED
@@ -21,10 +21,9 @@ from requests.utils import NETRC_FILES, get_netrc_auth
21
21
  import wandb
22
22
  from wandb.apis import InternalApi
23
23
  from wandb.errors import term
24
+ from wandb.errors.links import url_registry
24
25
  from wandb.util import _is_databricks, isatty, prompt_choices
25
26
 
26
- from .wburls import wburls
27
-
28
27
  LOGIN_CHOICE_ANON = "Private W&B dashboard, no account required"
29
28
  LOGIN_CHOICE_NEW = "Create a W&B account"
30
29
  LOGIN_CHOICE_EXISTS = "Use an existing W&B account"
@@ -156,7 +155,8 @@ def prompt_api_key( # noqa: C901
156
155
  if app_url.startswith(prefix):
157
156
  host = app_url[len(prefix) :]
158
157
  wandb.termlog(
159
- f"Logging into {host}. (Learn how to deploy a W&B server locally: {wburls.get('wandb_server')})"
158
+ f"Logging into {host}. (Learn how to deploy a W&B server "
159
+ f"locally: {url_registry.url('wandb-server')})"
160
160
  )
161
161
  wandb.termlog(
162
162
  f"You can find your API key in your browser here: {app_url}/authorize"
@@ -12,7 +12,7 @@ def split_files(
12
12
  This method is used in `FileStreamAPI._send()` to limit the size of post requests
13
13
  sent to wandb server.
14
14
 
15
- Arguments:
15
+ Args:
16
16
  files (dict): `dict` of form {file_name: {'content': ".....", 'offset': 0}}
17
17
  The key `file_name` can also be mapped to a List [{"offset": int, "content": str}]
18
18
  `max_bytes`: max size for chunk in bytes
@@ -16,7 +16,7 @@ from wandb.sdk.lib.paths import StrPath
16
16
  logger = logging.getLogger(__name__)
17
17
 
18
18
  # https://en.wikipedia.org/wiki/Filename#Comparison_of_filename_limitations
19
- PROBLEMATIC_PATH_CHARS = "".join(chr(i) for i in range(0, 32)) + ':"*<>?|'
19
+ PROBLEMATIC_PATH_CHARS = "".join(chr(i) for i in range(32)) + ':"*<>?|'
20
20
 
21
21
 
22
22
  def mkdir_exists_ok(dir_name: StrPath) -> None:
wandb/sdk/lib/ipython.py CHANGED
@@ -15,16 +15,16 @@ PythonType = Literal["python", "ipython", "jupyter"]
15
15
  logger = logging.getLogger(__name__)
16
16
 
17
17
 
18
- TABLE_STYLES = """<style>
19
- table.wandb td:nth-child(1) { padding: 0 10px; text-align: left ; width: auto;} td:nth-child(2) {text-align: left ; width: 100%}
20
- .wandb-row { display: flex; flex-direction: row; flex-wrap: wrap; justify-content: flex-start; width: 100% }
21
- .wandb-col { display: flex; flex-direction: column; flex-basis: 100%; flex: 1; padding: 10px; }
22
- </style>
23
- """
24
-
25
-
26
18
  def toggle_button(what="run"):
27
- return f"<button onClick=\"this.nextSibling.style.display='block';this.style.display='none';\">Display W&B {what}</button>"
19
+ """Returns the HTML for a button used to reveal the element following it.
20
+
21
+ The element immediately after the button must have `display: none`.
22
+ """
23
+ return (
24
+ "<button onClick=\"this.nextSibling.style.display='block';this.style.display='none';\">"
25
+ f"Display W&B {what}"
26
+ "</button>"
27
+ )
28
28
 
29
29
 
30
30
  def _get_python_type() -> PythonType:
@@ -62,10 +62,17 @@ def _get_python_type() -> PythonType:
62
62
 
63
63
 
64
64
  def in_jupyter() -> bool:
65
+ """Returns True if we're in a Jupyter notebook."""
65
66
  return _get_python_type() == "jupyter"
66
67
 
67
68
 
69
+ def in_ipython() -> bool:
70
+ """Returns True if we're running in IPython in the terminal."""
71
+ return _get_python_type() == "ipython"
72
+
73
+
68
74
  def in_notebook() -> bool:
75
+ """Returns True if we're running in Jupyter or IPython."""
69
76
  return _get_python_type() != "python"
70
77
 
71
78
 
wandb/sdk/lib/mailbox.py CHANGED
@@ -23,14 +23,10 @@ def _generate_address(length: int = 12) -> str:
23
23
  class MailboxError(Error):
24
24
  """Generic Mailbox Exception."""
25
25
 
26
- pass
27
-
28
26
 
29
27
  class ContextCancelledError(MailboxError):
30
28
  """Context cancelled Exception."""
31
29
 
32
- pass
33
-
34
30
 
35
31
  class _MailboxWaitAll:
36
32
  _event: threading.Event
wandb/sdk/lib/printer.py CHANGED
@@ -63,6 +63,48 @@ to form a subtle clockwise spinning animation.
63
63
  _PROGRESS_SYMBOL_COLOR = 0xB2
64
64
  """Color from the 256-color palette for the progress symbol."""
65
65
 
66
+ _JUPYTER_TABLE_STYLES = """
67
+ <style>
68
+ table.wandb td:nth-child(1) {
69
+ padding: 0 10px;
70
+ text-align: left;
71
+ width: auto;
72
+ }
73
+
74
+ table.wandb td:nth-child(2) {
75
+ text-align: left;
76
+ width: 100%;
77
+ }
78
+ </style>
79
+ """
80
+
81
+ _JUPYTER_PANEL_STYLES = """
82
+ <style>
83
+ .wandb-row {
84
+ display: flex;
85
+ flex-direction: row;
86
+ flex-wrap: wrap;
87
+ justify-content: flex-start;
88
+ width: 100%;
89
+ }
90
+ .wandb-col {
91
+ display: flex;
92
+ flex-direction: column;
93
+ flex-basis: 100%;
94
+ flex: 1;
95
+ padding: 10px;
96
+ }
97
+ </style>
98
+ """
99
+
100
+
101
+ def new_printer() -> Printer:
102
+ """Returns a new printer based on the environment we're in."""
103
+ if ipython.in_jupyter():
104
+ return _PrinterJupyter()
105
+ else:
106
+ return _PrinterTerm()
107
+
66
108
 
67
109
  class Printer(abc.ABC):
68
110
  """An object that shows styled text to the user."""
@@ -485,15 +527,9 @@ class _PrinterJupyter(Printer):
485
527
  grid = f'<table class="wandb">{grid}</table>'
486
528
  if title:
487
529
  return f"<h3>{title}</h3><br/>{grid}<br/>"
488
- return f"{grid}<br/>"
530
+ return f"{_JUPYTER_TABLE_STYLES}{grid}<br/>"
489
531
 
490
532
  @override
491
533
  def panel(self, columns: list[str]) -> str:
492
534
  row = "".join([f'<div class="wandb-col">{col}</div>' for col in columns])
493
- return f'{ipython.TABLE_STYLES}<div class="wandb-row">{row}</div>'
494
-
495
-
496
- def get_printer(jupyter: bool) -> Printer:
497
- if jupyter:
498
- return _PrinterJupyter()
499
- return _PrinterTerm()
535
+ return f'{_JUPYTER_PANEL_STYLES}<div class="wandb-row">{row}</div>'
wandb/sdk/lib/retry.py CHANGED
@@ -94,7 +94,7 @@ class Retry(Generic[_R]):
94
94
  def __call__(self, *args: Any, **kwargs: Any) -> _R: # noqa: C901
95
95
  """Call the wrapped function, with retries.
96
96
 
97
- Arguments:
97
+ Args:
98
98
  retry_timedelta (kwarg): amount of time to retry before giving up.
99
99
  sleep_base (kwarg): amount of time to sleep upon first failure, all other sleeps
100
100
  are derived from this one.
@@ -17,7 +17,7 @@ from typing import TYPE_CHECKING, Any, Dict, Optional
17
17
  from wandb import _sentry, termlog
18
18
  from wandb.env import core_debug, error_reporting_enabled, is_require_legacy_service
19
19
  from wandb.errors import Error, WandbCoreNotAvailableError
20
- from wandb.sdk.lib.wburls import wburls
20
+ from wandb.errors.links import url_registry
21
21
  from wandb.util import get_core_path, get_module
22
22
 
23
23
  from . import _startup_debug, port_file
@@ -164,8 +164,8 @@ class _Service:
164
164
 
165
165
  exec_cmd_list = []
166
166
  termlog(
167
- "Using wandb-core as the SDK backend."
168
- f" Please refer to {wburls.get('wandb_core')} for more information.",
167
+ "Using wandb-core as the SDK backend. Please refer to "
168
+ f"{url_registry.url('wandb-core')} for more information.",
169
169
  repeat=False,
170
170
  )
171
171
  else:
@@ -20,6 +20,7 @@ import wandb
20
20
  import wandb.util
21
21
  from wandb.proto import wandb_internal_pb2 as pb
22
22
  from wandb.sdk.internal.settings_static import SettingsStatic
23
+ from wandb.sdk.lib import printer as printerlib
23
24
  from wandb.sdk.lib import progress
24
25
  from wandb.sdk.lib.mailbox import (
25
26
  Mailbox,
@@ -27,7 +28,6 @@ from wandb.sdk.lib.mailbox import (
27
28
  MailboxProgress,
28
29
  MailboxProgressAll,
29
30
  )
30
- from wandb.sdk.lib.printer import get_printer
31
31
  from wandb.sdk.wandb_run import Run
32
32
 
33
33
  from ..interface.interface_relay import InterfaceRelay
@@ -285,9 +285,7 @@ class StreamMux:
285
285
  if not streams:
286
286
  return
287
287
 
288
- printer = get_printer(
289
- all(stream._settings._jupyter for stream in streams.values())
290
- )
288
+ printer = printerlib.new_printer()
291
289
 
292
290
  # fixme: for now we have a single printer for all streams,
293
291
  # and jupyter is disabled if at least single stream's setting set `_jupyter` to false
wandb/sdk/wandb_init.py CHANGED
@@ -24,6 +24,7 @@ import wandb
24
24
  import wandb.env
25
25
  from wandb import trigger
26
26
  from wandb.errors import CommError, Error, UsageError
27
+ from wandb.errors.links import url_registry
27
28
  from wandb.errors.util import ProtobufErrorHandler
28
29
  from wandb.integration import sagemaker
29
30
  from wandb.integration.magic import magic_install
@@ -33,11 +34,17 @@ from wandb.util import _is_artifact_representation
33
34
 
34
35
  from . import wandb_login, wandb_setup
35
36
  from .backend.backend import Backend
36
- from .lib import SummaryDisabled, filesystem, ipython, module, reporting, telemetry
37
+ from .lib import (
38
+ SummaryDisabled,
39
+ filesystem,
40
+ ipython,
41
+ module,
42
+ printer,
43
+ reporting,
44
+ telemetry,
45
+ )
37
46
  from .lib.deprecate import Deprecated, deprecate
38
47
  from .lib.mailbox import Mailbox, MailboxProgress
39
- from .lib.printer import Printer, get_printer
40
- from .lib.wburls import wburls
41
48
  from .wandb_helper import parse_config
42
49
  from .wandb_run import Run, TeardownHook, TeardownStage
43
50
  from .wandb_settings import Settings, Source
@@ -125,17 +132,12 @@ class _WandbInit:
125
132
  self._wl: wandb_setup._WandbSetup | None = None
126
133
  self._reporter: wandb.sdk.lib.reporting.Reporter | None = None
127
134
  self.notebook: wandb.jupyter.Notebook | None = None # type: ignore
128
- self.printer: Printer | None = None
135
+ self.printer = printer.new_printer()
129
136
 
130
137
  self._init_telemetry_obj = telemetry.TelemetryRecord()
131
138
 
132
139
  self.deprecated_features_used: dict[str, str] = dict()
133
140
 
134
- def _setup_printer(self, settings: Settings) -> None:
135
- if self.printer:
136
- return
137
- self.printer = get_printer(settings._jupyter)
138
-
139
141
  def setup(self, kwargs: Any) -> None: # noqa: C901
140
142
  """Complete setup for `wandb.init()`.
141
143
 
@@ -148,8 +150,6 @@ class _WandbInit:
148
150
  # in between, they will be ignored, which we need to inform the user about.
149
151
  singleton = wandb_setup._WandbSetup._instance
150
152
  if singleton is not None:
151
- self._setup_printer(settings=singleton._settings)
152
- assert self.printer
153
153
  exclude_env_vars = {"WANDB_SERVICE", "WANDB_KUBEFLOW_URL"}
154
154
  # check if environment variables have changed
155
155
  singleton_env = {
@@ -170,7 +170,7 @@ class _WandbInit:
170
170
  "because your `wandb` session has already started. "
171
171
  "For more information on how to modify your settings with "
172
172
  "`wandb.init()` arguments, please refer to "
173
- f"{self.printer.link(wburls.get('wandb_init'), 'the W&B docs')}."
173
+ f"{self.printer.link(url_registry.url('wandb-init'), 'the W&B docs')}."
174
174
  )
175
175
  self.printer.display(line, level="warn")
176
176
 
@@ -202,7 +202,6 @@ class _WandbInit:
202
202
  if settings_param is not None and isinstance(settings_param, (Settings, dict)):
203
203
  settings.update(settings_param, source=Source.INIT)
204
204
 
205
- self._setup_printer(settings)
206
205
  self._reporter = reporting.setup_reporter(settings=settings)
207
206
 
208
207
  sagemaker_config: dict = (
@@ -610,7 +609,6 @@ class _WandbInit:
610
609
  return drun
611
610
 
612
611
  def _on_progress_init(self, handle: MailboxProgress) -> None:
613
- assert self.printer
614
612
  line = "Waiting for wandb.init()...\r"
615
613
  percent_done = handle.percent_done
616
614
  self.printer.progress_update(line, percent_done=percent_done)
@@ -827,7 +825,8 @@ class _WandbInit:
827
825
  if run_result is None:
828
826
  error_message = (
829
827
  f"Run initialization has timed out after {timeout} sec. "
830
- f"\nPlease refer to the documentation for additional information: {wburls.get('doc_start_err')}"
828
+ "Please try increasing the timeout with the `init_timeout` setting: "
829
+ "`wandb.init(settings=wandb.Settings(init_timeout=120))`."
831
830
  )
832
831
  # We're not certain whether the error we encountered is due to an issue
833
832
  # with the server (a "CommError") or if it's a problem within the SDK (an "Error").
@@ -851,7 +850,8 @@ class _WandbInit:
851
850
 
852
851
  if not run_result.HasField("run"):
853
852
  raise Error(
854
- "It appears that something have gone wrong during the program execution as an unexpected missing field was encountered. "
853
+ "It appears that something have gone wrong during the program "
854
+ "execution as an unexpected missing field was encountered. "
855
855
  "(run_result is missing the 'run' field)"
856
856
  )
857
857
 
@@ -920,7 +920,7 @@ def _attach(
920
920
  ) -> Run | None:
921
921
  """Attach to a run currently executing in another process/thread.
922
922
 
923
- Arguments:
923
+ Args:
924
924
  attach_id: (str, optional) The id of the run or an attach identifier
925
925
  that maps to a run.
926
926
  run_id: (str, optional) The id of the run to attach to.
@@ -1064,7 +1064,7 @@ def init(
1064
1064
  For more on using `wandb.init()`, including detailed examples, check out our
1065
1065
  [guide and FAQs](https://docs.wandb.ai/guides/track/launch).
1066
1066
 
1067
- Arguments:
1067
+ Args:
1068
1068
  project: (str, optional) The name of the project where you're sending
1069
1069
  the new run. If the project is not specified, we will try to infer
1070
1070
  the project name from git root or the current program file. If we
@@ -1187,11 +1187,11 @@ def init(
1187
1187
  for saving hyperparameters to compare across runs. The ID cannot
1188
1188
  contain the following special characters: `/\#?%:`.
1189
1189
  See [our guide to resuming runs](https://docs.wandb.com/guides/runs/resuming).
1190
- fork_from: (str, optional) A string with the format {run_id}?_step={step} describing
1190
+ fork_from: (str, optional) A string with the format `{run_id}?_step={step}` describing
1191
1191
  a moment in a previous run to fork a new run from. Creates a new run that picks up
1192
1192
  logging history from the specified run at the specified moment. The target run must
1193
1193
  be in the current project. Example: `fork_from="my-run-id?_step=1234"`.
1194
- resume_from: (str, optional) A string with the format {run_id}?_step={step} describing
1194
+ resume_from: (str, optional) A string with the format `{run_id}?_step={step}` describing
1195
1195
  a moment in a previous run to resume a run from. This allows users to truncate
1196
1196
  the history logged to a run at an intermediate step and resume logging from that step.
1197
1197
  It uses run forking under the hood. The target run must be in the
wandb/sdk/wandb_login.py CHANGED
@@ -58,7 +58,7 @@ def login(
58
58
  verifying them with the W&B server. To verify credentials, pass
59
59
  `verify=True`.
60
60
 
61
- Arguments:
61
+ Args:
62
62
  anonymous: (string, optional) Can be "must", "allow", or "never".
63
63
  If set to "must", always log a user in anonymously. If set to
64
64
  "allow", only create an anonymous user if the user
@@ -16,7 +16,6 @@ import wandb
16
16
  from wandb.env import _REQUIRE_LEGACY_SERVICE
17
17
  from wandb.errors import UnsupportedError
18
18
  from wandb.sdk import wandb_run
19
- from wandb.sdk.lib.wburls import wburls
20
19
 
21
20
 
22
21
  class _Requires:
@@ -63,9 +62,7 @@ class _Requires:
63
62
  func()
64
63
 
65
64
  if last_message:
66
- wandb.termerror(
67
- f"Supported wandb.require() features can be found at: {wburls.get('doc_require')}"
68
- )
65
+ wandb.termwarn("Supported requirements are: `legacy-service`, `service`.")
69
66
  raise UnsupportedError(last_message)
70
67
 
71
68