nnaisense / evotorch

Advanced evolutionary computation library built directly on top of PyTorch, created at NNAISENSE.
https://evotorch.ai
Apache License 2.0
1.01k stars 63 forks source link

Inform the user when `device` is not set correctly #90

Closed engintoklu closed 1 year ago

engintoklu commented 1 year ago

In EvoTorch, the device of a problem must be set as "cpu" if the problem is configured to have multiple actors. With this pull request, when this rule is broken, a detailed error message is shown to the user. The error message also informs the user regarding what to do to fix the error.

codecov[bot] commented 1 year ago

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (9d31d59) 77.83% compared to head (2b0ee41) 76.75%. Report is 5 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #90 +/- ## ========================================== - Coverage 77.83% 76.75% -1.09% ========================================== Files 49 49 Lines 7332 7506 +174 ========================================== + Hits 5707 5761 +54 - Misses 1625 1745 +120 ``` | [Files](https://app.codecov.io/gh/nnaisense/evotorch/pull/90?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=nnaisense) | Coverage Δ | | |---|---|---| | [src/evotorch/core.py](https://app.codecov.io/gh/nnaisense/evotorch/pull/90?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=nnaisense#diff-c3JjL2V2b3RvcmNoL2NvcmUucHk=) | `74.30% <50.00%> (-0.20%)` | :arrow_down: | ... and [14 files with indirect coverage changes](https://app.codecov.io/gh/nnaisense/evotorch/pull/90/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=nnaisense)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.