Skip to content

Potential issue in run_forecast function #259

@ajitashwath

Description

@ajitashwath

I'm new to this project and while exploring the code in run_forecast, I noticed a few things that might be worth addressing:

The model is loaded within the function every time it's used. This might make processes slow if forecasts are run a lot.

For instance, the line of code below could be placed outside the function so the model is loaded just once.

# load model only once
model = load_model(f"{dir_path}/../models/model-0.3.0.pkl")

With respect, as much as it's not exactly a high priority with the lone call in run_eval, importing the model within run_forecast could be a performance issue if the function was repeatedly called, which might be worth optimizing.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions