Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
IVY: Cannot use @Optional in abstract base class #34182
There's a fair bit going on here, but the crux of this issue is that this is working as intended. Let me break it down a bit.
The need for a decorator on the base class.
This is a known change for Ivy, and there is an
The general recommendation in this case is to add
Constructor DI validity
This is where your error actually comes from. The constructor in the base class declares a parameter with type
In this case, because you're using an
If you switch to an abstract
@alxhub, thanks for this explanation. I've updated the code to provide everyone else a working example. The updated branch is: https://github.com/a88zach/ivy-bug/tree/bug/optional-working