<commit_before>""" This module serves as the interface between the PYTHON code and the
FORTRAN implementations.
"""
# standard library
import os
import subprocess

# project library
import numpy as np
import pandas as pd

from respy.python.shared.shared_auxiliary import dist_class_attributes
from respy.python.shared.shared_auxiliary import dist_model_paras
from respy.python.estimate.estimate_auxiliary import get_optim_paras

from respy.python.shared.shared_constants import EXEC_DIR, HUGE_FLOAT


def resfort_interface(respy_obj, request, data_array=None):

    model_paras, num_periods, edu_start, is_debug, edu_max, delta, \
        version, num_draws_emax, seed_emax, is_interpolated, num_points_interp, \
        is_myopic, min_idx, store, tau, is_parallel, num_procs, \
        num_agents_sim, num_draws_prob, num_agents_est, seed_prob, seed_sim, \
        paras_fixed, optimizer_options, optimizer_used, maxiter = \
            dist_class_attributes(respy_obj,
                'model_paras', 'num_periods', 'edu_start', 'is_debug',
                'edu_max', 'delta', 'version', 'num_draws_emax', 'seed_emax',
                'is_interpolated', 'num_points_interp', 'is_myopic', 'min_idx',
                'store', 'tau', 'is_parallel', 'num_procs', 'num_agents_sim',
                'num_draws_prob', 'num_agents_est', 'seed_prob', 'seed_sim',
                'paras_fixed', 'optimizer_options', 'optimizer_used', 'maxiter')

    # Special treatment required for the FORT optimizers. Since they are
    # written to the FORTRAN initialization file, we need a valid request for
    # all optimizers internally.
    assert (optimizer_used in optimizer_options.keys())

    for optimizer in ['FORT-NEWUOA']:
        # Skip if actually used in the estimation.
        if optimizer == optimizer_used:
            continue
        # Skip if defined by user.
        if optimizer in optimizer_options.keys():
            continue<commit_msg>tests running, now adding BFGS<commit_after>""" This module serves as the interface between the PYTHON code and the
FORTRAN implementations.
"""
# standard library
import os
import subprocess

# project library
import numpy as np
import pandas as pd

from respy.python.shared.shared_auxiliary import dist_class_attributes
from respy.python.shared.shared_auxiliary import dist_model_paras
from respy.python.estimate.estimate_auxiliary import get_optim_paras

from respy.python.shared.shared_constants import EXEC_DIR, HUGE_FLOAT


def resfort_interface(respy_obj, request, data_array=None):

    model_paras, num_periods, edu_start, is_debug, edu_max, delta, \
        version, num_draws_emax, seed_emax, is_interpolated, num_points_interp, \
        is_myopic, min_idx, store, tau, is_parallel, num_procs, \
        num_agents_sim, num_draws_prob, num_agents_est, seed_prob, seed_sim, \
        paras_fixed, optimizer_options, optimizer_used, maxiter = \
            dist_class_attributes(respy_obj,
                'model_paras', 'num_periods', 'edu_start', 'is_debug',
                'edu_max', 'delta', 'version', 'num_draws_emax', 'seed_emax',
                'is_interpolated', 'num_points_interp', 'is_myopic', 'min_idx',
                'store', 'tau', 'is_parallel', 'num_procs', 'num_agents_sim',
                'num_draws_prob', 'num_agents_est', 'seed_prob', 'seed_sim',
                'paras_fixed', 'optimizer_options', 'optimizer_used', 'maxiter')

    # Special treatment required for the FORT optimizers. Since they are
    # written to the FORTRAN initialization file, we need a valid request for
    # all optimizers internally.

    if request == 'estimate':
        assert (optimizer_used in optimizer_options.keys())

    for optimizer in ['FORT-NEWUOA']:

        # Skip if defined by user.
        if optimizer in optimizer_options.keys():
            continue
{'fraction_non_alphanumeric': 0.08901070216653616, 'fraction_numerical': 0.0, 'mean_word_length': 3.6224366706875752, 'pattern_counts': {'":': 0, '<': 3, '<?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': '4197074', 'n_tokens_mistral': 1214, 'n_tokens_neox': 1176, 'n_words': 313}