-
Notifications
You must be signed in to change notification settings - Fork 819
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix: bad file descriptor When using Prophet under a multi-threading environment such as Dask, the error `[Errno 9] Bad File Descriptor` could happen. I can consistently reproduce this error while running forecasts with Dask. This implementation seems to fix the issue. I do not fully understand why this happens, because only when running Dask for a long time would this happen. My implementation is semantically equivalent to the original, but I guess avoiding to open `devnull` too many times can help. Context: I am running forecast using Prophet for about 500_000 time series, all in 1 big Dask data frames (split into 91 smaller Pandas data frames). If I don't use Dask, and instead use *joblib* to parallelize the forecasting, then this error does not happen. I think because joblib creates a separate thread for every worker, whereas Dask can have multiple threads for a worker. * revert changes Update logging.py * make log suppression optional * add unit test * provide better data for test, update model dep * restore original intention of model construction * test case to make sure Prophet model is loaded by default * reformat to black style * sort imports * underscore private variables Co-authored-by: Julien Herzen <julien@unit8.co>
- Loading branch information
Showing
3 changed files
with
61 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters