Skip to content

Commit

Permalink
Addressed reviewers comments
Browse files Browse the repository at this point in the history
  • Loading branch information
PicoCentauri committed Dec 13, 2023
1 parent fe0ab0a commit 6f1f4e2
Show file tree
Hide file tree
Showing 17 changed files with 123 additions and 1,317 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -164,3 +164,4 @@ cython_debug/

# model output directories
outputs/
examples/*.xyz
6 changes: 3 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ Having problems or ideas?
-------------------------

Having a problem with metatensor-models? Please let us know by `submitting an issue
<https://github.com/ceriottm/MeshLODE/issues>`_.
<https://github.com/metatensor-models/issues>`_.

Submit new features or bug fixes through a `pull request
<https://github.com/ceriottm/MeshLODE/pulls>`_.
<https://github.com/metatensor-models/pulls>`_.

.. marker-contributing
Expand All @@ -73,7 +73,7 @@ Contributors

Thanks goes to all people that make metatensor-models possible:

.. image:: https://contrib.rocks/image?repo=ceriottm/MeshLODE
.. image:: https://contrib.rocks/image?repo=metatensor-models
:target: https://github.com/lab-cosmo/metatensor-models/graphs/contributors

.. |tests| image:: https://github.com/lab-cosmo/metatensor-models/workflows/Tests/badge.svg
Expand Down
2 changes: 1 addition & 1 deletion docs/src/getting-started/index.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Getting started
===============

This sections describes, how to install the package, and its most basic commands.
This sections describes how to install the package, and its most basic commands.

.. toctree::
:maxdepth: 1
Expand Down
21 changes: 13 additions & 8 deletions docs/src/getting-started/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ general help of `metatensor-models` can be accessed using

.. code-block:: bash
metatensor-models -h
metatensor-models --help
We now demonstrate how to `train` and `evaluate` a model from the command line. For this
example we use the :ref:`architecture-soap-bpnn` architecture and a subset of the `QM9
Expand All @@ -16,11 +16,14 @@ from our :download:`website <../../static/qm9_reduced_100.xyz>`.
Training
########

For performing a model training in `metatensor-models` uses the hydra framework. Hydra
allows to dynamical composition and override of config files and the command line and
has powerful tools to create multiple training runs with a single command. We will not
explain here how to use hydra in detail, as we only use a few functions ins this example
but rather refer to their good package documentation.
To train models, `metatensor-models` uses the hydra framework. Hydra is a framework
developed by Facebook AI for elegantly configuring complex applications. It's primarily
used for managing command-line arguments in Python applications, allowing for a
structured and dynamic approach to configuration. It allows to dynamical composition and
override of config files and the command line and has powerful tools to create multiple
training runs with a single command. We will not explain here how to use hydra in
detail, as we only use a few functions ins this example but rather refer to their good
package documentation.

The sub-command to start a model training is

Expand All @@ -47,8 +50,9 @@ created. By default, this output directory is used to store Hydra output for the
behavior in the parameter file. To start the training using the ``parameters.yaml`` in
the current directory type.

.. literalinclude:: ../../../examples/train.sh
.. literalinclude:: ../../../examples/usage.sh
:language: bash
:lines: 3-8


Evaluation
Expand All @@ -60,5 +64,6 @@ The sub-command to evaluate a already trained model is
metatensor-models eval
.. literalinclude:: ../../../examples/eval.sh
.. literalinclude:: ../../../examples/usage.sh
:language: bash
:lines: 9-
17 changes: 4 additions & 13 deletions docs/static/parameters.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,9 @@
defaults:
- architecture: soap_bpnn # the architecture we will use to train a model
- _self_ # mandatory parameter to avoid hydra warnings
- architecture: soap_bpnn # architecture used to train the model

architecture:
# Optional section to override the default parameters of the architecture
soap:
cutoff: 7.5

# Optional section to override the default parameters of the trainer
training:
batch_size: 8
num_epochs: 1

# Positional sectopn defining the parameters for structure and target data
# Section defining the parameters for structure and target data
dataset:
structure_path: "qm9_reduced_100.xyz" # file where the positions are stored
targets_path: "qm9_reduced_100.xyz" # file with target values (i.e energies)
target_value: "U0" # the name of the target value in `targets_path` used for training
target_value: "U0" # name of the target value in `targets_path`
21 changes: 0 additions & 21 deletions examples/eval.sh

This file was deleted.

Loading

0 comments on commit 6f1f4e2

Please sign in to comment.