8442321b9b7a7cef7e3806b525965c36cea1549e,examples/60_search/example_parallel_manual_spawning.py,,,#,97

Before Change


processes = []
spawn_classifier = get_spawn_classifier(X_train, y_train)
for i in range(4):  // set this at roughly half of your cores
    p = multiprocessing.Process(
        target=spawn_classifier,
        args=(i, "breast_cancer"),
    )
    p.start()
    processes.append(p)
for p in processes:
    p.join()

After Change


            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()
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: automl/auto-sklearn
Commit Name: 8442321b9b7a7cef7e3806b525965c36cea1549e
Time: 2020-09-25
Author: feurerm@informatik.uni-freiburg.de
File Name: examples/60_search/example_parallel_manual_spawning.py
Class Name:
Method Name:


Project Name: keras-team/keras
Commit Name: 71a791cb71ef7080ea150152633a90e7821070af
Time: 2017-09-21
Author: myutwo150@users.noreply.github.com
File Name: tests/keras/applications/applications_test.py
Class Name:
Method Name: test_inceptionresnetv2_variable_input_channels


Project Name: keras-team/keras
Commit Name: 9a50d7bece2e09093f7eec251fc2be5736b131da
Time: 2018-01-09
Author: myutwo150@users.noreply.github.com
File Name: tests/keras/applications/applications_test.py
Class Name:
Method Name: test_densenet_variable_input_channels