Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
26bcfa3
Add amsc-client to dashboard conda environment file
EZoni Apr 15, 2026
b2f0922
Remove old dashboard conda environment lock file
EZoni Apr 15, 2026
713b4ab
Fix dashboard conda environment file
EZoni Apr 15, 2026
c1551b0
Add new dashboard conda environment lock file
EZoni Apr 15, 2026
42e8843
Rename NERSC route as 'HPC Connection'
EZoni Apr 15, 2026
cd95015
Add GUI components to select HPC connection
EZoni Apr 15, 2026
ebaf0fd
Work on GUI components to select HPC connection
EZoni Apr 16, 2026
ba5f2af
Merge branch 'main' into iri_client_new
EZoni Apr 16, 2026
ff42e75
Continue IRI API implementation
EZoni Apr 28, 2026
2d3e2e7
Port dashboard model training to AmSC IRI API
EZoni Apr 29, 2026
ad33a8d
Parse job submission options from batch script
EZoni Apr 29, 2026
860bc18
Port ls call to AmSC IRI API
EZoni Apr 29, 2026
53a6377
SBATCH_REQUIRED_SUBMIT_OPTIONS validation has redundant set() call
EZoni Apr 29, 2026
9f340df
Do not share state variables between API providers
EZoni Apr 29, 2026
3857e84
Clean up implementation of parse_slurm_duration
EZoni Apr 29, 2026
32ac575
Improve inline comments
EZoni Apr 29, 2026
8f831ab
Comment out facility registration, use Globus auth
EZoni Apr 30, 2026
1d6dc93
Update job submission specs through AmSC IRI API
EZoni Apr 30, 2026
1a55aa8
Merge branch 'main' into iri_client_new
EZoni Apr 30, 2026
6feef11
Harden training script: credentials validation, error handling, secur…
EZoni May 1, 2026
b5f64ff
Update `upload` call based on local patch
EZoni May 1, 2026
2d6e739
Debugging job submission through AmSC IRI API
EZoni May 1, 2026
671d8b1
Start splitting simulation and ML training execution modes
EZoni May 2, 2026
d37d04f
Duplicated logging functions in hpc_manager.py
EZoni May 4, 2026
a588880
Redundant EXECUTION_MODE_LABELS.get(x, x) pattern
EZoni May 4, 2026
fc2e2e9
Remove dead branch in simulation_async
EZoni May 4, 2026
65f9eab
execution_mode_items() recomputed on every render
EZoni May 4, 2026
8cf35d3
Clean up code commented out in create_iriapi_client()
EZoni May 4, 2026
fa63774
Collapse code branches in parse_slurm_duration
EZoni May 4, 2026
beba799
Simplify parse_iri_training_launch_spec, fix training bug
EZoni May 4, 2026
7ac87bd
Explain convergence loop in expand_iri_shell_command
EZoni May 4, 2026
d92e8f7
Install amsc-client from local source
EZoni May 5, 2026
28236cd
Add new conda environment lock file
EZoni May 5, 2026
1dbeae1
Debugging dashboard Dockerfile update
EZoni May 5, 2026
d84dcfa
Layout, style changes
EZoni May 5, 2026
6706b10
Do not parse AmSC IRI API access token from environment
EZoni May 5, 2026
a50ba46
Clean up inline comments
EZoni May 5, 2026
198e108
Parse AmSC IRI API credentials from JSON file
EZoni May 5, 2026
44646e3
Fix when simulation, training buttons are disabled
EZoni May 5, 2026
73a5673
Fix label for simulation backend selector
EZoni May 5, 2026
8522638
Fix required fields in AmSC IRI API token parser
EZoni May 5, 2026
846e12c
Fix labels for simulation, training backend selectors
EZoni May 5, 2026
cbd4e08
Do not reset execution mode after training job is completed
EZoni May 5, 2026
01a274e
Push missing conda environment lock file
EZoni May 5, 2026
5cbee8d
Write AmSC IRI API token file to ~/.amsc/ for containerization
EZoni May 5, 2026
acca89b
Change title of the app
RemiLehe May 6, 2026
a11ea82
Make ~/.amsc writable under Spin's random runtime UID
EZoni May 7, 2026
3c7e522
Skip 'set -euo pipefail' in training batch script for now
EZoni May 7, 2026
941585d
Apply suggestions from code review
RemiLehe May 7, 2026
adb272e
Fix Slurm options to select GPU
EZoni May 7, 2026
272ba42
Merge branch 'change_title' into iri_client_new
EZoni May 7, 2026
a115202
Fix Slurm options to select queue
EZoni May 7, 2026
e24e503
Clean up obsolete code
EZoni May 7, 2026
177c32c
Merge branch 'main' into iri_client_new_latest
EZoni May 7, 2026
c59e4e4
Fix vertical spacing allocated for progress bar
EZoni May 7, 2026
fda2cbe
Fix blinking of model card triggered by progress bar
EZoni May 7, 2026
04826d7
Assume the AmSC logo is always available
EZoni May 7, 2026
e20887d
Fix dynamic cursor icon to click on AmSC logo
EZoni May 7, 2026
3290654
Fix upload of configuration file used for ML training
EZoni May 7, 2026
88c4ab4
Fix remaining bugs: upload when file exists, GPU options
EZoni May 7, 2026
ed82bcb
Revert to timestamp filename, overwrite training script on the fly
EZoni May 7, 2026
4f36e3c
Remove debugging print
EZoni May 7, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions dashboard.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,17 @@ WORKDIR /app/dashboard
# Silence pip error to install in root dirs
ENV PIP_ROOT_USER_ACTION=ignore

