def test_neptune_log_metrics_on_trained_model(neptune_mock, tmp_path, monkeypatch):
    """Verify that trained models do log data."""
    monkeypatch.chdir(tmp_path)

    class LoggingModel(BoringModel):
        def on_validation_epoch_end(self):
            self.log("some/key", 42)

    logger, run_instance_mock, _ = _get_logger_with_mocks(api_key="test", project="project")
    _fit_and_test(logger=logger, model=LoggingModel(), tmp_path=tmp_path)
    run_instance_mock.__getitem__.assert_any_call("training/some/key")
    run_instance_mock.__getitem__.return_value.append.assert_has_calls([call(42, step=2)])
Verify that trained models do log data.
tests/tests_pytorch/loggers/test_neptune.py