-
Notifications
You must be signed in to change notification settings - Fork 123
FIX: Better handle convergence failures in Workspace #558
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FIX: Better handle convergence failures in Workspace #558
Conversation
…the PhaseRecordFactory
…nditions (perf fix)
19ccbb8 to
02bcca4
Compare
|
This will need a rebase on develop once #554 is merged |
…am issue" This reverts commit 7e6f16d.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #558 +/- ##
===========================================
+ Coverage 91.83% 91.89% +0.06%
===========================================
Files 77 77
Lines 12086 12121 +35
===========================================
+ Hits 11099 11139 +40
+ Misses 987 982 -5 ☔ View full report in Codecov by Sentry. |
328a70f to
02bcca4
Compare
Addresses the following cases with a test: - Fixes wildcard expansion on components (for properties without a sublattice index) to expand on non-vacant pure elements. With proper component support, we would go back to using `self.components`, but currently `self.components` contain all phase constituents, including, for example, vacancies - Adds `expand_wildcard` on components for chemical potentials - Fixes wildcard expansion for properties where expansions are on phase constituents, such as site fractions - Adds support for wildcard expansion on sublattice indices (required adding `sublattice index = '*'` as valid). - Change behavior of compute_property for site fractions to return NaN if the phase is not stable (previously we were returning zero)
219a8d4 to
d73b902
Compare
|
@richardotis One thing I'm not sure about is whether there are other properties or uses of Workspace worth testing for convergence failures. I think I got most the interesting variables and |
Co-authored-by: Richard Otis <richard.otis@outlook.com>
This PR adds a testing
ConvergenceFailureSolverto the test suite that overridessolveto return an unconverged result. We use this solver to add test cases for situations where there are convergence failures without having to track and continually update the test suite with real convergence failures as the solver improves to fix them.In general, the expected behavior for convergence failures is that all properties derived from equilibrium return
NaN, which is backwards compatible with pre-Workspace xarray Datasets.In particular, we test and fix bugs where the following
wks.getcalls would raise errors by trying to access composition sets that don't exist, taking into account the changes in #540 forfind_first_compset:wks.get("MU(component)")wks.get("Y(phase_name, sublattice_index, species)")wks.get(IsolatedPhase("phasename", wks=wks)("property"))wks.get(DormantPhase("phasename", wks=wks)("property"))