SMAC3 icon indicating copy to clipboard operation
SMAC3 copied to clipboard

[Q] SMAC4MF and {'limit_resources': True}

Open mhlr opened this issue 2 years ago • 5 comments

When I set {... 'limit_resources': True ...} in my scenario, the optimization exists in under a minute regardless of what I set 'cutoff' to and all the costs in the run history are 2147483647.0 indicating that all the runs were terminated even though the cutoff was 2 minutes.

This only happens with the dask based facades SMAC4MF and HB4AC. Is there something extra I need to do to make pynisher work with these facades, or is this not supported?

mhlr avatar Apr 18 '22 07:04 mhlr

Which operating system are you using?

renesass avatar Apr 18 '22 10:04 renesass

Ubuntu 20.04 ... running under WSL2 though :( WSL2 does support forking and Linux systems apis in general. Looks like pynisher & dask work separately, but not together though.

mhlr avatar Apr 18 '22 10:04 mhlr

Yeah, we are well aware of this problem. We are working on pynisher to make it work for all operating systems: https://github.com/automl/pynisher/tree/api_changes

renesass avatar Apr 19 '22 07:04 renesass

@eddiebergman Do you know whether this is fixed with the latest pynisher version?

alexandertornede avatar Mar 30 '23 09:03 alexandertornede

In another project I've used pynisher within a function submitted to a dask client successfully. Hence, I can't really tell if it's fixed for this user.

Some helpful debugging info for the original poster:

from pynisher import limit

for limit in ["cpu_time", "wall_time", "memory", "decorator"]:
    print(f"Supports {limit} - {supports(limit)}")

I'm also unsure of the interactions of WSL running in ubuntu. This block of code within pynisher is responsible for picking the limiter to apply.

https://github.com/automl/pynisher/blob/a4594c6bc2db91bc4f495cddcffe4b6d8c7175a9/pynisher/limiters/limiter.py#L209-L239

If the dask client uses one platform and your main process uses a different platform, I'm also unsure of behaviour.

Lastly, there are some known limitations which we do not know how to solve and may apply here, notably with Windows for this case: https://github.com/automl/pynisher/tree/main#features

Here's the repo if you need: Pynisher documentation

eddiebergman avatar Mar 30 '23 11:03 eddiebergman