@@ -3,7 +3,7 @@ const fs = require("fs");
33
44const config = require ( "../config/config" ) ;
55const { readJsonFile, writeJsonFile, deleteFilesInDir } = require ( "./fileHandlers" ) ;
6- const { runPythonScript } = require ( "./pythonRunner " ) ;
6+ const { executeOrchestrator } = require ( "./runOrchestrator " ) ;
77const { getResults } = require ( "./resultProcessor" ) ;
88const { log } = require ( "console" ) ;
99
@@ -68,7 +68,7 @@ async function runExperiments() {
6868
6969 console . log ( `📂 Found ${ allConfigs . length } configs in run_configs.json` ) ;
7070
71- // 📦 Collect results for ALL configs
71+ // Collect results for ALL configs
7272 const allConfigsResults = [ ] ;
7373
7474 for ( const [ index , cfg ] of allConfigs . entries ( ) ) {
@@ -84,7 +84,7 @@ async function runExperiments() {
8484 }
8585 }
8686
87- // ✍️ Save all results to a single file
87+ // Save all results to a single file
8888 try {
8989 writeJsonFile ( RESULTS_FILE , allConfigsResults ) ;
9090 console . log ( `\n✅ All results saved to ${ RESULTS_FILE } ` ) ;
@@ -117,7 +117,7 @@ async function runExperimentsForGroupedConfig(currentConfig) {
117117 console . log ( `\n🔁 Using config_type = ${ configType } ` ) ;
118118
119119 try {
120- await runPythonScript ( {
120+ await executeOrchestrator ( {
121121 job : 1 ,
122122 'config-type' : configType ,
123123 'cost-config-type' : currentConfig . cost_config_type ,
@@ -132,7 +132,7 @@ async function runExperimentsForGroupedConfig(currentConfig) {
132132 deleteFilesInDir ( resultsDir , ".json" ) ;
133133
134134 try {
135- await runPythonScript ( ) ;
135+ await executeOrchestrator ( ) ;
136136 const results = getResults ( "algorithms" ) ;
137137 allExperimentResults . push ( {
138138 config_type : configType , results
@@ -178,7 +178,7 @@ async function runExperimentsForGroupedConfig(currentConfig) {
178178
179179 try {
180180 writeJsonFile ( LCA_PARAMS_PATH , lcaParameters ) ;
181- await runPythonScript ( {
181+ await executeOrchestrator ( {
182182 run : "lca" ,
183183 } ) ;
184184 const results = getResults ( "lca" ) ;
@@ -237,10 +237,10 @@ async function runExperimentsForSingleConfig(currentConfig) {
237237 for ( const configType of configTypes ) {
238238 console . log ( `\n🔁 Using config_type = ${ configType } ` ) ;
239239
240- // 1️⃣ Pre-run: Create configuration by calling Python script
240+ // Pre-run: Create configuration by calling Python script
241241 console . log ( "📄 Preparing configuration..." ) ;
242242 try {
243- await runPythonScript ( {
243+ await executeOrchestrator ( {
244244 job : 1 , // job 1 = generate config
245245 'config-type' : configType ,
246246 'cost-config-type' : currentConfig . cost_config_type ,
@@ -274,7 +274,7 @@ async function runExperimentsForSingleConfig(currentConfig) {
274274 }
275275
276276 try {
277- await runPythonScript ( ) ; // Execute the Python script
277+ await executeOrchestrator ( ) ; // Execute the Python script
278278 const results = getResults ( ) ; // Get results after Python script runs
279279 allExperimentResults . push ( { L : l , S : s , config_type : configType , results } ) ;
280280 } catch ( runError ) {
0 commit comments