Am I supposed to do two separate cross validations? One for hyper parameters and one for model parameters? What is the correct procedure to optimize hyper parameters?
I'm doing a 10 fold cross validation to find the best performing xgboost model. I'm then taking the model that performed best and using random search or grid search to optimize the hyper parameters nrounds, eta, gamma, min child weight, and max depth. The results of the optimization always show the original hyper parameters are best. I must be biasing the model to the original hyper parameters through the 10 fold cross validation. Am I supposed to do two separate cross validations? One for hyper parameters and one for model parameters?
 A: In general:
When you do a cross validation with 10 fold, you are actually making this folds for hyper parameter optimization already. Imagine you have a 5 fold instead.
4 folds are train (pink), 1 fold is the validation set (or test set of your fold) (blue) for your hyperparameters. If your hyperparameters are optimized you can then test this hyperparameter combination on your test set (violet), with a predict method.

When you use GridSearch or RandomizedSearch there is already a cv option inside:
https://scikit-learn.org/stable/modules/generated/sklearn.model_selection.GridSearchCV.html
The GridSearchCV already has CV in its name and a cv option where you can insert an int for the amount of folds you wanna do (there is also a default option).
The Grid and RadnomizedSearchCV are a convenient way of not doing an extra fold command before predicting the performance of your model on the test data.
So to answer your question, you do the cv only once, within the GridsearchCV command (or RandomizedCV, whatever you prefer):
GridSearchCV(estimator=estimator,
             param_grid={'gamma': [1, 10], ...)}), cv=10)

Besides, if you mean model parameters are coefficients, they will be automatically trained by the method, the hyperparameters will be trained by the fold. So basically, you do this two steps as you described it, at once in the kfolds. Because of that you only need one fold method.
