File size: 2,155 Bytes
4655dd2 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | # Contributing to Safetensors Studio & Bench
Thank you for considering contributing! This project is **open-source (MIT)** and welcomes developers and ML engineers.
## Code of Conduct
Please read and follow our [CODE_OF_CONDUCT.md](./CODE_OF_CONDUCT.md).
## How to Contribute
### 1. Setup Development Environment
```bash
git clone https://github.com/your-org/safetensors-studio.git
cd safetensors-studio
# Backend
cd backend && pip install -r requirements.txt && uvicorn app.main:app --reload
# Frontend
cd ../frontend && npm install && npm run dev
```
### 2. Branching
- `main` is protected. Create a feature branch: `git checkout -b feat/your-feature`
- Follow conventional commits: `feat:`, `fix:`, `docs:`, `perf:`
### 3. Areas to Contribute
- **New Benchmark Suites:** Add tasks to `backend/app/benchmark.py:14` (keep `id, name, category, prompt, expected, expected_regex, max_tokens`)
- **Languages:** Extend `SUPPORTED_LANGUAGES.md` and `dataset_parser.py:detect_language()`
- **Quant Backends:** `model_manager.py:26` (e.g., AWQ, GPTQ)
- **Frontend:** `frontend/src/components/**` (Tailwind + Shadcn)
- **Docs:** `docs/` in English (required)
### 4. Pull Request Checklist
- [ ] `npm run build` passes
- [ ] `python -m py_compile backend/app/**/*.py` passes
- [ ] Added/updated docs in English
- [ ] Tested `POST /api/model/validate` and `POST /api/benchmark/run-stream`
- [ ] No secrets committed (check `.env.local` not included)
- [ ] Updated `README.md` if adding user-facing feature
### 5. Reporting Issues
Use GitHub Issues with template:
- **Bug:** steps, expected vs actual, `uvicorn.log`, `http://localhost:8000/docs` screenshot
- **Feature:** use case, proposed API, UI mock
### 6. Hugging Face Collaboration
- For model/dataset cards, see `docs/HUGGINGFACE.md`
- Tag PRs with `hf` if related to HF Hub integration
### 7. Review Process
- Maintainers review within 3 days
- CI must pass (build + lint)
- Squash-merge to `main`
## Developer Certificate of Origin
By contributing, you agree that your contributions will be licensed under MIT.
## Questions?
Open a Discussion or contact maintainers via GitHub.
Happy building!
|