Problem:
Calling model.calc_feature_statistics with plot_file set to a path fails on trying to plot a categorical feature with the number of values above max_cat_features_on_plot with the following error:
Traceback (most recent call last):
File "[...]", line 78, in main
_stats = model.calc_feature_statistics(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File ".../lib/python3.12/site-packages/catboost/core.py", line 3905, in calc_feature_statistics
fig = _plot_feature_statistics(
^^^^^^^^^^^^^^^^^^^^^^^^^
File ".../lib/python3.12/site-packages/catboost/core.py", line 7146, in _plot_feature_statistics
figs_with_names += _plot_feature_statistics_units(statistics, pool_names, feature_name, max_cat_features_on_plot)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File ".../lib/python3.12/site-packages/catboost/core.py", line 7124, in _plot_feature_statistics_units
sub_statistics = dict([(k, dict([(key, stats[key][begin : end]) for key in statistics_keys])) for k, stats in statistics])
^^^^^^^^
ValueError: too many values to unpack (expected 2)
The failing function _plot_feature_statistics_units is here.
Based on my understanding, the offending line 7124 should look like this:
{key: statistics[0][key][begin: end] for key in statistics_keys}
catboost version: 1.2.5 from Conda Forge
Operating System: Ubuntu 20.04 via Docker base image mcr.microsoft.com/azureml/openmpi4.1.0-ubuntu20.04
CPU: Yes
GPU: No
Problem:
Calling
model.calc_feature_statisticswithplot_fileset to a path fails on trying to plot a categorical feature with the number of values abovemax_cat_features_on_plotwith the following error:The failing function
_plot_feature_statistics_unitsis here.Based on my understanding, the offending line 7124 should look like this:
{key: statistics[0][key][begin: end] for key in statistics_keys}catboost version:
1.2.5from Conda ForgeOperating System: Ubuntu 20.04 via Docker base image
mcr.microsoft.com/azureml/openmpi4.1.0-ubuntu20.04CPU: Yes
GPU: No