# Spin assigns a random UID with no usable home directory. Pre-create
# ~/.amsc as world-writable+sticky so the runtime UID can write to it.
RUN mkdir -p /app/dashboard/.amsc && chmod 1777 /app/dashboard/.amsc

# Install any needed packages specified in the environment file
COPY dashboard/environment-lock.yml /app/dashboard/environment-lock.yml

# The lock file installs amsc-client from this local source URL. Pass it with:
# --build-context amsc-client-src=/path/to/amsc-python-client
COPY --from=amsc-client-src / /home/edoardo/src/amsc-python-client

RUN conda install -c conda-forge conda-lock \
&& conda-lock install --name synapse-gui environment-lock.yml \
&& conda clean --all -y
Expand Down
5 changes: 4 additions & 1 deletion dashboard/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,8 @@ Following the instructions at [docs.nersc.gov/services/sfapi/authentication/#cli
> ```bash
> python publish_container.py --gui
> ```
> By default this expects the locally patched `amsc-python-client` checkout at `../amsc-python-client`.
> If it lives elsewhere, set `AMSC_CLIENT_SRC=/path/to/amsc-python-client`.

> [!TIP]
> Prune old, unused images periodically in order to free up space on your machine:
Expand All @@ -168,7 +170,8 @@ Following the instructions at [docs.nersc.gov/services/sfapi/authentication/#cli

2. Build the Docker image:
```bash
docker build --platform linux/amd64 --output type=image,oci-mediatypes=true -t synapse-gui -f dashboard.Dockerfile .
docker build --platform linux/amd64 --output type=image,oci-mediatypes=true -t synapse-gui -f dashboard.Dockerfile \
--build-context amsc-client-src="${AMSC_CLIENT_SRC:-../amsc-python-client}" .
```

### Push the Docker container
Expand Down
55 changes: 32 additions & 23 deletions dashboard/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from optimization_manager import OptimizationManager
from parameters_manager import ParametersManager
from calibration_manager import SimulationCalibrationManager
from sfapi_manager import load_sfapi_card
from hpc_manager import load_hpc_card
from state_manager import server, state, ctrl, initialize_state
from error_manager import error_panel, add_error
from utils import (
Expand Down Expand Up @@ -54,8 +54,9 @@ def update(
reset_parameters=True,
reset_calibration=True,
reset_plots=True,
reset_execution_modes=True,
reset_gui_route_home=True,
reset_gui_route_nersc=True,
reset_gui_route_hpc=True,
reset_gui_route_chat=True,
reset_gui_layout=True,
preloaded_model_manager=None,
Expand All @@ -73,9 +74,11 @@ def update(
)
# load data
config_dict = load_config_dict(state.experiment)
# derive execution mode from execution_mode in the experiment configuration file
execution_mode = config_dict.get("execution_mode") or {}
state.model_training_mode = execution_mode.get("ml_training", "local")
if reset_execution_modes:
# Derive execution mode defaults from the experiment configuration file.
execution_mode = config_dict.get("execution_mode") or {}
state.model_training_mode = execution_mode.get("ml_training", "local")
state.simulation_running_mode = execution_mode.get("simulation", "local")
state.model_mlflow_tracking_uri = (config_dict.get("mlflow") or {}).get(
"tracking_uri"
)
Expand All @@ -98,7 +101,10 @@ def update(
else:
mod_manager = preloaded_model_manager
state.model_available = mod_manager.avail()
opt_manager = OptimizationManager(mod_manager)
if opt_manager is None or reset_gui_route_home:
opt_manager = OptimizationManager(mod_manager)
else:
opt_manager.model = mod_manager
# reset parameters
if reset_parameters:
par_manager = ParametersManager(mod_manager, input_variables)
Expand All @@ -108,9 +114,9 @@ def update(
# reset GUI home route
if reset_gui_route_home:
home_route()
# reset GUI NERSC route
if reset_gui_route_nersc:
nersc_route()
# reset GUI HPC route
if reset_gui_route_hpc:
hpc_route()
# reset GUI chat route
if reset_gui_route_chat:
chat_route()
Expand Down Expand Up @@ -221,8 +227,9 @@ def reset(**kwargs):
reset_parameters=True,
reset_calibration=True,
reset_plots=True,
reset_execution_modes="experiment" in state.modified_keys,
reset_gui_route_home=True,
reset_gui_route_nersc=False,
reset_gui_route_hpc=False,
reset_gui_route_chat=False,
reset_gui_layout=False,
)
Expand All @@ -239,8 +246,9 @@ def reset(**kwargs):
reset_parameters=False,
reset_calibration=False,
reset_plots=True,
reset_gui_route_home=True,
reset_gui_route_nersc=False,
reset_execution_modes=False,
reset_gui_route_home=False,
reset_gui_route_hpc=False,
reset_gui_route_chat=False,
reset_gui_layout=False,
)
Expand All @@ -263,8 +271,9 @@ def reset(**kwargs):
reset_parameters=False,
reset_calibration=False,
reset_plots=True,
reset_execution_modes=False,
reset_gui_route_home=False,
reset_gui_route_nersc=False,
reset_gui_route_hpc=False,
reset_gui_route_chat=False,
reset_gui_layout=False,
)
Expand Down Expand Up @@ -433,16 +442,16 @@ def home_route():
ctrl.figure_update = figure.update


# NERSC route
def nersc_route():
print("Setting GUI NERSC route...")
with RouterViewLayout(server, "/nersc"):
# HPC route
def hpc_route():
print("Setting GUI HPC route...")
with RouterViewLayout(server, "/hpc"):
with vuetify.VRow():
with vuetify.VCol(cols=4):
# Superfacility API card
with vuetify.VCol(cols=12):
# Render both API credential cards
with vuetify.VRow():
with vuetify.VCol():
load_sfapi_card()
load_hpc_card()


# Chat route
Expand Down Expand Up @@ -506,11 +515,11 @@ def gui_setup():
prepend_icon="mdi-chat",
title="AI Assistant",
)
# NERSC route
# HPC route
vuetify.VListItem(
to="/nersc",
to="/hpc",
prepend_icon="mdi-lan-connect",
title="NERSC API key",
title="HPC Connection",
)
# interactive dialog for simulation plots
with vuetify.VDialog(
Expand Down
8 changes: 8 additions & 0 deletions dashboard/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,13 @@
source /opt/conda/etc/profile.d/conda.sh
conda activate synapse-gui

# Give dashboard libraries that rely on Path.home() a stable home in Spin.
export HOME=/app/dashboard

# amsc-client's default Globus token cache is ~/.amsc/credentials.json.
# Ensure the directory exists at runtime; the Dockerfile created it as
# mode 1777 so the random UID Spin assigns can write into it.
mkdir -p "${HOME}/.amsc" 2>/dev/null || true

# Execute the provided command
exec "$@"
Loading
Loading