salesforce / Merlion

Merlion: A Machine Learning Framework for Time Series Intelligence
BSD 3-Clause "New" or "Revised" License
3.43k stars 302 forks source link

Exception handling for ensembles and Spark API #118

Closed aadyotb closed 2 years ago

aadyotb commented 2 years ago

This PR improves library robustness by adding better exception handling. Previously, ensemble training would fail if any individual model in the ensemble threw an exception. Now, we simply set a flag which says that the model should not be used, and we only throw an exception if all models failed to train. Similarly, the old Spark API would result in the failure of the entire job if a model threw an exception for any individual time series. We now implement simple default behaviors if a model throws an exception for a specific time series. We also add test coverage for the new supported behaviors.