'Keep Training in Ray RLLib even if environment throws exception

Sometimes I have environments, which can run into unhandled situations after choosing several bad actions, which yields exceptions.

Instead of crashing the agent, I'd like to just retry and ignore that episode.

How to achieve this?



Solution 1:[1]

From the docs:

Calling tune.run with max_failures=-1 as argument will try to recover a trial unlimited times e.g.:

tune.run(algorithm_name,
     config=config_dict,
     max_failures=-1)

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 thedomay