wandb 0.16.6__py3-none-any.whl → 0.17.0rc2__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- package_readme.md +95 -0
- wandb/__init__.py +2 -2
- wandb/agents/pyagent.py +0 -1
- wandb/analytics/sentry.py +2 -1
- wandb/apis/importers/internals/protocols.py +30 -56
- wandb/apis/importers/mlflow.py +13 -26
- wandb/apis/importers/wandb.py +8 -14
- wandb/apis/public/api.py +1 -0
- wandb/apis/public/artifacts.py +1 -0
- wandb/apis/public/files.py +1 -0
- wandb/apis/public/history.py +1 -0
- wandb/apis/public/jobs.py +1 -0
- wandb/apis/public/projects.py +1 -0
- wandb/apis/public/reports.py +1 -0
- wandb/apis/public/runs.py +1 -0
- wandb/apis/public/sweeps.py +1 -0
- wandb/apis/public/teams.py +1 -0
- wandb/apis/public/users.py +1 -0
- wandb/apis/reports/v1/_blocks.py +3 -7
- wandb/apis/reports/v2/gql.py +1 -0
- wandb/apis/reports/v2/interface.py +3 -4
- wandb/apis/reports/v2/internal.py +5 -8
- wandb/cli/cli.py +2 -2
- wandb/data_types.py +9 -6
- wandb/docker/__init__.py +1 -1
- wandb/env.py +38 -8
- wandb/errors/__init__.py +5 -0
- wandb/integration/catboost/catboost.py +1 -1
- wandb/integration/fastai/__init__.py +1 -0
- wandb/integration/huggingface/resolver.py +2 -2
- wandb/integration/keras/__init__.py +1 -0
- wandb/integration/keras/callbacks/metrics_logger.py +1 -1
- wandb/integration/keras/keras.py +7 -7
- wandb/integration/langchain/wandb_tracer.py +1 -0
- wandb/integration/lightning/fabric/logger.py +1 -3
- wandb/integration/metaflow/metaflow.py +41 -6
- wandb/integration/openai/fine_tuning.py +3 -3
- wandb/keras/__init__.py +1 -0
- wandb/old/summary.py +1 -1
- wandb/plot/confusion_matrix.py +1 -1
- wandb/plots/precision_recall.py +1 -1
- wandb/plots/roc.py +1 -1
- wandb/proto/v3/wandb_internal_pb2.py +364 -332
- wandb/proto/v3/wandb_settings_pb2.py +1 -1
- wandb/proto/v4/wandb_internal_pb2.py +322 -316
- wandb/proto/v4/wandb_settings_pb2.py +1 -1
- wandb/proto/wandb_internal_codegen.py +0 -25
- wandb/sdk/artifacts/artifact.py +16 -4
- wandb/sdk/artifacts/artifact_download_logger.py +1 -0
- wandb/sdk/artifacts/artifact_file_cache.py +18 -4
- wandb/sdk/artifacts/artifact_instance_cache.py +1 -0
- wandb/sdk/artifacts/artifact_manifest.py +1 -0
- wandb/sdk/artifacts/artifact_manifest_entry.py +1 -0
- wandb/sdk/artifacts/artifact_manifests/artifact_manifest_v1.py +1 -0
- wandb/sdk/artifacts/artifact_saver.py +5 -2
- wandb/sdk/artifacts/artifact_state.py +1 -0
- wandb/sdk/artifacts/artifact_ttl.py +1 -0
- wandb/sdk/artifacts/exceptions.py +1 -0
- wandb/sdk/artifacts/storage_handlers/azure_handler.py +1 -0
- wandb/sdk/artifacts/storage_handlers/gcs_handler.py +13 -18
- wandb/sdk/artifacts/storage_handlers/http_handler.py +1 -0
- wandb/sdk/artifacts/storage_handlers/local_file_handler.py +1 -0
- wandb/sdk/artifacts/storage_handlers/multi_handler.py +1 -0
- wandb/sdk/artifacts/storage_handlers/s3_handler.py +5 -3
- wandb/sdk/artifacts/storage_handlers/tracking_handler.py +1 -0
- wandb/sdk/artifacts/storage_handlers/wb_artifact_handler.py +1 -0
- wandb/sdk/artifacts/storage_handlers/wb_local_artifact_handler.py +1 -0
- wandb/sdk/artifacts/storage_policies/wandb_storage_policy.py +1 -0
- wandb/sdk/artifacts/storage_policy.py +1 -0
- wandb/sdk/data_types/_dtypes.py +8 -8
- wandb/sdk/data_types/base_types/media.py +3 -6
- wandb/sdk/data_types/helper_types/bounding_boxes_2d.py +3 -1
- wandb/sdk/data_types/image.py +1 -1
- wandb/sdk/data_types/video.py +1 -1
- wandb/sdk/integration_utils/auto_logging.py +5 -6
- wandb/sdk/integration_utils/data_logging.py +10 -6
- wandb/sdk/interface/interface.py +55 -32
- wandb/sdk/interface/interface_shared.py +7 -13
- wandb/sdk/internal/datastore.py +1 -1
- wandb/sdk/internal/handler.py +18 -2
- wandb/sdk/internal/internal.py +0 -1
- wandb/sdk/internal/internal_util.py +0 -1
- wandb/sdk/internal/job_builder.py +5 -4
- wandb/sdk/internal/profiler.py +1 -0
- wandb/sdk/internal/run.py +1 -0
- wandb/sdk/internal/sender.py +1 -1
- wandb/sdk/internal/system/assets/gpu_amd.py +44 -44
- wandb/sdk/internal/system/assets/gpu_apple.py +56 -11
- wandb/sdk/internal/system/assets/interfaces.py +6 -8
- wandb/sdk/internal/system/assets/open_metrics.py +2 -2
- wandb/sdk/internal/system/assets/trainium.py +1 -3
- wandb/sdk/launch/_project_spec.py +8 -4
- wandb/sdk/launch/agent/agent.py +2 -1
- wandb/sdk/launch/agent/config.py +72 -11
- wandb/sdk/launch/builder/abstract.py +2 -1
- wandb/sdk/launch/builder/build.py +29 -2
- wandb/sdk/launch/builder/docker_builder.py +1 -0
- wandb/sdk/launch/builder/kaniko_builder.py +2 -2
- wandb/sdk/launch/builder/noop.py +1 -0
- wandb/sdk/launch/create_job.py +18 -0
- wandb/sdk/launch/environment/abstract.py +1 -0
- wandb/sdk/launch/environment/gcp_environment.py +1 -0
- wandb/sdk/launch/environment/local_environment.py +1 -0
- wandb/sdk/launch/loader.py +1 -0
- wandb/sdk/launch/registry/abstract.py +1 -0
- wandb/sdk/launch/registry/azure_container_registry.py +1 -0
- wandb/sdk/launch/registry/elastic_container_registry.py +1 -0
- wandb/sdk/launch/registry/google_artifact_registry.py +2 -1
- wandb/sdk/launch/registry/local_registry.py +1 -0
- wandb/sdk/launch/runner/abstract.py +1 -0
- wandb/sdk/launch/runner/kubernetes_monitor.py +1 -0
- wandb/sdk/launch/runner/kubernetes_runner.py +4 -3
- wandb/sdk/launch/runner/sagemaker_runner.py +11 -10
- wandb/sdk/launch/sweeps/scheduler.py +4 -3
- wandb/sdk/launch/sweeps/scheduler_sweep.py +2 -1
- wandb/sdk/launch/sweeps/utils.py +3 -3
- wandb/sdk/launch/utils.py +3 -3
- wandb/sdk/lib/fsm.py +8 -12
- wandb/sdk/lib/gitlib.py +4 -4
- wandb/sdk/lib/import_hooks.py +1 -1
- wandb/sdk/lib/lazyloader.py +0 -1
- wandb/sdk/lib/proto_util.py +1 -1
- wandb/sdk/lib/redirect.py +19 -14
- wandb/sdk/lib/retry.py +3 -2
- wandb/sdk/lib/tracelog.py +1 -1
- wandb/sdk/service/service.py +17 -15
- wandb/sdk/verify/verify.py +2 -1
- wandb/sdk/wandb_manager.py +2 -2
- wandb/sdk/wandb_require.py +5 -0
- wandb/sdk/wandb_run.py +25 -20
- wandb/sdk/wandb_settings.py +0 -1
- wandb/sdk/wandb_setup.py +1 -1
- wandb/sklearn/__init__.py +1 -0
- wandb/sklearn/plot/__init__.py +1 -0
- wandb/sklearn/plot/classifier.py +7 -6
- wandb/sklearn/plot/clusterer.py +2 -1
- wandb/sklearn/plot/regressor.py +1 -0
- wandb/sklearn/plot/shared.py +1 -0
- wandb/sklearn/utils.py +1 -0
- wandb/testing/relay.py +4 -4
- wandb/trigger.py +1 -0
- wandb/util.py +40 -17
- wandb/wandb_controller.py +2 -3
- wandb/wandb_torch.py +1 -2
- {wandb-0.16.6.dist-info → wandb-0.17.0rc2.dist-info}/METADATA +68 -69
- {wandb-0.16.6.dist-info → wandb-0.17.0rc2.dist-info}/RECORD +149 -150
- {wandb-0.16.6.dist-info → wandb-0.17.0rc2.dist-info}/WHEEL +1 -2
- wandb/bin/apple_gpu_stats +0 -0
- wandb-0.16.6.dist-info/top_level.txt +0 -1
- {wandb-0.16.6.dist-info → wandb-0.17.0rc2.dist-info}/entry_points.txt +0 -0
- {wandb-0.16.6.dist-info → wandb-0.17.0rc2.dist-info/licenses}/LICENSE +0 -0
package_readme.md
ADDED
@@ -0,0 +1,95 @@
|
|
1
|
+
<div align="center">
|
2
|
+
<img src="https://i.imgur.com/RUtiVzH.png" width="600" /><br><br>
|
3
|
+
</div>
|
4
|
+
|
5
|
+
# Weights and Biases [![PyPI](https://img.shields.io/pypi/v/wandb)](https://pypi.python.org/pypi/wandb) [![Conda (channel only)](https://img.shields.io/conda/vn/conda-forge/wandb)](https://anaconda.org/conda-forge/wandb) [![CircleCI](https://img.shields.io/circleci/build/github/wandb/wandb/main)](https://circleci.com/gh/wandb/wandb) [![Codecov](https://img.shields.io/codecov/c/gh/wandb/wandb)](https://codecov.io/gh/wandb/wandb)
|
6
|
+
|
7
|
+
Use W&B to build better models faster. Track and visualize all the pieces of your machine learning pipeline, from datasets to production models.
|
8
|
+
|
9
|
+
- Quickly identify model regressions. Use W&B to visualize results in real time, all in a central dashboard.
|
10
|
+
- Focus on the interesting ML. Spend less time manually tracking results in spreadsheets and text files.
|
11
|
+
- Capture dataset versions with W&B Artifacts to identify how changing data affects your resulting models.
|
12
|
+
- Reproduce any model, with saved code, hyperparameters, launch commands, input data, and resulting model weights.
|
13
|
+
|
14
|
+
[Sign up for a free account →](https://wandb.ai/login?signup=true)
|
15
|
+
|
16
|
+
## Features
|
17
|
+
|
18
|
+
- Store hyper-parameters used in a training run
|
19
|
+
- Search, compare, and visualize training runs
|
20
|
+
- Analyze system usage metrics alongside runs
|
21
|
+
- Collaborate with team members
|
22
|
+
- Replicate historic results
|
23
|
+
- Run parameter sweeps
|
24
|
+
- Keep records of experiments available forever
|
25
|
+
|
26
|
+
[Documentation →](https://docs.wandb.com)
|
27
|
+
|
28
|
+
## Quickstart
|
29
|
+
|
30
|
+
```shell
|
31
|
+
pip install wandb
|
32
|
+
```
|
33
|
+
|
34
|
+
In your training script:
|
35
|
+
|
36
|
+
```python
|
37
|
+
import wandb
|
38
|
+
|
39
|
+
# Your custom arguments defined here
|
40
|
+
args = ...
|
41
|
+
|
42
|
+
wandb.init(config=args, project="my-project")
|
43
|
+
wandb.config["more"] = "custom"
|
44
|
+
|
45
|
+
|
46
|
+
def training_loop():
|
47
|
+
while True:
|
48
|
+
# Do some machine learning
|
49
|
+
epoch, loss, val_loss = ...
|
50
|
+
# Framework agnostic / custom metrics
|
51
|
+
wandb.log({"epoch": epoch, "loss": loss, "val_loss": val_loss})
|
52
|
+
```
|
53
|
+
|
54
|
+
If you're already using Tensorboard or [TensorboardX](https://github.com/lanpa/tensorboardX), you can integrate with one line:
|
55
|
+
|
56
|
+
```python
|
57
|
+
wandb.init(sync_tensorboard=True)
|
58
|
+
```
|
59
|
+
|
60
|
+
## Running your script
|
61
|
+
|
62
|
+
Run `wandb login` from your terminal to signup or authenticate your machine (we store your api key in ~/.netrc). You can also set the `WANDB_API_KEY` environment variable with a key from your [settings](https://app.wandb.ai/settings).
|
63
|
+
|
64
|
+
Run your script with `python my_script.py` and all metadata will be synced to the cloud. You will see a url in your terminal logs when your script starts and finishes. Data is staged locally in a directory named _wandb_ relative to your script. If you want to test your script without syncing to the cloud you can set the environment variable `WANDB_MODE=dryrun`.
|
65
|
+
|
66
|
+
If you are using [docker](https://docker.com) to run your code, we provide a wrapper command `wandb docker` that mounts your current directory, sets environment variables, and ensures the wandb library is installed. Training your models in docker gives you the ability to restore the exact code and environment with the `wandb restore` command.
|
67
|
+
|
68
|
+
## Web Interface
|
69
|
+
|
70
|
+
[Sign up for a free account →](https://wandb.com)
|
71
|
+
[![Watch the video](https://i.imgur.com/PW0Ejlc.png)](https://youtu.be/EeqhOSvNX-A)
|
72
|
+
[Introduction video →](https://youtu.be/EeqhOSvNX-A)
|
73
|
+
|
74
|
+
## Detailed Usage
|
75
|
+
|
76
|
+
Framework specific and detailed usage can be found in our [documentation](http://docs.wandb.com/).
|
77
|
+
|
78
|
+
## Testing
|
79
|
+
|
80
|
+
To run basic test use `make test`. More detailed information can be found at CONTRIBUTING.md.
|
81
|
+
|
82
|
+
We use [circleci](https://circleci.com) for CI.
|
83
|
+
|
84
|
+
# Academic Researchers
|
85
|
+
If you'd like a free academic account for your research group, [reach out to us →](https://www.wandb.com/academic)
|
86
|
+
|
87
|
+
We make it easy to cite W&B in your published paper. [Learn more →](https://www.wandb.com/academic)
|
88
|
+
[![](https://i.imgur.com/loKLiez.png)](https://www.wandb.com/academic)
|
89
|
+
|
90
|
+
## Community
|
91
|
+
Got questions, feedback or want to join a community of ML engineers working on exciting projects?
|
92
|
+
|
93
|
+
<a href="https://bit.ly/wb-slack"><img src="https://svgshare.com/i/M93.svg" alt="slack" width="55"/></a> Join our [slack](https://bit.ly/wb-slack) community.
|
94
|
+
|
95
|
+
[![Twitter](https://img.shields.io/twitter/follow/weights_biases?style=social)](https://twitter.com/weights_biases) Follow us on [Twitter](https://twitter.com/weights_biases).
|
wandb/__init__.py
CHANGED
@@ -11,8 +11,8 @@ For scripts and interactive notebooks, see https://github.com/wandb/examples.
|
|
11
11
|
|
12
12
|
For reference documentation, see https://docs.wandb.com/ref/python.
|
13
13
|
"""
|
14
|
-
__version__ = "0.
|
15
|
-
|
14
|
+
__version__ = "0.17.0rc2"
|
15
|
+
|
16
16
|
|
17
17
|
# Used with pypi checks and other messages related to pip
|
18
18
|
_wandb_module = "wandb"
|
wandb/agents/pyagent.py
CHANGED
wandb/analytics/sentry.py
CHANGED
@@ -17,20 +17,15 @@ Policy = Literal["now", "end", "live"]
|
|
17
17
|
|
18
18
|
@runtime_checkable
|
19
19
|
class ImporterRun(Protocol):
|
20
|
-
def run_id(self) -> str:
|
21
|
-
... # pragma: no cover
|
20
|
+
def run_id(self) -> str: ... # pragma: no cover
|
22
21
|
|
23
|
-
def entity(self) -> str:
|
24
|
-
... # pragma: no cover
|
22
|
+
def entity(self) -> str: ... # pragma: no cover
|
25
23
|
|
26
|
-
def project(self) -> str:
|
27
|
-
... # pragma: no cover
|
24
|
+
def project(self) -> str: ... # pragma: no cover
|
28
25
|
|
29
|
-
def config(self) -> Dict[str, Any]:
|
30
|
-
... # pragma: no cover
|
26
|
+
def config(self) -> Dict[str, Any]: ... # pragma: no cover
|
31
27
|
|
32
|
-
def summary(self) -> Dict[str, float]:
|
33
|
-
... # pragma: no cover
|
28
|
+
def summary(self) -> Dict[str, float]: ... # pragma: no cover
|
34
29
|
|
35
30
|
def metrics(self) -> Iterable[Dict[str, float]]:
|
36
31
|
"""Metrics for the run.
|
@@ -55,71 +50,50 @@ class ImporterRun(Protocol):
|
|
55
50
|
"""
|
56
51
|
... # pragma: no cover
|
57
52
|
|
58
|
-
def run_group(self) -> Optional[str]:
|
59
|
-
... # pragma: no cover
|
53
|
+
def run_group(self) -> Optional[str]: ... # pragma: no cover
|
60
54
|
|
61
|
-
def job_type(self) -> Optional[str]:
|
62
|
-
... # pragma: no cover
|
55
|
+
def job_type(self) -> Optional[str]: ... # pragma: no cover
|
63
56
|
|
64
|
-
def display_name(self) -> str:
|
65
|
-
... # pragma: no cover
|
57
|
+
def display_name(self) -> str: ... # pragma: no cover
|
66
58
|
|
67
|
-
def notes(self) -> Optional[str]:
|
68
|
-
... # pragma: no cover
|
59
|
+
def notes(self) -> Optional[str]: ... # pragma: no cover
|
69
60
|
|
70
|
-
def tags(self) -> Optional[List[str]]:
|
71
|
-
... # pragma: no cover
|
61
|
+
def tags(self) -> Optional[List[str]]: ... # pragma: no cover
|
72
62
|
|
73
|
-
def artifacts(self) -> Optional[Iterable[Artifact]]:
|
74
|
-
... # pragma: no cover
|
63
|
+
def artifacts(self) -> Optional[Iterable[Artifact]]: ... # pragma: no cover
|
75
64
|
|
76
|
-
def used_artifacts(self) -> Optional[Iterable[Artifact]]:
|
77
|
-
... # pragma: no cover
|
65
|
+
def used_artifacts(self) -> Optional[Iterable[Artifact]]: ... # pragma: no cover
|
78
66
|
|
79
|
-
def os_version(self) -> Optional[str]:
|
80
|
-
... # pragma: no cover
|
67
|
+
def os_version(self) -> Optional[str]: ... # pragma: no cover
|
81
68
|
|
82
|
-
def python_version(self) -> Optional[str]:
|
83
|
-
... # pragma: no cover
|
69
|
+
def python_version(self) -> Optional[str]: ... # pragma: no cover
|
84
70
|
|
85
|
-
def cuda_version(self) -> Optional[str]:
|
86
|
-
... # pragma: no cover
|
71
|
+
def cuda_version(self) -> Optional[str]: ... # pragma: no cover
|
87
72
|
|
88
|
-
def program(self) -> Optional[str]:
|
89
|
-
... # pragma: no cover
|
73
|
+
def program(self) -> Optional[str]: ... # pragma: no cover
|
90
74
|
|
91
|
-
def host(self) -> Optional[str]:
|
92
|
-
... # pragma: no cover
|
75
|
+
def host(self) -> Optional[str]: ... # pragma: no cover
|
93
76
|
|
94
|
-
def username(self) -> Optional[str]:
|
95
|
-
... # pragma: no cover
|
77
|
+
def username(self) -> Optional[str]: ... # pragma: no cover
|
96
78
|
|
97
|
-
def executable(self) -> Optional[str]:
|
98
|
-
... # pragma: no cover
|
79
|
+
def executable(self) -> Optional[str]: ... # pragma: no cover
|
99
80
|
|
100
|
-
def gpus_used(self) -> Optional[str]:
|
101
|
-
... # pragma: no cover
|
81
|
+
def gpus_used(self) -> Optional[str]: ... # pragma: no cover
|
102
82
|
|
103
|
-
def cpus_used(self) -> Optional[int]:
|
104
|
-
... # pragma: no cover
|
83
|
+
def cpus_used(self) -> Optional[int]: ... # pragma: no cover
|
105
84
|
|
106
|
-
def memory_used(self) -> Optional[int]:
|
107
|
-
... # pragma: no cover
|
85
|
+
def memory_used(self) -> Optional[int]: ... # pragma: no cover
|
108
86
|
|
109
|
-
def runtime(self) -> Optional[int]:
|
110
|
-
... # pragma: no cover
|
87
|
+
def runtime(self) -> Optional[int]: ... # pragma: no cover
|
111
88
|
|
112
|
-
def start_time(self) -> Optional[int]:
|
113
|
-
... # pragma: no cover
|
89
|
+
def start_time(self) -> Optional[int]: ... # pragma: no cover
|
114
90
|
|
115
|
-
def code_path(self) -> Optional[str]:
|
116
|
-
... # pragma: no cover
|
91
|
+
def code_path(self) -> Optional[str]: ... # pragma: no cover
|
117
92
|
|
118
|
-
def cli_version(self) -> Optional[str]:
|
119
|
-
... # pragma: no cover
|
93
|
+
def cli_version(self) -> Optional[str]: ... # pragma: no cover
|
120
94
|
|
121
|
-
def files(
|
122
|
-
|
95
|
+
def files(
|
96
|
+
self,
|
97
|
+
) -> Optional[Iterable[Tuple[PathStr, Policy]]]: ... # pragma: no cover
|
123
98
|
|
124
|
-
def logs(self) -> Optional[Iterable[str]]:
|
125
|
-
... # pragma: no cover
|
99
|
+
def logs(self) -> Optional[Iterable[str]]: ... # pragma: no cover
|
wandb/apis/importers/mlflow.py
CHANGED
@@ -96,35 +96,26 @@ class MlflowRun:
|
|
96
96
|
def used_artifacts(self) -> Optional[Iterable[Artifact]]: # type: ignore
|
97
97
|
... # pragma: no cover
|
98
98
|
|
99
|
-
def os_version(self) -> Optional[str]:
|
100
|
-
... # pragma: no cover
|
99
|
+
def os_version(self) -> Optional[str]: ... # pragma: no cover
|
101
100
|
|
102
|
-
def python_version(self) -> Optional[str]:
|
103
|
-
... # pragma: no cover
|
101
|
+
def python_version(self) -> Optional[str]: ... # pragma: no cover
|
104
102
|
|
105
|
-
def cuda_version(self) -> Optional[str]:
|
106
|
-
... # pragma: no cover
|
103
|
+
def cuda_version(self) -> Optional[str]: ... # pragma: no cover
|
107
104
|
|
108
|
-
def program(self) -> Optional[str]:
|
109
|
-
... # pragma: no cover
|
105
|
+
def program(self) -> Optional[str]: ... # pragma: no cover
|
110
106
|
|
111
|
-
def host(self) -> Optional[str]:
|
112
|
-
... # pragma: no cover
|
107
|
+
def host(self) -> Optional[str]: ... # pragma: no cover
|
113
108
|
|
114
|
-
def username(self) -> Optional[str]:
|
115
|
-
... # pragma: no cover
|
109
|
+
def username(self) -> Optional[str]: ... # pragma: no cover
|
116
110
|
|
117
|
-
def executable(self) -> Optional[str]:
|
118
|
-
... # pragma: no cover
|
111
|
+
def executable(self) -> Optional[str]: ... # pragma: no cover
|
119
112
|
|
120
|
-
def gpus_used(self) -> Optional[str]:
|
121
|
-
... # pragma: no cover
|
113
|
+
def gpus_used(self) -> Optional[str]: ... # pragma: no cover
|
122
114
|
|
123
115
|
def cpus_used(self) -> Optional[int]: # can we get the model?
|
124
116
|
... # pragma: no cover
|
125
117
|
|
126
|
-
def memory_used(self) -> Optional[int]:
|
127
|
-
... # pragma: no cover
|
118
|
+
def memory_used(self) -> Optional[int]: ... # pragma: no cover
|
128
119
|
|
129
120
|
def runtime(self) -> Optional[int]:
|
130
121
|
end_time = (
|
@@ -137,17 +128,13 @@ class MlflowRun:
|
|
137
128
|
def start_time(self) -> Optional[int]:
|
138
129
|
return self.run.info.start_time // 1000
|
139
130
|
|
140
|
-
def code_path(self) -> Optional[str]:
|
141
|
-
... # pragma: no cover
|
131
|
+
def code_path(self) -> Optional[str]: ... # pragma: no cover
|
142
132
|
|
143
|
-
def cli_version(self) -> Optional[str]:
|
144
|
-
... # pragma: no cover
|
133
|
+
def cli_version(self) -> Optional[str]: ... # pragma: no cover
|
145
134
|
|
146
|
-
def files(self) -> Optional[Iterable[Tuple[str, str]]]:
|
147
|
-
... # pragma: no cover
|
135
|
+
def files(self) -> Optional[Iterable[Tuple[str, str]]]: ... # pragma: no cover
|
148
136
|
|
149
|
-
def logs(self) -> Optional[Iterable[str]]:
|
150
|
-
... # pragma: no cover
|
137
|
+
def logs(self) -> Optional[Iterable[str]]: ... # pragma: no cover
|
151
138
|
|
152
139
|
@staticmethod
|
153
140
|
def _handle_incompatible_strings(s: str) -> str:
|
wandb/apis/importers/wandb.py
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
"""Tooling for the W&B Importer."""
|
2
|
+
|
2
3
|
import itertools
|
3
4
|
import json
|
4
5
|
import logging
|
@@ -201,35 +202,28 @@ class WandbRun:
|
|
201
202
|
|
202
203
|
yield from self._used_artifacts
|
203
204
|
|
204
|
-
def os_version(self) -> Optional[str]:
|
205
|
-
... # pragma: no cover
|
205
|
+
def os_version(self) -> Optional[str]: ... # pragma: no cover
|
206
206
|
|
207
207
|
def python_version(self) -> Optional[str]:
|
208
208
|
return self._metadata_file().get("python")
|
209
209
|
|
210
|
-
def cuda_version(self) -> Optional[str]:
|
211
|
-
... # pragma: no cover
|
210
|
+
def cuda_version(self) -> Optional[str]: ... # pragma: no cover
|
212
211
|
|
213
|
-
def program(self) -> Optional[str]:
|
214
|
-
... # pragma: no cover
|
212
|
+
def program(self) -> Optional[str]: ... # pragma: no cover
|
215
213
|
|
216
214
|
def host(self) -> Optional[str]:
|
217
215
|
return self._metadata_file().get("host")
|
218
216
|
|
219
|
-
def username(self) -> Optional[str]:
|
220
|
-
... # pragma: no cover
|
217
|
+
def username(self) -> Optional[str]: ... # pragma: no cover
|
221
218
|
|
222
|
-
def executable(self) -> Optional[str]:
|
223
|
-
... # pragma: no cover
|
219
|
+
def executable(self) -> Optional[str]: ... # pragma: no cover
|
224
220
|
|
225
|
-
def gpus_used(self) -> Optional[str]:
|
226
|
-
... # pragma: no cover
|
221
|
+
def gpus_used(self) -> Optional[str]: ... # pragma: no cover
|
227
222
|
|
228
223
|
def cpus_used(self) -> Optional[int]: # can we get the model?
|
229
224
|
... # pragma: no cover
|
230
225
|
|
231
|
-
def memory_used(self) -> Optional[int]:
|
232
|
-
... # pragma: no cover
|
226
|
+
def memory_used(self) -> Optional[int]: ... # pragma: no cover
|
233
227
|
|
234
228
|
def runtime(self) -> Optional[int]:
|
235
229
|
wandb_runtime = self.run.summary.get("_wandb", {}).get("runtime")
|
wandb/apis/public/api.py
CHANGED
wandb/apis/public/artifacts.py
CHANGED
wandb/apis/public/files.py
CHANGED
wandb/apis/public/history.py
CHANGED
wandb/apis/public/jobs.py
CHANGED
wandb/apis/public/projects.py
CHANGED
wandb/apis/public/reports.py
CHANGED
wandb/apis/public/runs.py
CHANGED
wandb/apis/public/sweeps.py
CHANGED
wandb/apis/public/teams.py
CHANGED
wandb/apis/public/users.py
CHANGED
wandb/apis/reports/v1/_blocks.py
CHANGED
@@ -716,16 +716,12 @@ class WeaveBlockSummaryTable(Block):
|
|
716
716
|
"fromOp"
|
717
717
|
]["inputs"]["run"]["fromOp"]["inputs"]["project"]["fromOp"]["inputs"][
|
718
718
|
"entityName"
|
719
|
-
][
|
720
|
-
"val"
|
721
|
-
]
|
719
|
+
]["val"]
|
722
720
|
project = spec["config"]["panelConfig"]["exp"]["fromOp"]["inputs"]["obj"][
|
723
721
|
"fromOp"
|
724
722
|
]["inputs"]["run"]["fromOp"]["inputs"]["project"]["fromOp"]["inputs"][
|
725
723
|
"projectName"
|
726
|
-
][
|
727
|
-
"val"
|
728
|
-
]
|
724
|
+
]["val"]
|
729
725
|
table_name = spec["config"]["panelConfig"]["exp"]["fromOp"]["inputs"]["key"][
|
730
726
|
"val"
|
731
727
|
]
|
@@ -1064,7 +1060,7 @@ class WeaveBlockArtifact(Block):
|
|
1064
1060
|
|
1065
1061
|
|
1066
1062
|
class WeaveBlockArtifactVersionedFile(Block):
|
1067
|
-
"""This is a hacky solution to support the most common way of getting Weave artifact
|
1063
|
+
"""This is a hacky solution to support the most common way of getting Weave artifact versions for now..."""
|
1068
1064
|
|
1069
1065
|
entity: str = Attr()
|
1070
1066
|
project: str = Attr()
|
wandb/apis/reports/v2/gql.py
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
"""Public interfaces for the Report API."""
|
2
|
+
|
2
3
|
import os
|
3
4
|
from datetime import datetime
|
4
5
|
from typing import Dict, Iterable, Optional, Tuple, Union
|
@@ -100,8 +101,7 @@ class Layout(Base):
|
|
100
101
|
|
101
102
|
|
102
103
|
@dataclass(config=dataclass_config)
|
103
|
-
class Block(Base):
|
104
|
-
...
|
104
|
+
class Block(Base): ...
|
105
105
|
|
106
106
|
|
107
107
|
@dataclass(config=ConfigDict(validate_assignment=True, extra="allow", slots=True))
|
@@ -706,8 +706,7 @@ class Twitter(Block):
|
|
706
706
|
|
707
707
|
|
708
708
|
@dataclass(config=dataclass_config)
|
709
|
-
class WeaveBlock(Block):
|
710
|
-
...
|
709
|
+
class WeaveBlock(Block): ...
|
711
710
|
|
712
711
|
|
713
712
|
BlockTypes = Union[
|
@@ -1,4 +1,5 @@
|
|
1
1
|
"""JSONSchema for internal types. Hopefully this is auto-generated one day!"""
|
2
|
+
|
2
3
|
import json
|
3
4
|
import random
|
4
5
|
from copy import deepcopy
|
@@ -102,16 +103,13 @@ class TextLikeMixin:
|
|
102
103
|
return obj
|
103
104
|
|
104
105
|
|
105
|
-
class Sentinel(BaseModel):
|
106
|
-
...
|
106
|
+
class Sentinel(BaseModel): ...
|
107
107
|
|
108
108
|
|
109
|
-
class ReportEntity(Sentinel):
|
110
|
-
...
|
109
|
+
class ReportEntity(Sentinel): ...
|
111
110
|
|
112
111
|
|
113
|
-
class ReportProject(Sentinel):
|
114
|
-
...
|
112
|
+
class ReportProject(Sentinel): ...
|
115
113
|
|
116
114
|
|
117
115
|
class ReportAPIBaseModel(BaseModel):
|
@@ -271,8 +269,7 @@ class PanelGridMetadata(ReportAPIBaseModel):
|
|
271
269
|
# )
|
272
270
|
|
273
271
|
|
274
|
-
class Block(ReportAPIBaseModel):
|
275
|
-
...
|
272
|
+
class Block(ReportAPIBaseModel): ...
|
276
273
|
|
277
274
|
|
278
275
|
class PanelGrid(Block):
|
wandb/cli/cli.py
CHANGED
@@ -2188,7 +2188,7 @@ def docker(
|
|
2188
2188
|
if cmd:
|
2189
2189
|
command.extend(["-e", "WANDB_COMMAND=%s" % cmd])
|
2190
2190
|
command.extend(["-it", image, shell])
|
2191
|
-
wandb.termlog("Launching docker container \
|
2191
|
+
wandb.termlog("Launching docker container \U0001f6a2")
|
2192
2192
|
subprocess.call(command)
|
2193
2193
|
|
2194
2194
|
|
@@ -2306,7 +2306,7 @@ def start(ctx, port, env, daemon, upgrade, edge):
|
|
2306
2306
|
)
|
2307
2307
|
exit(1)
|
2308
2308
|
else:
|
2309
|
-
wandb.termlog("W&B server started at http://localhost:%s \
|
2309
|
+
wandb.termlog("W&B server started at http://localhost:%s \U0001f680" % port)
|
2310
2310
|
wandb.termlog("You can stop the server by running `wandb server stop`")
|
2311
2311
|
if not api.api_key:
|
2312
2312
|
# Let the server start before potentially launching a browser
|
wandb/data_types.py
CHANGED
@@ -191,7 +191,7 @@ class Table(Media):
|
|
191
191
|
):
|
192
192
|
"""Initializes a Table object.
|
193
193
|
|
194
|
-
The rows is
|
194
|
+
The rows is available for legacy reasons and should not be used.
|
195
195
|
The Table class uses data to mimic the Pandas API.
|
196
196
|
"""
|
197
197
|
super().__init__()
|
@@ -280,7 +280,10 @@ class Table(Media):
|
|
280
280
|
self.cast(col_name, dt, opt)
|
281
281
|
|
282
282
|
def cast(self, col_name, dtype, optional=False):
|
283
|
-
"""Casts a column to a specific data type.
|
283
|
+
"""Casts a column to a specific data type.
|
284
|
+
|
285
|
+
This can be one of the normal python classes, an internal W&B type, or an
|
286
|
+
example object, like an instance of wandb.Image or wandb.Classes.
|
284
287
|
|
285
288
|
Arguments:
|
286
289
|
col_name: (str) - The name of the column to cast.
|
@@ -513,9 +516,9 @@ class Table(Media):
|
|
513
516
|
deserialized = np.load(
|
514
517
|
source_artifact.get_entry(serialization_path["path"]).download()
|
515
518
|
)
|
516
|
-
np_deserialized_columns[
|
517
|
-
|
518
|
-
|
519
|
+
np_deserialized_columns[json_obj["columns"].index(col_name)] = (
|
520
|
+
deserialized[serialization_path["key"]]
|
521
|
+
)
|
519
522
|
ndarray_type._clear_serialization_path()
|
520
523
|
|
521
524
|
for r_ndx, row in enumerate(json_obj["data"]):
|
@@ -763,7 +766,7 @@ class Table(Media):
|
|
763
766
|
|
764
767
|
Arguments:
|
765
768
|
name: (str) - the unique name of the column
|
766
|
-
data: (list | np.array) - a column of
|
769
|
+
data: (list | np.array) - a column of homogeneous data
|
767
770
|
optional: (bool) - if null-like values are permitted
|
768
771
|
"""
|
769
772
|
assert isinstance(name, str) and name not in self.columns
|
wandb/docker/__init__.py
CHANGED
@@ -289,7 +289,7 @@ def image_id_from_registry(image_name: str) -> Optional[str]:
|
|
289
289
|
|
290
290
|
|
291
291
|
def image_id(image_name: str) -> Optional[str]:
|
292
|
-
"""
|
292
|
+
"""Retrieve the image id from the local docker daemon or remote registry."""
|
293
293
|
if "@sha256:" in image_name:
|
294
294
|
return image_name
|
295
295
|
else:
|