Skip to content

Configuration file

Zhouxing Shi edited this page Nov 6, 2021 · 1 revision

This Wiki page introduces the format of the configuration file which is stored at ~/.labsync.config.json by default.

Basically, it is in a JSON format and the file contains a JSON object. It may contain the following keys:

  • path (str): The default path for storing files on the remote servers. It can be overridden later in the configuration for each specific server.

  • servers (object): Information of the remote servers. Each key in the object corresponds to the name of a server, and the value of the corresponding key is an object containing the following server information:

    • enabled (bool): If the server is enabled currently. If disabled, local changes will not be pushed to this server.
    • path (optional): Path for storing files on this remote server (if different from the default one).
    • checkpoints (optional): Path where checkpoint files are stored, and this is used for pulling Tensorboard logs if Tensorboard is enabled.
  • ignored_patterns (array): Patterns of files that should be ignored (similar to gitignore). Some commonly used patterns are already added at initialization with lab init.

  • tensorboard (object, optional): Configuration for Tensorboard. It may contain:

    • port (int): Port number for starting a Tensorboard server.
    • logdir: The directory where Tensorboard logs are stored locally (similar to the --logdir argument in Tensorboard).
  • overleaf (object, optional): Configuration for Overleaf. It may contain:

    • patterns (array): Patterns of files that should be contained in synchronization.

Sample

A sample configuration may look like:

{
    "path": "/home/username"
    "servers": {
        "alpha": {
            "enabled": true,
            "checkpoints": "/home/username/checkpoints"
        },
        "beta": {
            "enabled": true,
            "checkpoints": "/home/username/checkpoints"
        }
        "gamma": {
            "enabled": true,
            "path": "/home/username/projects"
        }
    },
    "ignore_patterns": [
        "__pycache__",
        ".DS_Store",
        ".pytest_cache",
        "*.pyc"                      
    ],
    "tensorboard": {
        "port": 9000,
        "logdir": "tensorboard"
    },    
    "overleaf": {
        "patterns": [
            "*.tex",
            "*.bib",
            "*.bst",
            "*.sty",
            "*.pdf",
            "images",
            "figures",
            "image",
            "figure",
            "img"
        ]
    }  
}

Clone this wiki locally