Skip to content

chore(medcat-trainer): Enable livereloading in dev#362

Merged
alhendrickson merged 1 commit intomainfrom
chore/medcat-trainer/enable-dev-livereload
Mar 9, 2026
Merged

chore(medcat-trainer): Enable livereloading in dev#362
alhendrickson merged 1 commit intomainfrom
chore/medcat-trainer/enable-dev-livereload

Conversation

@alhendrickson
Copy link
Collaborator

What does this do

Adds livereload to the dev docker compose, if an env var is set.

  • Run with docker compose -f docker-compose-dev.yml up -d
  • Edit a py file
  • Trainer restarts the backend API
2026-03-09 11:15:07.461 | [medcattrainer] /home/api/api/views.py changed, reloading.
2026-03-09 11:15:07.461 | [medcattrainer] INFO 2026-03-09 11:15:07,460 autoreload.py l:265:/home/api/api/views.py changed, reloading.
2026-03-09 11:15:07.461 | [medcattrainer] Performing system checks...
2026-03-09 11:15:07.461 | [medcattrainer] 
2026-03-09 11:15:07.461 | [medcattrainer] System check identified no issues (0 silenced).
2026-03-09 11:15:07.461 | [medcattrainer] March 09, 2026 - 11:14:26
2026-03-09 11:15:07.461 | [medcattrainer] Django version 5.2.11, using settings 'core.settings'
2026-03-09 11:15:07.461 | [medcattrainer] Starting development server at http://0.0.0.0:8000/
2026-03-09 11:15:07.462 | [medcattrainer] Quit the server with CONTROL-C.
2026-03-09 11:15:07.462 | [medcattrainer] 
2026-03-09 11:15:07.462 | [medcattrainer] WARNING: This is a development server. Do not use it in a production setting. Use a production WSGI or ASGI server instead.
2026-03-09 11:15:07.462 | [medcattrainer] For more information on production servers see: https://docs.djangoproject.com/en/5.2/howto/deployment/
2026-03-09 11:15:14.955 | [medcattrainer] INFO 2026-03-09 11:15:14,954 config.py l:59:PyTorch version 2.10.0+cpu available.
2026-03-09 11:15:15.349 | [medcattrainer] INFO 2026-03-09 11:15:15,349 apps.py l:35:MedCATTrainer App API ready...

Discussion

Looks like this was handled by a .vscode launch config before - would be great to write up some local dev instructions for frontend/backend.

Copy link
Collaborator

@mart-r mart-r left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

@alhendrickson alhendrickson merged commit 0d754b7 into main Mar 9, 2026
10 checks passed
@alhendrickson alhendrickson deleted the chore/medcat-trainer/enable-dev-livereload branch March 9, 2026 11:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants