def _check_ckpt_parameters(self, tfm_save):
        """
        Check that the positional parameters used to instantiate the new model loading the weights match those
        of the saved model, to return meaningful messages in case of discrepancies.
        """
        # parameters unrelated to the weights shape
        skipped_params = list(
            inspect.signature(TorchForecastingModel.__init__).parameters.keys()
        ) + [
            "loss_fn",
            "torch_metrics",
            "optimizer_cls",
            "optimizer_kwargs",
            "lr_scheduler_cls",
            "lr_scheduler_kwargs",
            "output_chunk_shift",
        ]
        # model_params can be missing some kwargs
        params_to_check = set(tfm_save.model_params.keys()).union(
            self.model_params.keys()
        ) - set(skipped_params)

        incorrect_params = []
        missing_params = []
        for param_key in params_to_check:
            # param was not used at loading model creation
            if param_key not in self.model_params.keys():
                missing_params.append((param_key, tfm_save.model_params[param_key]))
            # new param was used at loading model creation
            elif param_key not in tfm_save.model_params.keys():
                incorrect_params.append((
                    param_key,
                    None,
                    self.model_params[param_key],
                ))
            # param was different at loading model creation
            elif self.model_params[param_key] != tfm_save.model_params[param_key]:
                # NOTE: for TFTModel, default is None but converted to `QuantileRegression()`
                incorrect_params.append((
                    param_key,
                    tfm_save.model_params[param_key],
                    self.model_params[param_key],
                ))

        # at least one discrepancy was detected
        if len(missing_params) + len(incorrect_params) > 0:
            msg = [
                "The values of the hyper-parameters in the model and loaded checkpoint should be identical."
            ]

            # warning messages formatted to facilitate copy-pasting
            if len(missing_params) > 0:
                msg += ["missing :"]
                msg += [
                    f"   - {param}={exp_val}" for (param, exp_val) in missing_params
                ]

            if len(incorrect_params) > 0:
                msg += ["incorrect :"]
                msg += [
                    f"   - found {param}={cur_val}, should be {param}={exp_val}"
                    for (param, exp_val, cur_val) in incorrect_params
                ]

            raise_log(ValueError("\n".join(msg)), logger)

        Check that the positional parameters used to instantiate the new model loading the weights match those
        of the saved model, to return meaningful messages in case of discrepancies.
        
darts/models/forecasting/torch_forecasting_model.py