pythagoras 0.21.0__tar.gz → 0.21.2__tar.gz

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 (67) hide show
  1. {pythagoras-0.21.0 → pythagoras-0.21.2}/PKG-INFO +1 -1
  2. {pythagoras-0.21.0 → pythagoras-0.21.2}/pyproject.toml +1 -1
  3. {pythagoras-0.21.0 → pythagoras-0.21.2}/src/pythagoras/_070_protected_code_portals/RAM_pre_validators.py +1 -1
  4. {pythagoras-0.21.0 → pythagoras-0.21.2}/src/pythagoras/_070_protected_code_portals/system_utils.py +1 -1
  5. {pythagoras-0.21.0 → pythagoras-0.21.2}/src/pythagoras/_080_pure_code_portals/pure_core_classes.py +19 -19
  6. {pythagoras-0.21.0 → pythagoras-0.21.2}/src/pythagoras/_090_swarming_portals/swarming_portals.py +2 -2
  7. {pythagoras-0.21.0 → pythagoras-0.21.2}/README.md +0 -0
  8. {pythagoras-0.21.0 → pythagoras-0.21.2}/src/pythagoras/.DS_Store +0 -0
  9. {pythagoras-0.21.0 → pythagoras-0.21.2}/src/pythagoras/_010_basic_portals/__init__.py +0 -0
  10. {pythagoras-0.21.0 → pythagoras-0.21.2}/src/pythagoras/_010_basic_portals/basic_portal_core_classes.py +0 -0
  11. {pythagoras-0.21.0 → pythagoras-0.21.2}/src/pythagoras/_010_basic_portals/exceptions.py +0 -0
  12. {pythagoras-0.21.0 → pythagoras-0.21.2}/src/pythagoras/_010_basic_portals/long_infoname.py +0 -0
  13. {pythagoras-0.21.0 → pythagoras-0.21.2}/src/pythagoras/_010_basic_portals/not_picklable_class.py +0 -0
  14. {pythagoras-0.21.0 → pythagoras-0.21.2}/src/pythagoras/_010_basic_portals/portal_tester.py +0 -0
  15. {pythagoras-0.21.0 → pythagoras-0.21.2}/src/pythagoras/_010_basic_portals/post_init_metaclass.py +0 -0
  16. {pythagoras-0.21.0 → pythagoras-0.21.2}/src/pythagoras/_020_ordinary_code_portals/__init__.py +0 -0
  17. {pythagoras-0.21.0 → pythagoras-0.21.2}/src/pythagoras/_020_ordinary_code_portals/code_normalizer.py +0 -0
  18. {pythagoras-0.21.0 → pythagoras-0.21.2}/src/pythagoras/_020_ordinary_code_portals/function_processing.py +0 -0
  19. {pythagoras-0.21.0 → pythagoras-0.21.2}/src/pythagoras/_020_ordinary_code_portals/ordinary_decorator.py +0 -0
  20. {pythagoras-0.21.0 → pythagoras-0.21.2}/src/pythagoras/_020_ordinary_code_portals/ordinary_portal_core_classes.py +0 -0
  21. {pythagoras-0.21.0 → pythagoras-0.21.2}/src/pythagoras/_030_data_portals/__init__.py +0 -0
  22. {pythagoras-0.21.0 → pythagoras-0.21.2}/src/pythagoras/_030_data_portals/data_portal_core_classes.py +0 -0
  23. {pythagoras-0.21.0 → pythagoras-0.21.2}/src/pythagoras/_030_data_portals/ready_and_get.py +0 -0
  24. {pythagoras-0.21.0 → pythagoras-0.21.2}/src/pythagoras/_030_data_portals/storable_decorator.py +0 -0
  25. {pythagoras-0.21.0 → pythagoras-0.21.2}/src/pythagoras/_040_logging_code_portals/__init__.py +0 -0
  26. {pythagoras-0.21.0 → pythagoras-0.21.2}/src/pythagoras/_040_logging_code_portals/exception_processing_tracking.py +0 -0
  27. {pythagoras-0.21.0 → pythagoras-0.21.2}/src/pythagoras/_040_logging_code_portals/execution_environment_summary.py +0 -0
  28. {pythagoras-0.21.0 → pythagoras-0.21.2}/src/pythagoras/_040_logging_code_portals/kw_args.py +0 -0
  29. {pythagoras-0.21.0 → pythagoras-0.21.2}/src/pythagoras/_040_logging_code_portals/logging_decorator.py +0 -0
  30. {pythagoras-0.21.0 → pythagoras-0.21.2}/src/pythagoras/_040_logging_code_portals/logging_portal_core_classes.py +0 -0
  31. {pythagoras-0.21.0 → pythagoras-0.21.2}/src/pythagoras/_040_logging_code_portals/notebook_checker.py +0 -0
  32. {pythagoras-0.21.0 → pythagoras-0.21.2}/src/pythagoras/_040_logging_code_portals/output_capturer.py +0 -0
  33. {pythagoras-0.21.0 → pythagoras-0.21.2}/src/pythagoras/_040_logging_code_portals/uncaught_exceptions.py +0 -0
  34. {pythagoras-0.21.0 → pythagoras-0.21.2}/src/pythagoras/_050_safe_code_portals/__init__.py +0 -0
  35. {pythagoras-0.21.0 → pythagoras-0.21.2}/src/pythagoras/_050_safe_code_portals/safe_decorator.py +0 -0
  36. {pythagoras-0.21.0 → pythagoras-0.21.2}/src/pythagoras/_050_safe_code_portals/safe_portal_core_classes.py +0 -0
  37. {pythagoras-0.21.0 → pythagoras-0.21.2}/src/pythagoras/_060_autonomous_code_portals/__init__.py +0 -0
  38. {pythagoras-0.21.0 → pythagoras-0.21.2}/src/pythagoras/_060_autonomous_code_portals/autonomous_decorators.py +0 -0
  39. {pythagoras-0.21.0 → pythagoras-0.21.2}/src/pythagoras/_060_autonomous_code_portals/autonomous_portal_core_classes.py +0 -0
  40. {pythagoras-0.21.0 → pythagoras-0.21.2}/src/pythagoras/_060_autonomous_code_portals/names_usage_analyzer.py +0 -0
  41. {pythagoras-0.21.0 → pythagoras-0.21.2}/src/pythagoras/_070_protected_code_portals/GPU_pre_validators.py +0 -0
  42. {pythagoras-0.21.0 → pythagoras-0.21.2}/src/pythagoras/_070_protected_code_portals/OK_const.py +0 -0
  43. {pythagoras-0.21.0 → pythagoras-0.21.2}/src/pythagoras/_070_protected_code_portals/__init__.py +0 -0
  44. {pythagoras-0.21.0 → pythagoras-0.21.2}/src/pythagoras/_070_protected_code_portals/fn_arg_names_checker.py +0 -0
  45. {pythagoras-0.21.0 → pythagoras-0.21.2}/src/pythagoras/_070_protected_code_portals/list_flattener.py +0 -0
  46. {pythagoras-0.21.0 → pythagoras-0.21.2}/src/pythagoras/_070_protected_code_portals/package_manager.py +0 -0
  47. {pythagoras-0.21.0 → pythagoras-0.21.2}/src/pythagoras/_070_protected_code_portals/protected_decorators.py +0 -0
  48. {pythagoras-0.21.0 → pythagoras-0.21.2}/src/pythagoras/_070_protected_code_portals/protected_portal_core_classes.py +0 -0
  49. {pythagoras-0.21.0 → pythagoras-0.21.2}/src/pythagoras/_070_protected_code_portals/python_packages_pre_validators.py +0 -0
  50. {pythagoras-0.21.0 → pythagoras-0.21.2}/src/pythagoras/_070_protected_code_portals/validator_fn_classes.py +0 -0
  51. {pythagoras-0.21.0 → pythagoras-0.21.2}/src/pythagoras/_080_pure_code_portals/__init__.py +0 -0
  52. {pythagoras-0.21.0 → pythagoras-0.21.2}/src/pythagoras/_080_pure_code_portals/pure_decorator.py +0 -0
  53. {pythagoras-0.21.0 → pythagoras-0.21.2}/src/pythagoras/_090_swarming_portals/__init__.py +0 -0
  54. {pythagoras-0.21.0 → pythagoras-0.21.2}/src/pythagoras/_090_swarming_portals/output_suppressor.py +0 -0
  55. {pythagoras-0.21.0 → pythagoras-0.21.2}/src/pythagoras/_100_top_level_API/__init__.py +0 -0
  56. {pythagoras-0.21.0 → pythagoras-0.21.2}/src/pythagoras/_100_top_level_API/default_local_portal.py +0 -0
  57. {pythagoras-0.21.0 → pythagoras-0.21.2}/src/pythagoras/_100_top_level_API/top_level_API.py +0 -0
  58. {pythagoras-0.21.0 → pythagoras-0.21.2}/src/pythagoras/_800_signatures_and_converters/__init__.py +0 -0
  59. {pythagoras-0.21.0 → pythagoras-0.21.2}/src/pythagoras/_800_signatures_and_converters/base_16_32_convertors.py +0 -0
  60. {pythagoras-0.21.0 → pythagoras-0.21.2}/src/pythagoras/_800_signatures_and_converters/current_date_gmt_str.py +0 -0
  61. {pythagoras-0.21.0 → pythagoras-0.21.2}/src/pythagoras/_800_signatures_and_converters/hash_signatures.py +0 -0
  62. {pythagoras-0.21.0 → pythagoras-0.21.2}/src/pythagoras/_800_signatures_and_converters/node_signatures.py +0 -0
  63. {pythagoras-0.21.0 → pythagoras-0.21.2}/src/pythagoras/_800_signatures_and_converters/random_signatures.py +0 -0
  64. {pythagoras-0.21.0 → pythagoras-0.21.2}/src/pythagoras/_900_project_stats_collector/__init__.py +0 -0
  65. {pythagoras-0.21.0 → pythagoras-0.21.2}/src/pythagoras/_900_project_stats_collector/project_analyzer.py +0 -0
  66. {pythagoras-0.21.0 → pythagoras-0.21.2}/src/pythagoras/__init__.py +0 -0
  67. {pythagoras-0.21.0 → pythagoras-0.21.2}/src/pythagoras/core/__init__.py +0 -0
@@ -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
@@ -4,7 +4,7 @@ build-backend = "uv_build"
4
4
 
5
5
  [project]
6
6
  name = "pythagoras"
7
- version = "0.21.00"
7
+ version = "0.21.2"
8
8
  authors = [
9
9
  {name = "Volodymyr (Vlad) Pavlov", email = "vlpavlov@ieee.org"},
10
10
  ]
@@ -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
 
File without changes