class_docstr: Class responsible for configuring Train dataset preprocessing.
  
  For advanced use cases, this class can be subclassed and the `configure()` method
  overriden for custom data preprocessing.
class_docstr_tok: ["Class","responsible","for","configuring","Train","dataset","preprocessing",".","For","advanced","use","cases",",","this","class","can","be","subclassed","and","the","`","configure","(",")","`","method","overriden","for","custom","data","preprocessing","."]
docstr: Set the total number of CPUs and GPUs used by training.
  
  If CPU or GPU resource limits are not set, they will be set to the
  total cluster resources minus the resources used by training.
docstr_tok: ["Set","the","total","number","of","CPUs","and","GPUs","used","by","training",".","If","CPU","or","GPU","resource","limits","are","not","set",",","they","will","be","set","to","the","total","cluster","resources","minus","the","resources","used","by","training","."]
code: def set_train_total_resources(
      self, num_train_cpus: float, num_train_gpus: float
  ):
      """Set the total number of CPUs and GPUs used by training.
  
      If CPU or GPU resource limits are not set, they will be set to the
      total cluster resources minus the resources used by training.
      """
      # TODO: We may also include other resources besides CPU and GPU.
      self._num_train_cpus = num_train_cpus
      self._num_train_gpus = num_train_gpus
  
file_path: ray/python/ray/train/_internal/data_config.py
imports: import copy
  from typing import Dict, List, Literal, Optional, Union
  import ray
  from ray.actor import ActorHandle
  from ray.data import DataIterator, Dataset, ExecutionOptions, NodeIdStr
  from ray.data._internal.execution.interfaces.execution_options import ExecutionResources
  from ray.data.preprocessor import Preprocessor
  from ray.train.constants import TRAIN_DATASET_KEY
  from ray.util.annotations import DeveloperAPI, PublicAPI
label_desc: Use image node_id 2 for calling the DataConfig obj's underlying member method code with example usage: obj.set_train_total_resources(num_train_cpus, num_train_gpus) without return types