Module Expr Str Import alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias Import alias Import alias Assign NameStore Call AttributeLoad NameLoad attr NameLoad FunctionDef arguments args NameParam defaults body Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore BinOpMult BinOpSub NameLoad Num BinOpSub NameLoad Num Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore BinOpMult BinOpAdd NameLoad Num BinOpAdd NameLoad Num Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore BinOpMult BinOpAdd NameLoad Num BinOpAdd NameLoad Num Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr keyword Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Assign NameStore Call NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad Str Num Num Assign NameStore Call NameLoad keyword NameLoad keyword NameLoad keyword Str keyword Str keyword Str Assign NameStore Call NameLoad NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args defaults body Assign NameStore ListLoad Call NameLoad Str Call NameLoad Str Call NameLoad Str Assign NameStore ListLoad NameLoad NameLoad NameLoad For NameStore Call NameLoad Num body For TupleStore NameStore NameStore Call NameLoad NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr If CompareIs NameLoad NameLoad body Continue Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call NameLoad keyword Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore ListComp Call AttributeLoad NameLoad attr comprehension NameStore NameLoad For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr Print Call AttributeLoad Str attr NameLoad decorator_list If CompareEq NameLoad Str body Expr Call NameLoad
N/A N/A 
Examples usage of a Python API interface to opentuner.

Unlike the other examples, this code lets the user control the main() of
the program and calls into opentuner to get new configurations to test.

This version runs multiple tuning runs at once in a single process.
 N/A adddeps N/A opentuner opentuner.api TuningRunManager opentuner.measurement.interface DefaultMeasurementInterface opentuner.resultsdb.models Result opentuner.search.manipulator ConfigurationManipulator opentuner.search.manipulator IntegerParameter N/A logging N/A argparse N/A log N/A N/A logging getLogger __name__ test_func1 N/A N/A cfg N/A N/A N/A x N/A cfg N/A x N/A y N/A N/A x 10 N/A x 10 N/A N/A N/A log debug N/A N/A f({}) -> {} format x y N/A y N/A test_func2 N/A N/A cfg N/A N/A N/A x N/A cfg N/A x N/A y N/A N/A x 10 N/A x 10 N/A N/A N/A log debug N/A N/A f({}) -> {} format x y N/A y N/A test_func3 N/A N/A cfg N/A N/A N/A x N/A cfg N/A x N/A y N/A N/A x 20 N/A x 20 N/A N/A N/A log debug N/A N/A f({}) -> {} format x y N/A y N/A create_test_tuning_run N/A N/A db N/A N/A N/A parser N/A N/A argparse ArgumentParser parents N/A N/A opentuner argparsers N/A args N/A N/A parser parse_args N/A N/A args database db N/A manipulator N/A ConfigurationManipulator N/A N/A N/A manipulator add_parameter N/A IntegerParameter x -200 200 N/A interface N/A DefaultMeasurementInterface args args manipulator manipulator project_name examples program_name api_test program_version 0.1 N/A api N/A TuningRunManager interface args N/A api N/A main N/A N/A N/A N/A N/A apis N/A N/A create_test_tuning_run sqlite:////tmp/a.db N/A create_test_tuning_run sqlite:////tmp/b.db N/A create_test_tuning_run sqlite:////tmp/c.db N/A test_funcs N/A test_func1 test_func2 test_func3 N/A x N/A xrange 100 N/A N/A N/A api test_func N/A zip apis test_funcs N/A N/A desired_result N/A N/A api get_next_desired_result N/A N/A desired_result None N/A N/A N/A cfg N/A N/A desired_result configuration data N/A result N/A Result time N/A test_func cfg N/A N/A N/A api report_result desired_result result N/A best_cfgs N/A N/A N/A api get_best_configuration N/A api apis N/A api apis N/A N/A N/A N/A api finish N/A N/A N/A best x configs: {} format best_cfgs N/A N/A N/A __name__ __main__ N/A N/A N/A main