Skip to content

Refactor code to use equistore-torch#5

Open
agoscinski wants to merge 6 commits intoradial-cleanupfrom
torchscript-support
Open

Refactor code to use equistore-torch#5
agoscinski wants to merge 6 commits intoradial-cleanupfrom
torchscript-support

Conversation

@agoscinski
Copy link
Owner

@agoscinski agoscinski commented Jun 4, 2023

  • replacing numpy labels to torch tensors
  • adapting new way of equistore of accessing Labels using square brackets __getitem__, this now returns a Labels object and not an array
  • some torch operations like unique and repeat work a bit different, unique needed a own version, maybe we also move this to equistore operations
  • equistore.operations one_hot does not work with torch inputs, so I implemented a torch version until fixes have been made
  • one cannot iterate over blocks using for key, block in tensor_map: (__iter__ is not implemented since it is applied on a ScriptObject now)

* add torch_nl for torch neighborlist
* add typehints where needed
* use Labels.view([name])
* get rid of torch.get_default_dtype() in forward function, seems not to
  work
* rm np.unique
* rm try-catch blocks
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.

1 participant