omni.flux.validator.factory#

  • SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.

  • SPDX-License-Identifier: Apache-2.0

  • Licensed under the Apache License, Version 2.0 (the “License”);

  • you may not use this file except in compliance with the License.

  • You may obtain a copy of the License at

  • https://www.apache.org/licenses/LICENSE-2.0

  • Unless required by applicable law or agreed to in writing, software

  • distributed under the License is distributed on an “AS IS” BASIS,

  • WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

  • See the License for the specific language governing permissions and

  • limitations under the License.

  • SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.

  • SPDX-License-Identifier: Apache-2.0

  • Licensed under the Apache License, Version 2.0 (the “License”);

  • you may not use this file except in compliance with the License.

  • You may obtain a copy of the License at

  • https://www.apache.org/licenses/LICENSE-2.0

  • Unless required by applicable law or agreed to in writing, software

  • distributed under the License is distributed on an “AS IS” BASIS,

  • WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

  • See the License for the specific language governing permissions and

  • limitations under the License.

class omni.flux.validator.factory.extension.FluxValidatorFactoryExtension#

Bases: IExt

Create Final Configuration

on_shutdown()#
on_startup(ext_id)#
omni.flux.validator.factory.extension.get_instance() ValidatorFactory#
  • SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.

  • SPDX-License-Identifier: Apache-2.0

  • Licensed under the Apache License, Version 2.0 (the “License”);

  • you may not use this file except in compliance with the License.

  • You may obtain a copy of the License at

  • https://www.apache.org/licenses/LICENSE-2.0

  • Unless required by applicable law or agreed to in writing, software

  • distributed under the License is distributed on an “AS IS” BASIS,

  • WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

  • See the License for the specific language governing permissions and

  • limitations under the License.

class omni.flux.validator.factory.setup.ValidatorFactory#

Bases: FactoryBase[Base]

is_plugin_registered(name: str) bool#

Check is the plugin is registered into the factory

Parameters:

name – the name of the plugin to check

Raises:

ValueError – if the plugin is not registered

Returns:

True if registered, else raise a Value Error

  • SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.

  • SPDX-License-Identifier: Apache-2.0

  • Licensed under the Apache License, Version 2.0 (the “License”);

  • you may not use this file except in compliance with the License.

  • You may obtain a copy of the License at

  • https://www.apache.org/licenses/LICENSE-2.0

  • Unless required by applicable law or agreed to in writing, software

  • distributed under the License is distributed on an “AS IS” BASIS,

  • WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

  • See the License for the specific language governing permissions and

  • limitations under the License.

pydantic model omni.flux.validator.factory.data_flow.base_data_flow.DataFlow#

Bases: BaseModel

Show JSON schema
{
   "title": "DataFlow",
   "type": "object",
   "properties": {
      "name": {
         "title": "Name",
         "type": "string"
      },
      "channel": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": "Default",
         "title": "Channel"
      }
   },
   "additionalProperties": false,
   "required": [
      "name"
   ]
}

Config:
  • extra: str = forbid

Fields:
field channel: str | None = 'Default'#
field name: str [Required]#
  • SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.

  • SPDX-License-Identifier: Apache-2.0

  • Licensed under the Apache License, Version 2.0 (the “License”);

  • you may not use this file except in compliance with the License.

  • You may obtain a copy of the License at

  • https://www.apache.org/licenses/LICENSE-2.0

  • Unless required by applicable law or agreed to in writing, software

  • distributed under the License is distributed on an “AS IS” BASIS,

  • WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

  • See the License for the specific language governing permissions and

  • limitations under the License.

pydantic model omni.flux.validator.factory.data_flow.in_out_data.InOutDataFlow#

Bases: DataFlow

