File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change 551551 " )\n " ,
552552 " if prediction_intervals is not None:\n " ,
553553 " self.prediction_intervals = prediction_intervals\n " ,
554- " self._cs_df = self._conformity_scores(\n " ,
554+ " \n " ,
555+ " # copy of model to prevent issue such as https://github.com/Nixtla/neuralforecast/issues/1232\n " ,
556+ " model_copy = deepcopy(self)\n " ,
557+ " self._cs_df = model_copy._conformity_scores(\n " ,
555558 " df=df,\n " ,
556559 " id_col=id_col,\n " ,
557560 " time_col=time_col,\n " ,
Original file line number Diff line number Diff line change @@ -493,7 +493,10 @@ def fit(
493493 )
494494 if prediction_intervals is not None :
495495 self .prediction_intervals = prediction_intervals
496- self ._cs_df = self ._conformity_scores (
496+
497+ # copy of model to prevent issue such as https://github.com/Nixtla/neuralforecast/issues/1232
498+ model_copy = deepcopy (self )
499+ self ._cs_df = model_copy ._conformity_scores (
497500 df = df ,
498501 id_col = id_col ,
499502 time_col = time_col ,
You can’t perform that action at this time.
0 commit comments