FLAML
FLAML copied to clipboard
Enable running FLAML using the -O flag for the python interpreter
by implementing regular control flow without relying on exception semantics
Why are these changes needed?
The code of the user defined function the parameters of which FLAML is being used to optimize might make some expensive assertions which were designed to be turned off during the optimization process by passing the -O
option as an interpreter flag.
Related issue number
Closes #981
Checks
- [x] Checked whether Ray's execution runtime passes the compiler options to worker threads/processes. It appears to do so when running locally, on a single machine.
- [ ] I've included any doc changes needed for https://microsoft.github.io/FLAML/. See https://microsoft.github.io/FLAML/docs/Contribute#documentation to build and test documentation locally.
- [ ] I've added tests (if relevant) corresponding to the changes introduced in this PR.
- [ ] I've made sure all auto checks have passed.
Still need to check whether ray passes interpreter flags to workers in a remote setting, e.g., on an aws cluster.
Still need to check whether ray passes interpreter flags to workers in a remote setting, e.g., on an aws cluster.
Did it and it works by means of setting the PYTHONOPTIMIZE
environment variable.
Looks good. To merge this PR Contributor License Agreement needs to be accepted.
How do I do this? There used to be a message from a bot in this thread about it, but I can't see it any more.
Looks good. To merge this PR Contributor License Agreement needs to be accepted.
How do I do this? There used to be a message from a bot in this thread about it, but I can't see it any more.
Could you create another PR or draft? The bot should appear again there. And you only need to accept it once.