forked from asyml/forte
-
Notifications
You must be signed in to change notification settings - Fork 0
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
create_interface_for_attributes_920 #1
Open
J007X
wants to merge
16
commits into
master
Choose a base branch
from
create_interface_for_attributes_920
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains 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
…s at Data_Store level (3 methods added, and corresponding unit test codes
* Update README.md * Update ontology_code_generator.py * remove type ignore * fix black * fix protobuf version * change versions * Update README.md
…920' into create_interface_for_attributes_920
…syml#925) * After related test/tracing code were added to determine details related exception (including statistics comparison with earlier code). The data shows the newly added exception handling code impact the performance most while the difference in dictionary access is insignificant so only the exception handling code is changed. * fixed black formatting issue * (test) fixing CI mypy issue (1.7.1 +pyrhon 3.9) of "Unused" comment
…syml#919) * Initial commit for the performance change relating to class loadind in new code after underline changes related to data pack. After discussed with Hector using standard LRU_Cache instead of custom cache. * Option 2 for considering dynamic type list as mentioned in asyml#765: created an non-cached version of get_class (get_class_nc) and used in get_class to avoid dynamic list issue as mentioned in comments of asyml#765 as pointed out my Hector. * Fixed related method sequence issue and added doc * made lru_cache compatible with Python 3.7 * using full_class_name instead of class_name in get_class_nc * fixed black format issue * fixed lint format issue (import sequence) * fixed for lint issue (import grouping) * Fix CI warning (in ontology) * Fix "unhashable key type issue" when using LRU cache for get_class that have optional list as parameter -- change to cache lower level result from "locate" method called in this method, and also provide a non-cached version (same as before) for resolving asyml#765. * Fix comments on duplicate code of "get_class" and "get_class_nc" by re-factoring into one method with "cached_lookup" optional flag -- by default this is true but in _get_sub_class this flag needs to set to "false" based on comments in asyml#765 (for dynamic class loading scenario). * Need to remove the old "get_class_nc" signature removed in refactoring --------- Co-authored-by: Hector <hunterhector@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR fixes asyml#920.
Description of changes
(In this phase-1), interface methods are added to the "Data_Store" level to provide basic services that expand the previous methods by allowing batch-like, range selection of atrributes from one or more entries (such as with one or more tids, required type).
Possible influences of this PR.
This could provide a new attribute based interface without the cost of packing and unpacking into classes for quicker attribute access (such as for entries).
Test Conducted
Corresponding unit test is created.