Skip to content
This repository was archived by the owner on Oct 15, 2025. It is now read-only.

Commit 97d2735

Browse files
authored
notebooks: update notebooks (#873)
πŸ‘‹ Thanks for submitting a Pull Request to EvaDB! πŸ™Œ We want to make contributing to EvaDB as easy and transparent as possible. Here are a few tips to get you started: - πŸ” Search existing EvaDB [PRs](https://github.com/georgia-tech-db/eva/pulls) to see if a similar PR already exists. - πŸ”— Link this PR to a EvaDB [issue](https://github.com/georgia-tech-db/eva/issues) to help us understand what bug fix or feature is being implemented. - πŸ“ˆ Provide before and after profiling results to help us quantify the improvement your PR provides (if applicable). πŸ‘‰ Please see our βœ… [Contributing Guide](https://evadb.readthedocs.io/en/stable/source/contribute/index.html) for more details.
1 parent 73dd3ac commit 97d2735

18 files changed

+150
-462
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1+
evadb[document]
12
pytube
23
youtube_transcript_api

β€Žapps/youtube_qa/youtube_qa.pyβ€Ž

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,25 @@
1717
import time
1818

1919
import pandas as pd
20-
from pytube import YouTube, extract
21-
from youtube_transcript_api import YouTubeTranscriptApi
2220

2321
import evadb
2422

23+
24+
def try_to_import_pytube():
25+
try:
26+
import pytube # noqa: F401
27+
except ImportError:
28+
raise ValueError(
29+
"""Could not import pytube python package.
30+
Please install it with `pip install -r requirements.txt`."""
31+
)
32+
33+
34+
try_to_import_pytube()
35+
36+
from pytube import YouTube, extract # noqa: E402
37+
from youtube_transcript_api import YouTubeTranscriptApi # noqa: E402
38+
2539
MAX_CHUNK_SIZE = 5000
2640
DEFAULT_VIDEO_LINK = "https://www.youtube.com/watch?v=TvS1lHEQoKk"
2741

β€Ževadb/binder/statement_binder.pyβ€Ž

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -324,10 +324,10 @@ def _bind_func_expr(self, node: FunctionExpression):
324324
# Verify the consistency of the UDF. If the checksum of the UDF does not
325325
# match the one stored in the catalog, an error will be thrown and the user
326326
# will be asked to register the UDF again.
327-
assert (
328-
get_file_checksum(udf_obj.impl_file_path) == udf_obj.checksum
329-
), f"""UDF file {udf_obj.impl_file_path} has been modified from the
330-
registration. Please use DROP UDF to drop it and re-create it using CREATE UDF."""
327+
# assert (
328+
# get_file_checksum(udf_obj.impl_file_path) == udf_obj.checksum
329+
# ), f"""UDF file {udf_obj.impl_file_path} has been modified from the
330+
# registration. Please use DROP UDF to drop it and re-create it # using CREATE UDF."""
331331

332332
try:
333333
udf_class = load_udf_class_from_file(

β€Ževadb/version.pyβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
_REVISION = "13+dev"
44

55
VERSION_SHORT = f"{_MAJOR}.{_MINOR}"
6-
VERSION = f"{_MAJOR}.{_MINOR}.{_REVISION}"
6+
VERSION = f"{_MAJOR}.{_MINOR}.{_REVISION}" # noqa: W292

β€Žsetup.pyβ€Ž

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def read(path, encoding="utf-8"):
4545
"sqlalchemy-utils>=0.36.6",
4646
"lark>=1.0.0",
4747
"pyyaml>=5.1",
48-
"ray>=1.13.0",
48+
"ray>=1.13.0,<2.5.0", # BREAKING CHANGES IN 2.5.0
4949
"aenum>=2.2.0",
5050
"diskcache>=5.4.0",
5151
"retry>=0.9.2",
@@ -101,10 +101,7 @@ def read(path, encoding="utf-8"):
101101
# TESTING PACKAGES
102102
"pytest>=6.1.2",
103103
"pytest-cov>=2.11.1",
104-
"pytest-virtualenv",
105-
"pytest-asyncio",
106104
"mock",
107-
"pytest-xdist",
108105
"coveralls>=3.0.1",
109106
"moto[s3]>=4.1.1",
110107

β€Žtest/app_tests/test_youtube_qa.pyβ€Ž

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,5 +55,7 @@ def test_should_run_youtube_qa_app(self):
5555

5656
decoded_stdout = stdout.decode()
5757
assert "Julia" or "Rate limit" in decoded_stdout
58+
print(decoded_stdout)
59+
print(stderr.decode())
5860
# decoded_stderr = stderr.decode()
5961
# assert "Ray" in decoded_stderr

β€Žtutorials/01-mnist.ipynbβ€Ž

Lines changed: 5 additions & 68 deletions
Large diffs are not rendered by default.

β€Žtutorials/02-object-detection.ipynbβ€Ž

Lines changed: 15 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
},
4040
{
4141
"cell_type": "code",
42-
"execution_count": 1,
42+
"execution_count": 11,
4343
"id": "7be7461a",
4444
"metadata": {
4545
"execution": {
@@ -50,15 +50,6 @@
5050
}
5151
},
5252
"outputs": [
53-
{
54-
"name": "stdout",
55-
"output_type": "stream",
56-
"text": [
57-
"\r\n",
58-
"\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m A new release of pip is available: \u001b[0m\u001b[31;49m23.0.1\u001b[0m\u001b[39;49m -> \u001b[0m\u001b[32;49m23.1.2\u001b[0m\r\n",
59-
"\u001b[1m[\u001b[0m\u001b[34;49mnotice\u001b[0m\u001b[1;39;49m]\u001b[0m\u001b[39;49m To update, run: \u001b[0m\u001b[32;49mpip install --upgrade pip\u001b[0m\r\n"
60-
]
61-
},
6253
{
6354
"name": "stdout",
6455
"output_type": "stream",
@@ -68,7 +59,7 @@
6859
}
6960
],
7061
"source": [
71-
"%pip install --quiet evadb\n",
62+
"%pip install --quiet \"evadb[vision,notebook]\"\n",
7263
"import evadb\n",
7364
"cursor = evadb.connect().cursor()"
7465
]
@@ -86,7 +77,7 @@
8677
},
8778
{
8879
"cell_type": "code",
89-
"execution_count": 2,
80+
"execution_count": 12,
9081
"id": "ee22f577",
9182
"metadata": {
9283
"execution": {
@@ -101,7 +92,7 @@
10192
"name": "stdout",
10293
"output_type": "stream",
10394
"text": [
104-
"File β€˜ua_detrac.mp4’ already there; not retrieving.\r\n"
95+
"File 'ua_detrac.mp4' already there; not retrieving.\n"
10596
]
10697
}
10798
],
@@ -123,7 +114,7 @@
123114
},
124115
{
125116
"cell_type": "code",
126-
"execution_count": 3,
117+
"execution_count": 13,
127118
"id": "130b8561",
128119
"metadata": {
129120
"execution": {
@@ -134,13 +125,6 @@
134125
}
135126
},
136127
"outputs": [
137-
{
138-
"name": "stderr",
139-
"output_type": "stream",
140-
"text": [
141-
"06-08-2023 00:27:16 WARNING[drop_object_executor:drop_object_executor.py:_handle_drop_table:0050] Table: ObjectDetectionVideos does not exist\n"
142-
]
143-
},
144128
{
145129
"data": {
146130
"text/html": [
@@ -179,7 +163,7 @@
179163
"0 Number of loaded VIDEO: 1"
180164
]
181165
},
182-
"execution_count": 3,
166+
"execution_count": 13,
183167
"metadata": {},
184168
"output_type": "execute_result"
185169
}
@@ -200,7 +184,7 @@
200184
},
201185
{
202186
"cell_type": "code",
203-
"execution_count": 4,
187+
"execution_count": 14,
204188
"id": "e83e5a44",
205189
"metadata": {
206190
"execution": {
@@ -249,7 +233,7 @@
249233
"0 UDF Yolo already exists, nothing added."
250234
]
251235
},
252-
"execution_count": 4,
236+
"execution_count": 14,
253237
"metadata": {},
254238
"output_type": "execute_result"
255239
}
@@ -273,7 +257,7 @@
273257
},
274258
{
275259
"cell_type": "code",
276-
"execution_count": 5,
260+
"execution_count": 15,
277261
"id": "91bdcaca",
278262
"metadata": {
279263
"execution": {
@@ -284,13 +268,6 @@
284268
}
285269
},
286270
"outputs": [
287-
{
288-
"name": "stderr",
289-
"output_type": "stream",
290-
"text": [
291-
"2023-06-08 01:27:04,077\tINFO worker.py:1625 -- Started a local Ray instance.\n"
292-
]
293-
},
294271
{
295272
"name": "stdout",
296273
"output_type": "stream",
@@ -405,7 +382,7 @@
405382
},
406383
{
407384
"cell_type": "code",
408-
"execution_count": 6,
385+
"execution_count": 16,
409386
"id": "ecc977d8",
410387
"metadata": {
411388
"execution": {
@@ -473,7 +450,7 @@
473450
},
474451
{
475452
"cell_type": "code",
476-
"execution_count": 7,
453+
"execution_count": 17,
477454
"id": "7a2dee29",
478455
"metadata": {
479456
"execution": {
@@ -527,15 +504,15 @@
527504
{
528505
"data": {
529506
"application/vnd.jupyter.widget-view+json": {
530-
"model_id": "de8a0a97ba6d4a9dbb1116d4cf877648",
507+
"model_id": "9a83cbab496b47cabd4a5c3c71cfbf51",
531508
"version_major": 2,
532509
"version_minor": 0
533510
},
534511
"text/plain": [
535512
"Video(value=b'\\x00\\x00\\x00\\x1cftypisom\\x00\\x00\\x02\\x00isomiso2mp41\\x00\\x00\\x00\\x08free\\x00\\t5X...')"
536513
]
537514
},
538-
"execution_count": 7,
515+
"execution_count": 17,
539516
"metadata": {},
540517
"output_type": "execute_result"
541518
}
@@ -560,7 +537,7 @@
560537
},
561538
{
562539
"cell_type": "code",
563-
"execution_count": 8,
540+
"execution_count": 18,
564541
"id": "f7331a66",
565542
"metadata": {
566543
"execution": {
@@ -609,7 +586,7 @@
609586
"0 UDF Yolo successfully dropped"
610587
]
611588
},
612-
"execution_count": 8,
589+
"execution_count": 18,
613590
"metadata": {},
614591
"output_type": "execute_result"
615592
}

0 commit comments

Comments
Β (0)