Commit 75f54d89 authored by Valerio Maggio's avatar Valerio Maggio
Browse files

specialised instructions to re-create virtual env and settings

parent d2f73d96
......@@ -2,9 +2,124 @@
Code repository and Replication package attached as supplementary material to the paper
entitled
**Distillation of the clinical algorithm improves prognosis by multi-task
deep learning in high-risk neuroblastoma**
**Distillation of clinical algorithm by multi-task deep learning in high-risk Neuroblastoma**
by _Valerio Maggio, Marco Chierici, Giuseppe Jurman, Cesare Furlanello_.
---
## Structure of the Repository
This repository collects the source code and the entire replication package for the CDRP Project.
In more details, the folders contained in the repo are structured in this way:
* `code`: Folder containing the implementation of the CDRP deep learning multi-task network,
along with the entire code base used to run experiments as reported in the paper.
* `data`: Folder containing used Neuroblastoma datasets, namely `**SEQC**` and `**TARGET**`.
* `net_weights`: The __HR Embedding weights__ used to train the
`CDRP-A + CDRP-N` deep network model.
* `notebooks`: Collection of Jupyter notebooks used to generate plots of results, and
statistics on the **TARGET-NB** dataset.
* `requirements.txt`: File containing the list of Python packages required to recreate
the development environment (see instructions below for details).
## Replicate Development Environment
The best way to replicate the settings of the development environment used
to run the experiments is creating a _Python virtual environment_ in which
required packages are installed.
Instructions and steps to create the _virtual environment_, and
to install necessary Python packages are reported below.
##### 1. Setup Python Virtual Environment
The suggested way to create the virtual environment is by using
the [**pyenv**](https://github.com/pyenv/pyenv) tool, and
the [**pyenv-virtualenv**](https://github.com/pyenv/pyenv-virtualenv) plugin.
These tool have been used as they are going to become the default ones to
create and manage virtual environment in the upcoming releases of Python.
For detailed instructions on how to install `pyenv`, and `pyenv-virtualenv` please refer
to the official documentation:
- [pyenv installation](https://github.com/pyenv/pyenv#installation)
- [pyenv-virtualenv installation](https://github.com/pyenv/pyenv-virtualenv#installation)
##### 2. Create & Activate `cdrp-env` Python Virtual Environment
###### 2.1 Python version
Be sure to have the right version of Python installed, i.e. `Python 3.6.5`. To do so, type
```bash
pyenv versions
```
`Python 3.6.5` should be included in the list of available Python versions.
If this is not the case, please type:
```bash
pyenv install 3.6.5
```
###### 2.2 Create the virtual environment
To enable the `cdrp-env` virtual environment, it is first required to
create the environment:
```bash
pyenv virtualenv 3.6.5 cdrp-env
```
###### 2.3 Activate the Virtual Environment
```bash
pyenv activate cdrp-env
```
You should now see something similar to
```bash
(cdrp-env) $
```
in your Shell prompt.
###### 2.4 Install dependencies and Packages
The list of required Python packages are listed in the `requirements.txt` file,
available [here](requirements.txt)
It is possible to install all these dependencies in one shot by typing:
```bash
pip install -r requirements.txt
```
> Note: Please note that the `requirements.txt` file includes a reference to
the `tensorflow-gpu` package, which is the **TensorFlow** package supporting GPU computing.
If you have no GPU available, please __substitute__ the corresponding line in the file
with `tensorflow==1.8.0` to install the CPU-only TensorFlow version.
As for the experiments conducted for the paper,
**CUDA 9** with **CuDNN 7.1** libraries have been used.
####### 2.4.1 mlpy dependency
The [**mlpy**](https://gitlab.fbk.eu/MPBA/mlpy) package is required by the **DAP** module
as an external dependency.
To install mlpy, please type:
```bash
# mlpy 3.5.0
pip install git+https://gitlab.fbk.eu/MPBA/mlpy.git
```
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment