|
32 | 32 | DEFAULT_DATA_DIR = "."
|
33 | 33 | BATCH_MONITOR_PROGRESS_REFRESH_TIME = 0.02
|
34 | 34 |
|
35 |
| -BatchSimulationType = Literal["tidy3d", "microwave", "tidy3d_design"] |
| 35 | +BatchType = Literal["tidy3d", "microwave", "tidy3d_design"] |
36 | 36 |
|
37 | 37 |
|
38 | 38 | class WebContainer(Tidy3dBaseModel, ABC):
|
@@ -169,7 +169,7 @@ class Job(WebContainer):
|
169 | 169 | True, title="Verbose", description="Whether to print info messages and progressbars."
|
170 | 170 | )
|
171 | 171 |
|
172 |
| - simulation_type: BatchSimulationType = pd.Field( |
| 172 | + simulation_type: BatchType = pd.Field( |
173 | 173 | "tidy3d",
|
174 | 174 | title="Simulation Type",
|
175 | 175 | description="Type of simulation, used internally only.",
|
@@ -251,10 +251,7 @@ def task_id(self) -> TaskId:
|
251 | 251 | """The task ID for this ``Job``. Uploads the ``Job`` if it hasn't already been uploaded."""
|
252 | 252 | if self.task_id_cached:
|
253 | 253 | return self.task_id_cached
|
254 |
| - if self.simulation_type == "microwave": |
255 |
| - self._check_folder(self.folder_name, projects_endpoint="tidy3d/projects/rf") |
256 |
| - else: |
257 |
| - self._check_folder(self.folder_name) |
| 254 | + self._check_folder(self.folder_name) |
258 | 255 | return self._upload()
|
259 | 256 |
|
260 | 257 | def _upload(self) -> TaskId:
|
@@ -541,7 +538,7 @@ class Batch(WebContainer):
|
541 | 538 | "``{'id', 'status', 'name', 'workUnit', 'solverVersion'}``.",
|
542 | 539 | )
|
543 | 540 |
|
544 |
| - simulation_type: BatchSimulationType = pd.Field( |
| 541 | + simulation_type: BatchType = pd.Field( |
545 | 542 | "tidy3d",
|
546 | 543 | title="Simulation Type",
|
547 | 544 | description="Type of each simulation in the batch, used internally only.",
|
@@ -683,14 +680,7 @@ def num_jobs(self) -> int:
|
683 | 680 |
|
684 | 681 | def upload(self) -> None:
|
685 | 682 | """Upload a series of tasks associated with this ``Batch`` using multi-threading."""
|
686 |
| - if self.simulation_type == "microwave": |
687 |
| - self._check_folder( |
688 |
| - self.folder_name, |
689 |
| - projects_endpoint="tidy3d/projects/rf", |
690 |
| - project_endpoint="tidy3d/project", # TODO update |
691 |
| - ) |
692 |
| - else: |
693 |
| - self._check_folder(self.folder_name) |
| 683 | + self._check_folder(self.folder_name) |
694 | 684 | with ThreadPoolExecutor(max_workers=self.num_workers) as executor:
|
695 | 685 | futures = [executor.submit(job.upload) for _, job in self.jobs.items()]
|
696 | 686 |
|
|
0 commit comments