Bug: dataclasses.FrozenInstanceError: cannot assign to field 'id' from version 0.11.28 #1231
Replies: 3 comments
-
just an fyi @gboeer |
Beta Was this translation helpful? Give feedback.
-
Thanks for brining this up. Didnt get picked up in the tests though. Ill look into it. |
Beta Was this translation helpful? Give feedback.
-
Just committed a PR which fixes this: @RobertHua96 I would be interested to see, how you have used the remapping, to see if I have missed something. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Think this stems from the release that made bounding boxes immutable. Pinning SAHI to version 0.11.27 works
File "/usr/local/lib/python3.11/site-packages/sahi/predict.py", line 284, in get_sliced_prediction
prediction_result = get_prediction(
^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/sahi/predict.py", line 122, in get_prediction
detection_model.convert_original_predictions(
File "/usr/local/lib/python3.11/site-packages/sahi/models/base.py", line 177, in convert_original_predictions
self._apply_category_remapping()
File "/usr/local/lib/python3.11/site-packages/sahi/models/base.py", line 156, in _apply_category_remapping
object_prediction.category.id = new_category_id_int
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 4, in setattr
dataclasses.FrozenInstanceError: cannot assign to field 'id'
Beta Was this translation helpful? Give feedback.
All reactions