Ways to run / control one or more pipelines

While most of the Neuropype documentation talks about loading and running pipelines using the Pipeline Designer. But there are several ways to run (and pause or stop) a pipeline, which we'll cover here. Note that the Neuropype service can run multiple pipelines independently without interfering with each other; how many pipelines you run is limited by your compute/memory resources. Note that streaming pipelines tend to be compute heavy but don't consume much memory since only a small number of samples are held in memory and processed at any given time (unless your pipeline does a lot of buffering), whereas offline pipelines have higher memory requirements since the entire dataset is loaded into memory and processed at once.

Using Pipeline Designer

  • Open Pipeline Designer using the Windows desktop shortcut.
  • Use File, Open, to open a pipeline.
  • Click the Pause button in the toolbar to run (unpause) the pipeline. img_3.png
  • To pause the pipeline, press the pause button. Streaming pipelines will continue running until stopped manually, whereas an offline pipeline will stop when it has finished processing the imported data. (See streaming/online vs offline pipelines)
  • To restart the pipeline, press the restart button img_5.png in the toolbar. For a streaming pipeline, this resets all node states, clears any buffers and re-run any import nodes (or other nodes that perform an action only once); for an offline pipeline this will re-run the pipeline from the beginning (i.e., re-import any data).
  • You can open multiple instances of Pipeline Designer at once, each one containing a pipeline, which can run

Using the Neuropype Control Panel

  • Select the Run Pipeline from the Neuropype menu (right-click the NP icon in your Windows taskbar).
  • The Neuropype Control Panel client will open in your browser.
  • The Launch tab will be active, showing a list of pipelines in a local folder (by default the Example pipelines). Use the CHANGE FOLDER button to select a different folder.
    img_6.png
  • Click on the pipeline you wish to run. You will be taken to the PARAMETERS page where you can set any parameters in the pipeline that were exposed using ParameterPorts (see exposing parameters with ParameterPort). img_7.png
  • Change the parameters if desired, and click the SAVE SETTINGS button to save the changes. Note that this action does not modify the pipeline on disk, but only the instance of the pipeline in memory. To save the settings to disk, use the SAVE action in the top menu.
  • Click RUN in the top menu to start the pipeline. You'll be taken to the STATUS page for the pipeline, with pipeline status and logs (the same ones shown in Pipeline Designer) showing and updated in real-time.
    img_8.png
  • Use the PAUSE and STOP menu items to pause or stop the pipeline. For streaming pipelines you can change the parameters while the pipeline is running, using the PARAMETERS tab, and these will take effect immediately (for an offline pipeline, you will need to RELOAD the pipeline).

Using the Neuropype API

You can launch and control pipelines directly from your own applications or scripts, using the Neuropype REST API. You'll find information on that in the Developer documentation (you'll need to log in to your neuropype.io account to access it). Once they're launched, you may find the Neuropype Control Panel useful in seeing which pipelines are running (see below) as well as which LSL streams are present and active (see Viewing LSL Streams).

You can interact with the Neuropype API using any programming language, or even something as simple as a Windows batch script, since it only involves local HTTP calls. In the Examples/Scripts folder of your Neuropype installation you will find a Python script (run_pipeline.py) that loads / configures / runs / stops a pipeline, which you can use as a template for your own script (in python or any other language).

View / control all running pipelines

  • You can view and control all running pipelines on your computer, regardless of which of the above methods was used to launch them. To do so, choose the View Running Pipelines from the Neuropype menu, which will take you to the Neuropype Control Panel (see above).
  • The PIPELINES tab will be active, and a list of all running pipelines on your computer is shown, along with their running status. You can pause / stop / resume any pipeline (again, regardless of how it was launched) using the action links to the right side of each row. Clicking on a pipeline name will take you to the STATUS page where you can view its logs. img_9.png
  • If a pipeline is stopped (or finishes, in the case of an offline pipeline), you can delete the execution using the Delete action to the right side of the row. This frees up the pipeline's resources, mostly RAM, because since the pipeline is not running it's not using CPU/GPU. If you want to restart it, you'll need to re-launch it (use the LAUNCH menu item).