orion icon indicating copy to clipboard operation
orion copied to clipboard

Getting an AttributeError: 'dict' object has no attribute 'cardinality'

Open Rahul-Choudhary-3614 opened this issue 2 years ago • 3 comments

I am running Orion with basic bayesian optimisation. I am getting this error. Could someone help me resolve this Screenshot 2022-06-28 at 10 45 28 AM Screenshot 2022-06-28 at 10 44 52 AM Screenshot 2022-06-28 at 10 44 29 AM ?

Rahul-Choudhary-3614 avatar Jun 28 '22 14:06 Rahul-Choudhary-3614

For reference, commandline call is

orion hunt -c orion_bayesian_config.yaml \
  python 3 test_orion_2.py Breakout 4 "/some/path" "/some/other/path.yml" \
  --learning_rate~'loguniform(1e-6, 1e-3)' --alpha~'loguniform(0.94, 0.96)'

Next time if you can copy paste your code instead of sharing screenshots that would be helpful (we can better search the text). Thank you!

We are looking into reproducing the issue locally.

bouthilx avatar Jun 28 '22 15:06 bouthilx

Hey there @Rahul-Choudhary-3614 , thanks for posting this!

I'll try to reproduce your error, but in the meantime, I have some questions:

  • What version of Orion are you using? (output of orion --version)

A few other (unrelated) questions:

  • Are you planning to keep the max_trials of 5 in the long term? (There's obviously not much an HPO algorithm can do with 5 trials)
  • Is the mean_score here "higher is better"? If so, you would want to report - mean_score in report_objective, since Orion currently always tries to minimize the objective (lower is better), until #873 is addressed.

lebrice avatar Jun 28 '22 15:06 lebrice

Screenshot 2022-06-28 at 11 18 57 AM

I am going to increase max_trials to 100 or more. I was just test running the code to check if everything works fine so I kept max_trials low.

mean_score is already a negative value and I would like to decrease it.

commandline call is orion hunt -c orion_bayesian_config.yaml
python3 test_orion_2.py Breakout 4 "/some/path" "/some/other/path.yml"
--learning_rate~'loguniform(1e-6, 1e-3)' --alpha~'loguniform(0.94, 0.96)'

Rahul-Choudhary-3614 avatar Jun 28 '22 15:06 Rahul-Choudhary-3614