def to_json(self) -> str:
        for i in range(len(self.episodes)):
            self.episodes[i].goals = []

        result = DatasetFloatJSONEncoder().encode(self)

        for i in range(len(self.episodes)):
            self.episodes[i].goals = self.goals_by_category[
                self.episodes[i].goals_key]

        return result
Example #2
0
 def to_json(self) -> str:
     result = DatasetFloatJSONEncoder().encode(self)
     return result