CDnnTrainTask

class ikomia.dataprocess.pydataprocess.CDnnTrainTask

Internal use only. Use the pure Python implementation TrainProcess to create training algorithms.

Methods

__init__(arg1)

__init__( (object)self) -> None :

enable_mlflow(self, enable)

Enable or disable automatic display of MLflow dashboard when training starts.

enable_tensorboard(self, enable)

Enable or disable automatic launch of Tensorboard dashboard when training starts.

Inherited methods

add_input(self, input)

Add new input to the task.

add_output(self, output)

Add new output to the task.

begin_task_run(self)

See begin_task_run().

emit_add_sub_progress_steps(self, count)

See emit_add_sub_progress_steps().

emit_graphics_context_changed(self)

Send event to notify that graphics context has changed inside the task and display has to be updated.

emit_output_changed(self)

See emit_output_changed().

emit_step_progress(self)

See emit_step_progress().

end_task_run(self)

See end_task_run().

execute_actions(self, action)

Method called when a specific action is requested from the associated widget (see emit_send_process_action()).

get_elapsed_time(self)

Get the time of the last execution in milliseconds.

get_input(self, index)

Get input at position index.

get_input_count(self)

Get the number of inputs.

get_input_data_type(self, index)

Get input data type at position index.

get_inputs(self)

Get the whole list of inputs.

get_output(self, index)

Get output at position index.

get_output_count(self)

Get the number of outputs.

get_output_data_type(self, index)

Get output data type at position index.

get_outputs(self)

Get the whole list of outputs.

get_parameters(self)

Get values of task parameters.

get_progress_steps(self)

See get_progress_steps().

global_input_changed(self, is_new_sequence)

Notify that the inputs of the workflow have changed.

graphics_changed(self)

Notify that graphics layers of input images have changed.

is_graphics_changed_listening(self)

Check whether the task is listening to graphics changed event.

parameters_modified(self)

Notify that the task parameters have changed.

remove_input(self, index)

Remove input at the given position.

run(self)

See run().

set_action_flag(self, action, is_enable)

Enable or disable the given action.

set_active(self, is_active)

See set_active().

set_input(self, input, index)

Set input at position index with the given one.

set_input_data_type(self, data_type, index)

Set the data type for the input at position index.

set_inputs(self, inputs)

Set the whole list of inputs with the given one.

set_output(self, output, index)

Set output at position index with the given one.

set_output_data_type(self, data_type, index)

Set the data type for the output at position index.

set_outputs(self, outputs)

Set the whole list of outputs with the given one.

set_parameters(self, values)

Set values of task parameters.

stop(self)

See stop().

update_static_outputs(self)

Updates the static information deduced from inputs.

Attributes

name

Task name (must be unique)

type

Main purpose or data type on which the task is dedicated to.

output_folder

Output folder when auto-save mode is enabled.

__init__((object)arg1) None
__init__( (object)self) -> None :

Default constructor

__init__( (object)self, (str)name) -> None :

Internal use only

__init__( (object)self, (str)name, (CWorkflowTaskParam)param) -> None :

Internal use only

add_input((CWorkflowTask)self, (CWorkflowTaskIO)input) None :

Add new input to the task.

Args:

input (CWorkflowTaskIO based object): input object

add_input( (CWorkflowTask)self, (CWorkflowTaskIO)input) -> None

add_output((CWorkflowTask)self, (CWorkflowTaskIO)output) None :

Add new output to the task.

Args:

output (CWorkflowTaskIO based object): output object

add_output( (CWorkflowTask)self, (CWorkflowTaskIO)output) -> None

begin_task_run((CDnnTrainTask)self) None :

See begin_task_run().

begin_task_run( (CDnnTrainTask)self) -> None

emit_add_sub_progress_steps((CDnnTrainTask)self, (int)count) None :

See emit_add_sub_progress_steps().

emit_graphics_context_changed((CWorkflowTask)self) None :

Send event to notify that graphics context has changed inside the task and display has to be updated.

emit_output_changed((CDnnTrainTask)self) None :

See emit_output_changed().

emit_step_progress((CDnnTrainTask)self) None :

See emit_step_progress().

enable_mlflow((CDnnTrainTask)self, (bool)enable) None :

