class_docstr: Base class for Tasks that are generated using the Profet algorithm.
  
  For more information on Profet, see original paper at https://arxiv.org/abs/1905.12982.
  
  Klein, Aaron, Zhenwen Dai, Frank Hutter, Neil Lawrence, and Javier Gonzalez. "Meta-surrogate benchmarking for
  hyperparameter optimization." Advances in Neural Information Processing Systems 32 (2019): 6270-6280.
  
  Parameters
  ----------
  max_trials : int, optional
      Max number of trials to run, by default 100
  input_dir : Union[Path, str], optional
      Input directory containing the data used to train the meta-model, by default None.
  checkpoint_dir : Union[Path, str], optional
      Directory used to save/load trained meta-models, by default None.
  model_config : MetaModelConfig, optional
      Configuration options for the training of the meta-model, by default None
  device : str, optional
      The device to use for training, by default None.
  with_grad : bool, optional
      Whether the task should also return the gradients of the objective function with respect to
      the inputs. Defaults to `False`.
class_docstr_tok: ["Base","class","for","Tasks","that","are","generated","using","the","Profet","algorithm",".","For","more","information","on","Profet",",","see","original","paper","at","https",":","\/\/arxiv.org\/abs\/1905.12982",".","Klein",",","Aaron",",","Zhenwen","Dai",",","Frank","Hutter",",","Neil","Lawrence",",","and","Javier","Gonzalez",".","``","Meta-surrogate","benchmarking","for","hyperparameter","optimization",".","''","Advances","in","Neural","Information","Processing","Systems","32","(","2019",")",":","6270-6280",".","Parameters","--","--","--","--","--","max_trials",":","int",",","optional","Max","number","of","trials","to","run",",","by","default","100","input_dir",":","Union","[","Path",",","str","]",",","optional","Input","directory","containing","the","data","used","to","train","the","meta-model",",","by","default","None",".","checkpoint_dir",":","Union","[","Path",",","str","]",",","optional","Directory","used","to","save\/load","trained","meta-models",",","by","default","None",".","model_config",":","MetaModelConfig",",","optional","Configuration","options","for","the","training","of","the","meta-model",",","by","default","None","device",":","str",",","optional","The","device","to","use","for","training",",","by","default","None",".","with_grad",":","bool",",","optional","Whether","the","task","should","also","return","the","gradients","of","the","objective","function","with","respect","to","the","inputs",".","Defaults","to","`","False","`","."]
docstr: Return the configuration of the task.
docstr_tok: ["Return","the","configuration","of","the","task","."]
code: def configuration(self):
      """Return the configuration of the task."""
      return {
          self.__class__.__qualname__: {
              "max_trials": self.max_trials,
              "input_dir": str(self.input_dir),
              "checkpoint_dir": str(self.checkpoint_dir),
              "model_config": asdict(self.model_config),
              "device": self.device.type,
              "with_grad": self.with_grad,
          }
      }
  
imports: import os
  import random
  import warnings
  from abc import ABC
  from contextlib import contextmanager
  from dataclasses import asdict
  from logging import getLogger
  from pathlib import Path
  from typing import Any, ClassVar, Dict, List, Optional, Type, Union
  import numpy
  from orion.algo.space import Space
  from orion.benchmark.task.base import BenchmarkTask
  from orion.benchmark.task.profet.model_utils import MetaModelConfig
  from orion.core.io.space_builder import SpaceBuilder
  from orion.core.utils import compute_identity
  from orion.core.utils.flatten import flatten
  from orion.core.utils.format_trials import dict_to_trial
  from orion.core.worker import transformer
label_desc: Use image node_id 4 for calling the ProfetTask obj's underlying member method code with example usage: obj.configuration() and returns: dict