singhsourabh / Resume-NER

Applying BERT for named entity recognition on resumes.
MIT License
61 stars 25 forks source link

Unable to install numpy==1.18.4 #10

Open skprasadu opened 1 year ago

skprasadu commented 1 year ago

I cloned this repo and checkout "dependabot/pip/transformers-4.30.0" branch and when I ran,


pip install -r requirements.txt, I get below error, do i need to do anything else.

Collecting numpy==1.18.4
  Using cached numpy-1.18.4.zip (5.4 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [58 lines of output]

Any help will be greatly appreciated.

skprasadu commented 1 year ago

I am running this in CPU on my laptop. Do we need any higher configuration. I tried this both on windows and linux configuration.

kevinpaul468 commented 1 year ago

i got a different error regarding numpy i installed cython3 and that was fixed i got a new error

ERROR: Could not find a version that satisfies the requirement torch==1.5.1 (from versions: 1.11.0, 1.12.0, 1.12.1, 1.13.0, 1.13.1, 2.0.0, 2.0.1)
ERROR: No matching distribution found for torch==1.5.1

im running it in mint os -v 21

are u using a virtual environment?

skprasadu commented 1 year ago

Did you use apt-get or pip to install cython3?

kevinpaul468 commented 1 year ago

fck i cleared my terminal i typed cython3 to see if that exists and i was prompted with do this to install cython i think i dit it with apt but not sure if i used sudo

Screenshot from 2023-07-26 11-15-39 idk what torch is but it looks like there is no documentation for 1.5.1 will using a later version dot do the thing ? //new to these kind of projects ,dont even know what functions are used where in this

kevinpaul468 commented 1 year ago

the requirements are completely wrong for all of them altough i was able to download them they are not recognised untill they are of latest version im getting runtime errors now

skprasadu commented 1 year ago

Same with me, when I go latest, I get Runtime error as below



Epoch:   0%|                                                                                     | 0/5 [00:00<?, ?it/s]
Traceback (most recent call last):
  File "C:\my-applications\python\Resume-NER\train.py", line 45, in <module>
    train_and_val_model(

...

  File "C:\Users\prask\AppData\Roaming\Python\Python311\site-packages\torch\utils\data\_utils\collate.py", line 138, in collate
    raise RuntimeError('each element in list of batch should be of equal size')
RuntimeError: each element in list of batch should be of equal size
``
kevinpaul468 commented 1 year ago

i got the same error and when i tied to run app.py

Traceback (most recent call last):
  File "/home/kevin/Desktop/Resume-NER/app.py", line 15, in <module>
    STATE_DICT = torch.load("model-state.bin", map_location=DEVICE)
  File "/home/kevin/.local/lib/python3.10/site-packages/torch/serialization.py", line 791, in load
    with _open_file_like(f, 'rb') as opened_file:
  File "/home/kevin/.local/lib/python3.10/site-packages/torch/serialization.py", line 271, in _open_file_like
    return _open_file(name_or_buffer, mode)
  File "/home/kevin/.local/lib/python3.10/site-packages/torch/serialization.py", line 252, in __init__
    super().__init__(open(name, mode))
FileNotFoundError: [Errno 2] No such file or directory: 'model-state.bin'
Merieme-elg commented 1 year ago

Hello, I'm also dealing with the same problem, have you found any solution ?