Discovered minor oddity in step functions code

mypy pointed out to me that sometimes the competence method takes no arguments, and sometimes it takes has_grad.

This isn’t forbidden, of course, in Python, but it did make me wonder if this could someday cause a bug if one calling pattern was used where another was needed. I don’t know enough about what this is doing to suggest a modification, but perhaps someone else could?

Or if you are happy with it the way it is, that’s fine, too.

1 Like