class_docstr: Learning tests for the DirectMethod estimator.
  
  Generates three GridWorldWallPolicy policies and batches with  epsilon = 0.2, 0.5,
  and 0.8 respectively using `get_cliff_walking_wall_policy_and_data`.
  
  Tests that the estimators converge on all eight combinations of evaluation policy
  and behavior batch using `check_estimates`, except random policy-expert batch.
  
  Note: We do not test OPE with the "random" policy (epsilon=0.8)
  and "expert" (epsilon=0.2) batch because of the large policy-data mismatch. The
  expert batch is unlikely to contain the longer trajectories that would be observed
  under the random policy, thus the OPE estimate is flaky and inaccurate.
class_docstr_tok: ["Learning","tests","for","the","DirectMethod","estimator",".","Generates","three","GridWorldWallPolicy","policies","and","batches","with","epsilon","=","0.2",",","0.5",",","and","0.8","respectively","using","`","get_cliff_walking_wall_policy_and_data","`",".","Tests","that","the","estimators","converge","on","all","eight","combinations","of","evaluation","policy","and","behavior","batch","using","`","check_estimates","`",",","except","random","policy-expert","batch",".","Note",":","We","do","not","test","OPE","with","the","``","random","''","policy","(","epsilon=0.8",")","and","``","expert","''","(","epsilon=0.2",")","batch","because","of","the","large","policy-data","mismatch",".","The","expert","batch","is","unlikely","to","contain","the","longer","trajectories","that","would","be","observed","under","the","random","policy",",","thus","the","OPE","estimate","is","flaky","and","inaccurate","."]
code: def test_dm_expert_policy_expert_data(self):
      print("Test DirectMethod on expert policy on expert dataset")
      check_estimate(
          estimator_cls=DirectMethod,
          gamma=self.gamma,
          q_model_config=self.q_model_config,
          policy=self.expert_policy,
          batch=self.expert_batch,
          mean_ret=self.expert_reward,
          std_ret=self.expert_std,
          seed=SEED,
      )
  
file_path: ray/python/ray/rllib/offline/estimators/tests/test_dm_learning.py
imports: import unittest
  import ray
  from ray.rllib.offline.estimators import DirectMethod
  from ray.rllib.offline.estimators.tests.utils import get_cliff_walking_wall_policy_and_data, check_estimate
label_desc: Use image node_id 10 for calling the TestDMLearning obj's underlying member method code with example usage: obj.test_dm_expert_policy_expert_data() without return types