args=(cluster.scheduler_address,),
)
process_python_worker.start()
process_cli_worker = multiprocessing.Process(
target=start_cli_worker,
args=(cluster.scheduler_address,),
)process_cli_worker.start()
// Wait a second for workers to become available
time.sleep(1)
automl = AutoSklearnClassifier(
time_left_for_this_task=30,
per_run_time_limit=10,
ml_memory_limit=1024,
tmp_folder=tmp_folder,
output_folder=output_folder,
seed=777,
// n_jobs is ignored internally as we pass a dask client.
n_jobs=1,
// Pass a dask client which connects to the previously constructed cluster.
dask_client=client,
)
automl.fit(X_train, y_train)
automl.fit_ensemble(
y_train,
task=MULTICLASS_CLASSIFICATION,
dataset_name="digits",
ensemble_size=20,
ensemble_nbest=50,
)
predictions = automl.predict(X_test)
print(automl.sprint_statistics())
print("Accuracy score", sklearn.metrics.accuracy_score(y_test, predictions))
// Wait until all workers are closed
process_python_worker.join()
process_cli_worker.join()