Closed brimoor closed 1 month ago
The recent changes enhance the initialization process of a class in fiftyone/utils/transformers.py
by ensuring that device identification for model loading is based on instance variables rather than configuration references. This improves accuracy and reliability in device assignment. The order of operations during initialization was also modified, impacting how model and processor interactions are handled. Overall, these updates streamline the setup process for model handling.
Files | Change Summary |
---|---|
fiftyone/utils/transformers.py | Updated __init__ methods to use self.model for device type assignment; adjusted initialization order to load model after processor. |
sequenceDiagram
participant User
participant Init
participant Model
participant Processor
User->>Init: Create instance
Init->>Processor: Load processor
Init->>Model: Load model
Init->>Init: Determine device (using self.model)
Init-->>User: Initialization complete
Hop through the code, oh what a delight,
The models now dance in the soft moonlight.
With devices aligned, they’re ready to play,
A processor’s cheer leads the way!
In fiftyone’s heart, the magic takes flight,
A rabbit’s joy shines, coding feels right! 🐇✨
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
This started failing when https://github.com/voxel51/fiftyone/pull/4587 was merged, now succeeds again:
Summary by CodeRabbit