# AutoML Model Sharing

It is possible to enable sharing of an AutoML model. This enables one user to train the model, and then for a different user to utilize the generated model on their data to make predictions.

When a training model is run, the notebook is only visible to the first user who executed the train notebook. Similarly, if a second user runs a prediction notebook using the model generated by the first user, the resulting notebook is only visible to the second user. This ensures that data security restrictions are maintained.

## Share an AutoML Model With Another User

Scenario: User Alice wants to share an AutoML model with User Bob.

1. User Alice sets the AutoML workflow parameter *share_model* to True.
![AutoML workflow parameter share_model set to True](/assets/image2023-2-23_19-14-11.062920c9ab56a1fbfe8865e7bdb3d2ddee0d72cdedf6d2faaa56273cf7ac9b4d.3cb60505.png)
2. Alice executes the training workflow and views the resulting notebook to ensure the model was created correctly.
3. Alice views the UUID for the AutoML model in the stored parameters:
4. Navigate to **Data Workbench > Workflows**.
5. Select a workflow and open the Run History.
![Workflow run history list in Data Workbench](/assets/image2023-2-23_19-16-27.e85c36aa4e571f23986bd95ac028c91b5ec89e05345ce1c8678241d9b493ed6f.3cb60505.png)
6. Select the Run History for a successful run.
![Successful workflow run details](/assets/image2023-2-23_19-18-3.2cd4277ef6541f8aa6fb85db81aff43508529ce5067ee9fa6d6239128b09d9f5.3cb60505.png)
7. Select the **Tasks** tab.
8. For a task with an associated notebook, select the ellipsis ( … ) menu and choose **Parameters**.
![Task parameters menu](/assets/image2023-2-23_19-18-55.78cfd9fa24c24598f656884947d315a2be2411323edba7cc8831e48ee903c839.3cb60505.png)
9. The Stored Params shows the shared_model UUID assigned to this AutoML model. Copy the text inside the quotes (highlighted).
![Stored Params showing shared_model UUID](/assets/image2023-2-23_19-19-38.5edeb46329c8d5e82bedb2de3ec5460dfcab35fa751506b807fb8367deaafbbe.3cb60505.png)
10. Send this shared model UUID to User Bob using a secure channel.


## Use a Shared AutoML Model for a Prediction

1. User Bob creates a prediction workflow.
2. Select the **AutoML** tab for this new workflow.
3. Select the notebook workflow to edit.
4. Set the *shared_model* parameter to the UUID provided by Alice.
![Prediction workflow AutoML tab with shared_model parameter](/assets/image2023-2-23_19-22-55.f2ec5699c1379d039e746f2f854aa0596cbff2c2a35cd77e7d04882cbe311b60.3cb60505.png)
5. When using *shared_model*, remove the *model_name* parameter.
6. Select the **Project Revisions** tab.
![Project Revisions tab](/assets/image2023-2-23_19-24-1.bb7db4628ec58c8473a6f9f129ba37467b6c7d67caffc4155d5b4cfe295760fc.3cb60505.png)
7. Edit the workflow to remove the *model_name* parameter.
![Editing workflow removing model_name parameter](/assets/image2023-2-23_19-24-44.760510696c01c81dab0dc91ea1e825f18761f9bb8ba9f9a836c6bce6133f6bd1.3cb60505.png)
8. Run the workflow. Confirm in the workflow log that the correct model was used.
![Workflow log confirming selected shared model](/assets/image2023-2-23_19-25-46.a6ede1eb20bb34a822dbd960ff8d3fa393a645fcbac9255f810ebcfacfabda68.3cb60505.png)