class_docstr: Configuration for scaling training.
  
  Args:
      trainer_resources: Resources to allocate for the trainer. If None is provided,
          will default to 1 CPU for most trainers.
      num_workers: The number of workers (Ray actors) to launch.
          Each worker will reserve 1 CPU by default. The number of CPUs
          reserved by each worker can be overridden with the
          ``resources_per_worker`` argument.
      use_gpu: If True, training will be done on GPUs (1 per worker).
          Defaults to False. The number of GPUs reserved by each
          worker can be overridden with the ``resources_per_worker``
          argument.
      resources_per_worker: If specified, the resources
          defined in this Dict is reserved for each worker.
          Define the ``"CPU"`` and ``"GPU"`` keys (case-sensitive) to
          override the number of CPU or GPUs used by each worker.
      placement_strategy: The placement strategy to use for the
          placement group of the Ray actors. See :ref:`Placement Group
          Strategies <pgroup-strategy>` for the possible options.
  
  Example:
  
      .. code-block:: python
  
          from ray.train import ScalingConfig
          scaling_config = ScalingConfig(
              # Number of distributed workers.
              num_workers=2,
              # Turn on/off GPU.
              use_gpu=True,
              # Specify resources used for trainer.
              trainer_resources={"CPU": 1},
              # Try to schedule workers on different nodes.
              placement_strategy="SPREAD",
          )
docstr: Map of total resources required for the trainer.
code: def total_resources(self):
      """Map of total resources required for the trainer."""
      total_resource_map = defaultdict(
          float, self._trainer_resources_not_none
      )
      num_workers = self.num_workers or 0
      for k, value in self._resources_per_worker_not_none.items():
          total_resource_map[k] += value * num_workers
      return dict(total_resource_map)
  
imports: import logging
  from collections import defaultdict
  from dataclasses import _MISSING_TYPE, dataclass, fields
  from pathlib import Path
  from typing import TYPE_CHECKING, Any, Callable, Dict, List, Mapping, Optional, Union, Tuple
  import pyarrow.fs
  from ray._private.thirdparty.tabulate.tabulate import tabulate
  from ray.util.annotations import PublicAPI, Deprecated
  from ray.widgets import Template, make_table_html_repr
  from ray.data.preprocessor import Preprocessor
label_desc: Use image node_id 7 for calling the ScalingConfig obj's underlying member method code with example usage: obj.total_resources() and returns: dict