Skip to content

[DNM] Feast changes - #2

Open
Vikash082 wants to merge 39 commits into
mainfrom
feast_changes
Open

[DNM] Feast changes#2
Vikash082 wants to merge 39 commits into
mainfrom
feast_changes

Conversation

@Vikash082

Copy link
Copy Markdown
Contributor

No description provided.

- changes to proxy materialize call to remote online server.
- refactored online store with provision of driver.
- Added .env file to set Online store config.
(cherry picked from commit a7f2630)
- The module name of provider, offline store & online store is
  changed.
- The .env file is now expected to be in HOME directory with
  all the config details.
- in materialize api, client now send project name also.
Other changes:
- added "Host" in request header for online server
- instanceof() fix
- changed DKUBE_URL
dockerfile and support script to prepare feast ds image
@Vikash082
Vikash082 requested a review from songole July 13, 2022 02:05
Comment thread dockerfiles/Dockerfile


RUN cd /opt \
&& git clone https://github.com/oneconvergence/feast.git \

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Just a nit: Would --recurse-submodules clone everything in one go.

Comment thread dockerfiles/Dockerfile Outdated
apt-get -y autoremove && \
rm -rf /var/lib/apt/lists/*

COPY install_python.sh install_python.sh

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

is this script not in the repo?

def __init__(self, **kwargs) -> None:
self.dkube_ip = kwargs.get("dkube_ip", "192.168.x.y")
self.dkube_port = kwargs.get("dkube_port", 32222)
self.dkube_endpoint = kwargs.get("dkube_endpoint", True)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Can we just take dkube_url and token? Can we also get from env right here as opposed to in some caller function?

Comment thread provider/sdk/dkubefs/dkube_provider.py Outdated

class DkubeProvider(PassthroughProvider):
"""
(VK): We need to see if we can work with the PassthroughProvider

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Is the comment still valid?

verify=verify,
params=params,
timeout=timeout)
return self.process_response(resp)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

If this is file is mostly independent of the rest of feast, can it be moved to dkube repo?

def teardown(self, **kwargs):
self.dkube.delete_registry(kwargs['project'])

def validate_infra_update_with_registry(self, update_infra):

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

What is infra_update call used for?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is called before commiting the changes to registry as part of apply call.

Comment thread provider/sdk/dkubefs/dkube_store.py Outdated
self,
config: RepoConfig,
tables_to_delete: Sequence[Union[FeatureTable, FeatureView]],
tables_to_keep: Sequence[Union[FeatureTable, FeatureView]],

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

You mean update as opposed to keep?

If a table is updated, does it appear in both delete and keep?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

If there is new FV definition, the older one with registry will get deleted and the new definition will get stored. If the table is updated it will be part of table_to_keep.

# Replace the code below in order to define your own custom teardown
# operations
self.initialize(config)
self.driver["remote"].teardown(config, tables, entities)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Are we not tearing down all the project related resources? If so, we just need project?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is online store teardown. This is not entire project teardown.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Is Online store not at project level? can we not figure out the rest if we just know project?
Or, is that how they defined the API?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is how the APIs are defined. We need to extend this and take action based on that.

@@ -0,0 +1,520 @@
from dataclasses import dataclass

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Is this offline source? Why would this be different from what feast supports?

Or, does feast support mysql offline source? If it doesn't, we can propose this to the community?

port = self.dkube_store["port"]
user = self.dkube_store["user"]
password = self.dkube_store["secret"]
database = self.dkube_store["db"]

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Basically, this supports an external mysql server (like dbaas) as online server, not the one dkube launches. Is this true?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, this driver is to connect any MYSQL server.

Comment thread feast.patch
"""
+ if "dkuberegistrystore" == self._registry._registry_store.__class__.__name__.lower():
+ # Proxy materialize call to online server.
+ self._get_provider().proxy_materialize_incremental(

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

proxy_xxx() <-- Are these specific calls we added?

Comment thread feast.patch
)
return job
+
+ def proxy_materialize(

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Are we using PassThrough provider?

Comment thread feast.patch
+ }
+ for fs in services_to_update]
+
+ infra_update = {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

In feast main branch, they have a way to calculate diff. Is it something new? or, just refactored?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

"user": self.user,
"offline_dataset": self.offline_dataset
}
self.online_server_client.delete("api/v1/teardown",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Can we call dkube sdk whenever we need to make API calls?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This call goes for knative service independent of controller. This is the reason, not part of Dkube SDK.

dclient = get_dkube_client()
ods = dclient.get_dataset(USER, offline_ds)
return {
"user": ods["datum"]["sql"]["username"],

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Can we discuss this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants