code: def _evaluate_ogb(
      *,
      evaluator: OGBEvaluator,
      batch_size: int,
      slice_size: int,
      mapped_triples: MappedTriples,
      model: Model,
      negatives: torch.LongTensor,
      target: Target,
      progress_bar: tqdm,
  ) -> tuple[torch.Tensor, torch.Tensor]:
      # todo: maybe we can merge this code with the AMO code of the base evaluator?
      num_triples = mapped_triples.shape[0]
      progress_bar.reset(total=num_triples)
      # pre-allocate
      # TODO: maybe we want to collect scores on CPU / add an option?
      device = model.device
      y_pred_pos_side = torch.empty(size=(num_triples,), device=device)
      num_negatives = negatives.shape[1]
      y_pred_neg_side = torch.empty(
          size=(num_triples, num_negatives), device=device
      )
      # iterate over batches
      offset = 0
      for hrt_batch, negatives_batch in zip(
          mapped_triples.split(split_size=batch_size),
          negatives.split(split_size=batch_size),
      ):
          # combine ids, shape: (batch_size, num_negatives + 1)
          ids = torch.cat(
              [hrt_batch[:, 2, None], negatives_batch], dim=1
          )
          # get scores, shape: (batch_size, num_negatives + 1)
          scores = model.predict(
              hrt_batch=hrt_batch,
              target=target,
              ids=ids,
              mode=evaluator.mode,
              slice_size=slice_size,
          )
          # store positive and negative scores
          this_batch_size = scores.shape[0]
          stop = offset + this_batch_size
          y_pred_pos_side[offset:stop] = scores[:, 0]
          y_pred_neg_side[offset:stop] = scores[:, 1:]
          offset = stop
          progress_bar.update(hrt_batch.shape[0])
      return y_pred_pos_side, y_pred_neg_side
  
file_path: pykeen/src/pykeen/evaluation/ogb_evaluator.py
imports: from __future__ import annotations
  import logging
  from typing import Any, Collection, Dict, Iterable, List, Mapping, Optional, Tuple, Union
  import torch
  from torch_max_mem import maximize_memory_utilization
  from tqdm.auto import tqdm
  from .evaluator import MetricResults
  from .rank_based_evaluator import RankBasedMetricKey, RankBasedMetricResults, SampledRankBasedEvaluator
  from ..metrics import RankBasedMetric
  from ..metrics.ranking import HitsAtK, InverseHarmonicMeanRank
  from ..models import Model
  from ..typing import LABEL_HEAD, LABEL_TAIL, RANK_REALISTIC, SIDE_BOTH, ExtendedTarget, MappedTriples, Target
label_desc: Use image node_id 3 for calling a global function with example usage: _evaluate_ogb() and returns: y_pred_pos_side,  y_pred_neg_side