automl / ParameterImportance

Parameter Importance Analysis Tool
http://www.ml4aad.org/
BSD 3-Clause "New" or "Revised" License
76 stars 19 forks source link

None * int error when "Converting Data and constructing Model" #9

Closed robintibor closed 7 years ago

robintibor commented 7 years ago

Hi, I wanted to analyze results of some pSMAC3 runs and get an error:

$ python3.5 /home/schirrmr/programs/ParameterImportance/scripts/evaluate.py --scenario_file hybrid_scenario.txt --history '.runhistory*.json' --modus forward-selection
/home/schirrmr/.local/lib/python3.5/site-packages/matplotlib/__init__.py:1401: UserWarning:  This call to matplotlib.use() has no effect
because the backend has already been chosen;
matplotlib.use() must be called *before* pylab, matplotlib.pyplot,
or matplotlib.backends is imported for the first time.

  warnings.warn(_use_error_msg)
INFO:Importance:Reading Scenario file and files specified in the scenario
INFO:scenario:Reading scenario file: hybrid_scenario.txt
INFO:scenario:Output to hybrid-results
INFO:Importance:Reading Runhistory
INFO:Importance:Combined number of Runhistory data points: 656
INFO:Importance:Converting Data and constructing Model
Traceback (most recent call last):
  File "/home/schirrmr/programs/ParameterImportance/scripts/evaluate.py", line 32, in <module>
    traj_file=args.trajectory, seed=args.seed)  # create importance object
  File "/home/schirrmr/programs/ParameterImportance/pimp/importance/importance.py", line 65, in __init__
    self._convert_data()
  File "/home/schirrmr/programs/ParameterImportance/pimp/importance/importance.py", line 200, in _convert_data
    self.threshold = self.scenario.cutoff * self.scenario.par_factor
TypeError: unsupported operand type(s) for *: 'NoneType' and 'int'

Spear_qcp example works fine, same error appears for all modus options. See also this notebook: https://gist.github.com/robintibor/230a6c458606b07819fca73ab8f11263.

AndreBiedenkapp commented 7 years ago

Hi, That's a weird error since it appears that either cutoff or par factor are not set.

Could you post the contents of your scenario file?

robintibor commented 7 years ago

Hi, ya it is my first time using these things so maybe I am doing something weird :)

My hybrid_scenario.txt file:

algo = python run.py
paramfile = hybrid.pcs
run_obj = quality
runcount_limit = 500
deterministic = 0
instance_file = instances.txt
output_dir = hybrid-results
shared_model = 1
robintibor commented 7 years ago

Hm ok if I add

cutoff_time = 100000000000000000

it actually runs... Is this intended? :)

AndreBiedenkapp commented 7 years ago

Sorry for leaving you waiting. I am currently not near a computer and can only use my mobile internet.

No that is not intended. Since your objective is quality and not runtime.

I'll have to slightly adjust the _convert_data method of the importance object and check that all the algorithms run through fine.

I think I'll have access to a computer at around 3 and will fix it asap