8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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
Added a function to delete all the data in the cache table. Trying to resolve issue #122.
Sorry, something went wrong.
Add implementation for clearing cache table
dcfe022
By the way, do I need to add tests for this?
Yes.
Add tests for cache clearing & Fix bug that does not delete output
4fbf90a
Fix wrong quotation marks used
3400098
Fix: merge tests to single test
35e5df2
I modified an existing test to validate this since adding another test makes the existing test fail.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
use meaningful variable names
If tables have dependencies, does deleting them in any arbitrary order cause issues? (e.g. table B has a foreign key that refers to table A, does deleting table A first cause an issue?)
isort
This line is too long. Maximum line length is 80 characters.
Fix code style & Add topological sorting for delete
c091cb5
I modified the code style. Also changes the delete order to depend on foreign key references.
Can you refactor the code?
aidb/aidb/config/config.py
Line 65 in d8e78e4
Ok, modified that.
Refactor code using networkx
ccc3a73
Change order of getting tables and build graph
e24e257
@ttt-77 Could you please review this PR again?
Have you added this test to Github Action?
Yes. The test is modified based on an original test and I verified it is executed.
Looks good to me. @ddkang
Use standard naming conventions "clear_ml_cache"
Also why is this in the DB setup and not the engine?
Describe the logic in the comment
Modify code style
ab5fc3a
* Move the clear cache function to engine * Function name change * Add code logic comment
We should have a separate test that tests that other ML models don't get removed when one is removed
Adding test for seperate service cache cleaning
504da9e
* Add deletion for services seperately * Fix launch.py * Add test to check whether only cache for one service is deleted
Fix problems causing test failure
a845a00
* Change function param declaration to be compatible with python 3.8 * Change call count logic since all the inference service use the same counter * Add join() function to terminate the test server completely
Fix bugs occured in multiple tests
49ad1e1
* Clear cache before test run * Set count target corresponding to initial call count
Fix typo when clearing cache
ae8ec23
* run cache clearing using asyncio
Fix typo in engine
76d84d1
* Fix typo
Fix: close server completely
1962e02
* Add join() and sleep to make sure the server terminates
@ddkang Could you please review this?
Also, I cannot terminate the test server completely without this. I'm not sure whether it's a bug or I'm not using the correct way to write multiple tests.
Please check this in depth
I believe the test server wasn't properly closed before. The server will still occupy the port if only the terminate() function is called. However most test classes only have one unit test or the service is not called, so it did not cause any problems.
Is there a reason this function is so complicated?
Most of this function is building the foreign key relationship graph since deleting the data referenced by another output table will cause error. I believe this is necessary unless there exists such a graph already.
Are there other functions that build the fk relationship graph? If so, that should be refactored
@hjk1030
Refactor cache clearing
195c8cf
* Use the existing inference topological order as delete order
I refactored the function using the topological order of inference services.
@ttt-77 please check
why do you add table name into service_name_list?
The output tables may be same. Can you add them into a set and then delete them?
Write comments in the correct locations.
Is this necessary?
I believe the join() is necessary or the server startup for the second test has some problems: https://github.com/ddkang/aidb/actions/runs/9025134318/job/24800303051. The sleep() is redundant and I have removed that.
Fix code style and service collection
ac4eeff
* Fix how the service to clear cache are collected * Reduce redundant table deletion * Comment Fix * Remove redundant sleep
Fix service collection
3a9e94e
* Use the correct graph to collect service
Fix the way getting edge attribute
9a0b072
* Fix
@ttt-77 Could you please review this?
Refactor the code. Could this loop be merged into previous one?
The edge in inference_graph doesn't represent two nodes have foreign key constraints
I've reconsidered the clearing logic. Now I'm planning to use the following procedure:
Are there any problems with this procedure? Or can it be simplified in some way?
Looks good.
Merge test stages & Refactor cache clearing
0ece539
* Merge the two stage of testing using a loop * Refactor the cache clearing using the table graph
@ttt-77 Could you please check this? The clearing steps are more complicated than I thought but I think all the steps are necessary.
ddkang ddkang left review comments
ttt-77 ttt-77 left review comments
At least 1 approving review is required to merge this pull request.
Successfully merging this pull request may close these issues.