You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The threading backend only has a single test, the multiprocessing and dask backends are not tested at all.
Much of the testing is parameter TypeError testing, which is not testing BatchSimulate's functionality so much as it is testing _validate_type and _check_option. I hate to say it, but I think many of these tests can be removed. Relatedly, I will make an issue for introducing typing and type-checking for the codebase as a whole. I'm fine with leaving these tests in until we get more formal type-checking implemented, however.
Hi @asoplata , I agree with everything you've mentioned regarding the testing and using loky. I didn't add the Dask backend for testing, as this repo doesn't currently include it as a dependency, but if needed, it can be installed separately
It's arguably hacky, but we could also try using psutil to track processes with specific names in our testing, ensuring that the appropriate number are created, etc.
Hi @asoplata , I agree with everything you've mentioned regarding the testing and using loky. I didn't add the Dask backend for testing, as this repo doesn't currently include it as a dependency, but if needed, it can be installed separately
Thanks @samadpls , yes most of these BatchSimulation test refactors are TODO tasks that existed before your PR. We definitely appreciate your contributions!
Thank you for the clarification! I will ensure it is useful and maintainable for future development. If you need any changes, please let me know. I'm happy to improve the structure and functionality.
Currently, testing of
BatchSimulate
is very incomplete.Importantly, as @ntolley pointed out here ENH: Refactor
BatchSimulate
Example and Improve Documentation #857 (comment) , we need a way to test that theloky
backend not only creates multiple workers, but actually uses the multiple parallel workers, in parallel. I think we may have to actually useloky
directly in our tests for this (see ENH: RefactorBatchSimulate
Example and Improve Documentation #857 (comment) ).The
threading
backend only has a single test, themultiprocessing
anddask
backends are not tested at all.Much of the testing is parameter
TypeError
testing, which is not testingBatchSimulate
's functionality so much as it is testing_validate_type
and_check_option
. I hate to say it, but I think many of these tests can be removed. Relatedly, I will make an issue for introducing typing and type-checking for the codebase as a whole. I'm fine with leaving these tests in until we get more formal type-checking implemented, however.Relatedly, we should consider dropping the 'multiprocessing' backend as an option, since it has quirks in Joblib and, judging from joblib's documentation, is effectively replaced by
loky
(see https://joblib.readthedocs.io/en/stable/parallel.html#old-multiprocessing-backend ).The text was updated successfully, but these errors were encountered: