- 23 May 2023
- Updated On 23 May 2023
Function As A Service (FaaS) enables users to deploy packages and run services from them, with access to computing resources and data from the Dataloop system. It is a flexible platform that provides outstanding capabilities and allows users to achieve their needs and requirements while automating many processes. Functions run in the FaaS framework often make extensive use of Dataloop Python SDK, to interact with the platform. For detailed SDK guides, read here.
Functions run in the FaaS framework often make extensive use of Dataloop Python SDK, to interact with the platform. For detailed SDK guides, read here.
Upload codebase files
- Connect codebase from GIT
- Codebase version update
Deploy Docker file
Connect to Docker registry
Deploy package as a service
Invoke a single Dataloop entity or a list of entities to functions (items, annotations, datasets, recipes etc)
Analyze service performance (service analytics)
Debug services using VS-Code console
Configure compute used by service
- Instance type (selected from catalogue)
How Does it Work
A Package is installed by uploading files or connecting the codebase from Git
- Packages should have well-defined classes structure
- Classes contain the different functions
- Modules translate and define classes
A Service is a package deployed using defined compute resources
- Init method - runs on service initialization
- Execution- Functions invocation on items or other entities is considered an Execution
Trigger is a service configuration for automatic invocation of items (or other entities) to functions based on schedule or event-criteria.
- CRON Trigger - Schedule based trigger, e.g. every 1 hour, 1 day etc
- Event Trigger - Criteria based invocation, e.g. when item is created, updated, deleted etc
Predetermined locations/buttons in the Platform. Assigning a function to one or more specific 'UI Slot' allows users to invoke entities in scope/context (items, annotations, datasets) to selected function.For example - assigning YOLOv5 to the Annotation studio will allow running the model on the item and generate annotations.
Enabling cache in your projects allows services to use cached services, increasing performances while reducing API calls. To activate cache, contact Dataloop
* Working with Dataloop SDK requires having Python installed with the Dtlpy package. Read these instructions for more information.
* Using FaaS requires being a member of an Organization. To become a member of an organization, ask a manager to add you.
IP Address Whitelisting
Hosting FaaS on remote server or having a FaaS sending data/events to one may require whitelisting the IP address used by the Dataloop system. The following list details the respective IP addresses, additional IPs may be added from time to time:
GIT Reference & Examples
For FaaS related developer tutorials and examples, refer to Dataloop GIT tutorials.
Example of functions that perform automation on items and annotations.
There are 3 functions in this package:
- Box to Segmentation - this function receives a box detection annotation and an item and returns a segmentation of the detected object.
- 4 Points - receives a 4 point Polygon that represents object edges and returns object segmentation.
- Auto Annotation - receives an item and auto annotate it using Maskrcnn
git clone https://github.com/dataloop-ai/annotation-automation.git
Example of a function that extracts image Exif information and uploads it to item's metadata.
git clone https://github.com/dataloop-ai/image-exif.git
An example of functions that track bounding-box annotations:
git clone https://github.com/dataloop-ai/video-tracker.git