You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import opentuner
from opentuner import ConfigurationManipulator
from opentuner import IntegerParameter
from opentuner import MeasurementInterface
from opentuner import Result
if name == 'main':
argparser = opentuner.default_argparser()
autotuneProgram.main(argparser.parse_args())
====== Error message ====
The above code quickly results in the following error message:
sqlalchemy.exc.StatementError: (sqlalchemy.exc.InvalidRequestError) Can't resolve value for column configuration.id on object <Configuration at 0x2ab22fc706d0>; no value has been set for this column
[SQL: SELECT count(*) AS count_1
FROM (SELECT result.id AS result_id, result.configuration_id AS result_configuration_id, result.machine_id AS result_machine_id, result.input_id AS result_input_id, result.tuning_run_id AS result_tuning_run_id, result.collection_date AS result_collection_date, result.collection_cost AS result_collection_cost, result.state AS result_state, result.time AS result_time, result.accuracy AS result_accuracy, result.energy AS result_energy, result.size AS result_size, result.confidence AS result_confidence, result.was_new_best AS result_was_new_best
FROM result
WHERE ? = result.tuning_run_id AND ? = result.configuration_id) AS anon_1]
[parameters: [{}]]
The text was updated successfully, but these errors were encountered:
I don't see anything obviously wrong with your tuner.
What version of sqlalchemy are you using? (New feature version 1.3.0 was released earlier this month and might be responsible for problems in the database layer.)
Same problem here. I used SQLAlchemy 1.2.19 and it works. Please note, both 1.3.x and 1.2.x are releases mentioned as current. Perhaps 1.2.x is more stable.
I'm afraid I might have found a bug in opentuner.
Next is a small code that highlights the issue.
===== Code ====
#!/usr/bin/env python
import sys
import adddeps # fix sys.path
import opentuner
from opentuner import ConfigurationManipulator
from opentuner import IntegerParameter
from opentuner import MeasurementInterface
from opentuner import Result
class autotuneProgram(MeasurementInterface):
def manipulator(self):
sys.stderr.write('AUTOTUNER: Create the design space\n')
manipulator = ConfigurationManipulator()
openTuner_param = IntegerParameter('1', 0, 10000)
manipulator.add_parameter(openTuner_param)
openTuner_param = IntegerParameter('2', 0, 10000)
manipulator.add_parameter(openTuner_param)
openTuner_param = IntegerParameter('3', 0, 10000)
manipulator.add_parameter(openTuner_param)
return manipulator
def run(self, desired_result, input, limit):
cfg = desired_result.configuration.data
sys.stderr.write('AUTOTUNER: ' + str(cfg) + '\n')
return Result(time=3.5)
def save_final_config(self, configuration):
sys.stderr.write('AUTOTUNER: END')
if name == 'main':
argparser = opentuner.default_argparser()
autotuneProgram.main(argparser.parse_args())
====== Error message ====
The above code quickly results in the following error message:
sqlalchemy.exc.StatementError: (sqlalchemy.exc.InvalidRequestError) Can't resolve value for column configuration.id on object <Configuration at 0x2ab22fc706d0>; no value has been set for this column
[SQL: SELECT count(*) AS count_1
FROM (SELECT result.id AS result_id, result.configuration_id AS result_configuration_id, result.machine_id AS result_machine_id, result.input_id AS result_input_id, result.tuning_run_id AS result_tuning_run_id, result.collection_date AS result_collection_date, result.collection_cost AS result_collection_cost, result.state AS result_state, result.time AS result_time, result.accuracy AS result_accuracy, result.energy AS result_energy, result.size AS result_size, result.confidence AS result_confidence, result.was_new_best AS result_was_new_best
FROM result
WHERE ? = result.tuning_run_id AND ? = result.configuration_id) AS anon_1]
[parameters: [{}]]
The text was updated successfully, but these errors were encountered: