code: def test_predictor_gradient_checkpointing(
      backbone,
      efficient_finetuning,
      pooling_mode,
      precision,
      expected_ratio,
      standalone,
  ):
      dataset = AmazonReviewSentimentCrossLingualDataset()
      train_data = dataset.train_df.sample(200)
      test_data = dataset.test_df.sample(50)
      save_path = f"gradient_checkpointing_{backbone}_{efficient_finetuning}_{pooling_mode}_{precision}"
      if os.path.isdir(save_path):
          shutil.rmtree(save_path)
      predictor = MultiModalPredictor(
          label=dataset.label_columns[0], path=save_path
      )
      predictor.fit(
          train_data,
          standalone=standalone,
          hyperparameters={
              "model.names": ["hf_text"],
              "model.hf_text.checkpoint_name": backbone,
              "model.hf_text.pooling_mode": pooling_mode,
              "model.hf_text.gradient_checkpointing": True,
              "optimization.efficient_finetune": efficient_finetuning,
              "optimization.lr_decay": 1.0,
              "optimization.learning_rate": 1e-03,
              "optimization.max_epochs": 1,
              "env.precision": precision,
              "env.per_gpu_batch_size": 1,
              "env.num_workers": 0,
              "env.num_workers_evaluation": 0,
              "env.num_gpus": -1,
          },
          time_limit=30,
      )
      predictions = predictor.predict(test_data, as_pandas=False)
      tunable_ratio = (
          predictor.trainable_parameters / predictor.total_parameters
      )
      npt.assert_allclose(tunable_ratio, expected_ratio, 2e-05, 2e-05)
      save_path = save_path + "_new"
      if os.path.isdir(save_path):
          shutil.rmtree(save_path)
      predictor.save(save_path, standalone=standalone)
      new_predictor = MultiModalPredictor.load(save_path)
      new_predictions = new_predictor.predict(
          test_data, as_pandas=False
      )
      npt.assert_allclose(new_predictions, predictions)
  
file_path: autogluon/multimodal/tests/unittests/others_2/test_predictor_advanced.py
imports: import os
  import shutil
  import numpy.testing
  import pytest
  from datasets import load_dataset
  from autogluon.multimodal import MultiModalPredictor
  from autogluon.multimodal.constants import BIT_FIT, IA3, IA3_BIAS, IA3_LORA, LORA_BIAS, LORA_NORM, NORM_FIT
  from autogluon.multimodal.models.timm_image import TimmAutoModelForImagePrediction
  from autogluon.multimodal.utils.misc import shopee_dataset
  from ..utils.unittest_datasets import AmazonReviewSentimentCrossLingualDataset
label_desc: Use image node_id 1 for calling a global function with example usage: test_predictor_gradient_checkpointing(backbone, efficient_finetuning, pooling_mode, precision, expected_ratio, standalone) without return types