Package: giotto-deep
giotto-deepThe first library to bring seamless integration between topological data
analysis and deep learning on top of PyTorch.
The code for Persformer will be released open-source soon together
with Giotto-deep.
It aims to make the day-to-day of researchers easy, allowing them
to focus on inventing new models and layers rather than dealing
with the more standard deep-learning code.
It comes with optimized implementations for multi-GPU/TPU
computations and the ability to run benchmarks and
hyperparameter optimization in a few lines of code.DocumentationYou can find the documentation of this repository here:https://giotto-ai.github.io/giotto-deep/Run tensorboard for visualizationIn order to analyse the results of your models, you need to starttensorboard. On the terminal, move inside the/examplesfolder. There, run the following command:tensorboard --logdir=runsAfterwards gohereand, after running the notebooks of interest, you will see all the visualization results that you stored in thewriter = SummaryWriter().Install user versionThe simplest way to installgiotto-deepis usingpip:python -m pip install -U giotto-deepIf necessary, this command will also automatically install all the library dependencies.Note:we recommend upgradingpipto a recent version as the above may fail on very old versions.Install dev versionThe first step to install the developer version of the package is togit clonethis repository:git clone https://github.com/giotto-ai/giotto-deep.gitThe change the current working directory to the Repository root folder, e.g.cd giotto-deep.
It is best practice to create a virtual environment for the project, e.g. usingvirtualenv:virtualenv -p python3.9 venvActivate the virtual environment (e.g.source venv/bin/activateon Linux orvenv\Scripts\activateon Windows).First make sure you have upgraded to the last version ofpipwithpython -m pip install --upgrade pipMake sure you have the latest version of pytorch installed.
You can do this by running the following command (if you have a GPU):pip install torch --extra-index-url https://download.pytorch.org/whl/cu113Once you are in the root folder, install the package dynamically with:pip install -e .ContributingThegiotto-deepproject welcomes contributions of all kinds. Please see ourcontributing guidelinesfor more information.We are using pre-commit hooks to ensure that the code is formatted correctly. To install the pre-commit hooks, run the following command from the root folder:pre-commit installThe pre-commit hooks will run automatically before each commit. If you want to run the pre-commit hooks manually, run the following command from the root folder:pre-commit run --all-filesTo run both unit and integration tests onmacOSorLinux, simply run the following command from the root folder:bash local_test.bhTPU support in Google ColabI order to run your analysis on TPU cores, you ca use the following lines:!git clone https://username:token@github.com/giotto-ai/giotto-deep
!ls
!pip uninstall -y tensorflow
!pip install -e giotto-deep/
!pip install cloud-tpu-client==0.10 https://storage.googleapis.com/tpu-pytorch/wheels/torch_xla-1.9-cp37-cp37m-linux_x86_64.whlOnce you have run the lines above, please make sure to restart the runtime.The code will automatically detect the TPU core and use it as default to run the experiments. GPUs are also automatically supported.