Skip to content

Conversation

@marcorudolphflex
Copy link
Contributor

@marcorudolphflex marcorudolphflex commented Feb 3, 2026

Since we have the generic web.run() now , this PR refactors the design plugin to simplify the running and allow it to generalize to things like Mode and EME.


Note

Medium Risk
Broadens core batching/type-dispatch logic used by all design sweeps; while mostly type/generalization changes, incorrect workflow classification or data replacement could break existing sweep execution or task metadata handling.

Overview
DesignSpace.run now treats the pre-function output as a generic WorkflowType (and corresponding WorkflowDataType) instead of Simulation/SimulationData, allowing parameter sweeps/optimizations to automatically batch and run workflows like ModeSimulation, ModeSolver, EMESimulation, and component modelers.

This refactor updates type checks, task-name/path extraction, and cost estimation to operate on the workflow unions, and updates the design plugin README plus tests (including a new mode-simulation sweep) by extending the emulated runner to return appropriate workflow data objects.

Written by Cursor Bugbot for commit 83706e0. This will update automatically on new commits. Configure here.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 3, 2026

Diff Coverage

Diff: origin/develop...HEAD, staged and unstaged changes

  • tidy3d/plugins/design/design.py (100%)

Summary

  • Total: 8 lines
  • Missing: 0 lines
  • Coverage: 100%

Copy link
Collaborator

@tylerflex tylerflex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great.

Remind me whether we already have the ability to web.run() datastructures containing WorkflowType? like if I do

web.run([1.0, WorkflowType, {'a': WorkflowType}]) 

I should get

[1.0, WorkflowDataType, {'a': WorkflowDataType}]

? if so we can probably simplify a ton of the code in design.py to use this. right now it's all hard coded. It could be a follow up PR if needed.

Copy link
Collaborator

@yaugenst-flex yaugenst-flex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants