hunk.code_window:     RAY_CHECK(placement_group_schedule_table_ != nullptr);
       return *placement_group_schedule_table_;
     }
     GcsHeartbeatTable &HeartbeatTable() {
       RAY_CHECK(heartbeat_table_ != nullptr);
       return *heartbeat_table_;
     }
     GcsResourceUsageBatchTable &HeartbeatBatchTable() {
       RAY_CHECK(resource_usage_batch_table_ != nullptr);
       return *resource_usage_batch_table_;
     }
  
hunk.labels: keep keep keep keep replace replace replace replace replace keep keep keep keep keep
hunk.file_path: src/ray/gcs/gcs_server/gcs_table_storage.h
hunk.type: replace
file: #!/usr/bin/env python
  
  import os
  import sys
  
  if __name__ == "__main__":
      # Do not import tf for testing purposes.
      os.environ["RLLIB_TEST_NO_TF_IMPORT"] = "1"
  
      from ray.rllib.agents.a3c import A2CTrainer
      assert "tensorflow" not in sys.modules, \
          "`tensorflow` initially present, when it shouldn't!"
  
      # Note: No ray.init(), to test it works without Ray
      trainer = A2CTrainer(
          env="CartPole-v0", config={
              "framework": "torch",
              "num_workers": 0
          })
      trainer.train()
  
      assert "tensorflow" not in sys.modules, \
          "`tensorflow` should not be imported after creating and " \
          "training A3CTrainer!"
  
      # Clean up.
      del os.environ["RLLIB_TEST_NO_TF_IMPORT"]
  
      print("ok")
  