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

Future directions for CG iterations #239

Open
10 tasks
jwa7 opened this issue Sep 28, 2023 · 4 comments
Open
10 tasks

Future directions for CG iterations #239

jwa7 opened this issue Sep 28, 2023 · 4 comments
Assignees
Labels
calculators Work on the representation/fingerprint functions. Python Issues related to the Python API

Comments

@jwa7
Copy link
Collaborator

jwa7 commented Sep 28, 2023

The first 'iteration' of the Python redesign is starting to converge - see #237. In a rough order of chronology and/or complexity, the next steps to be tackled in future PRs are as follows:

To Do - Functionality

  • Implement correlate_tensors:
def correlate_tensors(
    tensor_1: TensorMap,
    tensor_2: TensorMap,
    angular_cutoff: Optional[int] = None,
    selected_keys: Optional[Labels] = None,
) -> TensorMap:
    """
    Performs the Clebsch Gordan tensor product of two TensorMaps that correspond
    to densities or density correlations. Returns a new TensorMap corresponding
    to a higher correlation-order descriptor.

    The two input tensors can be single- or multi-center, and of arbitrary (and
    different) correlation order, but must contain the same samples.
    """
  • Ensure torch dispatch works and make the CG code torchscript-able (with @Luthaf)
  • Support CG products of gradients (with @PicoCentauri and @Luthaf)
  • Speed up wrapper code (i.e. everything that isn't the tensor product operation). Line profiling shows that the pre-calculation (and caching for subsequent but separate calculations) of the components and properties might be a good place to start (with @frostedoyster)
  • Run systematic benchmarking on sparse vs dense vs sparse w/ Mops. Define when in general it is best to use one over the others, and dynamically change the default based on the input system (with @frostedoyster)
  • Metadata such as "order_nu" should be associated with the TensorMap and not in the keys - awaiting functionality in metatensor
  • Extend to combinations of tensors with different samples (with @DivyaSuman14 and @curiosity54)
  • Later down the line: customizable and arbitrary (non)linear transformations at each iteration (with @agoscinski, thesis dependent)

To Do - Documentation

@Luthaf Luthaf added calculators Work on the representation/fingerprint functions. Python Issues related to the Python API labels Sep 28, 2023
@Luthaf
Copy link
Owner

Luthaf commented Nov 16, 2023

  • function that compute metadata should not need to allocate memory for the data arrays. We should have a new EmptyArray class in Python's metatensor API that just track the size of the array but is not allocating memory.

@Luthaf
Copy link
Owner

Luthaf commented Dec 19, 2023

  • the current tests are quite slow, we should see how to make them faster!
tox -e all-deps -- python/rascaline/tests/utils/clebsch_gordan.py

<snip ...>

27 passed in 77.57s

This should not take more than ~10s. All the other Python tests together take around 10s.

I would use smaller datasets/lmax/... to make sure there tests are not becoming a nuisance when developing other parts of the code.

@jwa7
Copy link
Collaborator Author

jwa7 commented Dec 20, 2023

  • the current tests are quite slow, we should see how to make them faster!
tox -e all-deps -- python/rascaline/tests/utils/clebsch_gordan.py

<snip ...>

27 passed in 77.57s

This should not take more than ~10s. All the other Python tests together take around 10s.

I would use smaller datasets/lmax/... to make sure there tests are not becoming a nuisance when developing other parts of the code.

@Luthaf Noted! Fixed in #266

@jwa7
Copy link
Collaborator Author

jwa7 commented Jul 10, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
calculators Work on the representation/fingerprint functions. Python Issues related to the Python API
Projects
None yet
Development

No branches or pull requests

5 participants