Show JSON schema
{
   "title": "InOutDataFlow",
   "type": "object",
   "properties": {
      "name": {
         "default": "InOutData",
         "title": "Name",
         "type": "string"
      },
      "channel": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": "Default",
         "title": "Channel"
      },
      "input_data": {
         "anyOf": [
            {
               "items": {
                  "type": "string"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Input Data"
      },
      "push_input_data": {
         "default": false,
         "title": "Push Input Data",
         "type": "boolean"
      },
      "output_data": {
         "anyOf": [
            {
               "items": {
                  "type": "string"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Output Data"
      },
      "push_output_data": {
         "default": false,
         "title": "Push Output Data",
         "type": "boolean"
      }
   },
   "additionalProperties": false
}

Config:
  • extra: str = forbid

Fields:
field input_data: List[str] | None = None#
field name: str = 'InOutData'#
field output_data: List[str] | None = None#
field push_input_data: bool = False#
field push_output_data: bool = False#
  • SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.

  • SPDX-License-Identifier: Apache-2.0

  • Licensed under the Apache License, Version 2.0 (the “License”);

  • you may not use this file except in compliance with the License.

  • You may obtain a copy of the License at

  • https://www.apache.org/licenses/LICENSE-2.0

  • Unless required by applicable law or agreed to in writing, software

  • distributed under the License is distributed on an “AS IS” BASIS,

  • WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

  • See the License for the specific language governing permissions and

  • limitations under the License.

omni.flux.validator.factory.data_flow.utils.push_input_data(schema_data, file_paths: List[str])#

Push a list of files into the data flow input

Parameters:
  • schema_data – the schema to use

  • file_paths – the list of files to push

omni.flux.validator.factory.data_flow.utils.push_output_data(schema_data, file_paths: List[str])#

Push a list of files into the data flow output

Parameters:
  • schema_data – the schema to use

  • file_paths – the list of files to push

  • SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.

  • SPDX-License-Identifier: Apache-2.0

  • Licensed under the Apache License, Version 2.0 (the “License”);

  • you may not use this file except in compliance with the License.

  • You may obtain a copy of the License at

  • https://www.apache.org/licenses/LICENSE-2.0

  • Unless required by applicable law or agreed to in writing, software

  • distributed under the License is distributed on an “AS IS” BASIS,

  • WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

  • See the License for the specific language governing permissions and

  • limitations under the License.

class omni.flux.validator.factory.plugins.check_base.CheckBase#

Bases: Base, ABC

pydantic model Data#

Bases: Data

Show JSON schema
{
   "title": "Data",
   "type": "object",
   "properties": {
      "on_progress_callback": {
         "default": null,
         "title": "On Progress Callback"
      },
      "on_global_progress_callback": {
         "default": null,
         "title": "On Global Progress Callback"
      },
      "data_flows": {
         "anyOf": [
            {
               "items": {
                  "$ref": "#/$defs/DataFlow"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Data Flows"
      },
      "channel": {
         "default": "Default",
         "title": "Channel",
         "type": "string"
      },
      "expose_mass_ui": {
         "default": false,
         "title": "Expose Mass Ui",
         "type": "boolean"
      },
      "expose_mass_queue_action_ui": {
         "default": false,
         "title": "Expose Mass Queue Action Ui",
         "type": "boolean"
      },
      "cook_mass_template": {
         "default": false,
         "description": "Set this to true if you want the mass validator to use the plugin to cook the template",
         "title": "Cook Mass Template",
         "type": "boolean"
      },
      "display_name_mass_template": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Name to show when we process a cooked template from mass processing",
         "title": "Display Name Mass Template"
      },
      "display_name_mass_template_tooltip": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Tooltip to show when we process a cooked template from mass processing",
         "title": "Display Name Mass Template Tooltip"
      },
      "uuid": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "UUID of the plugin",
         "title": "Uuid"
      },
      "progress": {
         "anyOf": [
            {
               "maxItems": 3,
               "minItems": 3,
               "prefixItems": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "string"
                  },
                  {
                     "type": "boolean"
                  }
               ],
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "default": [
            0.0,
            "Initializing",
            true
         ],
         "description": "Progress of the plugin",
         "title": "Progress"
      },
      "global_progress_value": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "null"
            }
         ],
         "default": 0.0,
         "description": "Global progress value of the plugin",
         "title": "Global Progress Value"
      },
      "on_check_callback": {
         "default": null,
         "title": "On Check Callback"
      },
      "on_fix_callback": {
         "default": null,
         "title": "On Fix Callback"
      },
      "last_check_message": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Last Check Message"
      },
      "last_check_data": {
         "anyOf": [
            {},
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "This is tmp we don't keep it in the schema",
         "title": "Last Check Data"
      },
      "last_check_timing": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Last Check Timing"
      },
      "last_check_result": {
         "anyOf": [
            {
               "type": "boolean"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Last Check Result"
      },
      "last_fix_message": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Last Fix Message"
      },
      "last_fix_data": {
         "anyOf": [
            {},
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "This is tmp we don't keep it in the schema",
         "title": "Last Fix Data"
      },
      "last_fix_timing": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Last Fix Timing"
      },
      "last_fix_result": {
         "anyOf": [
            {
               "type": "boolean"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Last Fix Result"
      }
   },
   "$defs": {
      "DataFlow": {
         "additionalProperties": false,
         "properties": {
            "name": {
               "title": "Name",
               "type": "string"
            },
            "channel": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": "Default",
               "title": "Channel"
            }
         },
         "required": [
            "name"
         ],
         "title": "DataFlow",
         "type": "object"
      }
   },
   "additionalProperties": false
}

Config:
  • extra: str = forbid

  • validate_assignment: bool = True

  • arbitrary_types_allowed: bool = True

Fields:
  • last_check_data (Any | None)

  • last_check_message (str | None)

  • last_check_result (bool | None)

  • last_check_timing (float | None)

  • last_fix_data (Any | None)

  • last_fix_message (str | None)

  • last_fix_result (bool | None)

  • last_fix_timing (float | None)

  • on_check_callback (Callable[[bool, str, Any], Any] | None)

  • on_fix_callback (Callable[[bool, str, Any], Any] | None)

Validators:
  • _fire_global_progress_value_callback » global_progress_value

  • _fire_last_check_result_callback » last_check_result

  • _fire_last_fix_result_callback » last_fix_result

  • _fire_progress_callback » progress

  • sanitize_uuid » uuid

field last_check_data: Any | None = None#

This is tmp we don’t keep it in the schema

field last_check_message: str | None = None#
field last_check_result: bool | None = None#
Validated by:
  • _fire_last_check_result_callback

field last_check_timing: float | None = None#
field last_fix_data: Any | None = None#

This is tmp we don’t keep it in the schema

field last_fix_message: str | None = None#
field last_fix_result: bool | None = None#
Validated by:
  • _fire_last_fix_result_callback

field last_fix_timing: float | None = None#
field on_check_callback: Callable[[bool, str, Any], Any] | None = None#
field on_fix_callback: Callable[[bool, str, Any], Any] | None = None#
model_post_init(context: Any, /) None#

This function is meant to behave like a BaseModel method to initialise private attributes.

It takes context as an argument since that’s what pydantic-core passes when calling it.

Parameters:
  • self – The BaseModel instance.

  • context – The context.

async check(
schema_data: Data,
context_plugin_data: SetupDataTypeVar,
selector_plugin_data: Any,
) tuple[bool, str, Any]#

Function that will be called to check the data

Parameters:
  • schema_data – the data from the schema.

  • context_plugin_data – the data from the context plugin

  • selector_plugin_data – the data from the selector plugin

Returns:

True if the check passed, False if not. If the check is True, it will NOT run the fix str: the message you want to show, like “Succeeded to check this” any: data that you want to pass. For now this is used no where. So you can pass whatever you want (None)

Return type:

bool

async fix(
schema_data: Data,
context_plugin_data: SetupDataTypeVar,
selector_plugin_data: Any,
) tuple[bool, str, Any]#

Function that will be called to fix the data if the fix function return False

Parameters:
  • schema_data – the data from the schema.

  • context_plugin_data – the data from the context plugin

  • selector_plugin_data – the data from the selector plugin

Returns:

True if the fix passed, False if not. str: the message you want to show, like “Succeeded to fix this” any: data that you want to pass. For now this is used no where. So you can pass whatever you want (None)

Return type:

bool

subscribe_check(
callback: Callable[[Any, str, Any], Any],
)#

Return the object that will automatically unsubscribe when destroyed.

subscribe_fix(
callback: Callable[[Any, str, Any], Any],
)#

Return the object that will automatically unsubscribe when destroyed.

pydantic model omni.flux.validator.factory.plugins.check_base.Schema#

Bases: BaseSchema

Show JSON schema
{
   "title": "Schema",
   "type": "object",
   "properties": {
      "name": {
         "title": "Name",
         "type": "string"
      },
      "enabled": {
         "default": true,
         "title": "Enabled",
         "type": "boolean"
      },
      "data": {
         "$ref": "#/$defs/Data"
      },
      "context_plugin": {
         "$ref": "#/$defs/omni__flux__validator__factory__plugins__context_base__Schema"
      },
      "selector_plugins": {
         "items": {
            "$ref": "#/$defs/omni__flux__validator__factory__plugins__selector_base__Schema"
         },
         "title": "Selector Plugins",
         "type": "array"
      },
      "resultor_plugins": {
         "anyOf": [
            {
               "items": {
                  "$ref": "#/$defs/omni__flux__validator__factory__plugins__resultor_base__Schema"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Resultor Plugins"
      },
      "stop_if_fix_failed": {
         "default": false,
         "title": "Stop If Fix Failed",
         "type": "boolean"
      },
      "pause_if_fix_failed": {
         "default": true,
         "title": "Pause If Fix Failed",
         "type": "boolean"
      }
   },
   "$defs": {
      "Data": {
         "properties": {},
         "title": "Data",
         "type": "object"
      },
      "omni__flux__validator__factory__plugins__context_base__Schema": {
         "additionalProperties": false,
         "properties": {
            "name": {
               "title": "Name",
               "type": "string"
            },
            "enabled": {
               "default": true,
               "title": "Enabled",
               "type": "boolean"
            },
            "data": {
               "$ref": "#/$defs/Data"
            },
            "resultor_plugins": {
               "anyOf": [
                  {
                     "items": {
                        "$ref": "#/$defs/omni__flux__validator__factory__plugins__resultor_base__Schema"
                     },
                     "type": "array"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Resultor Plugins"
            }
         },
         "required": [
            "name",
            "data"
         ],
         "title": "Schema",
         "type": "object"
      },
      "omni__flux__validator__factory__plugins__resultor_base__Schema": {
         "additionalProperties": false,
         "properties": {
            "name": {
               "title": "Name",
               "type": "string"
            },
            "enabled": {
               "default": true,
               "title": "Enabled",
               "type": "boolean"
            },
            "data": {
               "$ref": "#/$defs/Data"
            }
         },
         "required": [
            "name",
            "data"
         ],
         "title": "Schema",
         "type": "object"
      },
      "omni__flux__validator__factory__plugins__selector_base__Schema": {
         "additionalProperties": false,
         "properties": {
            "name": {
               "title": "Name",
               "type": "string"
            },
            "enabled": {
               "default": true,
               "title": "Enabled",
               "type": "boolean"
            },
            "data": {
               "$ref": "#/$defs/Data"
            }
         },
         "required": [
            "name",
            "data"
         ],
         "title": "Schema",
         "type": "object"
      }
   },
   "additionalProperties": false,
   "required": [
      "name",
      "data",
      "context_plugin",
      "selector_plugins"
   ]
}

Config:
  • extra: str = forbid

  • arbitrary_types_allowed: bool = True

Fields:
Validators:
field context_plugin: Schema [Required]#
Validated by:
  • _initialize_plugin_instance_and_check_flow

  • _parse_plugin_data

field pause_if_fix_failed: bool = True#
Validated by:
  • _initialize_plugin_instance_and_check_flow

  • _parse_plugin_data

field resultor_plugins: list[Schema] | None = None#
Validated by:
  • _initialize_plugin_instance_and_check_flow

  • _parse_plugin_data

field selector_plugins: list[Schema] [Required]#
Validated by:
  • _initialize_plugin_instance_and_check_flow

  • _parse_plugin_data

  • at_least_one

field stop_if_fix_failed: bool = False#
Validated by:
  • _initialize_plugin_instance_and_check_flow

  • _parse_plugin_data

validator at_least_one  »  selector_plugins#
model_post_init(context: Any, /) None#

This function is meant to behave like a BaseModel method to initialise private attributes.

It takes context as an argument since that’s what pydantic-core passes when calling it.

Parameters:
  • self – The BaseModel instance.

  • context – The context.

  • SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.

  • SPDX-License-Identifier: Apache-2.0

  • Licensed under the Apache License, Version 2.0 (the “License”);

  • you may not use this file except in compliance with the License.

  • You may obtain a copy of the License at

  • https://www.apache.org/licenses/LICENSE-2.0

  • Unless required by applicable law or agreed to in writing, software

  • distributed under the License is distributed on an “AS IS” BASIS,

  • WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

  • See the License for the specific language governing permissions and

  • limitations under the License.

class omni.flux.validator.factory.plugins.context_base.ContextBase#

Bases: Base, ABC

pydantic model Data#

Bases: Data

Show JSON schema
{
   "title": "Data",
   "type": "object",
   "properties": {
      "on_progress_callback": {
         "default": null,
         "title": "On Progress Callback"
      },
      "on_global_progress_callback": {
         "default": null,
         "title": "On Global Progress Callback"
      },
      "data_flows": {
         "anyOf": [
            {
               "items": {
                  "$ref": "#/$defs/DataFlow"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Data Flows"
      },
      "channel": {
         "default": "Default",
         "title": "Channel",
         "type": "string"
      },
      "expose_mass_ui": {
         "default": false,
         "title": "Expose Mass Ui",
         "type": "boolean"
      },
      "expose_mass_queue_action_ui": {
         "default": false,
         "title": "Expose Mass Queue Action Ui",
         "type": "boolean"
      },
      "cook_mass_template": {
         "default": false,
         "description": "Set this to true if you want the mass validator to use the plugin to cook the template",
         "title": "Cook Mass Template",
         "type": "boolean"
      },
      "display_name_mass_template": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Name to show when we process a cooked template from mass processing",
         "title": "Display Name Mass Template"
      },
      "display_name_mass_template_tooltip": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Tooltip to show when we process a cooked template from mass processing",
         "title": "Display Name Mass Template Tooltip"
      },
      "uuid": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "UUID of the plugin",
         "title": "Uuid"
      },
      "progress": {
         "anyOf": [
            {
               "maxItems": 3,
               "minItems": 3,
               "prefixItems": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "string"
                  },
                  {
                     "type": "boolean"
                  }
               ],
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "default": [
            0.0,
            "Initializing",
            true
         ],
         "description": "Progress of the plugin",
         "title": "Progress"
      },
      "global_progress_value": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "null"
            }
         ],
         "default": 0.0,
         "description": "Global progress value of the plugin",
         "title": "Global Progress Value"
      },
      "on_check_callback": {
         "default": null,
         "title": "On Check Callback"
      },
      "on_set_callback": {
         "default": null,
         "title": "On Set Callback"
      },
      "on_exit_callback": {
         "default": null,
         "title": "On Exit Callback"
      },
      "last_check_message": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Last Check Message"
      },
      "last_check_timing": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Last Check Timing"
      },
      "last_check_result": {
         "anyOf": [
            {
               "type": "boolean"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Last Check Result"
      },
      "last_set_message": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Last Set Message"
      },
      "last_set_data": {
         "anyOf": [
            {},
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "This is tmp we don't keep it in the schema",
         "title": "Last Set Data"
      },
      "last_set_timing": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Last Set Timing"
      },
      "last_set_result": {
         "anyOf": [
            {
               "type": "boolean"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Last Set Result"
      },
      "last_on_exit_message": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Last On Exit Message"
      },
      "last_on_exit_timing": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Last On Exit Timing"
      },
      "last_on_exit_result": {
         "anyOf": [
            {
               "type": "boolean"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Last On Exit Result"
      },
      "hide_context_ui": {
         "default": false,
         "title": "Hide Context Ui",
         "type": "boolean"
      }
   },
   "$defs": {
      "DataFlow": {
         "additionalProperties": false,
         "properties": {
            "name": {
               "title": "Name",
               "type": "string"
            },
            "channel": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": "Default",
               "title": "Channel"
            }
         },
         "required": [
            "name"
         ],
         "title": "DataFlow",
         "type": "object"
      }
   },
   "additionalProperties": false
}

Config:
  • extra: str = forbid

  • validate_assignment: bool = True

  • arbitrary_types_allowed: bool = True

Fields:
  • hide_context_ui (bool)

  • last_check_message (str | None)

  • last_check_result (bool | None)

  • last_check_timing (float | None)

  • last_on_exit_message (str | None)

  • last_on_exit_result (bool | None)

  • last_on_exit_timing (float | None)

  • last_set_data (omni.flux.validator.factory.plugins.context_base.SetupDataTypeVar | None)

  • last_set_message (str | None)

  • last_set_result (bool | None)

  • last_set_timing (float | None)

  • on_check_callback (Callable[[bool, str], Any] | None)

  • on_exit_callback (Callable[[bool, str], Any] | None)

  • on_set_callback (Callable[[bool, str, omni.flux.validator.factory.plugins.context_base.SetupDataTypeVar], Any] | None)

Validators:
  • _fire_global_progress_value_callback » global_progress_value

  • _fire_last_check_result_callback » last_check_result

  • _fire_last_exit_result_callback » last_on_exit_result

  • _fire_last_set_result_callback » last_set_result

  • _fire_progress_callback » progress

  • sanitize_uuid » uuid

field hide_context_ui: bool = False#
field last_check_message: str | None = None#
field last_check_result: bool | None = None#
Validated by:
  • _fire_last_check_result_callback

field last_check_timing: float | None = None#
field last_on_exit_message: str | None = None#
field last_on_exit_result: bool | None = None#
Validated by:
  • _fire_last_exit_result_callback

field last_on_exit_timing: float | None = None#
field last_set_data: SetupDataTypeVar | None = None#

This is tmp we don’t keep it in the schema

field last_set_message: str | None = None#
field last_set_result: bool | None = None#
Validated by:
  • _fire_last_set_result_callback

field last_set_timing: float | None = None#
field on_check_callback: Callable[[bool, str], Any] | None = None#
field on_exit_callback: Callable[[bool, str], Any] | None = None#
field on_set_callback: Callable[[bool, str, SetupDataTypeVar], Any] | None = None#
model_post_init(context: Any, /) None#

This function is meant to behave like a BaseModel method to initialise private attributes.

It takes context as an argument since that’s what pydantic-core passes when calling it.

Parameters:
  • self – The BaseModel instance.

  • context – The context.

async check(
schema_data: Data,
parent_context: SetupDataTypeVar,
) tuple[bool, str]#

Function that will be called to check the data. For example, check that a USD stage is open, or a USD file path exist

Parameters:
  • schema_data – the data that should be checked

  • parent_context – context data from the parent context

Returns:

True if the check passed, False if not. str: the message you want to show, like “Succeeded to check this context”

Return type:

bool

async on_exit(
schema_data: Data,
parent_context: SetupDataTypeVar,
) tuple[bool, str]#

Function that will be called to after the check of the data. For example, save the input USD stage

Parameters:
  • schema_data – the data that should be checked

  • parent_context – context data from the parent context

Returns:

True if the on exit passed, False if not. str: the message you want to show, like “Succeeded to exit this context”

Return type:

bool

async setup(
schema_data: Data,
run_callback: Callable[[SetupDataTypeVar], Awaitable[None]],
parent_context: SetupDataTypeVar,
) tuple[bool, str, SetupDataTypeVar]#

Function that will be called to set the data. For a context plugin, it will grab the data that we want to pass them to check plugin. From example, open a USD file and grab the prims. Or grab prims from an opened stage.

Parameters:
  • schema_data – the data that should set. Same data than check()

  • run_callback – the validation that will be run in the context of this setup

  • parent_context – context data from the parent context

Returns:

True if the setup passed, False if not. str: the message you want to show, like “Succeeded to setup this” any: data that you want to pass. Those data will be passed and used by the selector(s) and check(s) plugins. Like a USD stage.

Return type:

bool

subscribe_check(
callback: Callable[[bool, str], Any],
)#

Return the object that will automatically unsubscribe when destroyed.

subscribe_on_exit(
callback: Callable[[bool, str], Any],
)#

Return the object that will automatically unsubscribe when destroyed.

subscribe_set(
callback: Callable[[bool, str, SetupDataTypeVar], Any],
)#

Return the object that will automatically unsubscribe when destroyed.

pydantic model omni.flux.validator.factory.plugins.context_base.Schema#

Bases: BaseSchema

Show JSON schema
{
   "title": "Schema",
   "type": "object",
   "properties": {
      "name": {
         "title": "Name",
         "type": "string"
      },
      "enabled": {
         "default": true,
         "title": "Enabled",
         "type": "boolean"
      },
      "data": {
         "$ref": "#/$defs/Data"
      },
      "resultor_plugins": {
         "anyOf": [
            {
               "items": {
                  "$ref": "#/$defs/Schema"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Resultor Plugins"
      }
   },
   "$defs": {
      "Data": {
         "properties": {},
         "title": "Data",
         "type": "object"
      },
      "Schema": {
         "additionalProperties": false,
         "properties": {
            "name": {
               "title": "Name",
               "type": "string"
            },
            "enabled": {
               "default": true,
               "title": "Enabled",
               "type": "boolean"
            },
            "data": {
               "$ref": "#/$defs/Data"
            }
         },
         "required": [
            "name",
            "data"
         ],
         "title": "Schema",
         "type": "object"
      }
   },
   "additionalProperties": false,
   "required": [
      "name",
      "data"
   ]
}

Config:
  • extra: str = forbid

  • arbitrary_types_allowed: bool = True

Fields:
Validators:

field resultor_plugins: list[Schema] | None = None#
Validated by:
  • _initialize_plugin_instance_and_check_flow

  • _parse_plugin_data

model_post_init(context: Any, /) None#

This function is meant to behave like a BaseModel method to initialise private attributes.

It takes context as an argument since that’s what pydantic-core passes when calling it.

Parameters:
  • self – The BaseModel instance.

  • context – The context.

  • SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.

  • SPDX-License-Identifier: Apache-2.0

  • Licensed under the Apache License, Version 2.0 (the “License”);

  • you may not use this file except in compliance with the License.

  • You may obtain a copy of the License at

  • https://www.apache.org/licenses/LICENSE-2.0

  • Unless required by applicable law or agreed to in writing, software

  • distributed under the License is distributed on an “AS IS” BASIS,

  • WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

  • See the License for the specific language governing permissions and

  • limitations under the License.

class omni.flux.validator.factory.plugins.interface_base.IBase#

Bases: PluginBase, ABC

pydantic model Data#

Bases: BaseModel, ABC

Show JSON schema
{
   "title": "Data",
   "type": "object",
   "properties": {}
}

abstract classmethod sanitize_uuid(v: str | None) str | None#
abstract property data_flow_compatible_name: list[str] | None#
abstract async build_ui(schema_data: Any) Any#

Build the UI of a plugin

Parameters:

schema_data – the data of the plugin from the schema

Returns:

Anything from the implementation

abstract property data_type: type[BaseModel]#
abstract property display_name: str | None#
abstract get_global_progress() float#

The value of the global progression of the validation

abstract get_progress() tuple[float, str, bool]#
abstract mass_build_queue_action_ui(
schema_data: Any,
default_actions: list[Callable[[], Any]],
callback: Callable[[str], Any],
) Any#

Default exposed action for Mass validation. The UI will be built into the delegate of the mass queue. Please implement your code using _mass_build_queue_action_ui()

abstract async mass_build_ui(schema_data: Any) Any#

Build the mass UI of a plugin. This function should not be overridden. Please implement your code using _mass_build_ui()

Parameters:

schema_data – the data of the plugin from the schema

Returns:

Anything from the implementation

abstract async mass_cook_template(
schema_data_template: Any,
) tuple[bool, str | None, list[Data]]#

Take a template as an input and the (previous) result, and edit the result for mass processing. For example, receive 1 template that has a context plugin with a list of files, and generate multiple schema from the template, with 1 input file for each template. Please implement your code using _mass_cook_template()

Parameters:

schema_data_template – the data of the plugin from the schema

Returns:

A tuple of the shape (TemplateCookingSuccess, ErrorMessage, CookingData)

abstract async on_crash(schema_data: Any, data: Any) None#

Function that will be called when a plugin crash

Parameters:
  • schema_data – the data of the plugin from the schema

  • data – any random data we want to pass

abstract on_mass_cook_template(
success: bool,
message: str,
data: Any,
)#

Return the object that will automatically unsubscribe when destroyed.

abstract on_progress(progress: float, message: str, result: bool)#

Set the progression of the plugin. Setting the attribute will fire self.__on_progress

abstract set_global_progress(value: float)#

The value of the global progression of the validation

abstract set_parent_schema(
schema: IBaseSchema,
)#

Set the schema

Parameters:

schema – the schema to set

abstract show(value: bool, schema_data: Any)#

Called whenever the plugin is show or hidden in the UI.

abstract subscribe_build_ui(
callback: Callable[[Any], Any],
)#

Return the object that will automatically unsubscribe when destroyed.

abstract subscribe_enable_validation(
callback: Callable[[bool], Any],
)#

Return the object that will automatically unsubscribe when destroyed. Subscription that will let the plugin re-run a validation by itself.

abstract subscribe_global_progress(
callback: Callable[[float], Any],
)#

Return the object that will automatically unsubscribe when destroyed.

Parameters:

callback – function that should be called during the progress. float: the progress between 0.0 and 1.0 str: the message of the progress bool: the result of the plugin. At 1.0, it can be True or False.

abstract subscribe_mass_build_queue_action_ui(
callback: Callable[[Any], Any],
)#

Return the object that will automatically unsubscribe when destroyed.

abstract subscribe_mass_build_ui(
callback: Callable[[Any], Any],
)#

Return the object that will automatically unsubscribe when destroyed.

abstract subscribe_mass_cook_template(
callback: Callable[[tuple[bool, str | None, Any]], Any],
)#

Return the object that will automatically unsubscribe when destroyed.

abstract subscribe_on_validation_is_ready_to_run(
callback: Callable[[int, bool], Any],
)#

Return the object that will automatically unsubscribe when destroyed. Subscription that will let the plugin re-run a validation by itself.

abstract subscribe_progress(
callback: Callable[[float, str, bool], Any],
)#

Return the object that will automatically unsubscribe when destroyed.

Parameters:

callback – function that should be called during the progress. float: the progress between 0.0 and 1.0 str: the message of the progress bool: the result of the plugin. At 1.0, it can be True or False.

abstract subscribe_validator_run(
callback: Callable[[list[IBase], Enum, bool | None], Any],
)#

Return the object that will automatically unsubscribe when destroyed. Subscription that will let the plugin re-run a validation by itself.

abstract property tooltip: str#
pydantic model omni.flux.validator.factory.plugins.interface_base.IBaseSchema#

Bases: BaseModel, ABC

Show JSON schema
{
   "title": "IBaseSchema",
   "type": "object",
   "properties": {}
}

abstract destroy()#
abstract classmethod is_registered(v: str) str#
abstract property instance: Any#
  • SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.

  • SPDX-License-Identifier: Apache-2.0

  • Licensed under the Apache License, Version 2.0 (the “License”);

  • you may not use this file except in compliance with the License.

  • You may obtain a copy of the License at

  • https://www.apache.org/licenses/LICENSE-2.0

  • Unless required by applicable law or agreed to in writing, software

  • distributed under the License is distributed on an “AS IS” BASIS,

  • WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

  • See the License for the specific language governing permissions and

  • limitations under the License.

class omni.flux.validator.factory.plugins.plugin_base.Base#

Bases: IBase, ABC

pydantic model Data#

Bases: Data

Show JSON schema
{
   "title": "Data",
   "type": "object",
   "properties": {
      "on_progress_callback": {
         "default": null,
         "title": "On Progress Callback"
      },
      "on_global_progress_callback": {
         "default": null,
         "title": "On Global Progress Callback"
      },
      "data_flows": {
         "anyOf": [
            {
               "items": {
                  "$ref": "#/$defs/DataFlow"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Data Flows"
      },
      "channel": {
         "default": "Default",
         "title": "Channel",
         "type": "string"
      },
      "expose_mass_ui": {
         "default": false,
         "title": "Expose Mass Ui",
         "type": "boolean"
      },
      "expose_mass_queue_action_ui": {
         "default": false,
         "title": "Expose Mass Queue Action Ui",
         "type": "boolean"
      },
      "cook_mass_template": {
         "default": false,
         "description": "Set this to true if you want the mass validator to use the plugin to cook the template",
         "title": "Cook Mass Template",
         "type": "boolean"
      },
      "display_name_mass_template": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Name to show when we process a cooked template from mass processing",
         "title": "Display Name Mass Template"
      },
      "display_name_mass_template_tooltip": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Tooltip to show when we process a cooked template from mass processing",
         "title": "Display Name Mass Template Tooltip"
      },
      "uuid": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "UUID of the plugin",
         "title": "Uuid"
      },
      "progress": {
         "anyOf": [
            {
               "maxItems": 3,
               "minItems": 3,
               "prefixItems": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "string"
                  },
                  {
                     "type": "boolean"
                  }
               ],
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "default": [
            0.0,
            "Initializing",
            true
         ],
         "description": "Progress of the plugin",
         "title": "Progress"
      },
      "global_progress_value": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "null"
            }
         ],
         "default": 0.0,
         "description": "Global progress value of the plugin",
         "title": "Global Progress Value"
      }
   },
   "$defs": {
      "DataFlow": {
         "additionalProperties": false,
         "properties": {
            "name": {
               "title": "Name",
               "type": "string"
            },
            "channel": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": "Default",
               "title": "Channel"
            }
         },
         "required": [
            "name"
         ],
         "title": "DataFlow",
         "type": "object"
      }
   },
   "additionalProperties": false
}

Config:
  • extra: str = forbid

  • validate_assignment: bool = True

  • arbitrary_types_allowed: bool = True

Fields:
  • channel (str)

  • cook_mass_template (bool)

  • data_flows (list[omni.flux.validator.factory.data_flow.base_data_flow.DataFlow] | None)

  • display_name_mass_template (str | None)

  • display_name_mass_template_tooltip (str | None)

  • expose_mass_queue_action_ui (bool)

  • expose_mass_ui (bool)

  • global_progress_value (float | None)

  • on_global_progress_callback (Callable[[float], None] | None)

  • on_progress_callback (Callable[[float, str, bool], None] | None)

  • progress (tuple[float, str, bool] | None)

  • uuid (str | None)

Validators:
  • _fire_global_progress_value_callback » global_progress_value

  • _fire_progress_callback » progress

  • sanitize_uuid » uuid

field channel: str = 'Default'#
field cook_mass_template: bool = False#

Set this to true if you want the mass validator to use the plugin to cook the template

field data_flows: list[_DataFlow] | None = None#
field display_name_mass_template: str | None = None#

Name to show when we process a cooked template from mass processing

field display_name_mass_template_tooltip: str | None = None#

Tooltip to show when we process a cooked template from mass processing

field expose_mass_queue_action_ui: bool = False#
field expose_mass_ui: bool = False#
field global_progress_value: float | None = 0.0#

Global progress value of the plugin

Validated by:
  • _fire_global_progress_value_callback

field on_global_progress_callback: Callable[[float], None] | None = None#
field on_progress_callback: Callable[[float, str, bool], None] | None = None#
field progress: tuple[float, str, bool] | None = (0.0, 'Initializing', True)#

Progress of the plugin

Validated by:
  • _fire_progress_callback

field uuid: str | None = None#

UUID of the plugin

Validated by:
model_post_init(context: Any, /) None#

This function is meant to behave like a BaseModel method to initialise private attributes.

It takes context as an argument since that’s what pydantic-core passes when calling it.

Parameters:
  • self – The BaseModel instance.

  • context – The context.

validator sanitize_uuid  »  uuid#
property data_flow_compatible_name#
async build_ui(schema_data: Any) Any#

Build the UI of a plugin

Parameters:

schema_data – the data of the plugin from the schema

Returns:

Anything from the implementation

destroy()#
display_name: str | None = None#
get_global_progress() float#

The value of the global progression of the validation

get_progress() Tuple[float, str, bool]#
mass_build_queue_action_ui(
schema_data: Any,
default_actions: List[Callable[[], Any]],
callback: Callable[[str], Any],
) Any#

Default exposed action for Mass validation. The UI will be built into the delegate of the mass queue. Please implement your code using _mass_build_queue_action_ui()

async mass_build_ui(schema_data: Any) Any#

Build the mass UI of a plugin. This function should not be overridden. Please implement your code using _mass_build_ui()

Parameters:

schema_data – the data of the plugin from the schema

Returns:

Anything from the implementation

async mass_cook_template(
schema_data_template: Any,
) Tuple[bool, str | None, List[Data]]#

Take a template as an input and the (previous) result, and edit the result for mass processing. For example, receive 1 template that has a context plugin with a list of files, and generate multiple schema from the template, with 1 input file for each template. Please implement your code using _mass_cook_template()

Parameters:

schema_data_template – the data of the plugin from the schema

Returns:

A tuple of the shape (TemplateCookingSuccess, ErrorMessage, CookingData)

async on_crash(schema_data: Any, data: Any) None#

Function that will be called when a plugin crash

Parameters:
  • schema_data – the data of the plugin from the schema

  • data – any random data we want to pass

on_mass_cook_template(success, message, data)#

Return the object that will automatically unsubscribe when destroyed.

on_progress(progress: float, message: str, result: bool)#

Set the progression of the plugin. Setting the attribute will fire self.__on_progress

set_global_progress(value: float)#

The value of the global progression of the validation

set_parent_schema(
schema: IBaseSchema,
)#

Set the schema

Parameters:

schema – the schema to set

show(value: bool, schema_data: Any)#

Called whenever the plugin is show or hidden in the UI.

subscribe_build_ui(
callback: Callable[[Any], Any],
)#

Return the object that will automatically unsubscribe when destroyed.

subscribe_enable_validation(
callback: Callable[[bool], Any],
)#

Return the object that will automatically unsubscribe when destroyed. Subscription that will let the plugin re-run a validation by itself.

subscribe_global_progress(
callback: Callable[[float], Any],
)#

Return the object that will automatically unsubscribe when destroyed.

Parameters:

callback – function that should be called during the progress. float: the progress between 0.0 and 1.0 str: the message of the progress bool: the result of the plugin. At 1.0, it can be True or False.

subscribe_mass_build_queue_action_ui(
callback: Callable[[Any], Any],
)#

Return the object that will automatically unsubscribe when destroyed.

subscribe_mass_build_ui(
callback: Callable[[Any], Any],
)#

Return the object that will automatically unsubscribe when destroyed.

subscribe_mass_cook_template(
callback: Callable[[Tuple[bool, str | None, Any]], Any],
)#

Return the object that will automatically unsubscribe when destroyed.

subscribe_on_validation_is_ready_to_run(
callback: Callable[[int, bool], Any],
)#

Return the object that will automatically unsubscribe when destroyed. Subscription that will let the plugin re-run a validation by itself.

subscribe_progress(
callback: Callable[[float, str, bool], Any],
)#

Return the object that will automatically unsubscribe when destroyed.

Parameters:

callback – function that should be called during the progress. float: the progress between 0.0 and 1.0 str: the message of the progress bool: the result of the plugin. At 1.0, it can be True or False.

subscribe_validator_run(
callback: Callable[[List[Base], ValidatorRunMode, bool | None], Any],
)#

Return the object that will automatically unsubscribe when destroyed. Subscription that will let the plugin re-run a validation by itself.

class omni.flux.validator.factory.plugins.plugin_base.ValidatorRunMode(value)#

Bases: Enum

An enumeration.

BASE_ALL = 'base_all'#
BASE_ONLY_SELECTED = 'base_only_selected'#
BASE_SELF_TO_END = 'base_self_to_end'#
  • SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.

  • SPDX-License-Identifier: Apache-2.0

  • Licensed under the Apache License, Version 2.0 (the “License”);

  • you may not use this file except in compliance with the License.

  • You may obtain a copy of the License at

  • https://www.apache.org/licenses/LICENSE-2.0

  • Unless required by applicable law or agreed to in writing, software

  • distributed under the License is distributed on an “AS IS” BASIS,

  • WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

  • See the License for the specific language governing permissions and

  • limitations under the License.

class omni.flux.validator.factory.plugins.resultor_base.ResultorBase#

Bases: Base, ABC

pydantic model Data#

Bases: Data

Show JSON schema
{
   "title": "Data",
   "type": "object",
   "properties": {
      "on_progress_callback": {
         "default": null,
         "title": "On Progress Callback"
      },
      "on_global_progress_callback": {
         "default": null,
         "title": "On Global Progress Callback"
      },
      "data_flows": {
         "anyOf": [
            {
               "items": {
                  "$ref": "#/$defs/DataFlow"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Data Flows"
      },
      "channel": {
         "default": "Default",
         "title": "Channel",
         "type": "string"
      },
      "expose_mass_ui": {
         "default": false,
         "title": "Expose Mass Ui",
         "type": "boolean"
      },
      "expose_mass_queue_action_ui": {
         "default": false,
         "title": "Expose Mass Queue Action Ui",
         "type": "boolean"
      },
      "cook_mass_template": {
         "default": false,
         "description": "Set this to true if you want the mass validator to use the plugin to cook the template",
         "title": "Cook Mass Template",
         "type": "boolean"
      },
      "display_name_mass_template": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Name to show when we process a cooked template from mass processing",
         "title": "Display Name Mass Template"
      },
      "display_name_mass_template_tooltip": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Tooltip to show when we process a cooked template from mass processing",
         "title": "Display Name Mass Template Tooltip"
      },
      "uuid": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "UUID of the plugin",
         "title": "Uuid"
      },
      "progress": {
         "anyOf": [
            {
               "maxItems": 3,
               "minItems": 3,
               "prefixItems": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "string"
                  },
                  {
                     "type": "boolean"
                  }
               ],
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "default": [
            0.0,
            "Initializing",
            true
         ],
         "description": "Progress of the plugin",
         "title": "Progress"
      },
      "global_progress_value": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "null"
            }
         ],
         "default": 0.0,
         "description": "Global progress value of the plugin",
         "title": "Global Progress Value"
      },
      "on_resultor_callback": {
         "default": null,
         "title": "On Resultor Callback"
      },
      "last_resultor_message": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Last Resultor Message"
      },
      "last_resultor_timing": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Last Resultor Timing"
      },
      "last_resultor_result": {
         "anyOf": [
            {
               "type": "boolean"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Last Resultor Result"
      }
   },
   "$defs": {
      "DataFlow": {
         "additionalProperties": false,
         "properties": {
            "name": {
               "title": "Name",
               "type": "string"
            },
            "channel": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": "Default",
               "title": "Channel"
            }
         },
         "required": [
            "name"
         ],
         "title": "DataFlow",
         "type": "object"
      }
   },
   "additionalProperties": false
}

