OpenAPI Client Models

pydantic model torc.openapi_client.models.workflow_specification_model.WorkflowSpecificationModel

WorkflowSpecificationModel

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Show JSON schema
{
   "title": "WorkflowSpecificationModel",
   "description": "WorkflowSpecificationModel",
   "type": "object",
   "properties": {
      "name": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Name of the workflow",
         "title": "Name"
      },
      "key": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Optional key to use as the database identifier. If set, it must be unique in the database. It is recommended to let the database create the identifier.",
         "title": "Key"
      },
      "user": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "User that created the workflow",
         "title": "User"
      },
      "description": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Timestamp of workflow creation",
         "title": "Description"
      },
      "jobs": {
         "anyOf": [
            {
               "items": {
                  "$ref": "#/$defs/JobSpecificationModel"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Jobs in the workflow. Each job name must be unique.",
         "title": "Jobs"
      },
      "files": {
         "anyOf": [
            {
               "items": {
                  "$ref": "#/$defs/FileModel"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Files in the workflow. Each file name must be unique.",
         "title": "Files"
      },
      "user_data": {
         "anyOf": [
            {
               "items": {
                  "$ref": "#/$defs/UserDataModel"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "User data in the workflow. Each name must be unique.",
         "title": "User Data"
      },
      "resource_requirements": {
         "anyOf": [
            {
               "items": {
                  "$ref": "#/$defs/ResourceRequirementsModel"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Resource requirements in the workflow. Each name must be unique.",
         "title": "Resource Requirements"
      },
      "schedulers": {
         "anyOf": [
            {
               "$ref": "#/$defs/WorkflowSpecificationsSchedulers"
            },
            {
               "type": "null"
            }
         ],
         "default": null
      },
      "config": {
         "anyOf": [
            {
               "$ref": "#/$defs/WorkflowConfigModel"
            },
            {
               "type": "null"
            }
         ],
         "default": null
      }
   },
   "$defs": {
      "AwsSchedulerModel": {
         "description": "AwsSchedulerModel",
         "properties": {
            "name": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Name"
            },
            "_key": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Key"
            },
            "_id": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Id"
            },
            "_rev": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Rev"
            }
         },
         "title": "AwsSchedulerModel",
         "type": "object"
      },
      "ComputeNodeResourceStatsModel": {
         "description": "ComputeNodeResourceStatsModel",
         "properties": {
            "cpu": {
               "anyOf": [
                  {
                     "type": "boolean"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": true,
               "title": "Cpu"
            },
            "disk": {
               "anyOf": [
                  {
                     "type": "boolean"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": false,
               "title": "Disk"
            },
            "memory": {
               "anyOf": [
                  {
                     "type": "boolean"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": true,
               "title": "Memory"
            },
            "network": {
               "anyOf": [
                  {
                     "type": "boolean"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": false,
               "title": "Network"
            },
            "process": {
               "anyOf": [
                  {
                     "type": "boolean"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": false,
               "title": "Process"
            },
            "include_child_processes": {
               "anyOf": [
                  {
                     "type": "boolean"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": true,
               "title": "Include Child Processes"
            },
            "recurse_child_processes": {
               "anyOf": [
                  {
                     "type": "boolean"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": false,
               "title": "Recurse Child Processes"
            },
            "monitor_type": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": "aggregation",
               "title": "Monitor Type"
            },
            "make_plots": {
               "anyOf": [
                  {
                     "type": "boolean"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": true,
               "title": "Make Plots"
            },
            "interval": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Interval"
            }
         },
         "title": "ComputeNodeResourceStatsModel",
         "type": "object"
      },
      "ComputeNodeScheduleParams": {
         "description": "ComputeNodeScheduleParams",
         "properties": {
            "max_parallel_jobs": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Max Parallel Jobs"
            },
            "num_jobs": {
               "title": "Num Jobs",
               "type": "integer"
            },
            "scheduler_id": {
               "title": "Scheduler Id",
               "type": "string"
            },
            "start_one_worker_per_node": {
               "anyOf": [
                  {
                     "type": "boolean"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": false,
               "title": "Start One Worker Per Node"
            }
         },
         "required": [
            "num_jobs",
            "scheduler_id"
         ],
         "title": "ComputeNodeScheduleParams",
         "type": "object"
      },
      "FileModel": {
         "description": "Data model for files needed or produced by jobs. Can be data or code.",
         "properties": {
            "name": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "User-defined name of the file (not necessarily the filename)",
               "title": "Name"
            },
            "path": {
               "description": "Path to the file; can be relative to the execution directory.",
               "title": "Path",
               "type": "string"
            },
            "st_mtime": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "Timestamp of when the file was last modified",
               "title": "St Mtime"
            },
            "_key": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "Unique database identifier for the file. Does not include collection name.",
               "title": "Key"
            },
            "_id": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "Unique database identifier for the file. Includes collection name and _key.",
               "title": "Id"
            },
            "_rev": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "Database revision of the file",
               "title": "Rev"
            }
         },
         "required": [
            "path"
         ],
         "title": "FileModel",
         "type": "object"
      },
      "JobSpecificationModel": {
         "description": "JobSpecificationModel",
         "properties": {
            "name": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "Name of the job; must be unique within the workflow specification.",
               "title": "Name"
            },
            "key": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "Optional database identifier for the job. If set, must be unique. It is recommended to let the database create the identifier.",
               "title": "Key"
            },
            "command": {
               "description": "CLI command to execute. Will not be executed in a shell and so must not include shell characters.",
               "title": "Command",
               "type": "string"
            },
            "invocation_script": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "Wrapper script for command in case the environment needs customization.",
               "title": "Invocation Script"
            },
            "cancel_on_blocking_job_failure": {
               "anyOf": [
                  {
                     "type": "boolean"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": true,
               "description": "Cancel this job if any of its blocking jobs fails.",
               "title": "Cancel On Blocking Job Failure"
            },
            "supports_termination": {
               "anyOf": [
                  {
                     "type": "boolean"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": false,
               "description": "Informs torc that the job can be terminated gracefully before a wall-time timeout.",
               "title": "Supports Termination"
            },
            "scheduler": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "Optional name of scheduler needed by this job",
               "title": "Scheduler"
            },
            "schedule_compute_nodes": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/ComputeNodeScheduleParams"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            },
            "input_user_data": {
               "anyOf": [
                  {
                     "items": {
                        "type": "string"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "Names of user-data objects that this job needs",
               "title": "Input User Data"
            },
            "output_user_data": {
               "anyOf": [
                  {
                     "items": {
                        "type": "string"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "Names of user-data objects that this job produces",
               "title": "Output User Data"
            },
            "resource_requirements": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "Optional name of resources required by this job",
               "title": "Resource Requirements"
            },
            "input_files": {
               "anyOf": [
                  {
                     "items": {
                        "type": "string"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "Names of files that this job needs",
               "title": "Input Files"
            },
            "output_files": {
               "anyOf": [
                  {
                     "items": {
                        "type": "string"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "Names of files that this job produces",
               "title": "Output Files"
            },
            "blocked_by": {
               "anyOf": [
                  {
                     "items": {
                        "type": "string"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "Names of jobs that block this job",
               "title": "Blocked By"
            }
         },
         "required": [
            "command"
         ],
         "title": "JobSpecificationModel",
         "type": "object"
      },
      "LocalSchedulerModel": {
         "description": "LocalSchedulerModel",
         "properties": {
            "name": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": "default",
               "title": "Name"
            },
            "memory": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Memory"
            },
            "num_cpus": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Num Cpus"
            },
            "_key": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Key"
            },
            "_id": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Id"
            },
            "_rev": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Rev"
            }
         },
         "title": "LocalSchedulerModel",
         "type": "object"
      },
      "ResourceRequirementsModel": {
         "description": "ResourceRequirementsModel",
         "properties": {
            "name": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "Name of the resource requirements",
               "title": "Name"
            },
            "num_cpus": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "Number of CPUs required by a job",
               "title": "Num Cpus"
            },
            "num_gpus": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "Number of GPUs required by a job",
               "title": "Num Gpus"
            },
            "num_nodes": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "Number of nodes required by a job",
               "title": "Num Nodes"
            },
            "memory": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": "1m",
               "description": "Amount of memory required by a job, e.g., 20g",
               "title": "Memory"
            },
            "runtime": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": "P0DT1M",
               "description": "Maximum runtime for a job",
               "title": "Runtime"
            },
            "_key": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Key"
            },
            "_id": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Id"
            },
            "_rev": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Rev"
            }
         },
         "title": "ResourceRequirementsModel",
         "type": "object"
      },
      "SlurmSchedulerModel": {
         "description": "Data model for Slurm scheduler",
         "properties": {
            "name": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "Name of the scheduler",
               "title": "Name"
            },
            "account": {
               "description": "Slurm account ID",
               "title": "Account",
               "type": "string"
            },
            "gres": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "Generic resource requirement",
               "title": "Gres"
            },
            "mem": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "Compute node memory requirement",
               "title": "Mem"
            },
            "nodes": {
               "description": "Number of nodes for the Slurm allocation",
               "title": "Nodes",
               "type": "integer"
            },
            "ntasks_per_node": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "Number of tasks to invoke on each node",
               "title": "Ntasks Per Node"
            },
            "partition": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "Compute node partition; likely not necessary because Slurm should optimize it.",
               "title": "Partition"
            },
            "qos": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": "normal",
               "description": "Priority of Slurm job",
               "title": "Qos"
            },
            "tmp": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "Compute node local storage size requirement",
               "title": "Tmp"
            },
            "walltime": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "Slurm runtime requirement, e.g., 04:00:00",
               "title": "Walltime"
            },
            "extra": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "Extra Slurm parameters that torc will append to the sbatch command",
               "title": "Extra"
            },
            "_key": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Key"
            },
            "_id": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Id"
            },
            "_rev": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Rev"
            }
         },
         "required": [
            "account",
            "nodes"
         ],
         "title": "SlurmSchedulerModel",
         "type": "object"
      },
      "UserDataModel": {
         "description": "UserDataModel",
         "properties": {
            "is_ephemeral": {
               "anyOf": [
                  {
                     "type": "boolean"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": false,
               "description": "The data will only exist for the duration of one run. Torc will clear it before starting new runs.",
               "title": "Is Ephemeral"
            },
            "name": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "Name of the data object",
               "title": "Name"
            },
            "data": {
               "anyOf": [
                  {
                     "additionalProperties": true,
                     "type": "object"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "User-defined data",
               "title": "Data"
            },
            "_key": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Key"
            },
            "_id": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Id"
            },
            "_rev": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Rev"
            }
         },
         "title": "UserDataModel",
         "type": "object"
      },
      "WorkflowConfigModel": {
         "description": "WorkflowConfigModel",
         "properties": {
            "workflow_startup_script": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Workflow Startup Script"
            },
            "workflow_completion_script": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Workflow Completion Script"
            },
            "worker_startup_script": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Worker Startup Script"
            },
            "compute_node_resource_stats": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/ComputeNodeResourceStatsModel"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            },
            "compute_node_expiration_buffer_seconds": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "Inform all compute nodes to shut down this number of seconds before the expiration time. This allows torc to send SIGTERM to all job processes and set all statuses to terminated. Increase the time in cases where the job processes handle SIGTERM and need more time to gracefully shut down. Set the value to 0 to maximize the time given to jobs. If not set, take the database's default value of 60 seconds.",
               "title": "Compute Node Expiration Buffer Seconds"
            },
            "compute_node_wait_for_new_jobs_seconds": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "Inform all compute nodes to wait for new jobs for this time period before exiting. Does not apply if the workflow is complete.",
               "title": "Compute Node Wait For New Jobs Seconds"
            },
            "compute_node_ignore_workflow_completion": {
               "anyOf": [
                  {
                     "type": "boolean"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": false,
               "description": "Inform all compute nodes to ignore workflow completions and hold onto allocations indefinitely. Useful for debugging failed jobs and possibly dynamic workflows where jobs get added after starting.",
               "title": "Compute Node Ignore Workflow Completion"
            },
            "compute_node_wait_for_healthy_database_minutes": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "Inform all compute nodes to wait this number of minutes if the database becomes unresponsive.",
               "title": "Compute Node Wait For Healthy Database Minutes"
            },
            "prepare_jobs_sort_method": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": "gpus_runtime_memory",
               "description": "Inform all compute nodes to use this sort method when calling the prepare_jobs_for_submission command.",
               "title": "Prepare Jobs Sort Method"
            },
            "_key": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Key"
            },
            "_id": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Id"
            },
            "_rev": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Rev"
            }
         },
         "title": "WorkflowConfigModel",
         "type": "object"
      },
      "WorkflowSpecificationsSchedulers": {
         "description": "Data model for all schedulers in the workflow",
         "properties": {
            "aws_schedulers": {
               "anyOf": [
                  {
                     "items": {
                        "$ref": "#/$defs/AwsSchedulerModel"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Aws Schedulers"
            },
            "local_schedulers": {
               "anyOf": [
                  {
                     "items": {
                        "$ref": "#/$defs/LocalSchedulerModel"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Local Schedulers"
            },
            "slurm_schedulers": {
               "anyOf": [
                  {
                     "items": {
                        "$ref": "#/$defs/SlurmSchedulerModel"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Slurm Schedulers"
            }
         },
         "title": "WorkflowSpecificationsSchedulers",
         "type": "object"
      }
   }
}

Config:
  • populate_by_name: bool = True

  • validate_assignment: bool = True

  • protected_namespaces: tuple = ()

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
field config: WorkflowConfigModel | None = None
field description: StrictStr | None = None

Timestamp of workflow creation

field files: List[FileModel] | None = None

Files in the workflow. Each file name must be unique.

field jobs: List[JobSpecificationModel] | None = None

Jobs in the workflow. Each job name must be unique.

field key: StrictStr | None = None

Optional key to use as the database identifier. If set, it must be unique in the database. It is recommended to let the database create the identifier.

field name: StrictStr | None = None

Name of the workflow

field resource_requirements: List[ResourceRequirementsModel] | None = None

Resource requirements in the workflow. Each name must be unique.

field schedulers: WorkflowSpecificationsSchedulers | None = None
field user: StrictStr | None = None

User that created the workflow

field user_data: List[UserDataModel] | None = None

User data in the workflow. Each name must be unique.

classmethod from_dict(obj: Dict[str, Any] | None) Self | None

Create an instance of WorkflowSpecificationModel from a dict

classmethod from_json(json_str: str) Self | None

Create an instance of WorkflowSpecificationModel from a JSON string

to_dict() Dict[str, Any]

Return the dictionary representation of the model using alias.

This has the following differences from calling pydantic’s self.model_dump(by_alias=True):

  • None is only added to the output dict for nullable fields that were set at model initialization. Other fields with value None are ignored.

to_json() str

Returns the JSON representation of the model using alias

to_str() str

Returns the string representation of the model using alias

pydantic model torc.openapi_client.models.job_specification_model.JobSpecificationModel

JobSpecificationModel

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Show JSON schema
{
   "title": "JobSpecificationModel",
   "description": "JobSpecificationModel",
   "type": "object",
   "properties": {
      "name": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Name of the job; must be unique within the workflow specification.",
         "title": "Name"
      },
      "key": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Optional database identifier for the job. If set, must be unique. It is recommended to let the database create the identifier.",
         "title": "Key"
      },
      "command": {
         "description": "CLI command to execute. Will not be executed in a shell and so must not include shell characters.",
         "title": "Command",
         "type": "string"
      },
      "invocation_script": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Wrapper script for command in case the environment needs customization.",
         "title": "Invocation Script"
      },
      "cancel_on_blocking_job_failure": {
         "anyOf": [
            {
               "type": "boolean"
            },
            {
               "type": "null"
            }
         ],
         "default": true,
         "description": "Cancel this job if any of its blocking jobs fails.",
         "title": "Cancel On Blocking Job Failure"
      },
      "supports_termination": {
         "anyOf": [
            {
               "type": "boolean"
            },
            {
               "type": "null"
            }
         ],
         "default": false,
         "description": "Informs torc that the job can be terminated gracefully before a wall-time timeout.",
         "title": "Supports Termination"
      },
      "scheduler": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Optional name of scheduler needed by this job",
         "title": "Scheduler"
      },
      "schedule_compute_nodes": {
         "anyOf": [
            {
               "$ref": "#/$defs/ComputeNodeScheduleParams"
            },
            {
               "type": "null"
            }
         ],
         "default": null
      },
      "input_user_data": {
         "anyOf": [
            {
               "items": {
                  "type": "string"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Names of user-data objects that this job needs",
         "title": "Input User Data"
      },
      "output_user_data": {
         "anyOf": [
            {
               "items": {
                  "type": "string"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Names of user-data objects that this job produces",
         "title": "Output User Data"
      },
      "resource_requirements": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Optional name of resources required by this job",
         "title": "Resource Requirements"
      },
      "input_files": {
         "anyOf": [
            {
               "items": {
                  "type": "string"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Names of files that this job needs",
         "title": "Input Files"
      },
      "output_files": {
         "anyOf": [
            {
               "items": {
                  "type": "string"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Names of files that this job produces",
         "title": "Output Files"
      },
      "blocked_by": {
         "anyOf": [
            {
               "items": {
                  "type": "string"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Names of jobs that block this job",
         "title": "Blocked By"
      }
   },
   "$defs": {
      "ComputeNodeScheduleParams": {
         "description": "ComputeNodeScheduleParams",
         "properties": {
            "max_parallel_jobs": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Max Parallel Jobs"
            },
            "num_jobs": {
               "title": "Num Jobs",
               "type": "integer"
            },
            "scheduler_id": {
               "title": "Scheduler Id",
               "type": "string"
            },
            "start_one_worker_per_node": {
               "anyOf": [
                  {
                     "type": "boolean"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": false,
               "title": "Start One Worker Per Node"
            }
         },
         "required": [
            "num_jobs",
            "scheduler_id"
         ],
         "title": "ComputeNodeScheduleParams",
         "type": "object"
      }
   },
   "required": [
      "command"
   ]
}

Config:
  • populate_by_name: bool = True

  • validate_assignment: bool = True

  • protected_namespaces: tuple = ()

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
field blocked_by: List[StrictStr] | None = None

Names of jobs that block this job

field cancel_on_blocking_job_failure: StrictBool | None = True

Cancel this job if any of its blocking jobs fails.

field command: StrictStr [Required]

CLI command to execute. Will not be executed in a shell and so must not include shell characters.

Constraints:
  • strict = True

field input_files: List[StrictStr] | None = None

Names of files that this job needs

field input_user_data: List[StrictStr] | None = None

Names of user-data objects that this job needs

field invocation_script: StrictStr | None = None

Wrapper script for command in case the environment needs customization.

field key: StrictStr | None = None

Optional database identifier for the job. If set, must be unique. It is recommended to let the database create the identifier.

field name: StrictStr | None = None

Name of the job; must be unique within the workflow specification.

field output_files: List[StrictStr] | None = None

Names of files that this job produces

field output_user_data: List[StrictStr] | None = None

Names of user-data objects that this job produces

field resource_requirements: StrictStr | None = None

Optional name of resources required by this job

field schedule_compute_nodes: ComputeNodeScheduleParams | None = None
field scheduler: StrictStr | None = None

Optional name of scheduler needed by this job

field supports_termination: StrictBool | None = False

Informs torc that the job can be terminated gracefully before a wall-time timeout.

classmethod from_dict(obj: Dict[str, Any] | None) Self | None

Create an instance of JobSpecificationModel from a dict

classmethod from_json(json_str: str) Self | None

Create an instance of JobSpecificationModel from a JSON string

to_dict() Dict[str, Any]

Return the dictionary representation of the model using alias.

This has the following differences from calling pydantic’s self.model_dump(by_alias=True):

  • None is only added to the output dict for nullable fields that were set at model initialization. Other fields with value None are ignored.

to_json() str

Returns the JSON representation of the model using alias

to_str() str

Returns the string representation of the model using alias

pydantic model torc.openapi_client.models.workflow_model.WorkflowModel

WorkflowModel

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Show JSON schema
{
   "title": "WorkflowModel",
   "description": "WorkflowModel",
   "type": "object",
   "properties": {
      "name": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Name of the workflow",
         "title": "Name"
      },
      "user": {
         "description": "User that created the workflow",
         "title": "User",
         "type": "string"
      },
      "description": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Description of the workflow",
         "title": "Description"
      },
      "timestamp": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Timestamp of workflow creation",
         "title": "Timestamp"
      },
      "is_archived": {
         "anyOf": [
            {
               "type": "boolean"
            },
            {
               "type": "null"
            }
         ],
         "default": false,
         "description": "Flag indicating whether the workflow has been archived",
         "title": "Is Archived"
      },
      "_key": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Key"
      },
      "_id": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Id"
      },
      "_rev": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Rev"
      }
   },
   "required": [
      "user"
   ]
}

Config:
  • populate_by_name: bool = True

  • validate_assignment: bool = True

  • protected_namespaces: tuple = ()

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
field description: StrictStr | None = None

Description of the workflow

field id: StrictStr | None = None (alias '_id')
field is_archived: StrictBool | None = False

Flag indicating whether the workflow has been archived

field key: StrictStr | None = None (alias '_key')
field name: StrictStr | None = None

Name of the workflow

field rev: StrictStr | None = None (alias '_rev')
field timestamp: StrictStr | None = None

Timestamp of workflow creation

field user: StrictStr [Required]

User that created the workflow

Constraints:
  • strict = True

classmethod from_dict(obj: Dict[str, Any] | None) Self | None

Create an instance of WorkflowModel from a dict

classmethod from_json(json_str: str) Self | None

Create an instance of WorkflowModel from a JSON string

to_dict() Dict[str, Any]

Return the dictionary representation of the model using alias.

This has the following differences from calling pydantic’s self.model_dump(by_alias=True):

  • None is only added to the output dict for nullable fields that were set at model initialization. Other fields with value None are ignored.

to_json() str

Returns the JSON representation of the model using alias

to_str() str

Returns the string representation of the model using alias

pydantic model torc.openapi_client.models.workflow_config_model.WorkflowConfigModel

WorkflowConfigModel

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Show JSON schema
{
   "title": "WorkflowConfigModel",
   "description": "WorkflowConfigModel",
   "type": "object",
   "properties": {
      "workflow_startup_script": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Workflow Startup Script"
      },
      "workflow_completion_script": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Workflow Completion Script"
      },
      "worker_startup_script": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Worker Startup Script"
      },
      "compute_node_resource_stats": {
         "anyOf": [
            {
               "$ref": "#/$defs/ComputeNodeResourceStatsModel"
            },
            {
               "type": "null"
            }
         ],
         "default": null
      },
      "compute_node_expiration_buffer_seconds": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Inform all compute nodes to shut down this number of seconds before the expiration time. This allows torc to send SIGTERM to all job processes and set all statuses to terminated. Increase the time in cases where the job processes handle SIGTERM and need more time to gracefully shut down. Set the value to 0 to maximize the time given to jobs. If not set, take the database's default value of 60 seconds.",
         "title": "Compute Node Expiration Buffer Seconds"
      },
      "compute_node_wait_for_new_jobs_seconds": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Inform all compute nodes to wait for new jobs for this time period before exiting. Does not apply if the workflow is complete.",
         "title": "Compute Node Wait For New Jobs Seconds"
      },
      "compute_node_ignore_workflow_completion": {
         "anyOf": [
            {
               "type": "boolean"
            },
            {
               "type": "null"
            }
         ],
         "default": false,
         "description": "Inform all compute nodes to ignore workflow completions and hold onto allocations indefinitely. Useful for debugging failed jobs and possibly dynamic workflows where jobs get added after starting.",
         "title": "Compute Node Ignore Workflow Completion"
      },
      "compute_node_wait_for_healthy_database_minutes": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Inform all compute nodes to wait this number of minutes if the database becomes unresponsive.",
         "title": "Compute Node Wait For Healthy Database Minutes"
      },
      "prepare_jobs_sort_method": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": "gpus_runtime_memory",
         "description": "Inform all compute nodes to use this sort method when calling the prepare_jobs_for_submission command.",
         "title": "Prepare Jobs Sort Method"
      },
      "_key": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Key"
      },
      "_id": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Id"
      },
      "_rev": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Rev"
      }
   },
   "$defs": {
      "ComputeNodeResourceStatsModel": {
         "description": "ComputeNodeResourceStatsModel",
         "properties": {
            "cpu": {
               "anyOf": [
                  {
                     "type": "boolean"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": true,
               "title": "Cpu"
            },
            "disk": {
               "anyOf": [
                  {
                     "type": "boolean"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": false,
               "title": "Disk"
            },
            "memory": {
               "anyOf": [
                  {
                     "type": "boolean"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": true,
               "title": "Memory"
            },
            "network": {
               "anyOf": [
                  {
                     "type": "boolean"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": false,
               "title": "Network"
            },
            "process": {
               "anyOf": [
                  {
                     "type": "boolean"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": false,
               "title": "Process"
            },
            "include_child_processes": {
               "anyOf": [
                  {
                     "type": "boolean"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": true,
               "title": "Include Child Processes"
            },
            "recurse_child_processes": {
               "anyOf": [
                  {
                     "type": "boolean"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": false,
               "title": "Recurse Child Processes"
            },
            "monitor_type": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": "aggregation",
               "title": "Monitor Type"
            },
            "make_plots": {
               "anyOf": [
                  {
                     "type": "boolean"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": true,
               "title": "Make Plots"
            },
            "interval": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Interval"
            }
         },
         "title": "ComputeNodeResourceStatsModel",
         "type": "object"
      }
   }
}

Config:
  • populate_by_name: bool = True

  • validate_assignment: bool = True

  • protected_namespaces: tuple = ()

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
Validators:
field compute_node_expiration_buffer_seconds: StrictInt | None = None

Inform all compute nodes to shut down this number of seconds before the expiration time. This allows torc to send SIGTERM to all job processes and set all statuses to terminated. Increase the time in cases where the job processes handle SIGTERM and need more time to gracefully shut down. Set the value to 0 to maximize the time given to jobs. If not set, take the database’s default value of 60 seconds.

field compute_node_ignore_workflow_completion: StrictBool | None = False

Inform all compute nodes to ignore workflow completions and hold onto allocations indefinitely. Useful for debugging failed jobs and possibly dynamic workflows where jobs get added after starting.

field compute_node_resource_stats: ComputeNodeResourceStatsModel | None = None
field compute_node_wait_for_healthy_database_minutes: StrictInt | None = None

Inform all compute nodes to wait this number of minutes if the database becomes unresponsive.

field compute_node_wait_for_new_jobs_seconds: StrictInt | None = None

Inform all compute nodes to wait for new jobs for this time period before exiting. Does not apply if the workflow is complete.

field id: StrictStr | None = None (alias '_id')
field key: StrictStr | None = None (alias '_key')
field prepare_jobs_sort_method: StrictStr | None = 'gpus_runtime_memory'

Inform all compute nodes to use this sort method when calling the prepare_jobs_for_submission command.

Validated by:
field rev: StrictStr | None = None (alias '_rev')
field worker_startup_script: StrictStr | None = None
field workflow_completion_script: StrictStr | None = None
field workflow_startup_script: StrictStr | None = None
classmethod from_dict(obj: Dict[str, Any] | None) Self | None

Create an instance of WorkflowConfigModel from a dict

classmethod from_json(json_str: str) Self | None

Create an instance of WorkflowConfigModel from a JSON string

validator prepare_jobs_sort_method_validate_enum  »  prepare_jobs_sort_method

Validates the enum

to_dict() Dict[str, Any]

Return the dictionary representation of the model using alias.

This has the following differences from calling pydantic’s self.model_dump(by_alias=True):

  • None is only added to the output dict for nullable fields that were set at model initialization. Other fields with value None are ignored.

to_json() str

Returns the JSON representation of the model using alias

to_str() str

Returns the string representation of the model using alias

pydantic model torc.openapi_client.models.compute_node_resource_stats_model.ComputeNodeResourceStatsModel

ComputeNodeResourceStatsModel

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Show JSON schema
{
   "title": "ComputeNodeResourceStatsModel",
   "description": "ComputeNodeResourceStatsModel",
   "type": "object",
   "properties": {
      "cpu": {
         "anyOf": [
            {
               "type": "boolean"
            },
            {
               "type": "null"
            }
         ],
         "default": true,
         "title": "Cpu"
      },
      "disk": {
         "anyOf": [
            {
               "type": "boolean"
            },
            {
               "type": "null"
            }
         ],
         "default": false,
         "title": "Disk"
      },
      "memory": {
         "anyOf": [
            {
               "type": "boolean"
            },
            {
               "type": "null"
            }
         ],
         "default": true,
         "title": "Memory"
      },
      "network": {
         "anyOf": [
            {
               "type": "boolean"
            },
            {
               "type": "null"
            }
         ],
         "default": false,
         "title": "Network"
      },
      "process": {
         "anyOf": [
            {
               "type": "boolean"
            },
            {
               "type": "null"
            }
         ],
         "default": false,
         "title": "Process"
      },
      "include_child_processes": {
         "anyOf": [
            {
               "type": "boolean"
            },
            {
               "type": "null"
            }
         ],
         "default": true,
         "title": "Include Child Processes"
      },
      "recurse_child_processes": {
         "anyOf": [
            {
               "type": "boolean"
            },
            {
               "type": "null"
            }
         ],
         "default": false,
         "title": "Recurse Child Processes"
      },
      "monitor_type": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": "aggregation",
         "title": "Monitor Type"
      },
      "make_plots": {
         "anyOf": [
            {
               "type": "boolean"
            },
            {
               "type": "null"
            }
         ],
         "default": true,
         "title": "Make Plots"
      },
      "interval": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Interval"
      }
   }
}

Config:
  • populate_by_name: bool = True

  • validate_assignment: bool = True

  • protected_namespaces: tuple = ()

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
field cpu: StrictBool | None = True
field disk: StrictBool | None = False
field include_child_processes: StrictBool | None = True
field interval: StrictFloat | StrictInt | None = None
field make_plots: StrictBool | None = True
field memory: StrictBool | None = True
field monitor_type: StrictStr | None = 'aggregation'
field network: StrictBool | None = False
field process: StrictBool | None = False
field recurse_child_processes: StrictBool | None = False
classmethod from_dict(obj: Dict[str, Any] | None) Self | None

Create an instance of ComputeNodeResourceStatsModel from a dict

classmethod from_json(json_str: str) Self | None

Create an instance of ComputeNodeResourceStatsModel from a JSON string

to_dict() Dict[str, Any]

Return the dictionary representation of the model using alias.

This has the following differences from calling pydantic’s self.model_dump(by_alias=True):

  • None is only added to the output dict for nullable fields that were set at model initialization. Other fields with value None are ignored.

to_json() str

Returns the JSON representation of the model using alias

to_str() str

Returns the string representation of the model using alias

pydantic model torc.openapi_client.models.compute_node_stats_model.ComputeNodeStatsModel

ComputeNodeStatsModel

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Show JSON schema
{
   "title": "ComputeNodeStatsModel",
   "description": "ComputeNodeStatsModel",
   "type": "object",
   "properties": {
      "hostname": {
         "title": "Hostname",
         "type": "string"
      },
      "stats": {
         "anyOf": [
            {
               "items": {
                  "$ref": "#/$defs/ComputeNodeStats"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Stats"
      },
      "timestamp": {
         "title": "Timestamp",
         "type": "string"
      },
      "_key": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Key"
      },
      "_id": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Id"
      },
      "_rev": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Rev"
      }
   },
   "$defs": {
      "ComputeNodeStats": {
         "description": "ComputeNodeStats",
         "properties": {
            "resource_type": {
               "title": "Resource Type",
               "type": "string"
            },
            "average": {
               "additionalProperties": true,
               "title": "Average",
               "type": "object"
            },
            "minimum": {
               "additionalProperties": true,
               "title": "Minimum",
               "type": "object"
            },
            "maximum": {
               "additionalProperties": true,
               "title": "Maximum",
               "type": "object"
            },
            "num_samples": {
               "title": "Num Samples",
               "type": "integer"
            },
            "job_key": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Job Key"
            }
         },
         "required": [
            "resource_type",
            "average",
            "minimum",
            "maximum",
            "num_samples"
         ],
         "title": "ComputeNodeStats",
         "type": "object"
      }
   },
   "required": [
      "hostname",
      "timestamp"
   ]
}

Config:
  • populate_by_name: bool = True

  • validate_assignment: bool = True

  • protected_namespaces: tuple = ()

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
field hostname: StrictStr [Required]
Constraints:
  • strict = True

field id: StrictStr | None = None (alias '_id')
field key: StrictStr | None = None (alias '_key')
field rev: StrictStr | None = None (alias '_rev')
field stats: List[ComputeNodeStats] | None = None
field timestamp: StrictStr [Required]
Constraints:
  • strict = True

classmethod from_dict(obj: Dict[str, Any] | None) Self | None

Create an instance of ComputeNodeStatsModel from a dict

classmethod from_json(json_str: str) Self | None

Create an instance of ComputeNodeStatsModel from a JSON string

to_dict() Dict[str, Any]

Return the dictionary representation of the model using alias.

This has the following differences from calling pydantic’s self.model_dump(by_alias=True):

  • None is only added to the output dict for nullable fields that were set at model initialization. Other fields with value None are ignored.

to_json() str

Returns the JSON representation of the model using alias

to_str() str

Returns the string representation of the model using alias

pydantic model torc.openapi_client.models.compute_node_model.ComputeNodeModel

ComputeNodeModel

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Show JSON schema
{
   "title": "ComputeNodeModel",
   "description": "ComputeNodeModel",
   "type": "object",
   "properties": {
      "hostname": {
         "title": "Hostname",
         "type": "string"
      },
      "pid": {
         "title": "Pid",
         "type": "integer"
      },
      "start_time": {
         "title": "Start Time",
         "type": "string"
      },
      "duration_seconds": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Duration Seconds"
      },
      "is_active": {
         "anyOf": [
            {
               "type": "boolean"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Is Active"
      },
      "resources": {
         "$ref": "#/$defs/ComputeNodesResources"
      },
      "scheduler": {
         "anyOf": [
            {
               "additionalProperties": true,
               "type": "object"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Scheduler"
      },
      "_key": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Key"
      },
      "_id": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Id"
      },
      "_rev": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Rev"
      }
   },
   "$defs": {
      "ComputeNodesResources": {
         "description": "ComputeNodesResources",
         "properties": {
            "num_cpus": {
               "title": "Num Cpus",
               "type": "integer"
            },
            "memory_gb": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "integer"
                  }
               ],
               "title": "Memory Gb"
            },
            "num_gpus": {
               "title": "Num Gpus",
               "type": "integer"
            },
            "num_nodes": {
               "title": "Num Nodes",
               "type": "integer"
            },
            "time_limit": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Time Limit"
            },
            "scheduler_config_id": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Scheduler Config Id"
            }
         },
         "required": [
            "num_cpus",
            "memory_gb",
            "num_gpus",
            "num_nodes"
         ],
         "title": "ComputeNodesResources",
         "type": "object"
      }
   },
   "required": [
      "hostname",
      "pid",
      "start_time",
      "resources"
   ]
}

Config:
  • populate_by_name: bool = True

  • validate_assignment: bool = True

  • protected_namespaces: tuple = ()

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
field duration_seconds: StrictFloat | StrictInt | None = None
field hostname: StrictStr [Required]
Constraints:
  • strict = True

field id: StrictStr | None = None (alias '_id')
field is_active: StrictBool | None = None
field key: StrictStr | None = None (alias '_key')
field pid: StrictInt [Required]
Constraints:
  • strict = True

field resources: ComputeNodesResources [Required]
field rev: StrictStr | None = None (alias '_rev')
field scheduler: Dict[str, Any] | None = None
field start_time: StrictStr [Required]
Constraints:
  • strict = True

classmethod from_dict(obj: Dict[str, Any] | None) Self | None

Create an instance of ComputeNodeModel from a dict

classmethod from_json(json_str: str) Self | None

Create an instance of ComputeNodeModel from a JSON string

to_dict() Dict[str, Any]

Return the dictionary representation of the model using alias.

This has the following differences from calling pydantic’s self.model_dump(by_alias=True):

  • None is only added to the output dict for nullable fields that were set at model initialization. Other fields with value None are ignored.

to_json() str

Returns the JSON representation of the model using alias

to_str() str

Returns the string representation of the model using alias

pydantic model torc.openapi_client.models.edge_model.EdgeModel

EdgeModel

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Show JSON schema
{
   "title": "EdgeModel",
   "description": "EdgeModel",
   "type": "object",
   "properties": {
      "_from": {
         "description": "Database ID of the 'from' document",
         "title": "From",
         "type": "string"
      },
      "_to": {
         "description": "Database ID of the 'to' document",
         "title": "To",
         "type": "string"
      },
      "data": {
         "anyOf": [
            {
               "additionalProperties": true,
               "type": "object"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "User-defined data",
         "title": "Data"
      },
      "_key": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Key"
      },
      "_id": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Id"
      },
      "_rev": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Rev"
      }
   },
   "required": [
      "_from",
      "_to"
   ]
}

Config:
  • populate_by_name: bool = True

  • validate_assignment: bool = True

  • protected_namespaces: tuple = ()

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
field data: Dict[str, Any] | None = None

User-defined data

field id: StrictStr | None = None (alias '_id')
field key: StrictStr | None = None (alias '_key')
field rev: StrictStr | None = None (alias '_rev')
field to: StrictStr [Required] (alias '_to')

Database ID of the ‘to’ document

Constraints:
  • strict = True

field var_from: StrictStr [Required] (alias '_from')

Database ID of the ‘from’ document

Constraints:
  • strict = True

classmethod from_dict(obj: Dict[str, Any] | None) Self | None

Create an instance of EdgeModel from a dict

classmethod from_json(json_str: str) Self | None

Create an instance of EdgeModel from a JSON string

to_dict() Dict[str, Any]

Return the dictionary representation of the model using alias.

This has the following differences from calling pydantic’s self.model_dump(by_alias=True):

  • None is only added to the output dict for nullable fields that were set at model initialization. Other fields with value None are ignored.

to_json() str

Returns the JSON representation of the model using alias

to_str() str

Returns the string representation of the model using alias

pydantic model torc.openapi_client.models.file_model.FileModel

Data model for files needed or produced by jobs. Can be data or code.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Show JSON schema
{
   "title": "FileModel",
   "description": "Data model for files needed or produced by jobs. Can be data or code.",
   "type": "object",
   "properties": {
      "name": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "User-defined name of the file (not necessarily the filename)",
         "title": "Name"
      },
      "path": {
         "description": "Path to the file; can be relative to the execution directory.",
         "title": "Path",
         "type": "string"
      },
      "st_mtime": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Timestamp of when the file was last modified",
         "title": "St Mtime"
      },
      "_key": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Unique database identifier for the file. Does not include collection name.",
         "title": "Key"
      },
      "_id": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Unique database identifier for the file. Includes collection name and _key.",
         "title": "Id"
      },
      "_rev": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Database revision of the file",
         "title": "Rev"
      }
   },
   "required": [
      "path"
   ]
}

Config:
  • populate_by_name: bool = True

  • validate_assignment: bool = True

  • protected_namespaces: tuple = ()

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
field id: StrictStr | None = None (alias '_id')

Unique database identifier for the file. Includes collection name and _key.

field key: StrictStr | None = None (alias '_key')

Unique database identifier for the file. Does not include collection name.

field name: StrictStr | None = None

User-defined name of the file (not necessarily the filename)

field path: StrictStr [Required]

Path to the file; can be relative to the execution directory.

Constraints:
  • strict = True

field rev: StrictStr | None = None (alias '_rev')

Database revision of the file

field st_mtime: StrictFloat | StrictInt | None = None

Timestamp of when the file was last modified

classmethod from_dict(obj: Dict[str, Any] | None) Self | None

Create an instance of FileModel from a dict

classmethod from_json(json_str: str) Self | None

Create an instance of FileModel from a JSON string

to_dict() Dict[str, Any]

Return the dictionary representation of the model using alias.

This has the following differences from calling pydantic’s self.model_dump(by_alias=True):

  • None is only added to the output dict for nullable fields that were set at model initialization. Other fields with value None are ignored.

to_json() str

Returns the JSON representation of the model using alias

to_str() str

Returns the string representation of the model using alias

pydantic model torc.openapi_client.models.job_model.JobModel

JobModel

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Show JSON schema
{
   "title": "JobModel",
   "description": "JobModel",
   "type": "object",
   "properties": {
      "name": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Name of the job; no requirements on uniqueness",
         "title": "Name"
      },
      "command": {
         "description": "CLI command to execute. Will not be executed in a shell and so must not include shell characters.",
         "title": "Command",
         "type": "string"
      },
      "invocation_script": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Wrapper script for command in case the environment needs customization.",
         "title": "Invocation Script"
      },
      "status": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Status of job; managed by torc.",
         "title": "Status"
      },
      "schedule_compute_nodes": {
         "anyOf": [
            {
               "$ref": "#/$defs/ComputeNodeScheduleParams"
            },
            {
               "type": "null"
            }
         ],
         "default": null
      },
      "cancel_on_blocking_job_failure": {
         "anyOf": [
            {
               "type": "boolean"
            },
            {
               "type": "null"
            }
         ],
         "default": true,
         "description": "Cancel this job if any of its blocking jobs fails.",
         "title": "Cancel On Blocking Job Failure"
      },
      "supports_termination": {
         "anyOf": [
            {
               "type": "boolean"
            },
            {
               "type": "null"
            }
         ],
         "default": false,
         "description": "Informs torc that the job can be terminated gracefully before a wall-time timeout.",
         "title": "Supports Termination"
      },
      "blocked_by": {
         "anyOf": [
            {
               "items": {
                  "type": "string"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Database IDs of jobs that block this job",
         "title": "Blocked By"
      },
      "input_files": {
         "anyOf": [
            {
               "items": {
                  "type": "string"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Database IDs of files that this job needs",
         "title": "Input Files"
      },
      "output_files": {
         "anyOf": [
            {
               "items": {
                  "type": "string"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Database IDs of files that this job produces",
         "title": "Output Files"
      },
      "input_user_data": {
         "anyOf": [
            {
               "items": {
                  "type": "string"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Database IDs of user-data objects that this job needs",
         "title": "Input User Data"
      },
      "output_user_data": {
         "anyOf": [
            {
               "items": {
                  "type": "string"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Database IDs of user-data objects that this job produces",
         "title": "Output User Data"
      },
      "resource_requirements": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Optional database ID of resources required by this job",
         "title": "Resource Requirements"
      },
      "scheduler": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Optional database ID of scheduler needed by this job",
         "title": "Scheduler"
      },
      "internal": {
         "anyOf": [
            {
               "$ref": "#/$defs/JobsInternal"
            },
            {
               "type": "null"
            }
         ],
         "default": null
      },
      "_key": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Unique database identifier for the job. Does not include collection name.",
         "title": "Key"
      },
      "_id": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Unique database identifier for the job. Includes collection name and _key.",
         "title": "Id"
      },
      "_rev": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Database revision of the job",
         "title": "Rev"
      }
   },
   "$defs": {
      "ComputeNodeScheduleParams": {
         "description": "ComputeNodeScheduleParams",
         "properties": {
            "max_parallel_jobs": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Max Parallel Jobs"
            },
            "num_jobs": {
               "title": "Num Jobs",
               "type": "integer"
            },
            "scheduler_id": {
               "title": "Scheduler Id",
               "type": "string"
            },
            "start_one_worker_per_node": {
               "anyOf": [
                  {
                     "type": "boolean"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": false,
               "title": "Start One Worker Per Node"
            }
         },
         "required": [
            "num_jobs",
            "scheduler_id"
         ],
         "title": "ComputeNodeScheduleParams",
         "type": "object"
      },
      "JobsInternal": {
         "description": "JobsInternal",
         "properties": {
            "memory_bytes": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Memory Bytes"
            },
            "num_cpus": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Num Cpus"
            },
            "num_gpus": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Num Gpus"
            },
            "num_nodes": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Num Nodes"
            },
            "runtime_seconds": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Runtime Seconds"
            },
            "scheduler_config_id": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Scheduler Config Id"
            },
            "hash": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Hash"
            }
         },
         "title": "JobsInternal",
         "type": "object"
      }
   },
   "required": [
      "command"
   ]
}

Config:
  • populate_by_name: bool = True

  • validate_assignment: bool = True

  • protected_namespaces: tuple = ()

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
field blocked_by: List[StrictStr] | None = None

Database IDs of jobs that block this job

field cancel_on_blocking_job_failure: StrictBool | None = True

Cancel this job if any of its blocking jobs fails.

field command: StrictStr [Required]

CLI command to execute. Will not be executed in a shell and so must not include shell characters.

Constraints:
  • strict = True

field id: StrictStr | None = None (alias '_id')

Unique database identifier for the job. Includes collection name and _key.

field input_files: List[StrictStr] | None = None

Database IDs of files that this job needs

field input_user_data: List[StrictStr] | None = None

Database IDs of user-data objects that this job needs

field internal: JobsInternal | None = None
field invocation_script: StrictStr | None = None

Wrapper script for command in case the environment needs customization.

field key: StrictStr | None = None (alias '_key')

Unique database identifier for the job. Does not include collection name.

field name: StrictStr | None = None

Name of the job; no requirements on uniqueness

field output_files: List[StrictStr] | None = None

Database IDs of files that this job produces

field output_user_data: List[StrictStr] | None = None

Database IDs of user-data objects that this job produces

field resource_requirements: StrictStr | None = None

Optional database ID of resources required by this job

field rev: StrictStr | None = None (alias '_rev')

Database revision of the job

field schedule_compute_nodes: ComputeNodeScheduleParams | None = None
field scheduler: StrictStr | None = None

Optional database ID of scheduler needed by this job

field status: StrictStr | None = None

Status of job; managed by torc.

field supports_termination: StrictBool | None = False

Informs torc that the job can be terminated gracefully before a wall-time timeout.

classmethod from_dict(obj: Dict[str, Any] | None) Self | None

Create an instance of JobModel from a dict

classmethod from_json(json_str: str) Self | None

Create an instance of JobModel from a JSON string

to_dict() Dict[str, Any]

Return the dictionary representation of the model using alias.

This has the following differences from calling pydantic’s self.model_dump(by_alias=True):

  • None is only added to the output dict for nullable fields that were set at model initialization. Other fields with value None are ignored.

to_json() str

Returns the JSON representation of the model using alias

to_str() str

Returns the string representation of the model using alias

pydantic model torc.openapi_client.models.jobs_model.JobsModel

Data model for a batch of jobs

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Show JSON schema
{
   "title": "JobsModel",
   "description": "Data model for a batch of jobs",
   "type": "object",
   "properties": {
      "jobs": {
         "description": "Jobs in the batch",
         "items": {
            "$ref": "#/$defs/JobModel"
         },
         "title": "Jobs",
         "type": "array"
      }
   },
   "$defs": {
      "ComputeNodeScheduleParams": {
         "description": "ComputeNodeScheduleParams",
         "properties": {
            "max_parallel_jobs": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Max Parallel Jobs"
            },
            "num_jobs": {
               "title": "Num Jobs",
               "type": "integer"
            },
            "scheduler_id": {
               "title": "Scheduler Id",
               "type": "string"
            },
            "start_one_worker_per_node": {
               "anyOf": [
                  {
                     "type": "boolean"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": false,
               "title": "Start One Worker Per Node"
            }
         },
         "required": [
            "num_jobs",
            "scheduler_id"
         ],
         "title": "ComputeNodeScheduleParams",
         "type": "object"
      },
      "JobModel": {
         "description": "JobModel",
         "properties": {
            "name": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "Name of the job; no requirements on uniqueness",
               "title": "Name"
            },
            "command": {
               "description": "CLI command to execute. Will not be executed in a shell and so must not include shell characters.",
               "title": "Command",
               "type": "string"
            },
            "invocation_script": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "Wrapper script for command in case the environment needs customization.",
               "title": "Invocation Script"
            },
            "status": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "Status of job; managed by torc.",
               "title": "Status"
            },
            "schedule_compute_nodes": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/ComputeNodeScheduleParams"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            },
            "cancel_on_blocking_job_failure": {
               "anyOf": [
                  {
                     "type": "boolean"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": true,
               "description": "Cancel this job if any of its blocking jobs fails.",
               "title": "Cancel On Blocking Job Failure"
            },
            "supports_termination": {
               "anyOf": [
                  {
                     "type": "boolean"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": false,
               "description": "Informs torc that the job can be terminated gracefully before a wall-time timeout.",
               "title": "Supports Termination"
            },
            "blocked_by": {
               "anyOf": [
                  {
                     "items": {
                        "type": "string"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "Database IDs of jobs that block this job",
               "title": "Blocked By"
            },
            "input_files": {
               "anyOf": [
                  {
                     "items": {
                        "type": "string"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "Database IDs of files that this job needs",
               "title": "Input Files"
            },
            "output_files": {
               "anyOf": [
                  {
                     "items": {
                        "type": "string"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "Database IDs of files that this job produces",
               "title": "Output Files"
            },
            "input_user_data": {
               "anyOf": [
                  {
                     "items": {
                        "type": "string"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "Database IDs of user-data objects that this job needs",
               "title": "Input User Data"
            },
            "output_user_data": {
               "anyOf": [
                  {
                     "items": {
                        "type": "string"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "Database IDs of user-data objects that this job produces",
               "title": "Output User Data"
            },
            "resource_requirements": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "Optional database ID of resources required by this job",
               "title": "Resource Requirements"
            },
            "scheduler": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "Optional database ID of scheduler needed by this job",
               "title": "Scheduler"
            },
            "internal": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/JobsInternal"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            },
            "_key": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "Unique database identifier for the job. Does not include collection name.",
               "title": "Key"
            },
            "_id": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "Unique database identifier for the job. Includes collection name and _key.",
               "title": "Id"
            },
            "_rev": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "Database revision of the job",
               "title": "Rev"
            }
         },
         "required": [
            "command"
         ],
         "title": "JobModel",
         "type": "object"
      },
      "JobsInternal": {
         "description": "JobsInternal",
         "properties": {
            "memory_bytes": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Memory Bytes"
            },
            "num_cpus": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Num Cpus"
            },
            "num_gpus": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Num Gpus"
            },
            "num_nodes": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Num Nodes"
            },
            "runtime_seconds": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Runtime Seconds"
            },
            "scheduler_config_id": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Scheduler Config Id"
            },
            "hash": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Hash"
            }
         },
         "title": "JobsInternal",
         "type": "object"
      }
   },
   "required": [
      "jobs"
   ]
}

Config:
  • populate_by_name: bool = True

  • validate_assignment: bool = True

  • protected_namespaces: tuple = ()

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
field jobs: List[JobModel] [Required]

Jobs in the batch

classmethod from_dict(obj: Dict[str, Any] | None) Self | None

Create an instance of JobsModel from a dict

classmethod from_json(json_str: str) Self | None

Create an instance of JobsModel from a JSON string

to_dict() Dict[str, Any]

Return the dictionary representation of the model using alias.

This has the following differences from calling pydantic’s self.model_dump(by_alias=True):

  • None is only added to the output dict for nullable fields that were set at model initialization. Other fields with value None are ignored.

to_json() str

Returns the JSON representation of the model using alias

to_str() str

Returns the string representation of the model using alias

pydantic model torc.openapi_client.models.job_process_stats_model.JobProcessStatsModel

Data model for stats collected by torc for each job process

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Show JSON schema
{
   "title": "JobProcessStatsModel",
   "description": "Data model for stats collected by torc for each job process",
   "type": "object",
   "properties": {
      "job_key": {
         "description": "Database identifier for the job",
         "title": "Job Key",
         "type": "string"
      },
      "run_id": {
         "description": "Workflow run identifier",
         "title": "Run Id",
         "type": "integer"
      },
      "avg_cpu_percent": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "integer"
            }
         ],
         "description": "Average CPU utilization of the process",
         "title": "Avg Cpu Percent"
      },
      "max_cpu_percent": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "integer"
            }
         ],
         "description": "Maximium CPU utilization of the process",
         "title": "Max Cpu Percent"
      },
      "avg_rss": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "integer"
            }
         ],
         "description": "Average memory consumption of the process",
         "title": "Avg Rss"
      },
      "max_rss": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "integer"
            }
         ],
         "description": "Maximum memory consumption of the process",
         "title": "Max Rss"
      },
      "num_samples": {
         "description": "Number of samples taken by torc",
         "title": "Num Samples",
         "type": "integer"
      },
      "timestamp": {
         "description": "Time the stats were recorded in the database",
         "title": "Timestamp",
         "type": "string"
      },
      "_key": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Key"
      },
      "_id": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Id"
      },
      "_rev": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Rev"
      }
   },
   "required": [
      "job_key",
      "run_id",
      "avg_cpu_percent",
      "max_cpu_percent",
      "avg_rss",
      "max_rss",
      "num_samples",
      "timestamp"
   ]
}

