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: add support for 3.11 #897

Merged
merged 11 commits into from
Jun 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ workflows:
v: "3.10"
mode: "TEST"
ray: "DISABLED"
#- Linux:
# name: "Test | v3.11 | Linux"
# v: "3.11"
# mode: "TEST"
# ray: "DISABLED"
- Linux:
name: "Test | Ray | v3.8 | Linux"
v: "3.8"
Expand All @@ -53,7 +58,7 @@ workflows:
# name: "Test | v3.11 | Linux"
# v: "3.11"
# mode: "TEST"
# ray: "DISABLED"
# ray: "ENABLED"
################################
### NOTEBOOKS
################################
Expand All @@ -73,6 +78,11 @@ workflows:
v: "3.10"
mode: "NOTEBOOK"
ray: "DISABLED"
#- Linux:
# name: "Notebook | v3.11 | Linux"
# v: "3.11"
# mode: "NOTEBOOK"
# ray: "DISABLED"
- Linux:
name: "Notebook | Ray | v3.8 | Linux"
v: "3.8"
Expand Down Expand Up @@ -147,7 +157,6 @@ jobs:
pip install --upgrade pip
source test_evadb/bin/activate
pip install ".[dev]"
pip uninstall -y ray

# Enable Ray (update evadb.yml file and install Ray package)
- when:
Expand All @@ -159,7 +168,7 @@ jobs:
command: |
source test_evadb/bin/activate
python -c "import yaml;f = open('evadb/evadb.yml', 'r+');config_obj = yaml.load(f, Loader=yaml.FullLoader);config_obj['experimental']['ray'] = True;f.seek(0);f.write(yaml.dump(config_obj));f.truncate();"
pip install ".[dev]"
pip install ".[ray]"

- run:
name: Test and upload coverage report to coveralls
Expand Down
47 changes: 6 additions & 41 deletions .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
name: 🐞 Bug Report
description: Problems with EVA DB
description: Problems with EvaDB
labels: [bug, triage]
body:
- type: markdown
attributes:
value: |
πŸ™ Thanks for submitting a EVA DB Bug Report!

