-
Create a new file called
.autoenv
(this name is excluded from version control in.gitignore
).
You can use it to automatically execute shell commands when entering folder. Add some commands to your.autoenv
file, like in the example below:# activate conda environment conda activate myenv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Build commands: | |
# docker build -t project_name . | |
# docker run --gpus all -it --rm project_name | |
# Build from official Nvidia PyTorch image | |
# GPU-ready with built in Apex mixed-precision support | |
# https://ngc.nvidia.com/catalog/containers/nvidia:pytorch | |
FROM nvcr.io/nvidia/pytorch:21.04-py3 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pytorch_lightning import LightningDataModule | |
from torch_geometric.datasets import TUDataset | |
from torch_geometric.data import DataLoader | |
from sklearn.model_selection import KFold | |
class ProteinsKFoldDataModule(LightningDataModule): | |
def __init__( | |
self, | |
data_dir: str = "data/", |