mirror of
https://github.com/microsoft/autogen.git
synced 2025-08-09 09:12:41 +00:00

* fix a bug when using ray & update ray on aml When using with_parameters(), the config argument must be the first argument in the trainable function. * make training function runnable standalone
18 lines
434 B
Python
18 lines
434 B
Python
from ray_on_aml.core import Ray_On_AML
|
|
from flaml import AutoML
|
|
|
|
|
|
def _test_ray_classification():
|
|
from sklearn.datasets import make_classification
|
|
|
|
X, y = make_classification(1000, 10)
|
|
automl = AutoML()
|
|
automl.fit(X, y, time_budget=10, task="classification", n_concurrent_trials=2)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
ray_on_aml = Ray_On_AML()
|
|
ray = ray_on_aml.getRay()
|
|
if ray:
|
|
_test_ray_classification()
|