Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError in docs examples #131

Open
eulbdoor opened this issue Feb 1, 2024 · 1 comment
Open

TypeError in docs examples #131

eulbdoor opened this issue Feb 1, 2024 · 1 comment

Comments

@eulbdoor
Copy link

eulbdoor commented Feb 1, 2024

Hi there, getting the following error:

[1](vscode-notebook-cell:?execution_count=2&line=1) forecaster = Forecaster()  # Creates forecasts and stores the result
----> [2](vscode-notebook-cell:?execution_count=2&line=2) result = forecaster.run_forecast_config(  # result is also stored as `forecaster.forecast_result`.
      [3](vscode-notebook-cell:?execution_count=2&line=3)     df=df,
      [4](vscode-notebook-cell:?execution_count=2&line=4)     config=ForecastConfig(
      [5](vscode-notebook-cell:?execution_count=2&line=5)         model_template=ModelTemplateEnum.AUTO.name,
      [6](vscode-notebook-cell:?execution_count=2&line=6)         forecast_horizon=365,  # forecasts 365 steps ahead
      [7](vscode-notebook-cell:?execution_count=2&line=7)         coverage=0.95,         # 95% prediction intervals
      [8](vscode-notebook-cell:?execution_count=2&line=8)         metadata_param=metadata
      [9](vscode-notebook-cell:?execution_count=2&line=9)     )
     [10](vscode-notebook-cell:?execution_count=2&line=10) )
File [~/anaconda3/envs/delete/lib/python3.10/site-packages/greykite/framework/templates/forecaster.py:375](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/jpereira/labs/delete/~/anaconda3/envs/delete/lib/python3.10/site-packages/greykite/framework/templates/forecaster.py:375), in Forecaster.run_forecast_config(self, df, config)
    [349](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/jpereira/labs/delete/~/anaconda3/envs/delete/lib/python3.10/site-packages/greykite/framework/templates/forecaster.py:349) def run_forecast_config(
    [350](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/jpereira/labs/delete/~/anaconda3/envs/delete/lib/python3.10/site-packages/greykite/framework/templates/forecaster.py:350)         self,
    [351](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/jpereira/labs/delete/~/anaconda3/envs/delete/lib/python3.10/site-packages/greykite/framework/templates/forecaster.py:351)         df: pd.DataFrame,
    [352](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/jpereira/labs/delete/~/anaconda3/envs/delete/lib/python3.10/site-packages/greykite/framework/templates/forecaster.py:352)         config: Optional[ForecastConfig] = None) -> ForecastResult:
    [353](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/jpereira/labs/delete/~/anaconda3/envs/delete/lib/python3.10/site-packages/greykite/framework/templates/forecaster.py:353)     """Creates a forecast from input data and config.
    [354](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/jpereira/labs/delete/~/anaconda3/envs/delete/lib/python3.10/site-packages/greykite/framework/templates/forecaster.py:354)     The result is also stored as ``self.forecast_result``.
    [355](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/jpereira/labs/delete/~/anaconda3/envs/delete/lib/python3.10/site-packages/greykite/framework/templates/forecaster.py:355) 
   (...)
    [373](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/jpereira/labs/delete/~/anaconda3/envs/delete/lib/python3.10/site-packages/greykite/framework/templates/forecaster.py:373)         according to the ``df`` and ``config`` configuration parameters.
    [374](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/jpereira/labs/delete/~/anaconda3/envs/delete/lib/python3.10/site-packages/greykite/framework/templates/forecaster.py:374)     """
...
---> [84](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/jpereira/labs/delete/~/anaconda3/envs/delete/lib/python3.10/site-packages/greykite/framework/templates/forecast_config_defaults.py:84) if computation.n_jobs is None:
     [85](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/jpereira/labs/delete/~/anaconda3/envs/delete/lib/python3.10/site-packages/greykite/framework/templates/forecast_config_defaults.py:85)     computation.n_jobs = COMPUTATION_N_JOBS
     [86](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/jpereira/labs/delete/~/anaconda3/envs/delete/lib/python3.10/site-packages/greykite/framework/templates/forecast_config_defaults.py:86) if computation.verbose is None:

TypeError: _transform_one() missing 1 required positional argument: 'params'

It happens with both github readme and simples forecast examples.

Running python 3.10.2 on a fresh conda env.

@FedericoGriggio
Copy link

Hello @eulbdoor I solved this issue using scikit-learn==1.3.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants