Skip to content

Commit

Permalink
refactor: mv eva -> evadb (part 1) (#820)
Browse files Browse the repository at this point in the history
1. move `eva -> evadb` to stay consistent with the package name
  • Loading branch information
gaurav274 authored Jun 6, 2023
1 parent 70613f8 commit 1098091
Show file tree
Hide file tree
Showing 407 changed files with 1,695 additions and 1,694 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 105,7 @@ jobs:
name: Disable Ray setting in the config.yml file
command: |
source test_evadb/bin/activate
python -c "import yaml;f = open('eva/eva.yml', 'r ');config_obj = yaml.load(f, Loader=yaml.FullLoader);config_obj['experimental']['ray'] = False;f.seek(0);f.write(yaml.dump(config_obj));f.truncate();"
python -c "import yaml;f = open('evadb/evadb.yml', 'r ');config_obj = yaml.load(f, Loader=yaml.FullLoader);config_obj['experimental']['ray'] = False;f.seek(0);f.write(yaml.dump(config_obj));f.truncate();"
- run:
name: Test and upload coverage report to coveralls
Expand Down
10 changes: 5 additions & 5 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -1,10 1,10 @@
[run]
omit =
eva/udfs/abstract/*
eva/udfs/emotion_detector.py
eva/udfs/yolo_object_detector.py
eva/executor/exchange_executor.py
eva/executor/ray_utils.py
evadb/udfs/abstract/*
evadb/udfs/emotion_detector.py
evadb/udfs/yolo_object_detector.py
evadb/executor/exchange_executor.py
evadb/executor/ray_utils.py

[report]
exclude_lines =
Expand Down
4 changes: 2 additions & 2 deletions .flake8
Original file line number Diff line number Diff line change
@@ -1,7 1,7 @@
[flake8]
exclude =
eva/filters
eva/parser/evaql
evadb/filters
evadb/parser/evaql
ignore =
E203
E266
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -213,3 213,7 @@ test.py
# faiss
*.faiss
eva_db/*


# older code
eva/*
6 changes: 3 additions & 3 deletions RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 39,7 @@ Then run `chmod 600 ./.pypirc` so only you can read/write.
Make sure `CHANGELOG.md` is up to date for the release: compare against PRs
merged since the last release.

1. Update version to, e.g. 0.0.6 (remove the ` dev` label) in `eva/version.py`.
1. Update version to, e.g. 0.0.6 (remove the ` dev` label) in `evadb/version.py`.

1. Commit these changes and create a PR:

Expand All @@ -66,7 66,7 @@ Then run `chmod 600 ./.pypirc` so only you can read/write.
python3 -m venv test_evadb # create a virtualenv for testing
source test_evadb/bin/activate # activate virtualenv
python3 -m pip install dist/evadb-0.9.1-py3-none-any.whl
python3 -c "import eva; print(eva.__version__)"
python3 -c "import evadb; print(evadb.__version__)"

1. Publish to PyPI

Expand All @@ -83,7 83,7 @@ Then run `chmod 600 ./.pypirc` so only you can read/write.
* Publish the release.


1. Update version to, e.g. 0.9.1 dev in `eva/version.py`.
1. Update version to, e.g. 0.9.1 dev in `evadb/version.py`.

1. Add a new changelog entry for the unreleased version in `CHANGELOG.md`:

Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 11,7 @@

# The full version, including alpha/beta/rc tags
VERSION_DICT = {}
with open("../eva/version.py", "r") as version_file:
with open("../evadb/version.py", "r") as version_file:
exec(version_file.read(), VERSION_DICT)

# Set the latest version.
Expand Down
2 changes: 1 addition & 1 deletion docs/source/contribute/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -123,4 123,4 @@ Architecture Diagram
Troubleshooting
====
If the test suite fails with a `PermissionDenied` exception, update the `path_prefix` attribute under the `storage` section in the EVA configuration file (``~/.eva/eva.yml``) to a directory where you have write privileges.
If the test suite fails with a `PermissionDenied` exception, update the `path_prefix` attribute under the `storage` section in the EVA configuration file (``~/.evadb/evadb.yml``) to a directory where you have write privileges.
2 changes: 1 addition & 1 deletion docs/source/contribute/internals.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 4,7 @@ EVA Internals
Path of a Query
-------------------

The following code represents a sequence of operations that can be used to execute a query in a evaql database. found in `eva/server/command_handler.py <https://github.com/georgia-tech-db/eva/blob/076704705c35245a6c83a626dba599342c59ff64/eva/server/command_handler.py#L37>`_
The following code represents a sequence of operations that can be used to execute a query in a evaql database. found in `evadb/server/command_handler.py <https://github.com/georgia-tech-db/eva/blob/076704705c35245a6c83a626dba599342c59ff64/evadb/server/command_handler.py#L37>`_

Parse the query using the Parser() function provided by the evaql library. The result of this step will be a parsed representation of the query in the form of an abstract syntax tree (AST).

Expand Down
4 changes: 2 additions & 2 deletions docs/source/contribute/internals/catalog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 4,11 @@ Catalog
Catalog Manager
---------------

Explanation for developers on how to use the eva `catalog_manager <https://github.com/georgia-tech-db/eva/blob/076704705c35245a6c83a626dba599342c59ff64/eva/catalog/catalog_manager.py#L44>`_.
Explanation for developers on how to use the eva `catalog_manager <https://github.com/georgia-tech-db/eva/blob/076704705c35245a6c83a626dba599342c59ff64/evadb/catalog/catalog_manager.py#L44>`_.

CatalogManager class that provides a set of services to interact with a database that stores metadata about tables, columns, and user-defined functions (UDFs). Information like what is the data type in a certain column in a table, type of a table, its name, etc.. It contains functions to get, insert and delete catalog entries for Tables, UDFs, UDF IOs, Columns and Indexes.

This data is stored in the eva_catalog.db file which can be found in `~/.eva/<version>/` folder.
This data is stored in the eva_catalog.db file which can be found in `~/.evadb/<version>/` folder.

Catalog manager currently has 5 services in it:

Expand Down
2 changes: 1 addition & 1 deletion docs/source/contribute/new_command.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 38,7 @@ The first part of Parser is build from a LARK grammar file.
parser/eva
~~~~~~~~~~~~

- ``eva.lark`` - add keywords(eg. CREATE, TABLE) under **Common
- ``evadb.lark`` - add keywords(eg. CREATE, TABLE) under **Common
Keywords**

- Add new grammar rule (eg. create_table)
Expand Down
2 changes: 1 addition & 1 deletion docs/source/contribute/release.rst
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 79,7 @@ merged since the last release.
python3 -m venv test_evadb # create a virtualenv for testing
source test_evadb/bin/activate # activate virtualenv
python3 -m pip install dist/evadb-0.9.1-py3-none-any.whl
python3 -c "import eva; print(eva.__version__)"
python3 -c "import evasb; print(evadb.__version__)"
10. Publish to PyPI

Expand Down
2 changes: 1 addition & 1 deletion docs/source/overview/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 35,7 @@ Connect to the EVA server in the notebook using the following code:
# allow nested asyncio calls for client to connect with server
import nest_asyncio
nest_asyncio.apply()
from eva.server.db_api import connect
from evadb.server.db_api import connect
# hostname and port of the server where EVA is running
connection = connect(host = '0.0.0.0', port = 8803)
Expand Down
2 changes: 1 addition & 1 deletion docs/source/overview/udf.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 7,7 @@ Here is an illustrative UDF for classifying MNIST images.

.. code-block:: bash
!wget -nc https://raw.githubusercontent.com/georgia-tech-db/eva/master/eva/udfs/mnist_image_classifier.py
!wget -nc https://raw.githubusercontent.com/georgia-tech-db/eva/master/evadb/udfs/mnist_image_classifier.py
.. code-block:: python
Expand Down
38 changes: 19 additions & 19 deletions docs/source/reference/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 6,11 @@ To begin your querying session, get a connection to the EvaDB using ``connect``:
.. autosummary::
:toctree: ./doc

~eva.connect
~evadb.connect

.. code-block:: python
from eva import connect
from evadb import connect
conn = connect()
You can then use this connection to run queries:
Expand All @@ -37,7 37,7 @@ EVADBConnection Interface
.. autosummary::
:toctree: ./doc

~eva.EVADBConnection.cursor
~evadb.EVADBConnection.cursor


EVADBCursor Interface
Expand All @@ -46,26 46,26 @@ EVADBCursor Interface
.. autosummary::
:toctree: ./doc

~eva.EVADBCursor.connect
~eva.EVADBCursor.load
~eva.EVADBCursor.query
~eva.EVADBCursor.table
~eva.EVADBCursor.create_udf
~eva.EVADBCursor.create_vector_index
~eva.EVADBCursor.df
~evadb.EVADBCursor.connect
~evadb.EVADBCursor.load
~evadb.EVADBCursor.query
~evadb.EVADBCursor.table
~evadb.EVADBCursor.create_udf
~evadb.EVADBCursor.create_vector_index
~evadb.EVADBCursor.df

EVADBQuery Interface
---------------------

.. autosummary::
:toctree: ./doc

~eva.EVADBQuery.select
~eva.EVADBQuery.cross_apply
~eva.EVADBQuery.filter
~eva.EVADBQuery.df
~eva.EVADBQuery.alias
~eva.EVADBQuery.limit
~eva.EVADBQuery.order
~eva.EVADBQuery.show
~eva.EVADBQuery.sql_query
~evadb.EVADBQuery.select
~evadb.EVADBQuery.cross_apply
~evadb.EVADBQuery.filter
~evadb.EVADBQuery.df
~evadb.EVADBQuery.alias
~evadb.EVADBQuery.limit
~evadb.EVADBQuery.order
~evadb.EVADBQuery.show
~evadb.EVADBQuery.sql_query
2 changes: 1 addition & 1 deletion docs/source/reference/evaql.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 14,7 @@ Here is an example where we first define a UDF wrapping around the FastRCNN obje
OUTPUT (labels NDARRAY STR(ANYDIM), bboxes NDARRAY FLOAT32(ANYDIM, 4),
scores NDARRAY FLOAT32(ANYDIM))
TYPE Classification
IMPL 'eva/udfs/fastrcnn_object_detector.py';
IMPL 'evadb/udfs/fastrcnn_object_detector.py';
--- Use the function to retrieve frames that contain more than 3 cars
SELECT id FROM MyVideo
Expand Down
2 changes: 1 addition & 1 deletion docs/source/reference/evaql/create.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 30,7 @@ To register an user-defined function, specify the implementation details of the
OUTPUT (labels NDARRAY STR(ANYDIM), bboxes NDARRAY FLOAT32(ANYDIM, 4),
scores NDARRAY FLOAT32(ANYDIM))
TYPE Classification
IMPL 'eva/udfs/fastrcnn_object_detector.py';
IMPL 'evadb/udfs/fastrcnn_object_detector.py';
CREATE MATERIALIZED VIEW
----
Expand Down
2 changes: 1 addition & 1 deletion docs/source/reference/gpu.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 23,7 @@ A valid output from the command indicates that your GPU is configured and ready
Output of `cuda:0` indicates the presence of a GPU. 0 indicates the index of the GPU in system. If you have multiple GPUs on your workstation, the index must be updated accordingly.

3. Now configure the executor section in eva.yml as follows:
3. Now configure the executor section in evadb.yml as follows:

.. code-block:: yaml
Expand Down
8 changes: 4 additions & 4 deletions docs/source/reference/io.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 18,7 @@ dimensions(*Tuple(int)*): shape of the numpy array

.. code-block:: python
from eva.catalog.catalog_type import NdArrayType
from evadb.catalog.catalog_type import NdArrayType
NumpyArray(
name="input_arr",
is_nullable=False,
Expand All @@ -34,13 34,13 @@ name (*str*): name of the pytorch tensor.

is_nullable (*bool*): boolean value indicating if the pytorch tensor can be NULL.

type (*NdArrayType*): data type of elements in the pytorch tensor. The available types can be found in eva/catalog/catalog_type.py in class NdArrayType
type (*NdArrayType*): data type of elements in the pytorch tensor. The available types can be found in evadb/catalog/catalog_type.py in class NdArrayType

dimensions(*Tuple(int)*): shape of the numpy array

.. code-block:: python
from eva.catalog.catalog_type import NdArrayType
from evadb.catalog.catalog_type import NdArrayType
PyTorchTensor(
name="input_arr",
is_nullable=False,
Expand All @@ -53,7 53,7 @@ PandasDataframe
----------------
columns (*List[str]*): list of strings that represent the expected column names in the pandas dataframe that is returned from the UDF.

column_types (*NdArrayType*): expected datatype of the column in the pandas dataframe returned from the UDF. The NdArrayType class is inherited from eva.catalog.catalog_type.
column_types (*NdArrayType*): expected datatype of the column in the pandas dataframe returned from the UDF. The NdArrayType class is inherited from evadb.catalog.catalog_type.

column_shapes (*List[tuples]*): list of tuples that represent the expected shapes of columns in the pandas dataframe returned from the UDF.

Expand Down
6 changes: 3 additions & 3 deletions docs/source/reference/udfs/custom.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 6,13 @@ This section provides an overview of how you can create and use a custom user-de
Part 1: Writing a custom UDF
------------------------------

During each step, use `this UDF implementation <https://github.com/georgia-tech-db/eva/blob/master/eva/udfs/yolo_object_detector.py>`_ as a reference.
During each step, use `this UDF implementation <https://github.com/georgia-tech-db/eva/blob/master/evadb/udfs/yolo_object_detector.py>`_ as a reference.

1. Create a new file under `udfs/` folder and give it a descriptive name. eg: `yolo_object_detection.py`.

.. note::

UDFs packaged along with EVA are located inside the `udfs <https://github.com/georgia-tech-db/eva/tree/master/eva/udfs>`_ folder.
UDFs packaged along with EVA are located inside the `udfs <https://github.com/georgia-tech-db/eva/tree/master/evadb/udfs>`_ folder.

2. Create a Python class that inherits from `PytorchClassifierAbstractUDF`.

Expand Down Expand Up @@ -131,7 131,7 @@ Now that you have implemented your UDF, we need to register it as a UDF in EVA.
.. code-block:: sql
CREATE UDF YoloDecorators
IMPL 'eva/udfs/decorators/yolo_object_detection_decorators.py';
IMPL 'evadb/udfs/decorators/yolo_object_detection_decorators.py';
A status of 0 in the response denotes the successful registration of this UDF.
Expand Down
2 changes: 1 addition & 1 deletion docs/source/reference/udfs/openai.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 12,7 @@ To create a chat completion UDF in EVA, use the following SQL command:
.. code-block:: sql
CREATE UDF IF NOT EXISTS OpenAIChatCompletion
IMPL 'eva/udfs/openai_chat_completion_udf.py'
IMPL 'evadb/udfs/openai_chat_completion_udf.py'
'model' 'gpt-3.5-turbo'
EVA supports the following models for chat completion task:
Expand Down
15 changes: 0 additions & 15 deletions eva/models/__init__.py

This file was deleted.

2 changes: 1 addition & 1 deletion eva/README.md → evadb/README.md
Original file line number Diff line number Diff line change
@@ -1,6 1,6 @@
# Architecture of EVA Database System

<img src="https://raw.githubusercontent.com/georgia-tech-db/eva/master/docs/images/eva/eva-arch.png" alt="EVA Architecture Diagram" width="500">
<img src="https://raw.githubusercontent.com/georgia-tech-db/eva/master/docs/images/evadb/eva-arch.png" alt="EVA Architecture Diagram" width="500">

* `server` - Code for launching server that sends client commands to command handler.
* `parser` - Converts SQL queries to statements (e.g., CREATE, SELECT, INSERT, and LOAD statements).
Expand Down
4 changes: 2 additions & 2 deletions eva/__init__.py → evadb/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 12,12 @@
# 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.
from eva.interfaces.relational.db import ( # noqa: E402,F401
from evadb.interfaces.relational.db import ( # noqa: E402,F401
EVADBConnection,
EVADBCursor,
connect,
)
from eva.interfaces.relational.relation import EVADBQuery # noqa: E402,F401
from evadb.interfaces.relational.relation import EVADBQuery # noqa: E402,F401

from .version import VERSION as __version__ # noqa: E402,F401

Expand Down
File renamed without changes.
20 changes: 10 additions & 10 deletions eva/binder/binder_utils.py → evadb/binder/binder_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 17,23 @@
import re
from typing import TYPE_CHECKING, List

from eva.catalog.catalog_type import TableType
from eva.catalog.catalog_utils import (
from evadb.catalog.catalog_type import TableType
from evadb.catalog.catalog_utils import (
get_video_table_column_definitions,
is_document_table,
is_string_col,
is_video_table,
)
from eva.expression.function_expression import FunctionExpression
from eva.parser.alias import Alias
from evadb.expression.function_expression import FunctionExpression
from evadb.parser.alias import Alias

if TYPE_CHECKING:
from eva.binder.statement_binder_context import StatementBinderContext
from eva.catalog.catalog_manager import CatalogManager
from eva.catalog.models.table_catalog import TableCatalogEntry
from eva.expression.tuple_value_expression import TupleValueExpression
from eva.parser.table_ref import TableInfo, TableRef
from eva.utils.logging_manager import logger
from evadb.binder.statement_binder_context import StatementBinderContext
from evadb.catalog.catalog_manager import CatalogManager
from evadb.catalog.models.table_catalog import TableCatalogEntry
from evadb.expression.tuple_value_expression import TupleValueExpression
from evadb.parser.table_ref import TableInfo, TableRef
from evadb.utils.logging_manager import logger


class BinderError(Exception):
Expand Down
Loading

0 comments on commit 1098091

Please sign in to comment.