Hi Swapna,

Thanks for the FLIP and sorry for the late reply. After reading it, I have some 
comments about the proposal.

1. I notice that the parameter `model-directory-path` is introduced. It should 
work but I see that some popular python model libraries like `transformer` and 
`vllm`, tend to directly use the parameter name `model` which could be a local 
path or a simple name like `Qwen/Qwen3-0.6B`. Then they check if `model` is a 
path or a simple name and automatically download it to local cache directory if 
necessary. Considering use cases  based these libraries, maybe  
`model-directory-path` can be renamed to `model` which can be either a real 
path or a simple model name.

2. There is a `set_model_config`  in the python PredictFunction interface. I 
find that in the previous discussion, you are considering passing 
PredictRuntimeContext in `open`. I do agree with this choice as well, which 
makes the logic more clear and uses can just use the configs in the `open` 
method to init their model. I just find that the FLIP still has the 
`set_model_config` so just want to double check it here.



Thanks for your time!

Best,
Biao Geng

> 2025年9月22日 23:36,Swapna Marru <[email protected]> 写道:
> 
> Hi Devs,
> 
> 
> I am interested in learning more about MODEL, ML_PREDICT, and ML_EVALUATE
> functionalities added in the following FLIP.
> 
> https://cwiki.apache.org/confluence/display/FLINK/FLIP-437%3A+Support+ML+Models+in+Flink+SQL
> 
> 
> I see the original FLIP has extensibility to local model providers in Flink.
> 
> 
> Is there a way to do pluggable local model providers in Python? Like, say,
> generate embeddings using Sentence transformer models running locally in
> Flink.
> 
> 
> An option could be to introduce a Model Provider factory implementation in
> Java that internally uses a predict function in Python . But I see this
> puts in a lot of work related to Java to Python communication/translation
> inside the provider.
> 
> 
> Something like PythonRuntimeProvider along with PredictRuntimeProvider /
> AsyncRuntimeProvider which can handle Java -> Python translations out of
> the box would be helpful to de-duplicate that effort.
> 
> 
> Can you please point to, if there are any discussions related to this
> already ? Or any other ways to achieve the same? Please share your thoughts.
> 
> 
> -Thanks,
> 
> Swapna Marru

Reply via email to