<commit_before>import os

import pytest

from pelops.features.keras_model import KerasModelFeatureProducer


def test_load_model_workaround():
    # @TODO get some environment variable set when in CI environment
    # test to see, modify path...
    if os.getenv('CIRCLECI', 'false').lower() == 'true':
        model_filename = '/home/ubuntu/pelops/testci/small.json'
        weight_filename = '/home/ubuntu/pelops/testci/small.hdf5'
    if int(os.getenv('INDOCKERCONTAINER', 0)) == 1:
        model_filename = '/pelops_root/testci/small.json'
        weight_filename = '/pelops_root/testci/small.hdf5'

    model = KerasModelFeatureProducer.load_model_workaround(
        model_filename, weight_filename)
    assert model.layers[0].name == 'dense_8'<commit_msg>what is happening to our Circle ci env variables?<commit_after>import os

import pytest

from pelops.features.keras_model import KerasModelFeatureProducer


def test_load_model_workaround():
    # @TODO get some environment variable set when in CI environment
    # test to see, modify path...
    if os.getenv('CIRCLECI', None).lower() is not None:
        model_filename = '/home/ubuntu/pelops/testci/small.json'
        weight_filename = '/home/ubuntu/pelops/testci/small.hdf5'
    if int(os.getenv('INDOCKERCONTAINER', None)) is not None:
        model_filename = '/pelops_root/testci/small.json'
        weight_filename = '/pelops_root/testci/small.hdf5'

    model = KerasModelFeatureProducer.load_model_workaround(
        model_filename, weight_filename)
    assert model.layers[0].name == 'dense_8'
{'fraction_non_alphanumeric': 0.1064372211599745, 'fraction_numerical': 0.006373486297004461, 'mean_word_length': 3.830769230769231, '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': '6590317', 'n_tokens_mistral': 518, 'n_tokens_neox': 497, 'n_words': 107}