In this project, We implement the delete operator for EVA, so we can delete data from a certain table.
DELETE FROM table_name [WHERE Clause]
Currently, the initial delete operator only supportsbasic deletion by table name, i.e. delete all the recordsfrom the given table. We hope to extend this delete operator to its full func-tionality so it can support where clause
The following contents is copied from EVA github, basically instructions on installation and tutorial on how to use EVA.
Installation of EVA involves setting a virtual environment using miniconda and configuring git hooks.
- Clone the repository
- Install the dependencies.
sh script/install/before_install.sh
export PATH="$HOME/miniconda/bin:$PATH"
sh script/install/install.sh
- Connect mysql user root with normal account and no password
sudo mysql -u root
> SELECT User,Host FROM mysql.user;
> DROP USER 'root'@'localhost';
> CREATE USER 'root'@'%' IDENTIFIED BY '';
> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION;
> FLUSH PRIVILEGES;
mysql -u root
refer to askubuntu
- Set up the server and client
-
Launch EVA database Server:
python eva.py
-
Launch CLI:
python eva_cmd_client.py
- Run the
UPLOAD
command in the client terminal:
UPLOAD INFILE 'data/ua_detrac/ua_detrac.mp4' PATH 'test_video.mp4';
- Run the
LOAD
command in the client terminal: (may take a while)
LOAD DATA INFILE 'test_video.mp4' INTO MyVideo;
- Below is a basic query that should work on the client
SELECT id, data FROM MyVideo WHERE id < 5;
## Development
1. Install git hooks in your .git/ directory. [optional, but recommended]
```shell
conda activate eva
pre-commit install
- Ensure that all the unit test cases (including the ones you have added) run succesfully and the coding style conventions are followed.
bash script/test/test.sh
-
If your workstation has a GPU, you need to first set it up and configure it. You can run the following command first to check your hardware capabilities.
ubuntu-drivers devices
If you do have an NVIDIA GPU, and its not been configured yet, follow all the steps in this link carefully.
https://towardsdatascience.com/deep-learning-gpu-installation-on-ubuntu-18-4-9b12230a1d31
.Some pointers:
- When installing NVIDIA drivers, check the correct driver version for your GPU to avoid compatibiility issues.
- When installing cuDNN, you will have to create an account. Make sure you get the correct deb files for your OS and architecture.
-
You can run the following code in a jupyter instance to verify your GPU is working well along with PyTorch.
import torch device = torch.device('cuda:0' if torch.cuda.is_available() else 'cpu') print(device)
Output of
cuda:0
indicates the presence of a GPU. (Note: 0 indicates the index of the GPU in system. Incase you have multiple GPUs, the index needs to be accordingly changed) -
Now configure the
executor
section ineva.yml
as follows:gpus: {'127.0.1.1': [0]}
127.0.1.1
is the loopback address on which the eva server is started. 0 refers to the GPU index to be used.
-
Open a terminal instance and start the server:
python eva.py
-
Open another terminal instance. Start a jupyter lab/notebook instance, and navigate to
tutorials/object_detection.ipynb
-
You might have to install ipywidgets to visualize the input video and output. Follow steps in
https://ipywidgets.readthedocs.io/en/latest/user_install.html
as per your jupyter environment. -
Run each cell one by one. Each cell is self-explanatory. If everything has been configured correctly you should be able to see a ipywidgets Video instance with the bounding boxes output of the executed query.
EVA consists of four core components:
- EVAQL Query Parser
- Query Optimizer
- Query Execution Engine (Filters + Deep Learning Models)
- Distributed Storage Engine
To file a bug or request a feature, please file a GitHub issue. Pull requests are welcome.