scalable-pypeline 2.0.10__py2.py3-none-any.whl → 2.1.1__py2.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.
- pypeline/__init__.py +1 -1
- pypeline/barrier.py +3 -0
- pypeline/dramatiq.py +26 -154
- pypeline/flask/api/pipelines.py +60 -4
- pypeline/flask/api/schedules.py +1 -3
- pypeline/pipeline_config_schema.py +91 -3
- pypeline/pipeline_settings_schema.py +541 -0
- pypeline/pipelines/__init__.py +0 -0
- pypeline/pipelines/composition/__init__.py +0 -0
- pypeline/pipelines/composition/pypeline_composition.py +188 -0
- pypeline/pipelines/factory.py +107 -0
- pypeline/pipelines/middleware/__init__.py +0 -0
- pypeline/pipelines/middleware/pypeline_middleware.py +188 -0
- pypeline/utils/dramatiq_utils.py +126 -0
- pypeline/utils/module_utils.py +27 -2
- pypeline/utils/pipeline_utils.py +22 -37
- pypeline/utils/schema_utils.py +24 -0
- {scalable_pypeline-2.0.10.dist-info → scalable_pypeline-2.1.1.dist-info}/METADATA +1 -1
- scalable_pypeline-2.1.1.dist-info/RECORD +36 -0
- scalable_pypeline-2.0.10.dist-info/RECORD +0 -27
- /pypeline/{composition.py → pipelines/composition/parallel_pipeline_composition.py} +0 -0
- /pypeline/{middleware.py → pipelines/middleware/parallel_pipeline_middleware.py} +0 -0
- {scalable_pypeline-2.0.10.dist-info → scalable_pypeline-2.1.1.dist-info}/LICENSE +0 -0
- {scalable_pypeline-2.0.10.dist-info → scalable_pypeline-2.1.1.dist-info}/WHEEL +0 -0
- {scalable_pypeline-2.0.10.dist-info → scalable_pypeline-2.1.1.dist-info}/entry_points.txt +0 -0
- {scalable_pypeline-2.0.10.dist-info → scalable_pypeline-2.1.1.dist-info}/top_level.txt +0 -0
pypeline/utils/pipeline_utils.py
CHANGED
@@ -1,10 +1,7 @@
|
|
1
1
|
import logging
|
2
2
|
import typing
|
3
3
|
import networkx as nx
|
4
|
-
|
5
|
-
from pypeline.composition import parallel_pipeline
|
6
|
-
from pypeline.dramatiq import LazyActor, get_callable, register_lazy_actor
|
7
|
-
from pypeline.utils.config_utils import retrieve_latest_pipeline_config
|
4
|
+
|
8
5
|
|
9
6
|
T = typing.TypeVar("T") # T can be any type
|
10
7
|
|
@@ -124,36 +121,24 @@ def topological_sort_with_parallelism(
|
|
124
121
|
return topological_sort_with_parallelism(graph, executable_nodes)
|
125
122
|
|
126
123
|
|
127
|
-
def
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
if args and not kwargs:
|
149
|
-
message_group.append(registered_actors[task].message(*args))
|
150
|
-
elif kwargs and not args:
|
151
|
-
message_group.append(registered_actors[task].message(**kwargs))
|
152
|
-
elif args and kwargs:
|
153
|
-
message_group.append(registered_actors[task].message(*args, **kwargs))
|
154
|
-
else:
|
155
|
-
message_group.append(registered_actors[task].message())
|
156
|
-
messages.append(message_group)
|
157
|
-
p = parallel_pipeline(messages)
|
158
|
-
|
159
|
-
return p
|
124
|
+
def plt_execution_tree(G):
|
125
|
+
import networkx as nx
|
126
|
+
import matplotlib.pyplot as plt
|
127
|
+
|
128
|
+
# Draw the graph
|
129
|
+
plt.figure(figsize=(8, 6))
|
130
|
+
pos = nx.spring_layout(G) # Compute positions for nodes
|
131
|
+
nx.draw(
|
132
|
+
G,
|
133
|
+
pos,
|
134
|
+
with_labels=True,
|
135
|
+
node_color="lightblue",
|
136
|
+
node_size=3000,
|
137
|
+
edge_color="gray",
|
138
|
+
arrowsize=20,
|
139
|
+
font_size=12,
|
140
|
+
)
|
141
|
+
|
142
|
+
# Show the plot
|
143
|
+
plt.title("Directed Graph Visualization")
|
144
|
+
plt.show()
|
@@ -0,0 +1,24 @@
|
|
1
|
+
def get_clean_validation_messages(validation_error):
|
2
|
+
"""
|
3
|
+
Extract and format clean validation error messages.
|
4
|
+
|
5
|
+
Args:
|
6
|
+
validation_error (ValidationError): The Marshmallow ValidationError instance.
|
7
|
+
|
8
|
+
Returns:
|
9
|
+
str: A formatted string with all validation error messages.
|
10
|
+
"""
|
11
|
+
|
12
|
+
def format_errors(errors, parent_key=""):
|
13
|
+
messages = []
|
14
|
+
for key, value in errors.items():
|
15
|
+
full_key = f"{parent_key}.{key}" if parent_key else key
|
16
|
+
if isinstance(value, dict):
|
17
|
+
# Recursively format nested errors
|
18
|
+
messages.extend(format_errors(value, full_key))
|
19
|
+
else:
|
20
|
+
# Append error messages
|
21
|
+
messages.append(f"{full_key}: {', '.join(value)}")
|
22
|
+
return messages
|
23
|
+
|
24
|
+
return "\n".join(format_errors(validation_error.messages))
|
@@ -0,0 +1,36 @@
|
|
1
|
+
pypeline/__init__.py,sha256=zPJIgPGcoSNiD0qme18OnYJYE3A9VVytlhO-V5DaAW0,22
|
2
|
+
pypeline/barrier.py,sha256=oO964l9qOCOibweOHyNivmAvufdXOke9nz2tdgclouo,1172
|
3
|
+
pypeline/constants.py,sha256=coiF8dMP25qIwoNYSnS7oy7hCd4-5yqPFmdPsN93Q1A,2892
|
4
|
+
pypeline/dramatiq.py,sha256=LWsl0o0t5FdxewIl87ARZKrNK0ENoYJEJAEVDSNFa40,12272
|
5
|
+
pypeline/extensions.py,sha256=BzOTnXhNxap3N7uIUUh_hO6dDwx08Vc_RJDE93_K0Lo,610
|
6
|
+
pypeline/pipeline_config_schema.py,sha256=hK2_egtg-YFx_XJDs_NyrOTGKkel7W83X-G0sic52sM,10592
|
7
|
+
pypeline/pipeline_settings_schema.py,sha256=84AuNFYsOUpoADsjEo_n9T6Ica-c21oK_V9s15I4lCg,20212
|
8
|
+
pypeline/pypeline_yaml.py,sha256=Og08sUKwOjq7JYPnkg-NIcGbHravYCkC5Arz22rZEtA,16981
|
9
|
+
pypeline/schedule_config_schema.py,sha256=vtZV-5wpGcAiYcXxdBPRkrjsbR6x_9E-1PC2elrKKbE,3611
|
10
|
+
pypeline/flask/__init__.py,sha256=AdljRh0lMiS8ExgDmgzObwVs8jW7hqQuf83Ml8kn8GQ,491
|
11
|
+
pypeline/flask/decorators.py,sha256=ki6jkjZwbDbCWuj7ET7N-ncZwrASp4Fy7257WIYiAAQ,1102
|
12
|
+
pypeline/flask/flask_pypeline.py,sha256=Uqyu3PnSP3DoVZUJPqV9chjT4xdRgvcL3OMXxkbdTEg,5490
|
13
|
+
pypeline/flask/api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
14
|
+
pypeline/flask/api/pipelines.py,sha256=8Y5dkIVb32dMc0jBI7lB2sQgsAIe7WYmPn-G9tlUY5o,10161
|
15
|
+
pypeline/flask/api/schedules.py,sha256=8PKCMdPucaer8opchNlI5aDssK2UqT79hHpeg5BMtTA,1210
|
16
|
+
pypeline/pipelines/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
17
|
+
pypeline/pipelines/factory.py,sha256=4HNGUJzYtgBOWP7fStXF0M61CYNAid9l9PGru9HyhXA,4115
|
18
|
+
pypeline/pipelines/composition/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
19
|
+
pypeline/pipelines/composition/parallel_pipeline_composition.py,sha256=pTw9Xb9h4JnV4siFc3JStm5lB-i9djUADo3Kh5K3s7g,12976
|
20
|
+
pypeline/pipelines/composition/pypeline_composition.py,sha256=ieTuQZ8zxTtvmPEkrWFbItjGtvO3JUotXcR-Jim2mss,7204
|
21
|
+
pypeline/pipelines/middleware/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
22
|
+
pypeline/pipelines/middleware/parallel_pipeline_middleware.py,sha256=kTp6niYoe2nXIiN6EGRfdpxrJyioo0GPxDkfefbGlEk,2821
|
23
|
+
pypeline/pipelines/middleware/pypeline_middleware.py,sha256=kvt5A9OxDwpIo0PsH11Im62tH6VquUc6OFoZDw2Gxsk,8036
|
24
|
+
pypeline/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
25
|
+
pypeline/utils/config_utils.py,sha256=rAIATyoW7kGETZ_Z2DqiXtGd7bJp5uPfcLtfNPOYsNs,2167
|
26
|
+
pypeline/utils/dramatiq_utils.py,sha256=5GDcOvKY-8S8r---wb6Q8QAywhbKVJ-qILjcYNHei8Y,3658
|
27
|
+
pypeline/utils/module_utils.py,sha256=-yEJIukDCoXnmlZVXB6Dww25tH6GdPE5SoFqv6pfdVU,3682
|
28
|
+
pypeline/utils/pipeline_utils.py,sha256=kGP1QwCJikGC5QNRtzRXCDVewyRMpWIqERTNnxGLlSY,4795
|
29
|
+
pypeline/utils/schema_utils.py,sha256=Fgl0y9Cuo_TZeEx_S3gaSVnLjn6467LTkjb2ek7Ms98,851
|
30
|
+
tests/fixtures/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
31
|
+
scalable_pypeline-2.1.1.dist-info/LICENSE,sha256=DVQuDIgE45qn836wDaWnYhSdxoLXgpRRKH4RuTjpRZQ,10174
|
32
|
+
scalable_pypeline-2.1.1.dist-info/METADATA,sha256=wgJ50QCkHF7mvEqD1XN4X6x3XVbb7Ne2dso-NWe7Qsc,5926
|
33
|
+
scalable_pypeline-2.1.1.dist-info/WHEEL,sha256=bb2Ot9scclHKMOLDEHY6B2sicWOgugjFKaJsT7vwMQo,110
|
34
|
+
scalable_pypeline-2.1.1.dist-info/entry_points.txt,sha256=uWs10ODfHSBKo2Cx_QaUjPHQTpZ3e77j9VlAdRRmMyg,119
|
35
|
+
scalable_pypeline-2.1.1.dist-info/top_level.txt,sha256=C7dpkEOc_-nnsAQb28BfQknjD6XHRyS9ZrvVeoIbV7s,15
|
36
|
+
scalable_pypeline-2.1.1.dist-info/RECORD,,
|
@@ -1,27 +0,0 @@
|
|
1
|
-
pypeline/__init__.py,sha256=QvVarwQu86KS14HXwAYbCqU1tjzA5eNjQxH2V34_iIU,23
|
2
|
-
pypeline/barrier.py,sha256=dLDaprH5NB-C7MQjZqPpBBhMjmO0VV_kTonlgweznHc,1096
|
3
|
-
pypeline/composition.py,sha256=pTw9Xb9h4JnV4siFc3JStm5lB-i9djUADo3Kh5K3s7g,12976
|
4
|
-
pypeline/constants.py,sha256=coiF8dMP25qIwoNYSnS7oy7hCd4-5yqPFmdPsN93Q1A,2892
|
5
|
-
pypeline/dramatiq.py,sha256=Y909HoNhH5Berd61N6nHrpE1dTU-zmvimH91SldP-SI,15912
|
6
|
-
pypeline/extensions.py,sha256=BzOTnXhNxap3N7uIUUh_hO6dDwx08Vc_RJDE93_K0Lo,610
|
7
|
-
pypeline/middleware.py,sha256=kTp6niYoe2nXIiN6EGRfdpxrJyioo0GPxDkfefbGlEk,2821
|
8
|
-
pypeline/pipeline_config_schema.py,sha256=DQ_RMucnA0AyrndlW6lkb0orGromcO6C9GgLHyG6lJ0,8013
|
9
|
-
pypeline/pypeline_yaml.py,sha256=Og08sUKwOjq7JYPnkg-NIcGbHravYCkC5Arz22rZEtA,16981
|
10
|
-
pypeline/schedule_config_schema.py,sha256=vtZV-5wpGcAiYcXxdBPRkrjsbR6x_9E-1PC2elrKKbE,3611
|
11
|
-
pypeline/flask/__init__.py,sha256=AdljRh0lMiS8ExgDmgzObwVs8jW7hqQuf83Ml8kn8GQ,491
|
12
|
-
pypeline/flask/decorators.py,sha256=ki6jkjZwbDbCWuj7ET7N-ncZwrASp4Fy7257WIYiAAQ,1102
|
13
|
-
pypeline/flask/flask_pypeline.py,sha256=Uqyu3PnSP3DoVZUJPqV9chjT4xdRgvcL3OMXxkbdTEg,5490
|
14
|
-
pypeline/flask/api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
15
|
-
pypeline/flask/api/pipelines.py,sha256=RzRmSL5Zaia7ftXmXyDAC0ZAkPoFsvyefzHfIyWhRqk,8118
|
16
|
-
pypeline/flask/api/schedules.py,sha256=31lwoFlGv-S-2ahGUCnD5YbmKws8yddj6_PEzzdBi9s,1321
|
17
|
-
pypeline/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
18
|
-
pypeline/utils/config_utils.py,sha256=rAIATyoW7kGETZ_Z2DqiXtGd7bJp5uPfcLtfNPOYsNs,2167
|
19
|
-
pypeline/utils/module_utils.py,sha256=boEP9IYr4p_ick7HlVUfIxOYHQlEmo7dgvDBCQc-C28,2914
|
20
|
-
pypeline/utils/pipeline_utils.py,sha256=tt71hLEFgPieokJZlC1rP2dmCTctrOPt7K1rGlbnT4o,5967
|
21
|
-
tests/fixtures/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
22
|
-
scalable_pypeline-2.0.10.dist-info/LICENSE,sha256=DVQuDIgE45qn836wDaWnYhSdxoLXgpRRKH4RuTjpRZQ,10174
|
23
|
-
scalable_pypeline-2.0.10.dist-info/METADATA,sha256=mFn_XkdRsU4d5oT48HAQNeP9wEUifs2-aWR43-3SG-4,5927
|
24
|
-
scalable_pypeline-2.0.10.dist-info/WHEEL,sha256=bb2Ot9scclHKMOLDEHY6B2sicWOgugjFKaJsT7vwMQo,110
|
25
|
-
scalable_pypeline-2.0.10.dist-info/entry_points.txt,sha256=uWs10ODfHSBKo2Cx_QaUjPHQTpZ3e77j9VlAdRRmMyg,119
|
26
|
-
scalable_pypeline-2.0.10.dist-info/top_level.txt,sha256=C7dpkEOc_-nnsAQb28BfQknjD6XHRyS9ZrvVeoIbV7s,15
|
27
|
-
scalable_pypeline-2.0.10.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|