Skip to content

glycerol Sobol baseline workflow #4

Open
Daniel0813 wants to merge 1 commit into
mainfrom
daniel-glycerol
Open

glycerol Sobol baseline workflow #4
Daniel0813 wants to merge 1 commit into
mainfrom
daniel-glycerol

Conversation

@Daniel0813
Copy link
Copy Markdown
Collaborator

No description provided.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.md to 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

Copy link

Copilot AI Apr 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Suggested change
lash_e.nr_robot.check_input_file()

Copilot uses AI. Check for mistakes.
Comment on lines +220 to +224
row_result = validate_pipetting_accuracy(
lash_e=lash_e,
source_vial=SOURCE_VIAL,
destination_vial=DESTINATION_VIAL,
liquid_type=LIQUID_TYPE,
Copy link

Copilot AI Apr 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Copilot uses AI. Check for mistakes.
Comment on lines +131 to +139
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()
Copy link

Copilot AI Apr 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

_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.

Copilot uses AI. Check for mistakes.
Comment on lines +152 to +156
def run_baseline():
print("Starting glycerol Sobol benchmark baseline workflow")
print(f"Simulation mode: {SIMULATE}")
print(f"Show GUI: {SHOW_GUI}")

Copy link

Copilot AI Apr 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Comment thread CHANGELOG.md
## [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
Copy link

Copilot AI Apr 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
- **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

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants