Skip to content
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.

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

feat: Implement cache for predictions #1334

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from
Draft

Conversation

DRMPN
Copy link
Collaborator

@DRMPN DRMPN commented Sep 10, 2024

This is a 🙋 feature or enhancement.

Summary

WIP

Context

Resolves #1291

@DRMPN DRMPN added enhancement New feature or request in progress task in progress composer Related to GP-composition algorithm labels Sep 10, 2024
@DRMPN DRMPN self-assigned this Sep 10, 2024
@pep8speaks
Copy link

Hello @DRMPN! Thanks for opening this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 129:95: E261 at least two spaces before inline comment

Line 2:1: F401 'typing.List' imported but unused
Line 2:1: F401 'typing.Union' imported but unused

Line 4:1: F401 'os.getpid' imported but unused
Line 5:1: F401 'typing.TypeVar' imported but unused

Line 115:9: F841 local variable 'predicted_train' is assigned to but never used
Line 125:16: W291 trailing whitespace

Line 6:1: F401 'cProfile' imported but unused
Line 7:1: F401 'pstats' imported but unused
Line 8:1: F401 'pstats.SortKey' imported but unused

@DRMPN DRMPN changed the title Implement cache for predictions WIP: Implement cache for predictions Sep 10, 2024
Copy link
Contributor

Code in this pull request contains PEP8 errors, please write the /fix-pep8 command in the comments below to create commit with automatic fixes.

@DRMPN DRMPN changed the title WIP: Implement cache for predictions feat: Implement cache for predictions Sep 10, 2024
Comment on lines +31 to +32
with closing(sqlite3.connect(self.db_path)) as conn:
with conn:
Copy link
Collaborator

@kasyanovse kasyanovse Oct 13, 2024

Choose a reason for hiding this comment

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

Почему бы не реализовать DataCacheDB как синглтон, подключаясь к БД один раз при инициализации (реинициализации в новых инстансах питона в многопотоке)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
composer Related to GP-composition algorithm enhancement New feature or request in progress task in progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

enh: Better caching
3 participants