class_docstr: Configuration options for the training of the Profet meta-model.
class_docstr_tok: ["Configuration","options","for","the","training","of","the","Profet","meta-model","."]
docstr: Create, train and return a surrogate model for the given `benchmark`, `seed` and `task_id`.
  
  Parameters
  ----------
  input_path : Union[Path, str]
      Data directory containing the json files.
  
  Returns
  -------
  Tuple[Any, np.ndarray]
      The surrogate model for the objective, as well as an array of sampled task features.
docstr_tok: ["Create",",","train","and","return","a","surrogate","model","for","the","given","`","benchmark","`",",","`","seed","`","and","`","task_id","`",".","Parameters","--","--","--","--","--","input_path",":","Union","[","Path",",","str","]","Data","directory","containing","the","json","files",".","Returns","--","--","--","-","Tuple","[","Any",",","np.ndarray","]","The","surrogate","model","for","the","objective",",","as","well","as","an","array","of","sampled","task","features","."]
code: def get_task_network(
      self, input_path: Union[Path, str]
  ) -> Tuple[Any, np.ndarray]:
      """Create, train and return a surrogate model for the given `benchmark`, `seed` and `task_id`.
  
      Parameters
      ----------
      input_path : Union[Path, str]
          Data directory containing the json files.
  
      Returns
      -------
      Tuple[Any, np.ndarray]
          The surrogate model for the objective, as well as an array of sampled task features.
      """
      rng = np.random.RandomState(seed=self.seed)
  
      X, Y, C = self.load_data(input_path)
  
      task_features_mean, task_features_std = self._get_features(
          X=X,
          Y=Y,
          C=C,
          display_messages=False,
      )
  
      X_train, Y_train, C_train = self._get_training_data(
          X,
          Y,
          C,
          task_features_mean=task_features_mean,
          task_features_std=task_features_std,
      )
      objective_model, cost_model = self._get_meta_model(
          X_train,
          Y_train,
          C_train,
          with_cost=False,
      )
  
      net = self._create_task_network(objective_model, X_train.shape[1])
  
      multiplier = rng.randn(self.hidden_space)
      h = (
          task_features_mean[self.task_id]
          + task_features_std[self.task_id] * multiplier
      )
      return net, h
  
imports: import json
  import pickle
  import warnings
  from abc import ABC
  from copy import deepcopy
  from dataclasses import dataclass
  from logging import getLogger
  from pathlib import Path
  from typing import Any, Callable, ClassVar, Optional, Tuple, Union
  import numpy
label_desc: Use image node_id 1 for calling the MetaModelConfig obj's underlying member method code with example usage: obj.get_task_network(input_path) and returns: net,  h