class_docstr: Test class for `R2Score` metric.
docstr: Test dtype support of the metric on GPU.
docstr_tok: ["Test","dtype","support","of","the","metric","on","GPU","."]
code: def test_r2_half_gpu(
      self,
      adjusted,
      multioutput,
      preds,
      target,
      ref_metric,
      num_outputs,
  ):
      """Test dtype support of the metric on GPU."""
      self.run_precision_test_gpu(
          preds,
          target,
          partial(R2Score, num_outputs=num_outputs),
          r2_score,
          {"adjusted": adjusted, "multioutput": multioutput},
      )
  
imports: from functools import partial
  import pytest
  import torch
  from sklearn.metrics import r2_score
  from torchmetrics.functional import r2_score
  from torchmetrics.regression import R2Score
  from unittests import BATCH_SIZE, NUM_BATCHES, _Input
  from unittests.helpers import seed_all
  from unittests.helpers.testers import MetricTester
label_desc: Use image node_id 5 for calling the TestR2Score obj's underlying member method code with example usage: obj.test_r2_half_gpu(adjusted, multioutput, preds, target, ref_metric, num_outputs) without return types