flojoy-ai/studio

Automatically generate manifests from the python node functions

dev-nested opened this issue · 0 comments

Node manifests can be auto generated by reading all the python scripts under the node folder and listing the functions that are decorated with @flojoy decorator.

Here is an example manifest file with multiple parameters and inputs

COMMAND:
  - name: Support Vector Machine
    key: SUPPORT_VECTOR_MACHINE
    type: CLASSIFICATION
    inputs:
      - name: train
        id: train
        type: source
      - name: input
        id: input
        type: source
    parameters:
      target:
        type: string
        default: ""
      kernel:
        type: select
        options:
          - linear
          - poly
          - rbf
          - sigmoid
        default: linear

Potential approach:

  • The node name and key might be based on the function name
  • All the function parameters that are of DataContainer type are inputs
  • All the function parameters that are not DataContainer type are params
  • The folder structure can be used to define the Type of the function