causy
Advanced tools
+23
-5
@@ -487,2 +487,10 @@ import inspect | ||
| # which are sometimes needed for e.g. conflict resolution | ||
| is_synchronous = False | ||
| if hasattr(test_fn, "apply_synchronous"): | ||
| # ensure that the graph gets changes applied synchronously - so before the next element is executed | ||
| if test_fn.apply_synchronous: | ||
| is_synchronous = True | ||
| iterator = [ | ||
@@ -503,8 +511,18 @@ i | ||
| local_results.append(unpack_run(i)) | ||
| actions_taken_current, all_actions_current = self._take_action( | ||
| local_results, dry_run=not apply_to_graph | ||
| ) | ||
| actions_taken.extend(actions_taken_current) | ||
| all_actions.extend(all_actions_current) | ||
| if is_synchronous: | ||
| actions_taken_current, all_actions_current = self._take_action( | ||
| local_results, dry_run=not apply_to_graph | ||
| ) | ||
| actions_taken.extend(actions_taken_current) | ||
| all_actions.extend(all_actions_current) | ||
| local_results = [] | ||
| if not is_synchronous: | ||
| actions_taken_current, all_actions_current = self._take_action( | ||
| local_results, dry_run=not apply_to_graph | ||
| ) | ||
| actions_taken.extend(actions_taken_current) | ||
| all_actions.extend(all_actions_current) | ||
| return actions_taken, all_actions | ||
@@ -511,0 +529,0 @@ |
+16
-5
@@ -346,9 +346,16 @@ import multiprocessing | ||
| generator: Optional[GeneratorInterface] = None | ||
| threshold: Optional[FloatParameter] = DEFAULT_THRESHOLD | ||
| chunk_size_parallel_processing: IntegerParameter = 1 | ||
| parallel: BoolParameter = True | ||
| threshold: Optional[FloatParameter] = DEFAULT_THRESHOLD # threshold for the test | ||
| chunk_size_parallel_processing: IntegerParameter = ( | ||
| 1 # chunk size for parallel processing | ||
| ) | ||
| parallel: BoolParameter = True # if True, the pipeline step will be executed in parallel (only works non synchronous) | ||
| display_name: Optional[StringParameter] = None | ||
| display_name: Optional[StringParameter] = None # display name of the pipeline step | ||
| needs_unapplied_actions: Optional[BoolParameter] = False | ||
| needs_unapplied_actions: Optional[ | ||
| BoolParameter | ||
| ] = False # if True, the pipeline step needs unapplied actions to be passed to it | ||
| apply_synchronous: Optional[ | ||
| BoolParameter | ||
| ] = False # if True, the result of the pipeline step will be applied synchronously (only works non chunked and non parallel) | ||
@@ -360,2 +367,3 @@ def __init__( | ||
| chunk_size_parallel_processing: Optional[IntegerParameter] = None, | ||
| apply_synchronous: Optional[BoolParameter] = None, | ||
| parallel: Optional[BoolParameter] = None, | ||
@@ -375,2 +383,5 @@ display_name: Optional[StringParameter] = None, | ||
| if apply_synchronous: | ||
| self.apply_synchronous = apply_synchronous | ||
| if parallel: | ||
@@ -377,0 +388,0 @@ self.parallel = parallel |
+1
-1
| Metadata-Version: 2.1 | ||
| Name: causy | ||
| Version: 0.1.39 | ||
| Version: 0.1.40 | ||
| Summary: Causal discovery made easy. | ||
@@ -5,0 +5,0 @@ License: MIT |
Alert delta unavailable
Currently unable to show alert delta for PyPI packages.
4466810
0.03%20972
0.11%