-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Better dtype
handling
#148
Comments
Personally, I don't like the global
I would rather say we remove the set global dtype otions and models should use the dtype they get from the dataset. The current implementation in mixed and was a compromise we did. |
I agree with @PicoCentauri: if we allow setting global dtype, this mean that importing We can add a lint rule to forbid the use of |
I will make the dtypes explicit everywhere. @Luthaf do you know how to do such a lint rule? |
Writing a flake8 plugin (https://flake8.pycqa.org/en/latest/plugin-development/index.html) would be one solution, or we could use a grep-based linting script. |
At the moment, we have that all the readers have a dtype argument with the
torch.float64
default. However, with our current global dtype model, this does not make much sense and it makes maintaining the tests quite difficult at times (see #146). I would propose to remove the dtype argument and always use the global dtype, so as to make the logic consistent with our current dtype handling. I do not see it breaking our code in any way, because we always use the global dtype.This could be changed in the future.
@PicoCentauri
The text was updated successfully, but these errors were encountered: