google-research / torchsde

Differentiable SDE solvers with GPU support and efficient sensitivity analysis.
Apache License 2.0
1.52k stars 195 forks source link

Python version #14

Closed patrick-kidger closed 3 years ago

patrick-kidger commented 3 years ago

Can we pick a Python version to support? I'd suggest >=3.6.

Future statements: currently used are absolute_import, division and print_function. As far as I know these only affect Python 2 which is out of support anyway. Should we really include them?

Likewise, the setting of annotations to {} seems unnecessary to me. The minimum verison of Python now supported by PyTorch is 3.6, and type annotations were introduced in 3.5 I believe.

I think we're already demanding at least Python 3.3 for the @property@abstractmethod to work.

lxuechen commented 3 years ago

Good point. Some of these were legacy code. Sending in a fix on dev.

lxuechen commented 3 years ago

The setting of annotations to {} is so that we don't get a huge list of type hints when we call help on the function/module. I personally find it helpful.

Open to suggestions that accomplish this in a better way!

patrick-kidger commented 3 years ago

Sounds good to me!