wandb 0.16.6__py3-none-any.whl → 0.17.0__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
Files changed (193) hide show
  1. package_readme.md +95 -0
  2. wandb/__init__.py +2 -3
  3. wandb/agents/pyagent.py +0 -1
  4. wandb/analytics/sentry.py +2 -1
  5. wandb/apis/importers/internals/internal.py +0 -1
  6. wandb/apis/importers/internals/protocols.py +30 -56
  7. wandb/apis/importers/mlflow.py +13 -26
  8. wandb/apis/importers/wandb.py +8 -14
  9. wandb/apis/internal.py +0 -3
  10. wandb/apis/public/api.py +55 -3
  11. wandb/apis/public/artifacts.py +1 -0
  12. wandb/apis/public/files.py +1 -0
  13. wandb/apis/public/history.py +1 -0
  14. wandb/apis/public/jobs.py +17 -4
  15. wandb/apis/public/projects.py +1 -0
  16. wandb/apis/public/reports.py +1 -0
  17. wandb/apis/public/runs.py +15 -17
  18. wandb/apis/public/sweeps.py +1 -0
  19. wandb/apis/public/teams.py +1 -0
  20. wandb/apis/public/users.py +1 -0
  21. wandb/apis/reports/v1/_blocks.py +3 -7
  22. wandb/apis/reports/v2/gql.py +1 -0
  23. wandb/apis/reports/v2/interface.py +3 -4
  24. wandb/apis/reports/v2/internal.py +5 -8
  25. wandb/cli/cli.py +92 -22
  26. wandb/data_types.py +9 -6
  27. wandb/docker/__init__.py +1 -1
  28. wandb/env.py +38 -8
  29. wandb/errors/__init__.py +5 -0
  30. wandb/errors/term.py +10 -2
  31. wandb/filesync/step_checksum.py +1 -4
  32. wandb/filesync/step_prepare.py +4 -24
  33. wandb/filesync/step_upload.py +4 -106
  34. wandb/filesync/upload_job.py +0 -76
  35. wandb/integration/catboost/catboost.py +1 -1
  36. wandb/integration/fastai/__init__.py +1 -0
  37. wandb/integration/huggingface/resolver.py +2 -2
  38. wandb/integration/keras/__init__.py +1 -0
  39. wandb/integration/keras/callbacks/metrics_logger.py +1 -1
  40. wandb/integration/keras/keras.py +7 -7
  41. wandb/integration/langchain/wandb_tracer.py +1 -0
  42. wandb/integration/lightning/fabric/logger.py +1 -3
  43. wandb/integration/metaflow/metaflow.py +41 -6
  44. wandb/integration/openai/fine_tuning.py +3 -3
  45. wandb/integration/prodigy/prodigy.py +1 -1
  46. wandb/old/summary.py +1 -1
  47. wandb/plot/confusion_matrix.py +1 -1
  48. wandb/plot/pr_curve.py +2 -1
  49. wandb/plot/roc_curve.py +2 -1
  50. wandb/{plots → plot}/utils.py +13 -25
  51. wandb/proto/v3/wandb_internal_pb2.py +364 -332
  52. wandb/proto/v3/wandb_settings_pb2.py +2 -2
  53. wandb/proto/v3/wandb_telemetry_pb2.py +10 -10
  54. wandb/proto/v4/wandb_internal_pb2.py +322 -316
  55. wandb/proto/v4/wandb_settings_pb2.py +2 -2
  56. wandb/proto/v4/wandb_telemetry_pb2.py +10 -10
  57. wandb/proto/wandb_deprecated.py +7 -1
  58. wandb/proto/wandb_internal_codegen.py +3 -29
  59. wandb/sdk/artifacts/artifact.py +26 -11
  60. wandb/sdk/artifacts/artifact_download_logger.py +1 -0
  61. wandb/sdk/artifacts/artifact_file_cache.py +18 -4
  62. wandb/sdk/artifacts/artifact_instance_cache.py +1 -0
  63. wandb/sdk/artifacts/artifact_manifest.py +1 -0
  64. wandb/sdk/artifacts/artifact_manifest_entry.py +7 -3
  65. wandb/sdk/artifacts/artifact_manifests/artifact_manifest_v1.py +1 -0
  66. wandb/sdk/artifacts/artifact_saver.py +2 -8
  67. wandb/sdk/artifacts/artifact_state.py +1 -0
  68. wandb/sdk/artifacts/artifact_ttl.py +1 -0
  69. wandb/sdk/artifacts/exceptions.py +1 -0
  70. wandb/sdk/artifacts/storage_handlers/azure_handler.py +1 -0
  71. wandb/sdk/artifacts/storage_handlers/gcs_handler.py +13 -18
  72. wandb/sdk/artifacts/storage_handlers/http_handler.py +1 -0
  73. wandb/sdk/artifacts/storage_handlers/local_file_handler.py +1 -0
  74. wandb/sdk/artifacts/storage_handlers/multi_handler.py +1 -0
  75. wandb/sdk/artifacts/storage_handlers/s3_handler.py +5 -3
  76. wandb/sdk/artifacts/storage_handlers/tracking_handler.py +1 -0
  77. wandb/sdk/artifacts/storage_handlers/wb_artifact_handler.py +1 -0
  78. wandb/sdk/artifacts/storage_handlers/wb_local_artifact_handler.py +1 -0
  79. wandb/sdk/artifacts/storage_policies/wandb_storage_policy.py +3 -42
  80. wandb/sdk/artifacts/storage_policy.py +2 -12
  81. wandb/sdk/data_types/_dtypes.py +8 -8
  82. wandb/sdk/data_types/base_types/media.py +3 -6
  83. wandb/sdk/data_types/helper_types/bounding_boxes_2d.py +3 -1
  84. wandb/sdk/data_types/image.py +1 -1
  85. wandb/sdk/data_types/video.py +1 -1
  86. wandb/sdk/integration_utils/auto_logging.py +5 -6
  87. wandb/sdk/integration_utils/data_logging.py +10 -6
  88. wandb/sdk/interface/interface.py +68 -32
  89. wandb/sdk/interface/interface_shared.py +7 -13
  90. wandb/sdk/internal/datastore.py +1 -1
  91. wandb/sdk/internal/file_pusher.py +2 -5
  92. wandb/sdk/internal/file_stream.py +5 -18
  93. wandb/sdk/internal/handler.py +18 -2
  94. wandb/sdk/internal/internal.py +0 -1
  95. wandb/sdk/internal/internal_api.py +1 -129
  96. wandb/sdk/internal/internal_util.py +0 -1
  97. wandb/sdk/internal/job_builder.py +159 -45
  98. wandb/sdk/internal/profiler.py +1 -0
  99. wandb/sdk/internal/progress.py +0 -28
  100. wandb/sdk/internal/run.py +1 -0
  101. wandb/sdk/internal/sender.py +1 -2
  102. wandb/sdk/internal/system/assets/gpu_amd.py +44 -44
  103. wandb/sdk/internal/system/assets/gpu_apple.py +56 -11
  104. wandb/sdk/internal/system/assets/interfaces.py +6 -8
  105. wandb/sdk/internal/system/assets/open_metrics.py +2 -2
  106. wandb/sdk/internal/system/assets/trainium.py +1 -3
  107. wandb/sdk/launch/__init__.py +9 -1
  108. wandb/sdk/launch/_launch.py +4 -24
  109. wandb/sdk/launch/_launch_add.py +1 -3
  110. wandb/sdk/launch/_project_spec.py +186 -224
  111. wandb/sdk/launch/agent/agent.py +37 -13
  112. wandb/sdk/launch/agent/config.py +72 -14
  113. wandb/sdk/launch/builder/abstract.py +69 -1
  114. wandb/sdk/launch/builder/build.py +156 -555
  115. wandb/sdk/launch/builder/context_manager.py +235 -0
  116. wandb/sdk/launch/builder/docker_builder.py +8 -23
  117. wandb/sdk/launch/builder/kaniko_builder.py +12 -25
  118. wandb/sdk/launch/builder/noop.py +1 -0
  119. wandb/sdk/launch/builder/templates/dockerfile.py +92 -0
  120. wandb/sdk/launch/create_job.py +47 -37
  121. wandb/sdk/launch/environment/abstract.py +1 -0
  122. wandb/sdk/launch/environment/gcp_environment.py +1 -0
  123. wandb/sdk/launch/environment/local_environment.py +1 -0
  124. wandb/sdk/launch/inputs/files.py +148 -0
  125. wandb/sdk/launch/inputs/internal.py +217 -0
  126. wandb/sdk/launch/inputs/manage.py +95 -0
  127. wandb/sdk/launch/loader.py +1 -0
  128. wandb/sdk/launch/registry/abstract.py +1 -0
  129. wandb/sdk/launch/registry/azure_container_registry.py +1 -0
  130. wandb/sdk/launch/registry/elastic_container_registry.py +1 -0
  131. wandb/sdk/launch/registry/google_artifact_registry.py +2 -1
  132. wandb/sdk/launch/registry/local_registry.py +1 -0
  133. wandb/sdk/launch/runner/abstract.py +1 -0
  134. wandb/sdk/launch/runner/kubernetes_monitor.py +1 -0
  135. wandb/sdk/launch/runner/kubernetes_runner.py +9 -10
  136. wandb/sdk/launch/runner/local_container.py +2 -3
  137. wandb/sdk/launch/runner/local_process.py +8 -29
  138. wandb/sdk/launch/runner/sagemaker_runner.py +21 -20
  139. wandb/sdk/launch/runner/vertex_runner.py +8 -7
  140. wandb/sdk/launch/sweeps/scheduler.py +4 -3
  141. wandb/sdk/launch/sweeps/scheduler_sweep.py +2 -1
  142. wandb/sdk/launch/sweeps/utils.py +3 -3
  143. wandb/sdk/launch/utils.py +15 -140
  144. wandb/sdk/lib/_settings_toposort_generated.py +0 -5
  145. wandb/sdk/lib/fsm.py +8 -12
  146. wandb/sdk/lib/gitlib.py +4 -4
  147. wandb/sdk/lib/import_hooks.py +1 -1
  148. wandb/sdk/lib/lazyloader.py +0 -1
  149. wandb/sdk/lib/proto_util.py +23 -2
  150. wandb/sdk/lib/redirect.py +19 -14
  151. wandb/sdk/lib/retry.py +3 -2
  152. wandb/sdk/lib/tracelog.py +1 -1
  153. wandb/sdk/service/service.py +19 -16
  154. wandb/sdk/verify/verify.py +2 -1
  155. wandb/sdk/wandb_init.py +14 -55
  156. wandb/sdk/wandb_manager.py +2 -2
  157. wandb/sdk/wandb_require.py +5 -0
  158. wandb/sdk/wandb_run.py +114 -56
  159. wandb/sdk/wandb_settings.py +0 -48
  160. wandb/sdk/wandb_setup.py +1 -1
  161. wandb/sklearn/__init__.py +1 -0
  162. wandb/sklearn/plot/__init__.py +1 -0
  163. wandb/sklearn/plot/classifier.py +11 -12
  164. wandb/sklearn/plot/clusterer.py +2 -1
  165. wandb/sklearn/plot/regressor.py +1 -0
  166. wandb/sklearn/plot/shared.py +1 -0
  167. wandb/sklearn/utils.py +1 -0
  168. wandb/testing/relay.py +4 -4
  169. wandb/trigger.py +1 -0
  170. wandb/util.py +67 -54
  171. wandb/wandb_controller.py +2 -3
  172. wandb/wandb_torch.py +1 -2
  173. {wandb-0.16.6.dist-info → wandb-0.17.0.dist-info}/METADATA +67 -70
  174. {wandb-0.16.6.dist-info → wandb-0.17.0.dist-info}/RECORD +177 -187
  175. {wandb-0.16.6.dist-info → wandb-0.17.0.dist-info}/WHEEL +1 -2
  176. wandb/bin/apple_gpu_stats +0 -0
  177. wandb/catboost/__init__.py +0 -9
  178. wandb/fastai/__init__.py +0 -9
  179. wandb/keras/__init__.py +0 -18
  180. wandb/lightgbm/__init__.py +0 -9
  181. wandb/plots/__init__.py +0 -6
  182. wandb/plots/explain_text.py +0 -36
  183. wandb/plots/heatmap.py +0 -81
  184. wandb/plots/named_entity.py +0 -43
  185. wandb/plots/part_of_speech.py +0 -50
  186. wandb/plots/plot_definitions.py +0 -768
  187. wandb/plots/precision_recall.py +0 -121
  188. wandb/plots/roc.py +0 -103
  189. wandb/sacred/__init__.py +0 -3
  190. wandb/xgboost/__init__.py +0 -9
  191. wandb-0.16.6.dist-info/top_level.txt +0 -1
  192. {wandb-0.16.6.dist-info → wandb-0.17.0.dist-info}/entry_points.txt +0 -0
  193. {wandb-0.16.6.dist-info → wandb-0.17.0.dist-info/licenses}/LICENSE +0 -0
