ComputeResourceSet#
- pydantic model ansys.hps.client.rms.ComputeResourceSet#
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": "ComputeResourceSet", "type": "object", "properties": { "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": "default", "description": "Name of the compute resource set.", "title": "Name" }, "id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "ID for the resource set.", "title": "Id" }, "scaler_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Temporary. To be removed after transitioning to client_id.", "title": "Scaler Id" }, "last_modified": { "anyOf": [ { "format": "date-time", "type": "string" }, { "type": "null" } ], "default": null, "description": "Last modified time.", "title": "Last Modified" }, "backend": { "anyOf": [ { "discriminator": { "mapping": { "kubernetes": "#/$defs/KubernetesKedaBackend", "local": "#/$defs/LocalBackend", "mockup": "#/$defs/MockupBackend", "ocm": "#/$defs/OCMBackend", "orchestration_interfaces": "#/$defs/OrchestrationInterfacesBackend" }, "propertyName": "plugin_name" }, "oneOf": [ { "$ref": "#/$defs/KubernetesKedaBackend" }, { "$ref": "#/$defs/OrchestrationInterfacesBackend" }, { "$ref": "#/$defs/OCMBackend" }, { "$ref": "#/$defs/LocalBackend" }, { "$ref": "#/$defs/MockupBackend" } ] }, { "type": "null" } ], "default": { "debug": false, "plugin_name": "local" }, "description": "Backend to use in the compute resource set.", "title": "Backend" }, "scaling_strategy": { "anyOf": [ { "discriminator": { "mapping": { "kubernetes_resource_scaling": "#/$defs/KubernetesResourceScaling", "max_available_resource_scaling": "#/$defs/MaxAvailableResourceScaling" }, "propertyName": "plugin_name" }, "oneOf": [ { "$ref": "#/$defs/MaxAvailableResourceScaling" }, { "$ref": "#/$defs/KubernetesResourceScaling" } ] }, { "type": "null" } ], "default": { "match_all_requirements": false, "plugin_name": "max_available_resource_scaling" }, "description": "Scaling strategy to use in the compute resource set.", "title": "Scaling Strategy" }, "available_resources": { "anyOf": [ { "$ref": "#/$defs/Resources" }, { "type": "null" } ], "default": { "custom": {} }, "description": "Available resources in the compute resource set." }, "available_applications": { "anyOf": [ { "items": { "$ref": "#/$defs/ScalerApplicationInfo" }, "type": "array" }, { "type": "null" } ], "default": [], "description": "List of available applications.", "title": "Available Applications" }, "evaluator_requirements_matching": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": false, "description": "Whether the evaluators should do matching of resource and software requirements.", "title": "Evaluator Requirements Matching" }, "evaluator_task_directory_cleanup": { "anyOf": [ { "$ref": "#/$defs/EvaluatorTaskDirectoryCleanup" }, { "type": "null" } ], "default": "always", "description": "Cleanup policy for task directories that are passed to evaluators.", "title": "Evaluator Task Directory Cleanup" }, "evaluator_auto_shutdown_time": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": 20, "description": "Time after which to shut down the evaluator if it is not running any jobs.", "title": "Evaluator Auto Shutdown Time" }, "evaluator_loop_interval": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": 5, "description": "Number of seconds between each iteration of the evaluator's main loop.", "title": "Evaluator Loop Interval" } }, "$defs": { "EvaluatorTaskDirectoryCleanup": { "enum": [ "always", "on_success", "never" ], "title": "EvaluatorTaskDirectoryCleanup", "type": "string" }, "KubernetesKedaBackend": { "properties": { "plugin_name": { "const": "kubernetes", "enum": [ "kubernetes" ], "title": "Plugin Name", "type": "string" }, "debug": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": false, "description": "Whether to enable additional debugging of the backend.", "title": "Debug" }, "job_script_template_path": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Path to the job script template to use in the backend.", "title": "Job Script Template Path" }, "shared_dir": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Working directory to use in the backend.", "title": "Shared Dir" }, "env": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "description": "Static environment variables needed for job execution.", "title": "Env" }, "cpu_limit": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": "1.0", "description": "CPU limit applied to each evaluator instance.", "title": "Cpu Limit" }, "memory_limit": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": "250M", "description": "Memory limit applied to each evaluator instance.", "title": "Memory Limit" }, "namespace": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": "default", "description": "Kubernetes namespace to use to scale evaluators.", "title": "Namespace" }, "target_resource_kind": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": "job", "description": "Kubernetes resource kind that the scaler should target. Options are ``deployment``, ``job``, and ``statefulset``.", "title": "Target Resource Kind" } }, "required": [ "plugin_name" ], "title": "KubernetesKedaBackend", "type": "object" }, "KubernetesResourceScaling": { "properties": { "plugin_name": { "const": "kubernetes_resource_scaling", "enum": [ "kubernetes_resource_scaling" ], "title": "Plugin Name", "type": "string" }, "target_resource_kind": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": "job", "description": "Kubernetes resource kind that the scaler should target. Options are ``deployment``, ``job``, and ``statefulset``.", "title": "Target Resource Kind" } }, "required": [ "plugin_name" ], "title": "KubernetesResourceScaling", "type": "object" }, "LocalBackend": { "properties": { "plugin_name": { "const": "local", "enum": [ "local" ], "title": "Plugin Name", "type": "string" }, "debug": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": false, "description": "Whether to enable additional debugging of the backend.", "title": "Debug" }, "shared_dir": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Working directory to use in the backend.", "title": "Shared Dir" }, "env": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "description": "Static environment variables needed for job execution.", "title": "Env" } }, "required": [ "plugin_name" ], "title": "LocalBackend", "type": "object" }, "MaxAvailableResourceScaling": { "properties": { "plugin_name": { "const": "max_available_resource_scaling", "enum": [ "max_available_resource_scaling" ], "title": "Plugin Name", "type": "string" }, "match_all_requirements": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": false, "description": "Whether scaling should work with available resource properties specified in the compute resource set (default) or require a match of all requirements of the task definition.", "title": "Match All Requirements" } }, "required": [ "plugin_name" ], "title": "MaxAvailableResourceScaling", "type": "object" }, "MockupBackend": { "properties": { "plugin_name": { "const": "mockup", "enum": [ "mockup" ], "title": "Plugin Name", "type": "string" }, "debug": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": false, "description": "Whether to enable additional debugging of the backend.", "title": "Debug" } }, "required": [ "plugin_name" ], "title": "MockupBackend", "type": "object" }, "OCMBackend": { "properties": { "plugin_name": { "const": "ocm", "enum": [ "ocm" ], "title": "Plugin Name", "type": "string" }, "debug": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": false, "description": "Whether to enable additional debugging of the backend.", "title": "Debug" }, "working_dir": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Working directory to use in the backend.", "title": "Working Dir" }, "onscale_username": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Username to use for OnScale API authentication.", "title": "Onscale Username" }, "onscale_password": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Password to use for OnScale API authentication.", "title": "Onscale Password" }, "ocm_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "URL to use for OCM API authentication.", "title": "Ocm Url" } }, "required": [ "plugin_name" ], "title": "OCMBackend", "type": "object" }, "OrchestrationInterfacesBackend": { "properties": { "plugin_name": { "const": "orchestration_interfaces", "enum": [ "orchestration_interfaces" ], "title": "Plugin Name", "type": "string" }, "debug": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": false, "description": "Whether to enable additional debugging of the backend.", "title": "Debug" }, "scheduler_type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": "slurm", "description": "Job scheduler type, such as ``slurm``, ``pbs``, ``uge``, or ``lsf``, to use in the backend.", "title": "Scheduler Type" }, "enable_api": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": false, "description": "Whether to use the scheduler REST API feature.", "title": "Enable Api" }, "base_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": "http://localhost:5050", "description": "REST API URL.", "title": "Base Url" }, "api_ver": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": "v0.0.39", "description": "REST API version.", "title": "Api Ver" }, "scheduler_queue_default": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Job scheduler queue to use for submission.", "title": "Scheduler Queue Default" }, "scheduler_command_override": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Path to the JSON file with custom scheduler command definitions.", "title": "Scheduler Command Override" }, "scheduler_script_override": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Path to the shell script to template for the scheduler.", "title": "Scheduler Script Override" }, "exclusive_default": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": false, "description": "Whether the scheduler is to hold the nodes exclusively for one request.", "title": "Exclusive Default" }, "distributed_default": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": true, "description": "Whether the scheduler is to provide multiple machines to fulfill the request.", "title": "Distributed Default" }, "num_cores_default": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": 1, "description": "Number of cores to request from the scheduler for a task.", "title": "Num Cores Default" }, "shared_dir": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Working directory to use in the backend.", "title": "Shared Dir" }, "env": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "description": "Static environment variables needed for job execution.", "title": "Env" }, "process_runner": { "anyOf": [ { "discriminator": { "mapping": { "process_launcher_module": "#/$defs/ProcessLauncherProcessRunner", "process_launcher_service": "#/$defs/RestLauncherProcessRunner", "service_user_module": "#/$defs/ServiceUserProcessRunner" }, "propertyName": "plugin_name" }, "oneOf": [ { "$ref": "#/$defs/ServiceUserProcessRunner" }, { "$ref": "#/$defs/ProcessLauncherProcessRunner" }, { "$ref": "#/$defs/RestLauncherProcessRunner" } ] }, { "type": "null" } ], "default": { "plugin_name": "service_user_module" }, "description": "Process runner to execute commands.", "title": "Process Runner" }, "create_workdir": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": true, "description": "Whether to create base and/or user-specific working directories at runtime.", "title": "Create Workdir" }, "use_local_scratch": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": false, "description": "Whether to use local storage as the working directory for jobs.", "title": "Use Local Scratch" }, "local_scratch_dir": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Path to the local scratch directory to use as the jobs' working directory.", "title": "Local Scratch Dir" } }, "required": [ "plugin_name" ], "title": "OrchestrationInterfacesBackend", "type": "object" }, "PlatformEnum": { "enum": [ "windows", "linux", "darwin" ], "title": "PlatformEnum", "type": "string" }, "ProcessLauncherProcessRunner": { "properties": { "plugin_name": { "const": "process_launcher_module", "enum": [ "process_launcher_module" ], "title": "Plugin Name", "type": "string" }, "default_user": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "User to default to when no user is specified.", "title": "Default User" }, "timeout": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": 30, "description": "Timeout in seconds before the request is stopped.", "title": "Timeout" }, "allowed_users": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Users allowed to launch processes.", "title": "Allowed Users" }, "disallowed_users": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": [ "root" ], "description": "Users not allowed to launch processes.", "title": "Disallowed Users" }, "user_mapping": { "anyOf": [ { "additionalProperties": { "type": "string" }, "type": "object" }, { "type": "null" } ], "default": {}, "description": "Map of the calling user to the system user.", "title": "User Mapping" }, "minimum_uid": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": 1000, "description": "Minimum UID of users allowed to launch processes.", "title": "Minimum Uid" }, "minimum_gid": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": 1000, "description": "Minimum GID of users allowed to launch processes.", "title": "Minimum Gid" } }, "required": [ "plugin_name" ], "title": "ProcessLauncherProcessRunner", "type": "object" }, "Resources": { "properties": { "num_cores": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "Number of cores.", "title": "Num Cores" }, "platform": { "anyOf": [ { "$ref": "#/$defs/PlatformEnum" }, { "type": "null" } ], "default": null, "description": "Basic platform information. Options are ``'linux'`` and ``'windows'``." }, "memory": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "Amount of RAM in bytes.", "title": "Memory" }, "disk_space": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "Amount of disk space in bytes.", "title": "Disk Space" }, "custom": { "anyOf": [ { "additionalProperties": { "anyOf": [ { "type": "integer" }, { "type": "boolean" }, { "type": "string" }, { "type": "number" }, { "type": "null" } ] }, "type": "object" }, { "type": "null" } ], "default": {}, "description": "Custom resource properties.", "title": "Custom" }, "num_instances": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "description": "Number of instances/jobs that can be created on the compute resource set.", "title": "Num Instances" } }, "title": "Resources", "type": "object" }, "RestLauncherProcessRunner": { "properties": { "plugin_name": { "const": "process_launcher_service", "enum": [ "process_launcher_service" ], "title": "Plugin Name", "type": "string" }, "launcher_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": "http://localhost:4911", "description": "URL to use when no URL is specified.", "title": "Launcher Url" }, "verify_ssl": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": true, "description": "Whether to verify the SSL certificate for HTTPS launchers.", "title": "Verify Ssl" }, "timeout": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": 30, "description": "Timeout in seconds before the request is stopped.", "title": "Timeout" }, "shell": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": true, "description": "Whether to enable the shell interpretation on a subprocess run.", "title": "Shell" } }, "required": [ "plugin_name" ], "title": "RestLauncherProcessRunner", "type": "object" }, "ScalerApplicationInfo": { "properties": { "name": { "description": "Application name.", "title": "Name", "type": "string" }, "version": { "description": "Application version.", "title": "Version", "type": "string" }, "install_path": { "description": "Installation path of the application.", "title": "Install Path", "type": "string" }, "executable": { "description": "Executable path to run the application.", "title": "Executable", "type": "string" }, "environment": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "description": "Environment setup for the process.", "title": "Environment" }, "capabilities": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "description": "Capabilities of the application.", "title": "Capabilities" }, "customization_hook": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "default": null, "description": "Custom hook dictionary for modifying the configuration before performing runs.", "title": "Customization Hook" }, "resource_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Kubernetes object (deployment/statefulset) name or solver image that KEDA (Kubernetes Event-driven Autoscaling) is to use as the target resource.", "title": "Resource Name" }, "use_local_scratch": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "description": "Whether to use local storage as the working directory for jobs.", "title": "Use Local Scratch" }, "local_scratch_dir": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Path to the local scratch directory to use as the jobs' working directory.", "title": "Local Scratch Dir" }, "exclusive": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "description": "Whether the scheduler is to hold the nodes exclusively for one request.", "title": "Exclusive" }, "distributed": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "default": null, "description": "Whether the scheduler is to provide multiple machines to fulfill the request.", "title": "Distributed" }, "evaluator_image": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Evaluator image to use.", "title": "Evaluator Image" }, "queue": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "A default queue to request when starting this application on a scheduler.", "title": "Queue" }, "scaling_max_eval_instances": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": 1, "description": "Maximum number of instances that can be created when scaling up.", "title": "Scaling Max Eval Instances" }, "scaling_min_eval_instances": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": 0, "description": "Minimum number of instances than can be terminated when scaling down.", "title": "Scaling Min Eval Instances" }, "scaling_threshold": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": 1, "description": "Threshold value to determine when Kubernetes deployments should be scaled up or down.", "title": "Scaling Threshold" }, "cool_down_period": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": 60, "description": "Period to wait before scaling down the resource to 0 instances.", "title": "Cool Down Period" } }, "required": [ "name", "version", "install_path", "executable" ], "title": "ScalerApplicationInfo", "type": "object" }, "ServiceUserProcessRunner": { "properties": { "plugin_name": { "const": "service_user_module", "enum": [ "service_user_module" ], "title": "Plugin Name", "type": "string" } }, "required": [ "plugin_name" ], "title": "ServiceUserProcessRunner", "type": "object" } } }
- Fields:
available_applications (List[ansys.hps.client.rms.models.ScalerApplicationInfo] | None)
available_resources (ansys.hps.client.rms.models.Resources | None)
backend (ansys.hps.client.rms.models.KubernetesKedaBackend | ansys.hps.client.rms.models.OrchestrationInterfacesBackend | ansys.hps.client.rms.models.OCMBackend | ansys.hps.client.rms.models.LocalBackend | ansys.hps.client.rms.models.MockupBackend | None)
evaluator_auto_shutdown_time (int | None)
evaluator_loop_interval (int | None)
evaluator_requirements_matching (bool | None)
evaluator_task_directory_cleanup (ansys.hps.client.rms.models.EvaluatorTaskDirectoryCleanup | None)
id (str | None)
last_modified (datetime.datetime | None)
name (str | None)
scaler_id (str | None)
scaling_strategy (ansys.hps.client.rms.models.MaxAvailableResourceScaling | ansys.hps.client.rms.models.KubernetesResourceScaling | None)
- field available_applications: Optional[List[ScalerApplicationInfo]] = []#
List of available applications.
- field available_resources: Optional[Resources] = {'custom': {}}#
Available resources in the compute resource set.
- field backend: Optional[Union[KubernetesKedaBackend, OrchestrationInterfacesBackend, OCMBackend, LocalBackend, MockupBackend]] = {'debug': False, 'plugin_name': 'local'}#
Backend to use in the compute resource set.
- field evaluator_auto_shutdown_time: Optional[int] = 20#
Time after which to shut down the evaluator if it is not running any jobs.
- field evaluator_loop_interval: Optional[int] = 5#
Number of seconds between each iteration of the evaluator’s main loop.
- field evaluator_requirements_matching: Optional[bool] = False#
Whether the evaluators should do matching of resource and software requirements.
- field evaluator_task_directory_cleanup: Optional[EvaluatorTaskDirectoryCleanup] = 'always'#
Cleanup policy for task directories that are passed to evaluators.
- field id: Optional[str] = None#
ID for the resource set.
- field last_modified: Optional[datetime] = None#
Last modified time.
- field name: Optional[str] = 'default'#
Name of the compute resource set.
- field scaler_id: Optional[str] = None#
Temporary. To be removed after transitioning to client_id.
- field scaling_strategy: Optional[Union[MaxAvailableResourceScaling, KubernetesResourceScaling]] = {'match_all_requirements': False, 'plugin_name': 'max_available_resource_scaling'}#
Scaling strategy to use in the compute resource set.