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 _checkpoint_at_end(self, model, evals_result: dict) -> None:
      # We need to call session.report to save checkpoints, so we report
      # the last received metrics (possibly again).
      result_dict = flatten_dict(evals_result, delimiter="-")
      for k in list(result_dict):
          result_dict[k] = result_dict[k][-1]
  
      if getattr(
          self._tune_callback_checkpoint_cls,
          "_report_callbacks_cls",
          None,
      ):
          # Deprecate: Remove in Ray 2.8
          with tune.checkpoint_dir(
              step=self._model_iteration(model)
          ) as cp_dir:
              self._save_model(
                  model, path=os.path.join(cp_dir, MODEL_KEY)
              )
          tune.report(**result_dict)
      else:
          with tempfile.TemporaryDirectory() as checkpoint_dir:
              self._save_model(model, path=checkpoint_dir)
              checkpoint = Checkpoint.from_directory(checkpoint_dir)
              train.report(result_dict, checkpoint=checkpoint)
  
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 12 for calling the GBDTTrainer obj's underlying member method code with example usage: obj._checkpoint_at_end(model, evals_result) without return types