Process finished with exit code 134 (interrupted by signal 6: SIGABRT) using GridSearchCV

  error-handling, gridsearchcv, python

I want to tune my Hyperparameter with GridSearchCV from sklearn. I don’t know if it is important but I run it on PyCharm on the new Apple M1 MacBook. After running the code below I always geht the error: Process finished with exit code 134 (interrupted by signal 6: SIGABRT)

# Sequential API
def create_model(learning_rate=0.01):
    model = Sequential()
    model.add(Dense(128, activation='relu'))
    model.add(Dense(32, activation='relu'))
    model.add(Dense(1))
    opt = keras.optimizers.Adam(learning_rate=learning_rate)
    model.compile(optimizer=opt,
                loss='mean_squared_error',
                metrics=['mae', 'mean_absolute_percentage_error'])

    return model

# Hyperparameter Tuning
model = KerasRegressor(build_fn=create_model, verbose=0)
param_grid = {'learning_rate': [0.001, 0.01, 0.1]}
grid = GridSearchCV(estimator=model, param_grid=param_grid)
grid.fit(X_train, Y_train)
print(grid.best_params_)

There are different issues here (like Python – Process finished with exit code 134 (interrupted by signal 6: SIGABRT) – turtle module or Python node2vec (Gensim Word2Vec) "Process finished with exit code 134 (interrupted by signal 6: SIGABRT)") with the same error but the answers didn’t help me. Hopefully someone can help me with my issue.

Source: Python Questions

LEAVE A COMMENT