mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-11-23 08:05:28 +08:00
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:
1 parent
c6111e377e
commit
f481f5ebec
27 files changed
+154
-75
No files matched your search
@@ -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
|
||||
|
||||
|
||||
Reference in new issue
Block a user