facebookincubator / submitit

Python 3.8+ toolbox for submitting jobs to Slurm
MIT License
1.3k stars 125 forks source link

Enable python executable selection for local executor #1750

Closed jrapin closed 1 year ago

jrapin commented 1 year ago

Can we make this a bit more general? Then again it will never work for DebugExecutor Also: should we test this? how?

gwenzek commented 1 year ago

if you want to test it you could try to submit lambda: sys.executable from the current python and the system python (/usr/bin/python). It won't be pretty portable across distributions, but you can skip the test if /usr/bin/python doesn't exist.

otherwise it improves consistency with SlurmExecutor so I think it's a good addition

jrapin commented 1 year ago

if you want to test it you could try to submit lambda: sys.executable from the current python and the system python (/usr/bin/python). It won't be pretty portable across distributions, but you can skip the test if /usr/bin/python doesn't exist.

We need an(other) env with a submitit install though right ? :s We could build one with the wheel, then again for just this I'm not sure it's worth it :s I've added a test on auto executor using sys.executable, but that's basically the default so no much use.

otherwise it improves consistency with SlurmExecutor so I think it's a good addition

Do we want to upgrade it to autoconf directly? Sometimes I think yes (easier than writing different variables for local and slurm) and sometimes no (what if we would like different envs, and debug executor wont be able to use it in any case)

EternalGoldenBraid commented 1 year ago

Edit: Nevermind. This was a misunderstanding on my part. Had issues with passing a custom python executable command from hydra --> hydra_submitit --> submitit. Resolved with https://github.com/facebookresearch/hydra/compare/main...EternalGoldenBraid:hydra_submitit_container:main