keras-team / keras-core

A multi-backend implementation of the Keras API, with support for TensorFlow, JAX, and PyTorch.
Apache License 2.0
1.27k stars 115 forks source link

Expose `Operation` without `src` import hacks #904

Closed jackd closed 10 months ago

jackd commented 10 months ago

I'm not going to pretend to undestand the magic that goes on behind keras_core_export, but if I had to guess I'd say the intent of it's annotation on the Operation class was to make it available under keras_core.Operation. It's not.

from keras_core import Operation

or

import keras_core
print(keras_core.Operation)

raise an ImportError / AttributeError respectively. Is this just because Operation isn't included in keras_core.__init__?

jackd commented 10 months ago

Seems to be resolved on master