Config:
  • populate_by_name: bool = True

  • validate_assignment: bool = True

  • protected_namespaces: tuple = ()

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
field avg_cpu_percent: StrictFloat | StrictInt [Required]

Average CPU utilization of the process

field avg_rss: StrictFloat | StrictInt [Required]

Average memory consumption of the process

field id: StrictStr | None = None (alias '_id')
field job_key: StrictStr [Required]

Database identifier for the job

Constraints:
  • strict = True

field key: StrictStr | None = None (alias '_key')
field max_cpu_percent: StrictFloat | StrictInt [Required]

Maximium CPU utilization of the process

field max_rss: StrictFloat | StrictInt [Required]

Maximum memory consumption of the process

field num_samples: StrictInt [Required]

Number of samples taken by torc

Constraints:
  • strict = True

field rev: StrictStr | None = None (alias '_rev')
field run_id: StrictInt [Required]

Workflow run identifier

Constraints:
  • strict = True

field timestamp: StrictStr [Required]

Time the stats were recorded in the database

Constraints:
  • strict = True

classmethod from_dict(obj: Dict[str, Any] | None) Self | None

Create an instance of JobProcessStatsModel from a dict

classmethod from_json(json_str: str) Self | None

Create an instance of JobProcessStatsModel from a JSON string

