feast-dev / feast

The Open Source Feature Store for Machine Learning
https://feast.dev
Apache License 2.0
5.62k stars 1k forks source link

Remove unused (and out-of-place) FeatureStore.version function #4747

Closed dandawg closed 1 week ago

dandawg commented 2 weeks ago

The FeatureStore class has a version function which returns the Python SDK version. This gives the illusion that it is needed in the class, but it is never actually used. When I first saw it, I was confused why the class would have a version (which is why I dug into the source code). I propose simplifying the FeatureStore class by dropping the FeatureStore.version function.

The benefit will be making the code easier to understand, with less opportunity for error.

Expected Behavior

I expect the FeatureStore class not to have a version function, as it is not used and not needed.

Even if it were needed, the better way to get the version would be either directly through the function it calls (version.get_version -- also part of the SDK), or by calling feast.__version__.

Current Behavior

The FeatureStore class defines a version function that is never used. https://github.com/feast-dev/feast/blob/e9cd3733f041da99bb1e84843ffe5af697085c34/sdk/python/feast/feature_store.py#L174

Steps to reproduce

Specifications