Esacode

Docs / Blocks / Processing

Python script

Your own Python code: read inputs, compute, write outputs.

Runs on a worker (Python) Processing Version 1.0 Code you can open and adapt

How it works

Open the code (Edit code) and write run(ctx). Read files from ctx.inputs["in"], write with ctx.output("table", "name.csv"), stream live values with ctx.telemetry("loss", value) and report ctx.progress(50). Use any package installed on the worker (numpy, PyTorch, OpenCV...). Return a dict to output it as metrics.

Inputs

InputTakesWhat it is
Inputs
in
Anything Optional. Takes several connections.

Outputs

OutputGivesWhat it is
Table
table
Table
Files
files
Files
Result
result
Metrics
json
Live telemetry
telemetry
Live telemetryWhat the block sends while it runs, for views such as Chart or 3D view.

Settings

SettingDefaultWhat it does
Steps (example setting)
steps
60
From 1 to 100000

Where it runs

On one of your computers with the EsaSim worker: Any worker.

In its code, settings are ctx.params["key"], inputs ctx.inputs["id"] and outputs ctx.output("id", "name.ext"); see Custom blocks.

More in Processing