<commit_before>"""Provides interface for meta-functions that help serve the model."""

import os
import shutil

import tensorflow as tf


def predict_binary(output):
    """
    Converts a sigmoidal tensor to a binary tensor.

    # Parameters
        output (tensor): A tensor of values put through a logistic-sigmoid function.
    # Returns
        A binary version of it (half-rounded-up).
    """
    halves = tf.constant(0.5, dtype=tf.float32, shape=output.shape.as_list())
    return tf.cast(tf.greater_equal(output, halves), tf.int32)

<commit_msg>Trashed `predict_binary`. Pointless since numbers will have to be interpreted anyways.<commit_after>"""Provides interface for meta-functions that help serve the model."""

import os
import shutil

import tensorflow as tf


{'fraction_non_alphanumeric': 0.09137709137709138, 'fraction_numerical': 0.007722007722007722, 'mean_word_length': 3.8625, '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': '4249415', 'n_tokens_mistral': 228, 'n_tokens_neox': 217, 'n_words': 81}