Skip to content

v0.8.0

Compare
Choose a tag to compare
@mdtanker mdtanker released this 02 Aug 18:54
· 101 commits to main since this release

v0.8.0 (2024-08-02)

Breaking

  • refactor: change equivalent source param names

BREAKING CHANGE: update parameter eq_cv->cv in regional_eq_sources and regional_constraints, and use parameter cv_kwargs to pass args to optimize_eq_source_params (10e47ef)

  • refactor: update utils.best_spline_cv to pass all kwargs directly to verde.SplineCV.

BREAKING CHANGE: update parameter spline_damping to spline_dampings in function regional.regional_constraints and all functions which feed into it (i.e. regional.regional_separation) (1546d06)

  • refactor: change all equivalent source parameter variable names.

BREAKING CHANGE: please update all variables names as follows: eq_damping-> damping, source_depth->depth, eq_damping_limits->damping_limits, source_depth_limits->depth_limits ([1476e2a`](1476e2a))

  • refactor: overhaul run_inversion_workflow function to emit warnings at beginning, and enable kfolds CV for using constraints in regional separation with density/zref CV, and use better file names.

BREAKING CHANGE: removed starting_prisms_kwargs, put density_contrast and zef into standard kwargs now. All regional_grav_kwargs are now directly passed to the relavent functions, same for starting_topography_kwargs. (a72c8a4)

  • refactor: internally calculate misfit and residual in regional estimation functions and use standardized names.

BREAKING CHANGE: The function regional_dc_shift has been removed, please use function regional_constant instead. Inputs to all regional functions have changed use to standardized column names. All functions will now automatically calculate the misfit and and residual, as well as the regional. (a501f54)

  • refactor: use standardized column names instead of setting with variables.

BREAKING CHANGE: To simplify the code, all instances of passing the column name for the various data type have been replace with preset names. Please update your code to use column names: gravity_anomaly instead of parameter grav_data_column, reginstead and parameterregional_column. ([a4f24ec`](a4f24ec))

  • refactor: deprecate cross_validation.grav_optimal_parameter in favor of new Optuna-based function optimization.optimize_inversion_damping.

BREAKING CHANGE: please switch to the new function (3062ce3)

  • refactor: deprecate cross_validation.zref_density_optimal_parameter in favor of new Optuna-based function optimization.optimize_inversion_zref_density_contrast.

BREAKING CHANGE: please switch to the new function (5059cd0)

  • feat: add delta L2 norms to convergence plots.

BREAKING CHANGE: plot_convergence now takes parameter params (output dict from run_inversion) and doesn't plot iteration times. plot_dynamic_convergence now takes parameters l2_norms and delta_l2_norms instead of results. (7cbdbb3)

  • refactor: update regional_constraints func.

BREAKING CHANGE: parameter constraint_block_size changed to constraints_block_size. Instead of supplying a lists of damping values to dampings for the verde method, now provide a single value with parameter spline_damping. For eq_sources method, instead of providing limits and trial numbers, just provide single parameter values with parameters source_depth, and eq_damping, block_size. (3496d5f)

Build

  • build: remove unused optuna parallel functions and dependencies: joblib, psutil, and tqdm_joblib (56c3887)

  • build: remove viz optional deps and add to core deps (b152f1b)

  • build: remove opti deps and include as part of core deps (a396318)

  • build: add deprecation to deps (dec0ec8)

Chore

  • chore: automatically updating changelog [skip ci] (491d8c8)

  • chore: remove broken test and decrease timeout (3639b9c)

  • chore: remove pre-commit GHA in favor for pre-commit.ci (865c514)

  • chore: delete unused release file (8118b97)

  • chore: remove check-manifest from pre-commit (71accc4)

  • chore: updates from learn-scientific-python (65b1815)

  • chore: gitignore tmp folders (c228cb2)

  • chore: misc small changes (b4d247d)

  • chore: make some functions private to declutter API documentation (e19c6f2)

  • chore: remove test optuna parallel (a1b2477)

  • chore: ignore optuna experimental warnings (e1fcb78)

  • chore: remove check import for psutil, joblib and tqdm_joblib (0a3a925)

  • chore: add debug logging throughout (70da273)

  • chore: ignore some ruff issues in notebooks (d18e866)

  • chore: update make commands (50f1881)

  • chore: fix failing tests (7edfed2)

  • chore: add pickle and sqlite files to make clean (71e897f)

  • chore: update pre-commit hooks

updates:

  • chore: automatically updating changelog [skip ci] (882e7ad)

  • chore: add nodefaults to testing env (9a06f62)

  • chore: update invert4geom version in environment.yml (7762e06)

  • chore: updates to ci.yml (b3bb4d4)

  • chore: use micromamba for GHA test env and cache it (481a296)

  • chore: dont run test on docs or style commits (8b1065f)

  • chore: set min pylint version (f36ef0f)

  • chore: update make commands (e5bc907)

  • chore: precommit ignore doc md files (78461c3)

  • chore: automatically updating changelog [skip ci] (0bd49ed)

