onnx/turnkeyml

Rename Stage to Tool

Closed this issue · 4 comments

We have Stages and ManagementTools, which are quite similar but also different in meaningful ways (e.g., Stages have State but ManagementTools don't; Stages are meant to be sequenced but ManagementTools are not, etc.).

Should they both be called Stage or Tool?

IMO, everything should be a Tool. People automatically know what "Tool" and "Toolchain" mean in context, while "Stage" and "Sequence" require explanation like "a Stage is a tool that you can chain into a Sequence..."

Under this change, the classes would be:

  • Tool: base class
  • BuildTool: the class formerly known as Stage
  • ManagementTool: the class currently known as ManagementTool
  • ToolChain: the class formerly known as Sequence

Example BuildTools: discover, export-pytorch, benchmark
Example ManagementTools: report, cache, version

@danielholanda @ramkrishna2910 @vgodsoe please discuss this decision

I find that most of the confusion comes from our initial attempts to it a stage and a few puns around it. What it we instead use some terminology that is common in compiler flows (e.g. passes instead of stages)?

The main thing that I'm not a big fan in the above proposal is the name "ToolChain" as it is not as clear as "Sequence" in a phrase.

"You can run a sequence of stages" is much easier to understand than "You can combine multiple build tools into a tool chain".

"You can run a sequence of stages" is much easier to understand than "You can combine multiple build tools into a tool chain".

Agree.

What it we instead use some terminology that is common in compiler flows (e.g. passes instead of stages)?

The nice thing about Tool is that it applies equally well to both the build tools (e.g., export tool) and the management tools (e.g., report tool).

Some more brainstorming:

  • I do agree that "pass" and "tool" are both more standard names than "stage."
  • IMO "pass" is somewhat specific to compiler people though (have you ever heard a non-compiler person talk about a "pass")?
  • Olive uses "pass" as the term for their stage-equivalent functionality, so perhaps that's the ONNX-standard name at this point

I've been trying out Tool and I think it's good.