Open julian-fong opened 3 months ago
tests in check_estimator
should be failing... for _predict_*
functions i.e quantile
and proba
They are not failing because there are no tests covering the new code, i.e., feeding polars
objects, is that not so?
running check_estimator
locally does incur some failures (tests are being ran), but maybe I am doing something wrong?
{'test_clone[DummyPolarsProbaRegressor-0]': 'PASSED',
'test_clone[DummyPolarsProbaRegressor-1]': 'PASSED',
'test_constructor[DummyPolarsProbaRegressor]': 'PASSED',
'test_create_test_instance[DummyPolarsProbaRegressor]': 'PASSED',
'test_create_test_instances_and_names[DummyPolarsProbaRegressor]': 'PASSED',
'test_get_params[DummyPolarsProbaRegressor-0]': 'PASSED',
'test_get_params[DummyPolarsProbaRegressor-1]': 'PASSED',
'test_inheritance[DummyPolarsProbaRegressor]': 'PASSED',
'test_no_between_test_case_side_effects[DummyPolarsProbaRegressor-0-0]': 'PASSED',
'test_no_between_test_case_side_effects[DummyPolarsProbaRegressor-0-1]': 'PASSED',
'test_no_between_test_case_side_effects[DummyPolarsProbaRegressor-1-0]': 'PASSED',
'test_no_between_test_case_side_effects[DummyPolarsProbaRegressor-1-1]': 'PASSED',
'test_no_cross_test_side_effects_part1[DummyPolarsProbaRegressor-0]': 'PASSED',
'test_no_cross_test_side_effects_part1[DummyPolarsProbaRegressor-1]': 'PASSED',
'test_no_cross_test_side_effects_part2[DummyPolarsProbaRegressor-0]': 'PASSED',
'test_no_cross_test_side_effects_part2[DummyPolarsProbaRegressor-1]': 'PASSED',
'test_object_tags[DummyPolarsProbaRegressor]': 'PASSED',
'test_repr[DummyPolarsProbaRegressor-0]': 'PASSED',
'test_repr[DummyPolarsProbaRegressor-1]': 'PASSED',
'test_set_params[DummyPolarsProbaRegressor-0]': 'PASSED',
'test_set_params[DummyPolarsProbaRegressor-1]': 'PASSED',
'test_set_params_sklearn[DummyPolarsProbaRegressor]': 'PASSED',
'test_valid_object_class_tags[DummyPolarsProbaRegressor]': 'PASSED',
'test_valid_object_tags[DummyPolarsProbaRegressor-0]': 'PASSED',
'test_valid_object_tags[DummyPolarsProbaRegressor-1]': 'PASSED',
'test_fit_does_not_overwrite_hyper_params[DummyPolarsProbaRegressor-0-ProbaRegressorBasic]': 'PASSED',
'test_fit_does_not_overwrite_hyper_params[DummyPolarsProbaRegressor-0-ProbaRegressorXcolMixIxYnp]': 'PASSED',
'test_fit_does_not_overwrite_hyper_params[DummyPolarsProbaRegressor-0-ProbaRegressorSurvival]': 'PASSED',
'test_fit_does_not_overwrite_hyper_params[DummyPolarsProbaRegressor-1-ProbaRegressorBasic]': 'PASSED',
'test_fit_does_not_overwrite_hyper_params[DummyPolarsProbaRegressor-1-ProbaRegressorXcolMixIxYnp]': 'PASSED',
'test_fit_does_not_overwrite_hyper_params[DummyPolarsProbaRegressor-1-ProbaRegressorSurvival]': 'PASSED',
'test_fit_returns_self[DummyPolarsProbaRegressor-0-ProbaRegressorBasic]': 'PASSED',
'test_fit_returns_self[DummyPolarsProbaRegressor-0-ProbaRegressorXcolMixIxYnp]': 'PASSED',
'test_fit_returns_self[DummyPolarsProbaRegressor-0-ProbaRegressorSurvival]': 'PASSED',
'test_fit_returns_self[DummyPolarsProbaRegressor-1-ProbaRegressorBasic]': 'PASSED',
'test_fit_returns_self[DummyPolarsProbaRegressor-1-ProbaRegressorXcolMixIxYnp]': 'PASSED',
'test_fit_returns_self[DummyPolarsProbaRegressor-1-ProbaRegressorSurvival]': 'PASSED',
'test_fit_updates_state[DummyPolarsProbaRegressor-0-ProbaRegressorBasic]': 'PASSED',
'test_fit_updates_state[DummyPolarsProbaRegressor-0-ProbaRegressorXcolMixIxYnp]': 'PASSED',
'test_fit_updates_state[DummyPolarsProbaRegressor-0-ProbaRegressorSurvival]': 'PASSED',
'test_fit_updates_state[DummyPolarsProbaRegressor-1-ProbaRegressorBasic]': 'PASSED',
'test_fit_updates_state[DummyPolarsProbaRegressor-1-ProbaRegressorXcolMixIxYnp]': 'PASSED',
'test_fit_updates_state[DummyPolarsProbaRegressor-1-ProbaRegressorSurvival]': 'PASSED',
'test_input_output_contract[DummyPolarsProbaRegressor-0]': AssertionError(),
'test_input_output_contract[DummyPolarsProbaRegressor-1]': AssertionError(),
'test_pred_quantiles_interval[DummyPolarsProbaRegressor-0-alpha=0.05]': AttributeError("'DataFrame' object has no attribute 'index'"),
'test_pred_quantiles_interval[DummyPolarsProbaRegressor-0-alpha=[0.1]]': AttributeError("'DataFrame' object has no attribute 'index'"),
'test_pred_quantiles_interval[DummyPolarsProbaRegressor-0-alpha=[0.25, 0.75]]': AttributeError("'DataFrame' object has no attribute 'index'"),
'test_pred_quantiles_interval[DummyPolarsProbaRegressor-0-alpha=[0.3, 0.1, 0.9]]': AttributeError("'DataFrame' object has no attribute 'index'"),
'test_pred_quantiles_interval[DummyPolarsProbaRegressor-1-alpha=0.05]': AttributeError("'DataFrame' object has no attribute 'index'"),
'test_pred_quantiles_interval[DummyPolarsProbaRegressor-1-alpha=[0.1]]': AttributeError("'DataFrame' object has no attribute 'index'"),
'test_pred_quantiles_interval[DummyPolarsProbaRegressor-1-alpha=[0.25, 0.75]]': AttributeError("'DataFrame' object has no attribute 'index'"),
'test_pred_quantiles_interval[DummyPolarsProbaRegressor-1-alpha=[0.3, 0.1, 0.9]]': AttributeError("'DataFrame' object has no attribute 'index'")}
that's strange. Could you kindly investigate?
oh, I think I got it - the estimator is in a private module. The test framework skips estimators that are private and not publicly exported.
@fkiraly How do we specify to ignore 'pandas dataframe' tests for estimators that do not have pandas specified x/y mtypes?
we should not skip these - it should still work with back/from conversion.
Completes #440 and is a polars extension of #437
Adds polars version of dummy proba regressor - also to help test e2e input flow of polars tables
In this pull request:
polars_eager_table
. However, sinceBaseDistribution
objects are currently is not supported forpolars
DataFrames, we leverage pandas DataFrames inside both_fit
and_predict_proba
. Otherwise the functionality should mirror #437.skpro.utils.polars
file which contains 2 functionspolars_split_index_values_frame
andpolars_combine_index_values_frame
. The goal of these two functions is to split and combine__index__
columns in and out of the main polars dataFrame (if they are created via the _convert utils from pandas to polars) in order to properly do predictions or fitting.test_polars.py
, as well as other polars tests that is related to the adapter enhancements as part of #449