@@ -1,5 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.43.0)
2
+ Generator: hatchling 1.24.2
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
-
wandb/bin/apple_gpu_stats DELETED
Binary file
@@ -1,9 +0,0 @@
1
- """Compatibility catboost module.
2
-
3
- In the future use:
4
- from wandb.integration.catboost import WandbCallback
5
- """
6
-
7
- from wandb.integration.catboost import WandbCallback, log_summary
8
-
9
- __all__ = ["log_summary", "WandbCallback"]
wandb/fastai/__init__.py DELETED
@@ -1,9 +0,0 @@
1
- """Compatibility fastai module.
2
-
3
- In the future use:
4
- from wandb.integration.fastai import WandbCallback
5
- """
6
-
7
- from wandb.integration.fastai import WandbCallback
8
-
9
- __all__ = ["WandbCallback"]
wandb/keras/__init__.py DELETED
@@ -1,18 +0,0 @@
1
- """Compatibility keras module.
2
-
3
- In the future use e.g.:
4
- from wandb.integration.keras import WandbCallback
5
- """
6
- __all__ = (
7
- "WandbCallback",
8
- "WandbMetricsLogger",
9
- "WandbModelCheckpoint",
10
- "WandbEvalCallback",
11
- )
12
-
13
- from wandb.integration.keras import (
14
- WandbCallback,
15
- WandbEvalCallback,
16
- WandbMetricsLogger,
17
- WandbModelCheckpoint,
18
- )
@@ -1,9 +0,0 @@
1
- """Compatibility lightgbm module.
2
-
3
- In the future use:
4
- from wandb.integration.lightgbm import wandb_callback
5
- """
6
-
7
- from wandb.integration.lightgbm import log_summary, wandb_callback
8
-
9
- __all__ = ["wandb_callback", "log_summary"]
wandb/plots/__init__.py DELETED
@@ -1,6 +0,0 @@
1
- from wandb.plots.explain_text import explain_text as ExplainText
2
- from wandb.plots.heatmap import heatmap as HeatMap
3
- from wandb.plots.named_entity import named_entity as NER
4
- from wandb.plots.part_of_speech import part_of_speech as POS
5
- from wandb.plots.precision_recall import precision_recall
6
- from wandb.plots.roc import roc as ROC
@@ -1,36 +0,0 @@
1
- import wandb
2
- from wandb import util
3
- from wandb.plots.utils import (
4
- deprecation_notice,
5
- encode_labels,
6
- test_missing,
7
- test_types,
8
- )
9
-
10
-
11
- def explain_text(text, probas, target_names=None):
12
- """
13
- ExplainText adds support for eli5's LIME based TextExplainer.
14
- Arguments:
15
- text (str): Text to explain
16
- probas (black-box classification pipeline): A function which
17
- takes a list of strings (documents) and returns a matrix
18
- of shape (n_samples, n_classes) with probability values,
19
- i.e. a row per document and a column per output label.
20
- Returns:
21
- Nothing. To see plots, go to your W&B run page.
22
- Example:
23
- wandb.log({'roc': wandb.plots.ExplainText(text, probas)})
24
- """
25
- deprecation_notice()
26
- eli5 = util.get_module(
27
- "eli5",
28
- required="explain_text requires the eli5 library, install with `pip install eli5`",
29
- )
30
- if test_missing(text=text, probas=probas):
31
- # and test_types(proba=proba)):
32
- wandb.termlog("Visualizing TextExplainer.")
33
- te = eli5.lime.TextExplainer(random_state=42)
34
- te.fit(text, probas)
35
- html = te.show_prediction(target_names=target_names)
36
- return wandb.Html(html.data)
wandb/plots/heatmap.py DELETED
@@ -1,81 +0,0 @@
1
- import wandb
2
- from wandb import util
3
- from wandb.plots.utils import (
4
- deprecation_notice,
5
- encode_labels,
6
- test_missing,
7
- test_types,
8
- )
9
-
10
- chart_limit = wandb.Table.MAX_ROWS
11
-
12
-
13
- def heatmap(x_labels, y_labels, matrix_values, show_text=False):
14
- """
15
- Generates a heatmap.
16
-
17
- Arguments:
18
- matrix_values (arr): 2D dataset of shape x_labels * y_labels, containing
19
- heatmap values that can be coerced into an ndarray.
20
- x_labels (list): Named labels for rows (x_axis).
21
- y_labels (list): Named labels for columns (y_axis).
22
- show_text (bool): Show text values in heatmap cells.
23
-
24
- Returns:
25
- Nothing. To see plots, go to your W&B run page then expand the 'media' tab
26
- under 'auto visualizations'.
27
-
28
- Example:
29
- wandb.log({'heatmap': wandb.plots.HeatMap(x_labels, y_labels,
30
- matrix_values)})
31
- """
32
- deprecation_notice()
33
-
34
- np = util.get_module(
35
- "numpy",
36
- required="roc requires the numpy library, install with `pip install numpy`",
37
- )
38
- scikit = util.get_module(
39
- "sklearn",
40
- required="roc requires the scikit library, install with `pip install scikit-learn`",
41
- )
42
-
43
- if test_missing(
44
- x_labels=x_labels, y_labels=y_labels, matrix_values=matrix_values
45
- ) and test_types(x_labels=x_labels, y_labels=y_labels, matrix_values=matrix_values):
46
- matrix_values = np.array(matrix_values)
47
- wandb.termlog("Visualizing heatmap.")
48
-
49
- def heatmap_table(x_labels, y_labels, matrix_values, show_text):
50
- x_axis = []
51
- y_axis = []
52
- values = []
53
- count = 0
54
- for i, x in enumerate(x_labels):
55
- for j, y in enumerate(y_labels):
56
- x_axis.append(x)
57
- y_axis.append(y)
58
- values.append(matrix_values[j][i])
59
- count += 1
60
- if count >= chart_limit:
61
- wandb.termwarn(
62
- "wandb uses only the first %d datapoints to create the plots."
63
- % wandb.Table.MAX_ROWS
64
- )
65
- break
66
- if show_text:
67
- heatmap_key = "wandb/heatmap/v1"
68
- else:
69
- heatmap_key = "wandb/heatmap_no_text/v1"
70
- return wandb.visualize(
71
- heatmap_key,
72
- wandb.Table(
73
- columns=["x_axis", "y_axis", "values"],
74
- data=[
75
- [x_axis[i], y_axis[i], round(values[i], 2)]
76
- for i in range(len(x_axis))
77
- ],
78
- ),
79
- )
80
-
81
- return heatmap_table(x_labels, y_labels, matrix_values, show_text)
@@ -1,43 +0,0 @@
1
- import wandb
2
- from wandb import util
3
- from wandb.plots.utils import (
4
- deprecation_notice,
5
- encode_labels,
6
- test_missing,
7
- test_types,
8
- )
9
-
10
-
11
- def named_entity(docs):
12
- """
13
- Adds support for spaCy's entity visualizer, which highlights named
14
- entities and their labels in a text.
15
-
16
- Arguments:
17
- docs (list, Doc, Span): Document(s) to visualize.
18
-
19
- Returns:
20
- Nothing. To see plots, go to your W&B run page.
21
-
22
- Example:
23
- wandb.log({'NER': wandb.plots.NER(docs=doc)})
24
- """
25
- deprecation_notice()
26
-
27
- spacy = util.get_module(
28
- "spacy",
29
- required="part_of_speech requires the spacy library, install with `pip install spacy`",
30
- )
31
- en_core_web_md = util.get_module(
32
- "en_core_web_md",
33
- required="part_of_speech requires the en_core_web_md library, install with `python -m spacy download en_core_web_md`",
34
- )
35
- nlp = en_core_web_md.load()
36
-
37
- if test_missing(docs=docs):
38
- # and test_types(docs=docs)):
39
- wandb.termlog("Visualizing named entity recognition.")
40
- html = spacy.displacy.render(
41
- nlp(str(docs)), style="ent", page=True, minify=True
42
- )
43
- return wandb.Html(html)
@@ -1,50 +0,0 @@
1
- import wandb
2
- from wandb import util
3
- from wandb.plots.utils import (
4
- deprecation_notice,
5
- encode_labels,
6
- test_missing,
7
- test_types,
8
- )
9
-
10
-
11
- def part_of_speech(docs):
12
- """
13
- Adds support for spaCy's dependency visualizer which shows
14
- part-of-speech tags and syntactic dependencies.
15
-
16
- Arguments:
17
- docs (list, Doc, Span): Document(s) to visualize.
18
-
19
- Returns:
20
- Nothing. To see plots, go to your W&B run page.
21
-
22
- Example:
23
- wandb.log({'part_of_speech': wandb.plots.POS(docs=doc)})
24
- """
25
- deprecation_notice()
26
-
27
- spacy = util.get_module(
28
- "spacy",
29
- required="part_of_speech requires the spacy library, install with `pip install spacy`",
30
- )
31
- en_core_web_md = util.get_module(
32
- "en_core_web_md",
33
- required="part_of_speech requires the en_core_web_md library, install with `python -m spacy download en_core_web_md`",
34
- )
35
- nlp = en_core_web_md.load()
36
-
37
- if test_missing(docs=docs):
38
- # and test_types(docs=docs)):
39
- wandb.termlog("Visualizing part of speech.")
40
- options = {
41
- "compact": True,
42
- "color": "#1a1c1f",
43
- "font": "Source Sans Pro",
44
- "collapse_punct": True,
45
- "collapse_phrases": True,
46
- }
47
- html = spacy.displacy.render(
48
- nlp(str(docs)), style="dep", minify=True, options=options, page=True
49
- )
50
- return wandb.Html(html)