File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -891,10 +891,14 @@ def tune_kernel_T1(
891
891
strategy_options [attribute ["Name" ]] = attribute ["Value" ]
892
892
if "Budget" in inputs :
893
893
budget = inputs ["Budget" ][0 ]
894
- assert budget ["Type" ] == "ConfigurationCount"
895
894
if strategy_options is None :
896
895
strategy_options = {}
897
- strategy_options ["max_fevals" ] = budget ["BudgetValue" ]
896
+ if budget ["Type" ] == "ConfigurationCount" :
897
+ strategy_options ["max_fevals" ] = budget ["BudgetValue" ]
898
+ elif budget ["Type" ] == "TuningDuration" :
899
+ strategy_options ["time_limit" ] = budget ["BudgetValue" ] # both are in seconds
900
+ else :
901
+ raise NotImplementedError (f"Budget type in { budget } is not supported" )
898
902
899
903
# set the cache path
900
904
if cache_filepath is None and "SimulationInput" in kernelspec :
@@ -971,7 +975,6 @@ def tune_kernel_T1(
971
975
raise NotImplementedError (f"Conversion for this type of argument has not yet been implemented: { arg } " )
972
976
973
977
# tune with the converted inputs
974
- # TODO get_t4_results calls once available in T1
975
978
results , env = tune_kernel (
976
979
kernel_name ,
977
980
kernel_source ,
You can’t perform that action at this time.
0 commit comments