lancopku / text-autoaugment

[EMNLP 2021] Text AutoAugment: Learning Compositional Augmentation Policy for Text Classification
https://arxiv.org/abs/2109.00523
MIT License
125 stars 16 forks source link

module 'ray.tune' has no attribute 'trial_runner' #13

Closed caesar-jojo closed 1 year ago

caesar-jojo commented 1 year ago

Traceback (most recent call last): File "reproduce_experiment.py", line 10, in from taa.search import get_path, search_policy, train_model_parallel File "/root/yxyanyi/xiaozhu/text-autoaugment-main/taa/search.py", line 51, in patch = gorilla.Patch(ray.tune.trial_runner.TrialRunner, 'step', step_w_log, settings=gorilla.Settings(allow_hit=True)) AttributeError: module 'ray.tune' has no attribute 'trial_runner' 作者您好,我按你的github进行安装环境后,便直接运行reproduce_experiment.py,然后报这个错误,恳望指正

RenShuhuai-Andy commented 1 year ago

你好,感谢关注

这个可能是ray不同版本导致的,我们实验使用的版本是ray==1.6.0。

一种解决方法是安装1.6.0版本的ray;另一种参考https://discuss.ray.io/t/attributeerror-module-ray-tune-has-no-attribute-trial-runner/5122进行一下import可能就可以了