Today, I moved the HiPlot Parallel Coordinates Plot (PCP) from a hardcoded instance into a dynamic, version-aware explorer that reads from the root results directory (.anana-results/). This implementation bridges FastAPI backend discovery and SvelteKit frontend rendering in a robust workflow.
Internship Diary Entry
Role: AI Engineer - SynerSense Project: AnanaCare Training Control Plane (Visualization & Versioning Phase) Hours Worked: 8
Work Summary
Implemented a Version-Switching HiPlot Explorer.
- UI version dropdown triggers Hervas generation for the selected dataset.
- Backend folder discovery now supports anana_v1, anana_v2, anana_v3 and finetuned path resolution.
- Includes safe iframe blob rendering and memory lifecycle cleanup.
Key Technical Achievements
- Root-Level Data Aggregation: Resolve .anana-results roots; resolve_tune_dir maps version tags to nested trial*.json files.
- Dynamic Version Discovery: _list_local_results_versions() now returns sorted available versions so the frontend always reflects disk state.
- Reactive HiPlot Rendering: HiPlotViewer.svelte leverages Svelte $: reactive flow to refresh chart on version changes.
- Secure Blob Embedding: Revoke Blob URLs in frontend to prevent memory leaks after iframe replacement.
- Dependency Management: uv installed hiplot for consistent env behavior.
Tech Stack & Skills
| Component | Technology | Applied Skill |
|---|---|---|
| Package Mgmt | uv | fast dependency resolution and venv installation |
| Backend | FastAPI / Python | filesystem scanning, JSON processing, HTML generation |
| Frontend | SvelteKit / TypeScript | reactivity, async UI state, iframe embed |
| Visualization | HiPlot | interactive parallel coordinates plot management |
Learnings
- Treating .anana-results as the source-of-truth removes the need for additional DB layers.
- Svelte ind:value + $: works robustly for dataset-source-driven charts.
- URL.revokeObjectURL() is mandatory for long-lived chart refresh behavior.
Achievement Highlights
- Built version-aware HiPlot explorer for run comparisons.
- Adapted backend to discover and validate version directories automatically.
- Added empty-state path and protective mode for missing trial data.
Validation and Confirmation
- svelte-check: 0 issues.
- py_compile on changed backend modules: success.
- Runtime checks:
- settings.hf_repositories maps to nana-results and nana-dataset.
- settings.storage paths evaluate as expected.
- _results_root() resolves to the correct folder.
- Updated testing environment: HUGGINGFACE_REPOS_DIR=D:/Internship/AnanaCare in .env and active shell.
Next Steps
- Add support for ersion=all in the hiplot_html endpoint to aggregate all trial folders.
- Forward user theme preference (light/dark) to HiPlot for consistent styling.
- Provide user-friendly HTML 200 empty-state when no trials exist.
Run Note
- The prior 500 error on port 8000 was fixed by restarting the backend process; a clean process serves HiPlot successfully.
**(Content preserved, reorganized for readability and professional structure.)