sail-sg / sewformer

150 stars 16 forks source link

TypeError: __init__() missing 1 required positional argument: 'start_config' #6

Closed pasqualesimonetti closed 9 months ago

pasqualesimonetti commented 10 months ago
$ python inference.py -c ./configs/test.yaml -d ./assets/data/deepfashion -t deepfashion -o outputs/deepfashion
C:\Developer/sewformer/SewFactory/packages
C:\Developer/sewformer/SewFactory/packages
ExperimentWrappper::Warning::Requested status of run not connected to wandb
ExperimentWrappper::Warning::Skipping loading split file from cloud..
ExperimentWrappper::Warning::Skipping loading panel classes file from cloud..
ExperimentWrappper::Warning::Skipping loading parameter filter file from cloud..
Traceback (most recent call last):
  File "C:\Developer\sewformer\Sewformer\inference.py", line 144, in <module>
    shape_dataset, shape_datawrapper = shape_experiment.load_detr_dataset(
  File "C:\Developer\sewformer\Sewformer\experiment.py", line 249, in load_detr_dataset
    dataset = data_class(data_root, data_config, gt_caching=True, feature_caching=False)
TypeError: __init__() missing 1 required positional argument: 'start_config'
Mamba-ZJP commented 10 months ago

In fact, you should manually add a argument called sim_root in line 249, in load_detr_dataset. Then you can go. I should remind that many bugs you met are the ones I met before. You can try and fix bug by yourself, as the code has many small bugs like two issues you proposed before. We can discuss through emails. And good luck!

pasqualesimonetti commented 10 months ago

Added start_config='' in \Sewformer\experiment.py file:

But now I get...

$ python inference.py -c ./configs/test.yaml -d ./assets/data/deepfashion -t deepfashion -o outputs/deepfashion
C:\Developer/sewformer/SewFactory/packages
C:\Developer/sewformer/SewFactory/packages
ExperimentWrappper::Warning::Requested status of run not connected to wandb
ExperimentWrappper::Warning::Skipping loading split file from cloud..
ExperimentWrappper::Warning::Skipping loading panel classes file from cloud..
ExperimentWrappper::Warning::Skipping loading parameter filter file from cloud..
Traceback (most recent call last):
  File "C:\Developer\sewformer\Sewformer\inference.py", line 144, in <module>
    shape_dataset, shape_datawrapper = shape_experiment.load_detr_dataset(
  File "C:\Developer\sewformer\Sewformer\experiment.py", line 249, in load_detr_dataset
    dataset = data_class(data_root, data_config, gt_caching=True, feature_caching=False, start_config='')
  File "C:\Developer\sewformer\Sewformer\data\dataset.py", line 42, in __init__
    pattern_size_initialized = self.update_config(start_config)
  File "C:\Developer\sewformer\Sewformer\data\dataset.py", line 189, in update_config
    in_config.update(max_pattern_len=None, max_panel_len=None, max_num_stitches=None)
AttributeError: 'str' object has no attribute 'update'

@Mamba-ZJP it would be nice to collaborate, my email address is hello[at]pasqualesimonetti.com.

TianZhenGG commented 10 months ago

In fact, you should manually add a argument called sim_root in line 249, in load_detr_dataset. Then you can go. I should remind that many bugs you met are the ones I met before. You can try and fix bug by yourself, as the code has many small bugs like two issues you proposed before. We can discuss through emails. And good luck!

can you give an example,thanks.

Cimcum commented 10 months ago

Did anyone resolve that issue?

IHe-KaiI commented 9 months ago

I tried to add start_config=data_config in line 249 \Sewformer\experiment.py file, and it works.

nagexiaochengzi commented 8 months ago

AttributeError: 'str' object has no attribute 'update'.How did you solve this problem?

pabloriosn commented 8 months ago

I fixed this problem changing the line 249:

dataset = data_class(data_root, sim_root= {}, start_config=data_config, gt_caching=True, feature_caching=False)