class_docstr: Abstract class for scaling gradient-boosting decision tree (GBDT) frameworks.
  
  Inherited by XGBoostTrainer and LightGBMTrainer.
  
  Args:
      datasets: Datasets to use for training and validation. Must include a
          "train" key denoting the training dataset.
          All non-training datasets will be used as separate
          validation sets, each reporting a separate metric.
      label_column: Name of the label column. A column with this name
          must be present in the training dataset.
      params: Framework specific training parameters.
      dmatrix_params: Dict of ``dataset name:dict of kwargs`` passed to respective
          :class:`xgboost_ray.RayDMatrix` initializations.
      num_boost_round: Target number of boosting iterations (trees in the model).
      scaling_config: Configuration for how to scale data parallel training.
      run_config: Configuration for the execution of the training run.
      resume_from_checkpoint: A checkpoint to resume training from.
      metadata: Dict that should be made available in `checkpoint.get_metadata()`
          for checkpoints saved from this Trainer. Must be JSON-serializable.
      **train_kwargs: Additional kwargs passed to framework ``train()`` function.
code: def training_loop(self) -> None:
      config = self.train_kwargs.copy()
      config[self._num_iterations_argument] = self.num_boost_round
  
      dmatrices = self._get_dmatrices(
          dmatrix_params=self.dmatrix_params,
      )
      train_dmatrix = dmatrices[TRAIN_DATASET_KEY]
      evals_result = {}
  
      init_model = None
      if self.starting_checkpoint:
          init_model = self._load_checkpoint(self.starting_checkpoint)
  
      config.setdefault("verbose_eval", False)
      config.setdefault("callbacks", [])
  
      if not any(
          isinstance(cb, self._tune_callback_checkpoint_cls)
          for cb in config["callbacks"]
      ):
          # Only add our own callback if it hasn't been added before
          checkpoint_frequency = (
              self.run_config.checkpoint_config.checkpoint_frequency
          )
          callback = self._tune_callback_checkpoint_cls(
              filename=MODEL_KEY, frequency=checkpoint_frequency
          )
  
          config["callbacks"] += [callback]
  
      config[self._init_model_arg_name] = init_model
  
      if init_model:
          # If restoring, make sure that we only create num_boosting_round trees,
          # and not init_model_trees + num_boosting_round trees
          last_iteration = self._model_iteration(init_model)
          num_iterations = config.get(
              self._num_iterations_argument,
              self._default_num_iterations,
          )
          new_iterations = num_iterations - last_iteration
          config[self._num_iterations_argument] = new_iterations
          logger.warning(
              f"Model loaded from checkpoint will train for "
              f"additional {new_iterations} iterations (trees) in order "
              "to achieve the target number of iterations "
              f"({self._num_iterations_argument}={num_iterations})."
          )
  
      model = self._train(
          params=self.params,
          dtrain=train_dmatrix,
          evals_result=evals_result,
          evals=[(dmatrix, k) for k, dmatrix in dmatrices.items()],
          ray_params=self._ray_params,
          **config,
      )
  
      checkpoint_at_end = (
          self.run_config.checkpoint_config.checkpoint_at_end
      )
      if checkpoint_at_end is None:
          checkpoint_at_end = True
  
      if checkpoint_at_end:
          self._checkpoint_at_end(model, evals_result)
  
imports: import logging
  import os
  import tempfile
  import warnings
  from dataclasses import dataclass
  from typing import TYPE_CHECKING, Any, Dict, Optional, Type
  from ray import train, tune
  from ray._private.dict import flatten_dict
  from ray.train import Checkpoint, RunConfig, ScalingConfig
  from ray.train.constants import MODEL_KEY, TRAIN_DATASET_KEY
  from ray.train.trainer import BaseTrainer, GenDataset
  from ray.tune import Trainable
  from ray.tune.execution.placement_groups import PlacementGroupFactory
  from ray.util.annotations import DeveloperAPI
label_desc: Use image node_id 13 for calling the GBDTTrainer obj's underlying member method code with example usage: obj.training_loop() without return types