Skip to content

Commit

Permalink
slim container
Browse files Browse the repository at this point in the history
  • Loading branch information
dfusion-dev committed Dec 14, 2024
1 parent 3323d9a commit 3e602e4
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 101 deletions.
1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@ COPY . /app

# Install any needed packages specified in requirements.txt
RUN pip install --no-cache-dir -r requirements.txt
RUN python initialize_models.py

CMD ["python", "-m", "psl_proof"]
4 changes: 0 additions & 4 deletions initialize_models.py

This file was deleted.

5 changes: 1 addition & 4 deletions psl_proof/models/cargo_data.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from enum import Enum
from dataclasses import dataclass, field
from typing import Dict, List, Optional, Any
import numpy as np
import math
from typing import Union

Expand Down Expand Up @@ -215,9 +214,7 @@ def to_dict(self):

@staticmethod
def convert_to_serializable(obj: Any) -> Any:
if isinstance(obj, np.float32):
return float(obj) # Convert float32 to float
elif isinstance(obj, dict):
if isinstance(obj, dict):
return {k: CargoData.convert_to_serializable(v) for k, v in obj.items()} # Recursively handle dictionary values
elif isinstance(obj, list):
return [CargoData.convert_to_serializable(item) for item in obj] # Recursively handle list items
Expand Down
53 changes: 0 additions & 53 deletions psl_proof/utils/feature_extraction.py

This file was deleted.

11 changes: 1 addition & 10 deletions psl_proof/utils/validate_data.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from psl_proof.models.cargo_data import CargoData, ChatData, SourceChatData, SourceData
from psl_proof.models.proof_response import ProofResponse
from typing import List, Dict, Any
from psl_proof.utils.feature_extraction import get_sentiment_data, get_keywords_keybert #, get_keywords_lda
from psl_proof.utils.submission import get_historical_chats, ChatHistory, SubmissionChat


Expand Down Expand Up @@ -90,18 +89,10 @@ def validate_data(
#print(f"source_contents: {source_contents}")
# if chat data has meaningful data...
if quality > score_threshold and uniqueness > score_threshold:
chat_sentiment = get_sentiment_data(
source_contents
)
chat_keywords = get_keywords_keybert(
source_contents
)
# Create a ChatData instance and add it to the list
chat_data = ChatData(
chat_id=source_chat.chat_id,
chat_length=contents_length,
sentiment=chat_sentiment,
keywords=chat_keywords
chat_length=contents_length
)
#print(f"chat_data: {chat_data}")
cargo_data.chat_list.append(
Expand Down
29 changes: 0 additions & 29 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,41 +1,12 @@
--extra-index-url https://download.pytorch.org/whl/cpu
annotated-types==0.7.0
bitarray==3.0.0
certifi==2024.8.30
charset-normalizer==3.4.0
filelock==3.16.1
fsspec==2024.10.0
huggingface-hub==0.26.5
idna==3.10
Jinja2==3.1.4
joblib==1.4.2
keybert==0.8.5
markdown-it-py==3.0.0
MarkupSafe==3.0.2
mdurl==0.1.2
mpmath==1.3.0
networkx==3.4.2
numpy==2.2.0
packaging==24.2
pillow==11.0.0
pybloom_live==4.0.0
pydantic==2.10.3
pydantic_core==2.27.1
Pygments==2.18.0
PyYAML==6.0.2
regex==2024.11.6
requests==2.32.3
rich==13.9.4
safetensors==0.4.5
scikit-learn==1.6.0
scipy==1.14.1
sentence-transformers==3.3.1
sympy==1.13.1
threadpoolctl==3.5.0
tokenizers==0.21.0
torch==2.5.1+cpu
tqdm==4.67.1
transformers==4.47.0
typing_extensions==4.12.2
urllib3==2.2.3
xxhash==3.5.0

0 comments on commit 3e602e4

Please sign in to comment.