title: Python - I was given pickle files that contain XGBoost models. How do I find the details of the file?
body: <p>For a work project, I was given two pickle files. I was told that these pickles have XGBoost models so I installed XGBoost. I was able to load them using this command</p>
  
  <pre><code>import pickle
  filename = 'model.pickle'
  loaded_model = pickle.load(open(filename, 'rb'))
  print(type(loaded_model))
  </code></pre>
  
  <p>which produces</p>
  
  <pre><code>&lt;class 'xgboost.sklearn.XGBClassifier'&gt;
  </code></pre>
  
  <p>However, I don't know what the name of the inputs that are required to run this model. I found this command from another XGBoost tutorial here: <a href="https://machinelearningmastery.com/save-gradient-boosting-models-xgboost-python/" rel="nofollow noreferrer">https://machinelearningmastery.com/save-gradient-boosting-models-xgboost-python/</a>:</p>
  
  <pre><code>result = loaded_model.score(X_test, y_test)
  </code></pre>
  
  <p>But this does not work as the X_test and y_test are not defined. I need to find out the actual names of X_test and y_test sets as well as the contains of the pickle. Also, how do I explore the contents of this pickle? I would like to view everything inside this XGBoost pickle.</p>