MCPcopy Create free account
hub / github.com/InternScience/InternAgent / main

Function main

tasks/AutoDebug/code/experiment.py:186–211  ·  view source on GitHub ↗

Main entry point for experiment

()

Source from the content-addressed store, hash-verified

184
185
186def main():
187 """Main entry point for experiment"""
188 # Get the directory where this script is located
189 script_dir = os.path.dirname(os.path.abspath(__file__))
190
191 # Run experiment with default config (baseline)
192 results = run_experiment()
193
194 # Save results
195 output = {
196 'mse': results['metrics']['mse'],
197 'r2': results['metrics']['r2'],
198 'mae': results['metrics']['mae'],
199 'training_time': results['training_time'],
200 'config': results['config']
201 }
202
203 # Save to final_info.json in parent directory (run_X folder)
204 parent_dir = os.path.dirname(script_dir)
205 output_path = os.path.join(parent_dir, 'final_info.json')
206
207 with open(output_path, 'w') as f:
208 json.dump(output, f, indent=2)
209 print(f"\nResults saved to: {output_path}")
210
211 return output
212
213
214if __name__ == '__main__':

Callers 1

experiment.pyFile · 0.70

Calls 2

run_experimentFunction · 0.70
dumpMethod · 0.45

Tested by

no test coverage detected