-
Notifications
You must be signed in to change notification settings - Fork 0
Retrieve previous results when the same inputs were used #351
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
Conversation
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #351 +/- ##
==========================================
- Coverage 97.30% 97.29% -0.01%
==========================================
Files 9 9
Lines 1445 1479 +34
==========================================
+ Hits 1406 1439 +33
- Misses 39 40 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR introduces a new request_values function that enables retrieval of previously computed workflow results from a knowledge graph based on matching input values. This allows workflows to check if results already exist for given inputs before re-executing computations.
Key changes:
- Added
request_valuesfunction that queries an RDF knowledge graph using hash identifiers to populate workflow dictionaries with cached values - Refactored
serialize_and_convert_to_networkxto accepthash_dataandremove_dataparameters, moving hash computation logic fromget_knowledge_graph - Updated flowrep dependency from 0.1.7 to 0.1.8 to support the new hashing functionality
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| semantikon/ontology.py | Added request_values function for value retrieval; refactored serialize_and_convert_to_networkx to handle data hashing; updated hash node creation for consistency |
| tests/unit/test_ontology.py | Added comprehensive test for request_values; updated existing hash tests to explicitly pass hash_data=False |
| semantikon/api.py | Exported new request_values function |
| semantikon/init.py | Exported new request_values function |
| pyproject.toml | Updated flowrep dependency to 0.1.8 |
| docs/environment.yml | Updated flowrep dependency to 0.1.8 |
| .ci_support/lower_bound.yml | Updated flowrep dependency to 0.1.8 |
| .ci_support/environment.yml | Updated flowrep dependency to 0.1.8 |
| .binder/environment.yml | Updated flowrep dependency to 0.1.8 |
| notebooks/knowledge_graph.ipynb | Added documentation and examples for request_values feature; updated cell execution numbers |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Output:
{"kinetic_energy": {"value": 0.375}}