- type: checkboxes
attributes:
Expand All @@ -14,25 +10,9 @@ body:
πŸ” Please search the [issues](https://github.com/georgia-tech-db/eva/issues) to see if a similar bug report already exists.
options:
- label: >
I have searched the EVA DB [issues](https://github.com/georgia-tech-db/eva/issues) and found no similar bug report.
I have searched the EvaDB [issues](https://github.com/georgia-tech-db/eva/issues) and found no similar bug report.
required: true

- type: dropdown
attributes:
label: EVA DB Component
description: |
πŸ€” Please select the part of EVA DB where you found the bug.
multiple: true
options:
- "Query Parser"
- "Query Optimizer"
- "Query Executor"
- "Data Loader"
- "Integrations"
- "Other"
validations:
required: false

- type: textarea
attributes:
label: Bug
Expand All @@ -47,34 +27,19 @@ body:
label: Environment
description: πŸ–₯️ Please specify the software and hardware you used to produce the bug.
placeholder: |
- EVA DB: v2.0.1
- EvaDB: v2.0.1
- OS: Ubuntu 20.04
- Python: 3.9.0
- GPU: Yes
- Ray: Not installed
validations:
required: false

- type: textarea
attributes:
label: Minimal Reproducible Example
description: >
🧐 When asking a question, people will be better able to provide help if you provide code that they can easily understand and use to **reproduce** the problem.
placeholder: |
```
# Code to reproduce your issue here
```
validations:
required: false

- type: textarea
attributes:
label: Additional
description: πŸ“ Anything else you would like to share?

- type: checkboxes
attributes:
label: Are you willing to submit a PR?
description: >
πŸ‘ (Optional) Please consider submitting a [Pull Request](https://github.com/georgia-tech-db/eva/pulls) (PR) to help improve EVA DB for everyone, especially if you have a good understanding of how to implement a fix or feature.
πŸ‘ (Optional) Please consider submitting a [Pull Request](https://github.com/georgia-tech-db/eva/pulls) (PR) to help improve EvaDB for everyone, especially if you have a good understanding of how to implement a fix or feature.
Please see our βœ… [Contributing Guide](https://evadb.readthedocs.io/en/stable/source/contribute/index.html) to get started.
options:
- label: Yes I'd like to help by submitting a PR!
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ blank_issues_enabled: true
contact_links:
- name: πŸ“š Documentation
url: https://evadb.readthedocs.io/en/stable/
about: View EVA DB Docs
about: View EvaDB Documentation
- name: πŸ’¬ Slack
url: https://join.slack.com/t/eva-db/shared_invite/zt-1i10zyddy-PlJ4iawLdurDv~aIAq90Dg
about: Ask on EVA DB Slack Forum
about: Join our Slack!
17 changes: 4 additions & 13 deletions .github/ISSUE_TEMPLATE/feature-request.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
name: πŸš€ Feature Request
description: Suggest a feature for EVA DB
description: Suggest a feature for EvaDB
labels: [enhancement]
body:
- type: markdown
attributes:
value: |
πŸ™ Thanks for submitting a EVA DB Feature Request!

- type: checkboxes
attributes:
Expand All @@ -14,15 +10,15 @@ body:
πŸ” Please search the [issues](https://github.com/georgia-tech-db/eva/issues) to see if a similar feature request already exists.
options:
- label: >
I have searched the EVA DB [issues](https://github.com/georgia-tech-db/eva/issues) and found no similar feature requests.
I have searched the EvaDB [issues](https://github.com/georgia-tech-db/eva/issues) and found no similar feature requests.
required: true

- type: textarea
attributes:
label: Description
description: πŸ’‘ A short description of your feature.
placeholder: |
What new feature would you like to see in EVA DB?
What new feature would you like to see in EvaDB?
validations:
required: true

Expand All @@ -34,16 +30,11 @@ body:
placeholder: |
How would this feature be used, and who would use it?

- type: textarea
attributes:
label: Additional
description: πŸ“ Anything else you would like to share?

- type: checkboxes
attributes:
label: Are you willing to submit a PR?
description: >
(Optional) Please consider submitting a [Pull Request](https://github.com/georgia-tech-db/eva/pulls) (PR) to help improve EVA DB for everyone, especially if you have a good understanding of how to implement a fix or feature.
(Optional) Please consider submitting a [Pull Request](https://github.com/georgia-tech-db/eva/pulls) (PR) to help improve EvaDB for everyone, especially if you have a good understanding of how to implement a fix or feature.
Please see our βœ… [Contributing Guide](https://github.com/georgia-tech-db/eva/pulls) to get started.
options:
- label: Yes I'd like to help by submitting a PR!
16 changes: 3 additions & 13 deletions .github/ISSUE_TEMPLATE/question.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,15 @@
name: ❓ Question
description: Ask a EVA DB question
description: Ask a question on EvaDB
labels: [question]
body:
- type: markdown
attributes:
value: |
πŸ™ Thanks for asking a EVA DB Question!

- type: checkboxes
attributes:
label: Search before asking
description: >
πŸ” Please search the [issues](https://github.com/georgia-tech-db/eva/issues) to see if a similar question already exists.
πŸ” Please search our [issues](https://github.com/georgia-tech-db/eva/issues) to see if a similar question already exists.
options:
- label: >
I have searched the EVA DB [issues](https://github.com/georgia-tech-db/eva/issues) and found no similar questions.
I have searched the EvaDB [issues](https://github.com/georgia-tech-db/eva/issues) and found no similar questions.
required: true

- type: textarea
Expand All @@ -25,8 +20,3 @@ body:
πŸ’‘ ProTip! Include as much information as possible (screenshots, logs, tracebacks etc.) to receive the most helpful response.
validations:
required: true

- type: textarea
attributes:
label: Additional
description: πŸ“ Anything else you would like to share?
32 changes: 8 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,38 +167,22 @@ query = query.select("id, bbox, EmotionDetector(Crop(data, bounding_box))")
# Run the query and get the query result as a dataframe
response = query.df()
```
- **EvaDB runs AI apps 10--100x faster using its AI-centric query optimizer**. Three key built-in optimizations are:

- **EvaDB runs queries faster using its AI-centric query optimizer**. Two key optimizations are:
πŸ’Ύ **Caching**: EvaDB automatically caches and reuses model inference results.

πŸ’Ύ **Caching**: EvaDB automatically caches and reuses previous query results (especially model inference results), eliminating redundant computation and reducing query processing time.
⚑️ **Parallel Query Execution**: EvaDB runs the app in parallel on all the available hardware resources (CPUs and GPUs).

🎯 **Predicate Reordering**: EvaDB optimizes the order in which the query predicates are evaluated (e.g., runs the faster, more selective model first), leading to faster queries and lower inference costs.

```mysql
-- Query 1: Find all images of black-colored dogs
SELECT id, bbox FROM dogs
JOIN LATERAL UNNEST(Yolo(data)) AS Obj(label, bbox, score)
WHERE Obj.label = 'dog'
AND Color(Crop(data, bbox)) = 'black';

-- Query 2: Find all Great Danes that are black-colored
SELECT id, bbox FROM dogs
JOIN LATERAL UNNEST(Yolo(data)) AS Obj(label, bbox, score)
WHERE Obj.label = 'dog'
AND DogBreedClassifier(Crop(data, bbox)) = 'great dane'
AND Color(Crop(data, bbox)) = 'black';
```

By reusing the results of the first query and reordering the predicates based on the available cached inference results, EvaDB runs the second query **10x faster**!
🎯 **Model Ordering**: EvaDB optimizes the order in which models are evaluated (e.g., runs the faster, more selective model first).

## Architecture Diagram

This diagram presents the key components of EvaDB. EvaDB's AI-centric Query Optimizer takes a parsed query as input and generates a query plan that is then executed by the Query Engine. The Query Engine hits multiple storage engines to retrieve the data required for efficiently running the query:
This diagram presents the key components of EvaDB. EvaDB's AI-centric query optimizer takes a query as input and generates a query plan that is executed by the query engine. The query engine hits the relevant storage engines to quickly retrieve the data required for efficiently running the query:
1. Structured data (SQL database system connected via `sqlalchemy`).
2. Unstructured media data (on cloud buckets or local filesystem).
3. Vector data (vector database system).
2. Unstructured media data (on cloud buckets/local filesystem).
3. Feature data (vector database system).

<img width="700" alt="Architecture Diagram" src="https://github.com/georgia-tech-db/eva/assets/5521975/01452ec9-87d9-4d27-90b2-c0b1ab29b16c">
<img width="500" alt="Architecture Diagram" src="https://github.com/georgia-tech-db/eva/assets/5521975/01452ec9-87d9-4d27-90b2-c0b1ab29b16c">

## Screenshots

Expand Down
14 changes: 7 additions & 7 deletions docs/source/overview/faq.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,7 @@ Ensure that the local Python version is >= 3.8 and <= 3.10. EvaDB cannot support
Where does EvaDB store all the data?
====================================

By default, EvaDB stores all the data in a local folder named ``evadb_data``.

pip install ray fails because of grpcio
=======================================

Follow these instructions to install ``ray``:
https://github.com/ray-project/ray/issues/33039
By default, EvaDB stores all the data in a local folder named ``evadb_data``. Deleting this folder will reset the system's state and lead to data loss.

Why does the EvaDB server not start?
====================================
Expand Down Expand Up @@ -49,3 +43,9 @@ You can check the status of the server by running ``top`` or ``pgrep``:

top
pgrep evadb_server

pip install ray fails because of grpcio
=======================================

Follow these instructions to install ``ray``:
https://github.com/ray-project/ray/issues/33039
2 changes: 1 addition & 1 deletion docs/source/overview/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Getting Started
Step 1: Install EvaDB
----

EvaDB supports Python (versions >= ``3.8`` and <= ``3.10``). To install EvaDB, we recommend using the ``pip`` package manager:
EvaDB supports Python (versions >= ``3.8``). To install EvaDB, we recommend using the ``pip`` package manager:

.. code-block:: bash

Expand Down
2 changes: 1 addition & 1 deletion evadb/interfaces/relational/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ def explain(self, sql_query: str) -> EvaDBQuery:
Examples:
>>> proposed_plan = cursor.explain("SELECT * FROM sample_table;").df()
>>> for step in proposed_plan[0]:
>>> print(step)
>>> pprint(step)
|__ ProjectPlan
|__ SeqScanPlan
|__ StoragePlan
Expand Down
2 changes: 1 addition & 1 deletion evadb/optimizer/plan_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,6 @@ def build(self, logical_plan: Operator):
try:
plan = self.optimize(logical_plan)
except TimeoutError:
print("Optimizer timed out!")
raise ValueError("Optimizer timed out!")

return plan
3 changes: 2 additions & 1 deletion evadb/parser/lark_visitor/_insert_statements.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ def insert_statement(self, tree):
column_list = []
value_list = []

# print(tree.pretty())
# from pprint import pprint
# pprint(tree.pretty())

for child in tree.children:
if isinstance(child, Tree):
Expand Down
4 changes: 3 additions & 1 deletion evadb/server/interpreter.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ async def read_from_client_and_send_to_server(
):
VERSION = VERSION_DICT["VERSION"]
intro = f"evadb (v{VERSION})\nType 'EXIT;' to exit the client \n"
print(intro, flush=True)
from pprint import pprint

pprint(intro, flush=True)

prompt = "evadb=#"

Expand Down
4 changes: 3 additions & 1 deletion evadb/server/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ async def start_evadb_server(
hostname: hostname of the server
port: port of the server
"""
print(f"EvaDB server started at host {host} and port {port}")
from pprint import pprint

pprint(f"EvaDB server started at host {host} and port {port}")
self._evadb = init_evadb_instance(db_dir, host, port, custom_db_uri)

self._server = await asyncio.start_server(self.accept_client, host, port)
Expand Down
7 changes: 7 additions & 0 deletions script/formatting/formatter.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,13 @@ def format_file(file_path, add_header, strip_header, format_code):
#if ret_val:
# sys.exit(1)

# CHECK FOR INVALID WORDS (like print)
with open(file_path, 'r') as file:
for line_num, line in enumerate(file, start=1):
if ' print(' in line:
LOG.warning(f"print() found in {file_path}, line {line_num}: {line.strip()}")
sys.exit(1)

# END WITH

fd.close()
Expand Down
2 changes: 1 addition & 1 deletion script/test/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ fi
##################################################

if [[ ( "$PYTHON_VERSION" = "3.10" ) &&
( "$MODE" = "COV" ) ]];
( "$MODE" = "TEST" ) ]];
then
echo "UPLOADING COVERAGE REPORT"
coveralls
Expand Down
8 changes: 6 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@
AUTHOR_EMAIL = "[email protected]"
URL = "https://github.com/georgia-tech-db/eva"

# Check Python version
# import sys
# if sys.version_info < (3, 8):
# sys.exit("Python 3.8 or later is required.")

def read(path, encoding="utf-8"):
path = os.path.join(os.path.dirname(__file__), path)
Expand Down Expand Up @@ -134,8 +138,8 @@ def read(path, encoding="utf-8"):
"document": document_libs,
"udf": udf_libs,
"notebook": notebook_libs,
"all": vision_libs + document_libs + udf_libs + notebook_libs + ray_libs,
"dev": dev_libs + vision_libs + document_libs + udf_libs + notebook_libs + ray_libs,
# everything except ray
"dev": dev_libs + vision_libs + document_libs + udf_libs + notebook_libs,
}

setup(
Expand Down
Loading