KeivanR commited on
Commit
22054c0
·
1 Parent(s): 9544219

numpy issue debugging

Browse files
Files changed (4) hide show
  1. Dockerfile +0 -1
  2. app.py +2 -0
  3. qwen_classifier/evaluate.py +1 -1
  4. requirements.txt +1 -0
Dockerfile CHANGED
@@ -22,7 +22,6 @@ COPY app.py .
22
  COPY qwen_classifier/ ./qwen_classifier/
23
  COPY setup.py .
24
  RUN pip install --no-cache-dir -r requirements.txt
25
- RUN pip install --no-cache-dir numpy
26
 
27
  # Install PyTorch with CUDA support
28
  RUN pip install --no-cache-dir \
 
22
  COPY qwen_classifier/ ./qwen_classifier/
23
  COPY setup.py .
24
  RUN pip install --no-cache-dir -r requirements.txt
 
25
 
26
  # Install PyTorch with CUDA support
27
  RUN pip install --no-cache-dir \
app.py CHANGED
@@ -6,6 +6,7 @@ os.makedirs(os.environ['HF_HOME'], exist_ok=True) # Ensure directory exists
6
  from fastapi import FastAPI
7
  from fastapi.responses import HTMLResponse
8
  import torch
 
9
  from transformers import AutoTokenizer
10
  from huggingface_hub import login
11
  from pydantic import BaseModel
@@ -18,6 +19,7 @@ from qwen_classifier.globals import global_model, global_tokenizer
18
  from qwen_classifier.model import QwenClassifier
19
  from qwen_classifier.config import HF_REPO, DEVICE
20
 
 
21
 
22
  app = FastAPI(title="Qwen Classifier")
23
  hf_repo = os.getenv("HF_REPO")
 
6
  from fastapi import FastAPI
7
  from fastapi.responses import HTMLResponse
8
  import torch
9
+ import numpy
10
  from transformers import AutoTokenizer
11
  from huggingface_hub import login
12
  from pydantic import BaseModel
 
19
  from qwen_classifier.model import QwenClassifier
20
  from qwen_classifier.config import HF_REPO, DEVICE
21
 
22
+ print(numpy.__version__)
23
 
24
  app = FastAPI(title="Qwen Classifier")
25
  hf_repo = os.getenv("HF_REPO")
qwen_classifier/evaluate.py CHANGED
@@ -15,7 +15,7 @@ from pathlib import Path
15
  from .config import TAG_NAMES, DEVICE, SPACE_URL, EVAL_LIMIT
16
  from .globals import global_model, global_tokenizer
17
 
18
-
19
 
20
  def _load_data(test_data_path):
21
  eval_limit = os.getenv("EVAL_LIM")
 
15
  from .config import TAG_NAMES, DEVICE, SPACE_URL, EVAL_LIMIT
16
  from .globals import global_model, global_tokenizer
17
 
18
+ print(np.__version__)
19
 
20
  def _load_data(test_data_path):
21
  eval_limit = os.getenv("EVAL_LIM")
requirements.txt CHANGED
@@ -1,5 +1,6 @@
1
  # Core requirements from setup.py
2
  torch>=2.1.0
 
3
  transformers>=4.36.0
4
  click>=8.1.0
5
  scikit-learn>=1.3.0
 
1
  # Core requirements from setup.py
2
  torch>=2.1.0
3
+ numpy==1.23.5
4
  transformers>=4.36.0
5
  click>=8.1.0
6
  scikit-learn>=1.3.0