Comments (9)
Regarding your observation, I think it's mostly a documentation issue.
This PR in ConfigSpace seems to indicate that Forbidden clauses between Hyperparameters, not just constants, is possible.
https://github.com/automl/ConfigSpace/pull/245/files
How I might handle this is something like the following:
- a separate config structure to define conditions and forbidden clauses
- I can probably help with the json schema when we get to it, but I think something like the following to start with might be OK:
{ "constraints": [ { // "op_name": ["param_name_1", "param_name_2"] --> param_name_1 {op_name} param_name_2 "less_than": ["param_a", "param_b"] }, { // Would have to be converted to a reverse "ForbiddenGreaterThanRelation" internally "less_than_equal": ["param_c", "param_d"], }, { "equal": ["param_x", "param_y"], }, ... ] }
- I can probably help with the json schema when we get to it, but I think something like the following to start with might be OK:
- allow them to span different TunableGroups definitions (e.g., VM Environment TunableGroups and App Environment TunableGroups)
- when converting from TunableGroups to ConfigSpace, apply the Forbidden constraints only for Tunables that exist in the set (e.g., if a Condition exists declaring
vm_ram > buffer_pool_size
, butvm_ram
is not in the included TunableGroups, issue a Warning but omit it)
Since not all backend optimizers support ConfigSpace (e.g., FLAML) we might also need to implement an internal "rejection" method inside mlos_bench
for this (e.g., automatically report a bad value back when a suggested value returned by the optimizer is invalid)
from mlos.
Thanks for getting back to me about this, I will go over the linked documentation/PRs and reach out once I have a better idea of the approach.
from mlos.
Some things to note:
- TunableGroups provide reusable parameter specifications for individual Environments (e.g., VM, OS, App)
- They can be combined in an Experiment to do cross Environment co-tuning.
- Constraints may similarly need to be specified both within a TunableGroup and across TunableGroups. For instance:
app.min_file_size < app.max_file_size
app.buff_size_mb < (vm.ram_size_gb - 1) * 1024
This will require some care in thinking through what the config specification looks like as well as how to handle it in either TunableGroups vs ConfigSpace conversions or else automatic enforcement in the mlos_bench.Optimizer side of things.
from mlos.
Hi @bpkroth,
I had a look at the Conditions and the ForbiddenCluases. However, I am unsure how to implement conditions between hyperparameters. I think the conditions work on the child hyperparameter based on the parent hyperparameter and value. On the other hand, the forbidden clauses work on a hyperparameter/value(s) pair. From what I understand, we can't directly add a condition between two hyperparameters, is this correct or am I missing something here?
Thanks,
Pooja
from mlos.
I haven't thought through the full implementation in mlos_bench yet, but it likely starts with something here:
- https://github.com/microsoft/MLOS/tree/main/mlos_bench/mlos_bench/config/schemas/tunables
- https://github.com/microsoft/MLOS/blob/main/mlos_bench/mlos_bench/tunables/tunable_groups.py
- https://github.com/microsoft/MLOS/blob/main/mlos_bench/mlos_bench/optimizers/convert_configspace.py
from mlos.
@motus any other thoughts?
from mlos.
from mlos.
FWIW: automl/ConfigSpace#352
from mlos.
Hi @poojanilangekar, I am maintaining ConfigSpace and hopefully we can get towards making this possible :)
from mlos.
Related Issues (20)
- Quantized tunables missing check for quantization alignment in `is_valid` check.
- Config support for pluggable Schedulers
- Tests for Scheduler classes
- Clean up the traces and other temp files after running remote commands on Azure VMs
- Increment iteration counter in `.suggest()` instead of `.register()`
- Document "known" variables in mlos_bench
- Revamp number of iterations vs. number of configs tracking HOT 1
- Get rid of deprecated functions like `datetime.utcnow()`
- ConfigSpace crashes with Python 3.12 HOT 2
- Implement `TrialData.objectives` accessor HOT 1
- mlos_bench_service HOT 2
- Capture VM metadata
- Security: Azure switch to Managed Identities HOT 2
- Security: Azure Storage: Avoid using (shared) storage account keys
- CI Failure due to latest matplotlib version
- Allow user to specify "context" metrics to pass to the optimizer
- Consider dropping support for python 3.8 and/or 3.9
- mlos_bench.storage APIs: extend support to retrieve the full set of metric IDs for an experiment
- Allow Environment configs to report the metrics they expose
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mlos.