> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fiddler.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Ranking Model

> Learn how to customize your ranking model artifact and upload it to Fiddler. See how a custom artifact can improve model explainability.

# Ranking Model

> 🚧 Note
>
> For more information on uploading a model artifact to Fiddler, see [Uploading a Model Artifact](/developers/python-client-guides/explainability/uploading-model-artifacts).

Suppose you would like to upload a model artifact for a **ranking model**.

Following is an example of what the `package.py` script may look like.

```python theme={null}
import pickle
from pathlib import Path
import pandas as pd

PACKAGE_PATH = Path(__file__).parent

class ModelPackage:

    def __init__(self):
        self.output_columns = ['score']
        with open(f'{PACKAGE_PATH}/model.pkl', 'rb') as infile:
            self.model = pickle.load(infile)
    
    def predict(self, input_df):
        pred = self.model.predict(input_df)
        return pd.DataFrame(pred, columns=self.output_columns)
    
def get_model():
    return ModelPackage()
```

Here, we are assuming that the model prediction column that has been specified in the [`fdl.ModelSpec`](/sdk-api/python-client/model-spec) object is called `score`.

Please checkout this [quickstart notebook](/developers/tutorials/ml-monitoring/ranking-model) to work through an example of onboarding a ranking model on to Fiddler.
