Latch workflows can output thousands of files, making it difficult for users to find the most relevant output files. To help users navigate these outputs, Latch provides a results page that displays the outputs of a workflow in a user-friendly interface.

Usage

SDK Example

To expose specific outputs to users, developers must explicitly supply a list of paths to publish. For example:
...

from latch.executions import add_execution_results

@small_task
def assembly_task(
    read1: LatchFile, read2: LatchFile, output_directory: LatchOutputDir
) -> LatchFile:

    ...

    results = []
    results.append(str(output_directory.remote_path))
    results.append(os.path.join(output_directory.remote_path, 'pipeline_info/execution_report.html'))
    add_execution_results(results)

    ...

Nextflow Example

Developers can explicitly define a list of subpaths for any output directory defined in latch_metadata/parameters.py. For example, the following code snippet exposes shortcuts for the workflows publishDir and execution report:
parameters = {
  'outdir': NextflowParameter(
    type=LatchDir,
    results_paths=[
      Path("/"),
      Path("/pipeline_info/execution_report.html")
    ]
  )
}

Results Interface

Both methods render a “Results” page in the Latch Console that displays the outputs of the workflow in a user-friendly interface: Results GUI