wandb 0.19.8__py3-none-win_amd64.whl → 0.19.10__py3-none-win_amd64.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.
Files changed (154) hide show
  1. wandb/__init__.py +5 -1
  2. wandb/__init__.pyi +15 -8
  3. wandb/_pydantic/__init__.py +30 -0
  4. wandb/_pydantic/base.py +148 -0
  5. wandb/_pydantic/utils.py +66 -0
  6. wandb/_pydantic/v1_compat.py +284 -0
  7. wandb/apis/paginator.py +82 -38
  8. wandb/apis/public/__init__.py +2 -2
  9. wandb/apis/public/api.py +111 -53
  10. wandb/apis/public/artifacts.py +387 -639
  11. wandb/apis/public/automations.py +69 -0
  12. wandb/apis/public/files.py +2 -2
  13. wandb/apis/public/integrations.py +168 -0
  14. wandb/apis/public/projects.py +32 -2
  15. wandb/apis/public/reports.py +2 -2
  16. wandb/apis/public/runs.py +19 -11
  17. wandb/apis/public/utils.py +107 -1
  18. wandb/automations/__init__.py +81 -0
  19. wandb/automations/_filters/__init__.py +40 -0
  20. wandb/automations/_filters/expressions.py +179 -0
  21. wandb/automations/_filters/operators.py +267 -0
  22. wandb/automations/_filters/run_metrics.py +183 -0
  23. wandb/automations/_generated/__init__.py +184 -0
  24. wandb/automations/_generated/create_filter_trigger.py +21 -0
  25. wandb/automations/_generated/create_generic_webhook_integration.py +43 -0
  26. wandb/automations/_generated/delete_trigger.py +19 -0
  27. wandb/automations/_generated/enums.py +33 -0
  28. wandb/automations/_generated/fragments.py +343 -0
  29. wandb/automations/_generated/generic_webhook_integrations_by_entity.py +22 -0
  30. wandb/automations/_generated/get_triggers.py +24 -0
  31. wandb/automations/_generated/get_triggers_by_entity.py +24 -0
  32. wandb/automations/_generated/input_types.py +104 -0
  33. wandb/automations/_generated/integrations_by_entity.py +22 -0
  34. wandb/automations/_generated/operations.py +710 -0
  35. wandb/automations/_generated/slack_integrations_by_entity.py +22 -0
  36. wandb/automations/_generated/update_filter_trigger.py +21 -0
  37. wandb/automations/_utils.py +123 -0
  38. wandb/automations/_validators.py +73 -0
  39. wandb/automations/actions.py +205 -0
  40. wandb/automations/automations.py +109 -0
  41. wandb/automations/events.py +235 -0
  42. wandb/automations/integrations.py +26 -0
  43. wandb/automations/scopes.py +76 -0
  44. wandb/beta/workflows.py +9 -10
  45. wandb/bin/gpu_stats.exe +0 -0
  46. wandb/bin/wandb-core +0 -0
  47. wandb/cli/cli.py +3 -3
  48. wandb/integration/keras/keras.py +2 -1
  49. wandb/integration/langchain/wandb_tracer.py +2 -1
  50. wandb/integration/metaflow/metaflow.py +19 -17
  51. wandb/integration/sacred/__init__.py +1 -1
  52. wandb/jupyter.py +155 -133
  53. wandb/old/summary.py +0 -2
  54. wandb/proto/v3/wandb_internal_pb2.py +297 -292
  55. wandb/proto/v3/wandb_settings_pb2.py +2 -2
  56. wandb/proto/v3/wandb_telemetry_pb2.py +10 -10
  57. wandb/proto/v4/wandb_internal_pb2.py +292 -292
  58. wandb/proto/v4/wandb_settings_pb2.py +2 -2
  59. wandb/proto/v4/wandb_telemetry_pb2.py +10 -10
  60. wandb/proto/v5/wandb_internal_pb2.py +292 -292
  61. wandb/proto/v5/wandb_settings_pb2.py +2 -2
  62. wandb/proto/v5/wandb_telemetry_pb2.py +10 -10
  63. wandb/proto/v6/wandb_base_pb2.py +41 -0
  64. wandb/proto/v6/wandb_internal_pb2.py +393 -0
  65. wandb/proto/v6/wandb_server_pb2.py +78 -0
  66. wandb/proto/v6/wandb_settings_pb2.py +58 -0
  67. wandb/proto/v6/wandb_telemetry_pb2.py +52 -0
  68. wandb/proto/wandb_base_pb2.py +2 -0
  69. wandb/proto/wandb_deprecated.py +10 -0
  70. wandb/proto/wandb_internal_pb2.py +3 -1
  71. wandb/proto/wandb_server_pb2.py +2 -0
  72. wandb/proto/wandb_settings_pb2.py +2 -0
  73. wandb/proto/wandb_telemetry_pb2.py +2 -0
  74. wandb/sdk/artifacts/_generated/__init__.py +248 -0
  75. wandb/sdk/artifacts/_generated/artifact_collection_membership_files.py +43 -0
  76. wandb/sdk/artifacts/_generated/artifact_version_files.py +36 -0
  77. wandb/sdk/artifacts/_generated/create_artifact_collection_tag_assignments.py +36 -0
  78. wandb/sdk/artifacts/_generated/delete_artifact_collection_tag_assignments.py +25 -0
  79. wandb/sdk/artifacts/_generated/delete_artifact_portfolio.py +35 -0
  80. wandb/sdk/artifacts/_generated/delete_artifact_sequence.py +35 -0
  81. wandb/sdk/artifacts/_generated/enums.py +17 -0
  82. wandb/sdk/artifacts/_generated/fragments.py +186 -0
  83. wandb/sdk/artifacts/_generated/input_types.py +16 -0
  84. wandb/sdk/artifacts/_generated/move_artifact_collection.py +35 -0
  85. wandb/sdk/artifacts/_generated/operations.py +510 -0
  86. wandb/sdk/artifacts/_generated/project_artifact_collection.py +101 -0
  87. wandb/sdk/artifacts/_generated/project_artifact_collections.py +33 -0
  88. wandb/sdk/artifacts/_generated/project_artifact_type.py +24 -0
  89. wandb/sdk/artifacts/_generated/project_artifact_types.py +24 -0
  90. wandb/sdk/artifacts/_generated/project_artifacts.py +42 -0
  91. wandb/sdk/artifacts/_generated/run_input_artifacts.py +51 -0
  92. wandb/sdk/artifacts/_generated/run_output_artifacts.py +51 -0
  93. wandb/sdk/artifacts/_generated/update_artifact_portfolio.py +35 -0
  94. wandb/sdk/artifacts/_generated/update_artifact_sequence.py +35 -0
  95. wandb/sdk/artifacts/_graphql_fragments.py +56 -81
  96. wandb/sdk/artifacts/_validators.py +1 -0
  97. wandb/sdk/artifacts/artifact.py +110 -49
  98. wandb/sdk/artifacts/artifact_manifest_entry.py +2 -1
  99. wandb/sdk/artifacts/artifact_saver.py +16 -2
  100. wandb/sdk/artifacts/storage_handlers/azure_handler.py +1 -0
  101. wandb/sdk/artifacts/storage_policies/wandb_storage_policy.py +23 -2
  102. wandb/sdk/data_types/audio.py +1 -3
  103. wandb/sdk/data_types/base_types/media.py +13 -7
  104. wandb/sdk/data_types/base_types/wb_value.py +34 -11
  105. wandb/sdk/data_types/html.py +36 -9
  106. wandb/sdk/data_types/image.py +56 -37
  107. wandb/sdk/data_types/molecule.py +1 -5
  108. wandb/sdk/data_types/object_3d.py +2 -1
  109. wandb/sdk/data_types/saved_model.py +7 -9
  110. wandb/sdk/data_types/table.py +5 -0
  111. wandb/sdk/data_types/trace_tree.py +2 -0
  112. wandb/sdk/data_types/utils.py +1 -1
  113. wandb/sdk/data_types/video.py +15 -30
  114. wandb/sdk/interface/interface.py +2 -0
  115. wandb/{apis/public → sdk/internal}/_generated/__init__.py +0 -6
  116. wandb/{apis/public → sdk/internal}/_generated/server_features_query.py +3 -3
  117. wandb/sdk/internal/internal_api.py +138 -47
  118. wandb/sdk/internal/profiler.py +6 -5
  119. wandb/sdk/internal/run.py +13 -6
  120. wandb/sdk/internal/sender.py +2 -0
  121. wandb/sdk/internal/sender_config.py +8 -11
  122. wandb/sdk/internal/settings_static.py +24 -2
  123. wandb/sdk/lib/apikey.py +40 -20
  124. wandb/sdk/lib/asyncio_compat.py +1 -1
  125. wandb/sdk/lib/deprecate.py +13 -22
  126. wandb/sdk/lib/disabled.py +2 -1
  127. wandb/sdk/lib/printer.py +37 -8
  128. wandb/sdk/lib/printer_asyncio.py +46 -0
  129. wandb/sdk/lib/redirect.py +10 -5
  130. wandb/sdk/lib/run_moment.py +4 -6
  131. wandb/sdk/lib/wb_logging.py +161 -0
  132. wandb/sdk/service/server_sock.py +19 -14
  133. wandb/sdk/service/service.py +9 -7
  134. wandb/sdk/service/streams.py +5 -0
  135. wandb/sdk/verify/verify.py +6 -3
  136. wandb/sdk/wandb_config.py +44 -43
  137. wandb/sdk/wandb_init.py +323 -141
  138. wandb/sdk/wandb_login.py +13 -4
  139. wandb/sdk/wandb_metadata.py +107 -91
  140. wandb/sdk/wandb_run.py +529 -325
  141. wandb/sdk/wandb_settings.py +422 -202
  142. wandb/sdk/wandb_setup.py +52 -1
  143. wandb/util.py +29 -29
  144. {wandb-0.19.8.dist-info → wandb-0.19.10.dist-info}/METADATA +7 -7
  145. {wandb-0.19.8.dist-info → wandb-0.19.10.dist-info}/RECORD +151 -94
  146. wandb/_globals.py +0 -19
  147. wandb/apis/public/_generated/base.py +0 -128
  148. wandb/apis/public/_generated/typing_compat.py +0 -14
  149. /wandb/{apis/public → sdk/internal}/_generated/enums.py +0 -0
  150. /wandb/{apis/public → sdk/internal}/_generated/input_types.py +0 -0
  151. /wandb/{apis/public → sdk/internal}/_generated/operations.py +0 -0
  152. {wandb-0.19.8.dist-info → wandb-0.19.10.dist-info}/WHEEL +0 -0
  153. {wandb-0.19.8.dist-info → wandb-0.19.10.dist-info}/entry_points.txt +0 -0
  154. {wandb-0.19.8.dist-info → wandb-0.19.10.dist-info}/licenses/LICENSE +0 -0
