Skip to content

Conversation

Leguark
Copy link
Member

@Leguark Leguark commented Aug 5, 2025

Description

Added a new Greenstone example model to GemPy with supporting functionality. The implementation includes:

  • Added a new GREENSTONE enum to ExampleModel
  • Created a _generate_greenstone_model function in the examples generator
  • Added the binary Greenstone.gempy model file
  • Updated the interpolation input factory to handle weights from solutions
  • Added tests for the Greenstone model including CG solver tests with PyKeops

Relates to #weights-caching-and-cg-solver

Checklist

  • My code uses type hinting for function and method arguments and return values.
  • I have created tests which cover my code.
  • The test code either 1. demonstrates at least one valuable use case (e.g. integration tests)
    or 2. verifies that outputs are as expected for given inputs (e.g. unit tests).
  • New tests pass locally with my changes.

@Leguark Leguark changed the title [ENH/TEST] Add support for Greenstone model generation and corresponding test [ENH] Add Greenstone example model and CG solver tests Sep 17, 2025
@Leguark Leguark marked this pull request as ready for review September 17, 2025 12:36
@graphite-app graphite-app bot added the gempy 3 Will come with the next major update label Sep 17, 2025
Copy link

graphite-app bot commented Sep 17, 2025

Graphite Automations

"Add gempy label" took an action on this PR • (09/17/25)

1 label was added to this PR based on Miguel de la Varga's automation.

…ing test

Integrated a new `Greenstone` example model into the `generate_example_model` API. Added its binary file and implemented a test for its functionality.
Switched the `use_gpu` configuration to `True` in the CG solver test, ensuring the test runs with GPU acceleration. Removed unused imports for cleanup.
Introduced a `clear_cache` method in the `WeightCache` class for better memory management. Enhanced the numerical stability of the conjugate gradient solver with improved initialization and adaptive tolerances. Refactored interpolation logic to handle weights more efficiently, and adjusted benchmarking to test expanded solver configurations.
Extended CG solver tests to include configurations using both the PYTORCH and PYKEOPS backends. Configured tests with varying `use_gpu` and `dtype` options, introduced a new Greenstone model test, and added 3D plotting support in the test suite.
Upgraded `gempy_viewer` dependency to version 2025.1.4. Adjusted benchmarking configuration to use parallel fork triangulation with 6 levels and disabled benchmarking by default. Enabled debug plotting in `_compute_model_fn.py` for enhanced troubleshooting.
…uration

Deleted redundant `evaluation_chunk_size` parameter adjustments and added `validate_serialization=False` to the `compute_model` call for enhanced model processing flexibility.
Enabled gradient computation in the optimizer initialization by adding the `grads` parameter for enhanced flexibility in optimization workflows.
Copy link
Member Author

Leguark commented Sep 30, 2025

Merge activity

  • Sep 30, 8:04 AM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Sep 30, 8:07 AM UTC: Graphite couldn't merge this PR because it failed for an unknown reason.
  • Sep 30, 8:10 AM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Sep 30, 8:14 AM UTC: Graphite couldn't merge this PR because it failed for an unknown reason.

@Leguark Leguark merged commit 666d183 into main Sep 30, 2025
2 checks passed
@Leguark Leguark deleted the cg_solver branch September 30, 2025 08:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gempy 3 Will come with the next major update
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant