Skip to content

How to succesfully run evaluation script ? #28

@orgicus

Description

@orgicus

Hi,

I've setup dependencies, downloaded and unpacked datasets and pretrained weights.

However, I'm running into errors running the eval script:

python scripts/evaluate.py -o output/pretrained_models/lab/
...
Traceback (most recent call last):
  File "scripts/evaluate.py", line 98, in <module>
    main(cfg)
  File "/root/miniforge3/envs/hugs/lib/python3.8/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context
    return func(*args, **kwargs)
  File "scripts/evaluate.py", line 69, in main
    trainer = GaussianTrainer(cfg)
  File "/mnt/e/DL/ml-hugs/./hugs/trainer/gs_trainer.py", line 212, in __init__
    betas = self.human_gs.betas.detach() if hasattr(self.human_gs, 'betas') else self.train_dataset.betas[0]
AttributeError: 'GaussianTrainer' object has no attribute 'train_dataset'

I've tweaked the code slightly, from:

if not cfg.eval:
            self.train_dataset = get_train_dataset(cfg)     

to: self.train_dataset = get_train_dataset(cfg)

However this leads to another missing attribute error:

Traceback (most recent call last):
  File "scripts/evaluate.py", line 98, in <module>
    main(cfg)
  File "/root/miniforge3/envs/hugs/lib/python3.8/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context
    return func(*args, **kwargs)
  File "scripts/evaluate.py", line 69, in main
    trainer = GaussianTrainer(cfg)
  File "/mnt/e/DL/ml-hugs/./hugs/trainer/gs_trainer.py", line 212, in __init__
    betas = self.human_gs.betas.detach() if hasattr(self.human_gs, 'betas') else self.train_dataset.betas[0]
AttributeError: 'NeumanDataset' object has no attribute 'betas'

I don't think tweaking the code to over the humps is the way forward.
What is the recommended way of running the evaluation script ?
Additionally, what is the recommended way of running inference and rendering results ?

Thank you for your time,
George

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions