{"id":51668582,"url":"https://github.com/mlexpertio/ml-project-template","last_synced_at":"2026-07-14T22:04:02.931Z","repository":{"id":269929973,"uuid":"908766496","full_name":"mlexpertio/ml-project-template","owner":"mlexpertio","description":"Starter template for your ML/AI projects (uv package manager, RestAPI with FastAPI and Dockerfile support)","archived":false,"fork":false,"pushed_at":"2025-01-13T18:38:39.000Z","size":149,"stargazers_count":6,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-13T19:37:30.691Z","etag":null,"topics":["ai-template","docker","fastapi","machine-learning","ml-template","ruff","uv","uvicorn"],"latest_commit_sha":null,"homepage":"https://mlexpert.io","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mlexpertio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-26T23:09:55.000Z","updated_at":"2025-01-13T18:38:42.000Z","dependencies_parsed_at":"2024-12-27T08:41:40.512Z","dependency_job_id":null,"html_url":"https://github.com/mlexpertio/ml-project-template","commit_stats":null,"previous_names":["mlexpertio/ml-project-template"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mlexpertio/ml-project-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlexpertio%2Fml-project-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlexpertio%2Fml-project-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlexpertio%2Fml-project-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlexpertio%2Fml-project-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mlexpertio","download_url":"https://codeload.github.com/mlexpertio/ml-project-template/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlexpertio%2Fml-project-template/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35480626,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-14T02:00:06.603Z","response_time":114,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai-template","docker","fastapi","machine-learning","ml-template","ruff","uv","uvicorn"],"created_at":"2026-07-14T22:04:00.426Z","updated_at":"2026-07-14T22:04:02.926Z","avatar_url":"https://github.com/mlexpertio.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ML Project Template\n\nStarter template for your Machine Learning/AI projects.\n\nFeatures:\n\n- [`dvc`](https://dvc.org/) for data versioning and pipeline management (reproducibility)\n- [`FastAPI`](https://fastapi.tiangolo.com/) for serving the model\n- [`uv`](https://docs.astral.sh/uv/) package manager\n- [`ruff`](https://docs.astral.sh/ruff/) for linting and formatting\n- [`pytest`](https://docs.pytest.org/en/stable/) for testing\n- [`loguru`](https://loguru.readthedocs.io/en/stable/) for logging\n- [`Docker`](https://www.docker.com/) for containerization\n\n\n## Install\n\nMake sure you have [`uv` installed](https://docs.astral.sh/uv/getting-started/installation/).\n\nClone the repository:\n\n```bash\ngit clone git@github.com:mlexpertio/ml-project-template.git .\ncd ml-project-template\n```\n\nInstall Python:\n\n```bash\nuv python install 3.12.8\n```\n\nCreate and activate a virtual environment:\n\n```bash\nuv venv\nsource .venv/bin/activate\n```\n\nInstall dependencies:\n\n```bash\nuv sync\n```\n\nInstall package in editable mode:\n\n```bash\nuv pip install -e .\n```\n\nInstall pre-commit hooks:\n\n```bash\nuv run pre-commit install\n```\n\n## Reproduce\n\nThe project contains three different stages defined in `dvc.yaml`.\n\n- Create a dataset from the raw data:\n\n```bash\nuv run dvc repro build-dataset\n```\n\n- Train a model using the dataset:\n\n```bash\nuv run dvc repro train-model\n```\n\n- Evaluate the model using the test dataset:\n\n```bash\nuv run dvc repro evaluate\n```\n\n## API server\n\nStart the FastAPI server:\n\n```bash\nuv run python app.py\n```\n\nTest the API:\n\n```bash\ncurl -X POST \"http://localhost:8000/predict\" \\\n     -H \"Content-Type: application/json\" \\\n     -d '{\"text\": \"lets launch now\"}'\n```\n\n## Tests\n\n```bash\nuv run pytest\n```\n\n## Docker\n\nThe template includes a `Dockerfile` to build a Docker image:\n\n```bash\ndocker build -t prophet:latest .\n```\n\nRun the Docker container:\n\n```bash\ndocker run -d -p 8000:8000 --name prophet prophet:latest\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmlexpertio%2Fml-project-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmlexpertio%2Fml-project-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmlexpertio%2Fml-project-template/lists"}