Skip to content

Conversation

@HaoXuAI
Copy link
Collaborator

@HaoXuAI HaoXuAI commented Nov 2, 2024

What this PR does / why we need it:

Which issue(s) this PR fixes:

Misc

Signed-off-by: HaoXuAI <sduxuhao@gmail.com>
@HaoXuAI HaoXuAI requested review from a team and sudohainguyen as code owners November 2, 2024 02:19
Signed-off-by: HaoXuAI <sduxuhao@gmail.com>
Signed-off-by: HaoXuAI <sduxuhao@gmail.com>
@HaoXuAI HaoXuAI changed the title feat: Refactor online store by removing the contrib directory feat: Refactor online stores by removing the contrib directory Nov 2, 2024
Signed-off-by: HaoXuAI <sduxuhao@gmail.com>
Copy link
Member

@franciscojavierarceo franciscojavierarceo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like integration tests are failing?

@HaoXuAI
Copy link
Collaborator Author

HaoXuAI commented Nov 3, 2024

Looks like integration tests are failing?

seems passed now

@franciscojavierarceo
Copy link
Member

This will break any imports users are doing with custom code, can you update or title?

Signed-off-by: HaoXuAI <sduxuhao@gmail.com>
Signed-off-by: HaoXuAI <sduxuhao@gmail.com>
@HaoXuAI
Copy link
Collaborator Author

HaoXuAI commented Nov 4, 2024

This will break any imports users are doing with custom code, can you update or title?

There should be non-breaking changes, I also added the old custom type as well.

@dmartinol
Copy link
Contributor

This will break any imports users are doing with custom code, can you update or title?

There should be non-breaking changes, I also added the old custom type as well.

I think he's saying that any feature store definition importing the legacy modules would be broken, e.g.:

>> import feast.infra.online_stores.contrib.hazelcast_online_store.hazelcast_online_store
...
ModuleNotFoundError: No module named 'feast.infra.online_stores.contrib.hazelcast_online_store.hazelcast_online_store'

Why don't you create aliases instead, with a warning to inform the user that these will be removed later?

# feast/infra/online_stores/contrib/qdrant.py

import warnings
from feast.infra.online_stores.cqdrant import QdrantOnlineStore

warnings.warn(
    "The module feast.infra.online_stores.contrib.qdrant is deprecated and will be removed in a future release. "
    "Please use feast.infra.online_stores.cqdrant instead.",
    DeprecationWarning,
    stacklevel=2,
)

"qdrant": "feast.infra.online_stores.contrib.qdrant.QdrantOnlineStore",
"singlestore": "feast.infra.online_stores.singlestore_online_store.singlestore.SingleStoreOnlineStore",
"qdrant": "feast.infra.online_stores.cqdrant.QdrantOnlineStore",
**LEGACY_ONLINE_STORE_CLASS_FOR_TYPE,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIUC, LEGACY_ONLINE_STORE_CLASS_FOR_TYPE would never be used unless someone declares a store like:

online_store:
  type: feast.infra.online_stores.contrib.qdrant.QdrantOnlineStore
  ...

Is this what you had in mind?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agreed, I doubt anyone actually did anything like that. This is technically breaking, but I'm fine with it even w/o leaving aliases.

Copy link
Collaborator Author

@HaoXuAI HaoXuAI Nov 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right that's what I'm referring to. I remember there was somewhere in doc said you can config online_store with something like: type: feast.infra.online_stores.contrib.qdrant.QdrantOnlineStore, but not sure if that's still the case.

@HaoXuAI
Copy link
Collaborator Author

HaoXuAI commented Nov 5, 2024

This will break any imports users are doing with custom code, can you update or title?

There should be non-breaking changes, I also added the old custom type as well.

I think he's saying that any feature store definition importing the legacy modules would be broken, e.g.:

>> import feast.infra.online_stores.contrib.hazelcast_online_store.hazelcast_online_store
...
ModuleNotFoundError: No module named 'feast.infra.online_stores.contrib.hazelcast_online_store.hazelcast_online_store'

Why don't you create aliases instead, with a warning to inform the user that these will be removed later?

# feast/infra/online_stores/contrib/qdrant.py

import warnings
from feast.infra.online_stores.cqdrant import QdrantOnlineStore

warnings.warn(
    "The module feast.infra.online_stores.contrib.qdrant is deprecated and will be removed in a future release. "
    "Please use feast.infra.online_stores.cqdrant instead.",
    DeprecationWarning,
    stacklevel=2,
)

Creating a alias means I have to keep two folders for same store. I think that's more confusing.
Since the online_store are not meant to be used by user to directly import the module, I think it's ok to simply remove the old ones.

Signed-off-by: HaoXuAI <sduxuhao@gmail.com>
@HaoXuAI
Copy link
Collaborator Author

HaoXuAI commented Nov 7, 2024

@franciscojavierarceo @dmartinol fixed the conflict after new online store, need another review.

@franciscojavierarceo franciscojavierarceo changed the title feat: Refactor online stores by removing the contrib directory feat!: Refactor online stores by removing the contrib directory Nov 7, 2024
@franciscojavierarceo franciscojavierarceo changed the title feat!: Refactor online stores by removing the contrib directory feat!: Refactor online stores by removing the contrib directory. (Breaking imports) Nov 7, 2024
@franciscojavierarceo franciscojavierarceo enabled auto-merge (squash) November 7, 2024 19:13
@franciscojavierarceo franciscojavierarceo merged commit 702eebf into master Nov 7, 2024
22 checks passed
shuchu pushed a commit to shuchu/feast that referenced this pull request Nov 21, 2024
…aking imports) (feast-dev#4731)

* feat: Refactor online store by removing the contrib directory

Signed-off-by: HaoXuAI <sduxuhao@gmail.com>

* feat: Refactor online store by removing the contrib directory

Signed-off-by: HaoXuAI <sduxuhao@gmail.com>

* feat: Refactor online store by removing the contrib directory

Signed-off-by: HaoXuAI <sduxuhao@gmail.com>

* feat: Refactor online store by removing the contrib directory

Signed-off-by: HaoXuAI <sduxuhao@gmail.com>

* fix legacy mapping

Signed-off-by: HaoXuAI <sduxuhao@gmail.com>

* fix legacy mapping

Signed-off-by: HaoXuAI <sduxuhao@gmail.com>

---------

Signed-off-by: HaoXuAI <sduxuhao@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants