cursus.steps.configs.config_lightgbmmt_model_inference_step

Multi-Task Model Inference Step Configuration with Self-Contained Derivation Logic

This module implements the configuration class for the LightGBMMT multi-task model inference step using a self-contained design where derived fields are private with read-only properties. Fields are organized into three tiers: 1. Tier 1: Essential User Inputs - fields that users must explicitly provide 2. Tier 2: System Inputs with Defaults - fields with reasonable defaults that can be overridden 3. Tier 3: Derived Fields - fields calculated from other fields (private with properties)

class LightGBMMTModelInferenceConfig(*, author, bucket, role, region, service_name, pipeline_version, model_class='xgboost', current_date=<factory>, framework_version='2.1.2', py_version='py310', source_dir=None, enable_caching=False, use_secure_pypi=False, max_runtime_seconds=172800, project_root_folder, processing_instance_count=1, processing_volume_size=500, processing_instance_type_large='ml.m5.4xlarge', processing_instance_type_small='ml.m5.2xlarge', use_large_processing_instance=False, skip_volume_kms=None, processing_source_dir=None, processing_entry_point='lightgbmmt_model_inference.py', processing_script_arguments=None, processing_framework_version='1.2-1', id_name, task_label_names, job_type='calibration', output_format='csv', json_orient='records', **extra_data)[source]

Bases: ProcessingStepConfigBase

Configuration for LightGBMMT multi-task model inference step with self-contained derivation logic.

This class defines the configuration parameters for the LightGBMMT multi-task model inference step, which generates per-task predictions from trained multi-task models without computing evaluation metrics. This is designed for pure inference workflows where predictions are needed for downstream processing (e.g., model calibration, batch scoring, unlabeled data scoring).

Fields are organized into three tiers: 1. Tier 1: Essential User Inputs - fields that users must explicitly provide 2. Tier 2: System Inputs with Defaults - fields with reasonable defaults that can be overridden 3. Tier 3: Derived Fields - fields calculated from other fields (private with properties)

id_name: str
task_label_names: List[str]
processing_entry_point: str
job_type: str
output_format: str
json_orient: str
framework_version: str
py_version: str
use_large_processing_instance: bool
model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'allow', 'protected_namespaces': (), 'validate_assignment': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

classmethod validate_output_format(v)[source]

Validate output format is supported.

classmethod validate_json_orient(v)[source]

Validate JSON orientation is supported.

initialize_derived_fields()[source]

Initialize all derived fields once after validation.

validate_inference_config()[source]

Additional validation specific to multi-task inference configuration

get_environment_variables()[source]

Get environment variables for the multi-task model inference script.

Returns:

Dictionary mapping environment variable names to values

Return type:

Dict[str, str]

get_public_init_fields()[source]

Override get_public_init_fields to include multi-task inference-specific fields. Gets a dictionary of public fields suitable for initializing a child config. Includes both base fields (from parent) and inference-specific fields.

Returns:

Dictionary of field names to values for child initialization

Return type:

Dict[str, Any]

get_job_arguments()[source]

CLI args — config is the single source (FZ 31e1d3h).

model_post_init(context, /)

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

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

Parameters:
  • self (BaseModel) – The BaseModel instance.

  • context (Any) – The context.