Skip to content

A workflow cannot be taken out of Texera as a script that runs on its own #8325

Description

@kz930

Feature Summary

A workflow can be built and read in the editor, but there is no form of it that runs anywhere else. A user who wants to keep a pipeline after the fact, hand it to a colleague who does not run Texera, or step through it in a notebook has nothing to take away.

What is missing is an export: given a plan, produce a single Python file that reads the same sources, applies the same operators in the same order, and prints its results. The operators already describe their work as Python for the engine, so the pieces exist; what is absent is a form of that description that stands on its own, without the runtime around it, and something to stitch the pieces into one script.

Proposed Solution or Design

An operator says how it reads outside the engine by implementing a StandaloneCodeGenerator trait, returning a block of pandas that names its inputs and outputs by position: in1df, in2df, out1df. A translator walks the plan in topological order, gives every output port a variable, substitutes those placeholders for the variables its upstreams were given, and prints the leaves. A variadic port, of which Union is the one example, needs the whole list of upstreams rather than a fixed count, since any count the operator states would be wrong for some workflow.

The compiling service exposes the result as an endpoint, so the editor can offer the script for a plan the user has open.

An operator that has no generator yet leaves a commented placeholder in the script rather than a line that looks like it works, so the export is useful before every operator implements it.

The set, in order

  1. feat(workflow-compiling-service): export a workflow as a standalone Python script #8327 — the export itself: the trait, the translator, the endpoint and five operators
  2. test(verify): run an operator through the engine and keep what it wrote #8356 — running an operator through the engine
  3. test(verify): run a Python operator the way the engine runs it #8357 — running a Python operator the way the engine runs it
  4. test(verify): run the script the export produces #8358 — running the script the export produces
  5. test(verify): compare what the two paths produced #8359 — comparing what the two paths produced
  6. test(verify): give every operator the same table to read #8360 — the canonical table every operator reads
  7. test(verify): hand-write the configurations a schema cannot describe #8363 — the configurations a schema cannot describe
  8. feat(workflow-operator): export the base transform operators as Python #8340 — base transforms
  9. feat(workflow-operator): export the source operators as Python #8341 — sources
  10. feat(visualization): export the hierarchy and graph charts as Python #8344 — visualizations: hierarchies and graphs
  11. feat(visualization): export the charts that draw over a table's columns #8365 — visualizations: charts over a table's columns
  12. feat(visualization): export the tables, ranges and embedded documents #8366 — visualizations: tables, ranges and embedded documents
  13. feat(visualization): export the coordinate-system and domain plots as Python #8346 — visualizations: coordinate systems and domains
  14. feat(machine-learning): export the four advanced trainers #8348 — the four advanced trainers
  15. feat(machine-learning): export the Machine Learning Scorer #8367 — the Machine Learning Scorer
  16. feat(operator): export the estimators and the Hugging Face models #8368 — the estimators and the Hugging Face models
  17. test(verify): derive an operator's configuration from its schema #8361 — deriving a configuration from an operator's schema
  18. test(verify): run every operator both ways and report what it did #8362 — running every operator both ways and reporting what it did
  19. test(verify): run the source operators, and report what is covered #8364 — the source operators, and the coverage report
  20. feat(gui): export a workflow as Python, and read the schema's constraints in the panel #8350 — the editor: the export button and the property panel

Each is sized to be read in one sitting. The export comes first, then the machinery that runs an operator both ways, then the operator families that implement the trait, then the two changes that read every operator at once — those come after the families so their assertions hold as written — and the editor last. This issue stays open until the final one lands.

Affected Area

Workflow Engine (Amber), Workflow UI

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions