Standalone Deep Learning homework grading package with safe local parsing, rule-based scoring, and optional AI feedback refinement.
Project description
DLMentor
Standalone Deep Learning homework grading package with local-first analysis and deterministic rule-based scoring.
Why DLMentor
DLMentor is designed as its own product/package identity for grading DL submissions safely:
- static inspection only (no execution of untrusted student code)
- safe ZIP intake with limits and traversal protection
- normalized metadata output for automation
- structured rule-based scoring (0-100)
- optional Gemini feedback refinement that does not change core scoring
Installation
pip install DLMentor
Local development install:
pip install -e .
Quick Start
from DLMentor import DLMentor
mentor = DLMentor(api_key=None)
result = mentor.evaluate_dl(answer_path="path/to/submission.zip")
print(result["score"])
print(result["feedback"])
print(result["checks"])
Lesson-context usage:
from DLMentor import DLMentor
mentor = DLMentor(api_key=None)
result = mentor.evaluate_dl_lesson(
lesson_path="qa_fixtures/dl/lesson-01/submissions/correct_notebook.ipynb",
questions=open("qa_fixtures/dl/lesson-01/questions.md", "r", encoding="utf-8").read(),
)
print(result["score"])
DL Input Support
Supported submission formats:
.zip.ipynb.py.json.csv.txt- folder paths containing mixed project files
Recommended submission structure:
submission/
notebook.ipynb or train.py
README.md
requirements.txt (or environment.yml / pyproject.toml)
metrics.json or metrics.csv
model.pt / model.keras / model.onnx
DL Grading Workflow
- Validate input path/file type
- Safely extract ZIPs with hard limits
- Parse notebooks/scripts/metrics locally
- Build normalized metadata schema
- Run rule-based checks:
- valid structure
- model definition
- training logic
- dataset loading
- evaluation/metrics
- reproducibility artifacts
- Optionally refine feedback with Gemini
What DLMentor Does Not Do
- Does not execute notebooks/scripts
- Does not run model training/inference jobs
- Does not install/run student dependencies
- Does not replace rule-based score with AI output
Offline DL Testing Suite
Regenerate deterministic fixtures:
python tools/generate_dl_fixtures.py
Run all offline DL tests:
pytest -m dl_offline qa_tests -q
Run fixture-only suite:
pytest qa_tests/test_dl_fixtures.py -q
Run local smoke test:
python tools/dl_smoke_test.py
Build & Publish Prep
Build distribution artifacts:
python -m build
Validate install flows:
pip install .
pip install -e .
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dlmentor-1.1.0.tar.gz.
File metadata
- Download URL: dlmentor-1.1.0.tar.gz
- Upload date:
- Size: 15.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6d1663abefab432e97c19496d0e8cb5d39efdd9af1e7b1e4e60bf38f6b73ecdb
|
|
| MD5 |
e6398d261403b72090747861a5c08867
|
|
| BLAKE2b-256 |
7357382e012e3193d5bda519cabab5d2fef2d149399f0ecd939111155d341be0
|
File details
Details for the file dlmentor-1.1.0-py3-none-any.whl.
File metadata
- Download URL: dlmentor-1.1.0-py3-none-any.whl
- Upload date:
- Size: 17.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9c7c29219dd39a4ce3db73a56f3ae404b1bbd9efe2696ba747758a9b99de4c9d
|
|
| MD5 |
a5235c0df5ba5c6fe3524d254e2c63e6
|
|
| BLAKE2b-256 |
12123a062ee59458381379d168e1e642f703a1ce25a438caaa28201b460835c3
|