code: def test_checkpointing(self, num_eval_episodes: int):
      num_train_steps = 100
      experiment_config = self._get_experiment_config(
          num_train_steps=num_train_steps
      )
  
      experiments.run_experiment(
          experiment_config,
          eval_every=10,
          num_eval_episodes=num_eval_episodes,
      )
  
      checkpoint_counter = experiment_test_utils.restore_counter(
          experiment_config.checkpointing
      )
      self.assertIn("actor_steps", checkpoint_counter.get_counts())
      self.assertGreater(
          checkpoint_counter.get_counts()["actor_steps"], 0
      )
  
      # Run the second experiment with the same checkpointing config to verify
      # that it restores from the latest saved checkpoint.
      experiments.run_experiment(
          experiment_config,
          eval_every=50,
          num_eval_episodes=num_eval_episodes,
      )
  
      checkpoint_counter = experiment_test_utils.restore_counter(
          experiment_config.checkpointing
      )
      self.assertIn("actor_steps", checkpoint_counter.get_counts())
      # Verify that the steps done in the first run are taken into account.
      self.assertLessEqual(
          checkpoint_counter.get_counts()["actor_steps"],
          num_train_steps,
      )
  
file_path: acme/acme/jax/experiments/run_experiment_test.py
imports: from acme.agents.jax import sac
  from acme.jax import experiments
  from acme.jax.experiments import test_utils
  from acme.testing import fakes
  from acme.testing import test_utils
  import dm_env
  from absl.testing import absltest
  from absl.testing import parameterized
label_desc: Use image node_id 1 for calling the RunExperimentTest obj's underlying member method code with example usage: obj.test_checkpointing(num_eval_episodes) without return types