-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug fix and improvement #7
Conversation
Execution of super() for Network objects with non empty behavior argument raises: 'Network' object has no attribute 'sorted_behavior_execution_list' since 'sorted_behavior_execution_list' hasn't been created beforehand to add network's behaviors into.
adds N dimensional data support. more efficient.
`_remove_behavior_from_sorted_execution_list` can now accept a behavior without its parent object used in `remove_behavior` method in NetworkObjectBase object.
Hello, thanks for you contribution. Can i ask why you want to change the _remove_behavior_from_sorted_execution_list function in the first place, so that it works with no parent object? The function is only used internally by the remove_behavior function in the NetworkObjectBase class. if you execute it without the parent, it can also remove multiple behaviours(if they are the same instance) of different objects (unlikely but it is possible that someone attaches the same behaviour instance twice) from the sorted_behavior_execution_list. The problem here is, that this behaviour is not only stored in the execution list, but also in the object.behaviours list. If you call net._remove_behavior_from_sorted_execution_list(beh), it is removed from the execution list, and not called anymore during a simulation run, but it would still be tag searchable and it would still appear in the obj.behaviours list. Therefore _remove_behavior_from_sorted_execution_list should not be called directly from outside and behaviours should always be removed via the obj.remove_behavior(beh) function so that it is removed completely. Do you have some reason why you want to use it this way? |
Hello, But |
the last commit should make |
Ok this looks good! I appreciate it and feel free to improve the project further if you have any ideas or if you find bugs of some kind. I also think that the version with the torch core is a great idea. |
buffer_roll
methodremove_behavior
bug for not passing the parent object.