Config:
  • extra: str = forbid

  • validate_assignment: bool = True

  • arbitrary_types_allowed: bool = True

Fields:
  • last_resultor_message (str | None)

  • last_resultor_result (bool | None)

  • last_resultor_timing (float | None)

  • on_resultor_callback (Callable[[bool, str], Any] | None)

Validators:
  • _fire_global_progress_value_callback » global_progress_value

  • _fire_last_resultor_result_callback » last_resultor_result

  • _fire_progress_callback » progress

  • sanitize_uuid » uuid

field last_resultor_message: str | None = None#
field last_resultor_result: bool | None = None#
Validated by:
  • _fire_last_resultor_result_callback

field last_resultor_timing: float | None = None#
field on_resultor_callback: Callable[[bool, str], Any] | None = None#
model_post_init(context: Any, /) None#

This function is meant to behave like a BaseModel method to initialise private attributes.

It takes context as an argument since that’s what pydantic-core passes when calling it.

Parameters:
  • self – The BaseModel instance.

  • context – The context.

async result(
schema_data: Data,
schema: BaseModel,
) tuple[bool, str]#

Function that will be called to work on the result

Parameters:
  • schema_data – the data from the schema.

  • schema – the whole schema ran by the manager

Returns:

True if the result passed, False if not. str: the message you want to show, like “Succeeded to write the result here”

Return type:

bool

subscribe_result(
callback: Callable[[bool, str], Any],
)#

Return the object that will automatically unsubscribe when destroyed.

pydantic model omni.flux.validator.factory.plugins.resultor_base.Schema#

Bases: BaseSchema

Show JSON schema
{
   "title": "Schema",
   "type": "object",
   "properties": {
      "name": {
         "title": "Name",
         "type": "string"
      },
      "enabled": {
         "default": true,
         "title": "Enabled",
         "type": "boolean"
      },
      "data": {
         "$ref": "#/$defs/Data"
      }
   },
   "$defs": {
      "Data": {
         "properties": {},
         "title": "Data",
         "type": "object"
      }
   },
   "additionalProperties": false,
   "required": [
      "name",
      "data"
   ]
}

Config:
  • extra: str = forbid

  • arbitrary_types_allowed: bool = True

Fields:

Validators:

model_post_init(context: Any, /) None#

This function is meant to behave like a BaseModel method to initialise private attributes.

It takes context as an argument since that’s what pydantic-core passes when calling it.

Parameters:
  • self – The BaseModel instance.

  • context – The context.

  • SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.

  • SPDX-License-Identifier: Apache-2.0

  • Licensed under the Apache License, Version 2.0 (the “License”);

  • you may not use this file except in compliance with the License.

  • You may obtain a copy of the License at

  • https://www.apache.org/licenses/LICENSE-2.0

  • Unless required by applicable law or agreed to in writing, software

  • distributed under the License is distributed on an “AS IS” BASIS,

  • WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

  • See the License for the specific language governing permissions and

  • limitations under the License.

