Temperature Schedule

Temperature Schedule#

Generate inverse temperature schedules for thermodynamic integration.

Thermodynamic integration is quite sensitive to the specific schedule which is used. I noticed in my models, that within the interval \([0, 0.1]\), the increase in the expected log-likelihood is very steep. Hence, the inverse temperature \(\beta\) must be more densely spaced in the beginning.

This can be achieved by using a power sequence: Generate \(n\) linearly spaced points in the interval \([0, 1]\) and then transform each point by computing \(\beta_i^k\) where \(k\) could e.g. be 5.

pydantic settings lyscripts.schedule.ScheduleCLI[source]#

Generate an inverse temperature schedule for thermodynamic integration.

Show JSON schema
{
   "title": "ScheduleCLI",
   "description": "Generate an inverse temperature schedule for thermodynamic integration.",
   "type": "object",
   "properties": {
      "configs": {
         "default": [
            "config.yaml"
         ],
         "description": "Path to the YAML file(s) that contain the configuration(s). Configs from YAML files may be overwritten by command line arguments. When multiple files are specified, the configs are merged in the order they are given. Note that every config file must have a `version: 1` key in it.",
         "items": {
            "format": "path",
            "type": "string"
         },
         "title": "Configs",
         "type": "array"
      },
      "method": {
         "default": "power",
         "description": "Method to generate the inverse temperature schedule.",
         "enum": [
            "geometric",
            "linear",
            "power"
         ],
         "title": "Method",
         "type": "string"
      },
      "num": {
         "default": 32,
         "description": "Number of inverse temperatures in the schedule.",
         "title": "Num",
         "type": "integer"
      },
      "power": {
         "default": 4.0,
         "description": "If a power schedule is chosen, use this as power.",
         "title": "Power",
         "type": "number"
      },
      "values": {
         "anyOf": [
            {
               "items": {
                  "type": "number"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "List of inverse temperatures to use instead of generating a schedule. If a list is provided, the other parameters are ignored.",
         "title": "Values"
      }
   }
}

cli_cmd() None[source]#

Start the schedule command.

Command Help#

Usage: lyscripts schedule [-h] [--configs list[Path]]
                          [--method {geometric,linear,power}] [--num int]
                          [--power float] [--values {list[float],null}]

Generate an inverse temperature schedule for thermodynamic integration.

Options:
  -h, --help            show this help message and exit
  --configs list[Path]  Path to the YAML file(s) that contain the
                        configuration(s). Configs from YAML files may be
                        overwritten by command line arguments. When multiple
                        files are specified, the configs are merged in the
                        order they are given. Note that every config file must
                        have a `version: 1` key in it. (default:
                        ['config.yaml'])
  --method {geometric,linear,power}
                        Method to generate the inverse temperature schedule.
                        (default: power)
  --num int             Number of inverse temperatures in the schedule.
                        (default: 32)
  --power float         If a power schedule is chosen, use this as power.
                        (default: 4.0)
  --values {list[float],null}
                        List of inverse temperatures to use instead of
                        generating a schedule. If a list is provided, the
                        other parameters are ignored. (default: null)