Skip to content
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

MAINT: Migrate to PyCalphad Workspace #256

Merged
merged 23 commits into from
Aug 9, 2024

Conversation

bocklund
Copy link
Member

@bocklund bocklund commented Jul 30, 2024

  • Add support for breaking changes from the upcoming PyCalphad 0.11 release:
    • Migrate almost all residual function implementations to PyCalphad Workspace. This allowed us to remove several espei.shadow_functions that are no longer necessary.
    • With Workspace, ESPEI no longer needs to use a heuristic and hack the solver to prevent adding composition sets for constrained equilibria in ZPF data because this functionality is replaced by IsolatedPhase. This should resolve several bugs where the heurisitic for choosing points was too narrow (not allowing any points to be selected) or too broad (with bad starting points selected that could give metastable equilibria).
    • Update data structures to reflect the change in PyCalphad to PhaseRecordFactory objects
    • Fix compatibilitiy with unpack_components -> unpack_species
    • Fix ImmutableDenseMatrix of symbolic coefficients in parameter selection now that PyCalphad Symbol objects define a __getitem__ method. See Subclassed Symbols that define __getitem__ break DenseMatrix symengine/symengine.py#485 for more details.
    • Fix need to pad points matricies in plot_endmember and plot_interaction (_compare_data_to_parameters is getting removed as deprecated in a future PR)
  • Drop Python 3.8 support (NEP-29)
  • Remove dead code and dead imports
  • Add timings to individual likelihood calls in trace output

Some out of scope things for future work:

  1. Now that everything uses Workspace to some extent, it would be good to take another step towards a consistent API across residual helper functions in terms of calling conventions, e.g. consistency w.r.t. passing around Database objects, parameter dicts vs. parameter arrays, etc.
  2. Activity error could probably be merged into equilibrium thermochemical error. This will probably be a breaking change to support a unified idea of reference states (and we should swap to PyCalphad's new Workspace-based reference state mechanism anyway).
  3. See if we can remove update_phase_records, as this is a non-trivial amount of time in benchmarking

@bocklund
Copy link
Member Author

bocklund commented Aug 3, 2024

Added some code to utilize a special NoSolveSolver to fix a correctness regression in thermochemical data where we were minimizing internal DOF. We're now perfectly agreeing with prior versions for fixed configuration thermochemical data.

This is pretty close to being able to be merged, but there's a significant performance regression for ZPF data (~20x slowdown) that I want to fix, or at least make a significant dent in.

@bocklund bocklund marked this pull request as ready for review August 8, 2024 20:29
@bocklund bocklund merged commit 227eac8 into PhasesResearchLab:master Aug 9, 2024
6 of 11 checks passed
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