Model Export and Upload

Back in the Jupyter Notebook, you need to convert the Turi Create model to CoreML format.

While other types of models can be used, CoreML is a solid starting point because Apple has made it SO easy to integrate them in your Xcode environment.

Converting to CoreML in Python.

Next, import the Skafos Python SDK. With your API token, get a summary of all of the Skafos Apps and Models for which you have access. This will help you find where this model version needs to be uploaded.

Run the Skafos summary command.

You can find your existing API tokens, generate new ones, and revoke old ones on your account settings page. The summary JSON response will look something like:

[

{

"org_name": "<your-org-name>",

"app_name": "<your-app-name>",

"model_name": "<your-model-name>"

},

]

Now that you have a token and summary of models, replace the org/app/model names below with your own. Check out this guide on best practices for setting up your dev environment when using the Python SDK.

Set your connection parameters and upload a model version to Skafos.

Finally, navigate to your Skafos dashboard and verify that your new model is there!

Model management tab on the dashboard.

Deploy this model (or any model) to your app by clicking the Deploy button. You will be presented with two environment groups: Dev or Prod. In your iOS app, the keys you set in the AppDelegate.swift file dictate the environment from which models will be downloaded.

That’s it! You can do this as many times as you need to iterate on your model. You can upload to Skafos, deploy to Dev or Prod as needed, or roll back to older model versions if there’s an issue. No need to re-release through the App Store to get out model updates to your user base. Period.