<commit_before>import logging
import sys
sys.path.insert(0, "../../src")

from eqlevel import compute
from qit.base.session import session
from qit.base.runtime.distributedcontext import DistributedContext, \
    DistributedConfig

N_SIZE = 2            # Number of states
S_SIZE = 1            # Number of stack symbols
A_SIZE = 2            # Number of actions (alphabet size)
DEPTH = 2            # Maximal depth of state space
MAX_STATES = 1000  # Max nodes in state space
COUNT = None         # None = iterate all

logging.disable(logging.INFO)

session.set_parallel_context(DistributedContext(
    DistributedConfig(worker_count=4, port=1800, spawn_compute_nodes=False)))

compute(N_SIZE, S_SIZE, A_SIZE, DEPTH, MAX_STATES, COUNT, True)<commit_msg>ENH: added cmd arguments to eqlevel_start script<commit_after>import logging
import sys
sys.path.insert(0, "../../src")

from eqlevel import compute
from qit.base.session import session
from qit.base.runtime.distributedcontext import DistributedContext, \
    DistributedConfig

N_SIZE = 2            # Number of states
S_SIZE = 1            # Number of stack symbols
A_SIZE = 2            # Number of actions (alphabet size)
DEPTH = 2            # Maximal depth of state space
MAX_STATES = 1000  # Max nodes in state space
COUNT = None         # None = iterate all

logging.disable(logging.INFO)

if len(sys.argv) < 3:
    print("enter ip, port and worker count")
    exit()

ip = sys.argv[1]
port = int(sys.argv[2])
worker_count = int(sys.argv[3])

session.set_parallel_context(DistributedContext(
    DistributedConfig(worker_count=worker_count,
                      port=port,
                      spawn_compute_nodes=False,
                      ip=ip)))

compute(N_SIZE, S_SIZE, A_SIZE, DEPTH, MAX_STATES, COUNT, True)
{'fraction_non_alphanumeric': 0.08707865168539326, 'fraction_numerical': 0.015168539325842697, 'mean_word_length': 3.084862385321101, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 3, '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}}
{'dir': 'git-commits-cleaned', 'id': '1651583', 'n_tokens_mistral': 553, 'n_tokens_neox': 521, 'n_words': 158}