Appearance
Module Development Guide
Please follow the recommended guidelines for your module script development:
- Python version - We recommend using the latest Python 3 version. We do not support Python 2.
- Execution limit - Main script must be a short-lived script that does not persist. Execution limit is 10 minutes maximum.
- Dependencies (optional) - If your script has dependencies, include a
requirements.txt. Avoid obsolete/abandoned packages. - Absolute paths - Avoid absolute paths or hard-coded paths. We provision a work directory for your script during runtime.
Runtime Environment
Please note the following limitations in our runtime environment:
- Execution time - Execution cannot exceed 10 minutes.
- Space limit - The work directory is limited to 512 megabytes of disk space.
- Read-only mode - With the exception of the work directory, all files and directory are set in read-only mode.
Models
We recommend you use Git LFS to handle your models if they exceed a size limit imposed by your repository provider. Alternatively, you can bundle all your scripts and model binaries into a zip file.
Reserved Parameters/Arguments
Your module is expected to accept input parameters. If your script uses positional parameters, please reserve the first parameter as the working directory. If your script uses named parameters, please reserve the parameter name --work_dir. The --work_dir is the path to the directory where you create your temporary files and result files.
We have other parameters that are not passed to your script. However, they are reserved for internal use.
projectjobdescription
How To Use This Form
There are two modes of deploying your Python scripts.
Upload Method with GitHub Repository (recommended)
Prepare your Python scripts from a GitHub repository. If you are using a private repository, install the deployment key. Enter the repository link and the name of the main script (also known as the entry point).
Upload Method with Manual Script Uploads
Attach your main script or a zip archive of your repository.
Arguments
For inputs using positional parameters, the order determines where the parameter will be placed (recall that the first parameter is reserved). Here is a sample of how the positional inputs will be executed where ipm.py is the main script:
bash
python ipm.py {work_dir} {user defined input 1} {user defined input 2} ...For output, let's suppose that the script will create two files: labels.csv and result.png. In that case, define a CSV output and an image file output. Note that the ordering does not matter.
Supported Input
- Image file - extensions include
jpg,tif,png, andbmp - Image[] - an array of image files
- CSV file
- Range - a numeric input within a range
- Number - a single numeric value
- Text - a string
- Number[] - an array of numeric values that can optionally be a fixed size
- Text[] - an array of string values that can optionally be a fixed size
Supported Output
- Image file
- CSV file
Note: We are actively expanding the list of supported input/output types based on demand. If you have an input type that is not in our list, please contact our administrator for assistance.