wandb/sdk/wandb_config.py CHANGED
@@ -22,65 +22,63 @@ logger = logging.getLogger("wandb")
22
22
  class Config:
23
23
  """Config object.
24
24
 
25
- Config objects are intended to hold all of the hyperparameters associated with
26
- a wandb run and are saved with the run object when `wandb.init` is called.
25
+ Config objects are intended to hold all of the hyperparameters associated
26
+ with a wandb run and are saved with the run object when `wandb.init` is
27
+ called.
27
28
 
28
- We recommend setting `wandb.config` once at the top of your training experiment or
29
- setting the config as a parameter to init, ie. `wandb.init(config=my_config_dict)`
29
+ We recommend setting the config once when initializing your run by passing
30
+ the `config` parameter to `init`:
30
31
 
31
- You can create a file called `config-defaults.yaml`, and it will automatically be
32
- loaded into `wandb.config`. See https://docs.wandb.com/guides/track/config#file-based-configs.
32
+ ```
33
+ wandb.init(config=my_config_dict)
34
+ ```
35
+
36
+ You can create a file called `config-defaults.yaml`, and it will
37
+ automatically be loaded as each run's config. You can also pass the name
38
+ of the file as the `config` parameter to `init`:
39
+
40
+ ```
41
+ wandb.init(config="my_config.yaml")
42
+ ```
33
43
 
34
- You can also load a config YAML file with your custom name and pass the filename
35
- into `wandb.init(config="special_config.yaml")`.
36
44
  See https://docs.wandb.com/guides/track/config#file-based-configs.
37
45
 
38
46
  Examples:
39
47
  Basic usage
40
48
  ```
41
- wandb.config.epochs = 4
42
- wandb.init()
43
- for x in range(wandb.config.epochs):
44
- # train
45
- ```
46
-
47
- Using wandb.init to set config
48
- ```
49
- wandb.init(config={"epochs": 4, "batch_size": 32})
50
- for x in range(wandb.config.epochs):
51
- # train
49
+ with wandb.init(config={"epochs": 4}) as run:
50
+ for x in range(run.config.epochs):
51
+ # train
52
52
  ```
53
53
 
54
- Nested configs
54
+ Nested values
55
55
  ```
56
- wandb.config['train']['epochs'] = 4
57
- wandb.init()
58
- for x in range(wandb.config['train']['epochs']):
59
- # train
56
+ with wandb.init(config={"train": {"epochs": 4}}) as run:
57
+ for x in range(run.config["train"]["epochs"]):
58
+ # train
60
59
  ```
61
60
 
62
61
  Using absl flags
63
62
  ```
64
63
  flags.DEFINE_string("model", None, "model to run") # name, default, help
65
- wandb.config.update(flags.FLAGS) # adds all absl flags to config
64
+ with wandb.init() as run:
65
+ run.config.update(flags.FLAGS) # adds all absl flags to config
66
66
  ```
67
67
 
68
68
  Argparse flags
69
69
  ```python
70
- wandb.init()
71
- wandb.config.epochs = 4
72
-
73
- parser = argparse.ArgumentParser()
74
- parser.add_argument(
75
- "-b",
76
- "--batch-size",
77
- type=int,
78
- default=8,
79
- metavar="N",
80
- help="input batch size for training (default: 8)",
81
- )
82
- args = parser.parse_args()
83
- wandb.config.update(args)
70
+ with wandb.init(config={"epochs": 4}) as run:
71
+ parser = argparse.ArgumentParser()
72
+ parser.add_argument(
73
+ "-b",
74
+ "--batch-size",
75
+ type=int,
76
+ default=8,
77
+ metavar="N",
78
+ help="input batch size for training (default: 8)",
79
+ )
80
+ args = parser.parse_args()
81
+ run.config.update(args)
84
82
  ```
85
83
 
86
84
  Using TensorFlow flags (deprecated in tensorflow v2)
@@ -88,7 +86,9 @@ class Config:
88
86
  flags = tf.app.flags
89
87
  flags.DEFINE_string("data_dir", "/tmp/data")
90
88
  flags.DEFINE_integer("batch_size", 128, "Batch size.")
91
- wandb.config.update(flags.FLAGS) # adds all of the tensorflow flags to config
89
+
90
+ with wandb.init() as run:
91
+ run.config.update(flags.FLAGS)
92
92
  ```
93
93
  """
94
94
 
@@ -298,7 +298,8 @@ class Config:
298
298
  # best if we don't allow nested artifacts until we can lock nested keys in the config
299
299
  if isinstance(v, dict) and check_dict_contains_nested_artifact(v, nested):
300
300
  raise ValueError(
301
- "Instances of wandb.Artifact can only be top level keys in wandb.config"
301
+ "Instances of wandb.Artifact can only be top level keys in"
302
+ " a run's config"
302
303
  )
303
304
 
304
305
 
@@ -307,10 +308,10 @@ class ConfigStatic:
307
308
  object.__setattr__(self, "__dict__", dict(config))
308
309
 
309
310
  def __setattr__(self, name, value):
310
- raise AttributeError("Error: wandb.run.config_static is a readonly object")
311
+ raise AttributeError("Error: run.config_static is a readonly object")
311
312
 
312
313
  def __setitem__(self, key, val):
313
- raise AttributeError("Error: wandb.run.config_static is a readonly object")
314
+ raise AttributeError("Error: run.config_static is a readonly object")
314
315
 
315
316
  def keys(self):
316
317
  return self.__dict__.keys()