class_docstr: Base class for testing Profet tasks.
class_docstr_tok: ["Base","class","for","testing","Profet","tasks","."]
docstr: When using the same task and the same point twice, the results should be identical.
docstr_tok: ["When","using","the","same","task","and","the","same","point","twice",",","the","results","should","be","identical","."]
code: def test_call_twice_with_same_task_gives_same_result(
      self,
      profet_train_config: MetaModelConfig,
      profet_input_dir: Path,
      checkpoint_dir: Path,
      seed: int,
  ):
      """When using the same task and the same point twice, the results should be identical."""
      model_config = replace(profet_train_config, seed=seed)
      task = self.Task(
          model_config=model_config,
          input_dir=profet_input_dir,
          checkpoint_dir=checkpoint_dir,
      )
      assert task.model_config.seed == seed
      trial = sample(task)
  
      first_results = task(**trial.params)
      assert len(first_results) == 1
      assert first_results[0]["type"] == "objective"
  
      # Pass the same point under different forms and check that the results are exactly the same.
      second_results = task(**trial.params)
      assert first_results == second_results
  
imports: from dataclasses import asdict, replace
  from logging import getLogger
  from pathlib import Path
  from typing import ClassVar, Type
  import numpy
  import pytest
  from _pytest.tmpdir import TempPathFactory
  from orion.algo.space import Space
  from typing import List, Union, overload
  from pytest_mock import MockerFixture
  from orion.benchmark.task.profet.profet_task import MetaModelConfig, ProfetTask
  from orion.core.worker.trial import Trial
  from .conftest import REAL_PROFET_DATA_DIR, is_nonempty_dir
label_desc: Use image node_id 10 for calling the ProfetTaskTests obj's underlying member method code with example usage: obj.test_call_twice_with_same_task_gives_same_result(profet_train_config, profet_input_dir, checkpoint_dir, seed) without return types