wandb 0.18.5__py3-none-win32.whl → 0.18.7__py3-none-win32.whl
Sign up to get free protection for your applications and to get access to all the features.
- wandb/__init__.py +2 -2
- wandb/__init__.pyi +22 -20
- wandb/agents/pyagent.py +1 -1
- wandb/apis/importers/wandb.py +1 -1
- wandb/apis/normalize.py +2 -18
- wandb/apis/public/api.py +126 -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.exe +0 -0
- wandb/bin/wandb-core +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/proto/v3/wandb_settings_pb2.py +2 -2
- wandb/proto/v3/wandb_telemetry_pb2.py +4 -4
- wandb/proto/v4/wandb_settings_pb2.py +2 -2
- wandb/proto/v4/wandb_telemetry_pb2.py +4 -4
- wandb/proto/v5/wandb_settings_pb2.py +2 -2
- wandb/proto/v5/wandb_telemetry_pb2.py +4 -4
- wandb/proto/wandb_deprecated.py +2 -0
- wandb/sdk/artifacts/artifact.py +281 -329
- 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/base_types/wb_value.py +20 -10
- 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/interface_queue.py +0 -6
- wandb/sdk/interface/router.py +1 -4
- wandb/sdk/interface/router_queue.py +0 -3
- wandb/sdk/interface/router_relay.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 -4
- wandb/sdk/internal/internal.py +1 -15
- wandb/sdk/internal/internal_api.py +178 -63
- wandb/sdk/internal/internal_util.py +0 -3
- wandb/sdk/internal/job_builder.py +4 -3
- wandb/sdk/internal/sender.py +0 -2
- wandb/sdk/internal/system/assets/__init__.py +0 -2
- wandb/sdk/internal/tb_watcher.py +11 -10
- wandb/sdk/internal/writer.py +1 -3
- wandb/sdk/launch/__init__.py +2 -1
- 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/_settings_toposort_generated.py +1 -0
- 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/lib/sock_client.py +0 -5
- wandb/sdk/service/server.py +2 -11
- wandb/sdk/service/server_sock.py +0 -2
- 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 +97 -115
- wandb/sdk/wandb_settings.py +23 -6
- wandb/sdk/wandb_setup.py +1 -5
- wandb/sdk/wandb_sync.py +2 -1
- wandb/util.py +49 -21
- wandb/wandb_agent.py +3 -3
- wandb/wandb_controller.py +2 -2
- {wandb-0.18.5.dist-info → wandb-0.18.7.dist-info}/METADATA +1 -1
- {wandb-0.18.5.dist-info → wandb-0.18.7.dist-info}/RECORD +145 -147
- 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/tracelog.py +0 -255
- wandb/sdk/lib/wburls.py +0 -46
- {wandb-0.18.5.dist-info → wandb-0.18.7.dist-info}/WHEEL +0 -0
- {wandb-0.18.5.dist-info → wandb-0.18.7.dist-info}/entry_points.txt +0 -0
- {wandb-0.18.5.dist-info → wandb-0.18.7.dist-info}/licenses/LICENSE +0 -0
wandb/sdk/wandb_setup.py
CHANGED
@@ -21,7 +21,7 @@ import wandb
|
|
21
21
|
from wandb.sdk.lib import import_hooks
|
22
22
|
|
23
23
|
from . import wandb_settings
|
24
|
-
from .lib import config_util, server
|
24
|
+
from .lib import config_util, server
|
25
25
|
|
26
26
|
Settings = Union["wandb.sdk.wandb_settings.Settings", Dict[str, Any]]
|
27
27
|
|
@@ -114,10 +114,6 @@ class _WandbSetup__WandbSetup: # noqa: N801
|
|
114
114
|
self._check()
|
115
115
|
self._setup()
|
116
116
|
|
117
|
-
tracelog_mode = self._settings._tracelog
|
118
|
-
if tracelog_mode:
|
119
|
-
tracelog.enable(tracelog_mode)
|
120
|
-
|
121
117
|
def _settings_setup(
|
122
118
|
self,
|
123
119
|
settings: Optional[Settings] = None,
|
wandb/sdk/wandb_sync.py
CHANGED
wandb/util.py
CHANGED
@@ -84,7 +84,6 @@ _not_importable = set()
|
|
84
84
|
|
85
85
|
MAX_LINE_BYTES = (10 << 20) - (100 << 10) # imposed by back end
|
86
86
|
IS_GIT = os.path.exists(os.path.join(os.path.dirname(__file__), "..", ".git"))
|
87
|
-
RE_WINFNAMES = re.compile(r'[<>:"\\?*]')
|
88
87
|
|
89
88
|
# From https://docs.docker.com/engine/reference/commandline/tag/
|
90
89
|
# "Name components may contain lowercase letters, digits and separators.
|
@@ -881,6 +880,23 @@ def no_retry_4xx(e: Exception) -> bool:
|
|
881
880
|
raise UsageError(body["errors"][0]["message"])
|
882
881
|
|
883
882
|
|
883
|
+
def parse_backend_error_messages(response: requests.Response) -> List[str]:
|
884
|
+
errors: List[str] = []
|
885
|
+
try:
|
886
|
+
data = response.json()
|
887
|
+
except ValueError:
|
888
|
+
return errors
|
889
|
+
|
890
|
+
if "errors" in data and isinstance(data["errors"], list):
|
891
|
+
for error in data["errors"]:
|
892
|
+
# Our tests and potentially some api endpoints return a string error?
|
893
|
+
if isinstance(error, str):
|
894
|
+
error = {"message": error}
|
895
|
+
if "message" in error:
|
896
|
+
errors.append(error["message"])
|
897
|
+
return errors
|
898
|
+
|
899
|
+
|
884
900
|
def no_retry_auth(e: Any) -> bool:
|
885
901
|
if hasattr(e, "exception"):
|
886
902
|
e = e.exception
|
@@ -894,7 +910,9 @@ def no_retry_auth(e: Any) -> bool:
|
|
894
910
|
# Retry all non-forbidden/unauthorized/not-found errors.
|
895
911
|
if e.response.status_code not in (401, 403, 404):
|
896
912
|
return True
|
897
|
-
|
913
|
+
|
914
|
+
# Crash with more informational message on forbidden/unauthorized errors.
|
915
|
+
# UnauthorizedError
|
898
916
|
if e.response.status_code == 401:
|
899
917
|
raise AuthenticationError(
|
900
918
|
"The API key you provided is either invalid or missing. "
|
@@ -904,15 +922,29 @@ def no_retry_auth(e: Any) -> bool:
|
|
904
922
|
"If you're not sure, you can try logging in again using the 'wandb login --relogin --host [hostname]' command."
|
905
923
|
f"(Error {e.response.status_code}: {e.response.reason})"
|
906
924
|
)
|
907
|
-
|
908
|
-
|
909
|
-
|
910
|
-
|
911
|
-
|
912
|
-
|
913
|
-
|
914
|
-
|
915
|
-
|
925
|
+
# ForbiddenError
|
926
|
+
if e.response.status_code == 403:
|
927
|
+
if wandb.run:
|
928
|
+
raise CommError(f"Permission denied to access {wandb.run.path}")
|
929
|
+
else:
|
930
|
+
raise CommError(
|
931
|
+
"It appears that you do not have permission to access the requested resource. "
|
932
|
+
"Please reach out to the project owner to grant you access. "
|
933
|
+
"If you have the correct permissions, verify that there are no issues with your networking setup."
|
934
|
+
f"(Error {e.response.status_code}: {e.response.reason})"
|
935
|
+
)
|
936
|
+
|
937
|
+
# NotFoundError
|
938
|
+
if e.response.status_code == 404:
|
939
|
+
# If error message is empty, raise a more generic NotFoundError message.
|
940
|
+
if parse_backend_error_messages(e.response):
|
941
|
+
return False
|
942
|
+
else:
|
943
|
+
raise LookupError(
|
944
|
+
f"Failed to find resource. Please make sure you have the correct resource path. "
|
945
|
+
f"(Error {e.response.status_code}: {e.response.reason})"
|
946
|
+
)
|
947
|
+
return False
|
916
948
|
|
917
949
|
|
918
950
|
def check_retry_conflict(e: Any) -> Optional[bool]:
|
@@ -956,7 +988,7 @@ def make_check_retry_fn(
|
|
956
988
|
) -> CheckRetryFnType:
|
957
989
|
"""Return a check_retry_fn which can be used by lib.Retry().
|
958
990
|
|
959
|
-
|
991
|
+
Args:
|
960
992
|
fallback_fn: Use this function if check_fn didn't decide if a retry should happen.
|
961
993
|
check_fn: Function which returns bool if retry should happen or None if unsure.
|
962
994
|
check_timedelta: Optional retry timeout if we check_fn matches the exception
|
@@ -978,7 +1010,7 @@ def make_check_retry_fn(
|
|
978
1010
|
def find_runner(program: str) -> Union[None, list, List[str]]:
|
979
1011
|
"""Return a command that will run program.
|
980
1012
|
|
981
|
-
|
1013
|
+
Args:
|
982
1014
|
program: The string name of the program to try to run.
|
983
1015
|
|
984
1016
|
Returns:
|
@@ -1283,7 +1315,7 @@ def prompt_choices(
|
|
1283
1315
|
def guess_data_type(shape: Sequence[int], risky: bool = False) -> Optional[str]:
|
1284
1316
|
"""Infer the type of data based on the shape of the tensors.
|
1285
1317
|
|
1286
|
-
|
1318
|
+
Args:
|
1287
1319
|
shape (Sequence[int]): The shape of the data
|
1288
1320
|
risky(bool): some guesses are more likely to be wrong.
|
1289
1321
|
"""
|
@@ -1563,10 +1595,6 @@ def _is_py_requirements_or_dockerfile(path: str) -> bool:
|
|
1563
1595
|
)
|
1564
1596
|
|
1565
1597
|
|
1566
|
-
def check_windows_valid_filename(path: Union[int, str]) -> bool:
|
1567
|
-
return not bool(re.search(RE_WINFNAMES, path)) # type: ignore
|
1568
|
-
|
1569
|
-
|
1570
1598
|
def artifact_to_json(artifact: "Artifact") -> Dict[str, Any]:
|
1571
1599
|
return {
|
1572
1600
|
"_type": "artifactVersion",
|
@@ -1943,9 +1971,9 @@ def get_core_path() -> str:
|
|
1943
1971
|
bin_path = pathlib.Path(__file__).parent / "bin" / "wandb-core"
|
1944
1972
|
if not bin_path.exists():
|
1945
1973
|
raise WandbCoreNotAvailableError(
|
1946
|
-
f"
|
1947
|
-
"
|
1948
|
-
"
|
1974
|
+
f"File not found: {bin_path}."
|
1975
|
+
"Please contact support at support@wandb.com."
|
1976
|
+
f"Your platform is: {platform.platform()}."
|
1949
1977
|
)
|
1950
1978
|
|
1951
1979
|
return str(bin_path)
|
wandb/wandb_agent.py
CHANGED
@@ -19,6 +19,7 @@ from wandb import util, wandb_lib, wandb_sdk
|
|
19
19
|
from wandb.agents.pyagent import pyagent
|
20
20
|
from wandb.apis import InternalApi
|
21
21
|
from wandb.sdk.launch.sweeps import utils as sweep_utils
|
22
|
+
from wandb.sdk.lib import ipython
|
22
23
|
|
23
24
|
logger = logging.getLogger(__name__)
|
24
25
|
|
@@ -546,7 +547,7 @@ def agent(
|
|
546
547
|
is a part of, what function to execute, and (optionally) how
|
547
548
|
many agents to run.
|
548
549
|
|
549
|
-
|
550
|
+
Args:
|
550
551
|
sweep_id: The unique identifier for a sweep. A sweep ID
|
551
552
|
is generated by W&B CLI or Python SDK.
|
552
553
|
function: A function to call instead of the "program"
|
@@ -568,11 +569,10 @@ def agent(
|
|
568
569
|
wandb_sdk.wandb_login._login(_silent=True)
|
569
570
|
if function:
|
570
571
|
return pyagent(sweep_id, function, entity, project, count)
|
571
|
-
in_jupyter = wandb.wandb_sdk.lib.ipython._get_python_type() != "python"
|
572
572
|
return run_agent(
|
573
573
|
sweep_id,
|
574
574
|
function=function,
|
575
|
-
in_jupyter=in_jupyter,
|
575
|
+
in_jupyter=ipython.in_jupyter(),
|
576
576
|
entity=entity,
|
577
577
|
project=project,
|
578
578
|
count=count,
|
wandb/wandb_controller.py
CHANGED
@@ -88,8 +88,6 @@ def _id_generator(size=10, chars=string.ascii_lowercase + string.digits):
|
|
88
88
|
class ControllerError(Exception):
|
89
89
|
"""Base class for sweep errors."""
|
90
90
|
|
91
|
-
pass
|
92
|
-
|
93
91
|
|
94
92
|
class _WandbController:
|
95
93
|
"""Sweep controller class.
|
@@ -309,6 +307,8 @@ class _WandbController:
|
|
309
307
|
self._create["parameters"][name]["value"] = value
|
310
308
|
if values is not None:
|
311
309
|
self._create["parameters"][name]["values"] = values
|
310
|
+
if distribution is not None:
|
311
|
+
self._create["parameters"][name]["distribution"] = distribution
|
312
312
|
if min is not None:
|
313
313
|
self._create["parameters"][name]["min"] = min
|
314
314
|
if max is not None:
|