kakaobrain / nerf-factory

An awesome PyTorch NeRF library
https://kakaobrain.github.io/NeRF-Factory
Apache License 2.0
1.27k stars 107 forks source link

Error when run python run.py --ginc configs/nerf/blender.gin --scene chair --ginb run.run_train=False #31

Closed AutoSenseTech closed 1 year ago

AutoSenseTech commented 1 year ago

Hi, first thanks for your work. I got an error when I run run python run.py --ginc configs/nerf/blender.gin --scene chair --ginb run.run_train=False. Could you give me any suggestion. thanks in advance.

/home/xxx/anaconda3/envs/nerf_factory/bin/python /home/xxx/Documents/tools/nerf-factory/run.py --ginc configs/nerf/blender.gin --scene chair --ginb run.run_train=False 
Global seed set to 220901
GPU available: True (cuda), used: True
TPU available: False, using: 0 TPU cores
IPU available: False, using: 0 IPUs
HPU available: False, using: 0 HPUs
Restoring states from the checkpoint path at logs/nerf_blender_chair_220901/best.ckpt
Traceback (most recent call last):
  File "/home/xxx/Documents/tools/nerf-factory/run.py", line 231, in <module>
    run(
  File "/home/xxx/anaconda3/envs/nerf_factory/lib/python3.8/site-packages/gin/config.py", line 1605, in gin_wrapper
    utils.augment_exception_message_and_reraise(e, err_str)
  File "/home/xxx/anaconda3/envs/nerf_factory/lib/python3.8/site-packages/gin/utils.py", line 41, in augment_exception_message_and_reraise
    raise proxy.with_traceback(exception.__traceback__) from None
  File "/home/xxx/anaconda3/envs/nerf_factory/lib/python3.8/site-packages/gin/config.py", line 1582, in gin_wrapper
    return fn(*new_args, **new_kwargs)
  File "/home/xxx/Documents/tools/nerf-factory/run.py", line 183, in run
    trainer.test(model, data_module, ckpt_path=ckpt_path)
  File "/home/xxx/anaconda3/envs/nerf_factory/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 794, in test
    return call._call_and_handle_interrupt(
  File "/home/xxx/anaconda3/envs/nerf_factory/lib/python3.8/site-packages/pytorch_lightning/trainer/call.py", line 38, in _call_and_handle_interrupt
    return trainer_fn(*args, **kwargs)
  File "/home/xxx/anaconda3/envs/nerf_factory/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 842, in _test_impl
    results = self._run(model, ckpt_path=self.ckpt_path)
  File "/home/xxx/anaconda3/envs/nerf_factory/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 1056, in _run
    self._restore_modules_and_callbacks(ckpt_path)
  File "/home/xxx/anaconda3/envs/nerf_factory/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 998, in _restore_modules_and_callbacks
    self._checkpoint_connector.resume_start(checkpoint_path)
  File "/home/xxx/anaconda3/envs/nerf_factory/lib/python3.8/site-packages/pytorch_lightning/trainer/connectors/checkpoint_connector.py", line 90, in resume_start
    loaded_checkpoint = self.trainer.strategy.load_checkpoint(checkpoint_path)
  File "/home/xxx/anaconda3/envs/nerf_factory/lib/python3.8/site-packages/pytorch_lightning/strategies/strategy.py", line 359, in load_checkpoint
    return self.checkpoint_io.load_checkpoint(checkpoint_path)
  File "/home/xxx/anaconda3/envs/nerf_factory/lib/python3.8/site-packages/lightning_fabric/plugins/io/torch_io.py", line 84, in load_checkpoint
    raise FileNotFoundError(f"Checkpoint at {path} not found. Aborting training.")
FileNotFoundError: Checkpoint at logs/nerf_blender_chair_220901/best.ckpt not found. Aborting training.
  In call to configurable 'run' (<function run at 0x7f9d3edd0310>)
jeongyw12382 commented 1 year ago

Hi. If you deactivate the training process, you should put your pre-trained checkpoint on your log file. """ FileNotFoundError: Checkpoint at logs/nerf_blender_chair_220901/best.ckpt not found. Aborting training. In call to configurable 'run' (<function run at 0x7f9d3edd0310>) """ I recommend to download the pre-trained checkpoint and put it on "logs/" directory.

jeongyw12382 commented 1 year ago

Closing the issue since no response has been given a day. Please re-open the issue whenever you confront further issues.