模型函数命令
模型函数命令允许您查看机器学习模型的函数(也称为方法)。
You can create and manage models and their methods in Python using the Snowpark Model Registry API.
调用模型方法
You can call or invoke methods of a model using the MODEL(model_name)!method_name(...) syntax. The methods
available on a model are determined by the underlying Python model class. For example, many types of models use a method
named predict for inference.
方法附加到特定的模型版本。要调用模型默认版本的方法,请使用下面显示的语法,在括号中传递方法的实参(如果有的话),并在 FROM 子句中提供包含推理数据的表的名称。
要调用特定版本模型的方法,首先使用 WITH 创建对该模型特定版本的别名,然后通过该别名调用所需的函数。
例如,要通过 LAST 别名调用模型的最新版本,请执行以下操作: