def test_lbfgs_cpu_model(tmp_path):
    """Test each of the trainer options.

    Testing LBFGS optimizer

    """
    seed_everything(42)

    class ModelSpecifiedOptimizer(BoringModel):
        def __init__(self, optimizer_name, learning_rate):
            super().__init__()
            self.optimizer_name = optimizer_name
            self.learning_rate = learning_rate
            self.save_hyperparameters()

    trainer_options = {
        "default_root_dir": tmp_path,
        "max_epochs": 1,
        "enable_progress_bar": False,
        "limit_train_batches": 0.2,
        "limit_val_batches": 0.2,
    }

    model = ModelSpecifiedOptimizer(optimizer_name="LBFGS", learning_rate=0.004)
    tpipes.run_model_test_without_loggers(trainer_options, model, min_acc=0.01)
Test each of the trainer options.

    Testing LBFGS optimizer

    
tests/tests_pytorch/models/test_cpu.py