https://github.com/hav4ik/Hydra
Multi-Task Learning Framework on PyTorch. State-of-the-art methods are implemented to effectively train models on multiple tasks.
https://github.com/hav4ik/Hydra
deep-learning multi-objective-optimization multi-task-learning neural-architecture-search pytorch
Last synced: about 2 months ago
JSON representation
Multi-Task Learning Framework on PyTorch. State-of-the-art methods are implemented to effectively train models on multiple tasks.
- Host: GitHub
- URL: https://github.com/hav4ik/Hydra
- Owner: hav4ik
- License: mit
- Created: 2019-04-29T19:42:50.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2019-06-03T19:39:20.000Z (about 6 years ago)
- Last Synced: 2024-11-15T07:34:38.931Z (7 months ago)
- Topics: deep-learning, multi-objective-optimization, multi-task-learning, neural-architecture-search, pytorch
- Language: Python
- Homepage:
- Size: 167 KB
- Stars: 148
- Watchers: 11
- Forks: 15
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Hydra — a Multi-Task Learning Framework
[](https://www.python.org/downloads/release/python-360/)
[](https://pytorch.org/)
[](https://github.com/hav4ik/Hydra/blob/master/LICENSE)
[](https://github.com/hav4ik/Hydra/issues)[Hydra][hydra] is a flexible multi-task learning framework written in [PyTorch 1.0][pytorch]. The following multi-objective optimization algorithms are implemented:
* **Naive** — a separate optimizer for each task
* **Gradients averaging** — average out the gradients to the network's body
* **MGDA** — described in the paper [Multi-Task Learning as Multi-Objective Optimization (NIPS 2018)][mgda]A comprehensive survey on these algorithms (and more) can be found in [this blog article][blog-post].
# Installation
* The code was written on `Python 3.6`. Clone this repository:
git clone https://github.com/hav4ik/Hydra
* It is recommended to use [anaconda][conda] for installation of core packages (since `conda` packages comes with low-level libraries that can optimize the runtime):
conda install pytorch torchvision cudatoolkit=10.0 -c pytorch
conda install numpy pandas scikit-learn* Some of the packages are not available from anaconda, so you can install them using `pip`:
pip install -r requirements.txt
# Getting started
* Examples of configuration files can be found [here][configs-dir]. A minimal example is available in [starter.sh][starter]. Execute it as follows (will train with configurations in [configs/toy_experiments/naive.yaml][naive-yaml]):
./starter.sh naive 50
# Coming soon...
* Proper framework documentation and examples.
[hydra]: https://github.com/hav4ik/Hydra
[conda]: https://docs.conda.io/en/latest/miniconda.html
[pytorch]: https://pytorch.org/
[mgda]: https://papers.nips.cc/paper/7334-multi-task-learning-as-multi-objective-optimization.pdf
[gradnorm]: https://arxiv.org/abs/1711.02257
[starter]: https://github.com/hav4ik/Hydra/blob/master/starter.sh
[configs-dir]: https://github.com/hav4ik/Hydra/tree/master/configs
[naive-yaml]: https://github.com/hav4ik/Hydra/blob/master/configs/toy_experiments/naive.yaml
[blog-post]: https://hav4ik.github.io/articles/mtl-a-practical-survey