Skip to content

Commit

Permalink
refactor dev docs and add dtype details during model building
Browse files Browse the repository at this point in the history
  • Loading branch information
cw-tan committed Dec 10, 2024
1 parent b6233b1 commit 1c2295c
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 15 deletions.
4 changes: 2 additions & 2 deletions docs/dev/dev.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ Developer Guide

.. toctree::

extending
contributing
tools
under_the_hood
extending
13 changes: 0 additions & 13 deletions docs/dev/tools.rst

This file was deleted.

23 changes: 23 additions & 0 deletions docs/dev/under_the_hood.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
Under The Hood
##############

This page explains key aspects of the infrastructure.

Model Building
==============


Model Builder Decorator
-----------------------
The following decorator should be used for new model builders, e.g. ::

@nequip.model.model_builder
def my_new_model_builder(arg1, arg2):
return model(arg1, arg2)


.. autofunction:: nequip.model.model_builder

Dtypes in Model Building
------------------------
``model_dtype`` is imposed by using ``torch.set_default_dtype()`` to set the default ``dtype`` to ``model_dtype`` for the duration of model building, such that parameter tensors created during model building will be in the default ``dtype``, which was set to ``model_dtype``.

0 comments on commit 1c2295c

Please sign in to comment.