GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat: Feast/IKV upgrade client version by pushkarmoi · Pull Request #4200 · feast-dev/feast

feat: Feast/IKV upgrade client version #4200

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Sign up for GitHub

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
franciscojavierarceo merged 2 commits into feast-dev:master from pushkarmoi:pugupta/ikv-fixes
May 14, 2024

Uh oh!

There was an error while loading. Please reload this page.

Merged

feat: Feast/IKV upgrade client version #4200

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
2 commits
Select commit Hold shift + click to select a range
eb39e01
feat: Feast/IKV upgrade client version
pushkarmoi May 14, 2024
718a1ff
linting errors
pushkarmoi May 14, 2024
File filter
Filter by extension


Clear filters
Conversations
Failed to load comments.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Jump to
Jump to file
Failed to load files.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Diff view
Diff view

There are no files selected for viewing

34 changes: 21 additions & 13 deletions 34 sdk/python/feast/infra/online_stores/contrib/ikv_online_store/ikv.py
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,8 @@ def online_write_batch(
progress: Function to be called once a batch of rows is written to the online store, used
to show progress.
"""
# update should have been called before
if self._writer is None:
return
self._init_writer(config=config)
assert self._writer is not None

for entity_key, features, event_timestamp, _ in data:
entity_id: str = compute_entity_id(
Expand Down Expand Up @@ -120,6 +119,8 @@ def online_read(
item is the event timestamp for the row, and the second item is a dict mapping feature names
to values, which are returned in proto format.
"""
self._init_reader(config=config)

if not len(entity_keys):
return []

Expand Down Expand Up @@ -174,7 +175,6 @@ def _decode_fields_for_primary_key(

return dt, features

# called before any read/write requests are issued
@log_exceptions_and_usage(online_store="ikv")
def update(
self,
Expand All @@ -199,7 +199,7 @@ def update(
partial: If true, tables_to_delete and tables_to_keep are not exhaustive lists, so
infrastructure corresponding to other feature views should be not be touched.
"""
self._init_clients(config=config)
self._init_writer(config=config)
assert self._writer is not None

# note: we assume tables_to_keep does not overlap with tables_to_delete
Expand All @@ -223,7 +223,7 @@ def teardown(
tables: Feature views whose corresponding infrastructure should be deleted.
entities: Entities whose corresponding infrastructure should be deleted.
"""
self._init_clients(config=config)
self._init_writer(config=config)
assert self._writer is not None

# drop fields corresponding to this feature-view
Expand Down Expand Up @@ -269,20 +269,28 @@ def _create_document(

return builder.build()

def _init_clients(self, config: RepoConfig):
"""Initializes (if required) reader/writer ikv clients."""
online_config = config.online_store
assert isinstance(online_config, IKVOnlineStoreConfig)
client_options = IKVOnlineStore._config_to_client_options(online_config)

def _init_writer(self, config: RepoConfig):
"""Initializes ikv writer client."""
# initialize writer
if self._writer is None:
online_config = config.online_store
assert isinstance(online_config, IKVOnlineStoreConfig)
client_options = IKVOnlineStore._config_to_client_options(online_config)

self._writer = create_new_writer(client_options)
self._writer.startup() # blocking operation

# initialize reader, iff mount_dir is specified
def _init_reader(self, config: RepoConfig):
"""Initializes ikv reader client."""
# initialize reader
if self._reader is None:
online_config = config.online_store
assert isinstance(online_config, IKVOnlineStoreConfig)
client_options = IKVOnlineStore._config_to_client_options(online_config)

if online_config.mount_directory and len(online_config.mount_directory) > 0:
self._reader = create_new_reader(client_options)
self._reader.startup() # blocking operation

@staticmethod
def _config_to_client_options(config: IKVOnlineStoreConfig) -> ClientOptions:
Expand Down
2 changes: 1 addition & 1 deletion 2 setup.py
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@
]

IKV_REQUIRED = [
"ikvpy>=0.0.23",
"ikvpy>=0.0.36",
]

HAZELCAST_REQUIRED = [
Expand Down
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.