Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 66 additions & 11 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,43 +1,98 @@
# Escludi file di sistema e cache Python
# ==============================================================================
# Docker Build Context Exclusions - LegalAIze
# ==============================================================================
# Files and directories excluded from Docker build context to reduce image size
# and prevent sensitive data from being included in containers.
# ==============================================================================

# ------------------------------------------------------------------------------
# Python Runtime & Cache
# ------------------------------------------------------------------------------
__pycache__/
*.py[cod]
*$py.class
*.so
.Python

# Virtual Environments
env/
venv/
ENV/
.venv
backend_venv/
frontend_venv/

# Escludi file IDE
# ------------------------------------------------------------------------------
# Development Tools & IDEs
# ------------------------------------------------------------------------------
.vscode/
.idea/
*.swp
*.swo
*.swn

# Escludi file OS
# ------------------------------------------------------------------------------
# OS-Specific Files
# ------------------------------------------------------------------------------
.DS_Store
Thumbs.db
desktop.ini

# SECURITY: EXCLUDE KEYS AND SECRETS
# ------------------------------------------------------------------------------
# Security & Credentials (NEVER include in images)
# ------------------------------------------------------------------------------
.env
dagshub_token.txt
*.log
*.pem
*.key
*.crt
secrets/

# Exclude data, models, output, DVC, git, etc.
# ------------------------------------------------------------------------------
# Data & Model Artifacts (too large for container images)
# ------------------------------------------------------------------------------
data/
models/
mlruns/
mlartifacts/
.dvc/
metrics/
output/
tmp/
logs/

# ------------------------------------------------------------------------------
# Version Control & Experiment Tracking
# ------------------------------------------------------------------------------
.git/
.dvc/
*.dvc
.gitignore
.dockerignore

# ------------------------------------------------------------------------------
# Archives & Large Files
# ------------------------------------------------------------------------------
*.gz
*.zip
*.tar
*.tar.gz
*.rar
*.7z

# ------------------------------------------------------------------------------
# Jupyter Notebooks & Documentation
# ------------------------------------------------------------------------------
*.ipynb
output/
tmp/
logs/
notebooks/
notebooks/
docs/
*.md
!README.md

# ------------------------------------------------------------------------------
# Test & CI/CD
# ------------------------------------------------------------------------------
tests/
.pytest_cache/
.coverage
htmlcov/
.github/
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# MLflow/DagsHub Configuration Examples

# Use one of the following configurations for MLflow tracking.
# Use ONLY ONE of the following configurations for MLflow tracking.

# 1. Local MLflow tracking (recommended for most users)
MLFLOW_TRACKING_URI=http://localhost:5000
Expand Down
4 changes: 0 additions & 4 deletions .github/scripts/check_and_issue.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,15 @@
# List of actually used metrics in rag_eval.json
metric_keys = [
"weighted_mae_score",
"mean_groundedness_score",
"mean_faithfulness_score",
"mean_note_similarity",
"ragas_correctness",
"ragas_answer_relevancy"
]

# Default thresholds (add more if needed)
default_thresholds = {
"weighted_mae_score": ("max", float(os.getenv("THRESHOLD_MAE", "1.0"))),
"mean_groundedness_score": ("min", float(os.getenv("THRESHOLD_GROUNDEDNESS", "0.5"))),
"mean_faithfulness_score": ("min", float(os.getenv("THRESHOLD_FAITHFULNESS", "0.5"))),
"mean_note_similarity": ("min", float(os.getenv("THRESHOLD_NOTE_SIMILARITY", "0.35"))),
"ragas_correctness": ("min", 0.5),
"ragas_answer_relevancy": ("min", 0.5)
# You can add more custom thresholds here
Expand Down
133 changes: 104 additions & 29 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,62 +1,137 @@
# Python
# ==============================================================================
# LegalAIze - Git Ignore Rules
# ==============================================================================
# Files and directories excluded from version control to keep the repository
# clean, secure, and focused on source code.
# ==============================================================================

# ------------------------------------------------------------------------------
# Python Runtime & Cache
# ------------------------------------------------------------------------------
__pycache__/
*.py[cod]
*$py.class
*.so
*.pyo
*.pyd
.Python
*.egg
*.egg-info/
dist/
build/

# Virtual Environments
env/
venv/
backend/backend_venv/
frontend/frontend_venv/
ENV/
.venv
backend/backend_venv/
frontend/frontend_venv/

# Jupyter Notebooks
.ipynb_checkpoints/
*.ipynb

# MLflow
# ------------------------------------------------------------------------------
# Machine Learning & Experiment Tracking
# ------------------------------------------------------------------------------
# MLflow experiment tracking
mlruns/
mlartifacts/

# DVC
/data/*.csv
/data/*.pdf
# Model artifacts (too large for git)
/models/*.pkl
/models/*.h5
/models/*.pth
/models/*.joblib

# Metrics and evaluation outputs
metrics/**
!metrics/.gitkeep

# ------------------------------------------------------------------------------
# Data Version Control (DVC)
# ------------------------------------------------------------------------------
.dvc/config.local
.dvc/tmp

/models/*.pkl
.dvc/cache

# DVC-tracked large files (tracked via .dvc files instead)
/data/*.csv
/data/*.pdf
data/qdrant_storage/
data/processed/*
data/debug/*
data/ground_truth/raw_data/**
data/unused/**
data/raw_data/*.pdf
data/raw_data/*.html

# Data mapping (generated, not source)
data/mapping.json

# IDE
# ------------------------------------------------------------------------------
# Development Tools & IDEs
# ------------------------------------------------------------------------------
.vscode/
.idea/
*.swp
*.swo
*.swn
.project
.pydevproject
.settings/

# OS
# ------------------------------------------------------------------------------
# Operating System Files
# ------------------------------------------------------------------------------
.DS_Store
Thumbs.db
desktop.ini
*.bak
*~

# Environment variables
# ------------------------------------------------------------------------------
# Security & Credentials (NEVER commit!)
# ------------------------------------------------------------------------------
.env
*.key
*.pem
*.crt
dagshub_token.txt
secrets/

# Docker
# ------------------------------------------------------------------------------
# Logs & Temporary Files
# ------------------------------------------------------------------------------
*.log
*.tmp
tmp/
logs/
*.pid

# Token
dagshub_token.txt

backend/debug_responses/
# Docker logs
docker-compose.override.yml

# Data
data/mapping.json
data/qdrant_storage/
data/ground_truth/raw_data/**
data/unused/**
data/raw_data/*.pdf
data/raw_data/*.html
data/processed/*
data/debug/*
# ------------------------------------------------------------------------------
# Testing & Coverage
# ------------------------------------------------------------------------------
.pytest_cache/
.coverage
htmlcov/
.tox/
.nox/

# ------------------------------------------------------------------------------
# Application-Specific
# ------------------------------------------------------------------------------
backend/debug_responses/

# Metrics
metrics/**
metrics/ragas_records.json
# ------------------------------------------------------------------------------
# Archives (typically not source code)
# ------------------------------------------------------------------------------
*.zip
*.tar
*.tar.gz
*.rar
*.7z
Loading