pythagoras 0.21.2__tar.gz → 0.21.4__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.
- {pythagoras-0.21.2 → pythagoras-0.21.4}/PKG-INFO +1 -1
- {pythagoras-0.21.2 → pythagoras-0.21.4}/pyproject.toml +1 -1
- {pythagoras-0.21.2 → pythagoras-0.21.4}/src/pythagoras/_070_protected_code_portals/RAM_pre_validators.py +15 -14
- {pythagoras-0.21.2 → pythagoras-0.21.4}/src/pythagoras/_090_swarming_portals/swarming_portals.py +4 -3
- {pythagoras-0.21.2 → pythagoras-0.21.4}/src/pythagoras/core/__init__.py +2 -1
- {pythagoras-0.21.2 → pythagoras-0.21.4}/README.md +0 -0
- {pythagoras-0.21.2 → pythagoras-0.21.4}/src/pythagoras/.DS_Store +0 -0
- {pythagoras-0.21.2 → pythagoras-0.21.4}/src/pythagoras/_010_basic_portals/__init__.py +0 -0
- {pythagoras-0.21.2 → pythagoras-0.21.4}/src/pythagoras/_010_basic_portals/basic_portal_core_classes.py +0 -0
- {pythagoras-0.21.2 → pythagoras-0.21.4}/src/pythagoras/_010_basic_portals/exceptions.py +0 -0
- {pythagoras-0.21.2 → pythagoras-0.21.4}/src/pythagoras/_010_basic_portals/long_infoname.py +0 -0
- {pythagoras-0.21.2 → pythagoras-0.21.4}/src/pythagoras/_010_basic_portals/not_picklable_class.py +0 -0
- {pythagoras-0.21.2 → pythagoras-0.21.4}/src/pythagoras/_010_basic_portals/portal_tester.py +0 -0
- {pythagoras-0.21.2 → pythagoras-0.21.4}/src/pythagoras/_010_basic_portals/post_init_metaclass.py +0 -0
- {pythagoras-0.21.2 → pythagoras-0.21.4}/src/pythagoras/_020_ordinary_code_portals/__init__.py +0 -0
- {pythagoras-0.21.2 → pythagoras-0.21.4}/src/pythagoras/_020_ordinary_code_portals/code_normalizer.py +0 -0
- {pythagoras-0.21.2 → pythagoras-0.21.4}/src/pythagoras/_020_ordinary_code_portals/function_processing.py +0 -0
- {pythagoras-0.21.2 → pythagoras-0.21.4}/src/pythagoras/_020_ordinary_code_portals/ordinary_decorator.py +0 -0
- {pythagoras-0.21.2 → pythagoras-0.21.4}/src/pythagoras/_020_ordinary_code_portals/ordinary_portal_core_classes.py +0 -0
- {pythagoras-0.21.2 → pythagoras-0.21.4}/src/pythagoras/_030_data_portals/__init__.py +0 -0
- {pythagoras-0.21.2 → pythagoras-0.21.4}/src/pythagoras/_030_data_portals/data_portal_core_classes.py +0 -0
- {pythagoras-0.21.2 → pythagoras-0.21.4}/src/pythagoras/_030_data_portals/ready_and_get.py +0 -0
- {pythagoras-0.21.2 → pythagoras-0.21.4}/src/pythagoras/_030_data_portals/storable_decorator.py +0 -0
- {pythagoras-0.21.2 → pythagoras-0.21.4}/src/pythagoras/_040_logging_code_portals/__init__.py +0 -0
- {pythagoras-0.21.2 → pythagoras-0.21.4}/src/pythagoras/_040_logging_code_portals/exception_processing_tracking.py +0 -0
- {pythagoras-0.21.2 → pythagoras-0.21.4}/src/pythagoras/_040_logging_code_portals/execution_environment_summary.py +0 -0
- {pythagoras-0.21.2 → pythagoras-0.21.4}/src/pythagoras/_040_logging_code_portals/kw_args.py +0 -0
- {pythagoras-0.21.2 → pythagoras-0.21.4}/src/pythagoras/_040_logging_code_portals/logging_decorator.py +0 -0
- {pythagoras-0.21.2 → pythagoras-0.21.4}/src/pythagoras/_040_logging_code_portals/logging_portal_core_classes.py +0 -0
- {pythagoras-0.21.2 → pythagoras-0.21.4}/src/pythagoras/_040_logging_code_portals/notebook_checker.py +0 -0
- {pythagoras-0.21.2 → pythagoras-0.21.4}/src/pythagoras/_040_logging_code_portals/output_capturer.py +0 -0
- {pythagoras-0.21.2 → pythagoras-0.21.4}/src/pythagoras/_040_logging_code_portals/uncaught_exceptions.py +0 -0
- {pythagoras-0.21.2 → pythagoras-0.21.4}/src/pythagoras/_050_safe_code_portals/__init__.py +0 -0
- {pythagoras-0.21.2 → pythagoras-0.21.4}/src/pythagoras/_050_safe_code_portals/safe_decorator.py +0 -0
- {pythagoras-0.21.2 → pythagoras-0.21.4}/src/pythagoras/_050_safe_code_portals/safe_portal_core_classes.py +0 -0
- {pythagoras-0.21.2 → pythagoras-0.21.4}/src/pythagoras/_060_autonomous_code_portals/__init__.py +0 -0
- {pythagoras-0.21.2 → pythagoras-0.21.4}/src/pythagoras/_060_autonomous_code_portals/autonomous_decorators.py +0 -0
- {pythagoras-0.21.2 → pythagoras-0.21.4}/src/pythagoras/_060_autonomous_code_portals/autonomous_portal_core_classes.py +0 -0
- {pythagoras-0.21.2 → pythagoras-0.21.4}/src/pythagoras/_060_autonomous_code_portals/names_usage_analyzer.py +0 -0
- {pythagoras-0.21.2 → pythagoras-0.21.4}/src/pythagoras/_070_protected_code_portals/GPU_pre_validators.py +0 -0
- {pythagoras-0.21.2 → pythagoras-0.21.4}/src/pythagoras/_070_protected_code_portals/OK_const.py +0 -0
- {pythagoras-0.21.2 → pythagoras-0.21.4}/src/pythagoras/_070_protected_code_portals/__init__.py +0 -0
- {pythagoras-0.21.2 → pythagoras-0.21.4}/src/pythagoras/_070_protected_code_portals/fn_arg_names_checker.py +0 -0
- {pythagoras-0.21.2 → pythagoras-0.21.4}/src/pythagoras/_070_protected_code_portals/list_flattener.py +0 -0
- {pythagoras-0.21.2 → pythagoras-0.21.4}/src/pythagoras/_070_protected_code_portals/package_manager.py +0 -0
- {pythagoras-0.21.2 → pythagoras-0.21.4}/src/pythagoras/_070_protected_code_portals/protected_decorators.py +0 -0
- {pythagoras-0.21.2 → pythagoras-0.21.4}/src/pythagoras/_070_protected_code_portals/protected_portal_core_classes.py +0 -0
- {pythagoras-0.21.2 → pythagoras-0.21.4}/src/pythagoras/_070_protected_code_portals/python_packages_pre_validators.py +0 -0
- {pythagoras-0.21.2 → pythagoras-0.21.4}/src/pythagoras/_070_protected_code_portals/system_utils.py +0 -0
- {pythagoras-0.21.2 → pythagoras-0.21.4}/src/pythagoras/_070_protected_code_portals/validator_fn_classes.py +0 -0
- {pythagoras-0.21.2 → pythagoras-0.21.4}/src/pythagoras/_080_pure_code_portals/__init__.py +0 -0
- {pythagoras-0.21.2 → pythagoras-0.21.4}/src/pythagoras/_080_pure_code_portals/pure_core_classes.py +0 -0
- {pythagoras-0.21.2 → pythagoras-0.21.4}/src/pythagoras/_080_pure_code_portals/pure_decorator.py +0 -0
- {pythagoras-0.21.2 → pythagoras-0.21.4}/src/pythagoras/_090_swarming_portals/__init__.py +0 -0
- {pythagoras-0.21.2 → pythagoras-0.21.4}/src/pythagoras/_090_swarming_portals/output_suppressor.py +0 -0
- {pythagoras-0.21.2 → pythagoras-0.21.4}/src/pythagoras/_100_top_level_API/__init__.py +0 -0
- {pythagoras-0.21.2 → pythagoras-0.21.4}/src/pythagoras/_100_top_level_API/default_local_portal.py +0 -0
- {pythagoras-0.21.2 → pythagoras-0.21.4}/src/pythagoras/_100_top_level_API/top_level_API.py +0 -0
- {pythagoras-0.21.2 → pythagoras-0.21.4}/src/pythagoras/_800_signatures_and_converters/__init__.py +0 -0
- {pythagoras-0.21.2 → pythagoras-0.21.4}/src/pythagoras/_800_signatures_and_converters/base_16_32_convertors.py +0 -0
- {pythagoras-0.21.2 → pythagoras-0.21.4}/src/pythagoras/_800_signatures_and_converters/current_date_gmt_str.py +0 -0
- {pythagoras-0.21.2 → pythagoras-0.21.4}/src/pythagoras/_800_signatures_and_converters/hash_signatures.py +0 -0
- {pythagoras-0.21.2 → pythagoras-0.21.4}/src/pythagoras/_800_signatures_and_converters/node_signatures.py +0 -0
- {pythagoras-0.21.2 → pythagoras-0.21.4}/src/pythagoras/_800_signatures_and_converters/random_signatures.py +0 -0
- {pythagoras-0.21.2 → pythagoras-0.21.4}/src/pythagoras/_900_project_stats_collector/__init__.py +0 -0
- {pythagoras-0.21.2 → pythagoras-0.21.4}/src/pythagoras/_900_project_stats_collector/project_analyzer.py +0 -0
- {pythagoras-0.21.2 → pythagoras-0.21.4}/src/pythagoras/__init__.py +0 -0
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
from .._070_protected_code_portals import SimplePreValidatorFn
|
|
1
2
|
from .._060_autonomous_code_portals import autonomous
|
|
2
3
|
from .OK_const import OK, OKClass
|
|
3
4
|
from .system_utils import *
|
|
@@ -41,18 +42,18 @@ def at_least_X_G_RAM_free_check(x:int)->bool|OKClass:
|
|
|
41
42
|
else:
|
|
42
43
|
return False
|
|
43
44
|
|
|
44
|
-
def
|
|
45
|
-
assert isinstance(
|
|
46
|
-
assert
|
|
47
|
-
return at_least_X_G_RAM_free_check.fix_kwargs(x=
|
|
45
|
+
def unused_ram(Gb:int):
|
|
46
|
+
assert isinstance(Gb, int)
|
|
47
|
+
assert Gb > 0
|
|
48
|
+
return SimplePreValidatorFn(at_least_X_G_RAM_free_check.fix_kwargs(x=Gb))
|
|
48
49
|
|
|
49
|
-
at_least_1_G_RAM_free =
|
|
50
|
-
at_least_2_G_RAM_free =
|
|
51
|
-
at_least_4_G_RAM_free =
|
|
52
|
-
at_least_8_G_RAM_free =
|
|
53
|
-
at_least_16_G_RAM_free =
|
|
54
|
-
at_least_32_G_RAM_free =
|
|
55
|
-
at_least_64_G_RAM_free =
|
|
56
|
-
at_least_128_G_RAM_free =
|
|
57
|
-
at_least_256_G_RAM_free =
|
|
58
|
-
at_least_512_G_RAM_free =
|
|
50
|
+
at_least_1_G_RAM_free = unused_ram(Gb=1)
|
|
51
|
+
at_least_2_G_RAM_free = unused_ram(Gb=2)
|
|
52
|
+
at_least_4_G_RAM_free = unused_ram(Gb=4)
|
|
53
|
+
at_least_8_G_RAM_free = unused_ram(Gb=8)
|
|
54
|
+
at_least_16_G_RAM_free = unused_ram(Gb=16)
|
|
55
|
+
at_least_32_G_RAM_free = unused_ram(Gb=32)
|
|
56
|
+
at_least_64_G_RAM_free = unused_ram(Gb=64)
|
|
57
|
+
at_least_128_G_RAM_free = unused_ram(Gb=128)
|
|
58
|
+
at_least_256_G_RAM_free = unused_ram(Gb=256)
|
|
59
|
+
at_least_512_G_RAM_free = unused_ram(Gb=512)
|
{pythagoras-0.21.2 → pythagoras-0.21.4}/src/pythagoras/_090_swarming_portals/swarming_portals.py
RENAMED
|
@@ -9,7 +9,8 @@ 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 .._070_protected_code_portals.system_utils import
|
|
12
|
+
from .._070_protected_code_portals.system_utils import get_unused_ram_mb, get_unused_cpu_cores, process_is_active, \
|
|
13
|
+
get_process_start_time, get_current_process_id, get_current_process_start_time
|
|
13
14
|
from .._040_logging_code_portals.logging_portal_core_classes import build_execution_environment_summary
|
|
14
15
|
from .._010_basic_portals.basic_portal_core_classes import _describe_runtime_characteristic
|
|
15
16
|
from persidict import OverlappingMultiDict
|
|
@@ -130,9 +131,9 @@ class SwarmingPortal(PureCodePortal):
|
|
|
130
131
|
n = self._get_config_setting("max_n_workers")
|
|
131
132
|
if n in (None, KEEP_CURRENT):
|
|
132
133
|
n = 10
|
|
133
|
-
n = min(n, get_unused_cpu_cores())
|
|
134
|
+
n = min(n, get_unused_cpu_cores() + 2)
|
|
134
135
|
n = min(n, get_unused_ram_mb() / 500)
|
|
135
|
-
n = int(n)
|
|
136
|
+
n = int(n)
|
|
136
137
|
self._max_n_workers_cache = n
|
|
137
138
|
|
|
138
139
|
return self._max_n_workers_cache
|
|
@@ -2,4 +2,5 @@ from .._030_data_portals import ready, get
|
|
|
2
2
|
from .._060_autonomous_code_portals import autonomous
|
|
3
3
|
from .._080_pure_code_portals import pure
|
|
4
4
|
from .._090_swarming_portals import SwarmingPortal
|
|
5
|
-
from .._100_top_level_API import get_portal
|
|
5
|
+
from .._100_top_level_API import get_portal
|
|
6
|
+
from .._070_protected_code_portals import unused_ram
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pythagoras-0.21.2 → pythagoras-0.21.4}/src/pythagoras/_010_basic_portals/not_picklable_class.py
RENAMED
|
File without changes
|
|
File without changes
|
{pythagoras-0.21.2 → pythagoras-0.21.4}/src/pythagoras/_010_basic_portals/post_init_metaclass.py
RENAMED
|
File without changes
|
{pythagoras-0.21.2 → pythagoras-0.21.4}/src/pythagoras/_020_ordinary_code_portals/__init__.py
RENAMED
|
File without changes
|
{pythagoras-0.21.2 → pythagoras-0.21.4}/src/pythagoras/_020_ordinary_code_portals/code_normalizer.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pythagoras-0.21.2 → pythagoras-0.21.4}/src/pythagoras/_030_data_portals/data_portal_core_classes.py
RENAMED
|
File without changes
|
|
File without changes
|
{pythagoras-0.21.2 → pythagoras-0.21.4}/src/pythagoras/_030_data_portals/storable_decorator.py
RENAMED
|
File without changes
|
{pythagoras-0.21.2 → pythagoras-0.21.4}/src/pythagoras/_040_logging_code_portals/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pythagoras-0.21.2 → pythagoras-0.21.4}/src/pythagoras/_040_logging_code_portals/notebook_checker.py
RENAMED
|
File without changes
|
{pythagoras-0.21.2 → pythagoras-0.21.4}/src/pythagoras/_040_logging_code_portals/output_capturer.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pythagoras-0.21.2 → pythagoras-0.21.4}/src/pythagoras/_050_safe_code_portals/safe_decorator.py
RENAMED
|
File without changes
|
|
File without changes
|
{pythagoras-0.21.2 → pythagoras-0.21.4}/src/pythagoras/_060_autonomous_code_portals/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pythagoras-0.21.2 → pythagoras-0.21.4}/src/pythagoras/_070_protected_code_portals/OK_const.py
RENAMED
|
File without changes
|
{pythagoras-0.21.2 → pythagoras-0.21.4}/src/pythagoras/_070_protected_code_portals/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{pythagoras-0.21.2 → pythagoras-0.21.4}/src/pythagoras/_070_protected_code_portals/list_flattener.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pythagoras-0.21.2 → pythagoras-0.21.4}/src/pythagoras/_070_protected_code_portals/system_utils.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pythagoras-0.21.2 → pythagoras-0.21.4}/src/pythagoras/_080_pure_code_portals/pure_core_classes.py
RENAMED
|
File without changes
|
{pythagoras-0.21.2 → pythagoras-0.21.4}/src/pythagoras/_080_pure_code_portals/pure_decorator.py
RENAMED
|
File without changes
|
|
File without changes
|
{pythagoras-0.21.2 → pythagoras-0.21.4}/src/pythagoras/_090_swarming_portals/output_suppressor.py
RENAMED
|
File without changes
|
|
File without changes
|
{pythagoras-0.21.2 → pythagoras-0.21.4}/src/pythagoras/_100_top_level_API/default_local_portal.py
RENAMED
|
File without changes
|
|
File without changes
|
{pythagoras-0.21.2 → pythagoras-0.21.4}/src/pythagoras/_800_signatures_and_converters/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pythagoras-0.21.2 → pythagoras-0.21.4}/src/pythagoras/_900_project_stats_collector/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|