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: sqlalchemy tests #622

Merged
merged 9 commits into from
Mar 28, 2023
Merged

feat: sqlalchemy tests #622

merged 9 commits into from
Mar 28, 2023

Conversation

jarulraj
Copy link
Member

@jarulraj jarulraj commented Mar 26, 2023

  • Verify tables and services
  • Only load YOLO is particular test cases (to avoid slowing down all test cases)

service = service_subclass()
table_tuples = service.get_all_entries()
self.assertTrue(
len(table_tuples) < 100
Copy link
Member

Choose a reason for hiding this comment

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

Just curious, is it generally bad to have a large catalog table?

Copy link
Member Author

Choose a reason for hiding this comment

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

Not really, I just added an assert for checking the contents of the table for now.

Open_udf_query,
Similarity_udf_query
# Disabled because required packages (eg., easy_ocr might not be preinstalled)
# YoloV5_udf_query,
Copy link
Member

Choose a reason for hiding this comment

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

We shouldn't disable this for release mode as else early users will have to manually run the create udf query. We can condition on mode here.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done. We now have three modes: debug/release: all UDFS, minimal: No YOLO

@@ -25,5 +25,8 @@ def setup_pytorch_tests():
CatalogManager().reset()
execute_query_fetch_all("LOAD VIDEO 'data/ua_detrac/ua_detrac.mp4' INTO MyVideo;")
execute_query_fetch_all("LOAD VIDEO 'data/mnist/mnist.mp4' INTO MNIST;")
load_inbuilt_udfs()
load_udfs_for_testing()
from eva.udfs.udf_bootstrap_queries import YoloV5_udf_query
Copy link
Member

Choose a reason for hiding this comment

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

Any reason for having this separately?

Copy link
Member Author

@jarulraj jarulraj Mar 28, 2023

Choose a reason for hiding this comment

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

In case we want a more complex logic for picking UDFs later during testing

@gaurav274 gaurav274 merged commit 6b73d49 into master Mar 28, 2023
@gaurav274 gaurav274 deleted the sqlalchemy branch March 28, 2023 02:50
@jarulraj jarulraj mentioned this pull request Apr 3, 2023
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.

3 participants