Documentation

  • docs: update all doc notebooks (4cc0b69)

  • docs: update some docstrings (ff932dd)

  • docs: update overview and conventions (a225f45)

  • docs: typo in contrib guide (32a8bdf)

  • docs: add accidentally missing api files (b0b73d9)

  • docs: update the docs (afab24d)

  • docs: move contrib guide into docs folder (3009e90)

Feature

  • feat: add uncertainty module (3d624c7)

  • feat: add upward continuation option to eq_sources regional method (10e4c3e)

  • feat: add back optuna parallel functions (4d53fde)

  • feat: add non-optuna function for find best eq source damping (3f9c6d1)

  • feat: add class for filtering duplicate log messages (b8df17d)

  • feat: add damping value as dataarray attribute in create_topography (6e96f72)

  • feat: add contextmanager function to temporarily set an env variable (b66bb59)

  • feat: update fname for inversions and CV pickle files to be simpler (a8c3a1a)

  • feat: add buffer arg to load_synthetic_model (8ac6fb1)

  • feat: add checks for regional extent of gravity and constraints (997b416)

  • feat: add fig_height kwarg to inversion plots (40cb035)

  • feat: allow separate or combined metrics for regional hyperparameter optimizations (973d93d)

  • feat: add function regional_constraints_cv to automatically perform a K-Folds cv for finding optimal parameter values for constraint point minimization (06ebe79)

  • feat: allow internal CVs for eq sources and splines for regional_constraints (4982cc3)

  • feat: allow internal CV in regional_eq_sources (24fed1a)

  • feat: add data weights to regional_eq_sources (e63e49d)

  • feat: add grav_obs_height parameter to regional_eq_sources (ed344ae)

  • feat: add function for loading all synthetic topography and gravity (d4c8b07)

  • feat: add function for contaminating data with long-wavelength noise (5d087a2)

  • feat: new function optimize_inversion_zref_density_contrast_kfolds for use constraints within the CV via an inner kfolds-CV (f596f37)

  • feat: remove default args for optimize_eq_source_params (df1fb14)

  • feat: add progressbar and callbacks to optimize_eq_source_params (7156c05)

  • feat: all passing kfolds of constraints to optimize_inversion_zref_density_constrast (dc17ed3)

  • feat: add plotting function for fixing hoverdata on plotly-optuna plots (da2af82)

  • feat: add plotting function for stochastic uncertainty (88288a9)

  • feat: new function random_split_test_train to randomly split data for cross validations. (3b797ab)

  • feat: add optimization for eq source params (9a31851)

  • feat: add function to give score for regional estimations (276da98)

  • feat: add function to convert format of test train folds dataframe (eec2a93)

  • feat: add function for splitting data into test and train sets with several methods (5e252f1)

  • feat: add optimization functions for all regional estimation techniques. (7db27cc)

  • feat: add functions for optuna logback to warn about best parameter values being at limits. (53fafc7)

  • feat: include multi-objective studies in custom optuna logback func (89d4403)

  • feat: add constraints_dfto plotting functions (64147bf)

  • feat: add plotting func for non-grid search 2 parameter CV (b86ebf9)

  • feat: add constraints_df arg to plot_inversion_results (57aefcc)

  • feat: allow already separated train/test sets for gravity data in run_inversion_workflow (9fa7f27)

  • feat: add fname option to run_inversion_workflow to save results (d393d7d)

  • feat: add option to turn off inversion progressbar (17c6b32)

  • feat: add load_bishop_model function (8006cf5)

  • feat: add weights option to create_topography (17827b4)

