Get Started with the CLI¶
Mobile machine learning projects can be messy. By the time an app is ready to ship, it’s not uncommon to have trained hundreds of models experimenting with different architectures, hyperparameters, and formats. Keeping all of these assets organized for rapid prototyping and evaluation is the key to delivering better mobile apps in less time. The Fritz CLI lets you manage all of your mobile machine learning models and and easily evaluate their in-app performance right from your terminal.
Here are just a few things you can do with the Fritz CLI:
- See all of the models you have trained and uploaded to Fritz AI.
- View model configurations and metadata for any specific version of a model.
- Upload and download model checkpoints to and from Fritz AI.
- Deploy new model versions to a mobile app without releasing a new build.
- Automatically set up a new Xcode or Android Studio project for mobile machine learning with Fritz AI.
We’ve made all of these capabilities available directly from the command line to streamline your workflow and reduce the need to switch between tools.
Let’s walk through some of the ways the Fritz CLI can help you build great ML-powered apps.
- Python 3 required
Install via Pip¶
$ pip install fritz
Make sure that your version of pip is using python 3. If not, you can install it using
pip3 install fritz
Configure your API Key¶
Once installed, you’ll need to configure the CLI connect to your account. If you haven’t already, you’ll need to sign up for an account<https://www.fritz.ai/pricing/>.
To configure the CLI, login to your account and select Training from the menu on the left. On the right, you’ll find a box labeled Python Library Config with a command that has been pre-populated with your API and Project ID. Copy this command and run it in your terminal.$ fritz config update \ --api-key <Your API Key will be here> \ --project-id <Your Project ID will be here>
Now the Fritz CLI will be configured for this account and project. If you have multiple projects, you can switch between them by running the
fritz config updatecommand again with a different
To see all of your projects, run fritz projects. Take the project id and then run
fritz config update --project-id=<your desired project id>.