to_dict() Dict[str, Any]

Return the dictionary representation of the model using alias.

This has the following differences from calling pydantic’s self.model_dump(by_alias=True):

  • None is only added to the output dict for nullable fields that were set at model initialization. Other fields with value None are ignored.

to_json() str

Returns the JSON representation of the model using alias

to_str() str

Returns the string representation of the model using alias

pydantic model torc.openapi_client.models.result_model.ResultModel

ResultModel

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Show JSON schema
{
   "title": "ResultModel",
   "description": "ResultModel",
   "type": "object",
   "properties": {
      "job_key": {
         "description": "Database key for the job tied to this result",
         "title": "Job Key",
         "type": "string"
      },
      "run_id": {
         "description": "ID of the workflow run. Incremements on every start and restart.",
         "title": "Run Id",
         "type": "integer"
      },
      "return_code": {
         "description": "Code returned by the job. Zero is success; non-zero is a failure.",
         "title": "Return Code",
         "type": "integer"
      },
      "exec_time_minutes": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "integer"
            }
         ],
         "description": "Job execution time in minutes",
         "title": "Exec Time Minutes"
      },
      "completion_time": {
         "description": "Timestamp of when the job completed.",
         "title": "Completion Time",
         "type": "string"
      },
      "status": {
         "description": "Status of the job; managed by torc.",
         "title": "Status",
         "type": "string"
      },
      "_key": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Unique database identifier for the result. Does not include collection name.",
         "title": "Key"
      },
      "_id": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Unique database identifier for the result. Includes collection name and _key.",
         "title": "Id"
      },
      "_rev": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Database revision of the result",
         "title": "Rev"
      }
   },
   "required": [
      "job_key",
      "run_id",
      "return_code",
      "exec_time_minutes",
      "completion_time",
      "status"
   ]
}

