wandb 0.18.4__py3-none-any.whl → 0.18.6__py3-none-any.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 +2 -2
- wandb/__init__.pyi +21 -19
- wandb/agents/pyagent.py +1 -1
- wandb/apis/importers/wandb.py +1 -1
- wandb/apis/normalize.py +2 -18
- wandb/apis/public/api.py +122 -62
- wandb/apis/public/artifacts.py +8 -3
- wandb/apis/public/files.py +17 -2
- wandb/apis/public/jobs.py +2 -2
- wandb/apis/public/query_generator.py +1 -1
- wandb/apis/public/runs.py +8 -8
- wandb/apis/public/teams.py +3 -3
- wandb/apis/public/users.py +1 -1
- wandb/apis/public/utils.py +68 -0
- wandb/bin/gpu_stats +0 -0
- wandb/cli/cli.py +12 -3
- wandb/data_types.py +1 -1
- wandb/docker/__init__.py +2 -1
- wandb/docker/auth.py +2 -3
- wandb/errors/links.py +73 -0
- wandb/errors/term.py +7 -6
- wandb/filesync/step_prepare.py +1 -1
- wandb/filesync/upload_job.py +1 -1
- wandb/integration/catboost/catboost.py +2 -2
- wandb/integration/diffusers/pipeline_resolver.py +1 -1
- wandb/integration/diffusers/resolvers/multimodal.py +6 -6
- wandb/integration/diffusers/resolvers/utils.py +1 -1
- wandb/integration/fastai/__init__.py +3 -2
- wandb/integration/keras/callbacks/metrics_logger.py +1 -1
- wandb/integration/keras/callbacks/model_checkpoint.py +1 -1
- wandb/integration/keras/keras.py +1 -1
- wandb/integration/kfp/kfp_patch.py +1 -1
- wandb/integration/lightgbm/__init__.py +2 -2
- wandb/integration/magic.py +2 -2
- wandb/integration/metaflow/metaflow.py +1 -1
- wandb/integration/sacred/__init__.py +1 -1
- wandb/integration/sagemaker/auth.py +1 -1
- wandb/integration/sklearn/plot/classifier.py +7 -7
- wandb/integration/sklearn/plot/clusterer.py +3 -3
- wandb/integration/sklearn/plot/regressor.py +3 -3
- wandb/integration/sklearn/plot/shared.py +2 -2
- wandb/integration/tensorboard/log.py +2 -2
- wandb/integration/ultralytics/callback.py +2 -2
- wandb/integration/xgboost/xgboost.py +1 -1
- wandb/jupyter.py +0 -1
- wandb/plot/__init__.py +17 -8
- wandb/plot/bar.py +53 -27
- wandb/plot/confusion_matrix.py +151 -70
- wandb/plot/custom_chart.py +124 -0
- wandb/plot/histogram.py +46 -20
- wandb/plot/line.py +57 -26
- wandb/plot/line_series.py +148 -60
- wandb/plot/pr_curve.py +89 -44
- wandb/plot/roc_curve.py +82 -37
- wandb/plot/scatter.py +53 -20
- wandb/plot/viz.py +20 -102
- wandb/sdk/artifacts/artifact.py +280 -328
- wandb/sdk/artifacts/artifact_manifest.py +10 -9
- wandb/sdk/artifacts/artifact_manifest_entry.py +1 -1
- wandb/sdk/artifacts/storage_handlers/azure_handler.py +9 -4
- wandb/sdk/artifacts/storage_handlers/gcs_handler.py +1 -3
- wandb/sdk/artifacts/storage_handlers/s3_handler.py +1 -1
- wandb/sdk/artifacts/storage_handlers/wb_artifact_handler.py +2 -2
- wandb/sdk/artifacts/storage_handlers/wb_local_artifact_handler.py +1 -1
- wandb/sdk/backend/backend.py +0 -1
- wandb/sdk/data_types/audio.py +1 -1
- wandb/sdk/data_types/base_types/media.py +66 -5
- wandb/sdk/data_types/bokeh.py +1 -1
- wandb/sdk/data_types/helper_types/bounding_boxes_2d.py +1 -1
- wandb/sdk/data_types/helper_types/image_mask.py +2 -2
- wandb/sdk/data_types/histogram.py +1 -1
- wandb/sdk/data_types/html.py +1 -1
- wandb/sdk/data_types/image.py +1 -1
- wandb/sdk/data_types/molecule.py +3 -3
- wandb/sdk/data_types/object_3d.py +4 -4
- wandb/sdk/data_types/plotly.py +1 -1
- wandb/sdk/data_types/saved_model.py +0 -1
- wandb/sdk/data_types/table.py +7 -7
- wandb/sdk/data_types/trace_tree.py +1 -1
- wandb/sdk/data_types/video.py +4 -3
- wandb/sdk/interface/router.py +0 -2
- wandb/sdk/internal/datastore.py +1 -1
- wandb/sdk/internal/file_pusher.py +1 -1
- wandb/sdk/internal/file_stream.py +4 -4
- wandb/sdk/internal/handler.py +3 -2
- wandb/sdk/internal/internal.py +1 -1
- wandb/sdk/internal/internal_api.py +183 -64
- wandb/sdk/internal/job_builder.py +4 -3
- wandb/sdk/internal/system/assets/__init__.py +0 -2
- wandb/sdk/internal/tb_watcher.py +11 -10
- wandb/sdk/launch/_launch.py +4 -3
- wandb/sdk/launch/_launch_add.py +2 -2
- wandb/sdk/launch/builder/kaniko_builder.py +0 -1
- wandb/sdk/launch/create_job.py +1 -0
- wandb/sdk/launch/environment/local_environment.py +0 -1
- wandb/sdk/launch/errors.py +0 -6
- wandb/sdk/launch/registry/local_registry.py +0 -2
- wandb/sdk/launch/runner/abstract.py +0 -5
- wandb/sdk/launch/sweeps/__init__.py +0 -2
- wandb/sdk/launch/sweeps/scheduler.py +0 -2
- wandb/sdk/launch/sweeps/scheduler_sweep.py +0 -1
- wandb/sdk/lib/apikey.py +3 -3
- wandb/sdk/lib/file_stream_utils.py +1 -1
- wandb/sdk/lib/filesystem.py +1 -1
- wandb/sdk/lib/ipython.py +16 -9
- wandb/sdk/lib/mailbox.py +0 -4
- wandb/sdk/lib/printer.py +44 -8
- wandb/sdk/lib/retry.py +1 -1
- wandb/sdk/service/service.py +3 -3
- wandb/sdk/service/streams.py +2 -4
- wandb/sdk/wandb_init.py +20 -20
- wandb/sdk/wandb_login.py +1 -1
- wandb/sdk/wandb_require.py +1 -4
- wandb/sdk/wandb_run.py +57 -69
- wandb/sdk/wandb_settings.py +3 -4
- wandb/sdk/wandb_sync.py +2 -1
- wandb/util.py +46 -18
- wandb/wandb_agent.py +3 -3
- wandb/wandb_controller.py +2 -2
- {wandb-0.18.4.dist-info → wandb-0.18.6.dist-info}/METADATA +1 -1
- {wandb-0.18.4.dist-info → wandb-0.18.6.dist-info}/RECORD +124 -125
- wandb/sdk/internal/system/assets/gpu_apple.py +0 -177
- wandb/sdk/lib/_wburls_generate.py +0 -25
- wandb/sdk/lib/_wburls_generated.py +0 -22
- wandb/sdk/lib/wburls.py +0 -46
- {wandb-0.18.4.dist-info → wandb-0.18.6.dist-info}/WHEEL +0 -0
- {wandb-0.18.4.dist-info → wandb-0.18.6.dist-info}/entry_points.txt +0 -0
- {wandb-0.18.4.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
|
@@ -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:
|
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
|
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
|
-
|
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
|
wandb/sdk/lib/filesystem.py
CHANGED
@@ -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(
|
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
|
-
|
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'{
|
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
|
-
|
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.
|
wandb/sdk/service/service.py
CHANGED
@@ -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.
|
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"
|
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:
|
wandb/sdk/service/streams.py
CHANGED
@@ -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 =
|
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
|
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
|
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(
|
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
|
-
|
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
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
wandb/sdk/wandb_require.py
CHANGED
@@ -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.
|
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
|
|