pydantic model omni.flux.validator.factory.plugins.schema_base.BaseSchema#

Bases: IBaseSchema

Show JSON schema
{
   "title": "BaseSchema",
   "type": "object",
   "properties": {
      "name": {
         "title": "Name",
         "type": "string"
      },
      "enabled": {
         "default": true,
         "title": "Enabled",
         "type": "boolean"
      },
      "data": {
         "$ref": "#/$defs/Data"
      }
   },
   "$defs": {
      "Data": {
         "properties": {},
         "title": "Data",
         "type": "object"
      }
   },
   "additionalProperties": false,
   "required": [
      "name",
      "data"
   ]
}

Config:
  • extra: str = forbid

  • arbitrary_types_allowed: bool = True

Fields:
Validators:
  • _initialize_plugin_instance_and_check_flow » all fields

  • _parse_plugin_data » all fields

  • is_registered » name

field data: _IBase.Data [Required]#
Validated by:
  • _initialize_plugin_instance_and_check_flow

  • _parse_plugin_data

field enabled: bool = True#
Validated by:
  • _initialize_plugin_instance_and_check_flow

  • _parse_plugin_data

field name: str [Required]#
Validated by:
  • _initialize_plugin_instance_and_check_flow

  • _parse_plugin_data

  • is_registered

