Optimising Kernel parameters using training data in GaussianProcessRegressor of Scikit-learn
Given scikit-learn's API, you create a separate instance for each optimizer and compare the results to see which optimizer makes better predictions. It would looks something like:

from sklearn.gaussian_process import GaussianProcessRegressor
from sklearn.gaussian_process.kernels import RBF

gp1 = GaussianProcessRegressor(kernel=RBF, optimizer=optimizer1)
gp1.fit(X, y)
y_pred1 = gp1.predict(x)

gp2 = GaussianProcessRegressor(kernel=RBF, optimizer=optimizer2)
gp2.fit(X, y)
y_pred2 = gp2.predict(x)


This blog post gives a general overview of fitting Gaussian Processes, including scikit-learn's GaussianProcessRegressor.