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

+2 -2
View File
@@ -21,7 +21,7 @@ import typing
from abc import abstractmethod
from dataclasses import dataclass, field
from time import time
from typing import Any, Dict, List, Literal, Mapping, Optional, Type, Union, cast
from typing import Any, Dict, List, Literal, Mapping, Optional, Tuple, Type, Union, cast
import torch
import torch.distributed as dist
@@ -300,7 +300,7 @@ class VanillaPipeline(Pipeline):
raise NotImplementedError
@profiler.time_function
def get_eval_loss_dict(self, step: int):
def get_eval_loss_dict(self, step: int) -> Tuple[Any, Dict[str, Any], Dict[str, Any]]:
"""This function gets your evaluation loss dict. It needs to get the data
from the DataManager and feed it to the model's forward function