Repository navigation
docs: add verified steps to run training backend locally without AWS - #12
Conversation
Document a verified local run of the Django + Celery + Redis training backend without AWS credentials, plus the two fixes needed on a fresh checkout: - Pin pytorch=2.5.1 / torchvision=0.20.1 in environment.yml (unpinned deps resolve to a build incompatible with Python 3.9: import torch -> ImportError 'TypeIs'). - Fix training Dockerfiles so README.md is available before poetry install. Tested: /api/test -> 200, redis ping -> PONG, pytest 17 passed / 1 failed (CALIFORNIA_HOUSING failure is an environment permission gap, not a pipeline bug).
| - poetry | ||
| - pytorch | ||
| - torchvision No newline at end of file | ||
| - pytorch=2.5.1 |
There was a problem hiding this comment.
thought for a followup issue (might not be the most urgent thing):
when i originally created DLP, I used an environment.yml setup to make compatible for mamba, but now that uv has been around for a while and the package manager is faster + simpler to use, have we considered taking a followup to use uv for the environment config
There was a problem hiding this comment.
sorry for the late response. Yes, this is something we can implement to make package installation faster.
There was a problem hiding this comment.
sounds good. @Comment-XD can you create a followup issue for that
…kend-locally-without-the-aws-account # Conflicts: # .github/Architecture.md
alessiopagliarulo
left a comment
There was a problem hiding this comment.
Thanks Branden! Verified: all checks pass after updating with the latest nextjs (including the backend tests with your pytorch 2.5.1 pin). Merging.
#6 Run the training backend locally without AWS
Github Issue Number Here: #6
What user problem are we solving?
New contributors can't bring the training backend up on a fresh checkout without an AWS account, and the setup steps aren't written down. On top of that, two issues block a clean local run:
pytorch/torchvisioninenvironment.ymlresolve to a build incompatible with Python 3.9 —import torchfails withImportError: cannot import name 'TypeIs'.poetry installbeforeREADME.mdis present, so the build fails.What solution does this PR provide?
pytorch=2.5.1/torchvision=0.20.1intraining/environment.ymlso the environment resolves against Python 3.9.training/Dockerfileandtraining/training/core/celery/Dockerfile) soREADME.mdis copied in beforepoetry install.Testing Methodology
Brought the backend up locally (Django + Celery + Redis, no AWS) and verified:
GET /api/test→200ping→PONGpytest→ 17 passed / 1 failed. The single failure (CALIFORNIA_HOUSING) is an environment permission gap in the local setup, not a regression in the pipeline.Any other considerations
The
CALIFORNIA_HOUSINGtest failure is a local environment permission issue rather than a code bug; flagging it so reviewers don't treat it as a regression.Note
Low Risk
Documentation and local Docker/conda build fixes; PyTorch pin narrows dependency resolution but targets known Python 3.9 compatibility.
Overview
Adds a verified no-AWS path for bringing up Django, Celery, and Redis via
docker compose up --build, including curl/Redis/pytest checks and notes that fullPOST /api/tabularstill needs AWS for Firebase and S3.Fixes two blockers called out in the docs:
pytorch=2.5.1/torchvision=0.20.1inenvironment.ymlso conda resolves a Python 3.9–compatible stack (unpinned builds broke onTypeIs), and both training Dockerfiles now copyREADME.mdbeforepoetry install(required bypyproject.toml) and usepoetry install --no-rootin the development target.Reviewed by Cursor Bugbot for commit 155695b. Bugbot is set up for automated code reviews on this repo. Configure here.