Skip to content

Commit

Permalink
Update docs for use cases with EURAC (#253)
Browse files Browse the repository at this point in the history
* begin updating the use case documentation

* add eurac use case to the documentation and small cleanup

* remove reference to doc file that doesn't exist yet

* update documentation for the use cases

* add plugins back
  • Loading branch information
jarlsondre authored Nov 28, 2024
1 parent a8ebf7e commit d05fb75
Show file tree
Hide file tree
Showing 6 changed files with 69 additions and 399 deletions.
130 changes: 10 additions & 120 deletions docs/use-cases/3dgan_doc.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
3DGAN
=====

This section covers the CERN use case that utilizes the `torch-lightning` framework for training and evaluation. Following you can find instructions to execute CERN use case and its integral scripts:
This section covers the CERN use case that utilizes the `torch-lightning` framework
for training and evaluation. Following you can find instructions to execute CERN use
case and its integral scripts:

itwinai x 3DGAN
---------------
Expand All @@ -10,128 +12,16 @@ itwinai x 3DGAN
:parser: myst_parser.sphinx_
:start-line: 2

.. toctree::
:maxdepth: 5

model.py
++++++++

.. literalinclude:: ../../use-cases/3dgan/model.py
:language: python


trainer.py
++++++++++
.. literalinclude:: ../../use-cases/3dgan/trainer.py
:language: python


saver.py
++++++++

.. literalinclude:: ../../use-cases/3dgan/saver.py
:language: python


dataloader.py
+++++++++++++

.. literalinclude:: ../../use-cases/3dgan/dataloader.py
:language: python


config.yaml
+++++++++++

This YAML file defines the pipeline configuration for the CERN use case.

.. literalinclude:: ../../use-cases/3dgan/config.yaml
:language: yaml


create_inference_sample.py
++++++++++++++++++++++++++

This file defines a pipeline configuration for the CERN use case inference.

.. literalinclude:: ../../use-cases/3dgan/create_inference_sample.py
:language: python


Dockerfile
++++++++++

.. literalinclude:: ../../use-cases/3dgan/Dockerfile
:language: bash


SLURM job script for JSC (HDFML system)
+++++++++++++++++++++++++++++++++++++++++

.. literalinclude:: ../../use-cases/3dgan/slurm.jsc.sh
:language: bash


SLURM job script for Vega Supercomputer (GPU partition)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++

.. literalinclude:: ../../use-cases/3dgan/slurm.vega.sh
:language: bash


interLink x 3DGAN
-----------------

This section covers the CERN use case integration with `interLink <https://github.com/interTwin-eu/interLink>`_ using ``itwinai``. The following files are integral to this use case:


.. toctree::
:maxdepth: 5


3dgan-inference-cpu.yaml
++++++++++++++++++++++++

.. literalinclude:: ../../use-cases/3dgan/interLink/3dgan-inference-cpu.yaml
:language: yaml

The CERN use case also has an integration with the ``interLink`` tool. You can find
the relevant files in the
`interLink folder on Github <https://github.com/interTwin-eu/itwinai/tree/main/use-cases/3dgan/interLink>`_.
You can also look at the README for more information:

3dgan-inference.yaml
++++++++++++++++++++

.. literalinclude:: ../../use-cases/3dgan/interLink/3dgan-inference.yaml
:language: yaml


3dgan-train.yaml
++++++++++++++++

.. literalinclude:: ../../use-cases/3dgan/interLink/3dgan-train.yaml
:language: yaml



.. .. automodule:: 3dgan.model
.. :members:
.. :undoc-members:
.. :show-inheritance:
.. .. automodule:: 3dgan.train
.. :members:
.. :undoc-members:
.. :show-inheritance:
.. .. automodule:: 3dgan.trainer
.. :members:
.. :undoc-members:
.. :show-inheritance:
.. .. automodule:: 3dgan.saver
.. :members:
.. :undoc-members:
.. :show-inheritance:
.. .. automodule:: 3dgan.dataloader
.. :members:
.. :undoc-members:
.. :show-inheritance:
.. include:: ../../use-cases/3dgan/interLink/README.md
:parser: myst_parser.sphinx_
:start-line: 0
47 changes: 7 additions & 40 deletions docs/use-cases/cyclones_doc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,47 +3,14 @@ Tropical Cyclones Detection

The code is adapted from the CMCC use case's
`repository <https://github.com/CMCC-Foundation/ml-tropical-cyclones-detection>`_.

To know more on the interTwin tropical cyclones detection use case and its DT, please visit the published deliverables,
`D4.1 <https://zenodo.org/records/10417135>`_,
`D7.1 <https://zenodo.org/records/10417158>`_ and `D7.3 <https://zenodo.org/records/10224252>`_.
To know more on the interTwin tropical cyclones detection use case and its DT, please
visit the published deliverables, `D4.1 <https://zenodo.org/records/10417135>`_,
`D7.1 <https://zenodo.org/records/10417158>`_ and
`D7.3 <https://zenodo.org/records/10224252>`_.
You can find the relevant code in the
`use case's folder on Github <https://github.com/interTwin-eu/itwinai/tree/main/use-cases/cyclones>`_,
or by consulting the use case's README:

.. include:: ../../use-cases/cyclones/README.md
:parser: myst_parser.sphinx_
:start-line: 5

pipeline.yaml
+++++++++++++

This YAML file defines the pipeline configuration for the CMCC use case.

.. literalinclude:: ../../use-cases/cyclones/pipeline.yaml
:language: yaml

train.py
++++++++++
.. literalinclude:: ../../use-cases/cyclones/train.py
:language: python

dataloader.py
+++++++++++++

.. literalinclude:: ../../use-cases/cyclones/dataloader.py
:language: python

trainer.py
++++++++++
.. literalinclude:: ../../use-cases/cyclones/trainer.py
:language: python

startscript
+++++++++++

.. literalinclude:: ../../use-cases/cyclones/startscript.sh
:language: bash

cyclones_vgg.py
+++++++++++++++

.. literalinclude:: ../../use-cases/cyclones/cyclones_vgg.py
:language: python
11 changes: 11 additions & 0 deletions docs/use-cases/eurac_doc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@

EURAC
=====
You can find the relevant code for the EURAC use case in the
`use case's folder on Github <https://github.com/interTwin-eu/itwinai/tree/main/use-cases/eurac>`_,
or by consulting the use case's README:


.. include:: ../../use-cases/eurac/README.md
:parser: myst_parser.sphinx_
:start-line: 2
167 changes: 6 additions & 161 deletions docs/use-cases/mnist_doc.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
MNIST
=====

This section covers the MNIST use case, which utilizes the `torch-lightning` framework for training and evaluation. The following files are integral to this use case:
This section covers the MNIST use case. This use case has been implemented using three
different strategies, ``TensorFlow``, ``PyTorch`` and ``PyTorch Lightning``. You can
find the files relevant to this use case
in the `use case's folder on Github <https://github.com/interTwin-eu/itwinai/tree/main/use-cases/mnist>`_.

For more information on each implementation, consult their respective READMEs:

Torch Lightning
---------------
Expand All @@ -11,169 +16,9 @@ Torch Lightning
:start-line: 2


.. toctree::
:maxdepth: 5

dataloader.py
+++++++++++++

The `dataloader.py` script is responsible for loading the MNIST dataset and preparing it for training.

.. literalinclude:: ../../use-cases/mnist/torch-lightning/dataloader.py
:language: python

.. .. automodule:: torch-lightning.dataloader
.. :members:
.. :undoc-members:
.. :show-inheritance:
config.yaml
+++++++++++

This YAML file defines the pipeline configuration for the MNIST use case. It includes settings for the model, training, and evaluation.

.. literalinclude:: ../../use-cases/mnist/torch-lightning/config.yaml
:language: yaml

startscript
+++++++++++

The `startscript` is a shell script to initiate the training process. It sets up the environment and starts the training using the `train.py` script.

.. literalinclude:: ../../use-cases/mnist/torch-lightning/startscript
:language: bash


utils.py
++++++++

The `utils.py` script includes utility functions and classes that are used across the MNIST use case.

.. literalinclude:: ../../use-cases/mnist/torch-lightning/utils.py
:language: python



This section covers the MNIST use case, which utilizes the `torch` framework for training and evaluation. The following files are integral to this use case:

PyTorch
-------

.. include:: ../../use-cases/mnist/torch/README.md
:parser: myst_parser.sphinx_
:start-line: 2



.. toctree::
:maxdepth: 5

dataloader.py
+++++++++++++

The `dataloader.py` script is responsible for loading the MNIST dataset and preparing it for training.

.. literalinclude:: ../../use-cases/mnist/torch/dataloader.py
:language: python


Dockerfile
++++++++++

.. literalinclude:: ../../use-cases/mnist/torch/Dockerfile
:language: bash


create_inference_sample.py
++++++++++++++++++++++++++

This file defines a pipeline configuration for the MNIST use case inference.

.. literalinclude:: ../../use-cases/mnist/torch/create_inference_sample.py
:language: python

model.py
++++++++

The `model.py` script is responsible for loading a simple model.

.. literalinclude:: ../../use-cases/mnist/torch/model.py
:language: python

config.yaml
+++++++++++

This YAML file defines the pipeline configuration for the MNIST use case. It includes settings for the model, training, and evaluation.

.. literalinclude:: ../../use-cases/mnist/torch/config.yaml
:language: yaml

startscript.sh
++++++++++++++

The `startscript` is a shell script to initiate the training process. It sets up the environment and starts the training using the `train.py` script.

.. literalinclude:: ../../use-cases/mnist/torch/startscript.sh
:language: bash


saver.py
++++++++
...

.. literalinclude:: ../../use-cases/mnist/torch/saver.py
:language: python


runall.sh
+++++++++

.. literalinclude:: ../../use-cases/mnist/torch/runall.sh
:language: bash


slurm.sh
++++++++

.. literalinclude:: ../../use-cases/mnist/torch/slurm.sh
:language: bash



This section covers the MNIST use case, which utilizes the `tensorflow` framework for training and evaluation. The following files are integral to this use case:

Tensorflow
----------

.. toctree::
:maxdepth: 5

dataloader.py
+++++++++++++

The `dataloader.py` script is responsible for loading the MNIST dataset and preparing it for training.

.. literalinclude:: ../../use-cases/mnist/tensorflow/dataloader.py
:language: python


pipeline.yaml
+++++++++++++

This YAML file defines the pipeline configuration for the MNIST use case. It includes settings for the model, training, and evaluation.

.. literalinclude:: ../../use-cases/mnist/tensorflow/pipeline.yaml
:language: yaml


startscript.sh
++++++++++++++

The `startscript` is a shell script to initiate the training pipeline.

.. literalinclude:: ../../use-cases/mnist/tensorflow/startscript.sh
:language: bash




Loading

0 comments on commit d05fb75

Please sign in to comment.