Spaces:
Sleeping
Sleeping
Commit History
-
LLM provider abstraction + conversational simulation builder + token leak fix
Implements the directive's LLM integration layer cleanly: five providers, zero hard SDK dependencies, never crashes when no key is configured. Also fixes the immediate security issue: the previous deploy attempt embedded a write-scope HF token directly in the git remote URL (visible to anyone running git remote -v). Security fix The token-embedded remote URL was sanitised: git remote set-url space https://huggingface.co/spaces/JoeTach/cdpr-simulator The leaked token MUST also be revoked manually at https://huggingface.co/settings/tokens . See the runbook in docs/hf-auth-troubleshoot.md for the full rotation procedure. src/cdpr/llm/ --- provider-agnostic LLM layer base.py LLMProvider Protocol + LLMMessage / LLMResponse dataclasses + LLMUnavailableError. config.py LLMConfig.from_env() that reads .env via dotenv (optional dep), with canonical env-var names (GEMINI_API_KEY, OPENROUTER_API_KEY, OLLAMA…1f10b7b
-
Dash dashboard: honest re-assessment ships the better frontend for science
Joseph correctly pushed back on the v19 verdict that picked Gradio purely from a generic comparison matrix. Re-evaluating on the actual workload --- long sims, 14-figure plots, many parameter sliders, ML training, scientific researchers as users --- Dash is structurally the better fit for the local research dashboard. Gradio remains the better fit for the public one-click demo. They complement, not compete. Six workload-specific tests that decided the verdict (docs/frontend-architecture-revised.md): 1. Slider tick --- Streamlit full-script rerun (2s), Gradio full event re-render, **Dash only the affected callback updates** (two orders of magnitude less work per tick). 2. Zoom into cable_tensions plot at t=5.2s --- Streamlit/Gradio render matplotlib PNGs (no interaction), **Dash renders native Plotly figures** with built-in zoom/pan/hover/crosshair/PNG-SVG export. Category difference for research workflows. 3. Live loss curves during 30s PINN --- Streaml…d43322a -
Multi-frontend architecture + Gradio alternative + universal terminal guide
The directive asked for an honest architectural assessment of the Streamlit instability rather than more patching, two best-in-class alternatives, multi-frontend coexistence, and universal terminal support. All five requirements satisfied without disturbing the existing CLI / Streamlit / FastAPI stack. Architectural assessment (docs/frontend-architecture.md): * Root cause analysis: Streamlit Cloud's 1 GB / 1 vCPU / WebSocket-only free tier is mismatched to a numpy + scipy + matplotlib + torch workload that imports >600 MB before the first widget renders. Local Streamlit is fine; the cloud tier is the wrong free host. * Comparison matrix scores 6 alternatives across the 15 axes the directive specified. Totals: FastAPI + vanilla JS 65 (max stability, max custom-code cost) Gradio + HF Spaces 62 (best bang-per-integration-hour) Dash + Render 61 (great for Plotly dashboards) Panel 51 (strong locally, weak on free hosts) NiceGUI …4935703
-
Streamlit Cloud fix: lean requirements.txt + inline 'all' extra
Streamlit Community Cloud's Poetry-based installer rejected cdpr[all] because the all extra self-referenced as 'cdpr[viz,viz-extras,learn,rl,...]' --- Poetry detects a cycle and fails. Two fixes: 1) requirements.txt: lean dep list (streamlit + httpx + viz + data + scipy + the local cdpr package via '.') that Streamlit Cloud picks up automatically and uses instead of pyproject extras. 2) Inline the 'all' extra: drop the self-reference, list the underlying packages directly. Pip handles either form fine; this keeps Poetry happy too. Also point project URLs at Tachia/cdpr_simulator (the actual repo).3dd67c5 -
Add Supabase storage adapter with lazy dual-write mirror
- cdpr.storage.supabase: optional SupabaseMirror that copies experiment metadata into Supabase when SUPABASE_URL + SUPABASE_SERVICE_ROLE_KEY are set; local disk stays the source of truth. - recorder.record_simulation gains mirror_to_supabase / supabase_metrics kwargs; defaults preserve Phase 1-6 behaviour (no cloud writes). - supabase/config.toml links the project (ref nohbtlhhisfiajjsbguy). - supabase/migrations/20260526000001_initial_schema.sql replicates the schema as a CLI-runnable migration. - pyproject: [storage] extra installs the supabase Python client. Recording tests pass (5/5); module imports cleanly without supabase-py installed (lazy guard returns False).52db224 -
Initial commit: cdpr Phases 1-7 + deployment scaffolding
Scientific core (Phase 1): - Pose/Twist/Wrench primitives, SE(3) algebra - Robot configuration (anchors, attachments, inertia, cable limits) - Inverse + forward kinematics, structure matrix - Tension distribution (bounded QP), wrench feasibility - Three per-cable physics: massless, linear-elastic, Irvine catenary - Rigid-body Newton-Euler dynamics, RK4 + semi-implicit integrators - Workspace analysis (WCW, WFW, voxel grid) - Parametric trajectories with retiming - Reference robot catalogue (IPAnema-class, CoGiRo-class) Visualisation + ingestion + reports (Phase 2): - 2D analytics, 3D scene with tension heatmap and singularity indicator - Animation (playback, frame stepping, live streaming) with MP4/GIF export - Workspace volume rendering - Experiment recording (CSV + JSON metadata + reproducibility manifest) - Replay engine + dataset comparison - Publication-grade reports: LaTeX figures, booktabs tables, Markdown - FastAPI service + Streamlit research console - Optional external-physi…5f38e95