Lightning-AI / utilities

Common Python utilities and GitHub Actions in Lightning Ecosystem
Apache License 2.0
49 stars 14 forks source link

Apply func non roundtrippable seq #250

Closed ap-- closed 2 months ago

ap-- commented 5 months ago
Before submitting - [x] Was this discussed/agreed via a Github issue? (no need for typos and docs improvements) - [x] Did you read the [contributor guideline](https://github.com/Lightning-AI/lightning/blob/master/.github/CONTRIBUTING.md), Pull Request section? - Did you make sure to update the docs? - [x] Did all existing and newly added tests pass locally?

What does this PR do?

Fixes #249

Note: I'm not sure if the added overhead in the slow path of apply_to_collection due to the shallow sequence copy and the elementwise comparison is undesirable to support this use case. I could reimplement this to cache the result of can_roundtrip_sequence based on the class.

PR review

Anyone in the community is free to review the PR once the tests have passed. If we didn't discuss your PR in GitHub issues there's a high chance it will not be merged.

Cheers, Andreas 😃


📚 Documentation preview 📚: https://lit-utilities--250.org.readthedocs.build/en/250/

codecov[bot] commented 5 months ago

Welcome to Codecov :tada:

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

Thanks for integrating Codecov - We've got you covered :open_umbrella:

ap-- commented 2 months ago

Closing in favour of upcoming PR implementing an exclude option for user provided types.

Borda commented 1 month ago

Closing in favour of upcoming PR implementing an exclude option for user provided types.

Thank you. Do you mind also having a look at #279? :pray: