This repository contains the PandioCLI tool to develop and deploy machine learning for streaming data.
pip install pandiocli
Python 3.5 - 3.8 PIP > 20.0.0
Generates a project template in the current working directory at ./example
-
./example/function.pyThis is the file where all of your logic should be placed.
-
./example/requirements.txtThis file should contain all the necessary Python packages to power
function.py. The contents of this will automatically be installed for you when deploying to Pandio's platform. When running locally, make sure to install as you normally wouldpip install -r requirements.txt -
./example/config.pyThis contains non-sensitive configuration parameters for the project. Sensitive configuration parameters are set via the PandioCLI.
Acceptable values are:
'FUNCTION_NAME': 'exampleFunction123',
'CONNECTION_STRING': 'pulsar://localhost:6651',
'ADMIN_API': 'http://localhost:8080',
'TENANT': 'public',
'NAMESPACE': 'default',
'INPUT_TOPICS': ['non-persistent://public/default/in'],
'OUTPUT_TOPICS': ['non-persistent://public/default/out'],
'LOG_TOPIC': 'non-persistent://public/default/log',
'ARTIFACT_STORAGE': "./artifacts"
Package up your function project and upload it to Pandio's platform.
Generates a project template in the current working directory at ./example
-
./example/dataset.pyThis is the file where all of your logic should be placed.
Three things need to be defined to complete the dataset:
-
__init__Establish a connection or load your data. Returns an iterable.
-
nextReturns a single record from the dataset.
-
schemaDefines the schema used for the dataset.
For more information on schemas, see the Schema Registry.
-
-
./example/wrapper.pyThis is a wrapper class for the dataset to allow it to work on the Pandio platform.
Note: You should not need to ever modify this file.
-
./example/requirements.txtThis file should contain all the necessary Python packages to power
dataset.py. The contents of this will automatically be installed for you when deploying to Pandio's platform. When running locally, make sure to install as you normally wouldpip install -r requirements.txt -
./example/config.pyThis contains non-sensitive configuration parameters for the project. Sensitive configuration parameters are set via the PandioCLI.
Acceptable values are:
'FUNCTION_NAME': 'exampleFunction123',
'CONNECTION_STRING': 'pulsar://localhost:6651',
'ADMIN_API': 'http://localhost:8080',
'TENANT': 'public',
'NAMESPACE': 'default',
'INPUT_TOPICS': ['non-persistent://public/default/in'],
'OUTPUT_TOPICS': ['non-persistent://public/default/out'],
'LOG_TOPIC': 'non-persistent://public/default/log'
Additional parameter of --type can be specified to generate a dataset with a template.
Currently supported templates are:
- mysql
- trino
- csv
Package up your dataset project and upload it to Pandio's platform.
This will output the current configuration for the PandioCLI
This will output the current configuration file location for the PandioCLI
This will delete all settings for the PandioCLI
This command allows you to manually set the configuration parameters for PandioCLI
These values are first set when you use the register command.
- PANDIO_CLUSTER
- PANDIO_TENANT
- PANDIO_NAMESPACE
- PANDIO_CLUSTER_TOKEN
- PANDIO_EMAIL
- PANDIO_DATA_TOKEN
Note: These values can be found from inside of your Pandio.com Dashboard
This is a helper method to running the folder_name/runner.py file manually with Python. It includes performance metrics which is helpful to debug excessive resource usage such as memory leaks.
project_folder is the relative path to the project folder from where the command is being executed.
dataset_name is the name of the pandioml.data datasets and generators available inside of PandioML or the relative path to the folder of the dataset generated by the pandiocli dataset generate command.
loops is the number of events to process. Most streams of data are infinite, so this allows iterative testing with limited data.
pipeline_name is the number of events to process. Most streams of data are infinite, so this allows iterative testing with limited data.
This command registers a Pandio.com account for you. An email with a link to verify your registration will be sent.
Once the link is clicked, the local PandioCLI will be configured successfully with your new Pandio account.
If you already have a Pandio.com account, you'll need to use the pandiocli config command to manually set the configuration with values inside of the Pandio.com Dashboard.
All contributions are welcome.
The best ways to get involved are as follows:
-
Issues
This is a great place to report any problems found with PandioCLI. Bugs, inconsistencies, missing documentation, or anything that acted as an obstacle to using PandioCLI.
-
Discussions
This is a great place for anything related to PandioCLI. Propose features, ask questions, highlight use cases, or anything else you can imagine.
If you would like to submit a pull request to this library, please read the contributor guidelines.
PandioCLI is licensed under the SSPL license.