Skip to content

[Bug]: array_to_input_data function signature conflict #1361

Closed
@Lopa10ko

Description

@Lopa10ko

After the a2c6746 commit (PR #1320), a state of inconsistency in the code arose. The signature of the array_to_input_data function was changed, and an optional features_names parameter was added.

def array_to_input_data(features_array: np.ndarray,
target_array: np.ndarray,
features_names: np.ndarray[str] = None,
categorical_idx: Union[list[int, str], np.ndarray[int, str]] = None,
idx: Optional[np.ndarray] = None,
task: Task = Task(TaskTypesEnum.classification),
data_type: Optional[DataTypesEnum] = None) -> InputData:

However, the rest of the functions that use array_to_input_data continue to pass parameters as args instead of kwargs (i.e., in a row), shifting the order of arguments in the function body.

return array_to_input_data(features_array, target_array, idx, task, data_type)

To resolve this issue, the easiest and most straightforward approach would be to move the features_name parameter to the end of the argument list for array_to_input_data.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions