def save(self, fp: str, title: str = "OUT"):
        """
        Try to save all components to specified path under a folder with given title
        """
        path = os.path.join(fp, title)
        safe_mkdir(path)

        components = self.get_components()
        for name in components:
            try:
                torch.save(components[name], os.path.join(path, name) + ".pt")
            except:
                print(f"Failed to save component: {name}, continuing.")

        Try to save all components to specified path under a folder with given title
        
promptist/trlx/trlx/model/__init__.py