libffcv / ffcv

FFCV: Fast Forward Computer Vision (and other ML workloads!)
https://ffcv.io
Apache License 2.0
2.84k stars 178 forks source link

Correct new TraversalOrder #302

Closed sanagno closed 1 year ago

sanagno commented 1 year ago

The correct check for a custom TraversalOrder should be that order is not a subclass of TraversalOrder and not an instance of it.

andrewilyas commented 1 year ago

Thank you for this PR, it looks correct! I think the type annotation on ORDER_MAP should also be changed, right?

sanagno commented 1 year ago

Good catch, I think it should be of Type TraversalOrder.

andrewilyas commented 1 year ago

Awesome, thanks so much! I'll merge this into v1.1.