Shortcuts

Gail

gail_irl_model

GailRewardModel

class ding.reward_model.gail_irl_model.BaseRewardModel[source]
Overview:

the base class of reward model

Interface:

default_config, estimate, train, clear_data, collect_data, load_expert_date

__init__()
abstract clear_data() None[source]
Overview:

Clearing training data. This can be a side effect function which clears the data attribute in self

abstract collect_data(data) None[source]
Overview:

Collecting training data in designated formate or with designated transition.

Arguments:
  • data (Any): Raw training data (e.g. some form of states, actions, obs, etc)

Returns / Effects:
  • This can be a side effect function which updates the data attribute in self

abstract estimate(data: list) Any[source]
Overview:

estimate reward

Arguments:
  • data (List): the list of data used for estimation

Returns / Effects:
  • This can be a side effect function which updates the reward value

  • If this function returns, an example returned object can be reward (Any): the estimated reward

load_expert_data(data) None[source]
Overview:

Getting the expert data, usually used in inverse RL reward model

Arguments:
  • data (Any): Expert data

Effects:

This is mostly a side effect function which updates the expert data attribute (e.g. self.expert_data)

abstract train(data) None[source]
Overview:

Training the reward model

Arguments:
  • data (Any): Data used for training

Effects:
  • This is mostly a side effect function which updates the reward model