Config:
  • populate_by_name: bool = True

  • validate_assignment: bool = True

  • protected_namespaces: tuple = ()

  • validate_by_alias: bool = True

  • validate_by_name: bool = True

Fields:
field completion_time: StrictStr [Required]

Timestamp of when the job completed.

Constraints:
  • strict = True

field exec_time_minutes: StrictFloat | StrictInt [Required]

Job execution time in minutes

field id: StrictStr | None = None (alias '_id')

Unique database identifier for the result. Includes collection name and _key.

field job_key: StrictStr [Required]

Database key for the job tied to this result

Constraints:
  • strict = True

field key: StrictStr | None = None (alias '_key')

Unique database identifier for the result. Does not include collection name.

field return_code: StrictInt [Required]

Code returned by the job. Zero is success; non-zero is a failure.

Constraints:
  • strict = True

field rev: StrictStr | None = None (alias '_rev')

Database revision of the result

field run_id: StrictInt [Required]

ID of the workflow run. Incremements on every start and restart.

Constraints:
  • strict = True

field status: StrictStr [Required]

Status of the job; managed by torc.

Constraints:
  • strict = True

classmethod from_dict(obj: Dict[str, Any] | None) Self | None

Create an instance of ResultModel from a dict

classmethod from_json(json_str: str) Self | None

Create an instance of ResultModel from a JSON string

to_dict() Dict[str, Any]

Return the dictionary representation of the model using alias.

This has the following differences from calling pydantic’s self.model_dump(by_alias=True):

  • None is only added to the output dict for nullable fields that were set at model initialization. Other fields with value None are ignored.

to_json() str

Returns the JSON representation of the model using alias

to_str() str

Returns the string representation of the model using alias