Local Variable is referenced before assignment
- Dominant language
- Python
- Stars
- 20.4k
- Forks
- 4.6k
- Avg merge
- 19h 52m
- Merged PRs (30d)
- 1
Description
So I tried to use prophet as usual. But suddenly there's a new error regarding this:
**UnboundLocalError:** local variable 'forecast_df_folds' referenced before assignment
I'm not sure is this just a local error in my computer or the latest update do give this error sometimes. Here is the more detailed expression:
```
[/usr/local/lib/python3.9/dist-packages/auto_ts/__init__.py](https://localhost:8080/#) in fit(self, traindata, ts_column, target, sep, cv)
573
574 self.ml_dict[name]['model'] = model
--> 575 self.ml_dict[name]['forecast'] = forecast_df_folds
576 self.ml_dict[name][self.score_type] = score_val
577 self.ml_dict[name]['model_build'] = model_build
```
Contributor guide
Research direction
Start at auto_ts/__init__.py, fit(), around line 575, where forecast_df_folds is referenced. Reproduce the failure with the reported Prophet usage and trace every path that assigns this variable; done means the reported fit flow no longer raises UnboundLocalError and existing behavior remains covered by available tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data, machine-learning
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100