<commit_before>#!/bin/bash
set -ex

source activate hail-batch

cleanup() {
    set - INT TERM
    set +e
    kill $(cat ci.pid)
    rm -rf ci.pid
}
trap cleanup EXIT

trap "exit 24" INT TERM

# run the server in the background with in-cluster config
python batch/server.py & echo $! > ci.pid

sleep 5

POD_IP='127.0.0.1' BATCH_URL='http://127.0.0.1:5000' python -m unittest test/test_batch.py<commit_msg>rename batch pid file ci.pid => batch.pid (#4537)<commit_after>#!/bin/bash
set -ex

source activate hail-batch

cleanup() {
    set - INT TERM
    set +e
    kill $(cat batch.pid)
    rm -rf batch.pid
}
trap cleanup EXIT

trap "exit 24" INT TERM

# run the server in the background with in-cluster config
python batch/server.py & echo $! > batch.pid

sleep 5

POD_IP='127.0.0.1' BATCH_URL='http://127.0.0.1:5000' python -m unittest test/test_batch.py
{'fraction_non_alphanumeric': 0.12748538011695906, 'fraction_numerical': 0.04912280701754386, 'mean_word_length': 3.1553398058252426, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 4, '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': '6921948', 'n_tokens_mistral': 356, 'n_tokens_neox': 322, 'n_words': 99}