<commit_before>from .estimator import def_estimator
from .flag import FLAGS, add_flag, add_output_dir_flag
from .inputs import def_def_eval_input_fn


def def_infer(batch_inputs=True, prepare_filename_queues=True):
    add_output_dir_flag()

    estimator = def_estimator()
    def_eval_input_fn = def_def_eval_input_fn(batch_inputs,
                                              prepare_filename_queues)

    def infer(model_fn, input_fn):
        return estimator(model_fn, FLAGS.output_dir).predict(
            input_fn=def_eval_input_fn(input_fn))

    return infer
<commit_msg>Use def_def_infer_fn in infer module<commit_after>from .estimator import def_estimator
from .flag import FLAGS, add_flag, add_output_dir_flag
from .inputs import def_def_infer_input_fn


def def_infer(batch_inputs=True, prepare_filename_queues=True):
    add_output_dir_flag()

    estimator = def_estimator()
    def_infer_input_fn = def_def_infer_input_fn(batch_inputs,
                                                prepare_filename_queues)

    def infer(model_fn, input_fn):
        return estimator(model_fn, FLAGS.output_dir).predict(
            input_fn=def_infer_input_fn(input_fn))

    return infer

{'fraction_non_alphanumeric': 0.06192468619246862, 'fraction_numerical': 0.0, 'mean_word_length': 3.4794007490636703, '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': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '858629', 'n_tokens_mistral': 394, 'n_tokens_neox': 374, 'n_words': 68}