Temporarily disable file delete action

This commit is contained in:
Marek Wolan
2024-01-15 09:48:14 +00:00
parent e0033de7b6
commit 728f80cc21
4 changed files with 22 additions and 1 deletions

View File

@@ -110,6 +110,13 @@ class DatabaseFileIntegrity(AbstractReward):
:type state: Dict
"""
database_file_state = access_from_nested_dict(state, self.location_in_state)
if database_file_state is NOT_PRESENT_IN_STATE:
_LOGGER.info(
f"Could not calculate {self.__class__} reward because "
"simulation state did not contain enough information."
)
return 0.0
health_status = database_file_state["health_status"]
if health_status == 2:
return -1