Batch: deprecate setattr #1085
Labels
Batch and Buffer
Improvements in internal data structures, temporary label
breaking changes
Changes in public interfaces. Includes small changes or changes in keys
refactoring
No change to functionality
There is no need to ever do something like
Batch behaves very surprisingly when this is done: sequences are cast to arrays, dicts are cast to
Batch
, datatypes and even lengths of arrays may change.This can be solved by finding where setattr is being used (e.g., by adding a print statement to the implementation and running some examples), add a new method a la
add_sequence
, or even not support adding sequences post-hoc at all, e.g., in favor of creating a new batch with a method likewith_added_sequence
.The text was updated successfully, but these errors were encountered: