PaddlePaddle / PaddleTS

Awesome Easy-to-Use Deep Time Series Modeling based on PaddlePaddle, including comprehensive functionality modules like TSDataset, Analysis, Transform, Models, AutoTS, and Ensemble, etc., supporting versatile tasks like time series forecasting, representation learning, and anomaly detection, etc., featured with quick tracking of SOTA deep models.
Apache License 2.0
477 stars 116 forks source link

AutoTS报错和运行异常 #333

Closed StevenL2017 closed 6 months ago

StevenL2017 commented 1 year ago

执行代码

官方示例

from paddlets.datasets.repository import get_dataset tsdataset = get_dataset("UNI_WTH") from paddlets.models.forecasting import MLPRegressor from paddlets.automl.autots import AutoTS autots_model = AutoTS(MLPRegressor, 96, 2) autots_model.fit(tsdataset)

运行得到输出如下

加粗部分为报错,然后程序不终止,一直不断打印==Status==之后的内容,Number of trials也不变,这个是什么原因呢?

C:\ProgramData\Anaconda3\lib\site-packages\paddlets\automl\searcher.py:4: DeprecationWarning: The module ray.tune.suggest has been moved to ray.tune.search and the old location will be deprecated soon. Please adjust your imports to point to the new location. Example: Do a global search and replace ray.tune.suggest with ray.tune.search. from ray.tune.suggest import BasicVariantGenerator C:\ProgramData\Anaconda3\lib\site-packages\paddlets\automl\searcher.py:5: DeprecationWarning: The module ray.tune.suggest.optuna has been moved to ray.tune.search.optuna and the old location will be deprecated soon. Please adjust your imports to point to the new location. Example: Do a global search and replace ray.tune.suggest.optuna with ray.tune.search.optuna.
from ray.tune.suggest.optuna import OptunaSearch C:\ProgramData\Anaconda3\lib\site-packages\paddlets\automl\searcher.py:6: DeprecationWarning: The module ray.tune.suggest.flaml has been moved to ray.tune.search.flaml and the old location will be deprecated soon. Please adjust your imports to point to the new location. Example: Do a global search and replace ray.tune.suggest.flaml with ray.tune.search.flaml.
from ray.tune.suggest.flaml import CFO C:\ProgramData\Anaconda3\lib\site-packages\paddlets\automl\searcher.py:8: DeprecationWarning: The module ray.tune.suggest.bohb has been moved to ray.tune.search.bohb and the old location will be deprecated soon. Please adjust your imports to point to the new location. Example: Do a global search and replace ray.tune.suggest.bohb with ray.tune.search.bohb. from ray.tune.suggest.bohb import TuneBOHB C:\ProgramData\Anaconda3\lib\site-packages\paddlets\automl\search_space_configer.py:8: DeprecationWarning: The module ray.tune.sample has been moved to ray.tune.search.sample and the old location will be deprecated soon. Please adjust your imports to point to the new location. Example: Do a global search and replace ray.tune.sample with ray.tune.search.sample.
from ray.tune.sample import Float, Integer, Categorical 2022-12-27 14:21:00,844 INFO worker.py:1538 -- Started a local Ray instance. C:\ProgramData\Anaconda3\lib\site-packages\ray\tune\search\optuna\optuna_search.py:694: FutureWarning: IntUniformDistribution has been deprecated in v3.0.0. This feature will be removed in v6.0.0. See https://github.com/optuna/optuna/releases/tag/v3.0.0. Use :class:~optuna.distributions.IntDistribution instead. return ot.distributions.IntUniformDistribution( C:\ProgramData\Anaconda3\lib\site-packages\ray\tune\search\optuna\optuna_search.py:682: FutureWarning: UniformDistribution has been deprecated in v3.0.0. This feature will be removed in v6.0.0. See https://github.com/optuna/optuna/releases/tag/v3.0.0. Use :class:~optuna.distributions.FloatDistribution instead. return ot.distributions.UniformDistribution( [I 2022-12-27 14:21:02,351] A new study created in memory with name: optuna C:\ProgramData\Anaconda3\lib\site-packages\optuna\distributions.py:766: FutureWarning: IntUniformDistribution(high=128, low=8, step=8) is deprecated and internally converted to IntDistribution(high=128, log=False, low=8, step=8). See https://github.com/optuna/optuna/issues/2941. warnings.warn(message, FutureWarning) C:\ProgramData\Anaconda3\lib\site-packages\optuna\distributions.py:766: FutureWarning: IntUniformDistribution(high=600, low=30, step=30) is deprecated and internally converted to IntDistribution(high=600, log=False, low=30, step=30). See https://github.com/optuna/optuna/issues/2941. warnings.warn(message, FutureWarning) C:\ProgramData\Anaconda3\lib\site-packages\optuna\distributions.py:766: FutureWarning: IntUniformDistribution(high=50, low=5, step=5) is deprecated and internally converted to IntDistribution(high=50, log=False, low=5, step=5). See https://github.com/optuna/optuna/issues/2941. warnings.warn(message, FutureWarning) C:\ProgramData\Anaconda3\lib\site-packages\optuna\distributions.py:766: FutureWarning: UniformDistribution(high=0.01, low=0.0001) is deprecated and internally converted to FloatDistribution(high=0.01, log=False, low=0.0001, step=None). See https://github.com/optuna/optuna/issues/2941. warnings.warn(message, FutureWarning) == Status == Current time: 2022-12-27 14:21:07 (running for 00:00:05.18) Memory usage on this node: 12.3/31.7 GiB Using FIFO scheduling algorithm. Resources requested: 0/20 CPUs, 0/1 GPUs, 0.0/12.44 GiB heap, 0.0/6.22 GiB objects (0.0/1.0 accelerator_type:G) Result logdir: C:\Users\Steven\ray_results\run_trial_2022-12-27_14-21-02
Number of trials: 1/20 (1 PENDING) +--------------------+----------+-------+--------------+----------------------+--------------+------------------------+------------+----------+
Trial name status loc batch_size hidden_config max_epochs optimizer_params/lea patience use_bn
rning_rate
--------------------+----------+-------+--------------+----------------------+--------------+------------------------+------------+----------
run_trial_41b3f5c7 PENDING 104 Choice_2: [64, _66c0 300 0.00969596 45 False

+--------------------+----------+-------+--------------+----------------------+--------------+------------------------+------------+----------+

2022-12-27 14:21:12,864 WARNING worker.py:1851 -- This worker was asked to execute a function that has not been registered ({type=PythonFunctionDescriptor, module_name=ray.util.placement_group, class_name=, function_name=_export_bundle_reservation_check_method_if_needed..bundle_reservation_check_func, function_hash=c0f5d1653dc84f95bbeed36cb66471cd}, node=127.0.0.1, worker_id=e226e520eafc567ab1ccf4e297e0559f5116718dbeda073aa17dee4a, pid=9048). You may have to restart Ray. (pid=9048) 2022-12-27 14:21:12,863 ERROR function_manager.py:415 -- This worker was asked to execute a function that has not been registered ({type=PythonFunctionDescriptor, module_name=ray.util.placement_group, class_name=, function_name=_export_bundle_reservation_check_method_if_needed..bundle_reservation_check_func, function_hash=c0f5d1653dc84f95bbeed36cb66471cd}, node=127.0.0.1, worker_id=e226e520eafc567ab1ccf4e297e0559f5116718dbeda073aa17dee4a, pid=9048). You may have to restart Ray. == Status == Current time: 2022-12-27 14:21:12 (running for 00:00:10.23) Memory usage on this node: 12.3/31.7 GiB Using FIFO scheduling algorithm. Resources requested: 0/20 CPUs, 0/1 GPUs, 0.0/12.44 GiB heap, 0.0/6.22 GiB objects (0.0/1.0 accelerator_type:G) Result logdir: C:\Users\Steven\ray_results\run_trial_2022-12-27_14-21-02
Number of trials: 1/20 (1 PENDING) +--------------------+----------+-------+--------------+----------------------+--------------+------------------------+------------+----------+
Trial name status loc batch_size hidden_config max_epochs optimizer_params/lea patience use_bn
rning_rate
--------------------+----------+-------+--------------+----------------------+--------------+------------------------+------------+----------
run_trial_41b3f5c7 PENDING 104 Choice_2: [64, _66c0 300 0.00969596 45 False

+--------------------+----------+-------+--------------+----------------------+--------------+------------------------+------------+----------+

== Status == Current time: 2022-12-27 14:21:18 (running for 00:00:15.30) Memory usage on this node: 12.3/31.7 GiB Using FIFO scheduling algorithm. Resources requested: 0/20 CPUs, 0/1 GPUs, 0.0/12.44 GiB heap, 0.0/6.22 GiB objects (0.0/1.0 accelerator_type:G) Result logdir: C:\Users\Steven\ray_results\run_trial_2022-12-27_14-21-02
Number of trials: 1/20 (1 PENDING) +--------------------+----------+-------+--------------+----------------------+--------------+------------------------+------------+----------+
Trial name status loc batch_size hidden_config max_epochs optimizer_params/lea patience use_bn
rning_rate
--------------------+----------+-------+--------------+----------------------+--------------+------------------------+------------+----------
run_trial_41b3f5c7 PENDING 104 Choice_2: [64, _66c0 300 0.00969596 45 False

+--------------------+----------+-------+--------------+----------------------+--------------+------------------------+------------+----------+

运行环境

windows 11 vscode powershell paddlepaddle-gpu 2.4.1 paddlets 1.0.2

LinWencong commented 1 year ago

请检查一下 ray 的版本,是否为1.13.0或以上版本; ray的 issue 能看到类似的问题修复;解决环境问题成本应该最小,可以考虑重装 autots 的依赖;

StevenL2017 commented 1 year ago

ray 的版本是 2.2.0 autots 是执行这个命令 pip install paddlets[autots] 安装的

LinWencong commented 1 year ago

建议可以尝试,pip install -U ray ray[tune] ray[defaults] optuna,升级一下相关依赖;考虑还是依赖冲突导致;

mendjks commented 1 year ago

from paddlets.automl.autots import AutoTS from paddlets.models.forecasting import MLPRegressor from paddlets.datasets.repository import get_dataset tsdataset = get_dataset("UNI_WTH") 请教一下使用paddleTS手册autots例子中的上面四行代码出现下面报错是什么原因 DeprecationWarning: The module ray.tune.suggest.optuna has been moved to ray.tune.search.optuna and the old location has been deprecated. Please adjust your imports to point to the new location. Example: Do a global search and replace ray.tune.suggest.optuna with ray.tune.search.optuna.

huayuocean commented 1 year ago

请问解决这个问题了吗?我也遇到了同样的问题

akari0216 commented 1 year ago

paddlets的autots依赖ray这个包,然后ray.suggest弃用了,取而代之的是ray.search 手动将paddlets/automl下的: search.py中的第4~8行以及第11行的的ray.tune.suggest改为ray.tune.search search_configure_space.py下的第8行和第9行的ray.tune.sample改为ray.tune.search.sample optimize_runner.py下的第12行的ray.tune.sample改为ray.tune.search.sample 修改完并保存后就不会再出现DeprecationWarning了

wazjajl commented 1 year ago

paddlets的autots依赖ray这个包,然后ray.suggest弃用了,取而代之的是ray.search 手动将paddlets/automl下的: search.py中的第4~8行以及第11行的的ray.tune.suggest改为ray.tune.search search_configure_space.py下的第8行和第9行的ray.tune.sample改为ray.tune.search.sample optimize_runner.py下的第12行的ray.tune.sample改为ray.tune.search.sample 修改完并保存后就不会再出现DeprecationWarning了

已经看到main分支中的代码已经改掉了,但是通过pip安装的包中的代码还没有改(最新版1.1.0),这个是不是只能等到pip包的下一个版本才会更新掉了?

jiaohuix commented 9 months ago

安装了"ray[tune]"==2.6.3 ,报错:The actor ImplicitFunc is too large error ,这个怎么办,paddlets=1.1.0 @akari0216

Sunting78 commented 6 months ago

您好,超过一个月问题自动关闭。