RUCAIBox / RecBole

A unified, comprehensive and efficient recommendation library
https://recbole.io/
MIT License
3.48k stars 616 forks source link

[🐛BUG] WARNING Session not detected. You should not be calling `report` outside `tuner.fit()` or while using the class API. #1741

Open zhaijianyang opened 1 year ago

zhaijianyang commented 1 year ago

18 Apr 23:17 WARNING Session not detected. You should not be calling report outside tuner.fit() or while using the class API. 18 Apr 23:17 WARNING File "run_hyper.py", line 126, in hyperopt_tune(args) File "run_hyper.py", line 40, in hyperopt_tune hp.run() File "/userhome/projects/RecBole/recbole/trainer/hyper_tuning.py", line 417, in run early_stop_fn=self.early_stop_fn, File "/opt/conda/lib/python3.7/site-packages/hyperopt/fmin.py", line 586, in fmin rval.exhaust() File "/opt/conda/lib/python3.7/site-packages/hyperopt/fmin.py", line 364, in exhaust self.run(self.max_evals - n_done, block_until_done=self.asynchronous) File "/opt/conda/lib/python3.7/site-packages/hyperopt/fmin.py", line 300, in run self.serial_evaluate() File "/opt/conda/lib/python3.7/site-packages/hyperopt/fmin.py", line 178, in serial_evaluate result = self.domain.evaluate(spec, ctrl) File "/opt/conda/lib/python3.7/site-packages/hyperopt/base.py", line 892, in evaluate rval = self.fn(pyll_rval) File "/userhome/projects/RecBole/recbole/trainer/hyper_tuning.py", line 347, in trial result_dict = self.objective_function(config_dict, self.fixed_config_file_list) File "/userhome/projects/RecBole/recbole/quick_start/quick_start.py", line 158, in objective_function tune.report(**test_result)

zhengbw0324 commented 1 year ago

tune.report is useful only when using Ray for hyperparameter fine-tuning, you can ignore this warning when using Hyperopt.