def append_senteval_params(self, params):
        """Util to append any params to senteval_params after initialization"""
        self.senteval_params = dict(self.senteval_params, **params)

        classifying_tasks = {
            "MR",
            "CR",
            "SUBJ",
            "MPQA",
            "SST2",
            "SST5",
            "TREC",
            "SICKEntailment",
            "SNLI",
            "MRPC",
        }

        if any(t in classifying_tasks for t in self.transfer_tasks):
            try:
                a = "classifier" in self.senteval_params
                if not a:
                    raise ValueError("Include param['classifier'] to run task {}".format(t))
                else:
                    b = (
                        set("nhid", "optim", "batch_size", "tenacity", "epoch_size")
                        in self.senteval_params["classifier"].keys()
                    )
                    if not b:
                        raise ValueError(
                            "Include nhid, optim, batch_size, tenacity, and epoch_size params to "
                            "run task {}".format(t)
                        )
            except ValueError as ve:
                print(ve)
Util to append any params to senteval_params after initialization
utils_nlp/eval/senteval.py