How to Send a Parquet File to an MLflow Model Server
Besides JSON and CSV, an MLflow model server reads Parquet, the column-based file format pandas and many data tools write. MLflow's guide doesn't mention it, but the server lists it among the types it accepts: application/vnd.apache.parquet. A Parquet file stores each column's type, so the server gets decimals as decimals. This guide sends one, with real output from MLflow 3.18.0.
Syntax
- macOS / Linux
- Windows (PowerShell)
curl http://HOST:PORT/invocations -H "Content-Type: application/vnd.apache.parquet" --data-binary @FILE.parquet
Invoke-RestMethod http://HOST:PORT/invocations -Method Post -ContentType "application/vnd.apache.parquet" -InFile FILE.parquet
| Part | What it means |
|---|---|
application/vnd.apache.parquet | The content type the server reads as Parquet |
--data-binary @FILE.parquet | Sends the file's bytes unchanged; -InFile in PowerShell |
Where the type comes from: the server's answer to an unknown type lists the three it accepts, ['text/csv', 'application/json', 'application/vnd.apache.parquet'], and MLflow 3.18.0's mlflow/pyfunc/scoring_server/__init__.py reads a Parquet body with pandas.read_parquet.
Prerequisites
- An MLflow tracking server at
http://127.0.0.1:8080, such asmlflow server --port 8080. mlflowandscikit-learnin your project, for example withuv add mlflow scikit-learn pandas. MLflow installspyarrow, which pandas needs to write Parquet.
Step 1: Log a Model and Write a Parquet File
The example fits a Lasso regression on scikit-learn's diabetes data, which predicts how far the disease progresses in a year from ten measurements, and saves two patients with pandas' to_parquet:

import mlflow
from sklearn.datasets import load_diabetes
from sklearn.linear_model import Lasso
mlflow.set_tracking_uri("http://127.0.0.1:8080")
mlflow.set_experiment("parquet-request-example")
X, y = load_diabetes(return_X_y=True, as_frame=True)
model = Lasso(alpha=0.1).fit(X, y)
with mlflow.start_run():
info = mlflow.sklearn.log_model(model, name="model", input_example=X.head(3))
print("Model URI:", info.model_uri)
X.head(2).to_parquet("patients.parquet", index=False)
uv run python log_parquet_model.py
Model URI: models:/m-8a7987aef3064333b88e1ad487a65095
Step 2: Serve the Model
- macOS / Linux
- Windows (PowerShell)
export MLFLOW_TRACKING_URI=http://127.0.0.1:8080
uv run mlflow models serve -m "models:/m-8a7987aef3064333b88e1ad487a65095" -p 5001 --env-manager uv
$env:MLFLOW_TRACKING_URI = "http://127.0.0.1:8080"
uv run mlflow models serve -m "models:/m-8a7987aef3064333b88e1ad487a65095" -p 5001 --env-manager uv
Step 3: Send the Parquet File
- macOS / Linux
- Windows (PowerShell)
curl http://127.0.0.1:5001/invocations -H "Content-Type: application/vnd.apache.parquet" --data-binary @patients.parquet
{"predictions": [202.6686592452554, 73.83952927045901]}
Invoke-RestMethod http://127.0.0.1:5001/invocations -Method Post -ContentType "application/vnd.apache.parquet" -InFile patients.parquet
predictions
-----------
{202.668659245255, 73.839529270459}

One prediction per patient: a progression score of about 203 for the first and 74 for the second.
Common Mistakes
| Mistake | What happens | Do this instead |
|---|---|---|
--data @patients.parquet | curl removes the file's line-break bytes, and the server can't read what's left | --data-binary |
Content-Type: application/octet-stream | 415: the server accepts only its three types | application/vnd.apache.parquet |
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
Failed to parse input as a Pandas DataFrame ... Could not open Parquet input source '<Buffer>': Parquet file size is 5632 bytes, smaller than the size reported by footer's | The file was sent with --data, which changed its bytes | Send it with --data-binary |
Model is missing inputs | The file's columns don't match the signature | Write the same columns the model was trained on |
FAQ
Why send Parquet instead of CSV?
A Parquet file stores each column's type with the data, so nothing has to be read back from text: decimals arrive as decimals.
Is Parquet documented?
Not in MLflow's guide to the local server, which lists CSV and JSON. The server's own list of accepted types, in its 415 answer, includes it.
Conclusion
Two patients saved with to_parquet and sent with Content-Type: application/vnd.apache.parquet and --data-binary came back from the diabetes model as two predictions, 202.67 and 73.84.
Additional Resources
- pandas.DataFrame.to_parquet — writing a Parquet file.
- Deploy MLflow Model as a Local Inference Server — the server's documented formats.