destroy()#
validator is_registered  »  name#
model_post_init(context: Any, /) None#

This function is meant to behave like a BaseModel method to initialise private attributes.

It takes context as an argument since that’s what pydantic-core passes when calling it.

Parameters:
  • self – The BaseModel instance.

  • context – The context.

property instance: 'BaseSchema' | None#
  • SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.

  • SPDX-License-Identifier: Apache-2.0

  • Licensed under the Apache License, Version 2.0 (the “License”);

  • you may not use this file except in compliance with the License.

  • You may obtain a copy of the License at

  • https://www.apache.org/licenses/LICENSE-2.0

  • Unless required by applicable law or agreed to in writing, software

  • distributed under the License is distributed on an “AS IS” BASIS,

  • WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

  • See the License for the specific language governing permissions and

  • limitations under the License.

pydantic model omni.flux.validator.factory.plugins.selector_base.Schema#

Bases: BaseSchema

Show JSON schema
{
   "title": "Schema",
   "type": "object",
   "properties": {
      "name": {
         "title": "Name",
         "type": "string"
      },
      "enabled": {
         "default": true,
         "title": "Enabled",
         "type": "boolean"
      },
      "data": {
         "$ref": "#/$defs/Data"
      }
   },
   "$defs": {
      "Data": {
         "properties": {},
         "title": "Data",
         "type": "object"
      }
   },
   "additionalProperties": false,
   "required": [
      "name",
      "data"
   ]
}

