colda.workflow.test_workflow.sponsor package

Submodules

colda.workflow.test_workflow.sponsor.api module

class colda.workflow.test_workflow.sponsor.api.TestSponsorFindAssistor

Bases: TestBaseWorkflow

Handle test sponsor find assistor.

Methods

find_test_assistor

classmethod find_test_assistor(train_id: str, test_file_path: str, test_id_column: str, test_data_column: str, test_target_column: str, test_name: str | None, test_description: str | None) str

Execute test sponsor find assistor logic.

Parameters

train_id : str test_file_path : str test_id_column : str test_data_column : str test_target_column : str test_name : Union[str, None] test_description : Union[str, None]

Returns

None

class colda.workflow.test_workflow.sponsor.api.TestSponsorMatchIdentifier

Bases: TestBaseWorkflow

Handle test sponsor match identifier stage.

Methods

test_sponsor_match_identifier

classmethod test_cooperative_model(user_id: str, test_id: str, sponsor_matched_identifers: dict[str, Any]) None

In test stage, we dont need to wait the training model output sent by the assistors. We test the trained model using test dataset directly

Parameters

user_id : str test_id : str sponsor_matched_identifers : dict[str]

Returns

None

classmethod test_sponsor_match_identifier(test_id: str, test_id_dict: dict[str, Any]) None

Execute test sponsor match identifier logic.

Parameters

test_id : str test_id_dict : dict[str, Any]

Returns

None

class colda.workflow.test_workflow.sponsor.api.TestSponsorOutput

Bases: TestBaseWorkflow

Handle test sponsor output stage.

Methods

test_sponsor_output

classmethod evaluation(user_id: str, test_id: str, rounds: int, assistor_random_id_to_output_content_dict: dict[str, Any]) None

Function to avoid async case. When sponsor gets the test output content sent by assistors, the sponsor may not complete its own testing model step. We need to wait till it complete.

Parameters

user_id : str test_id : str rounds : int assistor_random_id_to_output_content_dict : dict[str, Any]

Returns

None

classmethod test_sponsor_output(test_id: str, test_id_dict: dict[str, Any]) None

Execute test sponsor output logic.

Parameters

test_id : str test_id_dict : dict[str, Any]

Returns

None

colda.workflow.test_workflow.sponsor.find_assistor module

class colda.workflow.test_workflow.sponsor.find_assistor.TestSponsorFindAssistor

Bases: TestBaseWorkflow

Handle test sponsor find assistor.

Methods

find_test_assistor

classmethod find_test_assistor(train_id: str, test_file_path: str, test_id_column: str, test_data_column: str, test_target_column: str, test_name: str | None, test_description: str | None) str

Execute test sponsor find assistor logic.

Parameters

train_id : str test_file_path : str test_id_column : str test_data_column : str test_target_column : str test_name : Union[str, None] test_description : Union[str, None]

Returns

None

colda.workflow.test_workflow.sponsor.match_identifier module

class colda.workflow.test_workflow.sponsor.match_identifier.TestSponsorMatchIdentifier

Bases: TestBaseWorkflow

Handle test sponsor match identifier stage.

Methods

test_sponsor_match_identifier

classmethod test_cooperative_model(user_id: str, test_id: str, sponsor_matched_identifers: dict[str, Any]) None

In test stage, we dont need to wait the training model output sent by the assistors. We test the trained model using test dataset directly

Parameters

user_id : str test_id : str sponsor_matched_identifers : dict[str]

Returns

None

classmethod test_sponsor_match_identifier(test_id: str, test_id_dict: dict[str, Any]) None

Execute test sponsor match identifier logic.

Parameters

test_id : str test_id_dict : dict[str, Any]

Returns

None

colda.workflow.test_workflow.sponsor.output module

class colda.workflow.test_workflow.sponsor.output.TestSponsorOutput

Bases: TestBaseWorkflow

Handle test sponsor output stage.

Methods

test_sponsor_output

classmethod evaluation(user_id: str, test_id: str, rounds: int, assistor_random_id_to_output_content_dict: dict[str, Any]) None

Function to avoid async case. When sponsor gets the test output content sent by assistors, the sponsor may not complete its own testing model step. We need to wait till it complete.

Parameters

user_id : str test_id : str rounds : int assistor_random_id_to_output_content_dict : dict[str, Any]

Returns

None

classmethod test_sponsor_output(test_id: str, test_id_dict: dict[str, Any]) None

Execute test sponsor output logic.

Parameters

test_id : str test_id_dict : dict[str, Any]

Returns

None

Module contents