Hi all, I am running to the following error when running the benchmark notebook. I have read some threads abut no joy. Any help would be much appreciated.
GPU available: True, used: True
TPU available: False, using: 0 TPU cores
IPU available: False, using: 0 IPUs
LOCAL_RANK: 0 - CUDA_VISIBLE_DEVICES: [0]
AttributeError Traceback (most recent call last)
/tmp/ipykernel_346/3071818194.py in
1 flood_model = FloodModel(hparams=hparams)
----> 2 flood_model.fit()
/tmp/ipykernel_346/1333484537.py in fit(self)
194 # Set up and fit Trainer object
195 self.trainer = pl.Trainer(**self.trainer_params)
–> 196 self.trainer.fit(self)
/srv/conda/envs/notebook/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py in fit(self, model, train_dataloaders, val_dataloaders, datamodule, train_dataloader)
551 self.checkpoint_connector.resume_start()
552
–> 553 self._run(model)
554
555 assert self.state.stopped
/srv/conda/envs/notebook/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py in _run(self, model)
910
911 # plugin will setup fitting (e.g. ddp will launch child processes)
–> 912 self._pre_dispatch()
913
914 # restore optimizers, etc.
/srv/conda/envs/notebook/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py in _pre_dispatch(self)
939 def _pre_dispatch(self):
940 self.accelerator.pre_dispatch(self)
–> 941 self._log_hyperparams()
942
943 def _log_hyperparams(self):
/srv/conda/envs/notebook/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py in _log_hyperparams(self)
968 self.logger.log_hyperparams(hparams_initial)
969 self.logger.log_graph(self.lightning_module)
–> 970 self.logger.save()
971
972 def _post_dispatch(self):
/srv/conda/envs/notebook/lib/python3.8/site-packages/pytorch_lightning/utilities/distributed.py in wrapped_fn(*args, **kwargs)
46 def wrapped_fn(*args, **kwargs):
47 if rank_zero_only.rank == 0:
—> 48 return fn(*args, **kwargs)
49
50 return wrapped_fn
/srv/conda/envs/notebook/lib/python3.8/site-packages/pytorch_lightning/loggers/tensorboard.py in save(self)
248 # save the metatags file if it doesn’t exist and the log directory exists
249 if self._fs.isdir(dir_path) and not self._fs.isfile(hparams_file):
–> 250 save_hparams_to_yaml(hparams_file, self.hparams)
251
252 @rank_zero_only
/srv/conda/envs/notebook/lib/python3.8/site-packages/pytorch_lightning/core/saving.py in save_hparams_to_yaml(config_yaml, hparams)
403 for k, v in hparams.items():
404 try:
–> 405 yaml.dump(v)
406 except TypeError:
407 warn(f"Skipping ‘{k}’ parameter because it is not possible to safely dump to YAML.")
/srv/conda/envs/notebook/lib/python3.8/site-packages/yaml/init.py in dump(data, stream, Dumper, **kwds)
288 If stream is None, return the produced string instead.
289 “”"
–> 290 return dump_all([data], stream, Dumper=Dumper, **kwds)
291
292 def safe_dump_all(documents, stream=None, **kwds):
/srv/conda/envs/notebook/lib/python3.8/site-packages/yaml/init.py in dump_all(documents, stream, Dumper, default_style, default_flow_style, canonical, indent, width, allow_unicode, line_break, encoding, explicit_start, explicit_end, version, tags, sort_keys)
276 dumper.open()
277 for data in documents:
–> 278 dumper.represent(data)
279 dumper.close()
280 finally:
/srv/conda/envs/notebook/lib/python3.8/site-packages/yaml/representer.py in represent(self, data)
25
26 def represent(self, data):
—> 27 node = self.represent_data(data)
28 self.serialize(node)
29 self.represented_objects = {}
/srv/conda/envs/notebook/lib/python3.8/site-packages/yaml/representer.py in represent_data(self, data)
50 for data_type in data_types:
51 if data_type in self.yaml_multi_representers:
—> 52 node = self.yaml_multi_representers[data_type](self, data)
53 break
54 else:
/srv/conda/envs/notebook/lib/python3.8/site-packages/yaml/representer.py in represent_object(self, data)
340 if not args and not listitems and not dictitems
341 and isinstance(state, dict) and newobj:
–> 342 return self.represent_mapping(
343 ‘tag:yaml.org,2002:python/object:’+function_name, state)
344 if not listitems and not dictitems \
/srv/conda/envs/notebook/lib/python3.8/site-packages/yaml/representer.py in represent_mapping(self, tag, mapping, flow_style)
116 for item_key, item_value in mapping:
117 node_key = self.represent_data(item_key)
–> 118 node_value = self.represent_data(item_value)
119 if not (isinstance(node_key, ScalarNode) and not node_key.style):
120 best_style = False
/srv/conda/envs/notebook/lib/python3.8/site-packages/yaml/representer.py in represent_data(self, data)
50 for data_type in data_types:
51 if data_type in self.yaml_multi_representers:
—> 52 node = self.yaml_multi_representers[data_type](self, data)
53 break
54 else:
/srv/conda/envs/notebook/lib/python3.8/site-packages/yaml/representer.py in represent_object(self, data)
344 if not listitems and not dictitems
345 and isinstance(state, dict) and not state:
–> 346 return self.represent_sequence(tag+function_name, args)
347 value = {}
348 if args:
/srv/conda/envs/notebook/lib/python3.8/site-packages/yaml/representer.py in represent_sequence(self, tag, sequence, flow_style)
90 best_style = True
91 for item in sequence:
—> 92 node_item = self.represent_data(item)
93 if not (isinstance(node_item, ScalarNode) and not node_item.style):
94 best_style = False
/srv/conda/envs/notebook/lib/python3.8/site-packages/yaml/representer.py in represent_data(self, data)
46 data_types = type(data).mro
47 if data_types[0] in self.yaml_representers:
—> 48 node = self.yaml_representers[data_types[0]](self, data)
49 else:
50 for data_type in data_types:
/srv/conda/envs/notebook/lib/python3.8/site-packages/yaml/representer.py in represent_tuple(self, data)
284
285 def represent_tuple(self, data):
–> 286 return self.represent_sequence(‘tag:yaml.org,2002:python/tuple’, data)
287
288 def represent_name(self, data):
/srv/conda/envs/notebook/lib/python3.8/site-packages/yaml/representer.py in represent_sequence(self, tag, sequence, flow_style)
90 best_style = True
91 for item in sequence:
—> 92 node_item = self.represent_data(item)
93 if not (isinstance(node_item, ScalarNode) and not node_item.style):
94 best_style = False
/srv/conda/envs/notebook/lib/python3.8/site-packages/yaml/representer.py in represent_data(self, data)
50 for data_type in data_types:
51 if data_type in self.yaml_multi_representers:
—> 52 node = self.yaml_multi_representers[data_type](self, data)
53 break
54 else:
/srv/conda/envs/notebook/lib/python3.8/site-packages/yaml/representer.py in represent_object(self, data)
329 if dictitems is not None:
330 dictitems = dict(dictitems)
–> 331 if function.name == ‘newobj’:
332 function = args[0]
333 args = args[1:]
AttributeError: ‘functools.partial’ object has no attribute ‘name’