How can we optimize the hyperparameters of Gaussian Process Regression in Sklearn?

The hyperparameters of the Gaussian process regression can be optimized using Gradient descent or Swarm Intelligence algorithms. However, how can we implement such algorithms in sklearn? The GaussianProcessRegressor method of sklearn has an argument called optimizer. I think we can use this argument for optimization with other optimization algorithms. How can we do it programmatically? Is there any Swarm Intelligence library that can be used in Sklearn platform?

Thank you.