We use black as our code formatter, with line length 88 (default of black). Please install black and format your files accordingly by running python -m black .. The easiest way is to adapt the settings.json in VSCode to format automatically, with the following settings.json:
{
"editor.formatOnSave": true,
"[python]": {
"editor.defaultFormatter": "ms-python.black-formatter",
"editor.formatOnSave": true,
"editor.rulers": [
88
],
},
"black-formatter.args": [
"--line-length",
"88"
]
}
- Implement dataset class following BaseDataset: The dataset class takes the object of a specific dataset as input, e.g. a ShapenetPreprocessedIterator, which stores the paths to the meshes (and some preprocessed data such as SDFs, pointcloud etc). The dataset class needs to implement the
__getitem__method where the desired files are loaded (e.g. sdf_grid.npz), transformed to the representation, and returned as tensor - Add representation/dataset config in the
configs/data/folder, which provides the configuration for initializing the dataset. (See for example sdf) - Add EncoderDecoder class following BaseEncoderDecoder: Most representations are combined with a specific autoencoder (or similar model, e.g. VAE) to encode the representation in a latent vector. The EncoderDecoder class implements the
encodeanddecodemethods to transform to the latent and back. It should be able to load a pretrained model when providing the argumentckpt_path. - Add encoder decoder config This requires two configs: The model specifics (e.g. n_layers) should be defined in a file in
configs/net_encode. In addition, you need to add a wrapper file inconfigs/model: This config file allows hydra to initialize an EncoderDecoderTrainer with your EncoderDecoder model as thenetargument. - Add training config in
configs/experiment: Follow the structure inconfigs/experiment/acc_dualoctree_ae.yamlto specify optimizer, learning rate etc for training the encoder-decoder model on your representation