GFNOrg / torchgfn

GFlowNet library
https://torchgfn.readthedocs.io/en/latest/
Other
209 stars 26 forks source link

typeguard / CI #133

Open saleml opened 1 year ago

saleml commented 1 year ago

Reading through the code for this file, it seems like a lot of the explicit typing of parameters on any given function is directly related to the return type of another function. For these examples throughout the class, I updated these to use a `FooBarTensor` type defined at the top of the file as a constant and shared throughout. Hopefully this makes the TT types easier to audit/fix in the future. Although it seems like, unless we use `typeguard`, these rules aren't explicitly enforced. Perhaps this is something we should do / see if we can do in CI at least?

Originally posted by @marpaia in https://github.com/saleml/torchgfn/issues/132#issuecomment-1699379626