NotebookRunnerListConfig#

pydantic model mobu.models.business.notebookrunnerlist.NotebookRunnerListConfig#

Configuration specialization for NotebookRunnerList.

Parameters:

data (Any)

Show JSON schema
{
   "title": "NotebookRunnerListConfig",
   "description": "Configuration specialization for NotebookRunnerList.",
   "type": "object",
   "properties": {
      "type": {
         "const": "NotebookRunnerList",
         "title": "Type of business to run",
         "type": "string"
      },
      "options": {
         "$ref": "#/$defs/NotebookRunnerOptions",
         "title": "Options for the monkey business"
      },
      "restart": {
         "default": false,
         "examples": [
            true
         ],
         "title": "Restart business after failure",
         "type": "boolean"
      }
   },
   "$defs": {
      "CollectionRule": {
         "description": "A set of patterns to filter the list of notebooks to run in a repo.",
         "properties": {
            "type": {
               "description": "intersect_union_of will evaluate the intersection of the current collection in the rule evaluation chain with union of all of the patterns in this rule. 'exclude_union_of' will subtract the union of the notebooks found by any pattern in this rule from the current current collection in the rule chain.",
               "enum": [
                  "intersect_union_of",
                  "exclude_union_of"
               ],
               "title": "Collection rule type",
               "type": "string"
            },
            "patterns": {
               "description": "A set of Python pathlib glob patterns: https://docs.python.org/3/library/pathlib.html#pattern-language This rule will gather all of the notebooks matched by any pattern in this list to either intersect or exclude.",
               "items": {
                  "type": "string"
               },
               "title": "patterns",
               "type": "array",
               "uniqueItems": true
            }
         },
         "required": [
            "type",
            "patterns"
         ],
         "title": "CollectionRule",
         "type": "object"
      },
      "HumanTimedelta": {
         "format": "duration",
         "type": "string"
      },
      "LogLevel": {
         "description": "Python logging level.\n\nAny case variation is accepted when converting a string to an enum value\nvia the class constructor.",
         "enum": [
            "DEBUG",
            "INFO",
            "WARNING",
            "ERROR",
            "CRITICAL"
         ],
         "title": "LogLevel",
         "type": "string"
      },
      "NotebookRunnerOptions": {
         "additionalProperties": false,
         "description": "Options for all types NotebookRunner monkey business.",
         "properties": {
            "exclude_dirs": {
               "default": [],
               "description": "DEPRECATED: use collection_rules instead. If both exclude_dirs and collection_rules are set, exclude_dirs will be added as exclude rules to the collection_rules. These directories are relative to the repo root. Any notebooks in child directories of these directories will also be excluded. Only used by the NotebookRunner businesses.",
               "examples": [
                  "some-dir",
                  "some-dir/some-other-dir"
               ],
               "items": {
                  "format": "path",
                  "type": "string"
               },
               "title": "Any notebooks in these directories will not be run",
               "type": "array",
               "uniqueItems": true
            },
            "collection_rules": {
               "default": [],
               "description": "A set of rules describing which notebooks in a repo to run. Only used by NotebookRunner businesses.",
               "items": {
                  "$ref": "#/$defs/CollectionRule"
               },
               "title": "Collection rules",
               "type": "array"
            },
            "error_idle_time": {
               "$ref": "#/$defs/HumanTimedelta",
               "default": "PT1M",
               "examples": [
                  600
               ],
               "title": "How long to wait after an error before restarting"
            },
            "idle_time": {
               "$ref": "#/$defs/HumanTimedelta",
               "default": "PT1M",
               "description": "After each loop executing monkey business, the monkey will pause for this long",
               "examples": [
                  60
               ],
               "title": "How long to wait between business executions"
            },
            "log_level": {
               "$ref": "#/$defs/LogLevel",
               "default": "INFO",
               "title": "Log level for this monkey business"
            },
            "delete_lab": {
               "default": true,
               "description": "By default, the lab is deleted and recreated after each iteration of monkey business. Set this to false to keep the same lab.",
               "examples": [
                  true
               ],
               "title": "Whether to delete the lab between iterations",
               "type": "boolean"
            },
            "delete_timeout": {
               "$ref": "#/$defs/HumanTimedelta",
               "default": "PT1M",
               "examples": [
                  60
               ],
               "title": "Timeout for deleting a lab"
            },
            "execution_idle_time": {
               "$ref": "#/$defs/HumanTimedelta",
               "default": "PT1S",
               "description": "Used by NubladoPythonLoop and NotebookRunner",
               "examples": [
                  1
               ],
               "title": "How long to wait between cell executions"
            },
            "get_node": {
               "default": true,
               "description": "Used by NubladoPythonLoop and its subclasses. Requires the lab have lsst.rsp pre-installed.",
               "title": "Whether to get the node name for error reporting",
               "type": "boolean"
            },
            "image": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/NubladoImageByClass"
                  },
                  {
                     "$ref": "#/$defs/NubladoImageByReference"
                  },
                  {
                     "$ref": "#/$defs/NubladoImageByTag"
                  }
               ],
               "title": "Nublado lab image to use"
            },
            "jitter": {
               "$ref": "#/$defs/HumanTimedelta",
               "default": "PT0S",
               "description": "If set to a non-zero value, pause for a random interval between 0 and that interval before logging in to JupyterHub, and between each iteration of the core execution loop. Use this when running lots of monkeys for load testing to spread their execution sequence out more realistically and avoid a thundering herd problem.",
               "examples": [
                  60
               ],
               "title": "Maximum random time to pause"
            },
            "jupyter_timeout": {
               "$ref": "#/$defs/HumanTimedelta",
               "default": "PT1M",
               "description": "Used as the connect, read, and write timeout for talking to either JupyterHub or Jupyter lab.",
               "title": "HTTP client timeout for Jupyter requests"
            },
            "max_websocket_message_size": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": 10485760,
               "description": "This has to be large enough to hold HTML and image output from executing notebook cells, even though we discard that data. Set to ``null`` for no limit.",
               "title": "Maximum length of WebSocket message (in bytes)"
            },
            "spawn_settle_time": {
               "$ref": "#/$defs/HumanTimedelta",
               "default": "PT10S",
               "description": "Wait this long after triggering a lab spawn before starting to poll its progress. KubeSpawner 1.1.0 has a bug where progress queries prior to starting the spawn will fail with an exception that closes the progress EventStream.",
               "examples": [
                  10
               ],
               "title": "How long to wait before polling spawn progress"
            },
            "spawn_timeout": {
               "$ref": "#/$defs/HumanTimedelta",
               "default": "PT10M10S",
               "examples": [
                  610
               ],
               "title": "Timeout for spawning a lab"
            },
            "url_prefix": {
               "default": "/nb/",
               "title": "URL prefix for JupyterHub",
               "type": "string"
            },
            "working_directory": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "examples": [
                  "notebooks/tutorial-notebooks"
               ],
               "title": "Working directory when running code"
            },
            "repo_ref": {
               "default": "prod",
               "description": "Only used by the NotebookRunner",
               "examples": [
                  "main",
                  "03cd564dd2025bf17054d9ebfeeb5c5a266e3484"
               ],
               "title": "Git ref of notebook repository to execute",
               "type": "string"
            },
            "repo_url": {
               "default": "https://github.com/lsst-sqre/notebook-demo.git",
               "description": "Only used by the NotebookRunner",
               "title": "Git URL of notebook repository to execute",
               "type": "string"
            },
            "notebook_idle_time": {
               "$ref": "#/$defs/HumanTimedelta",
               "default": "PT0S",
               "description": "Used by NotebookRunner businesses",
               "examples": [
                  "30s"
               ],
               "title": "How long to wait between notebook executions"
            }
         },
         "title": "NotebookRunnerOptions",
         "type": "object"
      },
      "NubladoImageByClass": {
         "description": "Spawn the recommended image.",
         "properties": {
            "image_class": {
               "default": "recommended",
               "enum": [
                  "recommended",
                  "latest-release",
                  "latest-weekly",
                  "latest-daily"
               ],
               "title": "Class of image to spawn",
               "type": "string"
            },
            "size": {
               "$ref": "#/$defs/NubladoImageSize",
               "default": "Large",
               "description": "Must be one of the sizes understood by Nublado.",
               "title": "Size of image to spawn"
            },
            "description": {
               "default": "",
               "title": "Human-readable image description",
               "type": "string"
            },
            "debug": {
               "default": false,
               "title": "Whether to enable lab debugging",
               "type": "boolean"
            }
         },
         "title": "NubladoImageByClass",
         "type": "object"
      },
      "NubladoImageByReference": {
         "description": "Spawn an image by full Docker reference.",
         "properties": {
            "image_class": {
               "const": "by-reference",
               "default": "by-reference",
               "title": "Class of image to spawn",
               "type": "string"
            },
            "size": {
               "$ref": "#/$defs/NubladoImageSize",
               "default": "Large",
               "description": "Must be one of the sizes understood by Nublado.",
               "title": "Size of image to spawn"
            },
            "description": {
               "default": "",
               "title": "Human-readable image description",
               "type": "string"
            },
            "debug": {
               "default": false,
               "title": "Whether to enable lab debugging",
               "type": "boolean"
            },
            "reference": {
               "title": "Docker reference of lab image to spawn",
               "type": "string"
            }
         },
         "required": [
            "reference"
         ],
         "title": "NubladoImageByReference",
         "type": "object"
      },
      "NubladoImageByTag": {
         "description": "Spawn an image by image tag.",
         "properties": {
            "image_class": {
               "const": "by-tag",
               "default": "by-tag",
               "title": "Class of image to spawn",
               "type": "string"
            },
            "size": {
               "$ref": "#/$defs/NubladoImageSize",
               "default": "Large",
               "description": "Must be one of the sizes understood by Nublado.",
               "title": "Size of image to spawn"
            },
            "description": {
               "default": "",
               "title": "Human-readable image description",
               "type": "string"
            },
            "debug": {
               "default": false,
               "title": "Whether to enable lab debugging",
               "type": "boolean"
            },
            "tag": {
               "title": "Tag of image to spawn",
               "type": "string"
            }
         },
         "required": [
            "tag"
         ],
         "title": "NubladoImageByTag",
         "type": "object"
      },
      "NubladoImageSize": {
         "description": "Acceptable sizes of images to spawn.",
         "enum": [
            "Fine",
            "Diminutive",
            "Tiny",
            "Small",
            "Medium",
            "Large",
            "Huge",
            "Gargantuan",
            "Colossal"
         ],
         "title": "NubladoImageSize",
         "type": "string"
      }
   },
   "additionalProperties": false,
   "required": [
      "type"
   ]
}

Config:
  • extra: str = forbid

Fields:
field options: NotebookRunnerOptions [Optional]#
field restart: bool = False#
field type: Literal['NotebookRunnerList'] [Required]#