Eclectic-Sheep / sheeprl

Distributed Reinforcement Learning accelerated by Lightning Fabric
https://eclecticsheep.ai
Apache License 2.0
303 stars 31 forks source link

Fix/ci orphan path #242

Closed belerico closed 6 months ago

belerico commented 6 months ago

Summary

This PR solves an issue raised by our CI:

def is_config(self, config_path: str) -> bool:
        config_path = self._normalize_file_name(config_path)
        try:
            files = resources.files(self.path)
        except (ValueError, ModuleNotFoundError, TypeError):
            return False
        res = files.joinpath(config_path)
>       ret = res.exists() and res.is_file()
E       AttributeError: 'OrphanPath' object has no attribute 'exists'

Type of Change

Please select the one relevant option below:

Checklist

Please confirm that the following tasks have been completed:

Thank you for your contribution! Once you have filled out this template, please ensure that you have assigned the appropriate reviewers and that all tests have passed.