Fix

  • fix: ensure all dictionary pop calls are made on copies (1c80404)

  • fix: enable upward continuation option for CPM with equivalent source gridding (0c23eca)

  • fix: separate cmaps for starting and ending gravity residual plots (d6feb0e)

  • fix: explicitly save inversion results in run_inversion_workflow (5db892e)

  • fix: bug in eq_sources_score with too many folds (c78354e)

  • fix: raise error if trying to get regional score from method constraints_cv (d35b703)

  • fix: make dampings required for create_topography and starting_topography_kwargs (c3d407b)

  • fix: only plot optuna importances if >1 parameter (ba17ed1)

  • fix: update regional_eq_sources to work with new param names (68f85f2)

  • fix: bug in optimize_eq_source_params (eb0ebbe)

  • fix: add warnings about constraints and regional separation (c6bc503)

  • fix: add warning in run_inversion_workflow for using constraints with zref/density CV (88e9a86)

  • fix: add assert thay run_inversion_workflow uses correct zref and density values (5692da4)

  • fix: minor changes (dbe8ca5)

  • fix: bug in run_inversion_workflow (bf875f8)

  • fix: bug in optimize_inversion_zref_density_contrast_kfolds (8886438)

  • fix: suppress info logs for run inversionwith kfolds CV (3bb59d2)

  • fix: suppress info logs for regional separations (e15d3de)

  • fix: change regional_method to method in regional_grav_kwargs (d52f01d)

  • fix: raise error for bug in plot_2_param_cv_scores_uneven (7ec08e7)

  • fix: add check for regional separation scores not being nans (e98bbfd)

  • fix: bug in regional test (c618097)

  • fix: bug in CPM kfolds optimization (30e6763)

  • fix: updating plotting of optuna results in optimization (af78985)

  • fix: add regional scores to trial user attrs in regional hyperparameter optimizations (9ac1bdf)

  • fix: update best_spline_cv and use within create_topography (5c3d6c5)

  • fix: raise error if index column already exists in sample_grids (7ca6c83)

  • fix: update optuna plotting funcs (d3b1552)

  • fix: update plot_2_parameter_cv_scores_unven function (8b73d43)

  • fix: enqueue trials for value limits in optimize_eq_source_params (af519e0)

  • fix: add default value to source_depth in OptimalEqSourceParams (03b828e)

  • fix: use more startup trials in optimizing on both zref and density (789167b)

  • fix: remove warning about using constraints for finding constant regional value in CV as it doesn't seem to affect it. (14efcfc)

  • fix: add warning if no supplied constraints in run_inversion_workflow if doing density/zref CV (2783ab4)

  • fix: allow no starting_prisms in run_inversion_workflow if doing a density/zref CV (da1674c)

  • fix: remove data_column from random_split_test_train and keep all non-coord columns in dataframe. (3584286)

  • fix: bug in resample_with_test_points, drop nans (feda68f)

  • fix: bug fixed to explicitly remove prism_layer in zref/density CV (b70a893)

  • fix: update plotting for optuna optimization results (f2c60c4)

  • fix: log warning if using constraints points for finding constant regional value within a zref/density CV. (f7a135d)

  • fix: bug in plot_2_parameter_cv_scores_uneven (b8ca0f4)

  • fix: bug in run_inversion_workflow (604729b)

  • fix: minor fixes to logging (4481f5d)

  • fix: add crs parameter for utils.nearest_grid_fill (b2eec98)

  • fix: turn off dynamic convergence plotting during CV (a09ad32)

  • fix: remove unnecessary depth_type arg for eq sources (4998705)

  • fix: add warning to run_inversion about unused weighting grid (e2676fa)

Refactor

  • refactor: clean up CPM optimization and cv. (f873490)

  • refactor: clean up zref/density CV functions (4ecf9ec)

  • refactor: log info instead of warning for params at limits (24819a5)

  • refactor: redo regional separation with optimal parameters instead of storing results as attributes (ff369d8)

  • refactor: use run_optuna for all optimizations to all for running in parallel. (c59f2c7)

  • refactor: use split_kwargs in run_inversion_workflow and minor fixes (849bb39)

  • refactor: move creation of regional sep studies to new function (be30d53)

  • refactor: default to separate metrics (multi-objective) for regional separation (91b2e4b)

  • refactor: update optimize_eq_source_params to work with recent changes (0e3ce7b)

  • refactor: clean up regional_constraints and change default grid_method to "eq_sources" (7170ebd)

  • refactor: cross_validation.eq_sources_score now passes all kwargs directly to hm.EquivalentSources class (5f9f7c6)

  • refactor: consolidate optuna logging of results (68b8dc8)

  • refactor: consolidate optuna warning for best parameter values at their limits (5a3a7d1)

  • refactor: use context manager to temporarily change logging level (c14aaca)

  • refactor: minor changes to optimization (18f2058)

  • refactor: set default of source_depth to 'default' in regional_eq_sources (ee7575f)

  • refactor: use pygmt instead of xarray for plotting some inversion results (cf377b3)

  • refactor: use a logger specifically for invert4geom and update all logging calls (fa111cc)

  • refactor: remove default value for damping_cv_trials and zref_density_cv_trials in run_inversion_workflow (7dce943)

  • refactor: cv score functions to return inversion results as well as scores (15e4369)

  • refactor: remove buffer from delta l2 norm line in convergence plots (cd85659)

  • refactor: rename function plot_optuna_inversion_figures to plot_optuna_figures (4823cab)

  • refactor: temporarily disable info-level logging in CV score functions (f5c329d)

  • refactor: use easier to understand names in update_l2_norms (1516795)

  • refactor: change point color to gray for plot_2_parameter_cv_scores (ccbd4ba)

  • refactor: move eq_sources_score to cross_validation module (4def683)

  • refactor: explicitly set parameters instead of kwargs for eq_sources_score (2a8c133)

Style