Thank you! At least having a way to debug/trace these casts is awesome! Maybe worth adding this bit to documentation!
About module class autocast decorators, module object decorators, function decorators: should we have something in standard library supporting it? Or is there already something? This way modularity/nestedness can go to more familiar class-level / object-level / function-level away from context-manager scopes level (and provides more information when inspecting the model in debugger) when it’s more convenient. This can be useful sometimes and support more functional code style.