Skip to content

Conversation

NicolasHug
Copy link
Contributor

pathlib is cleaner and more powerful. This PR isn't super useful on its own but I want to avoid spreading uses of os.path caused by copy/pasting existing code.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Meta Open Source bot. label Oct 8, 2024

decoder = torchcodec.decoders._core.create_from_file(
os.path.dirname(__file__) + "/../resources/nasa_13013.mp4"
str(Path(__file__) / parent / "../resources/nasa_13013.mp4")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is supposed to be .parent; see the failing tests.

@NicolasHug NicolasHug merged commit 6cec00c into main Oct 11, 2024
22 checks passed
@NicolasHug NicolasHug deleted the ospath branch October 11, 2024 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants