AOSSIE-Org / AOSSIE-Org/EduAid

Bugs in the backend/server.py and script.sh

Đang mở
#212 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
JavaScript
Star
171
Fork
425
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

### `script.sh` and `server.py` discrepancies

There are some serious issues in the backend...

**The Issue:**

1. _`script.sh`_

> the script does not do what is expected of it in `README.md` ... this is done by https://github.com/SnehaChaursia in #188 but ill still add the PR anyway

2. `server.py`

>Many of the libraries that it imports have some dependency modules that are deprecated. Reason for this maybe because they're too old to be maintained, or have been removed by the maintainers, or just renamed to something else.

> When you try to import `similarity` library _(like in `backend/server.py` and `backend/Generator/main.py` )_ ... you get an import error...
**reason:** the `jaro_winkler` module from library `jellyfish` doesnt exist anymore..
its been renamed to `jaro_winkler_similarity`

![Image](https://github.com/user-attachments/assets/34393872-768c-444b-8fb9-cc4773ec244e)

> In some computers with limited GPU, the issue occurred because the `server.py` script attempted to load a large model on a GPU with insufficient VRAM (1.96GB), causing a CUDA Out of Memory error

![Image](https://github.com/user-attachments/assets/f45a9927-29cb-4fc0-806a-a0d9c8b1ac7e)

**What I propose:**

- [x] Replace every instance of `jors_winkler` to `jors_winkler_similarity`

- [x] Force use CPU instead of GPU if insufficient VRAM is present
- [x] before running `server.py` , set the environment variable `os.environ["PYTORCH_CUDA_ALLOC_CONF"] = "expandable_segments:True"`

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.