class_docstr: Test filtering of triples during evaluation using the pipeline.
class_docstr_tok: ["Test","filtering","of","triples","during","evaluation","using","the","pipeline","."]
docstr: Test if the evaluator's triple filtering with validation triples works as expected using the pipeline.
docstr_tok: ["Test","if","the","evaluator","'s","triple","filtering","with","validation","triples","works","as","expected","using","the","pipeline","."]
code: def test_pipeline_evaluation_filtering_with_validation_triples(self):
      """Test if the evaluator's triple filtering with validation triples works as expected using the pipeline."""
      results = pipeline(
          model=self.model,
          dataset=self.dataset,
          training_loop_kwargs=dict(
              automatic_memory_optimization=False
          ),
          training_kwargs=dict(num_epochs=0, use_tqdm=False),
          evaluator_kwargs=dict(
              filtered=True, automatic_memory_optimization=False
          ),
          evaluation_kwargs=dict(use_tqdm=False),
          device=self.device,
          random_seed=42,
          filter_validation_when_testing=True,
      )
      assert (
          results.metric_results.get_metric("mr") == 1
      ), "The rank should equal 1"
  
imports: import itertools
  import pathlib
  import tempfile
  import unittest
  from typing import Type
  from unittest import mock
  import pytest
  import torch
  import pykeen.regularizers
  from pykeen.datasets import EagerDataset, Nations
  from pykeen.models import ERModel, FixedModel, Model
  from pykeen.models.resolve import DimensionError, make_model, make_model_cls
  from pykeen.nn.modules import TransEInteraction
  from pykeen.nn.representation import Embedding
  from pykeen.pipeline import PipelineResult, pipeline
  from pykeen.pipeline.api import replicate_pipeline_from_config
  from pykeen.regularizers import NoRegularizer
  from pykeen.sampling.negative_sampler import NegativeSampler
  from pykeen.training import SLCWATrainingLoop
  from pykeen.triples.generation import generate_triples_factory
  from pykeen.triples.triples_factory import CoreTriplesFactory, TriplesFactory
  from pykeen.utils import resolve_device
  from .utils import needs_packages
label_desc: Use image node_id 3 for calling the TestPipelineEvaluationFiltering obj's underlying member method code with example usage: obj.test_pipeline_evaluation_filtering_with_validation_triples() without return types