pythagoras 0.20.8__tar.gz → 0.20.9__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.20.8 → pythagoras-0.20.9}/PKG-INFO +2 -2
- {pythagoras-0.20.8 → pythagoras-0.20.9}/README.md +1 -1
- {pythagoras-0.20.8 → pythagoras-0.20.9}/pyproject.toml +1 -1
- pythagoras-0.20.9/src/pythagoras/_100_top_level_API/__init__.py +2 -0
- pythagoras-0.20.9/src/pythagoras/_100_top_level_API/top_level_API.py +30 -0
- {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/core/__init__.py +2 -1
- pythagoras-0.20.8/src/pythagoras/_100_top_level_API/__init__.py +0 -2
- pythagoras-0.20.8/src/pythagoras/_100_top_level_API/top_level_API.py +0 -0
- {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/.DS_Store +0 -0
- {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_010_basic_portals/__init__.py +0 -0
- {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_010_basic_portals/basic_portal_core_classes.py +0 -0
- {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_010_basic_portals/exceptions.py +0 -0
- {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_010_basic_portals/long_infoname.py +0 -0
- {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_010_basic_portals/not_picklable_class.py +0 -0
- {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_010_basic_portals/portal_tester.py +0 -0
- {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_010_basic_portals/post_init_metaclass.py +0 -0
- {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_020_ordinary_code_portals/__init__.py +0 -0
- {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_020_ordinary_code_portals/code_normalizer.py +0 -0
- {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_020_ordinary_code_portals/function_processing.py +0 -0
- {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_020_ordinary_code_portals/ordinary_decorator.py +0 -0
- {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_020_ordinary_code_portals/ordinary_portal_core_classes.py +0 -0
- {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_030_data_portals/__init__.py +0 -0
- {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_030_data_portals/data_portal_core_classes.py +0 -0
- {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_030_data_portals/ready_and_get.py +0 -0
- {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_030_data_portals/storable_decorator.py +0 -0
- {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_040_logging_code_portals/__init__.py +0 -0
- {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_040_logging_code_portals/exception_processing_tracking.py +0 -0
- {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_040_logging_code_portals/execution_environment_summary.py +0 -0
- {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_040_logging_code_portals/kw_args.py +0 -0
- {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_040_logging_code_portals/logging_decorator.py +0 -0
- {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_040_logging_code_portals/logging_portal_core_classes.py +0 -0
- {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_040_logging_code_portals/notebook_checker.py +0 -0
- {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_040_logging_code_portals/output_capturer.py +0 -0
- {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_040_logging_code_portals/uncaught_exceptions.py +0 -0
- {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_050_safe_code_portals/__init__.py +0 -0
- {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_050_safe_code_portals/safe_decorator.py +0 -0
- {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_050_safe_code_portals/safe_portal_core_classes.py +0 -0
- {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_060_autonomous_code_portals/__init__.py +0 -0
- {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_060_autonomous_code_portals/autonomous_decorators.py +0 -0
- {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_060_autonomous_code_portals/autonomous_portal_core_classes.py +0 -0
- {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_060_autonomous_code_portals/names_usage_analyzer.py +0 -0
- {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_070_protected_code_portals/GPU_guards.py +0 -0
- {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_070_protected_code_portals/OK_const.py +0 -0
- {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_070_protected_code_portals/RAM_guards.py +0 -0
- {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_070_protected_code_portals/__init__.py +0 -0
- {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_070_protected_code_portals/fn_arg_names_checker.py +0 -0
- {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_070_protected_code_portals/list_flattener.py +0 -0
- {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_070_protected_code_portals/package_manager.py +0 -0
- {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_070_protected_code_portals/protected_decorators.py +0 -0
- {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_070_protected_code_portals/protected_portal_core_classes.py +0 -0
- {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_070_protected_code_portals/python_packages_guards.py +0 -0
- {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_080_pure_code_portals/__init__.py +0 -0
- {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_080_pure_code_portals/pure_core_classes.py +0 -0
- {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_080_pure_code_portals/pure_decorator.py +0 -0
- {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_090_swarming_portals/__init__.py +0 -0
- {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_090_swarming_portals/output_suppressor.py +0 -0
- {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_090_swarming_portals/swarming_portals.py +0 -0
- {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_090_swarming_portals/system_utils.py +0 -0
- {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_100_top_level_API/default_local_portal.py +0 -0
- {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_800_signatures_and_converters/__init__.py +0 -0
- {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_800_signatures_and_converters/base_16_32_convertors.py +0 -0
- {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_800_signatures_and_converters/current_date_gmt_str.py +0 -0
- {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_800_signatures_and_converters/hash_signatures.py +0 -0
- {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_800_signatures_and_converters/node_signatures.py +0 -0
- {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_800_signatures_and_converters/random_signatures.py +0 -0
- {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_900_project_stats_collector/__init__.py +0 -0
- {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_900_project_stats_collector/project_analyzer.py +0 -0
- {pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/__init__.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: pythagoras
|
|
3
|
-
Version: 0.20.
|
|
3
|
+
Version: 0.20.9
|
|
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
|
|
@@ -61,7 +61,7 @@ data science, machine learning, and AI workflows.
|
|
|
61
61
|
Pythagoras offers:
|
|
62
62
|
|
|
63
63
|
* seamless parallel execution of Python code, locally or
|
|
64
|
-
in diverse distributed environments of any scale;
|
|
64
|
+
in diverse distributed environments of virtually any scale;
|
|
65
65
|
* ubiquitous caching for intermediate program states,
|
|
66
66
|
with intelligent data and code change tracking;
|
|
67
67
|
* simple and budget-friendly orchestration backend.
|
|
@@ -11,7 +11,7 @@ data science, machine learning, and AI workflows.
|
|
|
11
11
|
Pythagoras offers:
|
|
12
12
|
|
|
13
13
|
* seamless parallel execution of Python code, locally or
|
|
14
|
-
in diverse distributed environments of any scale;
|
|
14
|
+
in diverse distributed environments of virtually any scale;
|
|
15
15
|
* ubiquitous caching for intermediate program states,
|
|
16
16
|
with intelligent data and code change tracking;
|
|
17
17
|
* simple and budget-friendly orchestration backend.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import os
|
|
2
|
+
from urllib.parse import urlparse
|
|
3
|
+
|
|
4
|
+
from .._090_swarming_portals import SwarmingPortal
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
def _is_valid_url(url: str) -> bool:
|
|
8
|
+
try:
|
|
9
|
+
result = urlparse(url)
|
|
10
|
+
return all([result.scheme, result.netloc])
|
|
11
|
+
except ValueError:
|
|
12
|
+
return False
|
|
13
|
+
|
|
14
|
+
def _is_valid_folder_name(path_str):
|
|
15
|
+
if os.path.isdir(path_str):
|
|
16
|
+
return True
|
|
17
|
+
try:
|
|
18
|
+
os.makedirs(path_str, exist_ok=True)
|
|
19
|
+
return True
|
|
20
|
+
except OSError:
|
|
21
|
+
return False
|
|
22
|
+
|
|
23
|
+
def get_portal(url_or_foldername:str) -> SwarmingPortal:
|
|
24
|
+
"""Create a return a portal object based on a URL or a directory. """
|
|
25
|
+
if _is_valid_folder_name(url_or_foldername):
|
|
26
|
+
return SwarmingPortal(url_or_foldername)
|
|
27
|
+
elif _is_valid_url(url_or_foldername):
|
|
28
|
+
raise NotImplementedError("URLы not supported yet ... stay turned")
|
|
29
|
+
else:
|
|
30
|
+
raise ValueError(f"Invalid folder name: {url_or_foldername}")
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
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
|
-
from .._090_swarming_portals import SwarmingPortal
|
|
4
|
+
from .._090_swarming_portals import SwarmingPortal
|
|
5
|
+
from .._100_top_level_API import get_portal
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_010_basic_portals/not_picklable_class.py
RENAMED
|
File without changes
|
|
File without changes
|
{pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_010_basic_portals/post_init_metaclass.py
RENAMED
|
File without changes
|
{pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_020_ordinary_code_portals/__init__.py
RENAMED
|
File without changes
|
{pythagoras-0.20.8 → pythagoras-0.20.9}/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.20.8 → pythagoras-0.20.9}/src/pythagoras/_030_data_portals/data_portal_core_classes.py
RENAMED
|
File without changes
|
|
File without changes
|
{pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_030_data_portals/storable_decorator.py
RENAMED
|
File without changes
|
{pythagoras-0.20.8 → pythagoras-0.20.9}/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.20.8 → pythagoras-0.20.9}/src/pythagoras/_040_logging_code_portals/notebook_checker.py
RENAMED
|
File without changes
|
{pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_040_logging_code_portals/output_capturer.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_050_safe_code_portals/safe_decorator.py
RENAMED
|
File without changes
|
|
File without changes
|
{pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_060_autonomous_code_portals/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_070_protected_code_portals/GPU_guards.py
RENAMED
|
File without changes
|
{pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_070_protected_code_portals/OK_const.py
RENAMED
|
File without changes
|
{pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_070_protected_code_portals/RAM_guards.py
RENAMED
|
File without changes
|
{pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_070_protected_code_portals/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{pythagoras-0.20.8 → pythagoras-0.20.9}/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
|
|
File without changes
|
{pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_080_pure_code_portals/pure_core_classes.py
RENAMED
|
File without changes
|
{pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_080_pure_code_portals/pure_decorator.py
RENAMED
|
File without changes
|
|
File without changes
|
{pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_090_swarming_portals/output_suppressor.py
RENAMED
|
File without changes
|
{pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_090_swarming_portals/swarming_portals.py
RENAMED
|
File without changes
|
{pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_090_swarming_portals/system_utils.py
RENAMED
|
File without changes
|
{pythagoras-0.20.8 → pythagoras-0.20.9}/src/pythagoras/_100_top_level_API/default_local_portal.py
RENAMED
|
File without changes
|
{pythagoras-0.20.8 → pythagoras-0.20.9}/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.20.8 → pythagoras-0.20.9}/src/pythagoras/_900_project_stats_collector/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|