Notebooks
M
Microsoft
E2E Phi 3 MLflow CustomPythonWrapper

E2E Phi 3 MLflow CustomPythonWrapper

codemicrosoft-phi-cookbook06.E2E

Running Phi-3 model in MLFlow


This notebook describes the use of a custom Python wrapper on the example of Phi-3 mini 4K Instruct.

[1]

Defining custom Python class for Phi-3 Mini 4K model

[2]

Generating MLFlow artifact

[3]
2024/06/18 14:17:34 INFO mlflow.models.utils: We convert input dictionaries to pandas DataFrames such that each key represents a column, collectively constituting a single row of data. If you would like to save data as multiple rows, please convert your data to a pandas DataFrame before passing to input_example.
Downloading artifacts:   0%|          | 0/10 [00:00<?, ?it/s]

Running Phi-3 as MLFlow model

[4]
[5]
inputs: 
,  ['prompt': string (required)]
,outputs: 
,  [string (required)]
,params: 
,  None
[6]
 Alright, here's a little atom-related joke for you!

Why don't electrons ever play hide and seek with protons?

Because good luck finding them when they're always "sharing" their electrons!

Remember, this is all in good fun, and we're just having a little atomic-level humor!