Claude/optimpv fork review ml y5ax7o - #4
Open
Juavamp wants to merge 2 commits into
Open
Conversation
…e ML pipeline Adds three device-stack layer parameter sets for SnO2/AZO-style sputtered TCO/ETL/HTL layers (n-i-p glass/ITO or FTO/SnO2/perovskite/Spiro-OMeTAD/Au, and p-i-n glass/FTO/SAM/perovskite/C60/BCP/Ag), ready for DDfits (SIMsalabim) fitting against combinatorial-sputtering J-V data. Also adds a 3-stage pipeline built on top of the existing DDfits/axBOtorch machinery: - Stage 1 (scripts/fit_combinatorial_devices.py): per-device drift-diffusion fitting of the sputtered layer's physical parameters against measured J-V. - Stage 2 (optimpv/ml/process_correlation.py): a classical ML regressor (Random Forest/GBR/GP) correlating process conditions with the fitted physical parameters and device performance, with feature importance and partial dependence for interpretability. - Stage 3 (optimpv/ml/surrogate_agent.py, scripts/optimize_process_conditions.py): wraps the Stage 2 model as an optimpv Agent so axBOtorchOptimizer can search process-condition/thickness space for the conditions predicted to maximize device performance. optimpv/general/combinatorial_data.py provides the raw-J-V-curve-files + conditions-log loading/merging used by Stage 1, including a sign-convention- agnostic Voc/Jsc/FF/PCE extractor. combinatorial_data.py and the Stage 2/3 ML modules were tested against synthetic data; Stage 1 and the BO portion of Stage 3 could not be run end-to-end (no SIMsalabim binary or Ax/BoTorch/PyTorch in this environment) -- see docs/combinatorial_TCO_ML_workflow.md for details and known limitations.
Adds gui/app.py, a browser-based GUI covering Stage 2 (process correlation) and Stage 3 (condition search) of the combinatorial pipeline, launched via run_gui.sh/run_gui.bat. Deliberately does not integrate SIMsalabim/DDfits (Stage 1 stays a separate script, scripts/fit_combinatorial_devices.py) -- the GUI only needs scikit-learn plus ax-platform/torch for the search, and takes any table of process conditions + performance (optionally including Stage 1 fitted physical parameters) as input. Refactored scripts/optimize_process_conditions.py to expose a reusable run_search() function so the GUI and CLI share the same code path instead of duplicating logic. Verified: gui/app.py boots cleanly under `streamlit run` and passes streamlit.testing.v1.AppTest with no exceptions in this environment (scikit-learn installed; ax-platform/torch not installed here, so the Stage 3 search itself could not be exercised end-to-end -- the GUI detects and reports missing dependencies rather than crashing).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.