Publish Models to the SAS Metadata Repository

About Publishing Models to the SAS Metadata Repository

SAS Model Manager publishes a model by creating a MiningResult object in the SAS Metadata Repository. You can use the model information in the MiningResult object to set up a scoring environment. A scoring application might use SAS Data Integration Studio or SAS Enterprise Guide to access the metadata and run a batch job or stored process that executes the score code. SAS Real-Time Decision Manager can also read the metadata and use it in that process environment. If you publish a project champion model or other models, the scoring application always uses the most current champion model.
Note: SAS Model Manager cannot publish R models.
SAS Model Manager uses the SAS Folders view to publish the model to any folder that is accessible to the user. These folders include all folders in the SAS Foundation repository and folders in custom repositories that are created in SAS Management Console to reflect the structure of your business organization.
These are the tasks that you perform to publish models:

Publish a Model

To publish a model, follow these steps:
  1. Right-click the model that you want to Publish and select Publish Model from the pop-up menu. The SAS Metadata Repository window appears. SAS Model Manager displays metadata folders.
    SAS Metadata Repository Window
  2. Select the folder to store the model. You must have permission to write to this folder.
    Note: If you created your own subfolders, then select a folder to store the metadata for the published model.
  3. Enter the name for the model and click Save. If a MiningResult object is in the repository that has the same name as the object, then you are asked whether to overwrite the metadata for this stored object. Additionally, if a MiningResult object is in the repository that has the same model UUID, you are asked whether you want to continue with publishing the model.
    Note: Do not overwrite an existing MiningResult object unless you are certain that the model is from the same project in SAS Model Manager.
Note: If the score code for the model changes, then publish the model again to ensure that your score application uses the current scoring code. If you change the status of model that has been published, then it is recommended that you publish the model again. For example, flag or clear a model as a challenger, or set or clear a model as champion.

Publish a Project Champion Model

To publish the champion model for a project, you must have already set a model as the champion. When a champion model is selected, the version that contains the mode is automatically set as the default version for the project. SAS Model Manager examines the project and always publishes the champion model in the default version. When the champion model for a project changes and you publish the model again at the project level, the scoring application automatically uses the latest score code.
Note: SAS Model Manager cannot publish R models.
To publish the champion model for a project, follow these steps:
  1. Verify that the project that you want to publish has a champion model assigned. Select the project folder to examine its properties. The Default Version property contains the name of the default version.
  2. Right-click the project name and select Publish Modelsthen selectto the SAS Metadata Repository from the pop-up menu. If the project is not locked, you are prompted to confirm publishing the champion model. The SAS Metadata Repository window appears. SAS Model Manager displays the metadata folders.
  3. Select a folder to which you want to publish the model.
  4. Click OK. If a MiningResult object is in the repository that has the same name as the object, then you are asked whether to overwrite the metadata for this stored object. Additionally, if a MiningResult object is in the repository that has the same champion model UUID, you are asked whether you want to continue with publishing the model.
    Note: Do not overwrite an existing MiningResult object unless you are certain that the project is from the same project in SAS Model Manager.

Verify the Model Publish

To verify that SAS Model Manager successfully created the MiningResult object in the SAS Metadata Repository for an published model, use SAS Management Console. To view the contents of the published model or project, you can use SAS Data Integration Studio. You can also use SAS Management Console to export the MiningResult object to a SAS package.
To view a MiningResult object in the SAS Metadata Repository, follow these steps:
  1. In SAS Management Console, open a SAS Model Manager metadata profile that connects to the SAS Metadata Server.
  2. From the SAS Management Console Folders tab, expand the folder to which you published the model. When you select the folder, the right pane lists the MiningResult objects for the exported models.
  3. Right-click the MiningResult object that has the name of published model or project and select Properties from the pop-up menu. The Properties window appears.
  4. Examine the Keywords box on the General tab to verify that the MiningResult object contains the UUID of the published project or model.
    Note: You can use the UUID to conduct filtered searches and query the published models. For more information, see Query Folders, Projects, and Versions.
  5. Examine the metadata on the Advanced tab to determine when the MiningResult object was created or most recently updated.
  6. Click OK.