FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix: Properly close threadpool resources by ptoman-pa · Pull Request #2386 · feast-dev/feast · GitHub

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .py  (1) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
12 changes: 7 additions & 5 deletions sdk/python/feast/infra/online_stores/datastore.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -159,11 +159,13 @@ def online_write_batch(
write_batch_size = online_config.write_batch_size
feast_project = config.project

pool = ThreadPool(processes=write_concurrency)
pool.map(
lambda b: self._write_minibatch(client, feast_project, table, b, progress),
self._to_minibatches(data, batch_size=write_batch_size),
)
with ThreadPool(processes=write_concurrency) as pool:
pool.map(
lambda b: self._write_minibatch(
client, feast_project, table, b, progress
),
self._to_minibatches(data, batch_size=write_batch_size),
)

@staticmethod
def _to_minibatches(data: ProtoBatch, batch_size) -> Iterator[ProtoBatch]:
Expand Down

Back | FazBrowse Home | New Git URL