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

Memory improvements (1/3): Introduce new data access layer and schemas #1728

Merged
merged 33 commits into from
Oct 13, 2023

Conversation

cjao
Copy link
Contributor

@cjao cjao commented Jul 12, 2023

  • I have added the tests to cover my changes.
  • I have updated the documentation and CHANGELOG accordingly.
  • I have read the CONTRIBUTING document.

Closes https://github.com/AgnostiqHQ/covalent-staging/issues/707

@cjao
Copy link
Contributor Author

cjao commented Jul 12, 2023

This PR installs plumbing for the series on memory usage improvements. A new data access layer is introduced which shall replace the in-memory Result object as used by the server code in the next PR.

Merging notes

@cjao cjao force-pushed the memory-improvements-pr-1 branch 3 times, most recently from 4a828a8 to f403fad Compare July 13, 2023 10:51
@codecov
Copy link

codecov bot commented Jul 13, 2023

Codecov Report

Merging #1728 (b487f58) into develop (889bf3e) will increase coverage by 1.34%.
The diff coverage is 95.63%.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #1728      +/-   ##
===========================================
+ Coverage    80.17%   81.51%   +1.34%     
===========================================
  Files          232      272      +40     
  Lines        10239    12585    +2346     
  Branches       193      193              
===========================================
+ Hits          8209    10259    +2050     
- Misses        1897     2193     +296     
  Partials       133      133              
Flag Coverage Δ
Dispatcher 90.99% <97.08%> (+4.63%) ⬆️
Functional_Tests ?
SDK 76.51% <92.30%> (+1.68%) ⬆️
UI_Backend 87.38% <57.14%> (-1.04%) ⬇️
UI_Frontend 73.43% <ø> (ø)

@cjao cjao force-pushed the memory-improvements-pr-1 branch 3 times, most recently from b099de5 to b47baf2 Compare July 14, 2023 13:34
@cjao cjao marked this pull request as ready for review July 14, 2023 15:31
@cjao cjao requested a review from a team as a code owner July 14, 2023 15:31
covalent/_file_transfer/enums.py Show resolved Hide resolved
covalent/_file_transfer/file_transfer.py Show resolved Hide resolved
covalent/_file_transfer/strategies/shutil_strategy.py Outdated Show resolved Hide resolved
covalent/_results_manager/result.py Outdated Show resolved Hide resolved
covalent/_serialize/common.py Show resolved Hide resolved
covalent/_serialize/common.py Show resolved Hide resolved
covalent/_serialize/electron.py Show resolved Hide resolved
covalent/_serialize/lattice.py Show resolved Hide resolved
covalent/_serialize/result.py Outdated Show resolved Hide resolved
covalent/_serialize/transport_graph.py Show resolved Hide resolved
Copy link
Member

@wjcunningham7 wjcunningham7 left a comment

Choose a reason for hiding this comment

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

This first review covers everything except the covalent_dispatcher module

covalent/_file_transfer/enums.py Show resolved Hide resolved
covalent/_file_transfer/enums.py Show resolved Hide resolved
covalent/_serialize/common.py Show resolved Hide resolved
covalent/_shared_files/defaults.py Outdated Show resolved Hide resolved
covalent/_shared_files/schemas/asset.py Show resolved Hide resolved
covalent/_shared_files/schemas/common.py Show resolved Hide resolved
covalent/_shared_files/schemas/electron.py Show resolved Hide resolved
covalent/executor/executor_plugins/dask.py Outdated Show resolved Hide resolved
covalent/_workflow/transportable_object.py Show resolved Hide resolved
Copy link
Member

@FyzHsn FyzHsn left a comment

Choose a reason for hiding this comment

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

Really nice work. This is round 2 of 11 reviews. Left some questions in this review.

covalent/_serialize/electron.py Show resolved Hide resolved
covalent/_shared_files/schemas/common.py Show resolved Hide resolved
covalent/_shared_files/schemas/electron.py Show resolved Hide resolved
covalent/_shared_files/utils.py Show resolved Hide resolved
covalent/_workflow/electron.py Show resolved Hide resolved
covalent/_workflow/electron.py Show resolved Hide resolved
covalent/_workflow/electron.py Show resolved Hide resolved
Copy link
Member

@FyzHsn FyzHsn left a comment

Choose a reason for hiding this comment

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

This is the final review for this PR. Great work! Left some minor comments and noted that there are some commented-out tests. Either remove them or uncomment them.

covalent_dispatcher/_dal/db_interfaces/electron_utils.py Outdated Show resolved Hide resolved
covalent_dispatcher/_dal/importers/result.py Outdated Show resolved Hide resolved
covalent_dispatcher/_db/write_result_to_db.py Outdated Show resolved Hide resolved
covalent_dispatcher/_db/write_result_to_db.py Outdated Show resolved Hide resolved
tests/covalent_dispatcher_tests/_core/data_manager_test.py Outdated Show resolved Hide resolved
tests/covalent_dispatcher_tests/_core/dispatcher_test.py Outdated Show resolved Hide resolved
@cjao cjao force-pushed the memory-improvements-pr-1 branch from b47baf2 to cb8ae1d Compare September 25, 2023 13:43
@kessler-frost kessler-frost marked this pull request as ready for review October 6, 2023 15:40
Prasy12
Prasy12 previously approved these changes Oct 11, 2023
kessler-frost
kessler-frost previously approved these changes Oct 11, 2023
@kessler-frost kessler-frost self-requested a review October 11, 2023 05:51
Copy link
Contributor Author

@cjao cjao left a comment

Choose a reason for hiding this comment

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

@kessler-frost One quibble about Result._update_node but otherwise this is quite clean.

covalent_dispatcher/_dal/result.py Outdated Show resolved Hide resolved
@kessler-frost kessler-frost dismissed stale reviews from Prasy12 and themself via 1c7aa36 October 12, 2023 13:38
Copy link
Contributor Author

@cjao cjao left a comment

Choose a reason for hiding this comment

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

Some comments on qelectron_data_exists.

covalent/_shared_files/schemas/electron.py Show resolved Hide resolved
covalent/_serialize/electron.py Show resolved Hide resolved
covalent/_serialize/electron.py Show resolved Hide resolved
covalent/_workflow/transport.py Outdated Show resolved Hide resolved
@AlejandroEsquivel AlejandroEsquivel merged commit 314e859 into develop Oct 13, 2023
12 checks passed
@AlejandroEsquivel AlejandroEsquivel deleted the memory-improvements-pr-1 branch October 13, 2023 21:18
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.

6 participants