Enable or disable automatic display of MLflow dashboard when training starts. Dashboard is opened just once except if a new call to this function is made before a new training job starts. Default: enable.

Parameters:

enable (boolean) – True or False

enable_tensorboard((CDnnTrainTask)self, (bool)enable) None :

Enable or disable automatic launch of Tensorboard dashboard when training starts. Dashboard is opened just once except if a new call to this function is made before a new training job starts. Default: enable.

Parameters:

enable (boolean) – True or False

end_task_run((CDnnTrainTask)self) None :

See end_task_run().

end_task_run( (CDnnTrainTask)self) -> None

execute_actions((CDnnTrainTask)self, (int)action) None :

Method called when a specific action is requested from the associated widget (see emit_send_process_action()).

Args:

action (int): action code

execute_actions( (CDnnTrainTask)self, (int)action) -> None

get_elapsed_time((CWorkflowTask)self) float :

Get the time of the last execution in milliseconds.

Returns:

elapsed time in ms

Return type:

float

get_input((CWorkflowTask)self, (int)index) CWorkflowTaskIO :

Get input at position index.

Parameters:

index (int) – zero-based input index

Returns:

input object

Return type:

CWorkflowTaskIO based object

get_input_count((CWorkflowTask)self) int :

Get the number of inputs.

Returns:

inputs count

Return type:

int

get_input_data_type((CWorkflowTask)self, (int)index) IODataType :

Get input data type at position index. This data type can differ from the original type because it can change at runtime according to the data source.

Parameters:

index (int) – zero-based input index

Returns:

input data type

Return type:

IODataType

get_inputs((CWorkflowTask)self) object :

Get the whole list of inputs.

Returns:

input objects

Return type:

list of CWorkflowTaskIO based objects

get_output((CWorkflowTask)self, (int)index) CWorkflowTaskIO :

Get output at position index.

Parameters:

index (int) – zero-based output index

Returns:

output object

Return type:

CWorkflowTaskIO based object

get_output_count((CWorkflowTask)self) int :

Get the number of outputs.

Returns:

outputs count

Return type:

int

get_output_data_type((CWorkflowTask)self, (int)index) IODataType :

Get output data type at position index. This data type can differ from the original type because it can change at runtime according to the data source.

Parameters:

index (int) – zero-based output index

Returns:

output data type

Return type:

IODataType

get_outputs((CWorkflowTask)self) object :

Get the whole list of outputs.

Returns:

output objects

Return type:

list of CWorkflowTaskIO based objects

get_param_object((CWorkflowTask)self) CWorkflowTaskParam :

Get task parameters.

Returns:

parameter object

Return type:

CWorkflowTaskParam based object

get_parameters((CWorkflowTask)self) object :

Get values of task parameters.

Returns:

string pairs (parameter name, value)

Return type:

dict

get_progress_steps((CDnnTrainTask)self) int :

See get_progress_steps().

get_progress_steps( (CDnnTrainTask)self) -> int

global_input_changed((CWorkflowTask)self, (bool)is_new_sequence) None :

Notify that the inputs of the workflow have changed. This method can be overriden to implement custom actions when this event happens. The method does nothing in this base class.

Args:

is_new_sequence (bool): True if new input is a new sequence (ex: new frame of the same video is not a new sequence)

global_input_changed( (CWorkflowTask)self, (bool)is_new_sequence) -> None

graphics_changed((CWorkflowTask)self) None :

Notify that graphics layers of input images have changed. This method can be overriden to implement custom actions when this event happens. The method does nothing in this base class.

graphics_changed( (CWorkflowTask)self) -> None

is_graphics_changed_listening((CWorkflowTask)self) bool :

Check whether the task is listening to graphics changed event.

Returns:

bool: True or False

is_graphics_changed_listening( (CWorkflowTask)self) -> bool

parameters_modified((CWorkflowTask)self) None :

Notify that the task parameters have changed. This method can be overriden to implement custom actions when this event happens. The method does nothing in this base class.

parameters_modified( (CWorkflowTask)self) -> None

remove_input((CWorkflowTask)self, (int)index) None :

Remove input at the given position.

Parameters:

index (int) – zero-based input index

