Question about save_hyperparameters()
❓ Questions and Help
Before asking:
I have a question (maybe a bug?) regarding the save_hyperparameters() function. I was trying to use to default setting without passing any arguments, but I got an error during the yaml saving. According to issue #4046 the reason is probably that I am passing my model as a parameter and that is a too complex object to save. So I thought I'd opt for manually saving the hyperparameters as following:
class GraphClassification(pl.LightningModule):
    def __init__(self, model: torch.nn.Module, input_folder: str, output_folder: str, learning_rate: float, class_frequency: list, num_classes: int,
                 gpu_id, no_cuda: bool = False, disable_databalancing: bool = False, **kwargs):
        """
        :param model: torch.nn.Module
            A GNN model

        """
        super().__init__()
        # This works
        self.save_hyperparameters('input_folder', 'output_folder', 'class_frequency', 'num_classes', 'disable_databalancing',
                                  'learning_rate')
        # The following does not
        self.save_hyperparameters(model.hparam)  # this is also a dictionary.
        self.save_hyperparameters({name: kwargs[name] for name in ['experiment_name', 'seed', 'batch_size', 'epochs',
                                                       'ignore_coordinates', 'learning_rate', 'weight_decay']})
        self.save_hyperparameters({'optimizer': 'Adam'})

I get the following error for the lines that don't work: {ValueError}The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
According to the documentation I've read about save_hyperparameters() it should be possible to pass a dictionary as well. I don't quite understand what is not working for me here.
What's your environment?

OS: iOS
Packaging: pytorch-lightning
Version 1.1.6
Python 3.8