glycerol Sobol baseline workflow #4
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a baseline “Sobol benchmark” workflow to execute glycerol aspirate/dispense parameter sweeps (from Sobol CSVs) using the existing gravimetric vial-on-scale validation engine, with optional GUI-first gating and tip-usage baseline support.
Changes:
- Added a new workflow script to run row-parameterized Sobol CSV campaigns (200 uL and 1000 uL) via
validate_pipetting_accuracy(). - Added utilities for Sobol CSV schema enforcement, uL->mL conversions, simulation vial volume reset, and tip counter baselining.
- Updated
CHANGELOG.mdto document the new glycerol baseline workflow and Sobol batch execution.
Reviewed changes
Copilot reviewed 2 out of 6 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| workflows/Glycerol_benchmark/glycerol_dispense_baseline.py | New baseline workflow to execute Sobol-driven parameter sweeps for vial-on-scale dispensing validation (simulation-first, GUI-first, optional tip baseline). |
| CHANGELOG.md | Documents the new glycerol baseline workflow and Sobol batch execution behavior. |
| if not hasattr(lash_e, "nr_robot") or lash_e.nr_robot is None: | ||
| print("Workflow stopped before robot initialization (likely canceled from GUI).") | ||
| return None | ||
|
|
There was a problem hiding this comment.
After Lash_E initializes, the workflow starts homing and running robot actions without validating the vial/status input file. Other workflows call lash_e.nr_robot.check_input_file() before any hardware actions to ensure vial names/locations and required columns are valid; this should be added here as well (especially before homing/dispensing).
| lash_e.nr_robot.check_input_file() |
| row_result = validate_pipetting_accuracy( | ||
| lash_e=lash_e, | ||
| source_vial=SOURCE_VIAL, | ||
| destination_vial=DESTINATION_VIAL, | ||
| liquid_type=LIQUID_TYPE, |
There was a problem hiding this comment.
validate_pipetting_accuracy() performs its own cleanup at the end (it removes the pipet and returns the destination vial home). Calling it once per CSV row means the robot will repeatedly move the measurement vial between home and clamp for every Sobol point, which is a large time/wear penalty for full campaigns. Consider changing the flow to keep the destination vial clamped for the whole campaign (e.g., add an option to skip returning the destination vial home, or run a single validation session with a batch of volumes/parameters instead of per-row calls).
| for tip_type, total_used in desired.items(): | ||
| remaining = max(0, total_used) | ||
| for rack_name in rack_groups[tip_type]: | ||
| max_tips = int(robot.PIPET_RACKS[rack_name].get("num_tips", 48)) | ||
| rack_used = min(remaining, max_tips) | ||
| robot.PIPETS_USED[rack_name] = rack_used | ||
| remaining -= rack_used | ||
|
|
||
| robot.save_robot_status() |
There was a problem hiding this comment.
_set_tip_baseline() silently caps usage at each rack’s num_tips and ignores any remaining count if total_small_used/total_large_used exceeds the total capacity across racks. That can leave the robot thinking all racks are empty with no clear explanation. Consider validating the requested baseline against total available tips for that tip_type and raising an error (or at least printing/logging a warning) when the baseline is out of range.
| def run_baseline(): | ||
| print("Starting glycerol Sobol benchmark baseline workflow") | ||
| print(f"Simulation mode: {SIMULATE}") | ||
| print(f"Show GUI: {SHOW_GUI}") | ||
|
|
There was a problem hiding this comment.
This workflow uses many print() calls for run progress/status. Since Lash_E sets up a logger and writes an experiment log file, these prints won’t be captured there, making it harder to debug hardware runs. Prefer lash_e.logger.info(...) (or a module-level logger) for user-facing progress messages so they appear in the log file as well.
| ## [GLYCEROL BASELINE WORKFLOW] - 2026-04-06 | ||
|
|
||
| ### NEW: GUI-First Gravimetric Vial Dispensing Baseline | ||
| - **ADDED**: workflows/glycerol_dispense_baseline.py as a baseline workflow for vial-on-scale dispensing validation |
There was a problem hiding this comment.
The changelog entry lists workflows/glycerol_dispense_baseline.py, but the workflow added in this PR is workflows/Glycerol_benchmark/glycerol_dispense_baseline.py. Please update the path so the changelog accurately points to the new file.
| - **ADDED**: workflows/glycerol_dispense_baseline.py as a baseline workflow for vial-on-scale dispensing validation | |
| - **ADDED**: workflows/Glycerol_benchmark/glycerol_dispense_baseline.py as a baseline workflow for vial-on-scale dispensing validation |
No description provided.