pythagoras 0.20.10__py3-none-any.whl → 0.20.51__py3-none-any.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.
@@ -138,7 +138,7 @@ class SwarmingPortal(PureCodePortal):
138
138
  n = 10
139
139
  n = min(n, get_available_cpu_cores())
140
140
  n = min(n, get_available_ram_mb() / 500)
141
- n = int(n)
141
+ n = int(n)+1
142
142
  self._max_n_workers_cache = n
143
143
 
144
144
  return self._max_n_workers_cache
@@ -190,8 +190,8 @@ parameterizable.register_parameterizable_class(SwarmingPortal)
190
190
  def _launch_many_background_workers(**portal_init_params) -> None:
191
191
  """Launch many background worker processes."""
192
192
  n_workers_to_launch = portal_init_params["max_n_workers"]
193
- n_workers_to_launch = min(n_workers_to_launch, get_available_cpu_cores())
194
- n_workers_to_launch = min(n_workers_to_launch, get_available_ram_mb()/500)
193
+ n_workers_to_launch = int(n_workers_to_launch)
194
+
195
195
  portal_init_params["max_n_workers"] = 0
196
196
  current_process_id = get_current_process_id()
197
197
  portal_init_params["parent_process_id"] = current_process_id
@@ -207,7 +207,6 @@ def _launch_many_background_workers(**portal_init_params) -> None:
207
207
 
208
208
  list_of_all_workers = []
209
209
 
210
- n_workers_to_launch = int(n_workers_to_launch)
211
210
  with portal:
212
211
  for i in range(n_workers_to_launch):
213
212
  portal._randomly_delay_execution(p=1)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: pythagoras
3
- Version: 0.20.10
3
+ Version: 0.20.51
4
4
  Summary: Planet-scale distributed computing in Python.
5
5
  Keywords: cloud,ML,AI,serverless,distributed,parallel,machine-learning,deep-learning,pythagoras
6
6
  Author: Volodymyr (Vlad) Pavlov
@@ -46,7 +46,7 @@ pythagoras/_080_pure_code_portals/pure_core_classes.py,sha256=73167f9aab4c91f5a0
46
46
  pythagoras/_080_pure_code_portals/pure_decorator.py,sha256=d908ad5eae50e59eeab32f738f784605708e00de71dd53dcbf25efecb83d110d,1168
47
47
  pythagoras/_090_swarming_portals/__init__.py,sha256=7041578f84ffa291f2752c7a2168007b9113f99482f0173f3729171b3bff551a,32
48
48
  pythagoras/_090_swarming_portals/output_suppressor.py,sha256=83e6cc9bcc62a226babb1165912ef5095ea948499ce5136a7516ac8b54522607,626
49
- pythagoras/_090_swarming_portals/swarming_portals.py,sha256=92f0f95c25775e98bce777e007774b6dcbad27351a41f053c498c47e5519b753,12019
49
+ pythagoras/_090_swarming_portals/swarming_portals.py,sha256=90899042bf2b3c2b094ff6e5b67d8f84a32452f8c728b9ca5b37c524bc9163d4,11865
50
50
  pythagoras/_090_swarming_portals/system_utils.py,sha256=d125a0b705b9f8477712179c49441daaf2cd2b0b0d4494b6ac977b2df87b50b5,1370
51
51
  pythagoras/_100_top_level_API/__init__.py,sha256=b392edc2c918da7c2444f14accfd0fac2cd0d5cf6849c64ed2433dfdb58b8b75,64
52
52
  pythagoras/_100_top_level_API/default_local_portal.py,sha256=cfbe20499fed2f038b507b44fb58bb4cb6ea2fbe2fe93a3ab5ad7f3ac655005f,215
@@ -61,6 +61,6 @@ pythagoras/_900_project_stats_collector/__init__.py,sha256=e3b0c44298fc1c149afbf
61
61
  pythagoras/_900_project_stats_collector/project_analyzer.py,sha256=d06e9d7b516cb7424ef777e70abe9d5220e09b0b19476326b8974b4dc3917f89,3506
62
62
  pythagoras/__init__.py,sha256=94303c01a7bde4078fdbd90c0b142807a023fa352c473c3a544a2180b7254ae9,1062
63
63
  pythagoras/core/__init__.py,sha256=a6c3ec6f7d3e69221be505fd344061b774b0eb5c2f18431f39abb9426cb5d0cc,233
64
- pythagoras-0.20.10.dist-info/WHEEL,sha256=1f21b63a61110964f543b6041e8b7da078f20c09d500a32cb79eee5c3d655f54,79
65
- pythagoras-0.20.10.dist-info/METADATA,sha256=855a563ba37a03a947eafd7fed54aa24e0ff4bf7d5839ee0e9efabf459ed42f6,4188
66
- pythagoras-0.20.10.dist-info/RECORD,,
64
+ pythagoras-0.20.51.dist-info/WHEEL,sha256=1f21b63a61110964f543b6041e8b7da078f20c09d500a32cb79eee5c3d655f54,79
65
+ pythagoras-0.20.51.dist-info/METADATA,sha256=907d7e1fee47ae1938e9dfefa7a9d7cb22ca6e1d9b6f901318c0425af2bb8a1a,4188
66
+ pythagoras-0.20.51.dist-info/RECORD,,