<commit_before>#!/bin/bash
args=("$@")
OPEN_LAVA_MASTER=$(hostname | cut -d. -f1)
CLUSTER=${args[0]}
JOB_NAME=${args[1]}
SCRIPTS_ZIP_ON_REMOTE_HOST=${args[2]}
MAIN_FILE=${args[3]}
CONFIG_FILE=${args[4]} #"config.txt"
REMOTE_HOST=${args[5]}
i=0

SCRIPTS_ZIP=$JOB_NAME".zip"

source /etc/profile.d/openlava.sh

exports="export LD_LIBRARY_PATH=/usr/local/cuda/lib64;
         export CUDA_HOME=/usr/local/cuda;"


#TODO add check and exit codes to prevent some misbehaviours
function gpu_submit_function {
  echo "mkdir -p /tmp/$JOB_NAME;
        cd /tmp/$JOB_NAME;
        scp $REMOTE_HOST:$SCRIPTS_ZIP_ON_REMOTE_HOST .;
        unzip $SCRIPTS_ZIP -d /tmp/$JOB_NAME;
        mkdir /tmp/$JOB_NAME/results;
        $exports
        $python_submit
        cd /tmp/$JOB_NAME/results/;
        zip -r $result_zip *;
        scp $result_zip $REMOTE_HOST:~/jupyter/eae_results_$JOB_NAME/;
        rm -rf /tmp/$JOB_NAME;"
}
<commit_msg>again<commit_after>#!/bin/bash
args=("$@")
OPEN_LAVA_MASTER=$(hostname | cut -d. -f1)
CLUSTER=${args[0]}
JOB_NAME=${args[1]}
SCRIPTS_ZIP_ON_REMOTE_HOST=${args[2]}
MAIN_FILE=${args[3]}
CONFIG_FILE=${args[4]} #"config.txt"
REMOTE_HOST=${args[5]}
i=0

SCRIPTS_ZIP=$JOB_NAME".zip"

source /etc/profile.d/openlava.sh

exports="export LD_LIBRARY_PATH=/usr/local/cuda/lib64;
         export CUDA_HOME=/usr/local/cuda;"


#TODO add check and exit codes to prevent some misbehaviours
function gpu_submit_function {
  echo "mkdir -p /tmp/$JOB_NAME;
        cd /tmp/$JOB_NAME;
        scp $REMOTE_HOST:$SCRIPTS_ZIP_ON_REMOTE_HOST .;
        unzip $SCRIPTS_ZIP -d /tmp/$JOB_NAME;
        mkdir /tmp/$JOB_NAME/results;
        $exports
        $python_submit
        cd /tmp/$JOB_NAME/results/;
        zip -r $result_zip *;
        ssh $REMOTE_HOST 'mkdir -p /home/ubuntu/jupyter/eae_results_$JOB_NAME/';
        scp $result_zip $REMOTE_HOST:/home/ubuntu/jupyter/eae_results_$JOB_NAME/;
        rm -rf /tmp/$JOB_NAME;"
}

{'fraction_non_alphanumeric': 0.15408479834539815, 'fraction_numerical': 0.010341261633919338, 'mean_word_length': 3.5210280373831777, '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': '4905009', 'n_tokens_mistral': 848, 'n_tokens_neox': 801, 'n_words': 125}