pythagoras 0.21.0__py3-none-any.whl → 0.21.2__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.
@@ -35,7 +35,7 @@ from .system_utils import *
35
35
 
36
36
  @autonomous()
37
37
  def at_least_X_G_RAM_free_check(x:int)->bool|OKClass:
38
- ram = pth.get_available_ram_mb()/1024
38
+ ram = pth.get_unused_ram_mb() / 1024
39
39
  if ram >= x:
40
40
  return pth.OK
41
41
  else:
@@ -2,7 +2,7 @@ import os
2
2
  import psutil
3
3
  import pynvml
4
4
 
5
- def get_available_ram_mb() -> int:
5
+ def get_unused_ram_mb() -> int:
6
6
  """Returns the amount of available RAM in MB. """
7
7
  free_ram = psutil.virtual_memory().available / (1024 * 1024)
8
8
  return int(free_ram)
@@ -5,7 +5,7 @@ from copy import copy
5
5
  from typing import Callable, Any, List, TypeAlias
6
6
 
7
7
  import pandas as pd
8
- from sklearn.model_selection import ParameterGrid
8
+ # from sklearn.model_selection import ParameterGrid
9
9
 
10
10
  from persidict import PersiDict, Joker, KEEP_CURRENT
11
11
 
@@ -207,24 +207,24 @@ class PureFn(ProtectedFn):
207
207
  return addrs
208
208
 
209
209
 
210
- def swarm_grid(
211
- self
212
- , grid_of_kwargs:dict[str, list] # refactor
213
- ) -> list[PureFnExecutionResultAddr]:
214
- with self.portal:
215
- param_list = list(ParameterGrid(grid_of_kwargs))
216
- addrs = self.swarm_list(param_list)
217
- return addrs
218
-
219
-
220
- def run_grid(
221
- self
222
- , grid_of_kwargs:dict[str, list] # refactor
223
- ) -> list[PureFnExecutionResultAddr]:
224
- with self.portal:
225
- param_list = list(ParameterGrid(grid_of_kwargs))
226
- addrs = self.run_list(param_list)
227
- return addrs
210
+ # def swarm_grid(
211
+ # self
212
+ # , grid_of_kwargs:dict[str, list] # refactor
213
+ # ) -> list[PureFnExecutionResultAddr]:
214
+ # with self.portal:
215
+ # param_list = list(ParameterGrid(grid_of_kwargs))
216
+ # addrs = self.swarm_list(param_list)
217
+ # return addrs
218
+ #
219
+ #
220
+ # def run_grid(
221
+ # self
222
+ # , grid_of_kwargs:dict[str, list] # refactor
223
+ # ) -> list[PureFnExecutionResultAddr]:
224
+ # with self.portal:
225
+ # param_list = list(ParameterGrid(grid_of_kwargs))
226
+ # addrs = self.run_list(param_list)
227
+ # return addrs
228
228
 
229
229
 
230
230
  @property
@@ -9,7 +9,7 @@ from parameterizable import sort_dict_by_keys
9
9
  from persidict import PersiDict, Joker, KEEP_CURRENT
10
10
 
11
11
  from .._010_basic_portals import get_all_known_portals
12
- from pythagoras._070_protected_code_portals.system_utils import *
12
+ from .._070_protected_code_portals.system_utils import *
13
13
  from .._040_logging_code_portals.logging_portal_core_classes import build_execution_environment_summary
14
14
  from .._010_basic_portals.basic_portal_core_classes import _describe_runtime_characteristic
15
15
  from persidict import OverlappingMultiDict
@@ -131,7 +131,7 @@ class SwarmingPortal(PureCodePortal):
131
131
  if n in (None, KEEP_CURRENT):
132
132
  n = 10
133
133
  n = min(n, get_unused_cpu_cores())
134
- n = min(n, get_available_ram_mb() / 500)
134
+ n = min(n, get_unused_ram_mb() / 500)
135
135
  n = int(n)+1
136
136
  self._max_n_workers_cache = n
137
137
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: pythagoras
3
- Version: 0.21.0
3
+ Version: 0.21.2
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
@@ -33,7 +33,7 @@ pythagoras/_060_autonomous_code_portals/autonomous_portal_core_classes.py,sha256
33
33
  pythagoras/_060_autonomous_code_portals/names_usage_analyzer.py,sha256=1e0e84854ac630b204878fecde48a16739fd2663709fcee2ec0a8844f4fd4f13,7470
34
34
  pythagoras/_070_protected_code_portals/GPU_pre_validators.py,sha256=e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855,0
35
35
  pythagoras/_070_protected_code_portals/OK_const.py,sha256=17ea314496f44b422f9936585c3bb3749c960bc779b4f74962ec04e3fa4d2494,186
36
- pythagoras/_070_protected_code_portals/RAM_pre_validators.py,sha256=7d7df50788326b5d3ba4fbe0d031ba8975eb06aeb7d971ba531888d7d40846cb,1756
36
+ pythagoras/_070_protected_code_portals/RAM_pre_validators.py,sha256=2b485d96fa9a375d4ebf724ea206cb7e28712f36d3a76dae4f1124156ebf364f,1755
37
37
  pythagoras/_070_protected_code_portals/__init__.py,sha256=4bb7fc29f18fc5018388f6f0c0f4ec66c29185f9e1396f9d106cc8c14ad61fc4,247
