code: def test_only_required_fields(tmpdir):
      """Ensure that config containing only the required fields is accepted."""
      cfg_json = tmpdir.mkdir("ds_config_unit_test").join(
          "minimal.json"
      )
  
      with open(cfg_json, "w") as f:
          required_fields = {"train_batch_size": 64}
          json.dump(required_fields, f)
  
      run_cfg = ds_config.DeepSpeedConfig(cfg_json)
      assert run_cfg is not None
      assert run_cfg.train_batch_size == 64
      assert run_cfg.train_micro_batch_size_per_gpu == 64
      assert run_cfg.gradient_accumulation_steps == 1
  
file_path: H2O/h2o_flexgen/benchmark/third_party/DeepSpeed/tests/unit/runtime/test_ds_config_model.py
imports: import pytest
  import os
  import json
  from pydantic import Field, ValidationError
  from typing import List
  from deepspeed.runtime import config
  from deepspeed.runtime.config_utils import DeepSpeedConfigModel
label_desc: Use image node_id 1 for calling a global function with example usage: test_only_required_fields(tmpdir) without return types