List of pluggable functions
The following functions are currently hard-coded and it would be nice to have a plugin-like interface to give users better control over them:
-
collate_batch : function to tell how sample of different size could be batched together. Currently: pad with -1 to the right up to the size of the biggest element in the batch -
Logging statistics during training: What to report ? Currently, report MSE only I think. -
Loss function: User should be able to define their own loss function in addition to use those of pytorch -
Network (!51 (merged) implements a method for plugging in new networks by subclassing dnadna.nets.DNANDANet
; like everything else here this still needs to be documented) -
Simulators + config templates -
Optimizer (added in !99 (merged), though needs more documentation) -
other function ?
For the different plugins, the workflow should be somehow identical. This could be something like this (maybe @embray you can detail it a bit more if I'm off)
-
write own function
-
make dnadna point toward it (e.g, in a config file "lossFunc": "path/to/myloss.py")
-
possibility to call dnadna to list the set of functions for a given plugin, which would help in understanding that one's function is correctly built, e.g:
$ dnadna plugin loss list MSELoss L1Loss ...See more losses here : https://pytorch.org/docs/master/nn.html#loss-functions myloss
Edited by Elliot Maître