Just dipping my toes in the PredAI water.....
It's installed, but when starting it up I end up in a loop - this is the full log which just then repeats continously......
[12:07:03] INFO: PredAI init script running
Running App Process Management
Your API key is: 48715a5c205433598e1597b1b85e1e36647035ac923eda112bab5ff1574a563402d8e4b345fae8aabbed427cf2dffc0d72cdbe4a2e365467
Bootstrap predai
Copy initial python files
Startup
Importing plotly failed. Interactive plots will not work.
Importing plotly failed. Interactive plots will not work.
HA Interface started key 48715a5c205433598e1597b1b85e1e36647035ac923eda112bab5ff1574a563402d8e4b345fae8aabbed427cf2dffc0d72cdbe4a2e365467 url http://supervisor/core
Configuration loaded
Update at time 2025-12-30 12:00:00+00:00 Processing sensor sensor.load_today incrementing True max_increment 0 reset_daily True interval 30 days 14 export_days 14 subtract None
Getting history for sensor sensor.load_today start 2025-12-16T12:00:00+0000 end 2025-12-30T12:00:00+0000
History for sensor sensor.load_today starts at 2025-12-20 04:13:00+00:00 ends at 2025-12-30 11:59:00+00:00
Process dataset for sensor sensor.load_today start 2025-12-20 04:13:00+00:00 end 2025-12-30 11:59:00+00:00 incrementing True reset_low 1.0 reset_high 2.0
ds y
0 2025-12-20 04:00:00+00:00 0.00
1 2025-12-20 04:30:00+00:00 0.10
2 2025-12-20 05:00:00+00:00 0.13
3 2025-12-20 05:30:00+00:00 0.20
4 2025-12-20 06:00:00+00:00 0.19
.. ... ...
491 2025-12-30 09:30:00+00:00 0.31
492 2025-12-30 10:00:00+00:00 0.47
493 2025-12-30 10:30:00+00:00 0.28
494 2025-12-30 11:00:00+00:00 0.23
495 2025-12-30 11:30:00+00:00 1.11
[496 rows x 2 columns]
Create table sensor_load_today
Added 0 rows to database table sensor_load_today
Cleanup table sensor_load_today older than 2024-12-30 12:07:08+0000
Stored dataset in database and retrieved full history from database length 976
WARNING - (py.warnings._showwarnmsg) - /usr/local/lib/python3.10/dist-packages/neuralprophet/df_utils.py:464: FutureWarning: DataFrameGroupBy.apply operated on the grouping columns. This behavior is deprecated, and in a future version of pandas the grouping columns will be excluded from the operation. Either pass include_groups=False to exclude the groupings or explicitly select the grouping columns after groupby to silence this warning.
if df.groupby("ID").apply(lambda x: x.duplicated("ds").any()).any():
WARNING - (py.warnings._showwarnmsg) - /usr/local/lib/python3.10/dist-packages/neuralprophet/df_utils.py:1152: FutureWarning: Series.view is deprecated and will be removed in a future version. Use astype as an alternative to change the dtype.
converted_ds = pd.to_datetime(ds_col, utc=True).view(dtype=np.int64)
WARNING - (py.warnings._showwarnmsg) - /usr/local/lib/python3.10/dist-packages/neuralprophet/df_utils.py:1152: FutureWarning: Series.view is deprecated and will be removed in a future version. Use astype as an alternative to change the dtype.
converted_ds = pd.to_datetime(ds_col, utc=True).view(dtype=np.int64)
WARNING - (py.warnings._showwarnmsg) - /usr/local/lib/python3.10/dist-packages/neuralprophet/df_utils.py:1152: FutureWarning: Series.view is deprecated and will be removed in a future version. Use astype as an alternative to change the dtype.
converted_ds = pd.to_datetime(ds_col, utc=True).view(dtype=np.int64)
Finding best initial lr: 0%| | 0/225 [00:00<?, ?it/s]WARNING - (py.warnings._showwarnmsg) - /usr/local/lib/python3.10/dist-packages/pytorch_lightning/utilities/data.py:79: Trying to infer the batch_size from an ambiguous collection. The batch size we found is 32. To avoid any miscalculations, use self.log(..., batch_size=batch_size).
Finding best initial lr: 0%| | 1/225 [00:00<00:32, 6.80it/s]
Finding best initial lr: 7%|▋ | 16/225 [00:00<00:02, 77.24it/s]WARNING - (py.warnings._showwarnmsg) - /usr/local/lib/python3.10/dist-packages/pytorch_lightning/utilities/data.py:79: Trying to infer the batch_size from an ambiguous collection. The batch size we found is 16. To avoid any miscalculations, use self.log(..., batch_size=batch_size).
Finding best initial lr: 14%|█▍ | 31/225 [00:00<00:01, 106.23it/s]
Finding best initial lr: 20%|██ | 46/225 [00:00<00:01, 122.09it/s]
Finding best initial lr: 28%|██▊ | 62/225 [00:00<00:01, 132.43it/s]
Finding best initial lr: 34%|███▍ | 77/225 [00:00<00:01, 138.02it/s]
Finding best initial lr: 41%|████▏ | 93/225 [00:00<00:00, 142.27it/s]
Finding best initial lr: 48%|████▊ | 108/225 [00:00<00:00, 141.45it/s]
Finding best initial lr: 55%|█████▍ | 123/225 [00:00<00:00, 142.25it/s]
Finding best initial lr: 61%|██████▏ | 138/225 [00:01<00:00, 144.06it/s]
Finding best initial lr: 68%|██████▊ | 154/225 [00:01<00:00, 146.36it/s]
Finding best initial lr: 75%|███████▌ | 169/225 [00:01<00:00, 147.26it/s]
Finding best initial lr: 82%|████████▏ | 185/225 [00:01<00:00, 148.46it/s]
Finding best initial lr: 89%|████████▉ | 200/225 [00:01<00:00, 148.83it/s]
Finding best initial lr: 96%|█████████▌| 216/225 [00:01<00:00, 149.43it/s]
Finding best initial lr: 100%|██████████| 225/225 [00:01<00:00, 135.99it/s]
Traceback (most recent call last):
File "/config/predai.py", line 455, in
asyncio.run(main())
File "/usr/lib/python3.10/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/usr/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
return future.result()
File "/config/predai.py", line 440, in main
await nw.train(dataset, future_periods, n_lags=n_lags, country=country)
File "/config/predai.py", line 206, in train
self.metrics = self.model.fit(dataset, freq=(str(self.period) + "min"), progress=None)
File "/usr/local/lib/python3.10/dist-packages/neuralprophet/forecaster.py", line 1065, in fit
metrics_df = self._train(
File "/usr/local/lib/python3.10/dist-packages/neuralprophet/forecaster.py", line 2810, in _train
lr_finder = tuner.lr_find(
File "/usr/local/lib/python3.10/dist-packages/pytorch_lightning/tuner/tuning.py", line 191, in lr_find
self._trainer.fit(model, train_dataloaders, val_dataloaders, datamodule)
File "/usr/local/lib/python3.10/dist-packages/pytorch_lightning/trainer/trainer.py", line 584, in fit
call._call_and_handle_interrupt(
File "/usr/local/lib/python3.10/dist-packages/pytorch_lightning/trainer/call.py", line 49, in _call_and_handle_interrupt
return trainer_fn(*args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/pytorch_lightning/trainer/trainer.py", line 630, in _fit_impl
self._run(model, ckpt_path=ckpt_path, weights_only=weights_only)
File "/usr/local/lib/python3.10/dist-packages/pytorch_lightning/trainer/trainer.py", line 1057, in _run
call._call_callback_hooks(self, "on_fit_start")
File "/usr/local/lib/python3.10/dist-packages/pytorch_lightning/trainer/call.py", line 228, in _call_callback_hooks
fn(trainer, trainer.lightning_module, *args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/pytorch_lightning/callbacks/lr_finder.py", line 130, in on_fit_start
self.lr_find(trainer, pl_module)
File "/usr/local/lib/python3.10/dist-packages/pytorch_lightning/callbacks/lr_finder.py", line 113, in lr_find
self.optimal_lr = _lr_find(
File "/usr/local/lib/python3.10/dist-packages/pytorch_lightning/tuner/lr_finder.py", line 288, in _lr_find
trainer._checkpoint_connector.restore(ckpt_path)
File "/usr/local/lib/python3.10/dist-packages/pytorch_lightning/trainer/connectors/checkpoint_connector.py", line 247, in restore
self.resume_start(checkpoint_path, weights_only=weights_only)
File "/usr/local/lib/python3.10/dist-packages/pytorch_lightning/trainer/connectors/checkpoint_connector.py", line 83, in resume_start
loaded_checkpoint = self.trainer.strategy.load_checkpoint(checkpoint_path, weights_only=weights_only)
File "/usr/local/lib/python3.10/dist-packages/pytorch_lightning/strategies/strategy.py", line 368, in load_checkpoint
return self.checkpoint_io.load_checkpoint(checkpoint_path, weights_only=weights_only)
File "/usr/local/lib/python3.10/dist-packages/lightning_fabric/plugins/io/torch_io.py", line 91, in load_checkpoint
return pl_load(path, map_location=map_location, weights_only=weights_only)
File "/usr/local/lib/python3.10/dist-packages/lightning_fabric/utilities/cloud_io.py", line 73, in _load
return torch.load(
File "/usr/local/lib/python3.10/dist-packages/torch/serialization.py", line 1529, in load
raise pickle.UnpicklingError(_get_wo_message(str(e))) from None
_pickle.UnpicklingError: Weights only load failed. This file can still be loaded, to do so you have two options, do those steps only if you trust the source of the checkpoint.
(1) In PyTorch 2.6, we changed the default value of the weights_only argument in torch.load from False to True. Re-running torch.load with weights_only set to False will likely succeed, but it can result in arbitrary code execution. Do it only if you got the file from a trusted source.
(2) Alternatively, to load with weights_only=True please check the recommended steps in the following error message.
WeightsUnpickler error: Unsupported global: GLOBAL neuralprophet.configure.ConfigSeasonality was not an allowed global by default. Please use torch.serialization.add_safe_globals([neuralprophet.configure.ConfigSeasonality]) or the torch.serialization.safe_globals([neuralprophet.configure.ConfigSeasonality]) context manager to allowlist this global if you trust this class/function.
Check the documentation of torch.load to learn more about types accepted by default with weights_only https://pytorch.org/docs/stable/generated/torch.load.html.
Just dipping my toes in the PredAI water.....
It's installed, but when starting it up I end up in a loop - this is the full log which just then repeats continously......
[12:07:03] INFO: PredAI init script running
Running App Process Management
Your API key is: 48715a5c205433598e1597b1b85e1e36647035ac923eda112bab5ff1574a563402d8e4b345fae8aabbed427cf2dffc0d72cdbe4a2e365467
Bootstrap predai
Copy initial python files
Startup
Importing plotly failed. Interactive plots will not work.
Importing plotly failed. Interactive plots will not work.
HA Interface started key 48715a5c205433598e1597b1b85e1e36647035ac923eda112bab5ff1574a563402d8e4b345fae8aabbed427cf2dffc0d72cdbe4a2e365467 url http://supervisor/core
Configuration loaded
Update at time 2025-12-30 12:00:00+00:00 Processing sensor sensor.load_today incrementing True max_increment 0 reset_daily True interval 30 days 14 export_days 14 subtract None
Getting history for sensor sensor.load_today start 2025-12-16T12:00:00+0000 end 2025-12-30T12:00:00+0000
History for sensor sensor.load_today starts at 2025-12-20 04:13:00+00:00 ends at 2025-12-30 11:59:00+00:00
Process dataset for sensor sensor.load_today start 2025-12-20 04:13:00+00:00 end 2025-12-30 11:59:00+00:00 incrementing True reset_low 1.0 reset_high 2.0
ds y
0 2025-12-20 04:00:00+00:00 0.00
1 2025-12-20 04:30:00+00:00 0.10
2 2025-12-20 05:00:00+00:00 0.13
3 2025-12-20 05:30:00+00:00 0.20
4 2025-12-20 06:00:00+00:00 0.19
.. ... ...
491 2025-12-30 09:30:00+00:00 0.31
492 2025-12-30 10:00:00+00:00 0.47
493 2025-12-30 10:30:00+00:00 0.28
494 2025-12-30 11:00:00+00:00 0.23
495 2025-12-30 11:30:00+00:00 1.11
[496 rows x 2 columns]
Create table sensor_load_today
Added 0 rows to database table sensor_load_today
Cleanup table sensor_load_today older than 2024-12-30 12:07:08+0000
Stored dataset in database and retrieved full history from database length 976
WARNING - (py.warnings._showwarnmsg) - /usr/local/lib/python3.10/dist-packages/neuralprophet/df_utils.py:464: FutureWarning: DataFrameGroupBy.apply operated on the grouping columns. This behavior is deprecated, and in a future version of pandas the grouping columns will be excluded from the operation. Either pass
include_groups=Falseto exclude the groupings or explicitly select the grouping columns after groupby to silence this warning.if df.groupby("ID").apply(lambda x: x.duplicated("ds").any()).any():
WARNING - (py.warnings._showwarnmsg) - /usr/local/lib/python3.10/dist-packages/neuralprophet/df_utils.py:1152: FutureWarning: Series.view is deprecated and will be removed in a future version. Use
astypeas an alternative to change the dtype.converted_ds = pd.to_datetime(ds_col, utc=True).view(dtype=np.int64)
WARNING - (py.warnings._showwarnmsg) - /usr/local/lib/python3.10/dist-packages/neuralprophet/df_utils.py:1152: FutureWarning: Series.view is deprecated and will be removed in a future version. Use
astypeas an alternative to change the dtype.converted_ds = pd.to_datetime(ds_col, utc=True).view(dtype=np.int64)
WARNING - (py.warnings._showwarnmsg) - /usr/local/lib/python3.10/dist-packages/neuralprophet/df_utils.py:1152: FutureWarning: Series.view is deprecated and will be removed in a future version. Use
astypeas an alternative to change the dtype.converted_ds = pd.to_datetime(ds_col, utc=True).view(dtype=np.int64)
Finding best initial lr: 0%| | 0/225 [00:00<?, ?it/s]WARNING - (py.warnings._showwarnmsg) - /usr/local/lib/python3.10/dist-packages/pytorch_lightning/utilities/data.py:79: Trying to infer the
batch_sizefrom an ambiguous collection. The batch size we found is 32. To avoid any miscalculations, useself.log(..., batch_size=batch_size).Finding best initial lr: 0%| | 1/225 [00:00<00:32, 6.80it/s]
Finding best initial lr: 7%|▋ | 16/225 [00:00<00:02, 77.24it/s]WARNING - (py.warnings._showwarnmsg) - /usr/local/lib/python3.10/dist-packages/pytorch_lightning/utilities/data.py:79: Trying to infer the
batch_sizefrom an ambiguous collection. The batch size we found is 16. To avoid any miscalculations, useself.log(..., batch_size=batch_size).Finding best initial lr: 14%|█▍ | 31/225 [00:00<00:01, 106.23it/s]
Finding best initial lr: 20%|██ | 46/225 [00:00<00:01, 122.09it/s]
Finding best initial lr: 28%|██▊ | 62/225 [00:00<00:01, 132.43it/s]
Finding best initial lr: 34%|███▍ | 77/225 [00:00<00:01, 138.02it/s]
Finding best initial lr: 41%|████▏ | 93/225 [00:00<00:00, 142.27it/s]
Finding best initial lr: 48%|████▊ | 108/225 [00:00<00:00, 141.45it/s]
Finding best initial lr: 55%|█████▍ | 123/225 [00:00<00:00, 142.25it/s]
Finding best initial lr: 61%|██████▏ | 138/225 [00:01<00:00, 144.06it/s]
Finding best initial lr: 68%|██████▊ | 154/225 [00:01<00:00, 146.36it/s]
Finding best initial lr: 75%|███████▌ | 169/225 [00:01<00:00, 147.26it/s]
Finding best initial lr: 82%|████████▏ | 185/225 [00:01<00:00, 148.46it/s]
Finding best initial lr: 89%|████████▉ | 200/225 [00:01<00:00, 148.83it/s]
Finding best initial lr: 96%|█████████▌| 216/225 [00:01<00:00, 149.43it/s]
Finding best initial lr: 100%|██████████| 225/225 [00:01<00:00, 135.99it/s]
Traceback (most recent call last):
File "/config/predai.py", line 455, in
asyncio.run(main())
File "/usr/lib/python3.10/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/usr/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
return future.result()
File "/config/predai.py", line 440, in main
await nw.train(dataset, future_periods, n_lags=n_lags, country=country)
File "/config/predai.py", line 206, in train
self.metrics = self.model.fit(dataset, freq=(str(self.period) + "min"), progress=None)
File "/usr/local/lib/python3.10/dist-packages/neuralprophet/forecaster.py", line 1065, in fit
metrics_df = self._train(
File "/usr/local/lib/python3.10/dist-packages/neuralprophet/forecaster.py", line 2810, in _train
lr_finder = tuner.lr_find(
File "/usr/local/lib/python3.10/dist-packages/pytorch_lightning/tuner/tuning.py", line 191, in lr_find
self._trainer.fit(model, train_dataloaders, val_dataloaders, datamodule)
File "/usr/local/lib/python3.10/dist-packages/pytorch_lightning/trainer/trainer.py", line 584, in fit
call._call_and_handle_interrupt(
File "/usr/local/lib/python3.10/dist-packages/pytorch_lightning/trainer/call.py", line 49, in _call_and_handle_interrupt
return trainer_fn(*args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/pytorch_lightning/trainer/trainer.py", line 630, in _fit_impl
self._run(model, ckpt_path=ckpt_path, weights_only=weights_only)
File "/usr/local/lib/python3.10/dist-packages/pytorch_lightning/trainer/trainer.py", line 1057, in _run
call._call_callback_hooks(self, "on_fit_start")
File "/usr/local/lib/python3.10/dist-packages/pytorch_lightning/trainer/call.py", line 228, in _call_callback_hooks
fn(trainer, trainer.lightning_module, *args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/pytorch_lightning/callbacks/lr_finder.py", line 130, in on_fit_start
self.lr_find(trainer, pl_module)
File "/usr/local/lib/python3.10/dist-packages/pytorch_lightning/callbacks/lr_finder.py", line 113, in lr_find
self.optimal_lr = _lr_find(
File "/usr/local/lib/python3.10/dist-packages/pytorch_lightning/tuner/lr_finder.py", line 288, in _lr_find
trainer._checkpoint_connector.restore(ckpt_path)
File "/usr/local/lib/python3.10/dist-packages/pytorch_lightning/trainer/connectors/checkpoint_connector.py", line 247, in restore
self.resume_start(checkpoint_path, weights_only=weights_only)
File "/usr/local/lib/python3.10/dist-packages/pytorch_lightning/trainer/connectors/checkpoint_connector.py", line 83, in resume_start
loaded_checkpoint = self.trainer.strategy.load_checkpoint(checkpoint_path, weights_only=weights_only)
File "/usr/local/lib/python3.10/dist-packages/pytorch_lightning/strategies/strategy.py", line 368, in load_checkpoint
return self.checkpoint_io.load_checkpoint(checkpoint_path, weights_only=weights_only)
File "/usr/local/lib/python3.10/dist-packages/lightning_fabric/plugins/io/torch_io.py", line 91, in load_checkpoint
return pl_load(path, map_location=map_location, weights_only=weights_only)
File "/usr/local/lib/python3.10/dist-packages/lightning_fabric/utilities/cloud_io.py", line 73, in _load
return torch.load(
File "/usr/local/lib/python3.10/dist-packages/torch/serialization.py", line 1529, in load
raise pickle.UnpicklingError(_get_wo_message(str(e))) from None
_pickle.UnpicklingError: Weights only load failed. This file can still be loaded, to do so you have two options, do those steps only if you trust the source of the checkpoint.
(1) In PyTorch 2.6, we changed the default value of the
weights_onlyargument intorch.loadfromFalsetoTrue. Re-runningtorch.loadwithweights_onlyset toFalsewill likely succeed, but it can result in arbitrary code execution. Do it only if you got the file from a trusted source.(2) Alternatively, to load with
weights_only=Trueplease check the recommended steps in the following error message.WeightsUnpickler error: Unsupported global: GLOBAL neuralprophet.configure.ConfigSeasonality was not an allowed global by default. Please use
torch.serialization.add_safe_globals([neuralprophet.configure.ConfigSeasonality])or thetorch.serialization.safe_globals([neuralprophet.configure.ConfigSeasonality])context manager to allowlist this global if you trust this class/function.Check the documentation of torch.load to learn more about types accepted by default with weights_only https://pytorch.org/docs/stable/generated/torch.load.html.