simpletransformers/language_modeling/language_modeling_model.py
def eval_model(self, eval_file, output_dir=None, verbose=True, silent=False, **kwargs):
        """
        Evaluates the model on eval_df. Saves results to args.output_dir
            result: Dictionary containing evaluation results.
        """  # noqa: ignore flake8"

        if not output_dir:
            output_dir = self.args.output_dir

        self._move_model_to_device()

        eval_dataset = self.load_and_cache_examples(eval_file, evaluate=True, verbose=verbose, silent=silent)
        os.makedirs(output_dir, exist_ok=True)

        result = self.evaluate(eval_dataset, output_dir, verbose=verbose, silent=silent, **kwargs)
        self.results.update(result)

        if verbose:
            logger.info(self.results)

        return result

        Evaluates the model on eval_df. Saves results to args.output_dir
            result: Dictionary containing evaluation results.
        
Evaluates the model on eval_df. Saves results to args.output_dir
result: Dictionary containing evaluation results.
Evaluates the model on eval_df . Saves results to args . output_dir result : Dictionary containing evaluation results .
def eval_model(self, eval_file, output_dir=None, verbose=True, silent=False, **kwargs):
        if not output_dir:
            output_dir = self.args.output_dir
        self._move_model_to_device()
        eval_dataset = self.load_and_cache_examples(eval_file, evaluate=True, verbose=verbose, silent=silent)
        os.makedirs(output_dir, exist_ok=True)
        result = self.evaluate(eval_dataset, output_dir, verbose=verbose, silent=silent, **kwargs)
        self.results.update(result)
        if verbose:
            logger.info(self.results)
        return result
def eval_model ( self , eval_file , output_dir = None , verbose = True , silent = False , ** kwargs ) : if not output_dir : output_dir = self . args . output_dir self . _move_model_to_device ( ) eval_dataset = self . load_and_cache_examples ( eval_file , evaluate = True , verbose = verbose , silent = silent ) os . makedirs ( output_dir , exist_ok = True ) result = self . evaluate ( eval_dataset , output_dir , verbose = verbose , silent = silent , ** kwargs ) self . results . update ( result ) if verbose : logger . info ( self . results ) return result
Evaluates the model on eval_df.
Evaluates the model on eval_df .
"""
        Evaluates the model on eval_df. Saves results to args.output_dir
            result: Dictionary containing evaluation results.
        """ # noqa: ignore flake8"
self
eval_file
output_dir
verbose
silent