Files
2026-07-13 13:22:34 +08:00

14 lines
392 B
Python

from mlflow.models import ModelConfig, set_model
from mlflow.pyfunc import PythonModel
base_config = ModelConfig(development_config="tests/pyfunc/sample_code/config.yml")
class MyModel(PythonModel):
def predict(self, context, model_input):
timeout = base_config.get("timeout")
return f"Predict called with input {model_input}, timeout {timeout}"
set_model(MyModel())