More typing fixes (#1941)

* Fix more types

* Fix tests

* Minor cleaning

* Address comments

* Resolve linting errors

* Re-ignore pymeshlab type

* Add extra assert / error message to mipnerf model
This commit is contained in:
Brent Yi authored and GitHub committed 2023-05-17 07:17:40 -07:00
1 parent 8b9574bb5a
commit 814db32ec4
53 files changed
+386 -205

No files matched your search

+3 -2
View File
@@ -176,7 +176,8 @@ class ViewerState:
def _crop_params_update(self, _) -> None:
"""Update crop parameters"""
self.render_statemachine.action(RenderAction("rerender", self.camera_message))
if self.camera_message is not None:
self.render_statemachine.action(RenderAction("rerender", self.camera_message))
crop_min = torch.tensor(self.control_panel.crop_min, dtype=torch.float32)
crop_max = torch.tensor(self.control_panel.crop_max, dtype=torch.float32)
scene_box = SceneBox(aabb=torch.stack([crop_min, crop_max], dim=0))
@@ -281,7 +282,7 @@ class ViewerState:
# draw indices, roughly evenly spaced
return np.linspace(0, total_num - 1, num_display_images, dtype=np.int32).tolist()
def init_scene(self, dataset: InputDataset, train_state=Literal["training", "paused", "completed"]) -> None:
def init_scene(self, dataset: InputDataset, train_state: Literal["training", "paused", "completed"]) -> None:
"""Draw some images and the scene aabb in the viewer.
Args: