Skip to content

Commit

Permalink
Gv/doc3 (#119)
Browse files Browse the repository at this point in the history
* u

* Update README.md

* Update GS101_core_objects.ipynb

* Update GS111_first_model.ipynb

* Update GS121_modules.ipynb

* Update GS101_core_objects.ipynb

* Update GS111_first_model.ipynb

* Update GS121_modules.ipynb

* Update GS131_methods.ipynb

* Update GS131_methods.ipynb

* Update GS141_applications.ipynb

* Update GS141_applications.ipynb

* Update GS141_applications.ipynb

* Update GS151_models.ipynb

* Update GS151_models.ipynb

* Update GS161_components.ipynb

* Update GS171_blocks.ipynb

* Update GS181_configure.ipynb

* Update GS191_styles.ipynb

* Update setup.py

* Update DT101_files.ipynb

* Update DT111_style.ipynb

* Update DT121_overview.ipynb

* Update DT131_applications.ipynb

* Delete Building an application.ipynb

* Update DT131_applications.ipynb

* Delete Building a model.ipynb

* Update DT141_models.ipynb

* Update DT131_applications.ipynb

* Delete Building a component.ipynb

* Create DT151_components.ipynb

* Delete Building an operation.ipynb

* Create DT161_operations.ipynb

* Update DT151_components.ipynb

* Update DT131_applications.ipynb

* u

* Create DT171_blocks.ipynb

* Delete Building a block.ipynb

* Create DT181_internals.ipynb

* Delete Deeplay Internals.ipynb

* bm docs

* Revise

---------

Co-authored-by: Benjamin Midtvedt <[email protected]>
  • Loading branch information
giovannivolpe and BenjaminMidtvedt authored Aug 13, 2024
1 parent 9705dd3 commit 233aaad
Show file tree
Hide file tree
Showing 21 changed files with 3,461 additions and 670 deletions.
18 changes: 13 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
Deeplay is a deep learning library in Python that extends PyTorch with additional functionalities focused on modularity and reusability. It facilitates the definition, training, and adjustment of neural networks by introducing dynamic modification capabilities for model components after their initial creation. Deeplay seeks to address the common issue of rigid and non-reusable modules in PyTorch projects by offering a system that allows for easy customization and optimization of neural network components.
Deeplay is a deep learning library in Python that extends PyTorch with additional functionalities focused on modularity and reusability. Deeplay seeks to address the common issue of rigid and non-reusable modules in PyTorch projects by offering a system that allows for easy customization and optimization of neural network components. Specifically, it facilitates the definition, training, and adjustment of neural networks by introducing dynamic modification capabilities for model components after their initial creation.

# Core Philosophy

The core philosophy of Deeplay is to enhance flexibility in the construction and adaptation of neural networks. It is built on the observation that PyTorch modules often lack reusability across projects, leading to redundant implementations. Deeplay enables properties of neural network submodules to be changed post-creation, supporting seamless integration of these modifications. Its design is based on a hierarchy of abstractions from models down to layers, emphasizing compatibility and easy transformation of components. This can be summarized aqs follows:
The core philosophy of Deeplay is to enhance flexibility in the construction and adaptation of neural networks. It is built on the observation that PyTorch modules often lack reusability across projects, leading to redundant implementations. Deeplay enables properties of neural network submodules to be changed post-creation, supporting seamless integration of these modifications. Its design is based on a hierarchy of abstractions from models down to layers, emphasizing compatibility and easy transformation of components. This can be summarized as follows:

- **Enhance Flexibility:** Neural networks defined using Deeplay should be fully adaptable by the user, allowing dynamic modifications to model components. This should be possible without the author of the model having to anticipate all potential changes in advance.
- **Promote Reusability:** Deeplay components should be immediately reusable across different projects and models. This reusability should extend to both the components themselves and the modifications made to them.
- **Support Seamless Integration:** Modifications to model blocks and components should be possible without the user worrying about breaking the model's compatibility with other parts of the network. Deeplay should handle these integrations automatically as far as possible.
- **Hierarchy of Abstractions:** Neural networks and deep learning are fundamentally hierarchical, with each level of abstraction being mostly agnostic to the details of the levels below it. An application should be agnostic to which model it uses, a model should be agnostic to the specifics of the components it uses, a component should be agnostic to the specifics of the blocks it uses, and so on. Deeplay reflects this hierarchy in its design.
- **Hierarchy of Abstractions:** Neural networks and deep learning are fundamentally hierarchical, with each level of abstraction being mostly agnostic to the details of the levels below it. An *application* should be agnostic to which model it uses, a *model* should be agnostic to the specifics of the components it uses, a *component* should be agnostic to the specifics of the blocks it uses, and a *block* should be agnostic to the specifics of the *layers* it uses . Deeplay reflects this hierarchy in its design.

# Deeplay Compared to Torch

Expand Down Expand Up @@ -89,8 +89,16 @@ Here you find a series of notebooks tailored for Deeplay's developers:

- DT111 **[Style Guide](https://github.com/DeepTrackAI/deeplay/blob/develop/tutorials/developers/DT111_style.ipynb)**

- DT121 **[Deeplay Classes Overview](https://github.com/DeepTrackAI/deeplay/blob/develop/tutorials/developers/DT121_overview.ipynb)**
- DT121 **[Overview of Deeplay Classes](https://github.com/DeepTrackAI/deeplay/blob/develop/tutorials/developers/DT121_overview.ipynb)**

- DT131 **[Deeplay Applications](https://github.com/DeepTrackAI/deeplay/blob/develop/tutorials/developers/DT131_applications.ipynb)**

- DT141 **[Deeplay Models](https://github.com/DeepTrackAI/deeplay/blob/develop/tutorials/developers/DT141_models.ipynb)**
- DT141 **[Deeplay Models](https://github.com/DeepTrackAI/deeplay/blob/develop/tutorials/developers/DT141_models.ipynb)**

- DT151 **[Deeplay Components](https://github.com/DeepTrackAI/deeplay/blob/develop/tutorials/developers/DT151_components.ipynb)**

- DT161 **[Deeplay Operations](https://github.com/DeepTrackAI/deeplay/blob/develop/tutorials/developers/DT151_operations.ipynb)**

- DT171 **[Deeplay Blocks](https://github.com/DeepTrackAI/deeplay/blob/develop/tutorials/developers/DT171_vlocks.ipynb)**

- DT181 **[Overview of Deeplay Internal Structure](https://github.com/DeepTrackAI/deeplay/blob/develop/tutorials/developers/DT181_internals.ipynb)**
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

setup(
name="deeplay",
version="0.0.7",
version="0.1.0",
license="MIT",
packages=find_packages(),
author=(
Expand Down
38 changes: 21 additions & 17 deletions tutorials/developers/DT101_files.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
"Deeplay contains the following files at the root level:\n",
"- `.gitignore`: Contains the files to be ingnored by GIT.\n",
"- `.pylintrc`: Configuration file for the pylint tool. It contains the rules for code formatting and style.\n",
"- `LICENSE.txt`: License file for the project.\n",
"- `README.md`: Project's README file\n",
"- `LICENSE.txt`: Deeplay's project license.\n",
"- `README.md`: Deeplay's project README file\n",
"- `requirements.txt`: File containing the dependencies for the project.\n",
"- `setup.cfg`: Configuration file for the setup tool. It contains the metadata for the project.\n",
"- `setup.py`: Setup file for the project. It contains the instructions for installing the project.\n",
"especially the warning to be ignored.\n",
"- `stylestubgen.py`: Script to generate the style stubs for the project. These are type hints for the style system. It creates .pyi files for select classes in the project, and adds overrides to the `.style()` method to enforce the type hints. It also handles the doc strings for the styles in the same way."
"- `setup.cfg`: Configuration file for the setup tool. It contains the metadata for the Deeplay's project.\n",
"- `setup.py`: Setup file for the Deeplay's project. It contains the instructions for installing the Deeplay's project.\n",
"especially the warnings to be ignored.\n",
"- `stylestubgen.py`: Script to generate the style stubs for the Deeplay's project. These are type hints for the style system. It creates .pyi files for select classes in the project, and adds overrides to the `.style()` method to enforce the type hints. It also handles the doc strings for the styles in the same way."
]
},
{
Expand Down Expand Up @@ -93,7 +93,11 @@
"\n",
"- `trainer.py`\n",
"\n",
" This file contains the `Trainer` class, which is used to train models in the Deeplay library. It extends the Lightning `Trainer` class."
" This file contains the `Trainer` class, which is used to train models in the Deeplay library. It extends the Lightning `Trainer` class.\n",
"\n",
"- `shapes.py`\n",
"\n",
" This files contains the `Variable`class. ### TO BE COMPLETED"
]
},
{
Expand All @@ -110,39 +114,39 @@
"\n",
" Contains the reusable components of the library. These are generally built as a combination of blocks. They are more flexible than full models, but less flexible than blocks.\n",
"\n",
"- `applications`\n",
"- `models`\n",
"\n",
" This directory contains the classes and functions related to applications in the Deeplay library. Applications are classes that contain the training logic for specific tasks, such as classification, regression, segmentation, etc. They handle all the details of training a model for a specific task, except for the model architecture.\n",
" This directory contains the models of the library. These are the full models that are used for training and inference. They are built from blocks and components, and are less flexible than both. They generally represent a specific architecture, such as `ResNet`, `UNet`, etc. \n",
"\n",
" Generally, the individual applications will be placed in further subdirectories, such as `classification`, `regression`, `segmentation`, etc. However, this is less strict than the root level file structure.\n",
"- `applications`\n",
"\n",
"- `models`\n",
" This directory contains the classes and functions related to applications in the Deeplay library. Applications are classes that contain the training logic for specific tasks, such as classification, regression, segmentation. They handle all the details of training a model for a specific task, except for the model architecture, which is typically provided as a model.\n",
"\n",
" Contains the models of the library. These are the full models that are used for training and inference. They are built from blocks and components, and are less flexible than both. They generally represent a specific architecture, such as `ResNet`, `UNet`, etc. \n",
" Generally, the individual applications will be placed in further subdirectories, such as `classification`, `regression`, `segmentation`. However, this is less strict than the root level file structure.\n",
"\n",
"- `initializers`\n",
"\n",
" Contains the classes for initializing the weights of the models.\n",
" This directory contains the classes for initializing the weights of the models.\n",
"\n",
"- `callbacks`\n",
"\n",
" Contains deeplay specific callbacks. Mainly the logging of the training history and the custom progress bar.\n",
" This directory contains deeplay specific callbacks. Mainly the logging of the training history and the custom progress bar.\n",
"\n",
"- `external`\n",
"\n",
" Contains logic for interacting with external classes and object, such as from `torch`. Most important objects are `Layer` and `Optimizer`.\n",
" This directory contains logic for interacting with external classes and object, such as from `torch`. Most important objects are `Layer` and `Optimizer`.\n",
"\n",
"- `ops`\n",
"\n",
" Contains individual operations that are used in the blocks and components. These are generally low-level, non-trainable operations, such as `Reshape`, `Cat`, etc. They act like individual layers.\n",
" This directory contains individual operations that are used in the blocks and components. These are generally low-level, non-trainable operations, such as `Reshape` and `Cat`. They act like individual layers.\n",
"\n",
"- `activelearning`\n",
"\n",
" This directory contains the classes and functions related to active learning in the Deeplay library. This includes application wrappers, criterion, and dataset classes.\n",
"\n",
"- `tests`\n",
"\n",
" Contains the tests for the library. These are used to ensure that the library is working correctly and to catch any bugs that may arise."
" This directory contains the unit tests for the library. These are used to ensure that the library is working correctly and to catch any bugs that may arise."
]
}
],
Expand Down
Loading

0 comments on commit 233aaad

Please sign in to comment.