Fix some typing problems (#1940)

* Fix some typing problems

* nerfstudio.data typing error fixes

* Add tiny fixes

* Remove ABC from pipeline

* Prevent circular imports

* Tweak ModuleList typing

* TrainingCallbackAttributes cleanup

* Various minor nits

* More nits

* Run `ruff`

---------

Co-authored-by: Brent Yi <yibrenth@gmail.com>
This commit is contained in:
Jonáš KulhánekandBrent Yi authored and GitHub committed 2023-05-17 17:36:56 -07:00
1 parent c6111e377e
commit f481f5ebec
27 files changed
+154 -75

No files matched your search

+4 -2
View File
@@ -17,7 +17,7 @@ Field for compound nerf model, adds scene contraction and image embeddings to in
"""
from typing import Dict, Optional, Tuple
from typing import Dict, Optional, Tuple, Type
import numpy as np
import torch
@@ -80,6 +80,8 @@ class TCNNNerfactoField(Field):
spatial_distortion: spatial distortion to apply to the scene
"""
aabb: Tensor
def __init__(
self,
aabb: Tensor,
@@ -420,4 +422,4 @@ class TorchNerfactoField(Field):
return outputs
field_implementation_to_class: Dict[str, Field] = {"tcnn": TCNNNerfactoField, "torch": TorchNerfactoField}
field_implementation_to_class: Dict[str, Type[Field]] = {"tcnn": TCNNNerfactoField, "torch": TorchNerfactoField}