A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.snowflake.com/en/sql-reference/commands-model-function below:

Website Navigation


Model function commands | Snowflake Documentation

Model function commands

Model function commands allow you to see the functions (also called methods) of machine learning models.

You can create and manage models and their methods in Python using the Snowpark Model Registry API.

Calling model methods

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.

Methods are attached to specific model versions. To invoke a method on the default version of a model, use the syntax shown below, passing arguments to the method, if any, between the parentheses, and providing the name of the table containing the inference data in the FROM clause.

SELECT MODEL(<model_name>)!<method_name>(...) FROM <table_name>;

Copy

To invoke a method of a specific version of a model, first create an alias to the specific version of the model using WITH, then invoke the desired function through the alias.

SELECT MODEL(<model_name>,<version_or_alias_name>)!<method_name>(...) FROM <table_name>;

Copy

For example, to call the latest version of a model through the LAST alias:

SELECT MODEL(my_model,LAST)!predict(...) FROM my_table;

Copy


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4