ads.jobs.schema package

Submodules

ads.jobs.schema.validator module

class ads.jobs.schema.validator.ValidateInfrastructure(file)[source]

Bases: object

Class used to validate an Engine YAML

validate()[source]

Validates the Engine YAML

Raises:

ValueError – if invalid

Returns:

Returns normalized dictionary if input matches a known schema, else raises error

Return type:

[dict]

class ads.jobs.schema.validator.ValidateJob(file)[source]

Bases: object

Class used to validate a Job YAML

validate()[source]

Validates the Job YAML

Raises:

ValueError – if invalid

Returns:

Returns normalized dictionary if input matches a known schema, else raises error

Return type:

[dict]

class ads.jobs.schema.validator.ValidateRuntime(file)[source]

Bases: object

Class used to validate a Runtime YAML

validate()[source]

Validates the Runtime YAML

Raises:

ValueError – if invalid

Returns:

Returns normalized dictionary if input matches a known schema, else raises error

Return type:

[dict]

class ads.jobs.schema.validator.ValidatorFactory(file)[source]

Bases: object

ValidatorFactory is a factory class that calls appropriate

Validator class based on the ‘kind’

Usage:

spec = {} validated_dict = ValidatorFactory(spec).validate():

validate()[source]

Calls correct validator based on ‘kind’

Raises:

TypeError – raised when ‘kind’ is not known

Returns:

Returns True if input matches a known schema, else False

Return type:

[boolean]

ads.jobs.schema.validator.load_schema(schema_path)[source]

Module contents