Missed TensorFlow Dev Summit? Check out the video playlist. Watch recordings

tf_agents.utils.common.assert_members_are_not_overridden

View source on GitHub

Asserts public members of base_cls are not overridden in instance.

tf_agents.utils.common.assert_members_are_not_overridden(
    base_cls, instance, white_list=(), black_list=()
)

If both white_list and black_list are empty, no public member of base_cls can be overridden. If a white_list is provided, only public members in white_list can be overridden. If a black_list is provided, all public members except those in black_list can be overridden. Both white_list and black_list cannot be provided at the same, if so a ValueError will be raised.

Args:

  • base_cls: A Base class.
  • instance: An instance of a subclass of base_cls.
  • white_list: Optional list of base_cls members that can be overridden.
  • black_list: Optional list of base_cls members that cannot be overridden.

Raises:

ValueError if both white_list and black_list are provided.