Spaces:
Sleeping
Sleeping
Commit History
-
Upload folder using huggingface_hub
Verified signaturee406ddb -
Upload folder using huggingface_hub
Verified signaturebe68e43 -
Upload folder using huggingface_hub
Verified signature74e067a -
Upload folder using huggingface_hub
Verified signature5b54e78
-
Upload folder using huggingface_hub
Verified signature9796e1e
-
Upload folder using huggingface_hub
Verified signature90b2c67
-
Upload folder using huggingface_hub
Verified signaturecf58242 -
Upload folder using huggingface_hub
Verified signature100ddbe
-
Merge pull request #12 from RaphaelRIVIERE/feature/ml-pipeline-refactor
Unverified signatureRefactor ML pipeline with preprocessing module and updated schema3282e01 -
chore: bump API version to 0.8.0
06065d7 -
chore: update sample predictions to align with new ML pipeline schema
fcec78d -
test: align test fixtures with string-based input schema
23dfad0 -
feat: update ML pipeline with preprocessing module and string-based inputs
- Replace integer-encoded fields (genre, heure_supplementaires, frequence_deplacement) with human-readable Literal/String types in schema and DB models - Add departement and niveau_hierarchique_poste fields to schema and DB models - Extract feature engineering from predict route into ml_model/preprocessing.py - Update best_pipeline.pkl to include preprocessing stepsf67b60a
-
Merge pull request #11 from RaphaelRIVIERE/dev
Unverified signatureAdd multi-environment CI/CD pipeline (dev + prod)0600b5d -
chore: bump API version to 0.7.0
4dd5069 -
Merge pull request #10 from RaphaelRIVIERE/feature/cicd-dev-env
Unverified signatureAdd dev branch trigger and separate prod/dev deploy jobsd4c32ad -
ci: add dev branch trigger and separate prod/dev deploy jobs
- Trigger CI/CD on push to `dev` branch in addition to `main` - Rename `deploy` job to `deploy-prod`, conditioned on `refs/heads/main` - Add `deploy-dev` job targeting `HF_SPACE_DEV` variable, conditioned on `refs/heads/dev` - Use `vars.HF_SPACE_PROD` variable instead of hardcoded HF space namedc0b0c3 -
Merge pull request #9 from RaphaelRIVIERE/feature/coverage
Unverified signatureComplete test suite and document coverage (95%)6c8ca01 -
docs(readme): add coverage badge and test results table
ec132eb -
test(db): add delete/integrity coverage
6bd73b3 -
docs: complete deployment section in README
a518025 -
Merge pull request #8 from RaphaelRIVIERE/feature/cicd
Unverified signaturefix: lazy-initialize DB engine in standalone scriptsc7f60c4 -
fix: lazy-initialize DB engine in standalone scripts
Replace direct imports of `engine` and `SessionLocal` from `app.db.session` with local instantiation via `get_database_url()` in create_db, insert_data, and query_db scripts. Prevents DB connection attempts at import time when environment variables are not yet loaded.e1edad9 -
Merge pull request #7 from RaphaelRIVIERE/feature/cicd
Unverified signatureAdd Hugging Face Space metadata to README9f3c5a6 -
docs: add Hugging Face Space metadata to README
Add YAML front matter with Space configuration (title, emoji, colors, SDK set to docker) required for Hugging Face deployment.ce1209c -
Merge pull request #6 from RaphaelRIVIERE/feature/cicd
Unverified signatureci: fetch full git history on checkout for HF deploymentcd2c45d -
ci: fetch full git history for Hugging Face deployment
Add fetch-depth: 0 to the checkout step to retrieve the complete git history, which required for proper deployment to Hugging Face.cf65e65 -
Merge pull request #5 from RaphaelRIVIERE/feature/cicd
Unverified signaturefix: resolve CI test failure due to DB engine import-time crash70df73c -
fix: lazy-initialize DB engine to prevent CI import crash
Move create_engine and SessionLocal inside get_db so the database connection is only created when actually needed. Fixes ImportError during pytest when DB environment variables are not set.36fe10e -
Merge pull request #4 from RaphaelRIVIERE/feature/cicd
Unverified signatureAdd CI/CD pipeline with GitHub Actions and Hugging Face deploymentd4b25ae -
chore: bump API version to 0.5.0
82af15e -
ci: add GitHub Actions workflow for CI/CD pipeline
Adds a CI/CD workflow triggered on push to main: - test job: installs dependencies and runs pytest - deploy job: pushes to Hugging Face Spaces after tests pass4fc7c95 -
feat: add Dockerfile and improve docker-compose configuration
- Add Dockerfile based on python:3.12-slim for containerizing the API - Add .dockerignore to exclude unnecessary files from build context - Switch postgres_data volume to named volume in docker-compose.yamldfe2f13
-
Merge pull request #3 from RaphaelRIVIERE/feature/database
Unverified signatureIntegrate PostgreSQL database layer with prediction logging826861f -
chore: bump API version to 0.4.0
77fb213 -
feat: log predictions to database after each inference
75c7c56 -
feat: add database query and prediction diagnostic script
Add scripts/query_db.py with utilities to inspect the database: - employee count and churn rate stats - preview of first N employees - on-demand ML prediction for a given employee id - logged prediction stats (count, latest entry)c12fb2b -
feat: add script to seed employee data from CSV into database
c7263fa -
feat: add PostgreSQL database layer with SQLAlchemy ORM
- Add Employee and Prediction SQLAlchemy models (app/db/models.py) - Add database session/engine configuration from env vars (app/db/session.py) - Add script to create database and tables if not exists (scripts/create_db.py) - Add docker-compose with PostgreSQL + pgAdmin services - Update .env.example with DB_* connection variables - Add psycopg2-binary, SQLAlchemy, greenlet to requirements.txt - Document database schema, UML diagram and column constraints in READMEa194bc8 -
Merge pull request #2 from RaphaelRIVIERE/feature/test
Unverified signatureAdd pytest test suite with 98% coveraged2d5ef4 -
chore: bump API version to 0.3.0
88f79b5 -
docs: add testing section to README
- Document pytest commands for running tests and coverage reports - Add table describing test file structure (conftest, test_api, test_model) - Remove placeholder tests/.gitkeep now that real test files exist6376e51 -
test: add model integration and threshold tests
63dacf7 -
test: add pytest suite for API endpoints
- Add tests for /health, /predict (valid, invalid data, missing auth) - Add conftest.py with mocked pipeline fixture and test payload - Add pytest.ini with pythonpath config - Add pytest and pytest-cov dependencies to requirements.txt36ee2f7 -
Merge pull request #1 from RaphaelRIVIERE/feature/api
Unverified signatureAdd REST API with HR churn prediction and authentication5289082 -
chore: bump API version to 0.2.0
b6e1abe
-
docs: complete README with usage guide and API documentation
- Improve API key validation: handle missing key with explicit 401 error message - Exclude data/ directory from version control via .gitignore59826c1 -
feat: secure endpoints with API key authentication
a9477b4 -
feat: add FastAPI REST API with HR churn prediction endpoint
- Create app/main.py with FastAPI app and lifespan model loading - Add Pydantic schemas for input validation (24 fields) and structured output (prediction, label, probabilite) - Implement /health, /model/info and /predict endpoints - Add ml_model/loader.py to load pipeline and custom threshold from pkl - Apply feature engineering before inference: derive stabilite_management, flag_surcharge_et_deplacement, ratio_promotion_anciennete, satisfaction_globale, satisfaction_min, log_revenu; drop 3 raw columns - Classify with custom threshold (predict_proba >= threshold) - Update requirements.txt with fastapi, uvicorn, scikit-learn, pandase59e621 -
feat: add serialized ML pipeline
4231e64