INNER CODE UNIT · Python

create_dirs

CogStack/OpenGPT · opengpt/config.py:91

            def create_dirs(paths):
                for path in paths:
                    if isinstance(path, str):
                        os.makedirs(os.path.dirname(path), exist_ok=True)
                    elif isinstance(path, dict):
                        create_dirs(path.values())
            create_dirs(self.path.values())
        
        # Create dirs for datasets, this is where all the data from one dataset will go
        for ds in self.datasets:
            os.makedirs(os.path.join(self.base_path, ds['name']), exist_ok=True)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…