38
38
  pythagoras/_070_protected_code_portals/fn_arg_names_checker.py,sha256=e858ce5099868030a39057177f93a893e13d7a210582e6ab636aaaccec898fb0,1230
39
39
  pythagoras/_070_protected_code_portals/list_flattener.py,sha256=9a54b512ad9dc201db348e7908f5ca5f36d171ae3da433511d38023a6ba8d4b5,331
@@ -41,14 +41,14 @@ pythagoras/_070_protected_code_portals/package_manager.py,sha256=30adf8d75f55b9b
41
41
  pythagoras/_070_protected_code_portals/protected_decorators.py,sha256=17459a1ad08e3e95f314636e670bce1dcc992631e38d1c08c5e55f3ee1459c2c,1613
42
42
  pythagoras/_070_protected_code_portals/protected_portal_core_classes.py,sha256=899cf52300deec302c96c6d240651115957f714760e7169640206684bc6a854b,8057
43
43
  pythagoras/_070_protected_code_portals/python_packages_pre_validators.py,sha256=a4ff97c250cbc94ad379edcab510fe10d4d590de9733bbff437bed71c025cecb,1025
44
- pythagoras/_070_protected_code_portals/system_utils.py,sha256=dc584ffaca353ce23eff9f82bc2ccf19df667ced10996bda922a07298442d193,2363
44
+ pythagoras/_070_protected_code_portals/system_utils.py,sha256=878a22110140c852b3aaf774cb0c0023458360a4ae221fef89ff3a5d02176301,2360
45
45
  pythagoras/_070_protected_code_portals/validator_fn_classes.py,sha256=4afa4bf0629f68e4b1623003272ffd7111ac9cbb739e81fde601049d19b84269,3232
46
46
  pythagoras/_080_pure_code_portals/__init__.py,sha256=8ed33435bb03d96675537fc6a696625332f971698d56c6b22b5ca1bc9d1b4274,1856
47
- pythagoras/_080_pure_code_portals/pure_core_classes.py,sha256=503f4d97e2cfa2053572a71ad44dd647b1e13e2f204aff0838b69a21a124e016,18960
47
+ pythagoras/_080_pure_code_portals/pure_core_classes.py,sha256=93867a68efa491b719b587b8e2f235cc48df792120e1278f6600afed039e1826,19004
48
48
  pythagoras/_080_pure_code_portals/pure_decorator.py,sha256=fd7acf43f2735146a4195d2a29d22e545f57b922489cd3baea7d9e4b5b88b5ae,1373
49
49
  pythagoras/_090_swarming_portals/__init__.py,sha256=7041578f84ffa291f2752c7a2168007b9113f99482f0173f3729171b3bff551a,32
50
50
  pythagoras/_090_swarming_portals/output_suppressor.py,sha256=83e6cc9bcc62a226babb1165912ef5095ea948499ce5136a7516ac8b54522607,626
51
- pythagoras/_090_swarming_portals/swarming_portals.py,sha256=9c8fd9fa737508c90eea29bf03fe596ef3181596ea0c07a3485711b173962655,11584
51
+ pythagoras/_090_swarming_portals/swarming_portals.py,sha256=f3e62a23287861bcf08191025d42078f15889fad9127fc9bc548faf12565708a,11572
52
52
  pythagoras/_100_top_level_API/__init__.py,sha256=b392edc2c918da7c2444f14accfd0fac2cd0d5cf6849c64ed2433dfdb58b8b75,64
53
53
  pythagoras/_100_top_level_API/default_local_portal.py,sha256=cfbe20499fed2f038b507b44fb58bb4cb6ea2fbe2fe93a3ab5ad7f3ac655005f,215
54
54
  pythagoras/_100_top_level_API/top_level_API.py,sha256=4b63575b86df2fdf28e93c67e8d33411e05bd67cf016d3d297ec9635ebc04081,906
@@ -62,6 +62,6 @@ pythagoras/_900_project_stats_collector/__init__.py,sha256=e3b0c44298fc1c149afbf
62
62
  pythagoras/_900_project_stats_collector/project_analyzer.py,sha256=d06e9d7b516cb7424ef777e70abe9d5220e09b0b19476326b8974b4dc3917f89,3506
63
63
  pythagoras/__init__.py,sha256=13b5aaf4128704dea052fc03a3a3488f1b14c3638dec45a9a29c74a4fbed7e24,1089
64
64
  pythagoras/core/__init__.py,sha256=a6c3ec6f7d3e69221be505fd344061b774b0eb5c2f18431f39abb9426cb5d0cc,233
65
- pythagoras-0.21.0.dist-info/WHEEL,sha256=607c46fee47e440c91332c738096ff0f5e54ca3b0818ee85462dd5172a38e793,79
66
- pythagoras-0.21.0.dist-info/METADATA,sha256=bba6bfba66b2a354786f2d914cd845130f9af11819ec872a3c910ab6e58025fc,4241
67
- pythagoras-0.21.0.dist-info/RECORD,,
65
+ pythagoras-0.21.2.dist-info/WHEEL,sha256=607c46fee47e440c91332c738096ff0f5e54ca3b0818ee85462dd5172a38e793,79
66
+ pythagoras-0.21.2.dist-info/METADATA,sha256=7cd63d9c49b121a010cedc180c7ba91cc83826d3f1d05b982ca09b8090f5eb34,4241
67
+ pythagoras-0.21.2.dist-info/RECORD,,