<commit_before>#!/usr/bin/env bash

if [ "$#" -lt 3 ]; then
    echo "Requires a parameter for num trainers, num threads, and batch size"
    exit 1
fi

NUM_TRAINERS=$1; shift
NUM_THREADS=$1; shift
BATCH_SIZE=$1; shift

NAME="benchmark_${NUM_TRAINERS}_${NUM_THREADS}_${BATCH_SIZE}"

bash "${ITHEMAL_HOME}/learning/pytorch/experiments/baserun.sh" "${NAME}" --mode benchmark --trainers "${NUM_TRAINERS}" --threads "${NUM_THREADS}" --batch-size "${BATCH_SIZE}" "${@}"<commit_msg>ping slack on completion of benchmark<commit_after>#!/usr/bin/env bash

if [ "$#" -lt 3 ]; then
    echo "Requires a parameter for num trainers, num threads, and batch size"
    exit 1
fi

NUM_TRAINERS=$1; shift
NUM_THREADS=$1; shift
BATCH_SIZE=$1; shift

NAME="benchmark_${NUM_TRAINERS}_${NUM_THREADS}_${BATCH_SIZE}"

RUNTIME=$(bash "${ITHEMAL_HOME}/learning/pytorch/experiments/baserun.sh" "${NAME}" \
               --mode benchmark \
               --trainers "${NUM_TRAINERS}" --threads "${NUM_THREADS}" --batch-size "${BATCH_SIZE}" \
               --savedatafile "${ITHEMAL_HOME}/learning/pytorch/inputs/data/time_skylake_test.data" \
               "${@}" \
              | tail -n 1 \
              | cut -d' ' -f6
       )
"${ITHEMAL_HOME}/aws/ping_slack.py" "${NUM_TRAINERS} trainers, ${NUM_THREADS} threads, batch size ${BATCH_SIZE} -- ${RUNTIME} seconds"
{'fraction_non_alphanumeric': 0.16976917349218168, 'fraction_numerical': 0.008935219657483246, 'mean_word_length': 3.5405405405405403, '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': '2637683', 'n_tokens_mistral': 484, 'n_tokens_neox': 472, 'n_words': 101}