Summary - Today’s changes (what I did)
- Added:
logging_config.py- centralized logging; defaults toLOG_LEVEL=WARNING, writes full DEBUG toapp.debug.log, mutes noisy libs and makes HTTP logs visible only in debug. - Updated:
train.py- callconfigure_logging()early (before HF imports); fallback if missing; promoted key progress messages (epoch summaries, new-best, trial lines, tuning/complete summaries) from INFO → WARNING so they show on default terminal. - Updated:
run.ps1- added--debugflag; sets/passesLOG_LEVEL=DEBUGto enable HTTP/debug logs for local and HF jobs; prints log-level in summary. - Updated:
PS1_USAGE.md- reordered examples (tune → train (no predict) → train + predict) and documented--debugwith usage rationale.
Rationale
- Reduce noisy HTTP/third-party INFO logs in normal runs while preserving full debug traces to a file.
- Ensure important progress (epochs, new bests, tuning results) is visible by default.
- Provide a simple flag (
--debug) to enable verbose output when troubleshooting.
Current behavior / status
- Normal runs show WARNING+ only (clean terminal) while key progress summaries remain visible.
- Debug runs (
--debugorLOG_LEVEL=DEBUG) show full HTTP/request logs and INFO/DEBUG output. - Jobs executed successfully (package installs, dataset downloads, and training split generation). The repeated “No files have been modified since last commit” messages are benign HF uploader info.
How to run
Quiet (default):
.\\run.ps1 train.py train --local # Local
.\\run.ps1 train.py train # HF job
Debug (show HTTP + verbose):
.\\run.ps1 train.py train --local --debug
.\\run.ps1 train.py train --debug
Inspect persisted debug file:
Get-Content app.debug.log -Tail 200
Potential next improvements (pick one)
- Suppress HF uploader messages by redirecting
hfstdout/stderr inrun.ps1. - Make other in-code warnings (e.g., “Clearing train directory”) conditional on debug, or change to INFO.
- Upload
app.debug.logas a job artifact so logs are always downloadable independent ofhf jobs logs.
Daily Work Report - 2026-03-09
Goal
Migrate frontend to SvelteKit and get full stack (SvelteKit + FastAPI) running; debug UX issues and dataset problems.
What I implemented
- Scaffold & app files: Created SvelteKit frontend scaffold and app shell (configs, build):
package.json,svelte.config.js,vite.config.ts,tsconfig.json,src/app.html. - Frontend features: Implemented stores, API client, utilities, components and routes (major files under
src/libandsrc/routes), including the main page and maintenance page. - Docker / compose: Added
Dockerfileand updateddocker-compose.ymlto point at the SvelteKit frontend. - Build & deps: Resolved npm peer conflicts, installed deps, ran
npx svelte-kit syncandnpm run build- production build succeeded (client + server bundles produced). - .gitignore: Created
.gitignoreto exclude build artifacts andnode_modules.
Issues found & resolved
- Dataset images unreadable: Backend logged repeated PIL errors “cannot identify image file …”. Validator confirmed files under
anana-dataset/faceswere Git LFS pointer files, not binaries. Action: rungit lfs pull(or installgit-lfs) - images are now valid. - Tooltip UX bug: Hovered image always appeared at bottom-left.
- Diagnosis: tooltip was statically positioned;
ScatterPlotpassed only data-space coords. - Fix: added
screenX/screenYtoTooltipDataand updated:src/lib/types/index.tssrc/lib/components/ScatterPlot.sveltesrc/lib/components/PointTooltip.svelte
- Result: tooltip follows cursor and flips to stay onscreen.
- Diagnosis: tooltip was statically positioned;
- Toolbar alignment: Moved bottom-left buttons to centered bottom by editing
src/routes/+page.svelteCSS (.toolbarand.dirty-indicator).
Commands I ran
Project build and checks:
npm install
npx svelte-kit sync
npm run build
Backend run / diagnostics:
python start_server.py
uvicorn backend.api:app --reload
python backend/scripts/validate_images.py
git lfs pull
Files changed (high level)
- Frontend edits: types, components, routes,
Dockerfile,.gitignore. - Backend: added diagnostic script
validate_images.py(image validator).
Status
- Backend: running; image-serving errors resolved after
git lfs pull. - Frontend: built successfully; tooltip and toolbar UI fixes applied.
- Docker compose updated; frontend
Dockerfileadded.
Next recommended steps
- Commit changes (source +
package-lock.json) and exclude build artifacts (node_modules,build/,.svelte-kit/). - Run end-to-end manual QA: hover tooltips, drag/save flow, maintenance page, audit log modal.
- Optionally add small unit/visual tests for tooltip placement and responsive toolbar tweaks.
- If desired, I can create a commit with these changes or open a PR.
Architecture & Strategy
1) Level 1 Architecture: Legend Gallery Finalization
- Dynamic Data Binding:
LegendGalleryApppulls fromvishal.csvand mapsPhoto_Noto thefaces/directory. Implemented lazy-loading for the 2,864-image dataset. - Severity Mapping Logic:
LEVEL_RANGEStranslates raw AutoML floats into human-readable categories (Level 0–3). - Medical Context Integration: Hardcoded
REGION_DESCRIPTIONS(R_1 to R_9) provide immediate diagnostic context for clinicians.
2) Frontend Migration Strategy: React → SvelteKit
- Konva Imperative Bridge: Use Konva’s native API inside Svelte’s
onMountto bypass virtual-DOM overhead for smoother interactions. - State Management Overhaul: Migrate
useRelabelStateanduseIterationStateto Svelte writable/derived stores for global reactivity. - Proxy & Asset Security: Phase 1 plan includes a Vite proxy for
/facesto avoid CORS and ensure secure image delivery from FastAPI.
3) Infrastructure & DevOps
- PowerShell Execution Wrapper (
run.ps1): Refactored to supportuvexperimental feature for Hugging Face jobs, enforce UTF-8, and pass complex Typer args for local/cloud runs. - Multi-Environment Deployment: Updated
app.pylaunch_kwargsto keep Gradio secure and compatible with local file paths and deployed environments.
Current Project Status
| Module | Status | Next milestone |
|---|---|---|
| Legend Gallery (L1) | ✅ Complete | Smoke test with fully synced data |
| Relabel Migration | 📋 Phase 0 | Scaffold SvelteKit & implement Konva PoC |
| Training Pipeline | ✅ Stable | Run full tune → train on GPU flavor |
| Data Integrity | ✅ Verified | Validate orphaned images in faces/ |
Next Steps (Tomorrow)
- Initiate Phase 1 of the Svelte migration (scaffold + store setup).
- Pre-flight check on Legend Gallery to verify R-value → PNG mapping.
- Draft the side-by-side comparison UI for the Level 2 Gallery transition.