wandb 0.19.2__py3-none-any.whl → 0.19.4rc1__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
wandb/sdk/wandb_run.py CHANGED
@@ -29,7 +29,6 @@ import wandb.util
29
29
  from wandb import trigger
30
30
  from wandb._globals import _datatypes_set_callback
31
31
  from wandb.apis import internal, public
32
- from wandb.apis.internal import Api
33
32
  from wandb.apis.public import Api as PublicApi
34
33
  from wandb.errors import CommError, UnsupportedError, UsageError
35
34
  from wandb.errors.links import url_registry
@@ -548,8 +547,6 @@ class Run:
548
547
 
549
548
  _init_pid: int
550
549
  _attach_pid: int
551
- _iface_pid: int | None
552
- _iface_port: int | None
553
550
 
554
551
  _attach_id: str | None
555
552
  _is_attached: bool
@@ -708,10 +705,6 @@ class Run:
708
705
  if launch_trace_id:
709
706
  self._config[wandb_key]["launch_trace_id"] = launch_trace_id
710
707
 
711
- # interface pid and port configured when backend is configured (See _hack_set_run)
712
- # TODO: using pid isn't the best for windows as pid reuse can happen more often than unix
713
- self._iface_pid = None
714
- self._iface_port = None
715
708
  self._attach_id = None
716
709
  self._is_attached = False
717
710
  self._is_finished = False
@@ -722,12 +715,6 @@ class Run:
722
715
  if not self._settings.x_disable_service:
723
716
  self._attach_id = self._settings.run_id
724
717
 
725
- def _set_iface_pid(self, iface_pid: int) -> None:
726
- self._iface_pid = iface_pid
727
-
728
- def _set_iface_port(self, iface_port: int) -> None:
729
- self._iface_port = iface_port
730
-
731
718
  def _handle_launch_artifact_overrides(self) -> None:
732
719
  if self._settings.launch and (os.environ.get("WANDB_ARTIFACTS") is not None):
733
720
  try:
@@ -1443,6 +1430,7 @@ class Run:
1443
1430
 
1444
1431
  not_using_tensorboard = len(wandb.patched["tensorboard"]) == 0
1445
1432
  self._backend.interface.publish_partial_history(
1433
+ self,
1446
1434
  data,
1447
1435
  user_step=self._step,
1448
1436
  step=step,
@@ -1814,7 +1802,10 @@ class Run:
1814
1802
  examples = []
1815
1803
  for i in range(3):
1816
1804
  pixels = np.random.randint(
1817
- low=0, high=256, size=(100, 100, 3), dtype=np.uint8
1805
+ low=0,
1806
+ high=256,
1807
+ size=(100, 100, 3),
1808
+ dtype=np.uint8,
1818
1809
  )
1819
1810
  pil_image = PILImage.fromarray(pixels, mode="RGB")
1820
1811
  image = wandb.Image(pil_image, caption=f"random field {i}")
@@ -1831,7 +1822,10 @@ class Run:
1831
1822
  run = wandb.init()
1832
1823
  # axes are (time, channel, height, width)
1833
1824
  frames = np.random.randint(
1834
- low=0, high=256, size=(10, 3, 100, 100), dtype=np.uint8
1825
+ low=0,
1826
+ high=256,
1827
+ size=(10, 3, 100, 100),
1828
+ dtype=np.uint8,
1835
1829
  )
1836
1830
  run.log({"video": wandb.Video(frames, fps=4)})
1837
1831
  ```
@@ -3266,8 +3260,7 @@ class Run:
3266
3260
  is_user_created: bool = False,
3267
3261
  use_after_commit: bool = False,
3268
3262
  ) -> Artifact:
3269
- api = internal.Api()
3270
- if api.settings().get("anonymous") in ["allow", "must"]:
3263
+ if self._settings.anonymous in ["allow", "must"]:
3271
3264
  wandb.termwarn(
3272
3265
  "Artifacts logged anonymously cannot be claimed and expire after 7 days."
3273
3266
  )
@@ -3864,8 +3857,7 @@ class Run:
3864
3857
  f'{printer.emoji("rocket")} View run at {printer.link(run_url)}',
3865
3858
  )
3866
3859
 
3867
- # TODO(settings) use `wandb_settings` (if self.settings.anonymous in ["allow", "must"]:)
3868
- if run_name and Api().api.settings().get("anonymous") in ["allow", "must"]:
3860
+ if run_name and settings.anonymous in ["allow", "must"]:
3869
3861
  printer.display(
3870
3862
  (
3871
3863
  "Do NOT share these links with anyone."
@@ -34,14 +34,12 @@ from pydantic_core import SchemaValidator, core_schema
34
34
 
35
35
  import wandb
36
36
  from wandb import env, termwarn, util
37
- from wandb.apis.internal import Api
38
37
  from wandb.errors import UsageError
39
38
  from wandb.proto import wandb_settings_pb2
40
39
 
41
- from .lib import apikey, credentials, filesystem, ipython
40
+ from .lib import apikey, credentials, ipython
42
41
  from .lib.gitlib import GitRepo
43
42
  from .lib.run_moment import RunMoment
44
- from .lib.runid import generate_id
45
43
 
46
44
 
47
45
  def _path_convert(*args: str) -> str:
@@ -1154,29 +1152,6 @@ class Settings(BaseModel, validate_assignment=True):
1154
1152
 
1155
1153
  return settings_proto
1156
1154
 
1157
- def handle_resume_logic(self):
1158
- """Handle logic for resuming runs."""
1159
- # handle auto resume logic
1160
- if self.resume == "auto":
1161
- if os.path.exists(self.resume_fname):
1162
- with open(self.resume_fname) as f:
1163
- resume_run_id = json.load(f)["run_id"]
1164
- if self.run_id is None:
1165
- self.run_id = resume_run_id
1166
- elif self.run_id != resume_run_id:
1167
- wandb.termwarn(
1168
- "Tried to auto resume run with "
1169
- f"id {resume_run_id} but id {self.run_id} is set.",
1170
- )
1171
- if self.run_id is None:
1172
- self.run_id = generate_id()
1173
-
1174
- # persist run_id in case of failure
1175
- if self.resume == "auto" and self.resume_fname is not None:
1176
- filesystem.mkdir_exists_ok(self.wandb_dir)
1177
- with open(self.resume_fname, "w") as f:
1178
- f.write(json.dumps({"run_id": self.run_id}))
1179
-
1180
1155
  @staticmethod
1181
1156
  def validate_url(url: str) -> None:
1182
1157
  """Validate a URL string."""
@@ -1262,7 +1237,7 @@ class Settings(BaseModel, validate_assignment=True):
1262
1237
  def _get_url_query_string(self) -> str:
1263
1238
  """Construct the query string for project, run, and sweep URLs."""
1264
1239
  # TODO: remove dependency on Api()
1265
- if Api().settings().get("anonymous") not in ["allow", "must"]:
1240
+ if self.anonymous not in ["allow", "must"]:
1266
1241
  return ""
1267
1242
 
1268
1243
  api_key = apikey.api_key(settings=self)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: wandb
3
- Version: 0.19.2
3
+ Version: 0.19.4rc1
4
4
  Summary: A CLI and library for interacting with the Weights & Biases API.
5
5
  Project-URL: Source, https://github.com/wandb/wandb
6
6
  Project-URL: Bug Reports, https://github.com/wandb/wandb/issues
@@ -1,6 +1,6 @@
1
1
  package_readme.md,sha256=U9047nyMDICgctm1HLm4HfXwFnFKsEn2m77hsYPUZ1I,4298
2
- wandb/__init__.py,sha256=iDFm6Xdx3kjLvr0RB6XXjuZU-HQk3tXRsKJ8_qeSipM,6988
3
- wandb/__init__.pyi,sha256=vZwj1Cmk9HSNo0zj5h084WSFg63X-EabSmgGhm48HIs,46886
2
+ wandb/__init__.py,sha256=amlCK5n_1hyN1-MkgQ3CWpMhvrRq-X8B9Q4iZemjWzY,6991
3
+ wandb/__init__.pyi,sha256=nZ_mrCwelWNIQBbhGrJ1cKX8z_IfihKjoMc3ByY0loM,47027
4
4
  wandb/__main__.py,sha256=gripuDgB7J8wMMeJt4CIBRjn1BMSFr5zvsrt585Pnj4,64
5
5
  wandb/_globals.py,sha256=CccwOAls5bxJArYHg12b08ZeKR8Qu9u57GtYWjBH0o0,702
6
6
  wandb/data_types.py,sha256=tjxcQ8padGuGxST192PyEDX_nhU__izHcAK-kaSyevI,2276
@@ -49,7 +49,7 @@ wandb/apis/reports/v1/__init__.py,sha256=L5l1BqMaap-w5wXCzn8pC8RXB7_72MsjTx8HeLu
49
49
  wandb/apis/reports/v2/__init__.py,sha256=jdLiTqf5QIRxnWH8drWV9Y06bZEhI5N6uGGSKAT7tv0,263
50
50
  wandb/apis/workspaces/__init__.py,sha256=buvqtqELpCFWC7sHzEuslJgx24ZWDj-5lo2mdV6aHdg,265
51
51
  wandb/beta/workflows.py,sha256=bk12HDWnxI4uuP0KyUbfclrTSoRVXrJibAuO_QBB5tI,10239
52
- wandb/bin/gpu_stats,sha256=SpqeMVNWRDIG2nWfK5L6jxR-eWJuQJDvBdX9pIvUX5g,10864536
52
+ wandb/bin/gpu_stats,sha256=UoDlCDMWg-7wj2egpk1UberOg7-mDcl8CTpERla_hGw,10856328
53
53
  wandb/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
54
54
  wandb/cli/beta.py,sha256=Um35Q9CeoQPS80g0wryo2WtSaD7VA0XqF_YCQNDNiSY,5438
55
55
  wandb/cli/cli.py,sha256=9UKKfjKwI_oRWK13UqQA3Ep1qH3HDCBXmKlOwcK0k_U,92726
@@ -104,7 +104,7 @@ wandb/integration/lightning/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMp
104
104
  wandb/integration/lightning/fabric/__init__.py,sha256=RFhr2VkC0D8b6bAXUMZzcVzqDQaoOozfP_HOogAWi9o,94
105
105
  wandb/integration/lightning/fabric/logger.py,sha256=ev8xFbCohaRp4MvrBn1x_5ypuvLe2FJdUWY7Jjw0ylk,27251
106
106
  wandb/integration/metaflow/__init__.py,sha256=nYn3ubiX9Ay6PFxr7r7F8Ia_2dLImb63rpYDmuDlkkQ,109
107
- wandb/integration/metaflow/metaflow.py,sha256=faj0W4clDGBX9cuoU1fqVeCM7qePwGp5N3A6mdfLYsc,11901
107
+ wandb/integration/metaflow/metaflow.py,sha256=qlzrdkTmT_KTg6sUE3PV8PStuZyFGYEdQzNNNil05jI,11804
108
108
  wandb/integration/openai/__init__.py,sha256=T6x9lIFfw2NzOSi46wi3otY_-DSwyMgnIjMIOIod7iU,66
109
109
  wandb/integration/openai/fine_tuning.py,sha256=w9_F3bLTG72KdNkD2rAPRdrq6rc58EtltFxwedyI690,18555
110
110
  wandb/integration/openai/openai.py,sha256=zGD1kj6yjDP1IfAAYRcltuXD5Bf569CSnMHMf4rDm54,496
@@ -203,14 +203,14 @@ wandb/sdk/__init__.py,sha256=N-GTAC0AzbZF2J8RzB33DTmYk9u-jubllCwvhWrPgsE,813
203
203
  wandb/sdk/wandb_alerts.py,sha256=SwBPBiXRxknMTMGbsVoMMWqWK65UWMcKAdTWZtdwAeo,193
204
204
  wandb/sdk/wandb_config.py,sha256=b7kxQVnIh5HCBZXb2pOGZ4c02xCVlW4IQiAu3N-8Opg,10856
205
205
  wandb/sdk/wandb_helper.py,sha256=IbJ7opO8UkfwCDekSjRYIrGBblUxnTPBfp1EdesfF4U,1824
206
- wandb/sdk/wandb_init.py,sha256=yQ8BthOAFOQaJKLFZhPc2KQxIgbA_60Hcfs60CpG7zA,53887
206
+ wandb/sdk/wandb_init.py,sha256=XqlUH5OpIdyatgTKHMIsDM3xUSwVbgl_zFzezB8xOg8,58443
207
207
  wandb/sdk/wandb_login.py,sha256=DP7nDUGx2UmqGRBrvTmcpvzRBVeRD0qEENtmu4sjDAQ,10966
208
208
  wandb/sdk/wandb_metadata.py,sha256=nT6TUF4Yh-ka3VQGyKd3y9MTEHJUgRVT4ICyfJkbHFo,20111
209
209
  wandb/sdk/wandb_metric.py,sha256=a3GiQXr6H18m81uobYjlJaC8CL8iANzI42qxkxfZsDs,3268
210
210
  wandb/sdk/wandb_require.py,sha256=Y0ib8h27__t7hXos1F2srfsQzVfzH4BB6wq8E1aRbRA,2950
211
211
  wandb/sdk/wandb_require_helpers.py,sha256=ZmKv5aXXHDTTU6nYHMLKW4_pt9X-PlaMtbRJl77kHX8,1331
212
- wandb/sdk/wandb_run.py,sha256=_hH8Pe-lEZE_FiPHYmOrQxdGfs4V2PuFOu0SD5jczlg,155746
213
- wandb/sdk/wandb_settings.py,sha256=jvD7tTJ9J-aQvsmIz8UdVPS2Qd_zpSW3aDP-82mT_Hk,48386
212
+ wandb/sdk/wandb_run.py,sha256=Jk-KLMtrjX698iUCT2gjivutfR01ud9DjnuSiuVYop8,155193
213
+ wandb/sdk/wandb_settings.py,sha256=gXZydMDYH8OLcAoK78mA4naRqBA2aKlsIGKn3i4OC0s,47290
214
214
  wandb/sdk/wandb_setup.py,sha256=7j3UBiqm8x7f4JsFPX5jR19wNRSRvf77TIyncd0HpJg,13014
215
215
  wandb/sdk/wandb_summary.py,sha256=yQdOVIPrZaZanhBQ7yuSfPLX0x6dxwkN_KAn4SgjSZU,4536
216
216
  wandb/sdk/wandb_sweep.py,sha256=Sg_JqxVzmjUBvii41azpdr-c6RPwHOBnSha8k7jrRhk,4028
@@ -279,7 +279,7 @@ wandb/sdk/integration_utils/auto_logging.py,sha256=sblNn9BIG7memxTj23UfrGXyA06t3
279
279
  wandb/sdk/integration_utils/data_logging.py,sha256=DDFtDaUu50aeTTgxCHHYd2f85guqqf2xfEOburRlwwQ,19533
280
280
  wandb/sdk/interface/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
281
281
  wandb/sdk/interface/constants.py,sha256=NJNBFr7LkshLI837D3LU3JuEURLzBwza9H-kxcy4ihw,60
282
- wandb/sdk/interface/interface.py,sha256=-q9mxz8RpHz5_UNKT91sP7w5sOqEFQKkY2B4teLe2vM,36626
282
+ wandb/sdk/interface/interface.py,sha256=coqmzkIQr8s_hzryIhID__5JHw-waMkE65ICv1KcFMQ,36439
283
283
  wandb/sdk/interface/interface_queue.py,sha256=7lbQz6VYamqYlNpkC-Ckrn5az_Yc9CrbnmwKNFtta44,1700
284
284
  wandb/sdk/interface/interface_relay.py,sha256=vQUrk5KESKInZsXpOxWF4YcWRZFLJjNz1mdNywbWbbE,1514
285
285
  wandb/sdk/interface/interface_shared.py,sha256=F6kkd8Aaq_nZALIprMgul0xDkSB8uG0HXJ0-94uEZNw,21276
@@ -309,7 +309,7 @@ wandb/sdk/internal/sample.py,sha256=USAWLhEeP83J13BVOSIy1Rb3kDDKTK9kzR88SlhO7dw,
309
309
  wandb/sdk/internal/sender.py,sha256=TPidmgTSE2gYlC4uh-32eNtI-XRgHEoYVVkC5F-saCQ,65328
310
310
  wandb/sdk/internal/sender_config.py,sha256=qEuXwOskca3sYyDIRsswlXmj9StCCS0WKQ1qrBXbIjw,6767
311
311
  wandb/sdk/internal/settings_static.py,sha256=1Dc2MoVCIskHo7rKafjtrVxY9sQWZMNeee39LYBe9t0,3668
312
- wandb/sdk/internal/tb_watcher.py,sha256=MpHESnP4UpTq24GnYcBrF1csupFzCVL4dET-f4dj-98,18717
312
+ wandb/sdk/internal/tb_watcher.py,sha256=3AvQGlZLGkr8POhaSGzbeyIcX0YWkLkblJ0bksAB8U8,18738
313
313
  wandb/sdk/internal/thread_local_settings.py,sha256=UqD6kfjsy6mvxIWcjhd-vJWkNRCeU1whuRe_-VGIklQ,527
314
314
  wandb/sdk/internal/writer.py,sha256=jo_Ex7ik-0_rIahYDHIWcQjm_uxsUNVn92__bI8TloE,7267
315
315
  wandb/sdk/internal/system/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -816,8 +816,8 @@ wandb/vendor/watchdog_0_9_0/wandb_watchdog/utils/importlib2.py,sha256=cJIaJ2EQso
816
816
  wandb/vendor/watchdog_0_9_0/wandb_watchdog/utils/platform.py,sha256=UORYTNVcUSE2NpFcq9UVLIS-tsS0TS_Qw8akhKxn2eY,1506
817
817
  wandb/vendor/watchdog_0_9_0/wandb_watchdog/utils/unicode_paths.py,sha256=UWX8DB97ygkEeSxWQUYCHR4MahNilux7vl5TCTQtPPk,2190
818
818
  wandb/vendor/watchdog_0_9_0/wandb_watchdog/utils/win32stat.py,sha256=ZOevOTbSo8NRiIxkuBVGaG4yigWnPoO0goxAi-jsBkM,3828
819
- wandb-0.19.2.dist-info/METADATA,sha256=IpB8Qg0TddJcHZwNDfVMZPAOLEDw10Lx1KyDY944YDM,10282
820
- wandb-0.19.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
821
- wandb-0.19.2.dist-info/entry_points.txt,sha256=v4FCOZ9gW7Pc6KLsmgQqpCiKTrA1wh2XHmNf-NUP1-I,67
822
- wandb-0.19.2.dist-info/licenses/LICENSE,sha256=izOKRJpGOx1PrJiGOKR0HsNdlB5JdH2d0Z4P7a7ssTc,1081
823
- wandb-0.19.2.dist-info/RECORD,,
819
+ wandb-0.19.4rc1.dist-info/METADATA,sha256=uyIurAspZwmJRHUtzVckSZv375aN1Lpvi7IqLuCgMbc,10285
820
+ wandb-0.19.4rc1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
821
+ wandb-0.19.4rc1.dist-info/entry_points.txt,sha256=v4FCOZ9gW7Pc6KLsmgQqpCiKTrA1wh2XHmNf-NUP1-I,67
822
+ wandb-0.19.4rc1.dist-info/licenses/LICENSE,sha256=izOKRJpGOx1PrJiGOKR0HsNdlB5JdH2d0Z4P7a7ssTc,1081
823
+ wandb-0.19.4rc1.dist-info/RECORD,,