Config:
  • extra: str = forbid

  • arbitrary_types_allowed: bool = True

Fields:

Validators:

model_post_init(context: Any, /) None#

This function is meant to behave like a BaseModel method to initialise private attributes.

It takes context as an argument since that’s what pydantic-core passes when calling it.

Parameters:
  • self – The BaseModel instance.

  • context – The context.

class omni.flux.validator.factory.plugins.selector_base.SelectorBase#

Bases: Base, ABC

pydantic model Data#

Bases: Data

Show JSON schema
{
   "title": "Data",
   "type": "object",
   "properties": {
      "on_progress_callback": {
         "default": null,
         "title": "On Progress Callback"
      },
      "on_global_progress_callback": {
         "default": null,
         "title": "On Global Progress Callback"
      },
      "data_flows": {
         "anyOf": [
            {
               "items": {
                  "$ref": "#/$defs/DataFlow"
               },
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Data Flows"
      },
      "channel": {
         "default": "Default",
         "title": "Channel",
         "type": "string"
      },
      "expose_mass_ui": {
         "default": false,
         "title": "Expose Mass Ui",
         "type": "boolean"
      },
      "expose_mass_queue_action_ui": {
         "default": false,
         "title": "Expose Mass Queue Action Ui",
         "type": "boolean"
      },
      "cook_mass_template": {
         "default": false,
         "description": "Set this to true if you want the mass validator to use the plugin to cook the template",
         "title": "Cook Mass Template",
         "type": "boolean"
      },
      "display_name_mass_template": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Name to show when we process a cooked template from mass processing",
         "title": "Display Name Mass Template"
      },
      "display_name_mass_template_tooltip": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Tooltip to show when we process a cooked template from mass processing",
         "title": "Display Name Mass Template Tooltip"
      },
      "uuid": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "UUID of the plugin",
         "title": "Uuid"
      },
      "progress": {
         "anyOf": [
            {
               "maxItems": 3,
               "minItems": 3,
               "prefixItems": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "string"
                  },
                  {
                     "type": "boolean"
                  }
               ],
               "type": "array"
            },
            {
               "type": "null"
            }
         ],
         "default": [
            0.0,
            "Initializing",
            true
         ],
         "description": "Progress of the plugin",
         "title": "Progress"
      },
      "global_progress_value": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "null"
            }
         ],
         "default": 0.0,
         "description": "Global progress value of the plugin",
         "title": "Global Progress Value"
      },
      "on_select_callback": {
         "default": null,
         "title": "On Select Callback"
      },
      "last_select_message": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Last Select Message"
      },
      "last_select_data": {
         "anyOf": [
            {},
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "This is tmp we don't keep it in the schema",
         "title": "Last Select Data"
      },
      "last_select_timing": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Last Select Timing"
      },
      "last_select_result": {
         "anyOf": [
            {
               "type": "boolean"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Last Select Result"
      }
   },
   "$defs": {
      "DataFlow": {
         "additionalProperties": false,
         "properties": {
            "name": {
               "title": "Name",
               "type": "string"
            },
            "channel": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": "Default",
               "title": "Channel"
            }
         },
         "required": [
            "name"
         ],
         "title": "DataFlow",
         "type": "object"
      }
   },
   "additionalProperties": false
}

Config:
  • extra: str = forbid

  • validate_assignment: bool = True

  • arbitrary_types_allowed: bool = True

Fields:
  • last_select_data (Any | None)

  • last_select_message (str | None)

  • last_select_result (bool | None)

  • last_select_timing (float | None)

  • on_select_callback (Callable[[bool, str, Any], Any] | None)

Validators:
  • _fire_global_progress_value_callback » global_progress_value

  • _fire_last_select_result_callback » last_select_result

  • _fire_progress_callback » progress

  • sanitize_uuid » uuid

field last_select_data: Any | None = None#

This is tmp we don’t keep it in the schema

field last_select_message: str | None = None#
field last_select_result: bool | None = None#
Validated by:
  • _fire_last_select_result_callback

field last_select_timing: float | None = None#
field on_select_callback: Callable[[bool, str, Any], Any] | None = None#
model_post_init(context: Any, /) None#

This function is meant to behave like a BaseModel method to initialise private attributes.

It takes context as an argument since that’s what pydantic-core passes when calling it.

Parameters:
  • self – The BaseModel instance.

  • context – The context.

async select(
schema_data: Data,
context_plugin_data: SetupDataTypeVar,
selector_plugin_data: Any,
) tuple[bool, str, Any]#

Function that will be called to select the data

Parameters:
  • schema_data – the data from the schema.

  • context_plugin_data – the data from the context plugin

  • selector_plugin_data – the data from the previous selector plugin

Returns:

True if the selector passed, False if not. str: the message you want to show, like “Succeeded to select this” any: data that you want to pass. Those data will be passed and used by the check(s) plugins. Like a list of USD prims.

Return type:

bool

subscribe_select(
callback: Callable[[bool, str, Any], Any],
)#

Return the object that will automatically unsubscribe when destroyed.