class_docstr: Test `FeaturesManager.determine_framework`
class_docstr_tok: ["Test","`","FeaturesManager.determine_framework","`"]
docstr: Ensure that the determined framework is the one used for the local checkpoint.
  
  For the functionality to execute, local checkpoints are provided but framework is not.
docstr_tok: ["Ensure","that","the","determined","framework","is","the","one","used","for","the","local","checkpoint",".","For","the","functionality","to","execute",",","local","checkpoints","are","provided","but","framework","is","not","."]
code: def test_checkpoint_provided(self):
      """
      Ensure that the determined framework is the one used for the local checkpoint.
  
      For the functionality to execute, local checkpoints are provided but framework is not.
      """
      # PyTorch checkpoint
      with TemporaryDirectory() as local_pt_ckpt:
          self._setup_pt_ckpt(local_pt_ckpt)
          result = FeaturesManager.determine_framework(local_pt_ckpt)
          self.assertEqual(result, self.framework_pt)
  
      # TensorFlow checkpoint
      with TemporaryDirectory() as local_tf_ckpt:
          self._setup_tf_ckpt(local_tf_ckpt)
          result = FeaturesManager.determine_framework(local_tf_ckpt)
          self.assertEqual(result, self.framework_tf)
  
      # Invalid local checkpoint
      with TemporaryDirectory() as local_invalid_ckpt:
          with self.assertRaises(FileNotFoundError):
              result = FeaturesManager.determine_framework(
                  local_invalid_ckpt
              )
  
file_path: H2O/h2o_flexgen/benchmark/third_party/transformers/tests/onnx/test_features.py
imports: from tempfile import TemporaryDirectory
  from unittest import TestCase
  from unittest.mock import MagicMock, patch
  from transformers import AutoModel, TFAutoModel
  from transformers.onnx import FeaturesManager
  from transformers.testing_utils import SMALL_MODEL_IDENTIFIER, require_tf, require_torch
label_desc: Use image node_id 5 for calling the DetermineFrameworkTest obj's underlying member method code with example usage: obj.test_checkpoint_provided() without return types