The following sections will walk you through a brief introduction to using a custom app on the Nextmv Platform. You will:
- Sign up for an account at https://cloud.nextmv.io.
- Sign up for a free trial of a Plan (includes a 14-day free trial) to access custom models. Note plan can be changed or canceled at any time without fees.
- Install a Nextmv client.
- Nextmvify your model.
- Push your model to Nextmv cloud.
- Make a remote run.
1. Sign up for an account
First, sign up for a free Nextmv account (see the limits of a free plan on the Nextmv Pricing page).
2. Sign up for a free trial of a Plan
After completing the sign up process, log in and you should land on the main Nextmv Marketplace page. In the top right corner, you should see an Upgrade
button. You can select either Innovator or Scale-up depending on your needs. This comes with a 14-day free trial which can be canceled or changed without any fees.
Alternatively, you can contact support@nextmv.io
requesting access to Custom apps. (For security reasons, we need to verify you are a human either with your credit card or via a discussion with support).
3. Install a Nextmv client
Python developers can pip install nextmv
to gain access to the Nextmv Python SDK containing helpful constructs for common patterns in decision models. Additionally, the Python SDK can be used to push your custom model up to the Nextmv cloud.
For non-Python developers, you can install the Nextmv CLI which is only needed if not using the Python SDK.
4. Nextmvify your custom app
Now, you're ready to Nextmvify your custom app to run on the Nextmv cloud.
a. Input is JSON, TEXT, or CSV and read from a file or stdin
First, make sure your input can be read from a file or stdin and is JSON, TEXT, or CSV.
If reading from a file or files (required for CSV), your input data must be nested in and read from a folder called input
in your model code. This ensures we can find your input and execute it appropriately on the Nextmv Platform.
For Python users, you may use the load_local
function from the Nextmv Python SDK; however, it is not required. If you are loading multiple CSVs from the input folder, your code might look like this:
Note, you may choose to expose configuration of your model via CLI flags. For Python users, you may optionally use the Options
and Parameter
functions from the Nextmv Python SDK, and your code might look like this:
load_local
then receives these custom options.
If you are reading your input from stdin instead, you may also use load_local
without specifying any arguments.
b. Statistics written to stdout
Next, you may add statistics to your model and write them to stdout. While this is not required to run on the platform, it is required to conduct Nextmv Experiments. Statistics must conform to the Nextmv statistics convention in order to be picked up automatically in your Nextmv Console run history and Nextmv Experiments.
For Python users, you may optionally use the Output
function from the Nextmv Python SDK and your code might look like this:
c. Logs written to stderr
Next, ensure your logs are written to stderr.
For Python users, you may optionally use the log
function from the Nextmv Python SDK and your code might look like this:
d. Output is JSON, TEXT, or CSV and written to a file or stdout and
Next, make sure your model writes a solution to a file or stdout and is JSON, TEXT, or CSV. If reading from a file or files (required for CSV), your output data must be written to a folder called output
in your model code. This ensures we can find your output and render it appropriately on the Nextmv Console.
For Python users, you may optionally use the write_local
function to write an Output
from the Nextmv Python SDK, and your code might look like this:
Where options.output
is optional (required only for models with CSV input regardless of output type).
f. Add an app manifest at the root of your project
Lastly, to Nextmvify your model, you must add an app manifest at the root of your project which will tell the Nextmv platform what runtime and requirements are needed to execute your custom model. For Python users, your app manifest might look like this:
5. Push your custom model to the Nextmv Cloud
Now that your model is Nextmvified, you can push your model to the Nextmv Cloud.
6. Run your new app
Now, you can visit the Nextmv Console. Click into your apps icon on the left, and select your app. From your appโs main details view, click the Run app button. This will load an empty user interface for adding the input and configuration for your run.
Paste in your input if JSON or upload a file for non-JSON inputs. Modify configuration if you exposed any configuration in your model.
Next, click the Start run button to run your app. This will load a new screen where you can view the details of your app run. Your run status will start with either queued
or running
and will move to successful
once it has completed.
Once the status reaches succeeded
click on the Result tab to view the result of your run. You should either see your solution output or a button to download the output.
Next steps
๐๐๐ You completed this brief introduction to using custom apps on the Nextmv Decision Platform. Here are some next steps:
- See the solvers that are supported.
- Begin exploring scenario tests and other experiments