kerrj / lerf

Code for LERF: Language Embedded Radiance Fields
https://www.lerf.io/
MIT License
668 stars 65 forks source link

AttributeError: 'LERFDataManager' object has no attribute 'fixed_indices_eval_dataloader' #39

Closed yoker5262 closed 1 year ago

yoker5262 commented 1 year ago

(alg) k8s@zjm-sz8tney2-qlxvm:~/nerfstudio$ ns-eval --load-config /opt/image-synthesis/algorithm_manage/model_zoo/test_video/lerf/2023-07-13_112928/config.yml --output-path /opt/image-synthesis/eval_output/test_video/lerf.json Loading latest checkpoint from load_dir ✅ Done loading checkpoint from /opt/image-synthesis/algorithm_manage/model_zoo/test_video/lerf/2023-07-13_112928/nerfstudio_models/step-000028000.ckpt Traceback (most recent call last) ────────────────────────────────╮ │ /home/ubuntu/miniconda3/envs/alg/bin/ns-eval:8 in │ │ │ │ 5 from nerfstudio.scripts.eval import entrypoint │ │ 6 if name == 'main': │ │ 7 │ sys.argv[0] = re.sub(r'(-script.pyw|.exe)?$', '', sys.argv[0]) │ │ ❱ 8 │ sys.exit(entrypoint()) │ │ 9 │ │ │ │ /home/ubuntu/miniconda3/envs/alg/lib/python3.10/site-packages/nerfstudio/scripts/eval.py:61 in │ │ entrypoint │ │ │ │ 58 def entrypoint(): │ │ 59 │ """Entrypoint for use with pyproject scripts.""" │ │ 60 │ tyro.extras.set_accent_color("bright_yellow") │ │ ❱ 61 │ tyro.cli(ComputePSNR).main() │ │ 62 │ │ 63 │ │ 64 if name == "main": │ │ │ │ /home/ubuntu/miniconda3/envs/alg/lib/python3.10/site-packages/nerfstudio/scripts/eval.py:44 in │ │ main │ │ │ │ 41 │ │ """Main function.""" │ │ 42 │ │ config, pipeline, checkpointpath, = eval_setup(self.load_config) │ │ 43 │ │ assert self.output_path.suffix == ".json" │ │ ❱ 44 │ │ metrics_dict = pipeline.get_average_eval_image_metrics() │ │ 45 │ │ self.output_path.parent.mkdir(parents=True, exist_ok=True) │ │ 46 │ │ # Get the output and define the names to save to │ │ 47 │ │ benchmark_info = { │ │ │ │ /home/ubuntu/miniconda3/envs/alg/lib/python3.10/site-packages/nerfstudio/utils/profiler.py:127 │ │ in inner │ │ │ │ 124 │ │ def inner(*args, *kwargs): │ │ 125 │ │ │ self._function_call_args = (args, kwargs) │ │ 126 │ │ │ with self: │ │ ❱ 127 │ │ │ │ out = func(args, **kwargs) │ │ 128 │ │ │ self._function_call_args = None │ │ 129 │ │ │ return out │ │ 130 │ │ │ │ /home/ubuntu/miniconda3/envs/alg/lib/python3.10/site-packages/nerfstudio/pipelines/base_pipeline │ │ .py:351 in get_average_eval_image_metrics │ │ │ │ 348 │ │ self.eval() │ │ 349 │ │ metrics_dict_list = [] │ │ 350 │ │ assert isinstance(self.datamanager, VanillaDataManager) │ │ ❱ 351 │ │ num_images = len(self.datamanager.fixed_indices_eval_dataloader) │ │ 352 │ │ with Progress( │ │ 353 │ │ │ TextColumn("[progress.description]{task.description}"), │ │ 354 │ │ │ BarColumn(), │ │ │ │ /home/ubuntu/miniconda3/envs/alg/lib/python3.10/site-packages/torch/nn/modules/module.py:1614 in │ │ getattr │ │ │ │ 1611 │ │ │ modules = self.dict['_modules'] │ │ 1612 │ │ │ if name in modules: │ │ 1613 │ │ │ │ return modules[name] │ │ ❱ 1614 │ │ raise AttributeError("'{}' object has no attribute '{}'".format( │ │ 1615 │ │ │ type(self).name, name)) │ │ 1616 │ │ │ 1617 │ def setattr(self, name: str, value: Union[Tensor, 'Module']) -> None: │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯ AttributeError: 'LERFDataManager' object has no attribute 'fixed_indices_eval_dataloader'

why

kerrj commented 1 year ago

Sorry for the late reply, I've been traveling. Is this still an issue? I recall some chatter on the nerfstudio github too which relates to this.

kerrj commented 1 year ago

Closing this for now, please let us know if it's still an issue!