run((CDnnTrainTask)self) None :

See run().

run( (CDnnTrainTask)self) -> None

set_action_flag((CWorkflowTask)self, (ActionFlag)action, (bool)is_enable) None :

Enable or disable the given action. If the action does not exist, it is added to the list.

Parameters:
  • action (ActionFlag) – action to enable or disable

  • is_enable (bool) – True or False

set_active((CDnnTrainTask)self, (bool)is_active) None :

See set_active().

set_active( (CDnnTrainTask)self, (bool)is_active) -> None

set_auto_save((CWorkflowTask)self, (bool)enable) None :

Enable/disable auto-save mode. When this mode is enabled, task outputs are automatically save to disk when the run() function is executed. Save formats are already defined for all builtin I/O objects. For custom I/O object, one must implement load() and save() methods. Output folder can be set with output_folder.

Parameters:

enable (bool) – True to enable, False to disable

set_input((CWorkflowTask)self, (CWorkflowTaskIO)input, (int)index) None :

Set input at position index with the given one. If the input at position index does not exist, the function creates as many generic inputs to reach the number of index+1 and sets the input at position index.

Args:

input_tot (CWorkflowTaskIO based object)

index (int): zero-based input index

set_input( (CWorkflowTask)self, (CWorkflowTaskIO)input, (int)index) -> None

set_input_data_type((CWorkflowTask)self, (IODataType)data_type, (int)index) None :

Set the data type for the input at position index. If the input at position index does not exist, the function creates as many generic inputs to reach the number of index+1 and sets the data type for the input at position index.

Args:

data_type (IODataType): input data type

index (int): zero-based input index

set_input_data_type( (CWorkflowTask)self, (IODataType)data_type, (int)index) -> None

set_inputs((CWorkflowTask)self, (object)inputs) None :

Set the whole list of inputs with the given one.

Args:

inputs (list of CWorkflowTaskIO based objects)

set_inputs( (CWorkflowTask)self, (object)inputs) -> None

set_output((CWorkflowTask)self, (CWorkflowTaskIO)output, (int)index) None :

Set output at position index with the given one. If the output at position index does not exist, the function creates as many generic outputs to reach the number of index+1 and sets the output at position index.

Args:

output (CWorkflowTaskIO based object)

index (int): zero-based output index

set_output( (CWorkflowTask)self, (CWorkflowTaskIO)output, (int)index) -> None

set_output_data_type((CWorkflowTask)self, (IODataType)data_type, (int)index) None :

Set the data type for the output at position index. If the output at position index does not exist, the function creates as many generic outputs to reach the number of index+1 and sets the data type for the output at position index.

Args:

data_type (IODataType): output data type

index (int): zero-based output index

set_output_data_type( (CWorkflowTask)self, (IODataType)data_type, (int)index) -> None

set_outputs((CWorkflowTask)self, (object)outputs) None :

Set the whole list of outputs with the given one.

Args:

outputs (list of CWorkflowTaskIO based objects)

set_outputs( (CWorkflowTask)self, (object)outputs) -> None

set_param_object((CWorkflowTask)self, (CWorkflowTaskParam)param) None :

Set the task parameters object. Task can have only one parameters object.

Parameters:

paramCWorkflowTaskParam based object

set_parameters((CWorkflowTask)self, (object)values) None :

Set values of task parameters.

Parameters:

values (dict) – string pairs (parameter name, value)

stop((CDnnTrainTask)self) None :

See stop().

stop( (CDnnTrainTask)self) -> None

update_static_outputs((CWorkflowTask)self) None :

Updates the static information deduced from inputs. The static data corresponds to all data that can be deduced without the runtime context. This method is called each time inputs change.

update_static_outputs( (CWorkflowTask)self) -> None

workflow_started((CWorkflowTask)self) None :

Notify that the workflow executing the task is started. The function is called before the run() function of each task.The function can be overriden in child classes to manage custom actions.

workflow_started( (CWorkflowTask)self) -> None

workflow_finished((CWorkflowTask)self) None :

Notify that the workflow executing the task is started. The function is called before the run() function of each task.The function can be overriden in child classes to manage custom actions.

workflow_finished( (CWorkflowTask)self) -> None