Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
jarulraj committed Jun 27, 2023
1 parent 860b41f commit 2be622e
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 1,498 deletions.
111 changes: 0 additions & 111 deletions evadb/udfs/ocr_extractor.py

This file was deleted.

86 changes: 0 additions & 86 deletions evadb/udfs/toxicity_classifier.py

This file was deleted.

13 changes: 1 addition & 12 deletions evadb/udfs/udf_bootstrap_queries.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,16 +122,6 @@
'model' 'yolov8m.pt';
"""

ocr_udf_query = """CREATE UDF IF NOT EXISTS OCRExtractor
INPUT (frame NDARRAY UINT8(3, ANYDIM, ANYDIM))
OUTPUT (labels NDARRAY STR(10), bboxes NDARRAY FLOAT32(ANYDIM, 4),
scores NDARRAY FLOAT32(ANYDIM))
TYPE OCRExtraction
IMPL '{}/udfs/ocr_extractor.py';
""".format(
EvaDB_INSTALLATION_DIR
)

face_detection_udf_query = """CREATE UDF IF NOT EXISTS FaceDetector
INPUT (frame NDARRAY UINT8(3, ANYDIM, ANYDIM))
OUTPUT (bboxes NDARRAY FLOAT32(ANYDIM, 4),
Expand Down Expand Up @@ -223,7 +213,7 @@ def init_builtin_udfs(db: EvaDBDatabase, mode: str = "debug") -> None:
pass

# Enable environment variables
# Relevant for ocr and other transformer-based models
# Relevant for transformer-based models
import os

os.environ["PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION"] = "python"
Expand All @@ -240,7 +230,6 @@ def init_builtin_udfs(db: EvaDBDatabase, mode: str = "debug") -> None:
norfair_obj_tracker_query,
chatgpt_udf_query,
face_detection_udf_query,
# ocr_udf_query,
# Mvit_udf_query,
Sift_udf_query,
Yolo_udf_query,
Expand Down
10 changes: 10 additions & 0 deletions evadb/utils/generic_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,16 @@ def try_to_import_cv2():
)


def try_to_import_timm():
try:
import timm # noqa: F401
except ImportError:
raise ValueError(
"""Could not import timm python package.
Please install them with `pip install timm`."""
)


def try_to_import_kornia():
try:
import kornia # noqa: F401
Expand Down
1 change: 0 additions & 1 deletion test/integration_tests/test_huggingface_udfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,6 @@ def test_summarization_from_video(self):
drop_udf_query = f"DROP UDF {summary_udf};"
execute_query_fetch_all(self.evadb, drop_udf_query)

@pytest.mark.benchmark
def test_toxicity_classification(self):
udf_name = "HFToxicityClassifier"
create_udf_query = f"""CREATE UDF {udf_name}
Expand Down
71 changes: 0 additions & 71 deletions test/integration_tests/test_ocr_extractor.py

This file was deleted.

3 changes: 1 addition & 2 deletions test/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import asyncio
import gc
import multiprocessing as mp
import os
Expand Down Expand Up @@ -230,7 +229,7 @@ def get_physical_query_plan(
db, query: str, rule_manager=None, cost_model=None
) -> AbstractPlan:
l_plan = get_logical_query_plan(db, query)
p_plan = asyncio.run(PlanGenerator(db, rule_manager, cost_model).build(l_plan))
p_plan = PlanGenerator(db, rule_manager, cost_model).build(l_plan)
return p_plan


Expand Down
Loading

0 comments on commit 2be622e

Please sign in to comment.