<commit_before>import string;
import files;
import io;
import sys;

// ===== Interface definitions for the programs that we call ======
// Random values are created from bounds specified in data/settings.json file
app (file f)
determineParameters(string settingsFilename)
{
  (getenv("APP_HOME")+"/determineParameters.sh") settingsFilename f;
}

// This is where the p1b1 runner is called
app (file f)
evaluateOne(string params)
{
  (getenv("APP_HOME")+"/evaluateOne.sh") params f;
}

// call this to read all the resultsFiles and compute stats
app ()
computeStats(string resultsFile)
{
  (getenv("APP_HOME")+"/computeStats.sh") resultsFile;
}

// call this to create any required directories
app (void o) make_dir(string dirname) {
  "mkdir" "-p" dirname;
}


// ===== The program proper ==============================================
string turbine_output = getenv("TURBINE_OUTPUT");
float results[string];

//make the experiments dir
make_dir(turbine_output);

// Get parameters
settingsFilename = argv("settings");
string sweepParamFile = turbine_output+"/sweep-parameters.txt";
file parametersFile<sweepParamFile> = determineParameters(settingsFilename);
parametersString = read(parametersFile);
parameters = split(parametersString, ":");<commit_msg>Add Python debugging to workflow<commit_after>import string;
import files;
import io;
import sys;

// ===== Interface definitions for the programs that we call ======
// Random values are created from bounds specified in data/settings.json file
app (file f)
determineParameters(string settingsFilename)
{
  (getenv("APP_HOME")+"/determineParameters.sh") settingsFilename f;
}

// This is where the p1b1 runner is called
app (file f)
evaluateOne(string params)
{
  (getenv("APP_HOME")+"/evaluateOne.sh") params f;
}

// call this to read all the resultsFiles and compute stats
app ()
computeStats(string resultsFile)
{
  (getenv("APP_HOME")+"/computeStats.sh") resultsFile;
}

// call this to create any required directories
app (void o) make_dir(string dirname) {
  "mkdir" "-p" dirname;
}


printf("PYTHONPATH: %s", getenv("PYTHONPATH"));
printf("PYTHONHOME: %s", getenv("PYTHONHOME"));

// ===== The program proper ==============================================
string turbine_output = getenv("TURBINE_OUTPUT");
float results[string];

//make the experiments dir
make_dir(turbine_output);

// Get parameters
settingsFilename = argv("settings");
string sweepParamFile = turbine_output+"/sweep-parameters.txt";
file parametersFile<sweepParamFile> = determineParameters(settingsFilename);
parametersString = read(parametersFile);
parameters = split(parametersString, ":");
{'fraction_non_alphanumeric': 0.15917745620715917, 'fraction_numerical': 0.0015232292460015233, 'mean_word_length': 6.1775956284153, 'pattern_counts': {'":': 2, '<': 5, '<?xml version=': 0, '>': 5, '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': '3392774', 'n_tokens_mistral': 774, 'n_tokens_neox': 745, 'n_words': 224}