flytekit
flytekit copied to clipboard
fix: add support for numpy scaler types in type_engine
TL;DR
Fixes: https://github.com/flyteorg/flyte/issues/2753
Added support for numpy scaler types in the type_engine.py
file
Type
- [x] Bug Fix
- [ ] Feature
- [ ] Plugin
Are all requirements met?
- [x] Code completed
- [ ] Smoke tested
- [ ] Unit tests added
- [ ] Code documentation added
- [ ] Any pending items have an associated Issue
Complete description
How did you fix the bug, make the feature etc. Link to any design docs etc
- Updated the
SimpleTransformer
class to take tuples of types instead of single type, soint
transformer now supports bothint
andnumpy.integer
- Also updated the type checking methods to use
isInstance
instead of exact type matches
Tracking Issue
https://github.com/flyteorg/flyte/issues/2753
Follow-up issue
NA
Thank you for opening this pull request! 🙌
These tips will help get your PR across the finish line:
- Most of the repos have a PR template; if not, fill it out to the best of your knowledge.
- Sign off your commits (Reference: DCO Guide).
@techytushar, could you fix the error and add a test?
Accidently closed this PR, have opened a new one with added tests https://github.com/flyteorg/flytekit/pull/1258