<jupyter_start><jupyter_text>Composite ExecutorsExecutors that execute more than one flow.  Preliminaries<jupyter_code># Black Codeformatter
%load_ext lab_black<jupyter_output><empty_output><jupyter_text>Imports<jupyter_code>import numpy as np
import pandas as pd
import os
from affe.execs import (
    CompositeExecutor,
    NativeExecutor,
    JoblibExecutor,
    GNUParallelExecutor,
)
from affe.tests import get_dummy_flow<jupyter_output><empty_output><jupyter_text>ImplementationThis is where functions and classes are implemented.  SandboxThis is where functions and classes are tested.  FlowsJust making some easy flows to test my stuff.<jupyter_code>flows = [
    get_dummy_flow(message="hi" * (i + 1), content=dict(i=i * 10)) for i in range(3)
]
for f in flows:
    f.run_with_log()<jupyter_output><empty_output><jupyter_text>Composite-Executor<jupyter_code>e = NativeExecutor
c = CompositeExecutor(flows, e)
c.run()
e = NativeExecutor
c_jl = JoblibExecutor(flows, e, n_jobs=3)
c_jl.run()<jupyter_output><empty_output><jupyter_text>GNUParellel<jupyter_code>c = GNUParallelExecutor(flows, logs=True)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.09146877748460862, 'fraction_numerical': 0.0043975373790677225, 'mean_word_length': 7.42962962962963, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '161850', 'license': 'MIT', 'n_tokens_mistral': 415, 'n_tokens_neox': 401, 'n_words': 85, 'path': 'note/sandbox/comp-execs-II.ipynb', 'repo_name': 'eliavw/affe', 'size': '1137'}