{
    "file_diffs": [
        {
            "old_file_content": "import math\n\nfrom AnyQt.QtWidgets import QFormLayout\nfrom AnyQt.QtCore import Qt\n\nimport numpy as np\nimport sklearn.model_selection as skl\n\nfrom Orange.widgets import gui\nfrom Orange.widgets.settings import Setting\nfrom Orange.data import Table\nfrom Orange.data.sql.table import SqlTable\nfrom Orange.widgets.utils.localization import pl\nfrom Orange.widgets.utils.widgetpreview import WidgetPreview\nfrom Orange.widgets.widget import Msg, OWWidget, Input, Output\nfrom Orange.util import Reprable\n\n\nclass OWDataSampler(OWWidget):\n    name = \"Data Sampler\"\n    description = \"Randomly draw a subset of data points \" \\\n                  \"from the input dataset.\"\n    icon = \"icons/DataSampler.svg\"\n    priority = 100\n    category = \"Transform\"\n    keywords = [\"random\"]\n\n    _MAX_SAMPLE_SIZE = 2 ** 31 - 1\n\n    class Inputs:\n        data = Input(\"Data\", Table)\n\n    class Outputs:\n        data_sample = Output(\"Data Sample\", Table, default=True)\n        remaining_data = Output(\"Remaining Data\", Table)\n\n    want_main_area = False\n    resizing_enabled = False\n\n    RandomSeed = 42\n    FixedProportion, FixedSize, CrossValidation, Bootstrap = range(4)\n    SqlTime, SqlProportion = range(2)\n\n    selectedFold: int\n\n    use_seed = Setting(True)\n    replacement = Setting(False)\n    stratify = Setting(False)\n    sql_dl = Setting(False)\n    sampling_type = Setting(FixedProportion)\n    sampleSizeNumber = Setting(1)\n    sampleSizePercentage = Setting(70)\n    sampleSizeSqlTime = Setting(1)\n    sampleSizeSqlPercentage = Setting(0.1)\n    number_of_folds = Setting(10)\n    selectedFold = Setting(1)\n\n    # Older versions of the widget had swapped outputs for cross validation\n    # Migrations set this to True for compability with older workflows\n    compatibility_mode = Setting(False, schema_only=True)\n\n    settings_version = 2\n\n    class Information(OWWidget.Information):\n        compatibility_mode = Msg(\n            \"Compatibility mode\\n\"\n            \"New versions of widget have swapped outputs for cross validation\"\n        )\n\n    class Warning(OWWidget.Warning):\n        could_not_stratify = Msg(\"Stratification failed.\\n{}\")\n        bigger_sample = Msg('Sample is bigger than input.')\n\n    class Error(OWWidget.Error):\n        too_many_folds = Msg(\"Number of subsets exceeds data size.\")\n        sample_larger_than_data = Msg(\"Sample can't be larger than data.\")\n        not_enough_to_stratify = Msg(\"Data is too small to stratify.\")\n        no_data = Msg(\"Dataset is empty.\")\n\n    def __init__(self):\n        super().__init__()\n        if self.compatibility_mode:\n            self.Information.compatibility_mode()\n\n        self.data = None\n        self.indices = None\n        self.sampled_instances = self.remaining_instances = None\n\n        self.sampling_box = gui.vBox(self.controlArea, \"Sampling Type\")\n        sampling = gui.radioButtons(self.sampling_box, self, \"sampling_type\",\n                                    callback=self.sampling_type_changed)\n\n        def set_sampling_type(i):\n            def set_sampling_type_i():\n                self.sampling_type = i\n                self.sampling_type_changed()\n            return set_sampling_type_i\n\n        gui.appendRadioButton(sampling, \"Fixed proportion of data:\")\n        self.sampleSizePercentageSlider = gui.hSlider(\n            gui.indentedBox(sampling), self,\n            \"sampleSizePercentage\",\n            minValue=0, maxValue=100, ticks=10, labelFormat=\"%d %%\",\n            callback=set_sampling_type(self.FixedProportion))\n\n        gui.appendRadioButton(sampling, \"Fixed sample size\")\n        ibox = gui.indentedBox(sampling)\n        self.sampleSizeSpin = gui.spin(\n            ibox, self, \"sampleSizeNumber\", label=\"Instances: \",\n            minv=1, maxv=self._MAX_SAMPLE_SIZE,\n            callback=set_sampling_type(self.FixedSize),\n            controlWidth=90)\n        gui.checkBox(\n            ibox, self, \"replacement\", \"Sample with replacement\",\n            callback=set_sampling_type(self.FixedSize))\n\n        gui.appendRadioButton(sampling, \"Cross validation\")\n        form = QFormLayout(\n            formAlignment=Qt.AlignLeft | Qt.AlignTop,\n            labelAlignment=Qt.AlignLeft,\n            fieldGrowthPolicy=QFormLayout.AllNonFixedFieldsGrow)\n        ibox = gui.indentedBox(sampling, orientation=form)\n        form.addRow(\"Number of subsets:\",\n                    gui.spin(\n                        ibox, self, \"number_of_folds\", 2, 100,\n                        addToLayout=False,\n                        callback=self.number_of_folds_changed))\n        self.selected_fold_spin = gui.spin(\n            ibox, self, \"selectedFold\", 1, self.number_of_folds,\n            addToLayout=False, callback=self.fold_changed)\n        form.addRow(\"Unused subset:\" if not self.compatibility_mode\n                    else \"Selected subset:\", self.selected_fold_spin)\n\n        gui.appendRadioButton(sampling, \"Bootstrap\")\n\n        self.sql_box = gui.vBox(self.controlArea, \"Sampling Type\")\n        sampling = gui.radioButtons(self.sql_box, self, \"sampling_type\",\n                                    callback=self.sampling_type_changed)\n        gui.appendRadioButton(sampling, \"Time:\")\n        ibox = gui.indentedBox(sampling)\n        spin = gui.spin(ibox, self, \"sampleSizeSqlTime\", minv=1, maxv=3600,\n                        callback=set_sampling_type(self.SqlTime))\n        spin.setSuffix(\" sec\")\n        gui.appendRadioButton(sampling, \"Percentage\")\n        ibox = gui.indentedBox(sampling)\n        spin = gui.spin(ibox, self, \"sampleSizeSqlPercentage\", spinType=float,\n                        minv=0.0001, maxv=100, step=0.1, decimals=4,\n                        callback=set_sampling_type(self.SqlProportion))\n        spin.setSuffix(\" %\")\n        self.sql_box.setVisible(False)\n\n        self.options_box = gui.vBox(self.controlArea, \"Options\", addSpaceBefore=False)\n        self.cb_seed = gui.checkBox(\n            self.options_box, self, \"use_seed\",\n            \"Replicable (deterministic) sampling\",\n            callback=self.settings_changed)\n        self.cb_stratify = gui.checkBox(\n            self.options_box, self, \"stratify\",\n            \"Stratify sample (when possible)\", callback=self.settings_changed)\n        self.cb_sql_dl = gui.checkBox(\n            self.options_box, self, \"sql_dl\", \"Download data to local memory\",\n            callback=self.settings_changed)\n        self.cb_sql_dl.setVisible(False)\n\n        gui.button(self.buttonsArea, self, \"Sample Data\",\n                   callback=self.commit)\n\n    def sampling_type_changed(self):\n        self.settings_changed()\n\n    def number_of_folds_changed(self):\n        self.selected_fold_spin.setMaximum(self.number_of_folds)\n        self.sampling_type = self.CrossValidation\n        self.settings_changed()\n\n    def fold_changed(self):\n        # a separate callback - if we decide to cache indices\n        self.sampling_type = self.CrossValidation\n\n    def settings_changed(self):\n        self._update_sample_max_size()\n        self.indices = None\n\n    @Inputs.data\n    def set_data(self, dataset):\n        self.data = dataset\n        if dataset is not None:\n            sql = isinstance(dataset, SqlTable)\n            self.sampling_box.setVisible(not sql)\n            self.sql_box.setVisible(sql)\n            self.cb_seed.setVisible(not sql)\n            self.cb_stratify.setVisible(not sql)\n            self.cb_sql_dl.setVisible(sql)\n\n            if not sql:\n                self._update_sample_max_size()\n                self.updateindices()\n        else:\n            self.indices = None\n            self.clear_messages()\n        self.commit()\n\n    def _update_sample_max_size(self):\n        \"\"\"Limit number of instances to input size unless using replacement.\"\"\"\n        if not self.data or self.replacement:\n            self.sampleSizeSpin.setMaximum(self._MAX_SAMPLE_SIZE)\n        else:\n            self.sampleSizeSpin.setMaximum(len(self.data))\n\n    def commit(self):\n        if self.data is None:\n            sample = other = None\n            self.sampled_instances = self.remaining_instances = None\n        elif isinstance(self.data, SqlTable):\n            other = None\n            if self.sampling_type == self.SqlProportion:\n                sample = self.data.sample_percentage(\n                    self.sampleSizeSqlPercentage, no_cache=True)\n            else:\n                sample = self.data.sample_time(\n                    self.sampleSizeSqlTime, no_cache=True)\n            if self.sql_dl:\n                sample.download_data()\n                sample = Table(sample)\n\n        else:\n            if self.indices is None or not self.use_seed:\n                self.updateindices()\n                if self.indices is None:\n                    return\n            if self.sampling_type in (\n                    self.FixedProportion, self.FixedSize, self.Bootstrap):\n                remaining, sample = self.indices\n            elif self.sampling_type == self.CrossValidation:\n                if self.compatibility_mode:\n                    remaining, sample = self.indices[self.selectedFold - 1]\n                else:\n                    sample, remaining = self.indices[self.selectedFold - 1]\n\n            sample = self.data[sample]\n            other = self.data[remaining]\n            self.sampled_instances = len(sample)\n            self.remaining_instances = len(other)\n\n        self.Outputs.data_sample.send(sample)\n        self.Outputs.remaining_data.send(other)\n\n    def updateindices(self):\n        self.Error.clear()\n        self.Warning.clear()\n        repl = True\n        data_length = len(self.data)\n        num_classes = len(self.data.domain.class_var.values) \\\n            if self.data.domain.has_discrete_class else 0\n\n        size = None\n        if not data_length:\n            self.Error.no_data()\n        elif self.sampling_type == self.FixedSize:\n            size = self.sampleSizeNumber\n            repl = self.replacement\n        elif self.sampling_type == self.FixedProportion:\n            size = np.ceil(self.sampleSizePercentage / 100 * data_length)\n            repl = False\n        elif self.sampling_type == self.CrossValidation:\n            if data_length < self.number_of_folds:\n                self.Error.too_many_folds()\n        else:\n            assert self.sampling_type == self.Bootstrap\n\n        if not repl and size is not None and (size > data_length):\n            self.Error.sample_larger_than_data()\n        if not repl and data_length <= num_classes and self.stratify:\n            self.Error.not_enough_to_stratify()\n\n        if self.Error.active:\n            self.indices = None\n            return\n\n        # By the above, we can safely assume there is data\n        if self.sampling_type == self.FixedSize and repl and size and \\\n                size > len(self.data):\n            # This should only be possible when using replacement\n            self.Warning.bigger_sample()\n\n        stratified = (self.stratify and\n                      isinstance(self.data, Table) and\n                      self.data.domain.has_discrete_class)\n        try:\n            self.indices = self.sample(data_length, size, stratified)\n        except ValueError as ex:\n            self.Warning.could_not_stratify(str(ex))\n            self.indices = self.sample(data_length, size, stratified=False)\n\n    def sample(self, data_length, size, stratified):\n        rnd = self.RandomSeed if self.use_seed else None\n        if self.sampling_type == self.FixedSize:\n            sampler = SampleRandomN(\n                size, stratified=stratified, replace=self.replacement,\n                random_state=rnd)\n        elif self.sampling_type == self.FixedProportion:\n            sampler = SampleRandomP(\n                self.sampleSizePercentage / 100, stratified=stratified,\n                random_state=rnd)\n        elif self.sampling_type == self.Bootstrap:\n            sampler = SampleBootstrap(data_length, random_state=rnd)\n        else:\n            sampler = SampleFoldIndices(\n                self.number_of_folds, stratified=stratified, random_state=rnd)\n        return sampler(self.data)\n\n    def send_report(self):\n        if self.sampling_type == self.FixedProportion:\n            tpe = f\"Random sample with {self.sampleSizePercentage} % of data\"\n        elif self.sampling_type == self.FixedSize:\n            if self.sampleSizeNumber == 1:\n                tpe = \"Random data instance\"\n            else:\n                tpe = f\"Random sample with {self.sampleSizeNumber} data instances\"\n                if self.replacement:\n                    tpe += \", with replacement\"\n        elif self.sampling_type == self.CrossValidation:\n            tpe = f\"{self.number_of_folds}-fold cross-validation \" \\\n                  f\"without subset #{self.selectedFold}\"\n        elif self.sampling_type == self.Bootstrap:\n            tpe = \"Bootstrap\"\n        else:  # pragma: no cover\n            assert False\n        if self.stratify:\n            tpe += \", stratified (if possible)\"\n        if self.use_seed:\n            tpe += \", deterministic\"\n        items = [(\"Sampling type\", tpe)]\n        if self.sampled_instances is not None:\n            items += [\n                (\"Input\", f\"{len(self.data)} {pl(len(self.data), 'instance')}\"),\n                (\"Sample\", f\"{self.sampled_instances} {pl(self.sampled_instances, 'instance')}\"),\n                (\"Remaining\", f\"{self.remaining_instances} {pl(self.remaining_instances, 'instance')}\"),\n            ]\n        self.report_items(items)\n\n    @classmethod\n    def migrate_settings(cls, settings, version):\n        if not version or version < 2 \\\n                and settings[\"sampling_type\"] == cls.CrossValidation:\n            settings[\"compatibility_mode\"] = True\n\n\nclass SampleFoldIndices(Reprable):\n    def __init__(self, folds=10, stratified=False, random_state=None):\n        \"\"\"Samples data based on a number of folds.\n\n        Args:\n            folds (int): Number of folds\n            stratified (bool): Return stratified indices (if applicable).\n            random_state (Random): An initial state for replicable random\n            behavior\n\n        Returns:\n            tuple-of-arrays: A tuple of array indices one for each fold.\n\n        \"\"\"\n        self.folds = folds\n        self.stratified = stratified\n        self.random_state = random_state\n\n    def __call__(self, table):\n        if self.stratified and table.domain.has_discrete_class:\n            splitter = skl.StratifiedKFold(\n                self.folds, shuffle=True, random_state=self.random_state)\n            splitter.get_n_splits(table.X, table.Y)\n            ind = splitter.split(table.X, table.Y)\n        else:\n            splitter = skl.KFold(\n                self.folds, shuffle=True, random_state=self.random_state)\n            splitter.get_n_splits(table)\n            ind = splitter.split(table)\n        return tuple(ind)\n\n\nclass SampleRandomN(Reprable):\n    def __init__(self, n=0, stratified=False, replace=False,\n                 random_state=None):\n        self.n = n\n        self.stratified = stratified\n        self.replace = replace\n        self.random_state = random_state\n\n    def __call__(self, table):\n        if self.replace:\n            # pylint: disable=no-member\n            rgen = np.random.RandomState(self.random_state)\n            sample = rgen.randint(0, len(table), self.n)\n            o = np.ones(len(table))\n            o[sample] = 0\n            others = np.nonzero(o)[0]\n            return others, sample\n        if self.n == len(table):\n            rgen = np.random.RandomState(self.random_state)\n            sample = np.arange(self.n)\n            rgen.shuffle(sample)\n            return np.array([], dtype=int), sample\n        elif self.stratified and table.domain.has_discrete_class:\n            test_size = max(len(table.domain.class_var.values), self.n)\n            splitter = skl.StratifiedShuffleSplit(\n                n_splits=1, test_size=test_size,\n                train_size=len(table) - test_size,\n                random_state=self.random_state)\n            splitter.get_n_splits(table.X, table.Y)\n            ind = splitter.split(table.X, table.Y)\n        else:\n            splitter = skl.ShuffleSplit(\n                n_splits=1, test_size=self.n, random_state=self.random_state)\n            splitter.get_n_splits(table)\n            ind = splitter.split(table)\n        return next(iter(ind))\n\n\nclass SampleRandomP(Reprable):\n    def __init__(self, p=0, stratified=False, random_state=None):\n        self.p = p\n        self.stratified = stratified\n        self.random_state = random_state\n\n    def __call__(self, table):\n        n = int(math.ceil(len(table) * self.p))\n        return SampleRandomN(n, self.stratified,\n                             random_state=self.random_state)(table)\n\n\nclass SampleBootstrap(Reprable):\n    def __init__(self, size=0, random_state=None):\n        self.size = size\n        self.random_state = random_state\n\n    def __call__(self, table=None):\n        \"\"\"Bootstrap indices\n\n        Args:\n            table: Not used (but part of the signature)\n        Returns:\n            tuple (out_of_sample, sample) indices\n        \"\"\"\n        # pylint: disable=no-member\n        rgen = np.random.RandomState(self.random_state)\n        sample = rgen.randint(0, self.size, self.size)\n        sample.sort()  # not needed for the code below, just for the user\n        insample = np.ones((self.size,), dtype=bool)\n        insample[sample] = False\n        remaining = np.flatnonzero(insample)\n        return remaining, sample\n\n\nif __name__ == \"__main__\":  # pragma: no cover\n    WidgetPreview(OWDataSampler).run(Table(\"iris\"))\n",
            "new_file_content": "import math\n\nfrom AnyQt.QtWidgets import QFormLayout\nfrom AnyQt.QtCore import Qt\n\nimport numpy as np\nimport sklearn.model_selection as skl\n\nfrom Orange.widgets import gui\nfrom Orange.widgets.settings import Setting\nfrom Orange.data import Table\nfrom Orange.data.sql.table import SqlTable\nfrom Orange.widgets.utils.localization import pl\nfrom Orange.widgets.utils.widgetpreview import WidgetPreview\nfrom Orange.widgets.widget import Msg, OWWidget, Input, Output\nfrom Orange.util import Reprable\n\n\nclass OWDataSampler(OWWidget):\n    name = \"Data Sampler\"\n    description = \"Randomly draw a subset of data points \" \\\n                  \"from the input dataset.\"\n    icon = \"icons/DataSampler.svg\"\n    priority = 100\n    category = \"Transform\"\n    keywords = [\"random\"]\n\n    _MAX_SAMPLE_SIZE = 2 ** 31 - 1\n\n    class Inputs:\n        data = Input(\"Data\", Table)\n\n    class Outputs:\n        data_sample = Output(\"Data Sample\", Table, default=True)\n        remaining_data = Output(\"Remaining Data\", Table)\n\n    want_main_area = False\n    resizing_enabled = False\n\n    RandomSeed = 42\n    FixedProportion, FixedSize, CrossValidation, Bootstrap = range(4)\n    SqlTime, SqlProportion = range(2)\n\n    selectedFold: int\n\n    use_seed = Setting(True)\n    replacement = Setting(False)\n    stratify = Setting(False)\n    sql_dl = Setting(False)\n    sampling_type = Setting(FixedProportion)\n    sampleSizeNumber = Setting(1)\n    sampleSizePercentage = Setting(70)\n    sampleSizeSqlTime = Setting(1)\n    sampleSizeSqlPercentage = Setting(0.1)\n    number_of_folds = Setting(10)\n    selectedFold = Setting(1)\n\n    # Older versions of the widget had swapped outputs for cross validation\n    # Migrations set this to True for compability with older workflows\n    compatibility_mode = Setting(False, schema_only=True)\n\n    settings_version = 2\n\n    class Information(OWWidget.Information):\n        compatibility_mode = Msg(\n            \"Compatibility mode\\n\"\n            \"New versions of widget have swapped outputs for cross validation\"\n        )\n\n    class Warning(OWWidget.Warning):\n        could_not_stratify = Msg(\"Stratification failed.\\n{}\")\n        bigger_sample = Msg('Sample is bigger than input.')\n\n    class Error(OWWidget.Error):\n        too_many_folds = Msg(\"Number of subsets exceeds data size.\")\n        sample_larger_than_data = Msg(\"Sample can't be larger than data.\")\n        not_enough_to_stratify = Msg(\"Data is too small to stratify.\")\n        no_data = Msg(\"Dataset is empty.\")\n\n    def __init__(self):\n        super().__init__()\n        if self.compatibility_mode:\n            self.Information.compatibility_mode()\n\n        self.data = None\n        self.indices = None\n        self.sampled_instances = self.remaining_instances = None\n\n        self.sampling_box = gui.vBox(self.controlArea, \"Sampling Type\")\n        sampling = gui.radioButtons(self.sampling_box, self, \"sampling_type\",\n                                    callback=self.sampling_type_changed)\n\n        def set_sampling_type(i):\n            def set_sampling_type_i():\n                self.sampling_type = i\n                self.sampling_type_changed()\n            return set_sampling_type_i\n\n        gui.appendRadioButton(sampling, \"Fixed proportion of data:\")\n        self.sampleSizePercentageSlider = gui.hSlider(\n            gui.indentedBox(sampling), self,\n            \"sampleSizePercentage\",\n            minValue=0, maxValue=100, ticks=10, labelFormat=\"%d %%\",\n            callback=set_sampling_type(self.FixedProportion))\n\n        gui.appendRadioButton(sampling, \"Fixed sample size\")\n        ibox = gui.indentedBox(sampling)\n        self.sampleSizeSpin = gui.spin(\n            ibox, self, \"sampleSizeNumber\", label=\"Instances: \",\n            minv=0, maxv=self._MAX_SAMPLE_SIZE,\n            callback=set_sampling_type(self.FixedSize),\n            controlWidth=90)\n        gui.checkBox(\n            ibox, self, \"replacement\", \"Sample with replacement\",\n            callback=set_sampling_type(self.FixedSize))\n\n        gui.appendRadioButton(sampling, \"Cross validation\")\n        form = QFormLayout(\n            formAlignment=Qt.AlignLeft | Qt.AlignTop,\n            labelAlignment=Qt.AlignLeft,\n            fieldGrowthPolicy=QFormLayout.AllNonFixedFieldsGrow)\n        ibox = gui.indentedBox(sampling, orientation=form)\n        form.addRow(\"Number of subsets:\",\n                    gui.spin(\n                        ibox, self, \"number_of_folds\", 2, 100,\n                        addToLayout=False,\n                        callback=self.number_of_folds_changed))\n        self.selected_fold_spin = gui.spin(\n            ibox, self, \"selectedFold\", 1, self.number_of_folds,\n            addToLayout=False, callback=self.fold_changed)\n        form.addRow(\"Unused subset:\" if not self.compatibility_mode\n                    else \"Selected subset:\", self.selected_fold_spin)\n\n        gui.appendRadioButton(sampling, \"Bootstrap\")\n\n        self.sql_box = gui.vBox(self.controlArea, \"Sampling Type\")\n        sampling = gui.radioButtons(self.sql_box, self, \"sampling_type\",\n                                    callback=self.sampling_type_changed)\n        gui.appendRadioButton(sampling, \"Time:\")\n        ibox = gui.indentedBox(sampling)\n        spin = gui.spin(ibox, self, \"sampleSizeSqlTime\", minv=1, maxv=3600,\n                        callback=set_sampling_type(self.SqlTime))\n        spin.setSuffix(\" sec\")\n        gui.appendRadioButton(sampling, \"Percentage\")\n        ibox = gui.indentedBox(sampling)\n        spin = gui.spin(ibox, self, \"sampleSizeSqlPercentage\", spinType=float,\n                        minv=0.0001, maxv=100, step=0.1, decimals=4,\n                        callback=set_sampling_type(self.SqlProportion))\n        spin.setSuffix(\" %\")\n        self.sql_box.setVisible(False)\n\n        self.options_box = gui.vBox(self.controlArea, \"Options\", addSpaceBefore=False)\n        self.cb_seed = gui.checkBox(\n            self.options_box, self, \"use_seed\",\n            \"Replicable (deterministic) sampling\",\n            callback=self.settings_changed)\n        self.cb_stratify = gui.checkBox(\n            self.options_box, self, \"stratify\",\n            \"Stratify sample (when possible)\", callback=self.settings_changed)\n        self.cb_sql_dl = gui.checkBox(\n            self.options_box, self, \"sql_dl\", \"Download data to local memory\",\n            callback=self.settings_changed)\n        self.cb_sql_dl.setVisible(False)\n\n        gui.button(self.buttonsArea, self, \"Sample Data\",\n                   callback=self.commit)\n\n    def sampling_type_changed(self):\n        self.settings_changed()\n\n    def number_of_folds_changed(self):\n        self.selected_fold_spin.setMaximum(self.number_of_folds)\n        self.sampling_type = self.CrossValidation\n        self.settings_changed()\n\n    def fold_changed(self):\n        # a separate callback - if we decide to cache indices\n        self.sampling_type = self.CrossValidation\n\n    def settings_changed(self):\n        self._update_sample_max_size()\n        self.indices = None\n\n    @Inputs.data\n    def set_data(self, dataset):\n        self.data = dataset\n        if dataset is not None:\n            sql = isinstance(dataset, SqlTable)\n            self.sampling_box.setVisible(not sql)\n            self.sql_box.setVisible(sql)\n            self.cb_seed.setVisible(not sql)\n            self.cb_stratify.setVisible(not sql)\n            self.cb_sql_dl.setVisible(sql)\n\n            if not sql:\n                self._update_sample_max_size()\n                self.updateindices()\n        else:\n            self.indices = None\n            self.clear_messages()\n        self.commit()\n\n    def _update_sample_max_size(self):\n        \"\"\"Limit number of instances to input size unless using replacement.\"\"\"\n        if not self.data or self.replacement:\n            self.sampleSizeSpin.setMaximum(self._MAX_SAMPLE_SIZE)\n        else:\n            self.sampleSizeSpin.setMaximum(len(self.data))\n\n    def commit(self):\n        if self.data is None:\n            sample = other = None\n            self.sampled_instances = self.remaining_instances = None\n        elif isinstance(self.data, SqlTable):\n            other = None\n            if self.sampling_type == self.SqlProportion:\n                sample = self.data.sample_percentage(\n                    self.sampleSizeSqlPercentage, no_cache=True)\n            else:\n                sample = self.data.sample_time(\n                    self.sampleSizeSqlTime, no_cache=True)\n            if self.sql_dl:\n                sample.download_data()\n                sample = Table(sample)\n\n        else:\n            if self.indices is None or not self.use_seed:\n                self.updateindices()\n                if self.indices is None:\n                    return\n            if self.sampling_type in (\n                    self.FixedProportion, self.FixedSize, self.Bootstrap):\n                remaining, sample = self.indices\n            elif self.sampling_type == self.CrossValidation:\n                if self.compatibility_mode:\n                    remaining, sample = self.indices[self.selectedFold - 1]\n                else:\n                    sample, remaining = self.indices[self.selectedFold - 1]\n\n            sample = self.data[sample]\n            other = self.data[remaining]\n            self.sampled_instances = len(sample)\n            self.remaining_instances = len(other)\n\n        self.Outputs.data_sample.send(sample)\n        self.Outputs.remaining_data.send(other)\n\n    def updateindices(self):\n        self.Error.clear()\n        self.Warning.clear()\n        repl = True\n        data_length = len(self.data)\n        num_classes = len(self.data.domain.class_var.values) \\\n            if self.data.domain.has_discrete_class else 0\n\n        size = None\n        if not data_length:\n            self.Error.no_data()\n        elif self.sampling_type == self.FixedSize:\n            size = self.sampleSizeNumber\n            repl = self.replacement\n        elif self.sampling_type == self.FixedProportion:\n            size = np.ceil(self.sampleSizePercentage / 100 * data_length)\n            repl = False\n        elif self.sampling_type == self.CrossValidation:\n            if data_length < self.number_of_folds:\n                self.Error.too_many_folds()\n        else:\n            assert self.sampling_type == self.Bootstrap\n\n        if not repl and size is not None and (size > data_length):\n            self.Error.sample_larger_than_data()\n        if not repl and data_length <= num_classes and self.stratify:\n            self.Error.not_enough_to_stratify()\n\n        if self.Error.active:\n            self.indices = None\n            return\n\n        # By the above, we can safely assume there is data\n        if self.sampling_type == self.FixedSize and repl and size and \\\n                size > len(self.data):\n            # This should only be possible when using replacement\n            self.Warning.bigger_sample()\n\n        stratified = (self.stratify and\n                      isinstance(self.data, Table) and\n                      self.data.domain.has_discrete_class)\n        try:\n            self.indices = self.sample(data_length, size, stratified)\n        except ValueError as ex:\n            self.Warning.could_not_stratify(str(ex))\n            self.indices = self.sample(data_length, size, stratified=False)\n\n    def sample(self, data_length, size, stratified):\n        rnd = self.RandomSeed if self.use_seed else None\n        if self.sampling_type == self.FixedSize:\n            sampler = SampleRandomN(\n                size, stratified=stratified, replace=self.replacement,\n                random_state=rnd)\n        elif self.sampling_type == self.FixedProportion:\n            sampler = SampleRandomP(\n                self.sampleSizePercentage / 100, stratified=stratified,\n                random_state=rnd)\n        elif self.sampling_type == self.Bootstrap:\n            sampler = SampleBootstrap(data_length, random_state=rnd)\n        else:\n            sampler = SampleFoldIndices(\n                self.number_of_folds, stratified=stratified, random_state=rnd)\n        return sampler(self.data)\n\n    def send_report(self):\n        if self.sampling_type == self.FixedProportion:\n            tpe = f\"Random sample with {self.sampleSizePercentage} % of data\"\n        elif self.sampling_type == self.FixedSize:\n            if self.sampleSizeNumber == 1:\n                tpe = \"Random data instance\"\n            else:\n                tpe = f\"Random sample with {self.sampleSizeNumber} data instances\"\n                if self.replacement:\n                    tpe += \", with replacement\"\n        elif self.sampling_type == self.CrossValidation:\n            tpe = f\"{self.number_of_folds}-fold cross-validation \" \\\n                  f\"without subset #{self.selectedFold}\"\n        elif self.sampling_type == self.Bootstrap:\n            tpe = \"Bootstrap\"\n        else:  # pragma: no cover\n            assert False\n        if self.stratify:\n            tpe += \", stratified (if possible)\"\n        if self.use_seed:\n            tpe += \", deterministic\"\n        items = [(\"Sampling type\", tpe)]\n        if self.sampled_instances is not None:\n            items += [\n                (\"Input\", f\"{len(self.data)} {pl(len(self.data), 'instance')}\"),\n                (\"Sample\", f\"{self.sampled_instances} {pl(self.sampled_instances, 'instance')}\"),\n                (\"Remaining\", f\"{self.remaining_instances} {pl(self.remaining_instances, 'instance')}\"),\n            ]\n        self.report_items(items)\n\n    @classmethod\n    def migrate_settings(cls, settings, version):\n        if not version or version < 2 \\\n                and settings[\"sampling_type\"] == cls.CrossValidation:\n            settings[\"compatibility_mode\"] = True\n\n\nclass SampleFoldIndices(Reprable):\n    def __init__(self, folds=10, stratified=False, random_state=None):\n        \"\"\"Samples data based on a number of folds.\n\n        Args:\n            folds (int): Number of folds\n            stratified (bool): Return stratified indices (if applicable).\n            random_state (Random): An initial state for replicable random\n            behavior\n\n        Returns:\n            tuple-of-arrays: A tuple of array indices one for each fold.\n\n        \"\"\"\n        self.folds = folds\n        self.stratified = stratified\n        self.random_state = random_state\n\n    def __call__(self, table):\n        if self.stratified and table.domain.has_discrete_class:\n            splitter = skl.StratifiedKFold(\n                self.folds, shuffle=True, random_state=self.random_state)\n            splitter.get_n_splits(table.X, table.Y)\n            ind = splitter.split(table.X, table.Y)\n        else:\n            splitter = skl.KFold(\n                self.folds, shuffle=True, random_state=self.random_state)\n            splitter.get_n_splits(table)\n            ind = splitter.split(table)\n        return tuple(ind)\n\n\nclass SampleRandomN(Reprable):\n    def __init__(self, n=0, stratified=False, replace=False,\n                 random_state=None):\n        self.n = n\n        self.stratified = stratified\n        self.replace = replace\n        self.random_state = random_state\n\n    def __call__(self, table):\n        if self.replace:\n            # pylint: disable=no-member\n            rgen = np.random.RandomState(self.random_state)\n            sample = rgen.randint(0, len(table), self.n)\n            o = np.ones(len(table))\n            o[sample] = 0\n            others = np.nonzero(o)[0]\n            return others, sample\n        if self.n in (0, len(table)):\n            rgen = np.random.RandomState(self.random_state)\n            shuffled = np.arange(len(table))\n            rgen.shuffle(shuffled)\n            empty = np.array([], dtype=int)\n            if self.n == 0:\n                return shuffled, empty\n            else:\n                return empty, shuffled\n        elif self.stratified and table.domain.has_discrete_class:\n            test_size = max(len(table.domain.class_var.values), self.n)\n            splitter = skl.StratifiedShuffleSplit(\n                n_splits=1, test_size=test_size,\n                train_size=len(table) - test_size,\n                random_state=self.random_state)\n            splitter.get_n_splits(table.X, table.Y)\n            ind = splitter.split(table.X, table.Y)\n        else:\n            splitter = skl.ShuffleSplit(\n                n_splits=1, test_size=self.n, random_state=self.random_state)\n            splitter.get_n_splits(table)\n            ind = splitter.split(table)\n        return next(iter(ind))\n\n\nclass SampleRandomP(Reprable):\n    def __init__(self, p=0, stratified=False, random_state=None):\n        self.p = p\n        self.stratified = stratified\n        self.random_state = random_state\n\n    def __call__(self, table):\n        n = int(math.ceil(len(table) * self.p))\n        return SampleRandomN(n, self.stratified,\n                             random_state=self.random_state)(table)\n\n\nclass SampleBootstrap(Reprable):\n    def __init__(self, size=0, random_state=None):\n        self.size = size\n        self.random_state = random_state\n\n    def __call__(self, table=None):\n        \"\"\"Bootstrap indices\n\n        Args:\n            table: Not used (but part of the signature)\n        Returns:\n            tuple (out_of_sample, sample) indices\n        \"\"\"\n        # pylint: disable=no-member\n        rgen = np.random.RandomState(self.random_state)\n        sample = rgen.randint(0, self.size, self.size)\n        sample.sort()  # not needed for the code below, just for the user\n        insample = np.ones((self.size,), dtype=bool)\n        insample[sample] = False\n        remaining = np.flatnonzero(insample)\n        return remaining, sample\n\n\nif __name__ == \"__main__\":  # pragma: no cover\n    WidgetPreview(OWDataSampler).run(Table(\"iris\"))\n",
            "header": {
                "file": {
                    "path": "Orange/widgets/data/owdatasampler.py"
                },
                "misc_line": null
            },
            "index_line": {
                "old_commit_hash": "15cbf3f53",
                "new_commit_hash": "6f14556ce",
                "mode": "100644"
            },
            "is_binary_file": false,
            "binary_line": null,
            "minus_file": {
                "path": "a/Orange/widgets/data/owdatasampler.py"
            },
            "plus_file": {
                "path": "b/Orange/widgets/data/owdatasampler.py"
            },
            "hunks": [
                {
                    "descriptor": {
                        "old_range": {
                            "start": 107,
                            "length": 7
                        },
                        "new_range": {
                            "start": 107,
                            "length": 7
                        },
                        "section": "class OWDataSampler(OWWidget):"
                    },
                    "line_group": {
                        "all_lines": [
                            {
                                "content": "        ibox = gui.indentedBox(sampling)",
                                "type": "context"
                            },
                            {
                                "content": "        self.sampleSizeSpin = gui.spin(",
                                "type": "context"
                            },
                            {
                                "content": "            ibox, self, \"sampleSizeNumber\", label=\"Instances: \",",
                                "type": "context"
                            },
                            {
                                "content": "            minv=1, maxv=self._MAX_SAMPLE_SIZE,",
                                "type": "deleted"
                            },
                            {
                                "content": "            minv=0, maxv=self._MAX_SAMPLE_SIZE,",
                                "type": "added"
                            },
                            {
                                "content": "            callback=set_sampling_type(self.FixedSize),",
                                "type": "context"
                            },
                            {
                                "content": "            controlWidth=90)",
                                "type": "context"
                            },
                            {
                                "content": "        gui.checkBox(",
                                "type": "context"
                            }
                        ]
                    },
                    "modified_entities": [
                        {
                            "file_name": "Orange/widgets/data/owdatasampler.py",
                            "type": "method",
                            "name": "OWDataSampler.__init__",
                            "content": "class OWDataSampler(OWWidget):\n    name = \"Data Sampler\"\n    description = \"Randomly draw a subset of data points \" \\\n                  \"from the input dataset.\"\n    icon = \"icons/DataSampler.svg\"\n    priority = 100\n    category = \"Transform\"\n    keywords = [\"random\"]\n\n    _MAX_SAMPLE_SIZE = 2 ** 31 - 1\n\n    class Inputs:\n        data = Input(\"Data\", Table)\n\n    class Outputs:\n        data_sample = Output(\"Data Sample\", Table, default=True)\n        remaining_data = Output(\"Remaining Data\", Table)\n\n    want_main_area = False\n    resizing_enabled = False\n\n    RandomSeed = 42\n    FixedProportion, FixedSize, CrossValidation, Bootstrap = range(4)\n    SqlTime, SqlProportion = range(2)\n\n    selectedFold: int\n\n    use_seed = Setting(True)\n    replacement = Setting(False)\n    stratify = Setting(False)\n    sql_dl = Setting(False)\n    sampling_type = Setting(FixedProportion)\n    sampleSizeNumber = Setting(1)\n    sampleSizePercentage = Setting(70)\n    sampleSizeSqlTime = Setting(1)\n    sampleSizeSqlPercentage = Setting(0.1)\n    number_of_folds = Setting(10)\n    selectedFold = Setting(1)\n\n    # Older versions of the widget had swapped outputs for cross validation\n    # Migrations set this to True for compability with older workflows\n    compatibility_mode = Setting(False, schema_only=True)\n\n    settings_version = 2\n\n    class Information(OWWidget.Information):\n        compatibility_mode = Msg(\n            \"Compatibility mode\\n\"\n            \"New versions of widget have swapped outputs for cross validation\"\n        )\n\n    class Warning(OWWidget.Warning):\n        could_not_stratify = Msg(\"Stratification failed.\\n{}\")\n        bigger_sample = Msg('Sample is bigger than input.')\n\n    class Error(OWWidget.Error):\n        too_many_folds = Msg(\"Number of subsets exceeds data size.\")\n        sample_larger_than_data = Msg(\"Sample can't be larger than data.\")\n        not_enough_to_stratify = Msg(\"Data is too small to stratify.\")\n        no_data = Msg(\"Dataset is empty.\")\n\n    def __init__(self):\n        super().__init__()\n        if self.compatibility_mode:\n            self.Information.compatibility_mode()\n\n        self.data = None\n        self.indices = None\n        self.sampled_instances = self.remaining_instances = None\n\n        self.sampling_box = gui.vBox(self.controlArea, \"Sampling Type\")\n        sampling = gui.radioButtons(self.sampling_box, self, \"sampling_type\",\n                                    callback=self.sampling_type_changed)\n\n        def set_sampling_type(i):\n            def set_sampling_type_i():\n                self.sampling_type = i\n                self.sampling_type_changed()\n            return set_sampling_type_i\n\n        gui.appendRadioButton(sampling, \"Fixed proportion of data:\")\n        self.sampleSizePercentageSlider = gui.hSlider(\n            gui.indentedBox(sampling), self,\n            \"sampleSizePercentage\",\n            minValue=0, maxValue=100, ticks=10, labelFormat=\"%d %%\",\n            callback=set_sampling_type(self.FixedProportion))\n\n        gui.appendRadioButton(sampling, \"Fixed sample size\")\n        ibox = gui.indentedBox(sampling)\n        self.sampleSizeSpin = gui.spin(\n            ibox, self, \"sampleSizeNumber\", label=\"Instances: \",\n            minv=1, maxv=self._MAX_SAMPLE_SIZE,\n            callback=set_sampling_type(self.FixedSize),\n            controlWidth=90)\n        gui.checkBox(\n            ibox, self, \"replacement\", \"Sample with replacement\",\n            callback=set_sampling_type(self.FixedSize))\n\n        gui.appendRadioButton(sampling, \"Cross validation\")\n        form = QFormLayout(\n            formAlignment=Qt.AlignLeft | Qt.AlignTop,\n            labelAlignment=Qt.AlignLeft,\n            fieldGrowthPolicy=QFormLayout.AllNonFixedFieldsGrow)\n        ibox = gui.indentedBox(sampling, orientation=form)\n        form.addRow(\"Number of subsets:\",\n                    gui.spin(\n                        ibox, self, \"number_of_folds\", 2, 100,\n                        addToLayout=False,\n                        callback=self.number_of_folds_changed))\n        self.selected_fold_spin = gui.spin(\n            ibox, self, \"selectedFold\", 1, self.number_of_folds,\n            addToLayout=False, callback=self.fold_changed)\n        form.addRow(\"Unused subset:\" if not self.compatibility_mode\n                    else \"Selected subset:\", self.selected_fold_spin)\n\n        gui.appendRadioButton(sampling, \"Bootstrap\")\n\n        self.sql_box = gui.vBox(self.controlArea, \"Sampling Type\")\n        sampling = gui.radioButtons(self.sql_box, self, \"sampling_type\",\n                                    callback=self.sampling_type_changed)\n        gui.appendRadioButton(sampling, \"Time:\")\n        ibox = gui.indentedBox(sampling)\n        spin = gui.spin(ibox, self, \"sampleSizeSqlTime\", minv=1, maxv=3600,\n                        callback=set_sampling_type(self.SqlTime))\n        spin.setSuffix(\" sec\")\n        gui.appendRadioButton(sampling, \"Percentage\")\n        ibox = gui.indentedBox(sampling)\n        spin = gui.spin(ibox, self, \"sampleSizeSqlPercentage\", spinType=float,\n                        minv=0.0001, maxv=100, step=0.1, decimals=4,\n                        callback=set_sampling_type(self.SqlProportion))\n        spin.setSuffix(\" %\")\n        self.sql_box.setVisible(False)\n\n        self.options_box = gui.vBox(self.controlArea, \"Options\", addSpaceBefore=False)\n        self.cb_seed = gui.checkBox(\n            self.options_box, self, \"use_seed\",\n            \"Replicable (deterministic) sampling\",\n            callback=self.settings_changed)\n        self.cb_stratify = gui.checkBox(\n            self.options_box, self, \"stratify\",\n            \"Stratify sample (when possible)\", callback=self.settings_changed)\n        self.cb_sql_dl = gui.checkBox(\n            self.options_box, self, \"sql_dl\", \"Download data to local memory\",\n            callback=self.settings_changed)\n        self.cb_sql_dl.setVisible(False)\n\n        gui.button(self.buttonsArea, self, \"Sample Data\",\n                   callback=self.commit)\n\n    def sampling_type_changed(self):\n        self.settings_changed()\n\n    def number_of_folds_changed(self):\n        self.selected_fold_spin.setMaximum(self.number_of_folds)\n        self.sampling_type = self.CrossValidation\n        self.settings_changed()\n\n    def fold_changed(self):\n        # a separate callback - if we decide to cache indices\n        self.sampling_type = self.CrossValidation\n\n    def settings_changed(self):\n        self._update_sample_max_size()\n        self.indices = None\n\n    @Inputs.data\n    def set_data(self, dataset):\n        self.data = dataset\n        if dataset is not None:\n            sql = isinstance(dataset, SqlTable)\n            self.sampling_box.setVisible(not sql)\n            self.sql_box.setVisible(sql)\n            self.cb_seed.setVisible(not sql)\n            self.cb_stratify.setVisible(not sql)\n            self.cb_sql_dl.setVisible(sql)\n\n            if not sql:\n                self._update_sample_max_size()\n                self.updateindices()\n        else:\n            self.indices = None\n            self.clear_messages()\n        self.commit()\n\n    def _update_sample_max_size(self):\n        \"\"\"Limit number of instances to input size unless using replacement.\"\"\"\n        if not self.data or self.replacement:\n            self.sampleSizeSpin.setMaximum(self._MAX_SAMPLE_SIZE)\n        else:\n            self.sampleSizeSpin.setMaximum(len(self.data))\n\n    def commit(self):\n        if self.data is None:\n            sample = other = None\n            self.sampled_instances = self.remaining_instances = None\n        elif isinstance(self.data, SqlTable):\n            other = None\n            if self.sampling_type == self.SqlProportion:\n                sample = self.data.sample_percentage(\n                    self.sampleSizeSqlPercentage, no_cache=True)\n            else:\n                sample = self.data.sample_time(\n                    self.sampleSizeSqlTime, no_cache=True)\n            if self.sql_dl:\n                sample.download_data()\n                sample = Table(sample)\n\n        else:\n            if self.indices is None or not self.use_seed:\n                self.updateindices()\n                if self.indices is None:\n                    return\n            if self.sampling_type in (\n                    self.FixedProportion, self.FixedSize, self.Bootstrap):\n                remaining, sample = self.indices\n            elif self.sampling_type == self.CrossValidation:\n                if self.compatibility_mode:\n                    remaining, sample = self.indices[self.selectedFold - 1]\n                else:\n                    sample, remaining = self.indices[self.selectedFold - 1]\n\n            sample = self.data[sample]\n            other = self.data[remaining]\n            self.sampled_instances = len(sample)\n            self.remaining_instances = len(other)\n\n        self.Outputs.data_sample.send(sample)\n        self.Outputs.remaining_data.send(other)\n\n    def updateindices(self):\n        self.Error.clear()\n        self.Warning.clear()\n        repl = True\n        data_length = len(self.data)\n        num_classes = len(self.data.domain.class_var.values) \\\n            if self.data.domain.has_discrete_class else 0\n\n        size = None\n        if not data_length:\n            self.Error.no_data()\n        elif self.sampling_type == self.FixedSize:\n            size = self.sampleSizeNumber\n            repl = self.replacement\n        elif self.sampling_type == self.FixedProportion:\n            size = np.ceil(self.sampleSizePercentage / 100 * data_length)\n            repl = False\n        elif self.sampling_type == self.CrossValidation:\n            if data_length < self.number_of_folds:\n                self.Error.too_many_folds()\n        else:\n            assert self.sampling_type == self.Bootstrap\n\n        if not repl and size is not None and (size > data_length):\n            self.Error.sample_larger_than_data()\n        if not repl and data_length <= num_classes and self.stratify:\n            self.Error.not_enough_to_stratify()\n\n        if self.Error.active:\n            self.indices = None\n            return\n\n        # By the above, we can safely assume there is data\n        if self.sampling_type == self.FixedSize and repl and size and \\\n                size > len(self.data):\n            # This should only be possible when using replacement\n            self.Warning.bigger_sample()\n\n        stratified = (self.stratify and\n                      isinstance(self.data, Table) and\n                      self.data.domain.has_discrete_class)\n        try:\n            self.indices = self.sample(data_length, size, stratified)\n        except ValueError as ex:\n            self.Warning.could_not_stratify(str(ex))\n            self.indices = self.sample(data_length, size, stratified=False)\n\n    def sample(self, data_length, size, stratified):\n        rnd = self.RandomSeed if self.use_seed else None\n        if self.sampling_type == self.FixedSize:\n            sampler = SampleRandomN(\n                size, stratified=stratified, replace=self.replacement,\n                random_state=rnd)\n        elif self.sampling_type == self.FixedProportion:\n            sampler = SampleRandomP(\n                self.sampleSizePercentage / 100, stratified=stratified,\n                random_state=rnd)\n        elif self.sampling_type == self.Bootstrap:\n            sampler = SampleBootstrap(data_length, random_state=rnd)\n        else:\n            sampler = SampleFoldIndices(\n                self.number_of_folds, stratified=stratified, random_state=rnd)\n        return sampler(self.data)\n\n    def send_report(self):\n        if self.sampling_type == self.FixedProportion:\n            tpe = f\"Random sample with {self.sampleSizePercentage} % of data\"\n        elif self.sampling_type == self.FixedSize:\n            if self.sampleSizeNumber == 1:\n                tpe = \"Random data instance\"\n            else:\n                tpe = f\"Random sample with {self.sampleSizeNumber} data instances\"\n                if self.replacement:\n                    tpe += \", with replacement\"\n        elif self.sampling_type == self.CrossValidation:\n            tpe = f\"{self.number_of_folds}-fold cross-validation \" \\\n                  f\"without subset #{self.selectedFold}\"\n        elif self.sampling_type == self.Bootstrap:\n            tpe = \"Bootstrap\"\n        else:  # pragma: no cover\n            assert False\n        if self.stratify:\n            tpe += \", stratified (if possible)\"\n        if self.use_seed:\n            tpe += \", deterministic\"\n        items = [(\"Sampling type\", tpe)]\n        if self.sampled_instances is not None:\n            items += [\n                (\"Input\", f\"{len(self.data)} {pl(len(self.data), 'instance')}\"),\n                (\"Sample\", f\"{self.sampled_instances} {pl(self.sampled_instances, 'instance')}\"),\n                (\"Remaining\", f\"{self.remaining_instances} {pl(self.remaining_instances, 'instance')}\"),\n            ]\n        self.report_items(items)\n\n    @classmethod\n    def migrate_settings(cls, settings, version):\n        if not version or version < 2 \\\n                and settings[\"sampling_type\"] == cls.CrossValidation:\n            settings[\"compatibility_mode\"] = True",
                            "ast_type_str": "ClassDef",
                            "start_lineno": 80,
                            "end_lineno": 166,
                            "parent": {
                                "file_name": "Orange/widgets/data/owdatasampler.py",
                                "type": "class",
                                "name": "OWDataSampler",
                                "content": "class OWDataSampler(OWWidget):\n    name = \"Data Sampler\"\n    description = \"Randomly draw a subset of data points \" \\\n                  \"from the input dataset.\"\n    icon = \"icons/DataSampler.svg\"\n    priority = 100\n    category = \"Transform\"\n    keywords = [\"random\"]\n\n    _MAX_SAMPLE_SIZE = 2 ** 31 - 1\n\n    class Inputs:\n        data = Input(\"Data\", Table)\n\n    class Outputs:\n        data_sample = Output(\"Data Sample\", Table, default=True)\n        remaining_data = Output(\"Remaining Data\", Table)\n\n    want_main_area = False\n    resizing_enabled = False\n\n    RandomSeed = 42\n    FixedProportion, FixedSize, CrossValidation, Bootstrap = range(4)\n    SqlTime, SqlProportion = range(2)\n\n    selectedFold: int\n\n    use_seed = Setting(True)\n    replacement = Setting(False)\n    stratify = Setting(False)\n    sql_dl = Setting(False)\n    sampling_type = Setting(FixedProportion)\n    sampleSizeNumber = Setting(1)\n    sampleSizePercentage = Setting(70)\n    sampleSizeSqlTime = Setting(1)\n    sampleSizeSqlPercentage = Setting(0.1)\n    number_of_folds = Setting(10)\n    selectedFold = Setting(1)\n\n    # Older versions of the widget had swapped outputs for cross validation\n    # Migrations set this to True for compability with older workflows\n    compatibility_mode = Setting(False, schema_only=True)\n\n    settings_version = 2\n\n    class Information(OWWidget.Information):\n        compatibility_mode = Msg(\n            \"Compatibility mode\\n\"\n            \"New versions of widget have swapped outputs for cross validation\"\n        )\n\n    class Warning(OWWidget.Warning):\n        could_not_stratify = Msg(\"Stratification failed.\\n{}\")\n        bigger_sample = Msg('Sample is bigger than input.')\n\n    class Error(OWWidget.Error):\n        too_many_folds = Msg(\"Number of subsets exceeds data size.\")\n        sample_larger_than_data = Msg(\"Sample can't be larger than data.\")\n        not_enough_to_stratify = Msg(\"Data is too small to stratify.\")\n        no_data = Msg(\"Dataset is empty.\")\n\n    def __init__(self):\n        super().__init__()\n        if self.compatibility_mode:\n            self.Information.compatibility_mode()\n\n        self.data = None\n        self.indices = None\n        self.sampled_instances = self.remaining_instances = None\n\n        self.sampling_box = gui.vBox(self.controlArea, \"Sampling Type\")\n        sampling = gui.radioButtons(self.sampling_box, self, \"sampling_type\",\n                                    callback=self.sampling_type_changed)\n\n        def set_sampling_type(i):\n            def set_sampling_type_i():\n                self.sampling_type = i\n                self.sampling_type_changed()\n            return set_sampling_type_i\n\n        gui.appendRadioButton(sampling, \"Fixed proportion of data:\")\n        self.sampleSizePercentageSlider = gui.hSlider(\n            gui.indentedBox(sampling), self,\n            \"sampleSizePercentage\",\n            minValue=0, maxValue=100, ticks=10, labelFormat=\"%d %%\",\n            callback=set_sampling_type(self.FixedProportion))\n\n        gui.appendRadioButton(sampling, \"Fixed sample size\")\n        ibox = gui.indentedBox(sampling)\n        self.sampleSizeSpin = gui.spin(\n            ibox, self, \"sampleSizeNumber\", label=\"Instances: \",\n            minv=1, maxv=self._MAX_SAMPLE_SIZE,\n            callback=set_sampling_type(self.FixedSize),\n            controlWidth=90)\n        gui.checkBox(\n            ibox, self, \"replacement\", \"Sample with replacement\",\n            callback=set_sampling_type(self.FixedSize))\n\n        gui.appendRadioButton(sampling, \"Cross validation\")\n        form = QFormLayout(\n            formAlignment=Qt.AlignLeft | Qt.AlignTop,\n            labelAlignment=Qt.AlignLeft,\n            fieldGrowthPolicy=QFormLayout.AllNonFixedFieldsGrow)\n        ibox = gui.indentedBox(sampling, orientation=form)\n        form.addRow(\"Number of subsets:\",\n                    gui.spin(\n                        ibox, self, \"number_of_folds\", 2, 100,\n                        addToLayout=False,\n                        callback=self.number_of_folds_changed))\n        self.selected_fold_spin = gui.spin(\n            ibox, self, \"selectedFold\", 1, self.number_of_folds,\n            addToLayout=False, callback=self.fold_changed)\n        form.addRow(\"Unused subset:\" if not self.compatibility_mode\n                    else \"Selected subset:\", self.selected_fold_spin)\n\n        gui.appendRadioButton(sampling, \"Bootstrap\")\n\n        self.sql_box = gui.vBox(self.controlArea, \"Sampling Type\")\n        sampling = gui.radioButtons(self.sql_box, self, \"sampling_type\",\n                                    callback=self.sampling_type_changed)\n        gui.appendRadioButton(sampling, \"Time:\")\n        ibox = gui.indentedBox(sampling)\n        spin = gui.spin(ibox, self, \"sampleSizeSqlTime\", minv=1, maxv=3600,\n                        callback=set_sampling_type(self.SqlTime))\n        spin.setSuffix(\" sec\")\n        gui.appendRadioButton(sampling, \"Percentage\")\n        ibox = gui.indentedBox(sampling)\n        spin = gui.spin(ibox, self, \"sampleSizeSqlPercentage\", spinType=float,\n                        minv=0.0001, maxv=100, step=0.1, decimals=4,\n                        callback=set_sampling_type(self.SqlProportion))\n        spin.setSuffix(\" %\")\n        self.sql_box.setVisible(False)\n\n        self.options_box = gui.vBox(self.controlArea, \"Options\", addSpaceBefore=False)\n        self.cb_seed = gui.checkBox(\n            self.options_box, self, \"use_seed\",\n            \"Replicable (deterministic) sampling\",\n            callback=self.settings_changed)\n        self.cb_stratify = gui.checkBox(\n            self.options_box, self, \"stratify\",\n            \"Stratify sample (when possible)\", callback=self.settings_changed)\n        self.cb_sql_dl = gui.checkBox(\n            self.options_box, self, \"sql_dl\", \"Download data to local memory\",\n            callback=self.settings_changed)\n        self.cb_sql_dl.setVisible(False)\n\n        gui.button(self.buttonsArea, self, \"Sample Data\",\n                   callback=self.commit)\n\n    def sampling_type_changed(self):\n        self.settings_changed()\n\n    def number_of_folds_changed(self):\n        self.selected_fold_spin.setMaximum(self.number_of_folds)\n        self.sampling_type = self.CrossValidation\n        self.settings_changed()\n\n    def fold_changed(self):\n        # a separate callback - if we decide to cache indices\n        self.sampling_type = self.CrossValidation\n\n    def settings_changed(self):\n        self._update_sample_max_size()\n        self.indices = None\n\n    @Inputs.data\n    def set_data(self, dataset):\n        self.data = dataset\n        if dataset is not None:\n            sql = isinstance(dataset, SqlTable)\n            self.sampling_box.setVisible(not sql)\n            self.sql_box.setVisible(sql)\n            self.cb_seed.setVisible(not sql)\n            self.cb_stratify.setVisible(not sql)\n            self.cb_sql_dl.setVisible(sql)\n\n            if not sql:\n                self._update_sample_max_size()\n                self.updateindices()\n        else:\n            self.indices = None\n            self.clear_messages()\n        self.commit()\n\n    def _update_sample_max_size(self):\n        \"\"\"Limit number of instances to input size unless using replacement.\"\"\"\n        if not self.data or self.replacement:\n            self.sampleSizeSpin.setMaximum(self._MAX_SAMPLE_SIZE)\n        else:\n            self.sampleSizeSpin.setMaximum(len(self.data))\n\n    def commit(self):\n        if self.data is None:\n            sample = other = None\n            self.sampled_instances = self.remaining_instances = None\n        elif isinstance(self.data, SqlTable):\n            other = None\n            if self.sampling_type == self.SqlProportion:\n                sample = self.data.sample_percentage(\n                    self.sampleSizeSqlPercentage, no_cache=True)\n            else:\n                sample = self.data.sample_time(\n                    self.sampleSizeSqlTime, no_cache=True)\n            if self.sql_dl:\n                sample.download_data()\n                sample = Table(sample)\n\n        else:\n            if self.indices is None or not self.use_seed:\n                self.updateindices()\n                if self.indices is None:\n                    return\n            if self.sampling_type in (\n                    self.FixedProportion, self.FixedSize, self.Bootstrap):\n                remaining, sample = self.indices\n            elif self.sampling_type == self.CrossValidation:\n                if self.compatibility_mode:\n                    remaining, sample = self.indices[self.selectedFold - 1]\n                else:\n                    sample, remaining = self.indices[self.selectedFold - 1]\n\n            sample = self.data[sample]\n            other = self.data[remaining]\n            self.sampled_instances = len(sample)\n            self.remaining_instances = len(other)\n\n        self.Outputs.data_sample.send(sample)\n        self.Outputs.remaining_data.send(other)\n\n    def updateindices(self):\n        self.Error.clear()\n        self.Warning.clear()\n        repl = True\n        data_length = len(self.data)\n        num_classes = len(self.data.domain.class_var.values) \\\n            if self.data.domain.has_discrete_class else 0\n\n        size = None\n        if not data_length:\n            self.Error.no_data()\n        elif self.sampling_type == self.FixedSize:\n            size = self.sampleSizeNumber\n            repl = self.replacement\n        elif self.sampling_type == self.FixedProportion:\n            size = np.ceil(self.sampleSizePercentage / 100 * data_length)\n            repl = False\n        elif self.sampling_type == self.CrossValidation:\n            if data_length < self.number_of_folds:\n                self.Error.too_many_folds()\n        else:\n            assert self.sampling_type == self.Bootstrap\n\n        if not repl and size is not None and (size > data_length):\n            self.Error.sample_larger_than_data()\n        if not repl and data_length <= num_classes and self.stratify:\n            self.Error.not_enough_to_stratify()\n\n        if self.Error.active:\n            self.indices = None\n            return\n\n        # By the above, we can safely assume there is data\n        if self.sampling_type == self.FixedSize and repl and size and \\\n                size > len(self.data):\n            # This should only be possible when using replacement\n            self.Warning.bigger_sample()\n\n        stratified = (self.stratify and\n                      isinstance(self.data, Table) and\n                      self.data.domain.has_discrete_class)\n        try:\n            self.indices = self.sample(data_length, size, stratified)\n        except ValueError as ex:\n            self.Warning.could_not_stratify(str(ex))\n            self.indices = self.sample(data_length, size, stratified=False)\n\n    def sample(self, data_length, size, stratified):\n        rnd = self.RandomSeed if self.use_seed else None\n        if self.sampling_type == self.FixedSize:\n            sampler = SampleRandomN(\n                size, stratified=stratified, replace=self.replacement,\n                random_state=rnd)\n        elif self.sampling_type == self.FixedProportion:\n            sampler = SampleRandomP(\n                self.sampleSizePercentage / 100, stratified=stratified,\n                random_state=rnd)\n        elif self.sampling_type == self.Bootstrap:\n            sampler = SampleBootstrap(data_length, random_state=rnd)\n        else:\n            sampler = SampleFoldIndices(\n                self.number_of_folds, stratified=stratified, random_state=rnd)\n        return sampler(self.data)\n\n    def send_report(self):\n        if self.sampling_type == self.FixedProportion:\n            tpe = f\"Random sample with {self.sampleSizePercentage} % of data\"\n        elif self.sampling_type == self.FixedSize:\n            if self.sampleSizeNumber == 1:\n                tpe = \"Random data instance\"\n            else:\n                tpe = f\"Random sample with {self.sampleSizeNumber} data instances\"\n                if self.replacement:\n                    tpe += \", with replacement\"\n        elif self.sampling_type == self.CrossValidation:\n            tpe = f\"{self.number_of_folds}-fold cross-validation \" \\\n                  f\"without subset #{self.selectedFold}\"\n        elif self.sampling_type == self.Bootstrap:\n            tpe = \"Bootstrap\"\n        else:  # pragma: no cover\n            assert False\n        if self.stratify:\n            tpe += \", stratified (if possible)\"\n        if self.use_seed:\n            tpe += \", deterministic\"\n        items = [(\"Sampling type\", tpe)]\n        if self.sampled_instances is not None:\n            items += [\n                (\"Input\", f\"{len(self.data)} {pl(len(self.data), 'instance')}\"),\n                (\"Sample\", f\"{self.sampled_instances} {pl(self.sampled_instances, 'instance')}\"),\n                (\"Remaining\", f\"{self.remaining_instances} {pl(self.remaining_instances, 'instance')}\"),\n            ]\n        self.report_items(items)\n\n    @classmethod\n    def migrate_settings(cls, settings, version):\n        if not version or version < 2 \\\n                and settings[\"sampling_type\"] == cls.CrossValidation:\n            settings[\"compatibility_mode\"] = True",
                                "ast_type_str": "ClassDef",
                                "start_lineno": 19,
                                "end_lineno": 346,
                                "parent": null
                            }
                        },
                        {
                            "file_name": "Orange/widgets/data/owdatasampler.py",
                            "type": "class",
                            "name": "OWDataSampler",
                            "content": "class OWDataSampler(OWWidget):\n    name = \"Data Sampler\"\n    description = \"Randomly draw a subset of data points \" \\\n                  \"from the input dataset.\"\n    icon = \"icons/DataSampler.svg\"\n    priority = 100\n    category = \"Transform\"\n    keywords = [\"random\"]\n\n    _MAX_SAMPLE_SIZE = 2 ** 31 - 1\n\n    class Inputs:\n        data = Input(\"Data\", Table)\n\n    class Outputs:\n        data_sample = Output(\"Data Sample\", Table, default=True)\n        remaining_data = Output(\"Remaining Data\", Table)\n\n    want_main_area = False\n    resizing_enabled = False\n\n    RandomSeed = 42\n    FixedProportion, FixedSize, CrossValidation, Bootstrap = range(4)\n    SqlTime, SqlProportion = range(2)\n\n    selectedFold: int\n\n    use_seed = Setting(True)\n    replacement = Setting(False)\n    stratify = Setting(False)\n    sql_dl = Setting(False)\n    sampling_type = Setting(FixedProportion)\n    sampleSizeNumber = Setting(1)\n    sampleSizePercentage = Setting(70)\n    sampleSizeSqlTime = Setting(1)\n    sampleSizeSqlPercentage = Setting(0.1)\n    number_of_folds = Setting(10)\n    selectedFold = Setting(1)\n\n    # Older versions of the widget had swapped outputs for cross validation\n    # Migrations set this to True for compability with older workflows\n    compatibility_mode = Setting(False, schema_only=True)\n\n    settings_version = 2\n\n    class Information(OWWidget.Information):\n        compatibility_mode = Msg(\n            \"Compatibility mode\\n\"\n            \"New versions of widget have swapped outputs for cross validation\"\n        )\n\n    class Warning(OWWidget.Warning):\n        could_not_stratify = Msg(\"Stratification failed.\\n{}\")\n        bigger_sample = Msg('Sample is bigger than input.')\n\n    class Error(OWWidget.Error):\n        too_many_folds = Msg(\"Number of subsets exceeds data size.\")\n        sample_larger_than_data = Msg(\"Sample can't be larger than data.\")\n        not_enough_to_stratify = Msg(\"Data is too small to stratify.\")\n        no_data = Msg(\"Dataset is empty.\")\n\n    def __init__(self):\n        super().__init__()\n        if self.compatibility_mode:\n            self.Information.compatibility_mode()\n\n        self.data = None\n        self.indices = None\n        self.sampled_instances = self.remaining_instances = None\n\n        self.sampling_box = gui.vBox(self.controlArea, \"Sampling Type\")\n        sampling = gui.radioButtons(self.sampling_box, self, \"sampling_type\",\n                                    callback=self.sampling_type_changed)\n\n        def set_sampling_type(i):\n            def set_sampling_type_i():\n                self.sampling_type = i\n                self.sampling_type_changed()\n            return set_sampling_type_i\n\n        gui.appendRadioButton(sampling, \"Fixed proportion of data:\")\n        self.sampleSizePercentageSlider = gui.hSlider(\n            gui.indentedBox(sampling), self,\n            \"sampleSizePercentage\",\n            minValue=0, maxValue=100, ticks=10, labelFormat=\"%d %%\",\n            callback=set_sampling_type(self.FixedProportion))\n\n        gui.appendRadioButton(sampling, \"Fixed sample size\")\n        ibox = gui.indentedBox(sampling)\n        self.sampleSizeSpin = gui.spin(\n            ibox, self, \"sampleSizeNumber\", label=\"Instances: \",\n            minv=1, maxv=self._MAX_SAMPLE_SIZE,\n            callback=set_sampling_type(self.FixedSize),\n            controlWidth=90)\n        gui.checkBox(\n            ibox, self, \"replacement\", \"Sample with replacement\",\n            callback=set_sampling_type(self.FixedSize))\n\n        gui.appendRadioButton(sampling, \"Cross validation\")\n        form = QFormLayout(\n            formAlignment=Qt.AlignLeft | Qt.AlignTop,\n            labelAlignment=Qt.AlignLeft,\n            fieldGrowthPolicy=QFormLayout.AllNonFixedFieldsGrow)\n        ibox = gui.indentedBox(sampling, orientation=form)\n        form.addRow(\"Number of subsets:\",\n                    gui.spin(\n                        ibox, self, \"number_of_folds\", 2, 100,\n                        addToLayout=False,\n                        callback=self.number_of_folds_changed))\n        self.selected_fold_spin = gui.spin(\n            ibox, self, \"selectedFold\", 1, self.number_of_folds,\n            addToLayout=False, callback=self.fold_changed)\n        form.addRow(\"Unused subset:\" if not self.compatibility_mode\n                    else \"Selected subset:\", self.selected_fold_spin)\n\n        gui.appendRadioButton(sampling, \"Bootstrap\")\n\n        self.sql_box = gui.vBox(self.controlArea, \"Sampling Type\")\n        sampling = gui.radioButtons(self.sql_box, self, \"sampling_type\",\n                                    callback=self.sampling_type_changed)\n        gui.appendRadioButton(sampling, \"Time:\")\n        ibox = gui.indentedBox(sampling)\n        spin = gui.spin(ibox, self, \"sampleSizeSqlTime\", minv=1, maxv=3600,\n                        callback=set_sampling_type(self.SqlTime))\n        spin.setSuffix(\" sec\")\n        gui.appendRadioButton(sampling, \"Percentage\")\n        ibox = gui.indentedBox(sampling)\n        spin = gui.spin(ibox, self, \"sampleSizeSqlPercentage\", spinType=float,\n                        minv=0.0001, maxv=100, step=0.1, decimals=4,\n                        callback=set_sampling_type(self.SqlProportion))\n        spin.setSuffix(\" %\")\n        self.sql_box.setVisible(False)\n\n        self.options_box = gui.vBox(self.controlArea, \"Options\", addSpaceBefore=False)\n        self.cb_seed = gui.checkBox(\n            self.options_box, self, \"use_seed\",\n            \"Replicable (deterministic) sampling\",\n            callback=self.settings_changed)\n        self.cb_stratify = gui.checkBox(\n            self.options_box, self, \"stratify\",\n            \"Stratify sample (when possible)\", callback=self.settings_changed)\n        self.cb_sql_dl = gui.checkBox(\n            self.options_box, self, \"sql_dl\", \"Download data to local memory\",\n            callback=self.settings_changed)\n        self.cb_sql_dl.setVisible(False)\n\n        gui.button(self.buttonsArea, self, \"Sample Data\",\n                   callback=self.commit)\n\n    def sampling_type_changed(self):\n        self.settings_changed()\n\n    def number_of_folds_changed(self):\n        self.selected_fold_spin.setMaximum(self.number_of_folds)\n        self.sampling_type = self.CrossValidation\n        self.settings_changed()\n\n    def fold_changed(self):\n        # a separate callback - if we decide to cache indices\n        self.sampling_type = self.CrossValidation\n\n    def settings_changed(self):\n        self._update_sample_max_size()\n        self.indices = None\n\n    @Inputs.data\n    def set_data(self, dataset):\n        self.data = dataset\n        if dataset is not None:\n            sql = isinstance(dataset, SqlTable)\n            self.sampling_box.setVisible(not sql)\n            self.sql_box.setVisible(sql)\n            self.cb_seed.setVisible(not sql)\n            self.cb_stratify.setVisible(not sql)\n            self.cb_sql_dl.setVisible(sql)\n\n            if not sql:\n                self._update_sample_max_size()\n                self.updateindices()\n        else:\n            self.indices = None\n            self.clear_messages()\n        self.commit()\n\n    def _update_sample_max_size(self):\n        \"\"\"Limit number of instances to input size unless using replacement.\"\"\"\n        if not self.data or self.replacement:\n            self.sampleSizeSpin.setMaximum(self._MAX_SAMPLE_SIZE)\n        else:\n            self.sampleSizeSpin.setMaximum(len(self.data))\n\n    def commit(self):\n        if self.data is None:\n            sample = other = None\n            self.sampled_instances = self.remaining_instances = None\n        elif isinstance(self.data, SqlTable):\n            other = None\n            if self.sampling_type == self.SqlProportion:\n                sample = self.data.sample_percentage(\n                    self.sampleSizeSqlPercentage, no_cache=True)\n            else:\n                sample = self.data.sample_time(\n                    self.sampleSizeSqlTime, no_cache=True)\n            if self.sql_dl:\n                sample.download_data()\n                sample = Table(sample)\n\n        else:\n            if self.indices is None or not self.use_seed:\n                self.updateindices()\n                if self.indices is None:\n                    return\n            if self.sampling_type in (\n                    self.FixedProportion, self.FixedSize, self.Bootstrap):\n                remaining, sample = self.indices\n            elif self.sampling_type == self.CrossValidation:\n                if self.compatibility_mode:\n                    remaining, sample = self.indices[self.selectedFold - 1]\n                else:\n                    sample, remaining = self.indices[self.selectedFold - 1]\n\n            sample = self.data[sample]\n            other = self.data[remaining]\n            self.sampled_instances = len(sample)\n            self.remaining_instances = len(other)\n\n        self.Outputs.data_sample.send(sample)\n        self.Outputs.remaining_data.send(other)\n\n    def updateindices(self):\n        self.Error.clear()\n        self.Warning.clear()\n        repl = True\n        data_length = len(self.data)\n        num_classes = len(self.data.domain.class_var.values) \\\n            if self.data.domain.has_discrete_class else 0\n\n        size = None\n        if not data_length:\n            self.Error.no_data()\n        elif self.sampling_type == self.FixedSize:\n            size = self.sampleSizeNumber\n            repl = self.replacement\n        elif self.sampling_type == self.FixedProportion:\n            size = np.ceil(self.sampleSizePercentage / 100 * data_length)\n            repl = False\n        elif self.sampling_type == self.CrossValidation:\n            if data_length < self.number_of_folds:\n                self.Error.too_many_folds()\n        else:\n            assert self.sampling_type == self.Bootstrap\n\n        if not repl and size is not None and (size > data_length):\n            self.Error.sample_larger_than_data()\n        if not repl and data_length <= num_classes and self.stratify:\n            self.Error.not_enough_to_stratify()\n\n        if self.Error.active:\n            self.indices = None\n            return\n\n        # By the above, we can safely assume there is data\n        if self.sampling_type == self.FixedSize and repl and size and \\\n                size > len(self.data):\n            # This should only be possible when using replacement\n            self.Warning.bigger_sample()\n\n        stratified = (self.stratify and\n                      isinstance(self.data, Table) and\n                      self.data.domain.has_discrete_class)\n        try:\n            self.indices = self.sample(data_length, size, stratified)\n        except ValueError as ex:\n            self.Warning.could_not_stratify(str(ex))\n            self.indices = self.sample(data_length, size, stratified=False)\n\n    def sample(self, data_length, size, stratified):\n        rnd = self.RandomSeed if self.use_seed else None\n        if self.sampling_type == self.FixedSize:\n            sampler = SampleRandomN(\n                size, stratified=stratified, replace=self.replacement,\n                random_state=rnd)\n        elif self.sampling_type == self.FixedProportion:\n            sampler = SampleRandomP(\n                self.sampleSizePercentage / 100, stratified=stratified,\n                random_state=rnd)\n        elif self.sampling_type == self.Bootstrap:\n            sampler = SampleBootstrap(data_length, random_state=rnd)\n        else:\n            sampler = SampleFoldIndices(\n                self.number_of_folds, stratified=stratified, random_state=rnd)\n        return sampler(self.data)\n\n    def send_report(self):\n        if self.sampling_type == self.FixedProportion:\n            tpe = f\"Random sample with {self.sampleSizePercentage} % of data\"\n        elif self.sampling_type == self.FixedSize:\n            if self.sampleSizeNumber == 1:\n                tpe = \"Random data instance\"\n            else:\n                tpe = f\"Random sample with {self.sampleSizeNumber} data instances\"\n                if self.replacement:\n                    tpe += \", with replacement\"\n        elif self.sampling_type == self.CrossValidation:\n            tpe = f\"{self.number_of_folds}-fold cross-validation \" \\\n                  f\"without subset #{self.selectedFold}\"\n        elif self.sampling_type == self.Bootstrap:\n            tpe = \"Bootstrap\"\n        else:  # pragma: no cover\n            assert False\n        if self.stratify:\n            tpe += \", stratified (if possible)\"\n        if self.use_seed:\n            tpe += \", deterministic\"\n        items = [(\"Sampling type\", tpe)]\n        if self.sampled_instances is not None:\n            items += [\n                (\"Input\", f\"{len(self.data)} {pl(len(self.data), 'instance')}\"),\n                (\"Sample\", f\"{self.sampled_instances} {pl(self.sampled_instances, 'instance')}\"),\n                (\"Remaining\", f\"{self.remaining_instances} {pl(self.remaining_instances, 'instance')}\"),\n            ]\n        self.report_items(items)\n\n    @classmethod\n    def migrate_settings(cls, settings, version):\n        if not version or version < 2 \\\n                and settings[\"sampling_type\"] == cls.CrossValidation:\n            settings[\"compatibility_mode\"] = True",
                            "ast_type_str": "ClassDef",
                            "start_lineno": 19,
                            "end_lineno": 346,
                            "parent": null
                        }
                    ],
                    "added_entities": [],
                    "deleted_entities": []
                },
                {
                    "descriptor": {
                        "old_range": {
                            "start": 395,
                            "length": 11
                        },
                        "new_range": {
                            "start": 395,
                            "length": 15
                        },
                        "section": "class SampleRandomN(Reprable):"
                    },
                    "line_group": {
                        "all_lines": [
                            {
                                "content": "            o[sample] = 0",
                                "type": "context"
                            },
                            {
                                "content": "            others = np.nonzero(o)[0]",
                                "type": "context"
                            },
                            {
                                "content": "            return others, sample",
                                "type": "context"
                            },
                            {
                                "content": "        if self.n == len(table):",
                                "type": "deleted"
                            },
                            {
                                "content": "        if self.n in (0, len(table)):",
                                "type": "added"
                            },
                            {
                                "content": "            rgen = np.random.RandomState(self.random_state)",
                                "type": "context"
                            },
                            {
                                "content": "            sample = np.arange(self.n)",
                                "type": "deleted"
                            },
                            {
                                "content": "            rgen.shuffle(sample)",
                                "type": "deleted"
                            },
                            {
                                "content": "            return np.array([], dtype=int), sample",
                                "type": "deleted"
                            },
                            {
                                "content": "            shuffled = np.arange(len(table))",
                                "type": "added"
                            },
                            {
                                "content": "            rgen.shuffle(shuffled)",
                                "type": "added"
                            },
                            {
                                "content": "            empty = np.array([], dtype=int)",
                                "type": "added"
                            },
                            {
                                "content": "            if self.n == 0:",
                                "type": "added"
                            },
                            {
                                "content": "                return shuffled, empty",
                                "type": "added"
                            },
                            {
                                "content": "            else:",
                                "type": "added"
                            },
                            {
                                "content": "                return empty, shuffled",
                                "type": "added"
                            },
                            {
                                "content": "        elif self.stratified and table.domain.has_discrete_class:",
                                "type": "context"
                            },
                            {
                                "content": "            test_size = max(len(table.domain.class_var.values), self.n)",
                                "type": "context"
                            },
                            {
                                "content": "            splitter = skl.StratifiedShuffleSplit(",
                                "type": "context"
                            }
                        ]
                    },
                    "modified_entities": [
                        {
                            "file_name": "Orange/widgets/data/owdatasampler.py",
                            "type": "method",
                            "name": "SampleRandomN.__call__",
                            "content": "class SampleRandomN(Reprable):\n    def __init__(self, n=0, stratified=False, replace=False,\n                 random_state=None):\n        self.n = n\n        self.stratified = stratified\n        self.replace = replace\n        self.random_state = random_state\n\n    def __call__(self, table):\n        if self.replace:\n            # pylint: disable=no-member\n            rgen = np.random.RandomState(self.random_state)\n            sample = rgen.randint(0, len(table), self.n)\n            o = np.ones(len(table))\n            o[sample] = 0\n            others = np.nonzero(o)[0]\n            return others, sample\n        if self.n == len(table):\n            rgen = np.random.RandomState(self.random_state)\n            sample = np.arange(self.n)\n            rgen.shuffle(sample)\n            return np.array([], dtype=int), sample\n        elif self.stratified and table.domain.has_discrete_class:\n            test_size = max(len(table.domain.class_var.values), self.n)\n            splitter = skl.StratifiedShuffleSplit(\n                n_splits=1, test_size=test_size,\n                train_size=len(table) - test_size,\n                random_state=self.random_state)\n            splitter.get_n_splits(table.X, table.Y)\n            ind = splitter.split(table.X, table.Y)\n        else:\n            splitter = skl.ShuffleSplit(\n                n_splits=1, test_size=self.n, random_state=self.random_state)\n            splitter.get_n_splits(table)\n            ind = splitter.split(table)\n        return next(iter(ind))",
                            "ast_type_str": "ClassDef",
                            "start_lineno": 389,
                            "end_lineno": 416,
                            "parent": {
                                "file_name": "Orange/widgets/data/owdatasampler.py",
                                "type": "class",
                                "name": "SampleRandomN",
                                "content": "class SampleRandomN(Reprable):\n    def __init__(self, n=0, stratified=False, replace=False,\n                 random_state=None):\n        self.n = n\n        self.stratified = stratified\n        self.replace = replace\n        self.random_state = random_state\n\n    def __call__(self, table):\n        if self.replace:\n            # pylint: disable=no-member\n            rgen = np.random.RandomState(self.random_state)\n            sample = rgen.randint(0, len(table), self.n)\n            o = np.ones(len(table))\n            o[sample] = 0\n            others = np.nonzero(o)[0]\n            return others, sample\n        if self.n == len(table):\n            rgen = np.random.RandomState(self.random_state)\n            sample = np.arange(self.n)\n            rgen.shuffle(sample)\n            return np.array([], dtype=int), sample\n        elif self.stratified and table.domain.has_discrete_class:\n            test_size = max(len(table.domain.class_var.values), self.n)\n            splitter = skl.StratifiedShuffleSplit(\n                n_splits=1, test_size=test_size,\n                train_size=len(table) - test_size,\n                random_state=self.random_state)\n            splitter.get_n_splits(table.X, table.Y)\n            ind = splitter.split(table.X, table.Y)\n        else:\n            splitter = skl.ShuffleSplit(\n                n_splits=1, test_size=self.n, random_state=self.random_state)\n            splitter.get_n_splits(table)\n            ind = splitter.split(table)\n        return next(iter(ind))",
                                "ast_type_str": "ClassDef",
                                "start_lineno": 381,
                                "end_lineno": 416,
                                "parent": null
                            }
                        },
                        {
                            "file_name": "Orange/widgets/data/owdatasampler.py",
                            "type": "class",
                            "name": "SampleRandomN",
                            "content": "class SampleRandomN(Reprable):\n    def __init__(self, n=0, stratified=False, replace=False,\n                 random_state=None):\n        self.n = n\n        self.stratified = stratified\n        self.replace = replace\n        self.random_state = random_state\n\n    def __call__(self, table):\n        if self.replace:\n            # pylint: disable=no-member\n            rgen = np.random.RandomState(self.random_state)\n            sample = rgen.randint(0, len(table), self.n)\n            o = np.ones(len(table))\n            o[sample] = 0\n            others = np.nonzero(o)[0]\n            return others, sample\n        if self.n == len(table):\n            rgen = np.random.RandomState(self.random_state)\n            sample = np.arange(self.n)\n            rgen.shuffle(sample)\n            return np.array([], dtype=int), sample\n        elif self.stratified and table.domain.has_discrete_class:\n            test_size = max(len(table.domain.class_var.values), self.n)\n            splitter = skl.StratifiedShuffleSplit(\n                n_splits=1, test_size=test_size,\n                train_size=len(table) - test_size,\n                random_state=self.random_state)\n            splitter.get_n_splits(table.X, table.Y)\n            ind = splitter.split(table.X, table.Y)\n        else:\n            splitter = skl.ShuffleSplit(\n                n_splits=1, test_size=self.n, random_state=self.random_state)\n            splitter.get_n_splits(table)\n            ind = splitter.split(table)\n        return next(iter(ind))",
                            "ast_type_str": "ClassDef",
                            "start_lineno": 381,
                            "end_lineno": 416,
                            "parent": null
                        }
                    ],
                    "added_entities": [],
                    "deleted_entities": []
                }
            ]
        },
        {
            "old_file_content": "# Test methods with long descriptive names can omit docstrings\n# pylint: disable=missing-docstring,unsubscriptable-object\nimport unittest\n\nfrom Orange.data import Table\nfrom Orange.widgets.data.owdatasampler import OWDataSampler\nfrom Orange.widgets.tests.base import WidgetTest\n\n\nclass TestOWDataSampler(WidgetTest):\n    @classmethod\n    def setUpClass(cls):\n        super().setUpClass()\n        cls.iris = Table(\"iris\")\n        cls.zoo = Table(\"zoo\")\n\n    def setUp(self):\n        self.widget = self.create_widget(OWDataSampler)  # type: OWDataSampler\n\n    def test_error_message(self):\n        \"\"\" Check if error message appears and then disappears when\n        data is removed from input\"\"\"\n        self.widget.controls.sampling_type.buttons[2].click()\n        self.send_signal(\"Data\", self.iris)\n        self.assertFalse(self.widget.Error.too_many_folds.is_shown())\n        self.send_signal(\"Data\", self.iris[:5])\n        self.assertTrue(self.widget.Error.too_many_folds.is_shown())\n        self.send_signal(\"Data\", None)\n        self.assertFalse(self.widget.Error.too_many_folds.is_shown())\n        self.send_signal(\"Data\", Table.from_domain(self.iris.domain))\n        self.assertTrue(self.widget.Error.no_data.is_shown())\n\n    def test_stratified_on_unbalanced_data(self):\n        unbalanced_data = self.iris[:51]\n\n        self.widget.controls.stratify.setChecked(True)\n        self.send_signal(\"Data\", unbalanced_data)\n        self.assertTrue(self.widget.Warning.could_not_stratify.is_shown())\n\n    def test_bootstrap(self):\n        self.select_sampling_type(self.widget.Bootstrap)\n\n        self.send_signal(\"Data\", self.iris)\n\n        in_input = set(self.iris.ids)\n        sample = self.get_output(\"Data Sample\")\n        in_sample = set(sample.ids)\n        in_remaining = set(self.get_output(\"Remaining Data\").ids)\n\n        # Bootstrap should sample len(input) instances\n        self.assertEqual(len(sample), len(self.iris))\n        # Sample and remaining should cover all instances, while none\n        # should be present in both\n        self.assertEqual(len(in_sample | in_remaining), len(in_input))\n        self.assertEqual(len(in_sample & in_remaining), 0)\n        # Sampling with replacement will always produce at least one distinct\n        # instance in sample, and at least one instance in remaining with\n        # high probability (1-(1/150*2/150*...*150/150) ~= 1-2e-64)\n        self.assertGreater(len(in_sample), 0)\n        self.assertGreater(len(in_remaining), 0)\n\n    def select_sampling_type(self, sampling_type):\n        buttons = self.widget.controls.sampling_type.group.buttons()\n        buttons[sampling_type].click()\n\n    def test_no_intersection_in_outputs(self):\n        \"\"\" Check whether outputs intersect and whether length of outputs sums\n        to length of original data\"\"\"\n        self.send_signal(\"Data\", self.iris)\n        w = self.widget\n        sampling_types = [w.FixedProportion, w.FixedSize, w.CrossValidation]\n\n        for replicable in [True, False]:\n            for stratified in [True, False]:\n                for sampling_type in sampling_types:\n                    self.widget.cb_seed.setChecked(replicable)\n                    self.widget.cb_stratify.setChecked(stratified)\n                    self.select_sampling_type(sampling_type)\n                    self.widget.commit()\n\n                    sample = self.get_output(\"Data Sample\")\n                    other = self.get_output(\"Remaining Data\")\n                    self.assertEqual(len(self.iris), len(sample) + len(other))\n                    self.assertNoIntersection(sample, other)\n\n    def test_bigger_size_with_replacement(self):\n        \"\"\"Allow bigger output without replacement.\"\"\"\n        self.send_signal('Data', self.iris[:2])\n        sample_size = self.set_fixed_sample_size(3, with_replacement=True)\n        self.assertEqual(3, sample_size, 'Should be able to set a bigger size '\n                         'with replacement')\n\n    def test_bigger_size_without_replacement(self):\n        \"\"\"Lower output samples to match input's without replacement.\"\"\"\n        self.send_signal('Data', self.iris[:2])\n        sample_size = self.set_fixed_sample_size(3)\n        self.assertEqual(2, sample_size)\n\n    def test_bigger_output_warning(self):\n        \"\"\"Should warn when sample size is bigger than input.\"\"\"\n        self.send_signal('Data', self.iris[:2])\n        self.set_fixed_sample_size(3, with_replacement=True)\n        self.assertTrue(self.widget.Warning.bigger_sample.is_shown())\n\n    def test_shuffling(self):\n        self.send_signal('Data', self.iris)\n\n        self.set_fixed_sample_size(150)\n        self.assertFalse(self.widget.Warning.bigger_sample.is_shown())\n        sample = self.get_output(\"Data Sample\")\n        self.assertTrue((self.iris.ids != sample.ids).any())\n        self.assertEqual(set(self.iris.ids), set(sample.ids))\n\n        self.select_sampling_type(self.widget.FixedProportion)\n        self.widget.sampleSizePercentage = 100\n        self.widget.commit()\n        sample = self.get_output(\"Data Sample\")\n        self.assertTrue((self.iris.ids != sample.ids).any())\n        self.assertEqual(set(self.iris.ids), set(sample.ids))\n\n    def set_fixed_sample_size(self, sample_size, with_replacement=False):\n        \"\"\"Set fixed sample size and return the number of gui spin.\n\n        Return the actual number in gui so we can check whether it is different\n        from sample_size. The number can be changed depending on the spin\n        maximum value.\n        \"\"\"\n        self.select_sampling_type(self.widget.FixedSize)\n        self.widget.controls.replacement.setChecked(with_replacement)\n        self.widget.sampleSizeSpin.setValue(sample_size)\n        self.widget.commit()\n        return self.widget.sampleSizeSpin.value()\n\n    def assertNoIntersection(self, sample, other):\n        self.assertFalse(bool(set(sample.ids) & set(other.ids)))\n\n    def test_cv_outputs(self):\n        w = self.widget\n        self.send_signal(w.Inputs.data, self.iris)\n\n        self.select_sampling_type(w.CrossValidation)\n        self.widget.commit()\n        self.assertEqual(len(self.get_output(w.Outputs.data_sample)), 135)\n        self.assertEqual(len(self.get_output(w.Outputs.remaining_data)), 15)\n\n    def test_cv_output_migration(self):\n        self.assertFalse(self.widget.compatibility_mode)\n\n        settings = {\"sampling_type\": OWDataSampler.CrossValidation}\n        OWDataSampler.migrate_settings(settings, version=2)\n        self.assertFalse(settings.get(\"compatibility_mode\", False))\n\n        settings = {\"sampling_type\": OWDataSampler.FixedProportion}\n        OWDataSampler.migrate_settings(settings, version=1)\n        self.assertFalse(settings.get(\"compatibility_mode\", False))\n\n        settings = {\"sampling_type\": OWDataSampler.CrossValidation}\n        OWDataSampler.migrate_settings(settings, version=1)\n        self.assertTrue(settings[\"compatibility_mode\"])\n\n        w = self.create_widget(\n            OWDataSampler,\n            stored_settings={\"sampling_type\": OWDataSampler.CrossValidation,\n                             \"__version__\": 1})\n        self.assertTrue(w.compatibility_mode)\n\n        self.send_signal(w.Inputs.data, self.iris)\n        self.select_sampling_type(w.CrossValidation)\n        w.commit()\n        self.assertEqual(len(self.get_output(w.Outputs.data_sample)), 15)\n        self.assertEqual(len(self.get_output(w.Outputs.remaining_data)), 135)\n\n    def test_send_report(self):\n        w = self.widget\n        self.send_signal(w.Inputs.data, self.iris)\n\n        w.stratify = True\n        w.use_seed = True\n\n        self.select_sampling_type(0)\n        w.commit()\n        w.send_report()\n\n        self.select_sampling_type(1)\n        w.sampleSizeNumber = 1\n        w.commit()\n        w.send_report()\n\n        w.sampleSizeNumber = 10\n        w.replacement = False\n        w.commit()\n        w.send_report()\n\n        w.replacement = True\n        w.commit()\n        w.send_report()\n\n        self.select_sampling_type(2)\n        w.commit()\n        w.send_report()\n\n        self.select_sampling_type(3)\n        w.commit()\n        w.send_report()\n\n\nif __name__ == \"__main__\":\n    unittest.main()\n",
            "new_file_content": "# Test methods with long descriptive names can omit docstrings\n# pylint: disable=missing-docstring,unsubscriptable-object\nimport unittest\n\nfrom Orange.data import Table\nfrom Orange.widgets.data.owdatasampler import OWDataSampler\nfrom Orange.widgets.tests.base import WidgetTest\n\n\nclass TestOWDataSampler(WidgetTest):\n    @classmethod\n    def setUpClass(cls):\n        super().setUpClass()\n        cls.iris = Table(\"iris\")\n        cls.zoo = Table(\"zoo\")\n\n    def setUp(self):\n        self.widget = self.create_widget(OWDataSampler)  # type: OWDataSampler\n\n    def test_error_message(self):\n        \"\"\" Check if error message appears and then disappears when\n        data is removed from input\"\"\"\n        self.widget.controls.sampling_type.buttons[2].click()\n        self.send_signal(\"Data\", self.iris)\n        self.assertFalse(self.widget.Error.too_many_folds.is_shown())\n        self.send_signal(\"Data\", self.iris[:5])\n        self.assertTrue(self.widget.Error.too_many_folds.is_shown())\n        self.send_signal(\"Data\", None)\n        self.assertFalse(self.widget.Error.too_many_folds.is_shown())\n        self.send_signal(\"Data\", Table.from_domain(self.iris.domain))\n        self.assertTrue(self.widget.Error.no_data.is_shown())\n\n    def test_stratified_on_unbalanced_data(self):\n        unbalanced_data = self.iris[:51]\n\n        self.widget.controls.stratify.setChecked(True)\n        self.send_signal(\"Data\", unbalanced_data)\n        self.assertTrue(self.widget.Warning.could_not_stratify.is_shown())\n\n    def test_bootstrap(self):\n        self.select_sampling_type(self.widget.Bootstrap)\n\n        self.send_signal(\"Data\", self.iris)\n\n        in_input = set(self.iris.ids)\n        sample = self.get_output(\"Data Sample\")\n        in_sample = set(sample.ids)\n        in_remaining = set(self.get_output(\"Remaining Data\").ids)\n\n        # Bootstrap should sample len(input) instances\n        self.assertEqual(len(sample), len(self.iris))\n        # Sample and remaining should cover all instances, while none\n        # should be present in both\n        self.assertEqual(len(in_sample | in_remaining), len(in_input))\n        self.assertEqual(len(in_sample & in_remaining), 0)\n        # Sampling with replacement will always produce at least one distinct\n        # instance in sample, and at least one instance in remaining with\n        # high probability (1-(1/150*2/150*...*150/150) ~= 1-2e-64)\n        self.assertGreater(len(in_sample), 0)\n        self.assertGreater(len(in_remaining), 0)\n\n    def select_sampling_type(self, sampling_type):\n        buttons = self.widget.controls.sampling_type.group.buttons()\n        buttons[sampling_type].click()\n\n    def test_no_intersection_in_outputs(self):\n        \"\"\" Check whether outputs intersect and whether length of outputs sums\n        to length of original data\"\"\"\n        self.send_signal(\"Data\", self.iris)\n        w = self.widget\n        sampling_types = [w.FixedProportion, w.FixedSize, w.CrossValidation]\n\n        for replicable in [True, False]:\n            for stratified in [True, False]:\n                for sampling_type in sampling_types:\n                    self.widget.cb_seed.setChecked(replicable)\n                    self.widget.cb_stratify.setChecked(stratified)\n                    self.select_sampling_type(sampling_type)\n                    self.widget.commit()\n\n                    sample = self.get_output(\"Data Sample\")\n                    other = self.get_output(\"Remaining Data\")\n                    self.assertEqual(len(self.iris), len(sample) + len(other))\n                    self.assertNoIntersection(sample, other)\n\n    def test_bigger_size_with_replacement(self):\n        \"\"\"Allow bigger output without replacement.\"\"\"\n        self.send_signal('Data', self.iris[:2])\n        sample_size = self.set_fixed_sample_size(3, with_replacement=True)\n        self.assertEqual(3, sample_size, 'Should be able to set a bigger size '\n                         'with replacement')\n\n    def test_bigger_size_without_replacement(self):\n        \"\"\"Lower output samples to match input's without replacement.\"\"\"\n        self.send_signal('Data', self.iris[:2])\n        sample_size = self.set_fixed_sample_size(3)\n        self.assertEqual(2, sample_size)\n\n    def test_bigger_output_warning(self):\n        \"\"\"Should warn when sample size is bigger than input.\"\"\"\n        self.send_signal('Data', self.iris[:2])\n        self.set_fixed_sample_size(3, with_replacement=True)\n        self.assertTrue(self.widget.Warning.bigger_sample.is_shown())\n\n    def test_shuffling(self):\n        self.send_signal('Data', self.iris)\n\n        self.set_fixed_sample_size(150)\n        self.assertFalse(self.widget.Warning.bigger_sample.is_shown())\n        sample = self.get_output(\"Data Sample\")\n        self.assertTrue((self.iris.ids != sample.ids).any())\n        self.assertEqual(set(self.iris.ids), set(sample.ids))\n\n        self.select_sampling_type(self.widget.FixedProportion)\n        self.widget.sampleSizePercentage = 100\n        self.widget.commit()\n        sample = self.get_output(\"Data Sample\")\n        self.assertTrue((self.iris.ids != sample.ids).any())\n        self.assertEqual(set(self.iris.ids), set(sample.ids))\n\n    def set_fixed_sample_size(self, sample_size, with_replacement=False):\n        \"\"\"Set fixed sample size and return the number of gui spin.\n\n        Return the actual number in gui so we can check whether it is different\n        from sample_size. The number can be changed depending on the spin\n        maximum value.\n        \"\"\"\n        self.select_sampling_type(self.widget.FixedSize)\n        self.widget.controls.replacement.setChecked(with_replacement)\n        self.widget.sampleSizeSpin.setValue(sample_size)\n        self.widget.commit()\n        return self.widget.sampleSizeSpin.value()\n\n    def set_fixed_proportion(self, proportion):\n        \"\"\"Set fixed sample proportion.\n        \"\"\"\n        self.select_sampling_type(self.widget.FixedProportion)\n        self.widget.sampleSizePercentageSlider.setValue(proportion)\n        self.widget.commit()\n\n    def assertNoIntersection(self, sample, other):\n        self.assertFalse(bool(set(sample.ids) & set(other.ids)))\n\n    def test_cv_outputs(self):\n        w = self.widget\n        self.send_signal(w.Inputs.data, self.iris)\n\n        self.select_sampling_type(w.CrossValidation)\n        self.widget.commit()\n        self.assertEqual(len(self.get_output(w.Outputs.data_sample)), 135)\n        self.assertEqual(len(self.get_output(w.Outputs.remaining_data)), 15)\n\n    def test_cv_output_migration(self):\n        self.assertFalse(self.widget.compatibility_mode)\n\n        settings = {\"sampling_type\": OWDataSampler.CrossValidation}\n        OWDataSampler.migrate_settings(settings, version=2)\n        self.assertFalse(settings.get(\"compatibility_mode\", False))\n\n        settings = {\"sampling_type\": OWDataSampler.FixedProportion}\n        OWDataSampler.migrate_settings(settings, version=1)\n        self.assertFalse(settings.get(\"compatibility_mode\", False))\n\n        settings = {\"sampling_type\": OWDataSampler.CrossValidation}\n        OWDataSampler.migrate_settings(settings, version=1)\n        self.assertTrue(settings[\"compatibility_mode\"])\n\n        w = self.create_widget(\n            OWDataSampler,\n            stored_settings={\"sampling_type\": OWDataSampler.CrossValidation,\n                             \"__version__\": 1})\n        self.assertTrue(w.compatibility_mode)\n\n        self.send_signal(w.Inputs.data, self.iris)\n        self.select_sampling_type(w.CrossValidation)\n        w.commit()\n        self.assertEqual(len(self.get_output(w.Outputs.data_sample)), 15)\n        self.assertEqual(len(self.get_output(w.Outputs.remaining_data)), 135)\n\n    def test_empty_sample(self):\n        w = self.widget\n        self.send_signal(w.Inputs.data, self.iris)\n\n        self.set_fixed_sample_size(150)\n        self.assertEqual(len(self.get_output(w.Outputs.data_sample)), 150)\n        self.assertEqual(len(self.get_output(w.Outputs.remaining_data)), 0)\n\n        self.set_fixed_sample_size(0)\n        self.assertEqual(len(self.get_output(w.Outputs.data_sample)), 0)\n        self.assertEqual(len(self.get_output(w.Outputs.remaining_data)), 150)\n\n        self.set_fixed_proportion(100)\n        self.assertEqual(len(self.get_output(w.Outputs.data_sample)), 150)\n        self.assertEqual(len(self.get_output(w.Outputs.remaining_data)), 0)\n\n        self.set_fixed_proportion(0)\n        self.assertEqual(len(self.get_output(w.Outputs.data_sample)), 0)\n        self.assertEqual(len(self.get_output(w.Outputs.remaining_data)), 150)\n\n    def test_send_report(self):\n        w = self.widget\n        self.send_signal(w.Inputs.data, self.iris)\n\n        w.stratify = True\n        w.use_seed = True\n\n        self.select_sampling_type(0)\n        w.commit()\n        w.send_report()\n\n        self.select_sampling_type(1)\n        w.sampleSizeNumber = 1\n        w.commit()\n        w.send_report()\n\n        w.sampleSizeNumber = 10\n        w.replacement = False\n        w.commit()\n        w.send_report()\n\n        w.replacement = True\n        w.commit()\n        w.send_report()\n\n        self.select_sampling_type(2)\n        w.commit()\n        w.send_report()\n\n        self.select_sampling_type(3)\n        w.commit()\n        w.send_report()\n\n\nif __name__ == \"__main__\":\n    unittest.main()\n",
            "header": {
                "file": {
                    "path": "Orange/widgets/data/tests/test_owdatasampler.py"
                },
                "misc_line": null
            },
            "index_line": {
                "old_commit_hash": "c59ba5600",
                "new_commit_hash": "b0fa8bf6a",
                "mode": "100644"
            },
            "is_binary_file": false,
            "binary_line": null,
            "minus_file": {
                "path": "a/Orange/widgets/data/tests/test_owdatasampler.py"
            },
            "plus_file": {
                "path": "b/Orange/widgets/data/tests/test_owdatasampler.py"
            },
            "hunks": [
                {
                    "descriptor": {
                        "old_range": {
                            "start": 131,
                            "length": 6
                        },
                        "new_range": {
                            "start": 131,
                            "length": 13
                        },
                        "section": "class TestOWDataSampler(WidgetTest):"
                    },
                    "line_group": {
                        "all_lines": [
                            {
                                "content": "        self.widget.commit()",
                                "type": "context"
                            },
                            {
                                "content": "        return self.widget.sampleSizeSpin.value()",
                                "type": "context"
                            },
                            {
                                "content": "",
                                "type": "context"
                            },
                            {
                                "content": "    def set_fixed_proportion(self, proportion):",
                                "type": "added"
                            },
                            {
                                "content": "        \"\"\"Set fixed sample proportion.",
                                "type": "added"
                            },
                            {
                                "content": "        \"\"\"",
                                "type": "added"
                            },
                            {
                                "content": "        self.select_sampling_type(self.widget.FixedProportion)",
                                "type": "added"
                            },
                            {
                                "content": "        self.widget.sampleSizePercentageSlider.setValue(proportion)",
                                "type": "added"
                            },
                            {
                                "content": "        self.widget.commit()",
                                "type": "added"
                            },
                            {
                                "content": "",
                                "type": "added"
                            },
                            {
                                "content": "    def assertNoIntersection(self, sample, other):",
                                "type": "context"
                            },
                            {
                                "content": "        self.assertFalse(bool(set(sample.ids) & set(other.ids)))",
                                "type": "context"
                            },
                            {
                                "content": "",
                                "type": "context"
                            }
                        ]
                    },
                    "modified_entities": [
                        {
                            "file_name": "Orange/widgets/data/tests/test_owdatasampler.py",
                            "type": "class",
                            "name": "TestOWDataSampler",
                            "content": "class TestOWDataSampler(WidgetTest):\n    @classmethod\n    def setUpClass(cls):\n        super().setUpClass()\n        cls.iris = Table(\"iris\")\n        cls.zoo = Table(\"zoo\")\n\n    def setUp(self):\n        self.widget = self.create_widget(OWDataSampler)  # type: OWDataSampler\n\n    def test_error_message(self):\n        \"\"\" Check if error message appears and then disappears when\n        data is removed from input\"\"\"\n        self.widget.controls.sampling_type.buttons[2].click()\n        self.send_signal(\"Data\", self.iris)\n        self.assertFalse(self.widget.Error.too_many_folds.is_shown())\n        self.send_signal(\"Data\", self.iris[:5])\n        self.assertTrue(self.widget.Error.too_many_folds.is_shown())\n        self.send_signal(\"Data\", None)\n        self.assertFalse(self.widget.Error.too_many_folds.is_shown())\n        self.send_signal(\"Data\", Table.from_domain(self.iris.domain))\n        self.assertTrue(self.widget.Error.no_data.is_shown())\n\n    def test_stratified_on_unbalanced_data(self):\n        unbalanced_data = self.iris[:51]\n\n        self.widget.controls.stratify.setChecked(True)\n        self.send_signal(\"Data\", unbalanced_data)\n        self.assertTrue(self.widget.Warning.could_not_stratify.is_shown())\n\n    def test_bootstrap(self):\n        self.select_sampling_type(self.widget.Bootstrap)\n\n        self.send_signal(\"Data\", self.iris)\n\n        in_input = set(self.iris.ids)\n        sample = self.get_output(\"Data Sample\")\n        in_sample = set(sample.ids)\n        in_remaining = set(self.get_output(\"Remaining Data\").ids)\n\n        # Bootstrap should sample len(input) instances\n        self.assertEqual(len(sample), len(self.iris))\n        # Sample and remaining should cover all instances, while none\n        # should be present in both\n        self.assertEqual(len(in_sample | in_remaining), len(in_input))\n        self.assertEqual(len(in_sample & in_remaining), 0)\n        # Sampling with replacement will always produce at least one distinct\n        # instance in sample, and at least one instance in remaining with\n        # high probability (1-(1/150*2/150*...*150/150) ~= 1-2e-64)\n        self.assertGreater(len(in_sample), 0)\n        self.assertGreater(len(in_remaining), 0)\n\n    def select_sampling_type(self, sampling_type):\n        buttons = self.widget.controls.sampling_type.group.buttons()\n        buttons[sampling_type].click()\n\n    def test_no_intersection_in_outputs(self):\n        \"\"\" Check whether outputs intersect and whether length of outputs sums\n        to length of original data\"\"\"\n        self.send_signal(\"Data\", self.iris)\n        w = self.widget\n        sampling_types = [w.FixedProportion, w.FixedSize, w.CrossValidation]\n\n        for replicable in [True, False]:\n            for stratified in [True, False]:\n                for sampling_type in sampling_types:\n                    self.widget.cb_seed.setChecked(replicable)\n                    self.widget.cb_stratify.setChecked(stratified)\n                    self.select_sampling_type(sampling_type)\n                    self.widget.commit()\n\n                    sample = self.get_output(\"Data Sample\")\n                    other = self.get_output(\"Remaining Data\")\n                    self.assertEqual(len(self.iris), len(sample) + len(other))\n                    self.assertNoIntersection(sample, other)\n\n    def test_bigger_size_with_replacement(self):\n        \"\"\"Allow bigger output without replacement.\"\"\"\n        self.send_signal('Data', self.iris[:2])\n        sample_size = self.set_fixed_sample_size(3, with_replacement=True)\n        self.assertEqual(3, sample_size, 'Should be able to set a bigger size '\n                         'with replacement')\n\n    def test_bigger_size_without_replacement(self):\n        \"\"\"Lower output samples to match input's without replacement.\"\"\"\n        self.send_signal('Data', self.iris[:2])\n        sample_size = self.set_fixed_sample_size(3)\n        self.assertEqual(2, sample_size)\n\n    def test_bigger_output_warning(self):\n        \"\"\"Should warn when sample size is bigger than input.\"\"\"\n        self.send_signal('Data', self.iris[:2])\n        self.set_fixed_sample_size(3, with_replacement=True)\n        self.assertTrue(self.widget.Warning.bigger_sample.is_shown())\n\n    def test_shuffling(self):\n        self.send_signal('Data', self.iris)\n\n        self.set_fixed_sample_size(150)\n        self.assertFalse(self.widget.Warning.bigger_sample.is_shown())\n        sample = self.get_output(\"Data Sample\")\n        self.assertTrue((self.iris.ids != sample.ids).any())\n        self.assertEqual(set(self.iris.ids), set(sample.ids))\n\n        self.select_sampling_type(self.widget.FixedProportion)\n        self.widget.sampleSizePercentage = 100\n        self.widget.commit()\n        sample = self.get_output(\"Data Sample\")\n        self.assertTrue((self.iris.ids != sample.ids).any())\n        self.assertEqual(set(self.iris.ids), set(sample.ids))\n\n    def set_fixed_sample_size(self, sample_size, with_replacement=False):\n        \"\"\"Set fixed sample size and return the number of gui spin.\n\n        Return the actual number in gui so we can check whether it is different\n        from sample_size. The number can be changed depending on the spin\n        maximum value.\n        \"\"\"\n        self.select_sampling_type(self.widget.FixedSize)\n        self.widget.controls.replacement.setChecked(with_replacement)\n        self.widget.sampleSizeSpin.setValue(sample_size)\n        self.widget.commit()\n        return self.widget.sampleSizeSpin.value()\n\n    def set_fixed_proportion(self, proportion):\n        \"\"\"Set fixed sample proportion.\n        \"\"\"\n        self.select_sampling_type(self.widget.FixedProportion)\n        self.widget.sampleSizePercentageSlider.setValue(proportion)\n        self.widget.commit()\n\n    def assertNoIntersection(self, sample, other):\n        self.assertFalse(bool(set(sample.ids) & set(other.ids)))\n\n    def test_cv_outputs(self):\n        w = self.widget\n        self.send_signal(w.Inputs.data, self.iris)\n\n        self.select_sampling_type(w.CrossValidation)\n        self.widget.commit()\n        self.assertEqual(len(self.get_output(w.Outputs.data_sample)), 135)\n        self.assertEqual(len(self.get_output(w.Outputs.remaining_data)), 15)\n\n    def test_cv_output_migration(self):\n        self.assertFalse(self.widget.compatibility_mode)\n\n        settings = {\"sampling_type\": OWDataSampler.CrossValidation}\n        OWDataSampler.migrate_settings(settings, version=2)\n        self.assertFalse(settings.get(\"compatibility_mode\", False))\n\n        settings = {\"sampling_type\": OWDataSampler.FixedProportion}\n        OWDataSampler.migrate_settings(settings, version=1)\n        self.assertFalse(settings.get(\"compatibility_mode\", False))\n\n        settings = {\"sampling_type\": OWDataSampler.CrossValidation}\n        OWDataSampler.migrate_settings(settings, version=1)\n        self.assertTrue(settings[\"compatibility_mode\"])\n\n        w = self.create_widget(\n            OWDataSampler,\n            stored_settings={\"sampling_type\": OWDataSampler.CrossValidation,\n                             \"__version__\": 1})\n        self.assertTrue(w.compatibility_mode)\n\n        self.send_signal(w.Inputs.data, self.iris)\n        self.select_sampling_type(w.CrossValidation)\n        w.commit()\n        self.assertEqual(len(self.get_output(w.Outputs.data_sample)), 15)\n        self.assertEqual(len(self.get_output(w.Outputs.remaining_data)), 135)\n\n    def test_empty_sample(self):\n        w = self.widget\n        self.send_signal(w.Inputs.data, self.iris)\n\n        self.set_fixed_sample_size(150)\n        self.assertEqual(len(self.get_output(w.Outputs.data_sample)), 150)\n        self.assertEqual(len(self.get_output(w.Outputs.remaining_data)), 0)\n\n        self.set_fixed_sample_size(0)\n        self.assertEqual(len(self.get_output(w.Outputs.data_sample)), 0)\n        self.assertEqual(len(self.get_output(w.Outputs.remaining_data)), 150)\n\n        self.set_fixed_proportion(100)\n        self.assertEqual(len(self.get_output(w.Outputs.data_sample)), 150)\n        self.assertEqual(len(self.get_output(w.Outputs.remaining_data)), 0)\n\n        self.set_fixed_proportion(0)\n        self.assertEqual(len(self.get_output(w.Outputs.data_sample)), 0)\n        self.assertEqual(len(self.get_output(w.Outputs.remaining_data)), 150)\n\n    def test_send_report(self):\n        w = self.widget\n        self.send_signal(w.Inputs.data, self.iris)\n\n        w.stratify = True\n        w.use_seed = True\n\n        self.select_sampling_type(0)\n        w.commit()\n        w.send_report()\n\n        self.select_sampling_type(1)\n        w.sampleSizeNumber = 1\n        w.commit()\n        w.send_report()\n\n        w.sampleSizeNumber = 10\n        w.replacement = False\n        w.commit()\n        w.send_report()\n\n        w.replacement = True\n        w.commit()\n        w.send_report()\n\n        self.select_sampling_type(2)\n        w.commit()\n        w.send_report()\n\n        self.select_sampling_type(3)\n        w.commit()\n        w.send_report()",
                            "ast_type_str": "ClassDef",
                            "start_lineno": 10,
                            "end_lineno": 231,
                            "parent": null
                        }
                    ],
                    "added_entities": [
                        {
                            "file_name": "Orange/widgets/data/tests/test_owdatasampler.py",
                            "type": "method",
                            "name": "TestOWDataSampler.set_fixed_proportion",
                            "content": "class TestOWDataSampler(WidgetTest):\n    @classmethod\n    def setUpClass(cls):\n        super().setUpClass()\n        cls.iris = Table(\"iris\")\n        cls.zoo = Table(\"zoo\")\n\n    def setUp(self):\n        self.widget = self.create_widget(OWDataSampler)  # type: OWDataSampler\n\n    def test_error_message(self):\n        \"\"\" Check if error message appears and then disappears when\n        data is removed from input\"\"\"\n        self.widget.controls.sampling_type.buttons[2].click()\n        self.send_signal(\"Data\", self.iris)\n        self.assertFalse(self.widget.Error.too_many_folds.is_shown())\n        self.send_signal(\"Data\", self.iris[:5])\n        self.assertTrue(self.widget.Error.too_many_folds.is_shown())\n        self.send_signal(\"Data\", None)\n        self.assertFalse(self.widget.Error.too_many_folds.is_shown())\n        self.send_signal(\"Data\", Table.from_domain(self.iris.domain))\n        self.assertTrue(self.widget.Error.no_data.is_shown())\n\n    def test_stratified_on_unbalanced_data(self):\n        unbalanced_data = self.iris[:51]\n\n        self.widget.controls.stratify.setChecked(True)\n        self.send_signal(\"Data\", unbalanced_data)\n        self.assertTrue(self.widget.Warning.could_not_stratify.is_shown())\n\n    def test_bootstrap(self):\n        self.select_sampling_type(self.widget.Bootstrap)\n\n        self.send_signal(\"Data\", self.iris)\n\n        in_input = set(self.iris.ids)\n        sample = self.get_output(\"Data Sample\")\n        in_sample = set(sample.ids)\n        in_remaining = set(self.get_output(\"Remaining Data\").ids)\n\n        # Bootstrap should sample len(input) instances\n        self.assertEqual(len(sample), len(self.iris))\n        # Sample and remaining should cover all instances, while none\n        # should be present in both\n        self.assertEqual(len(in_sample | in_remaining), len(in_input))\n        self.assertEqual(len(in_sample & in_remaining), 0)\n        # Sampling with replacement will always produce at least one distinct\n        # instance in sample, and at least one instance in remaining with\n        # high probability (1-(1/150*2/150*...*150/150) ~= 1-2e-64)\n        self.assertGreater(len(in_sample), 0)\n        self.assertGreater(len(in_remaining), 0)\n\n    def select_sampling_type(self, sampling_type):\n        buttons = self.widget.controls.sampling_type.group.buttons()\n        buttons[sampling_type].click()\n\n    def test_no_intersection_in_outputs(self):\n        \"\"\" Check whether outputs intersect and whether length of outputs sums\n        to length of original data\"\"\"\n        self.send_signal(\"Data\", self.iris)\n        w = self.widget\n        sampling_types = [w.FixedProportion, w.FixedSize, w.CrossValidation]\n\n        for replicable in [True, False]:\n            for stratified in [True, False]:\n                for sampling_type in sampling_types:\n                    self.widget.cb_seed.setChecked(replicable)\n                    self.widget.cb_stratify.setChecked(stratified)\n                    self.select_sampling_type(sampling_type)\n                    self.widget.commit()\n\n                    sample = self.get_output(\"Data Sample\")\n                    other = self.get_output(\"Remaining Data\")\n                    self.assertEqual(len(self.iris), len(sample) + len(other))\n                    self.assertNoIntersection(sample, other)\n\n    def test_bigger_size_with_replacement(self):\n        \"\"\"Allow bigger output without replacement.\"\"\"\n        self.send_signal('Data', self.iris[:2])\n        sample_size = self.set_fixed_sample_size(3, with_replacement=True)\n        self.assertEqual(3, sample_size, 'Should be able to set a bigger size '\n                         'with replacement')\n\n    def test_bigger_size_without_replacement(self):\n        \"\"\"Lower output samples to match input's without replacement.\"\"\"\n        self.send_signal('Data', self.iris[:2])\n        sample_size = self.set_fixed_sample_size(3)\n        self.assertEqual(2, sample_size)\n\n    def test_bigger_output_warning(self):\n        \"\"\"Should warn when sample size is bigger than input.\"\"\"\n        self.send_signal('Data', self.iris[:2])\n        self.set_fixed_sample_size(3, with_replacement=True)\n        self.assertTrue(self.widget.Warning.bigger_sample.is_shown())\n\n    def test_shuffling(self):\n        self.send_signal('Data', self.iris)\n\n        self.set_fixed_sample_size(150)\n        self.assertFalse(self.widget.Warning.bigger_sample.is_shown())\n        sample = self.get_output(\"Data Sample\")\n        self.assertTrue((self.iris.ids != sample.ids).any())\n        self.assertEqual(set(self.iris.ids), set(sample.ids))\n\n        self.select_sampling_type(self.widget.FixedProportion)\n        self.widget.sampleSizePercentage = 100\n        self.widget.commit()\n        sample = self.get_output(\"Data Sample\")\n        self.assertTrue((self.iris.ids != sample.ids).any())\n        self.assertEqual(set(self.iris.ids), set(sample.ids))\n\n    def set_fixed_sample_size(self, sample_size, with_replacement=False):\n        \"\"\"Set fixed sample size and return the number of gui spin.\n\n        Return the actual number in gui so we can check whether it is different\n        from sample_size. The number can be changed depending on the spin\n        maximum value.\n        \"\"\"\n        self.select_sampling_type(self.widget.FixedSize)\n        self.widget.controls.replacement.setChecked(with_replacement)\n        self.widget.sampleSizeSpin.setValue(sample_size)\n        self.widget.commit()\n        return self.widget.sampleSizeSpin.value()\n\n    def set_fixed_proportion(self, proportion):\n        \"\"\"Set fixed sample proportion.\n        \"\"\"\n        self.select_sampling_type(self.widget.FixedProportion)\n        self.widget.sampleSizePercentageSlider.setValue(proportion)\n        self.widget.commit()\n\n    def assertNoIntersection(self, sample, other):\n        self.assertFalse(bool(set(sample.ids) & set(other.ids)))\n\n    def test_cv_outputs(self):\n        w = self.widget\n        self.send_signal(w.Inputs.data, self.iris)\n\n        self.select_sampling_type(w.CrossValidation)\n        self.widget.commit()\n        self.assertEqual(len(self.get_output(w.Outputs.data_sample)), 135)\n        self.assertEqual(len(self.get_output(w.Outputs.remaining_data)), 15)\n\n    def test_cv_output_migration(self):\n        self.assertFalse(self.widget.compatibility_mode)\n\n        settings = {\"sampling_type\": OWDataSampler.CrossValidation}\n        OWDataSampler.migrate_settings(settings, version=2)\n        self.assertFalse(settings.get(\"compatibility_mode\", False))\n\n        settings = {\"sampling_type\": OWDataSampler.FixedProportion}\n        OWDataSampler.migrate_settings(settings, version=1)\n        self.assertFalse(settings.get(\"compatibility_mode\", False))\n\n        settings = {\"sampling_type\": OWDataSampler.CrossValidation}\n        OWDataSampler.migrate_settings(settings, version=1)\n        self.assertTrue(settings[\"compatibility_mode\"])\n\n        w = self.create_widget(\n            OWDataSampler,\n            stored_settings={\"sampling_type\": OWDataSampler.CrossValidation,\n                             \"__version__\": 1})\n        self.assertTrue(w.compatibility_mode)\n\n        self.send_signal(w.Inputs.data, self.iris)\n        self.select_sampling_type(w.CrossValidation)\n        w.commit()\n        self.assertEqual(len(self.get_output(w.Outputs.data_sample)), 15)\n        self.assertEqual(len(self.get_output(w.Outputs.remaining_data)), 135)\n\n    def test_empty_sample(self):\n        w = self.widget\n        self.send_signal(w.Inputs.data, self.iris)\n\n        self.set_fixed_sample_size(150)\n        self.assertEqual(len(self.get_output(w.Outputs.data_sample)), 150)\n        self.assertEqual(len(self.get_output(w.Outputs.remaining_data)), 0)\n\n        self.set_fixed_sample_size(0)\n        self.assertEqual(len(self.get_output(w.Outputs.data_sample)), 0)\n        self.assertEqual(len(self.get_output(w.Outputs.remaining_data)), 150)\n\n        self.set_fixed_proportion(100)\n        self.assertEqual(len(self.get_output(w.Outputs.data_sample)), 150)\n        self.assertEqual(len(self.get_output(w.Outputs.remaining_data)), 0)\n\n        self.set_fixed_proportion(0)\n        self.assertEqual(len(self.get_output(w.Outputs.data_sample)), 0)\n        self.assertEqual(len(self.get_output(w.Outputs.remaining_data)), 150)\n\n    def test_send_report(self):\n        w = self.widget\n        self.send_signal(w.Inputs.data, self.iris)\n\n        w.stratify = True\n        w.use_seed = True\n\n        self.select_sampling_type(0)\n        w.commit()\n        w.send_report()\n\n        self.select_sampling_type(1)\n        w.sampleSizeNumber = 1\n        w.commit()\n        w.send_report()\n\n        w.sampleSizeNumber = 10\n        w.replacement = False\n        w.commit()\n        w.send_report()\n\n        w.replacement = True\n        w.commit()\n        w.send_report()\n\n        self.select_sampling_type(2)\n        w.commit()\n        w.send_report()\n\n        self.select_sampling_type(3)\n        w.commit()\n        w.send_report()",
                            "ast_type_str": "ClassDef",
                            "start_lineno": 134,
                            "end_lineno": 139,
                            "parent": {
                                "file_name": "Orange/widgets/data/tests/test_owdatasampler.py",
                                "type": "class",
                                "name": "TestOWDataSampler",
                                "content": "class TestOWDataSampler(WidgetTest):\n    @classmethod\n    def setUpClass(cls):\n        super().setUpClass()\n        cls.iris = Table(\"iris\")\n        cls.zoo = Table(\"zoo\")\n\n    def setUp(self):\n        self.widget = self.create_widget(OWDataSampler)  # type: OWDataSampler\n\n    def test_error_message(self):\n        \"\"\" Check if error message appears and then disappears when\n        data is removed from input\"\"\"\n        self.widget.controls.sampling_type.buttons[2].click()\n        self.send_signal(\"Data\", self.iris)\n        self.assertFalse(self.widget.Error.too_many_folds.is_shown())\n        self.send_signal(\"Data\", self.iris[:5])\n        self.assertTrue(self.widget.Error.too_many_folds.is_shown())\n        self.send_signal(\"Data\", None)\n        self.assertFalse(self.widget.Error.too_many_folds.is_shown())\n        self.send_signal(\"Data\", Table.from_domain(self.iris.domain))\n        self.assertTrue(self.widget.Error.no_data.is_shown())\n\n    def test_stratified_on_unbalanced_data(self):\n        unbalanced_data = self.iris[:51]\n\n        self.widget.controls.stratify.setChecked(True)\n        self.send_signal(\"Data\", unbalanced_data)\n        self.assertTrue(self.widget.Warning.could_not_stratify.is_shown())\n\n    def test_bootstrap(self):\n        self.select_sampling_type(self.widget.Bootstrap)\n\n        self.send_signal(\"Data\", self.iris)\n\n        in_input = set(self.iris.ids)\n        sample = self.get_output(\"Data Sample\")\n        in_sample = set(sample.ids)\n        in_remaining = set(self.get_output(\"Remaining Data\").ids)\n\n        # Bootstrap should sample len(input) instances\n        self.assertEqual(len(sample), len(self.iris))\n        # Sample and remaining should cover all instances, while none\n        # should be present in both\n        self.assertEqual(len(in_sample | in_remaining), len(in_input))\n        self.assertEqual(len(in_sample & in_remaining), 0)\n        # Sampling with replacement will always produce at least one distinct\n        # instance in sample, and at least one instance in remaining with\n        # high probability (1-(1/150*2/150*...*150/150) ~= 1-2e-64)\n        self.assertGreater(len(in_sample), 0)\n        self.assertGreater(len(in_remaining), 0)\n\n    def select_sampling_type(self, sampling_type):\n        buttons = self.widget.controls.sampling_type.group.buttons()\n        buttons[sampling_type].click()\n\n    def test_no_intersection_in_outputs(self):\n        \"\"\" Check whether outputs intersect and whether length of outputs sums\n        to length of original data\"\"\"\n        self.send_signal(\"Data\", self.iris)\n        w = self.widget\n        sampling_types = [w.FixedProportion, w.FixedSize, w.CrossValidation]\n\n        for replicable in [True, False]:\n            for stratified in [True, False]:\n                for sampling_type in sampling_types:\n                    self.widget.cb_seed.setChecked(replicable)\n                    self.widget.cb_stratify.setChecked(stratified)\n                    self.select_sampling_type(sampling_type)\n                    self.widget.commit()\n\n                    sample = self.get_output(\"Data Sample\")\n                    other = self.get_output(\"Remaining Data\")\n                    self.assertEqual(len(self.iris), len(sample) + len(other))\n                    self.assertNoIntersection(sample, other)\n\n    def test_bigger_size_with_replacement(self):\n        \"\"\"Allow bigger output without replacement.\"\"\"\n        self.send_signal('Data', self.iris[:2])\n        sample_size = self.set_fixed_sample_size(3, with_replacement=True)\n        self.assertEqual(3, sample_size, 'Should be able to set a bigger size '\n                         'with replacement')\n\n    def test_bigger_size_without_replacement(self):\n        \"\"\"Lower output samples to match input's without replacement.\"\"\"\n        self.send_signal('Data', self.iris[:2])\n        sample_size = self.set_fixed_sample_size(3)\n        self.assertEqual(2, sample_size)\n\n    def test_bigger_output_warning(self):\n        \"\"\"Should warn when sample size is bigger than input.\"\"\"\n        self.send_signal('Data', self.iris[:2])\n        self.set_fixed_sample_size(3, with_replacement=True)\n        self.assertTrue(self.widget.Warning.bigger_sample.is_shown())\n\n    def test_shuffling(self):\n        self.send_signal('Data', self.iris)\n\n        self.set_fixed_sample_size(150)\n        self.assertFalse(self.widget.Warning.bigger_sample.is_shown())\n        sample = self.get_output(\"Data Sample\")\n        self.assertTrue((self.iris.ids != sample.ids).any())\n        self.assertEqual(set(self.iris.ids), set(sample.ids))\n\n        self.select_sampling_type(self.widget.FixedProportion)\n        self.widget.sampleSizePercentage = 100\n        self.widget.commit()\n        sample = self.get_output(\"Data Sample\")\n        self.assertTrue((self.iris.ids != sample.ids).any())\n        self.assertEqual(set(self.iris.ids), set(sample.ids))\n\n    def set_fixed_sample_size(self, sample_size, with_replacement=False):\n        \"\"\"Set fixed sample size and return the number of gui spin.\n\n        Return the actual number in gui so we can check whether it is different\n        from sample_size. The number can be changed depending on the spin\n        maximum value.\n        \"\"\"\n        self.select_sampling_type(self.widget.FixedSize)\n        self.widget.controls.replacement.setChecked(with_replacement)\n        self.widget.sampleSizeSpin.setValue(sample_size)\n        self.widget.commit()\n        return self.widget.sampleSizeSpin.value()\n\n    def set_fixed_proportion(self, proportion):\n        \"\"\"Set fixed sample proportion.\n        \"\"\"\n        self.select_sampling_type(self.widget.FixedProportion)\n        self.widget.sampleSizePercentageSlider.setValue(proportion)\n        self.widget.commit()\n\n    def assertNoIntersection(self, sample, other):\n        self.assertFalse(bool(set(sample.ids) & set(other.ids)))\n\n    def test_cv_outputs(self):\n        w = self.widget\n        self.send_signal(w.Inputs.data, self.iris)\n\n        self.select_sampling_type(w.CrossValidation)\n        self.widget.commit()\n        self.assertEqual(len(self.get_output(w.Outputs.data_sample)), 135)\n        self.assertEqual(len(self.get_output(w.Outputs.remaining_data)), 15)\n\n    def test_cv_output_migration(self):\n        self.assertFalse(self.widget.compatibility_mode)\n\n        settings = {\"sampling_type\": OWDataSampler.CrossValidation}\n        OWDataSampler.migrate_settings(settings, version=2)\n        self.assertFalse(settings.get(\"compatibility_mode\", False))\n\n        settings = {\"sampling_type\": OWDataSampler.FixedProportion}\n        OWDataSampler.migrate_settings(settings, version=1)\n        self.assertFalse(settings.get(\"compatibility_mode\", False))\n\n        settings = {\"sampling_type\": OWDataSampler.CrossValidation}\n        OWDataSampler.migrate_settings(settings, version=1)\n        self.assertTrue(settings[\"compatibility_mode\"])\n\n        w = self.create_widget(\n            OWDataSampler,\n            stored_settings={\"sampling_type\": OWDataSampler.CrossValidation,\n                             \"__version__\": 1})\n        self.assertTrue(w.compatibility_mode)\n\n        self.send_signal(w.Inputs.data, self.iris)\n        self.select_sampling_type(w.CrossValidation)\n        w.commit()\n        self.assertEqual(len(self.get_output(w.Outputs.data_sample)), 15)\n        self.assertEqual(len(self.get_output(w.Outputs.remaining_data)), 135)\n\n    def test_empty_sample(self):\n        w = self.widget\n        self.send_signal(w.Inputs.data, self.iris)\n\n        self.set_fixed_sample_size(150)\n        self.assertEqual(len(self.get_output(w.Outputs.data_sample)), 150)\n        self.assertEqual(len(self.get_output(w.Outputs.remaining_data)), 0)\n\n        self.set_fixed_sample_size(0)\n        self.assertEqual(len(self.get_output(w.Outputs.data_sample)), 0)\n        self.assertEqual(len(self.get_output(w.Outputs.remaining_data)), 150)\n\n        self.set_fixed_proportion(100)\n        self.assertEqual(len(self.get_output(w.Outputs.data_sample)), 150)\n        self.assertEqual(len(self.get_output(w.Outputs.remaining_data)), 0)\n\n        self.set_fixed_proportion(0)\n        self.assertEqual(len(self.get_output(w.Outputs.data_sample)), 0)\n        self.assertEqual(len(self.get_output(w.Outputs.remaining_data)), 150)\n\n    def test_send_report(self):\n        w = self.widget\n        self.send_signal(w.Inputs.data, self.iris)\n\n        w.stratify = True\n        w.use_seed = True\n\n        self.select_sampling_type(0)\n        w.commit()\n        w.send_report()\n\n        self.select_sampling_type(1)\n        w.sampleSizeNumber = 1\n        w.commit()\n        w.send_report()\n\n        w.sampleSizeNumber = 10\n        w.replacement = False\n        w.commit()\n        w.send_report()\n\n        w.replacement = True\n        w.commit()\n        w.send_report()\n\n        self.select_sampling_type(2)\n        w.commit()\n        w.send_report()\n\n        self.select_sampling_type(3)\n        w.commit()\n        w.send_report()",
                                "ast_type_str": "ClassDef",
                                "start_lineno": 10,
                                "end_lineno": 231,
                                "parent": null
                            }
                        }
                    ],
                    "deleted_entities": []
                },
                {
                    "descriptor": {
                        "old_range": {
                            "start": 170,
                            "length": 6
                        },
                        "new_range": {
                            "start": 177,
                            "length": 26
                        },
                        "section": "class TestOWDataSampler(WidgetTest):"
                    },
                    "line_group": {
                        "all_lines": [
                            {
                                "content": "        self.assertEqual(len(self.get_output(w.Outputs.data_sample)), 15)",
                                "type": "context"
                            },
                            {
                                "content": "        self.assertEqual(len(self.get_output(w.Outputs.remaining_data)), 135)",
                                "type": "context"
                            },
                            {
                                "content": "",
                                "type": "context"
                            },
                            {
                                "content": "    def test_empty_sample(self):",
                                "type": "added"
                            },
                            {
                                "content": "        w = self.widget",
                                "type": "added"
                            },
                            {
                                "content": "        self.send_signal(w.Inputs.data, self.iris)",
                                "type": "added"
                            },
                            {
                                "content": "",
                                "type": "added"
                            },
                            {
                                "content": "        self.set_fixed_sample_size(150)",
                                "type": "added"
                            },
                            {
                                "content": "        self.assertEqual(len(self.get_output(w.Outputs.data_sample)), 150)",
                                "type": "added"
                            },
                            {
                                "content": "        self.assertEqual(len(self.get_output(w.Outputs.remaining_data)), 0)",
                                "type": "added"
                            },
                            {
                                "content": "",
                                "type": "added"
                            },
                            {
                                "content": "        self.set_fixed_sample_size(0)",
                                "type": "added"
                            },
                            {
                                "content": "        self.assertEqual(len(self.get_output(w.Outputs.data_sample)), 0)",
                                "type": "added"
                            },
                            {
                                "content": "        self.assertEqual(len(self.get_output(w.Outputs.remaining_data)), 150)",
                                "type": "added"
                            },
                            {
                                "content": "",
                                "type": "added"
                            },
                            {
                                "content": "        self.set_fixed_proportion(100)",
                                "type": "added"
                            },
                            {
                                "content": "        self.assertEqual(len(self.get_output(w.Outputs.data_sample)), 150)",
                                "type": "added"
                            },
                            {
                                "content": "        self.assertEqual(len(self.get_output(w.Outputs.remaining_data)), 0)",
                                "type": "added"
                            },
                            {
                                "content": "",
                                "type": "added"
                            },
                            {
                                "content": "        self.set_fixed_proportion(0)",
                                "type": "added"
                            },
                            {
                                "content": "        self.assertEqual(len(self.get_output(w.Outputs.data_sample)), 0)",
                                "type": "added"
                            },
                            {
                                "content": "        self.assertEqual(len(self.get_output(w.Outputs.remaining_data)), 150)",
                                "type": "added"
                            },
                            {
                                "content": "",
                                "type": "added"
                            },
                            {
                                "content": "    def test_send_report(self):",
                                "type": "context"
                            },
                            {
                                "content": "        w = self.widget",
                                "type": "context"
                            },
                            {
                                "content": "        self.send_signal(w.Inputs.data, self.iris)",
                                "type": "context"
                            },
                            {
                                "content": "",
                                "type": "context"
                            }
                        ]
                    },
                    "modified_entities": [
                        {
                            "file_name": "Orange/widgets/data/tests/test_owdatasampler.py",
                            "type": "class",
                            "name": "TestOWDataSampler",
                            "content": "class TestOWDataSampler(WidgetTest):\n    @classmethod\n    def setUpClass(cls):\n        super().setUpClass()\n        cls.iris = Table(\"iris\")\n        cls.zoo = Table(\"zoo\")\n\n    def setUp(self):\n        self.widget = self.create_widget(OWDataSampler)  # type: OWDataSampler\n\n    def test_error_message(self):\n        \"\"\" Check if error message appears and then disappears when\n        data is removed from input\"\"\"\n        self.widget.controls.sampling_type.buttons[2].click()\n        self.send_signal(\"Data\", self.iris)\n        self.assertFalse(self.widget.Error.too_many_folds.is_shown())\n        self.send_signal(\"Data\", self.iris[:5])\n        self.assertTrue(self.widget.Error.too_many_folds.is_shown())\n        self.send_signal(\"Data\", None)\n        self.assertFalse(self.widget.Error.too_many_folds.is_shown())\n        self.send_signal(\"Data\", Table.from_domain(self.iris.domain))\n        self.assertTrue(self.widget.Error.no_data.is_shown())\n\n    def test_stratified_on_unbalanced_data(self):\n        unbalanced_data = self.iris[:51]\n\n        self.widget.controls.stratify.setChecked(True)\n        self.send_signal(\"Data\", unbalanced_data)\n        self.assertTrue(self.widget.Warning.could_not_stratify.is_shown())\n\n    def test_bootstrap(self):\n        self.select_sampling_type(self.widget.Bootstrap)\n\n        self.send_signal(\"Data\", self.iris)\n\n        in_input = set(self.iris.ids)\n        sample = self.get_output(\"Data Sample\")\n        in_sample = set(sample.ids)\n        in_remaining = set(self.get_output(\"Remaining Data\").ids)\n\n        # Bootstrap should sample len(input) instances\n        self.assertEqual(len(sample), len(self.iris))\n        # Sample and remaining should cover all instances, while none\n        # should be present in both\n        self.assertEqual(len(in_sample | in_remaining), len(in_input))\n        self.assertEqual(len(in_sample & in_remaining), 0)\n        # Sampling with replacement will always produce at least one distinct\n        # instance in sample, and at least one instance in remaining with\n        # high probability (1-(1/150*2/150*...*150/150) ~= 1-2e-64)\n        self.assertGreater(len(in_sample), 0)\n        self.assertGreater(len(in_remaining), 0)\n\n    def select_sampling_type(self, sampling_type):\n        buttons = self.widget.controls.sampling_type.group.buttons()\n        buttons[sampling_type].click()\n\n    def test_no_intersection_in_outputs(self):\n        \"\"\" Check whether outputs intersect and whether length of outputs sums\n        to length of original data\"\"\"\n        self.send_signal(\"Data\", self.iris)\n        w = self.widget\n        sampling_types = [w.FixedProportion, w.FixedSize, w.CrossValidation]\n\n        for replicable in [True, False]:\n            for stratified in [True, False]:\n                for sampling_type in sampling_types:\n                    self.widget.cb_seed.setChecked(replicable)\n                    self.widget.cb_stratify.setChecked(stratified)\n                    self.select_sampling_type(sampling_type)\n                    self.widget.commit()\n\n                    sample = self.get_output(\"Data Sample\")\n                    other = self.get_output(\"Remaining Data\")\n                    self.assertEqual(len(self.iris), len(sample) + len(other))\n                    self.assertNoIntersection(sample, other)\n\n    def test_bigger_size_with_replacement(self):\n        \"\"\"Allow bigger output without replacement.\"\"\"\n        self.send_signal('Data', self.iris[:2])\n        sample_size = self.set_fixed_sample_size(3, with_replacement=True)\n        self.assertEqual(3, sample_size, 'Should be able to set a bigger size '\n                         'with replacement')\n\n    def test_bigger_size_without_replacement(self):\n        \"\"\"Lower output samples to match input's without replacement.\"\"\"\n        self.send_signal('Data', self.iris[:2])\n        sample_size = self.set_fixed_sample_size(3)\n        self.assertEqual(2, sample_size)\n\n    def test_bigger_output_warning(self):\n        \"\"\"Should warn when sample size is bigger than input.\"\"\"\n        self.send_signal('Data', self.iris[:2])\n        self.set_fixed_sample_size(3, with_replacement=True)\n        self.assertTrue(self.widget.Warning.bigger_sample.is_shown())\n\n    def test_shuffling(self):\n        self.send_signal('Data', self.iris)\n\n        self.set_fixed_sample_size(150)\n        self.assertFalse(self.widget.Warning.bigger_sample.is_shown())\n        sample = self.get_output(\"Data Sample\")\n        self.assertTrue((self.iris.ids != sample.ids).any())\n        self.assertEqual(set(self.iris.ids), set(sample.ids))\n\n        self.select_sampling_type(self.widget.FixedProportion)\n        self.widget.sampleSizePercentage = 100\n        self.widget.commit()\n        sample = self.get_output(\"Data Sample\")\n        self.assertTrue((self.iris.ids != sample.ids).any())\n        self.assertEqual(set(self.iris.ids), set(sample.ids))\n\n    def set_fixed_sample_size(self, sample_size, with_replacement=False):\n        \"\"\"Set fixed sample size and return the number of gui spin.\n\n        Return the actual number in gui so we can check whether it is different\n        from sample_size. The number can be changed depending on the spin\n        maximum value.\n        \"\"\"\n        self.select_sampling_type(self.widget.FixedSize)\n        self.widget.controls.replacement.setChecked(with_replacement)\n        self.widget.sampleSizeSpin.setValue(sample_size)\n        self.widget.commit()\n        return self.widget.sampleSizeSpin.value()\n\n    def set_fixed_proportion(self, proportion):\n        \"\"\"Set fixed sample proportion.\n        \"\"\"\n        self.select_sampling_type(self.widget.FixedProportion)\n        self.widget.sampleSizePercentageSlider.setValue(proportion)\n        self.widget.commit()\n\n    def assertNoIntersection(self, sample, other):\n        self.assertFalse(bool(set(sample.ids) & set(other.ids)))\n\n    def test_cv_outputs(self):\n        w = self.widget\n        self.send_signal(w.Inputs.data, self.iris)\n\n        self.select_sampling_type(w.CrossValidation)\n        self.widget.commit()\n        self.assertEqual(len(self.get_output(w.Outputs.data_sample)), 135)\n        self.assertEqual(len(self.get_output(w.Outputs.remaining_data)), 15)\n\n    def test_cv_output_migration(self):\n        self.assertFalse(self.widget.compatibility_mode)\n\n        settings = {\"sampling_type\": OWDataSampler.CrossValidation}\n        OWDataSampler.migrate_settings(settings, version=2)\n        self.assertFalse(settings.get(\"compatibility_mode\", False))\n\n        settings = {\"sampling_type\": OWDataSampler.FixedProportion}\n        OWDataSampler.migrate_settings(settings, version=1)\n        self.assertFalse(settings.get(\"compatibility_mode\", False))\n\n        settings = {\"sampling_type\": OWDataSampler.CrossValidation}\n        OWDataSampler.migrate_settings(settings, version=1)\n        self.assertTrue(settings[\"compatibility_mode\"])\n\n        w = self.create_widget(\n            OWDataSampler,\n            stored_settings={\"sampling_type\": OWDataSampler.CrossValidation,\n                             \"__version__\": 1})\n        self.assertTrue(w.compatibility_mode)\n\n        self.send_signal(w.Inputs.data, self.iris)\n        self.select_sampling_type(w.CrossValidation)\n        w.commit()\n        self.assertEqual(len(self.get_output(w.Outputs.data_sample)), 15)\n        self.assertEqual(len(self.get_output(w.Outputs.remaining_data)), 135)\n\n    def test_empty_sample(self):\n        w = self.widget\n        self.send_signal(w.Inputs.data, self.iris)\n\n        self.set_fixed_sample_size(150)\n        self.assertEqual(len(self.get_output(w.Outputs.data_sample)), 150)\n        self.assertEqual(len(self.get_output(w.Outputs.remaining_data)), 0)\n\n        self.set_fixed_sample_size(0)\n        self.assertEqual(len(self.get_output(w.Outputs.data_sample)), 0)\n        self.assertEqual(len(self.get_output(w.Outputs.remaining_data)), 150)\n\n        self.set_fixed_proportion(100)\n        self.assertEqual(len(self.get_output(w.Outputs.data_sample)), 150)\n        self.assertEqual(len(self.get_output(w.Outputs.remaining_data)), 0)\n\n        self.set_fixed_proportion(0)\n        self.assertEqual(len(self.get_output(w.Outputs.data_sample)), 0)\n        self.assertEqual(len(self.get_output(w.Outputs.remaining_data)), 150)\n\n    def test_send_report(self):\n        w = self.widget\n        self.send_signal(w.Inputs.data, self.iris)\n\n        w.stratify = True\n        w.use_seed = True\n\n        self.select_sampling_type(0)\n        w.commit()\n        w.send_report()\n\n        self.select_sampling_type(1)\n        w.sampleSizeNumber = 1\n        w.commit()\n        w.send_report()\n\n        w.sampleSizeNumber = 10\n        w.replacement = False\n        w.commit()\n        w.send_report()\n\n        w.replacement = True\n        w.commit()\n        w.send_report()\n\n        self.select_sampling_type(2)\n        w.commit()\n        w.send_report()\n\n        self.select_sampling_type(3)\n        w.commit()\n        w.send_report()",
                            "ast_type_str": "ClassDef",
                            "start_lineno": 10,
                            "end_lineno": 231,
                            "parent": null
                        }
                    ],
                    "added_entities": [
                        {
                            "file_name": "Orange/widgets/data/tests/test_owdatasampler.py",
                            "type": "method",
                            "name": "TestOWDataSampler.test_empty_sample",
                            "content": "class TestOWDataSampler(WidgetTest):\n    @classmethod\n    def setUpClass(cls):\n        super().setUpClass()\n        cls.iris = Table(\"iris\")\n        cls.zoo = Table(\"zoo\")\n\n    def setUp(self):\n        self.widget = self.create_widget(OWDataSampler)  # type: OWDataSampler\n\n    def test_error_message(self):\n        \"\"\" Check if error message appears and then disappears when\n        data is removed from input\"\"\"\n        self.widget.controls.sampling_type.buttons[2].click()\n        self.send_signal(\"Data\", self.iris)\n        self.assertFalse(self.widget.Error.too_many_folds.is_shown())\n        self.send_signal(\"Data\", self.iris[:5])\n        self.assertTrue(self.widget.Error.too_many_folds.is_shown())\n        self.send_signal(\"Data\", None)\n        self.assertFalse(self.widget.Error.too_many_folds.is_shown())\n        self.send_signal(\"Data\", Table.from_domain(self.iris.domain))\n        self.assertTrue(self.widget.Error.no_data.is_shown())\n\n    def test_stratified_on_unbalanced_data(self):\n        unbalanced_data = self.iris[:51]\n\n        self.widget.controls.stratify.setChecked(True)\n        self.send_signal(\"Data\", unbalanced_data)\n        self.assertTrue(self.widget.Warning.could_not_stratify.is_shown())\n\n    def test_bootstrap(self):\n        self.select_sampling_type(self.widget.Bootstrap)\n\n        self.send_signal(\"Data\", self.iris)\n\n        in_input = set(self.iris.ids)\n        sample = self.get_output(\"Data Sample\")\n        in_sample = set(sample.ids)\n        in_remaining = set(self.get_output(\"Remaining Data\").ids)\n\n        # Bootstrap should sample len(input) instances\n        self.assertEqual(len(sample), len(self.iris))\n        # Sample and remaining should cover all instances, while none\n        # should be present in both\n        self.assertEqual(len(in_sample | in_remaining), len(in_input))\n        self.assertEqual(len(in_sample & in_remaining), 0)\n        # Sampling with replacement will always produce at least one distinct\n        # instance in sample, and at least one instance in remaining with\n        # high probability (1-(1/150*2/150*...*150/150) ~= 1-2e-64)\n        self.assertGreater(len(in_sample), 0)\n        self.assertGreater(len(in_remaining), 0)\n\n    def select_sampling_type(self, sampling_type):\n        buttons = self.widget.controls.sampling_type.group.buttons()\n        buttons[sampling_type].click()\n\n    def test_no_intersection_in_outputs(self):\n        \"\"\" Check whether outputs intersect and whether length of outputs sums\n        to length of original data\"\"\"\n        self.send_signal(\"Data\", self.iris)\n        w = self.widget\n        sampling_types = [w.FixedProportion, w.FixedSize, w.CrossValidation]\n\n        for replicable in [True, False]:\n            for stratified in [True, False]:\n                for sampling_type in sampling_types:\n                    self.widget.cb_seed.setChecked(replicable)\n                    self.widget.cb_stratify.setChecked(stratified)\n                    self.select_sampling_type(sampling_type)\n                    self.widget.commit()\n\n                    sample = self.get_output(\"Data Sample\")\n                    other = self.get_output(\"Remaining Data\")\n                    self.assertEqual(len(self.iris), len(sample) + len(other))\n                    self.assertNoIntersection(sample, other)\n\n    def test_bigger_size_with_replacement(self):\n        \"\"\"Allow bigger output without replacement.\"\"\"\n        self.send_signal('Data', self.iris[:2])\n        sample_size = self.set_fixed_sample_size(3, with_replacement=True)\n        self.assertEqual(3, sample_size, 'Should be able to set a bigger size '\n                         'with replacement')\n\n    def test_bigger_size_without_replacement(self):\n        \"\"\"Lower output samples to match input's without replacement.\"\"\"\n        self.send_signal('Data', self.iris[:2])\n        sample_size = self.set_fixed_sample_size(3)\n        self.assertEqual(2, sample_size)\n\n    def test_bigger_output_warning(self):\n        \"\"\"Should warn when sample size is bigger than input.\"\"\"\n        self.send_signal('Data', self.iris[:2])\n        self.set_fixed_sample_size(3, with_replacement=True)\n        self.assertTrue(self.widget.Warning.bigger_sample.is_shown())\n\n    def test_shuffling(self):\n        self.send_signal('Data', self.iris)\n\n        self.set_fixed_sample_size(150)\n        self.assertFalse(self.widget.Warning.bigger_sample.is_shown())\n        sample = self.get_output(\"Data Sample\")\n        self.assertTrue((self.iris.ids != sample.ids).any())\n        self.assertEqual(set(self.iris.ids), set(sample.ids))\n\n        self.select_sampling_type(self.widget.FixedProportion)\n        self.widget.sampleSizePercentage = 100\n        self.widget.commit()\n        sample = self.get_output(\"Data Sample\")\n        self.assertTrue((self.iris.ids != sample.ids).any())\n        self.assertEqual(set(self.iris.ids), set(sample.ids))\n\n    def set_fixed_sample_size(self, sample_size, with_replacement=False):\n        \"\"\"Set fixed sample size and return the number of gui spin.\n\n        Return the actual number in gui so we can check whether it is different\n        from sample_size. The number can be changed depending on the spin\n        maximum value.\n        \"\"\"\n        self.select_sampling_type(self.widget.FixedSize)\n        self.widget.controls.replacement.setChecked(with_replacement)\n        self.widget.sampleSizeSpin.setValue(sample_size)\n        self.widget.commit()\n        return self.widget.sampleSizeSpin.value()\n\n    def set_fixed_proportion(self, proportion):\n        \"\"\"Set fixed sample proportion.\n        \"\"\"\n        self.select_sampling_type(self.widget.FixedProportion)\n        self.widget.sampleSizePercentageSlider.setValue(proportion)\n        self.widget.commit()\n\n    def assertNoIntersection(self, sample, other):\n        self.assertFalse(bool(set(sample.ids) & set(other.ids)))\n\n    def test_cv_outputs(self):\n        w = self.widget\n        self.send_signal(w.Inputs.data, self.iris)\n\n        self.select_sampling_type(w.CrossValidation)\n        self.widget.commit()\n        self.assertEqual(len(self.get_output(w.Outputs.data_sample)), 135)\n        self.assertEqual(len(self.get_output(w.Outputs.remaining_data)), 15)\n\n    def test_cv_output_migration(self):\n        self.assertFalse(self.widget.compatibility_mode)\n\n        settings = {\"sampling_type\": OWDataSampler.CrossValidation}\n        OWDataSampler.migrate_settings(settings, version=2)\n        self.assertFalse(settings.get(\"compatibility_mode\", False))\n\n        settings = {\"sampling_type\": OWDataSampler.FixedProportion}\n        OWDataSampler.migrate_settings(settings, version=1)\n        self.assertFalse(settings.get(\"compatibility_mode\", False))\n\n        settings = {\"sampling_type\": OWDataSampler.CrossValidation}\n        OWDataSampler.migrate_settings(settings, version=1)\n        self.assertTrue(settings[\"compatibility_mode\"])\n\n        w = self.create_widget(\n            OWDataSampler,\n            stored_settings={\"sampling_type\": OWDataSampler.CrossValidation,\n                             \"__version__\": 1})\n        self.assertTrue(w.compatibility_mode)\n\n        self.send_signal(w.Inputs.data, self.iris)\n        self.select_sampling_type(w.CrossValidation)\n        w.commit()\n        self.assertEqual(len(self.get_output(w.Outputs.data_sample)), 15)\n        self.assertEqual(len(self.get_output(w.Outputs.remaining_data)), 135)\n\n    def test_empty_sample(self):\n        w = self.widget\n        self.send_signal(w.Inputs.data, self.iris)\n\n        self.set_fixed_sample_size(150)\n        self.assertEqual(len(self.get_output(w.Outputs.data_sample)), 150)\n        self.assertEqual(len(self.get_output(w.Outputs.remaining_data)), 0)\n\n        self.set_fixed_sample_size(0)\n        self.assertEqual(len(self.get_output(w.Outputs.data_sample)), 0)\n        self.assertEqual(len(self.get_output(w.Outputs.remaining_data)), 150)\n\n        self.set_fixed_proportion(100)\n        self.assertEqual(len(self.get_output(w.Outputs.data_sample)), 150)\n        self.assertEqual(len(self.get_output(w.Outputs.remaining_data)), 0)\n\n        self.set_fixed_proportion(0)\n        self.assertEqual(len(self.get_output(w.Outputs.data_sample)), 0)\n        self.assertEqual(len(self.get_output(w.Outputs.remaining_data)), 150)\n\n    def test_send_report(self):\n        w = self.widget\n        self.send_signal(w.Inputs.data, self.iris)\n\n        w.stratify = True\n        w.use_seed = True\n\n        self.select_sampling_type(0)\n        w.commit()\n        w.send_report()\n\n        self.select_sampling_type(1)\n        w.sampleSizeNumber = 1\n        w.commit()\n        w.send_report()\n\n        w.sampleSizeNumber = 10\n        w.replacement = False\n        w.commit()\n        w.send_report()\n\n        w.replacement = True\n        w.commit()\n        w.send_report()\n\n        self.select_sampling_type(2)\n        w.commit()\n        w.send_report()\n\n        self.select_sampling_type(3)\n        w.commit()\n        w.send_report()",
                            "ast_type_str": "ClassDef",
                            "start_lineno": 180,
                            "end_lineno": 198,
                            "parent": {
                                "file_name": "Orange/widgets/data/tests/test_owdatasampler.py",
                                "type": "class",
                                "name": "TestOWDataSampler",
                                "content": "class TestOWDataSampler(WidgetTest):\n    @classmethod\n    def setUpClass(cls):\n        super().setUpClass()\n        cls.iris = Table(\"iris\")\n        cls.zoo = Table(\"zoo\")\n\n    def setUp(self):\n        self.widget = self.create_widget(OWDataSampler)  # type: OWDataSampler\n\n    def test_error_message(self):\n        \"\"\" Check if error message appears and then disappears when\n        data is removed from input\"\"\"\n        self.widget.controls.sampling_type.buttons[2].click()\n        self.send_signal(\"Data\", self.iris)\n        self.assertFalse(self.widget.Error.too_many_folds.is_shown())\n        self.send_signal(\"Data\", self.iris[:5])\n        self.assertTrue(self.widget.Error.too_many_folds.is_shown())\n        self.send_signal(\"Data\", None)\n        self.assertFalse(self.widget.Error.too_many_folds.is_shown())\n        self.send_signal(\"Data\", Table.from_domain(self.iris.domain))\n        self.assertTrue(self.widget.Error.no_data.is_shown())\n\n    def test_stratified_on_unbalanced_data(self):\n        unbalanced_data = self.iris[:51]\n\n        self.widget.controls.stratify.setChecked(True)\n        self.send_signal(\"Data\", unbalanced_data)\n        self.assertTrue(self.widget.Warning.could_not_stratify.is_shown())\n\n    def test_bootstrap(self):\n        self.select_sampling_type(self.widget.Bootstrap)\n\n        self.send_signal(\"Data\", self.iris)\n\n        in_input = set(self.iris.ids)\n        sample = self.get_output(\"Data Sample\")\n        in_sample = set(sample.ids)\n        in_remaining = set(self.get_output(\"Remaining Data\").ids)\n\n        # Bootstrap should sample len(input) instances\n        self.assertEqual(len(sample), len(self.iris))\n        # Sample and remaining should cover all instances, while none\n        # should be present in both\n        self.assertEqual(len(in_sample | in_remaining), len(in_input))\n        self.assertEqual(len(in_sample & in_remaining), 0)\n        # Sampling with replacement will always produce at least one distinct\n        # instance in sample, and at least one instance in remaining with\n        # high probability (1-(1/150*2/150*...*150/150) ~= 1-2e-64)\n        self.assertGreater(len(in_sample), 0)\n        self.assertGreater(len(in_remaining), 0)\n\n    def select_sampling_type(self, sampling_type):\n        buttons = self.widget.controls.sampling_type.group.buttons()\n        buttons[sampling_type].click()\n\n    def test_no_intersection_in_outputs(self):\n        \"\"\" Check whether outputs intersect and whether length of outputs sums\n        to length of original data\"\"\"\n        self.send_signal(\"Data\", self.iris)\n        w = self.widget\n        sampling_types = [w.FixedProportion, w.FixedSize, w.CrossValidation]\n\n        for replicable in [True, False]:\n            for stratified in [True, False]:\n                for sampling_type in sampling_types:\n                    self.widget.cb_seed.setChecked(replicable)\n                    self.widget.cb_stratify.setChecked(stratified)\n                    self.select_sampling_type(sampling_type)\n                    self.widget.commit()\n\n                    sample = self.get_output(\"Data Sample\")\n                    other = self.get_output(\"Remaining Data\")\n                    self.assertEqual(len(self.iris), len(sample) + len(other))\n                    self.assertNoIntersection(sample, other)\n\n    def test_bigger_size_with_replacement(self):\n        \"\"\"Allow bigger output without replacement.\"\"\"\n        self.send_signal('Data', self.iris[:2])\n        sample_size = self.set_fixed_sample_size(3, with_replacement=True)\n        self.assertEqual(3, sample_size, 'Should be able to set a bigger size '\n                         'with replacement')\n\n    def test_bigger_size_without_replacement(self):\n        \"\"\"Lower output samples to match input's without replacement.\"\"\"\n        self.send_signal('Data', self.iris[:2])\n        sample_size = self.set_fixed_sample_size(3)\n        self.assertEqual(2, sample_size)\n\n    def test_bigger_output_warning(self):\n        \"\"\"Should warn when sample size is bigger than input.\"\"\"\n        self.send_signal('Data', self.iris[:2])\n        self.set_fixed_sample_size(3, with_replacement=True)\n        self.assertTrue(self.widget.Warning.bigger_sample.is_shown())\n\n    def test_shuffling(self):\n        self.send_signal('Data', self.iris)\n\n        self.set_fixed_sample_size(150)\n        self.assertFalse(self.widget.Warning.bigger_sample.is_shown())\n        sample = self.get_output(\"Data Sample\")\n        self.assertTrue((self.iris.ids != sample.ids).any())\n        self.assertEqual(set(self.iris.ids), set(sample.ids))\n\n        self.select_sampling_type(self.widget.FixedProportion)\n        self.widget.sampleSizePercentage = 100\n        self.widget.commit()\n        sample = self.get_output(\"Data Sample\")\n        self.assertTrue((self.iris.ids != sample.ids).any())\n        self.assertEqual(set(self.iris.ids), set(sample.ids))\n\n    def set_fixed_sample_size(self, sample_size, with_replacement=False):\n        \"\"\"Set fixed sample size and return the number of gui spin.\n\n        Return the actual number in gui so we can check whether it is different\n        from sample_size. The number can be changed depending on the spin\n        maximum value.\n        \"\"\"\n        self.select_sampling_type(self.widget.FixedSize)\n        self.widget.controls.replacement.setChecked(with_replacement)\n        self.widget.sampleSizeSpin.setValue(sample_size)\n        self.widget.commit()\n        return self.widget.sampleSizeSpin.value()\n\n    def set_fixed_proportion(self, proportion):\n        \"\"\"Set fixed sample proportion.\n        \"\"\"\n        self.select_sampling_type(self.widget.FixedProportion)\n        self.widget.sampleSizePercentageSlider.setValue(proportion)\n        self.widget.commit()\n\n    def assertNoIntersection(self, sample, other):\n        self.assertFalse(bool(set(sample.ids) & set(other.ids)))\n\n    def test_cv_outputs(self):\n        w = self.widget\n        self.send_signal(w.Inputs.data, self.iris)\n\n        self.select_sampling_type(w.CrossValidation)\n        self.widget.commit()\n        self.assertEqual(len(self.get_output(w.Outputs.data_sample)), 135)\n        self.assertEqual(len(self.get_output(w.Outputs.remaining_data)), 15)\n\n    def test_cv_output_migration(self):\n        self.assertFalse(self.widget.compatibility_mode)\n\n        settings = {\"sampling_type\": OWDataSampler.CrossValidation}\n        OWDataSampler.migrate_settings(settings, version=2)\n        self.assertFalse(settings.get(\"compatibility_mode\", False))\n\n        settings = {\"sampling_type\": OWDataSampler.FixedProportion}\n        OWDataSampler.migrate_settings(settings, version=1)\n        self.assertFalse(settings.get(\"compatibility_mode\", False))\n\n        settings = {\"sampling_type\": OWDataSampler.CrossValidation}\n        OWDataSampler.migrate_settings(settings, version=1)\n        self.assertTrue(settings[\"compatibility_mode\"])\n\n        w = self.create_widget(\n            OWDataSampler,\n            stored_settings={\"sampling_type\": OWDataSampler.CrossValidation,\n                             \"__version__\": 1})\n        self.assertTrue(w.compatibility_mode)\n\n        self.send_signal(w.Inputs.data, self.iris)\n        self.select_sampling_type(w.CrossValidation)\n        w.commit()\n        self.assertEqual(len(self.get_output(w.Outputs.data_sample)), 15)\n        self.assertEqual(len(self.get_output(w.Outputs.remaining_data)), 135)\n\n    def test_empty_sample(self):\n        w = self.widget\n        self.send_signal(w.Inputs.data, self.iris)\n\n        self.set_fixed_sample_size(150)\n        self.assertEqual(len(self.get_output(w.Outputs.data_sample)), 150)\n        self.assertEqual(len(self.get_output(w.Outputs.remaining_data)), 0)\n\n        self.set_fixed_sample_size(0)\n        self.assertEqual(len(self.get_output(w.Outputs.data_sample)), 0)\n        self.assertEqual(len(self.get_output(w.Outputs.remaining_data)), 150)\n\n        self.set_fixed_proportion(100)\n        self.assertEqual(len(self.get_output(w.Outputs.data_sample)), 150)\n        self.assertEqual(len(self.get_output(w.Outputs.remaining_data)), 0)\n\n        self.set_fixed_proportion(0)\n        self.assertEqual(len(self.get_output(w.Outputs.data_sample)), 0)\n        self.assertEqual(len(self.get_output(w.Outputs.remaining_data)), 150)\n\n    def test_send_report(self):\n        w = self.widget\n        self.send_signal(w.Inputs.data, self.iris)\n\n        w.stratify = True\n        w.use_seed = True\n\n        self.select_sampling_type(0)\n        w.commit()\n        w.send_report()\n\n        self.select_sampling_type(1)\n        w.sampleSizeNumber = 1\n        w.commit()\n        w.send_report()\n\n        w.sampleSizeNumber = 10\n        w.replacement = False\n        w.commit()\n        w.send_report()\n\n        w.replacement = True\n        w.commit()\n        w.send_report()\n\n        self.select_sampling_type(2)\n        w.commit()\n        w.send_report()\n\n        self.select_sampling_type(3)\n        w.commit()\n        w.send_report()",
                                "ast_type_str": "ClassDef",
                                "start_lineno": 10,
                                "end_lineno": 231,
                                "parent": null
                            }
                        }
                    ],
                    "deleted_entities": []
                }
            ]
        }
    ],
    "old_commit_hash": "3423a8ea9a827f778a13129d31cb21df9cc05b5e^",
    "new_commit_hash": "3423a8ea9a827f778a13129d31cb21df9cc05b5e",
    "commit_message": "Merge pull request #6208 from janezd/datasample-zero-size\n\n[FIX] Data Sampler: Fix crash when requesting an empty sample",
    "commit_date": "2022-12-01T14:03:30+01:00",
    "metadata": {}
}
{
    "repo_name": "orange3",
    "new_commit_hash": "3423a8ea9a827f778a13129d31cb21df9cc05b5e",
    "test_file_codes": [
        "# Test methods with long descriptive names can omit docstrings\n# pylint: disable=missing-docstring,unsubscriptable-object\nimport unittest\n\nfrom Orange.data import Table\nfrom Orange.widgets.data.owdatasampler import OWDataSampler\nfrom Orange.widgets.tests.base import WidgetTest\n\n\nclass TestOWDataSampler(WidgetTest):\n    @classmethod\n    def setUpClass(cls):\n        super().setUpClass()\n        cls.iris = Table(\"iris\")\n        cls.zoo = Table(\"zoo\")\n\n    def setUp(self):\n        self.widget = self.create_widget(OWDataSampler)  # type: OWDataSampler\n\n    def test_error_message(self):\n        \"\"\" Check if error message appears and then disappears when\n        data is removed from input\"\"\"\n        self.widget.controls.sampling_type.buttons[2].click()\n        self.send_signal(\"Data\", self.iris)\n        self.assertFalse(self.widget.Error.too_many_folds.is_shown())\n        self.send_signal(\"Data\", self.iris[:5])\n        self.assertTrue(self.widget.Error.too_many_folds.is_shown())\n        self.send_signal(\"Data\", None)\n        self.assertFalse(self.widget.Error.too_many_folds.is_shown())\n        self.send_signal(\"Data\", Table.from_domain(self.iris.domain))\n        self.assertTrue(self.widget.Error.no_data.is_shown())\n\n    def test_stratified_on_unbalanced_data(self):\n        unbalanced_data = self.iris[:51]\n\n        self.widget.controls.stratify.setChecked(True)\n        self.send_signal(\"Data\", unbalanced_data)\n        self.assertTrue(self.widget.Warning.could_not_stratify.is_shown())\n\n    def test_bootstrap(self):\n        self.select_sampling_type(self.widget.Bootstrap)\n\n        self.send_signal(\"Data\", self.iris)\n\n        in_input = set(self.iris.ids)\n        sample = self.get_output(\"Data Sample\")\n        in_sample = set(sample.ids)\n        in_remaining = set(self.get_output(\"Remaining Data\").ids)\n\n        # Bootstrap should sample len(input) instances\n        self.assertEqual(len(sample), len(self.iris))\n        # Sample and remaining should cover all instances, while none\n        # should be present in both\n        self.assertEqual(len(in_sample | in_remaining), len(in_input))\n        self.assertEqual(len(in_sample & in_remaining), 0)\n        # Sampling with replacement will always produce at least one distinct\n        # instance in sample, and at least one instance in remaining with\n        # high probability (1-(1/150*2/150*...*150/150) ~= 1-2e-64)\n        self.assertGreater(len(in_sample), 0)\n        self.assertGreater(len(in_remaining), 0)\n\n    def select_sampling_type(self, sampling_type):\n        buttons = self.widget.controls.sampling_type.group.buttons()\n        buttons[sampling_type].click()\n\n    def test_no_intersection_in_outputs(self):\n        \"\"\" Check whether outputs intersect and whether length of outputs sums\n        to length of original data\"\"\"\n        self.send_signal(\"Data\", self.iris)\n        w = self.widget\n        sampling_types = [w.FixedProportion, w.FixedSize, w.CrossValidation]\n\n        for replicable in [True, False]:\n            for stratified in [True, False]:\n                for sampling_type in sampling_types:\n                    self.widget.cb_seed.setChecked(replicable)\n                    self.widget.cb_stratify.setChecked(stratified)\n                    self.select_sampling_type(sampling_type)\n                    self.widget.commit()\n\n                    sample = self.get_output(\"Data Sample\")\n                    other = self.get_output(\"Remaining Data\")\n                    self.assertEqual(len(self.iris), len(sample) + len(other))\n                    self.assertNoIntersection(sample, other)\n\n    def test_bigger_size_with_replacement(self):\n        \"\"\"Allow bigger output without replacement.\"\"\"\n        self.send_signal('Data', self.iris[:2])\n        sample_size = self.set_fixed_sample_size(3, with_replacement=True)\n        self.assertEqual(3, sample_size, 'Should be able to set a bigger size '\n                         'with replacement')\n\n    def test_bigger_size_without_replacement(self):\n        \"\"\"Lower output samples to match input's without replacement.\"\"\"\n        self.send_signal('Data', self.iris[:2])\n        sample_size = self.set_fixed_sample_size(3)\n        self.assertEqual(2, sample_size)\n\n    def test_bigger_output_warning(self):\n        \"\"\"Should warn when sample size is bigger than input.\"\"\"\n        self.send_signal('Data', self.iris[:2])\n        self.set_fixed_sample_size(3, with_replacement=True)\n        self.assertTrue(self.widget.Warning.bigger_sample.is_shown())\n\n    def test_shuffling(self):\n        self.send_signal('Data', self.iris)\n\n        self.set_fixed_sample_size(150)\n        self.assertFalse(self.widget.Warning.bigger_sample.is_shown())\n        sample = self.get_output(\"Data Sample\")\n        self.assertTrue((self.iris.ids != sample.ids).any())\n        self.assertEqual(set(self.iris.ids), set(sample.ids))\n\n        self.select_sampling_type(self.widget.FixedProportion)\n        self.widget.sampleSizePercentage = 100\n        self.widget.commit()\n        sample = self.get_output(\"Data Sample\")\n        self.assertTrue((self.iris.ids != sample.ids).any())\n        self.assertEqual(set(self.iris.ids), set(sample.ids))\n\n    def set_fixed_sample_size(self, sample_size, with_replacement=False):\n        \"\"\"Set fixed sample size and return the number of gui spin.\n\n        Return the actual number in gui so we can check whether it is different\n        from sample_size. The number can be changed depending on the spin\n        maximum value.\n        \"\"\"\n        self.select_sampling_type(self.widget.FixedSize)\n        self.widget.controls.replacement.setChecked(with_replacement)\n        self.widget.sampleSizeSpin.setValue(sample_size)\n        self.widget.commit()\n        return self.widget.sampleSizeSpin.value()\n\n    def set_fixed_proportion(self, proportion):\n        \"\"\"Set fixed sample proportion.\n        \"\"\"\n        self.select_sampling_type(self.widget.FixedProportion)\n        self.widget.sampleSizePercentageSlider.setValue(proportion)\n        self.widget.commit()\n\n    def assertNoIntersection(self, sample, other):\n        self.assertFalse(bool(set(sample.ids) & set(other.ids)))\n\n    def test_cv_outputs(self):\n        w = self.widget\n        self.send_signal(w.Inputs.data, self.iris)\n\n        self.select_sampling_type(w.CrossValidation)\n        self.widget.commit()\n        self.assertEqual(len(self.get_output(w.Outputs.data_sample)), 135)\n        self.assertEqual(len(self.get_output(w.Outputs.remaining_data)), 15)\n\n    def test_cv_output_migration(self):\n        self.assertFalse(self.widget.compatibility_mode)\n\n        settings = {\"sampling_type\": OWDataSampler.CrossValidation}\n        OWDataSampler.migrate_settings(settings, version=2)\n        self.assertFalse(settings.get(\"compatibility_mode\", False))\n\n        settings = {\"sampling_type\": OWDataSampler.FixedProportion}\n        OWDataSampler.migrate_settings(settings, version=1)\n        self.assertFalse(settings.get(\"compatibility_mode\", False))\n\n        settings = {\"sampling_type\": OWDataSampler.CrossValidation}\n        OWDataSampler.migrate_settings(settings, version=1)\n        self.assertTrue(settings[\"compatibility_mode\"])\n\n        w = self.create_widget(\n            OWDataSampler,\n            stored_settings={\"sampling_type\": OWDataSampler.CrossValidation,\n                             \"__version__\": 1})\n        self.assertTrue(w.compatibility_mode)\n\n        self.send_signal(w.Inputs.data, self.iris)\n        self.select_sampling_type(w.CrossValidation)\n        w.commit()\n        self.assertEqual(len(self.get_output(w.Outputs.data_sample)), 15)\n        self.assertEqual(len(self.get_output(w.Outputs.remaining_data)), 135)\n\n    def test_empty_sample(self):\n        w = self.widget\n        self.send_signal(w.Inputs.data, self.iris)\n\n        self.set_fixed_sample_size(150)\n        self.assertEqual(len(self.get_output(w.Outputs.data_sample)), 150)\n        self.assertEqual(len(self.get_output(w.Outputs.remaining_data)), 0)\n\n        self.set_fixed_sample_size(0)\n        self.assertEqual(len(self.get_output(w.Outputs.data_sample)), 0)\n        self.assertEqual(len(self.get_output(w.Outputs.remaining_data)), 150)\n\n        self.set_fixed_proportion(100)\n        self.assertEqual(len(self.get_output(w.Outputs.data_sample)), 150)\n        self.assertEqual(len(self.get_output(w.Outputs.remaining_data)), 0)\n\n        self.set_fixed_proportion(0)\n        self.assertEqual(len(self.get_output(w.Outputs.data_sample)), 0)\n        self.assertEqual(len(self.get_output(w.Outputs.remaining_data)), 150)\n\n    def test_send_report(self):\n        w = self.widget\n        self.send_signal(w.Inputs.data, self.iris)\n\n        w.stratify = True\n        w.use_seed = True\n\n        self.select_sampling_type(0)\n        w.commit()\n        w.send_report()\n\n        self.select_sampling_type(1)\n        w.sampleSizeNumber = 1\n        w.commit()\n        w.send_report()\n\n        w.sampleSizeNumber = 10\n        w.replacement = False\n        w.commit()\n        w.send_report()\n\n        w.replacement = True\n        w.commit()\n        w.send_report()\n\n        self.select_sampling_type(2)\n        w.commit()\n        w.send_report()\n\n        self.select_sampling_type(3)\n        w.commit()\n        w.send_report()\n\n\nif __name__ == \"__main__\":\n    unittest.main()\n"
    ],
    "test_file_names": [
        "test_1.py"
    ],
    "setup_res_code": 0,
    "setup_res_stdout": "Starting Orange installation attempts...\nAttempting installation with Python 3.7...\nrunning build_ext\nCompiling Orange/classification/_tree_scorers.pyx because it changed.\nCompiling Orange/data/_contingency.pyx because it changed.\nCompiling Orange/data/_io.pyx because it changed.\nCompiling Orange/data/_valuecount.pyx because it changed.\nCompiling Orange/data/_variable.pyx because it changed.\nCompiling Orange/distance/_distance.pyx because it changed.\nCompiling Orange/preprocess/_discretize.pyx because it changed.\nCompiling Orange/preprocess/_relieff.pyx because it changed.\nCompiling Orange/projection/_som.pyx because it changed.\n[1/9] Cythonizing Orange/classification/_tree_scorers.pyx\n[2/9] Cythonizing Orange/data/_contingency.pyx\n[3/9] Cythonizing Orange/data/_io.pyx\n[4/9] Cythonizing Orange/data/_valuecount.pyx\n[5/9] Cythonizing Orange/data/_variable.pyx\n[6/9] Cythonizing Orange/distance/_distance.pyx\n[7/9] Cythonizing Orange/preprocess/_discretize.pyx\n[8/9] Cythonizing Orange/preprocess/_relieff.pyx\n[9/9] Cythonizing Orange/projection/_som.pyx\nbuilding 'Orange.classification._tree_scorers' extension\ncreating build\ncreating build/temp.linux-x86_64-3.7\ncreating build/temp.linux-x86_64-3.7/Orange\ncreating build/temp.linux-x86_64-3.7/Orange/classification\ncc -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tools/deps/include -I/tools/deps/include/ncursesw -fPIC -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.7/site-packages/numpy/core/include -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/include -I/home/gcpuser/.local/share/uv/python/cpython-3.7.9-linux-x86_64-gnu/include/python3.7m -c Orange/classification/_tree_scorers.c -o build/temp.linux-x86_64-3.7/Orange/classification/_tree_scorers.o\ncreating build/lib.linux-x86_64-3.7\ncreating build/lib.linux-x86_64-3.7/Orange\ncreating build/lib.linux-x86_64-3.7/Orange/classification\ncc -pthread -shared -L/tools/deps/lib build/temp.linux-x86_64-3.7/Orange/classification/_tree_scorers.o -L/home/gcpuser/.local/share/uv/python/cpython-3.7.9-linux-x86_64-gnu/lib -lm -lpython3.7m -o build/lib.linux-x86_64-3.7/Orange/classification/_tree_scorers.cpython-37m-x86_64-linux-gnu.so\nbuilding 'Orange.data._contingency' extension\ncreating build/temp.linux-x86_64-3.7/Orange/data\ncc -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tools/deps/include -I/tools/deps/include/ncursesw -fPIC -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.7/site-packages/numpy/core/include -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/include -I/home/gcpuser/.local/share/uv/python/cpython-3.7.9-linux-x86_64-gnu/include/python3.7m -c Orange/data/_contingency.c -o build/temp.linux-x86_64-3.7/Orange/data/_contingency.o\ncreating build/lib.linux-x86_64-3.7/Orange/data\ncc -pthread -shared -L/tools/deps/lib build/temp.linux-x86_64-3.7/Orange/data/_contingency.o -L/home/gcpuser/.local/share/uv/python/cpython-3.7.9-linux-x86_64-gnu/lib -lm -lpython3.7m -o build/lib.linux-x86_64-3.7/Orange/data/_contingency.cpython-37m-x86_64-linux-gnu.so\nbuilding 'Orange.data._io' extension\ncc -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tools/deps/include -I/tools/deps/include/ncursesw -fPIC -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.7/site-packages/numpy/core/include -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/include -I/home/gcpuser/.local/share/uv/python/cpython-3.7.9-linux-x86_64-gnu/include/python3.7m -c Orange/data/_io.c -o build/temp.linux-x86_64-3.7/Orange/data/_io.o\ncc -pthread -shared -L/tools/deps/lib build/temp.linux-x86_64-3.7/Orange/data/_io.o -L/home/gcpuser/.local/share/uv/python/cpython-3.7.9-linux-x86_64-gnu/lib -lm -lpython3.7m -o build/lib.linux-x86_64-3.7/Orange/data/_io.cpython-37m-x86_64-linux-gnu.so\nbuilding 'Orange.data._valuecount' extension\ncc -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tools/deps/include -I/tools/deps/include/ncursesw -fPIC -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.7/site-packages/numpy/core/include -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/include -I/home/gcpuser/.local/share/uv/python/cpython-3.7.9-linux-x86_64-gnu/include/python3.7m -c Orange/data/_valuecount.c -o build/temp.linux-x86_64-3.7/Orange/data/_valuecount.o\ncc -pthread -shared -L/tools/deps/lib build/temp.linux-x86_64-3.7/Orange/data/_valuecount.o -L/home/gcpuser/.local/share/uv/python/cpython-3.7.9-linux-x86_64-gnu/lib -lm -lpython3.7m -o build/lib.linux-x86_64-3.7/Orange/data/_valuecount.cpython-37m-x86_64-linux-gnu.so\nbuilding 'Orange.data._variable' extension\ncc -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tools/deps/include -I/tools/deps/include/ncursesw -fPIC -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.7/site-packages/numpy/core/include -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/include -I/home/gcpuser/.local/share/uv/python/cpython-3.7.9-linux-x86_64-gnu/include/python3.7m -c Orange/data/_variable.c -o build/temp.linux-x86_64-3.7/Orange/data/_variable.o\ncc -pthread -shared -L/tools/deps/lib build/temp.linux-x86_64-3.7/Orange/data/_variable.o -L/home/gcpuser/.local/share/uv/python/cpython-3.7.9-linux-x86_64-gnu/lib -lm -lpython3.7m -o build/lib.linux-x86_64-3.7/Orange/data/_variable.cpython-37m-x86_64-linux-gnu.so\nbuilding 'Orange.distance._distance' extension\ncreating build/temp.linux-x86_64-3.7/Orange/distance\ncc -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tools/deps/include -I/tools/deps/include/ncursesw -fPIC -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.7/site-packages/numpy/core/include -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/include -I/home/gcpuser/.local/share/uv/python/cpython-3.7.9-linux-x86_64-gnu/include/python3.7m -c Orange/distance/_distance.c -o build/temp.linux-x86_64-3.7/Orange/distance/_distance.o\ncreating build/lib.linux-x86_64-3.7/Orange/distance\ncc -pthread -shared -L/tools/deps/lib build/temp.linux-x86_64-3.7/Orange/distance/_distance.o -L/home/gcpuser/.local/share/uv/python/cpython-3.7.9-linux-x86_64-gnu/lib -lm -lpython3.7m -o build/lib.linux-x86_64-3.7/Orange/distance/_distance.cpython-37m-x86_64-linux-gnu.so\nbuilding 'Orange.preprocess._discretize' extension\ncreating build/temp.linux-x86_64-3.7/Orange/preprocess\ncc -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tools/deps/include -I/tools/deps/include/ncursesw -fPIC -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.7/site-packages/numpy/core/include -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/include -I/home/gcpuser/.local/share/uv/python/cpython-3.7.9-linux-x86_64-gnu/include/python3.7m -c Orange/preprocess/_discretize.c -o build/temp.linux-x86_64-3.7/Orange/preprocess/_discretize.o\ncreating build/lib.linux-x86_64-3.7/Orange/preprocess\ncc -pthread -shared -L/tools/deps/lib build/temp.linux-x86_64-3.7/Orange/preprocess/_discretize.o -L/home/gcpuser/.local/share/uv/python/cpython-3.7.9-linux-x86_64-gnu/lib -lm -lpython3.7m -o build/lib.linux-x86_64-3.7/Orange/preprocess/_discretize.cpython-37m-x86_64-linux-gnu.so\nbuilding 'Orange.preprocess._relieff' extension\ncc -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tools/deps/include -I/tools/deps/include/ncursesw -fPIC -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.7/site-packages/numpy/core/include -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/include -I/home/gcpuser/.local/share/uv/python/cpython-3.7.9-linux-x86_64-gnu/include/python3.7m -c Orange/preprocess/_relieff.cpp -o build/temp.linux-x86_64-3.7/Orange/preprocess/_relieff.o\nc++ -pthread -shared -L/tools/deps/lib build/temp.linux-x86_64-3.7/Orange/preprocess/_relieff.o -L/home/gcpuser/.local/share/uv/python/cpython-3.7.9-linux-x86_64-gnu/lib -lm -lpython3.7m -o build/lib.linux-x86_64-3.7/Orange/preprocess/_relieff.cpython-37m-x86_64-linux-gnu.so\nbuilding 'Orange.projection._som' extension\ncreating build/temp.linux-x86_64-3.7/Orange/projection\ncc -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tools/deps/include -I/tools/deps/include/ncursesw -fPIC -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.7/site-packages/numpy/core/include -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/include -I/home/gcpuser/.local/share/uv/python/cpython-3.7.9-linux-x86_64-gnu/include/python3.7m -c Orange/projection/_som.c -o build/temp.linux-x86_64-3.7/Orange/projection/_som.o\ncreating build/lib.linux-x86_64-3.7/Orange/projection\ncc -pthread -shared -L/tools/deps/lib build/temp.linux-x86_64-3.7/Orange/projection/_som.o -L/home/gcpuser/.local/share/uv/python/cpython-3.7.9-linux-x86_64-gnu/lib -lm -lpython3.7m -o build/lib.linux-x86_64-3.7/Orange/projection/_som.cpython-37m-x86_64-linux-gnu.so\nbuilding 'Orange.classification._simple_tree' extension\ncc -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tools/deps/include -I/tools/deps/include/ncursesw -fPIC -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.7/site-packages/numpy/core/include -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/include -I/home/gcpuser/.local/share/uv/python/cpython-3.7.9-linux-x86_64-gnu/include/python3.7m -c Orange/classification/_simple_tree.c -o build/temp.linux-x86_64-3.7/Orange/classification/_simple_tree.o\ncc -pthread -shared -L/tools/deps/lib build/temp.linux-x86_64-3.7/Orange/classification/_simple_tree.o -L/home/gcpuser/.local/share/uv/python/cpython-3.7.9-linux-x86_64-gnu/lib -lm -lpython3.7m -o build/lib.linux-x86_64-3.7/Orange/classification/_simple_tree.cpython-37m-x86_64-linux-gnu.so\nbuilding 'Orange.widgets.utils._grid_density' extension\ncreating build/temp.linux-x86_64-3.7/Orange/widgets\ncreating build/temp.linux-x86_64-3.7/Orange/widgets/utils\ncc -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/tools/deps/include -I/tools/deps/include/ncursesw -fPIC -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.7/site-packages/numpy/core/include -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/include -I/home/gcpuser/.local/share/uv/python/cpython-3.7.9-linux-x86_64-gnu/include/python3.7m -c Orange/widgets/utils/_grid_density.cpp -o build/temp.linux-x86_64-3.7/Orange/widgets/utils/_grid_density.o\ncreating build/lib.linux-x86_64-3.7/Orange/widgets\ncreating build/lib.linux-x86_64-3.7/Orange/widgets/utils\nc++ -pthread -shared -L/tools/deps/lib build/temp.linux-x86_64-3.7/Orange/widgets/utils/_grid_density.o -L/home/gcpuser/.local/share/uv/python/cpython-3.7.9-linux-x86_64-gnu/lib -lm -lpython3.7m -o build/lib.linux-x86_64-3.7/Orange/widgets/utils/_grid_density.cpython-37m-x86_64-linux-gnu.so\ncopying build/lib.linux-x86_64-3.7/Orange/classification/_tree_scorers.cpython-37m-x86_64-linux-gnu.so -> Orange/classification\ncopying build/lib.linux-x86_64-3.7/Orange/data/_contingency.cpython-37m-x86_64-linux-gnu.so -> Orange/data\ncopying build/lib.linux-x86_64-3.7/Orange/data/_io.cpython-37m-x86_64-linux-gnu.so -> Orange/data\ncopying build/lib.linux-x86_64-3.7/Orange/data/_valuecount.cpython-37m-x86_64-linux-gnu.so -> Orange/data\ncopying build/lib.linux-x86_64-3.7/Orange/data/_variable.cpython-37m-x86_64-linux-gnu.so -> Orange/data\ncopying build/lib.linux-x86_64-3.7/Orange/distance/_distance.cpython-37m-x86_64-linux-gnu.so -> Orange/distance\ncopying build/lib.linux-x86_64-3.7/Orange/preprocess/_discretize.cpython-37m-x86_64-linux-gnu.so -> Orange/preprocess\ncopying build/lib.linux-x86_64-3.7/Orange/preprocess/_relieff.cpython-37m-x86_64-linux-gnu.so -> Orange/preprocess\ncopying build/lib.linux-x86_64-3.7/Orange/projection/_som.cpython-37m-x86_64-linux-gnu.so -> Orange/projection\ncopying build/lib.linux-x86_64-3.7/Orange/classification/_simple_tree.cpython-37m-x86_64-linux-gnu.so -> Orange/classification\ncopying build/lib.linux-x86_64-3.7/Orange/widgets/utils/_grid_density.cpython-37m-x86_64-linux-gnu.so -> Orange/widgets/utils\nrunning develop\nrunning egg_info\ncreating Orange3.egg-info\nwriting Orange3.egg-info/PKG-INFO\nwriting dependency_links to Orange3.egg-info/dependency_links.txt\nwriting entry points to Orange3.egg-info/entry_points.txt\nwriting requirements to Orange3.egg-info/requires.txt\nwriting top-level names to Orange3.egg-info/top_level.txt\nwriting manifest file 'Orange3.egg-info/SOURCES.txt'\nreading manifest file 'Orange3.egg-info/SOURCES.txt'\nreading manifest template 'MANIFEST.in'\nadding license file 'LICENSE'\nwriting manifest file 'Orange3.egg-info/SOURCES.txt'\nrunning build_ext\ncopying build/lib.linux-x86_64-3.7/Orange/classification/_tree_scorers.cpython-37m-x86_64-linux-gnu.so -> Orange/classification\ncopying build/lib.linux-x86_64-3.7/Orange/data/_contingency.cpython-37m-x86_64-linux-gnu.so -> Orange/data\ncopying build/lib.linux-x86_64-3.7/Orange/data/_io.cpython-37m-x86_64-linux-gnu.so -> Orange/data\ncopying build/lib.linux-x86_64-3.7/Orange/data/_valuecount.cpython-37m-x86_64-linux-gnu.so -> Orange/data\ncopying build/lib.linux-x86_64-3.7/Orange/data/_variable.cpython-37m-x86_64-linux-gnu.so -> Orange/data\ncopying build/lib.linux-x86_64-3.7/Orange/distance/_distance.cpython-37m-x86_64-linux-gnu.so -> Orange/distance\ncopying build/lib.linux-x86_64-3.7/Orange/preprocess/_discretize.cpython-37m-x86_64-linux-gnu.so -> Orange/preprocess\ncopying build/lib.linux-x86_64-3.7/Orange/preprocess/_relieff.cpython-37m-x86_64-linux-gnu.so -> Orange/preprocess\ncopying build/lib.linux-x86_64-3.7/Orange/projection/_som.cpython-37m-x86_64-linux-gnu.so -> Orange/projection\ncopying build/lib.linux-x86_64-3.7/Orange/classification/_simple_tree.cpython-37m-x86_64-linux-gnu.so -> Orange/classification\ncopying build/lib.linux-x86_64-3.7/Orange/widgets/utils/_grid_density.cpython-37m-x86_64-linux-gnu.so -> Orange/widgets/utils\nCreating /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.7/site-packages/Orange3.egg-link (link to .)\nAdding Orange3 3.34.0.dev0+3423a8e to easy-install.pth file\nInstalling orange-canvas script to /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/bin\n\nInstalled /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e\nProcessing dependencies for Orange3==3.34.0.dev0+3423a8e\nSearching for xlsxwriter\nReading https://pypi.org/simple/xlsxwriter/\nDownloading https://files.pythonhosted.org/packages/a7/ea/53d1fe468e63e092cf16e2c18d16f50c29851242f9dd12d6a66e0d7f0d02/XlsxWriter-3.2.0-py3-none-any.whl#sha256=ecfd5405b3e0e228219bcaf24c2ca0915e012ca9464a14048021d21a995d490e\nBest match: XlsxWriter 3.2.0\nProcessing XlsxWriter-3.2.0-py3-none-any.whl\nInstalling XlsxWriter-3.2.0-py3-none-any.whl to /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.7/site-packages\nAdding XlsxWriter 3.2.0 to easy-install.pth file\nInstalling vba_extract.py script to /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/bin\n\nInstalled /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.7/site-packages/XlsxWriter-3.2.0-py3.7.egg\nSearching for xlrd>=1.2.0\nReading https://pypi.org/simple/xlrd/\nDownloading https://files.pythonhosted.org/packages/a6/0c/c2a72d51fe56e08a08acc85d13013558a2d793028ae7385448a6ccdfae64/xlrd-2.0.1-py2.py3-none-any.whl#sha256=6a33ee89877bd9abc1158129f6e94be74e2679636b8a205b43b85206c3f0bbdd\nBest match: xlrd 2.0.1\nProcessing xlrd-2.0.1-py2.py3-none-any.whl\nInstalling xlrd-2.0.1-py2.py3-none-any.whl to /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.7/site-packages\nAdding xlrd 2.0.1 to easy-install.pth file\nInstalling runxlrd.py script to /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/bin\n\nInstalled /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.7/site-packages/xlrd-2.0.1-py3.7.egg\nSearching for serverfiles\nReading https://pypi.org/simple/serverfiles/\nDownloading https://files.pythonhosted.org/packages/33/36/794fe1c4ed29b0f56a26d72e956baf0285d8fe9e29faf36797a28a8ad45b/serverfiles-0.3.1.tar.gz#sha256=5e10fc32e758791e3735bc08bce2ed4702a83b1e45ab96c5d59cc8aeecfbebe1\nBest match: serverfiles 0.3.1\nProcessing serverfiles-0.3.1.tar.gz\nWriting /tmp/easy_install-_bxj2y3f/serverfiles-0.3.1/setup.cfg\nRunning serverfiles-0.3.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-_bxj2y3f/serverfiles-0.3.1/egg-dist-tmp-qaneadba\ncreating /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.7/site-packages/serverfiles-0.3.1-py3.7.egg\nExtracting serverfiles-0.3.1-py3.7.egg to /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.7/site-packages\nAdding serverfiles 0.3.1 to easy-install.pth file\n\nInstalled /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.7/site-packages/serverfiles-0.3.1-py3.7.egg\nSearching for scipy>=1.9\nReading https://pypi.org/simple/scipy/\nDownloading https://files.pythonhosted.org/packages/d9/7b/2b8ac283cf32465ed08bc20a83d559fe7b174a484781702ba8accea001d6/scipy-1.15.0.tar.gz#sha256=300742e2cc94e36a2880ebe464a1c8b4352a7b0f3e36ec3d2ac006cdbe0219ac\nBest match: scipy 1.15.0\nProcessing scipy-1.15.0.tar.gz\nVerifying Orange installation...\n❌ Orange verification failed\nPython 3.7 installation failed, trying Python 3.8...\nAttempting installation with Python 3.8...\nrunning build_ext\nbuilding 'Orange.classification._tree_scorers' extension\ncreating build/temp.linux-x86_64-cpython-38/Orange/classification\ncc -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -fPIC -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages/numpy/core/include -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/include -I/home/gcpuser/.local/share/uv/python/cpython-3.8.20-linux-x86_64-gnu/include/python3.8 -c Orange/classification/_tree_scorers.c -o build/temp.linux-x86_64-cpython-38/Orange/classification/_tree_scorers.o\ncreating build/lib.linux-x86_64-cpython-38/Orange/classification\ncc -pthread -shared -Wl,--exclude-libs,ALL build/temp.linux-x86_64-cpython-38/Orange/classification/_tree_scorers.o -L/home/gcpuser/.local/share/uv/python/cpython-3.8.20-linux-x86_64-gnu/lib -lm -o build/lib.linux-x86_64-cpython-38/Orange/classification/_tree_scorers.cpython-38-x86_64-linux-gnu.so\nbuilding 'Orange.data._contingency' extension\ncreating build/temp.linux-x86_64-cpython-38/Orange/data\ncc -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -fPIC -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages/numpy/core/include -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/include -I/home/gcpuser/.local/share/uv/python/cpython-3.8.20-linux-x86_64-gnu/include/python3.8 -c Orange/data/_contingency.c -o build/temp.linux-x86_64-cpython-38/Orange/data/_contingency.o\ncreating build/lib.linux-x86_64-cpython-38/Orange/data\ncc -pthread -shared -Wl,--exclude-libs,ALL build/temp.linux-x86_64-cpython-38/Orange/data/_contingency.o -L/home/gcpuser/.local/share/uv/python/cpython-3.8.20-linux-x86_64-gnu/lib -lm -o build/lib.linux-x86_64-cpython-38/Orange/data/_contingency.cpython-38-x86_64-linux-gnu.so\nbuilding 'Orange.data._io' extension\ncc -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -fPIC -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages/numpy/core/include -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/include -I/home/gcpuser/.local/share/uv/python/cpython-3.8.20-linux-x86_64-gnu/include/python3.8 -c Orange/data/_io.c -o build/temp.linux-x86_64-cpython-38/Orange/data/_io.o\ncc -pthread -shared -Wl,--exclude-libs,ALL build/temp.linux-x86_64-cpython-38/Orange/data/_io.o -L/home/gcpuser/.local/share/uv/python/cpython-3.8.20-linux-x86_64-gnu/lib -lm -o build/lib.linux-x86_64-cpython-38/Orange/data/_io.cpython-38-x86_64-linux-gnu.so\nbuilding 'Orange.data._valuecount' extension\ncc -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -fPIC -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages/numpy/core/include -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/include -I/home/gcpuser/.local/share/uv/python/cpython-3.8.20-linux-x86_64-gnu/include/python3.8 -c Orange/data/_valuecount.c -o build/temp.linux-x86_64-cpython-38/Orange/data/_valuecount.o\ncc -pthread -shared -Wl,--exclude-libs,ALL build/temp.linux-x86_64-cpython-38/Orange/data/_valuecount.o -L/home/gcpuser/.local/share/uv/python/cpython-3.8.20-linux-x86_64-gnu/lib -lm -o build/lib.linux-x86_64-cpython-38/Orange/data/_valuecount.cpython-38-x86_64-linux-gnu.so\nbuilding 'Orange.data._variable' extension\ncc -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -fPIC -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages/numpy/core/include -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/include -I/home/gcpuser/.local/share/uv/python/cpython-3.8.20-linux-x86_64-gnu/include/python3.8 -c Orange/data/_variable.c -o build/temp.linux-x86_64-cpython-38/Orange/data/_variable.o\ncc -pthread -shared -Wl,--exclude-libs,ALL build/temp.linux-x86_64-cpython-38/Orange/data/_variable.o -L/home/gcpuser/.local/share/uv/python/cpython-3.8.20-linux-x86_64-gnu/lib -lm -o build/lib.linux-x86_64-cpython-38/Orange/data/_variable.cpython-38-x86_64-linux-gnu.so\nbuilding 'Orange.distance._distance' extension\ncreating build/temp.linux-x86_64-cpython-38/Orange/distance\ncc -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -fPIC -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages/numpy/core/include -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/include -I/home/gcpuser/.local/share/uv/python/cpython-3.8.20-linux-x86_64-gnu/include/python3.8 -c Orange/distance/_distance.c -o build/temp.linux-x86_64-cpython-38/Orange/distance/_distance.o\ncreating build/lib.linux-x86_64-cpython-38/Orange/distance\ncc -pthread -shared -Wl,--exclude-libs,ALL build/temp.linux-x86_64-cpython-38/Orange/distance/_distance.o -L/home/gcpuser/.local/share/uv/python/cpython-3.8.20-linux-x86_64-gnu/lib -lm -o build/lib.linux-x86_64-cpython-38/Orange/distance/_distance.cpython-38-x86_64-linux-gnu.so\nbuilding 'Orange.preprocess._discretize' extension\ncreating build/temp.linux-x86_64-cpython-38/Orange/preprocess\ncc -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -fPIC -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages/numpy/core/include -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/include -I/home/gcpuser/.local/share/uv/python/cpython-3.8.20-linux-x86_64-gnu/include/python3.8 -c Orange/preprocess/_discretize.c -o build/temp.linux-x86_64-cpython-38/Orange/preprocess/_discretize.o\ncreating build/lib.linux-x86_64-cpython-38/Orange/preprocess\ncc -pthread -shared -Wl,--exclude-libs,ALL build/temp.linux-x86_64-cpython-38/Orange/preprocess/_discretize.o -L/home/gcpuser/.local/share/uv/python/cpython-3.8.20-linux-x86_64-gnu/lib -lm -o build/lib.linux-x86_64-cpython-38/Orange/preprocess/_discretize.cpython-38-x86_64-linux-gnu.so\nbuilding 'Orange.preprocess._relieff' extension\nc++ -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -fPIC -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages/numpy/core/include -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/include -I/home/gcpuser/.local/share/uv/python/cpython-3.8.20-linux-x86_64-gnu/include/python3.8 -c Orange/preprocess/_relieff.cpp -o build/temp.linux-x86_64-cpython-38/Orange/preprocess/_relieff.o\nc++ -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -pthread -shared build/temp.linux-x86_64-cpython-38/Orange/preprocess/_relieff.o -L/home/gcpuser/.local/share/uv/python/cpython-3.8.20-linux-x86_64-gnu/lib -lm -o build/lib.linux-x86_64-cpython-38/Orange/preprocess/_relieff.cpython-38-x86_64-linux-gnu.so\nbuilding 'Orange.projection._som' extension\ncreating build/temp.linux-x86_64-cpython-38/Orange/projection\ncc -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -fPIC -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages/numpy/core/include -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/include -I/home/gcpuser/.local/share/uv/python/cpython-3.8.20-linux-x86_64-gnu/include/python3.8 -c Orange/projection/_som.c -o build/temp.linux-x86_64-cpython-38/Orange/projection/_som.o\ncreating build/lib.linux-x86_64-cpython-38/Orange/projection\ncc -pthread -shared -Wl,--exclude-libs,ALL build/temp.linux-x86_64-cpython-38/Orange/projection/_som.o -L/home/gcpuser/.local/share/uv/python/cpython-3.8.20-linux-x86_64-gnu/lib -lm -o build/lib.linux-x86_64-cpython-38/Orange/projection/_som.cpython-38-x86_64-linux-gnu.so\nbuilding 'Orange.classification._simple_tree' extension\ncc -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -fPIC -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages/numpy/core/include -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/include -I/home/gcpuser/.local/share/uv/python/cpython-3.8.20-linux-x86_64-gnu/include/python3.8 -c Orange/classification/_simple_tree.c -o build/temp.linux-x86_64-cpython-38/Orange/classification/_simple_tree.o\ncc -pthread -shared -Wl,--exclude-libs,ALL build/temp.linux-x86_64-cpython-38/Orange/classification/_simple_tree.o -L/home/gcpuser/.local/share/uv/python/cpython-3.8.20-linux-x86_64-gnu/lib -lm -o build/lib.linux-x86_64-cpython-38/Orange/classification/_simple_tree.cpython-38-x86_64-linux-gnu.so\nbuilding 'Orange.widgets.utils._grid_density' extension\ncreating build/temp.linux-x86_64-cpython-38/Orange/widgets/utils\nc++ -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -fPIC -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages/numpy/core/include -I/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/include -I/home/gcpuser/.local/share/uv/python/cpython-3.8.20-linux-x86_64-gnu/include/python3.8 -c Orange/widgets/utils/_grid_density.cpp -o build/temp.linux-x86_64-cpython-38/Orange/widgets/utils/_grid_density.o\ncreating build/lib.linux-x86_64-cpython-38/Orange/widgets/utils\nc++ -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -pthread -shared build/temp.linux-x86_64-cpython-38/Orange/widgets/utils/_grid_density.o -L/home/gcpuser/.local/share/uv/python/cpython-3.8.20-linux-x86_64-gnu/lib -lm -o build/lib.linux-x86_64-cpython-38/Orange/widgets/utils/_grid_density.cpython-38-x86_64-linux-gnu.so\ncopying build/lib.linux-x86_64-cpython-38/Orange/classification/_tree_scorers.cpython-38-x86_64-linux-gnu.so -> Orange/classification\ncopying build/lib.linux-x86_64-cpython-38/Orange/data/_contingency.cpython-38-x86_64-linux-gnu.so -> Orange/data\ncopying build/lib.linux-x86_64-cpython-38/Orange/data/_io.cpython-38-x86_64-linux-gnu.so -> Orange/data\ncopying build/lib.linux-x86_64-cpython-38/Orange/data/_valuecount.cpython-38-x86_64-linux-gnu.so -> Orange/data\ncopying build/lib.linux-x86_64-cpython-38/Orange/data/_variable.cpython-38-x86_64-linux-gnu.so -> Orange/data\ncopying build/lib.linux-x86_64-cpython-38/Orange/distance/_distance.cpython-38-x86_64-linux-gnu.so -> Orange/distance\ncopying build/lib.linux-x86_64-cpython-38/Orange/preprocess/_discretize.cpython-38-x86_64-linux-gnu.so -> Orange/preprocess\ncopying build/lib.linux-x86_64-cpython-38/Orange/preprocess/_relieff.cpython-38-x86_64-linux-gnu.so -> Orange/preprocess\ncopying build/lib.linux-x86_64-cpython-38/Orange/projection/_som.cpython-38-x86_64-linux-gnu.so -> Orange/projection\ncopying build/lib.linux-x86_64-cpython-38/Orange/classification/_simple_tree.cpython-38-x86_64-linux-gnu.so -> Orange/classification\ncopying build/lib.linux-x86_64-cpython-38/Orange/widgets/utils/_grid_density.cpython-38-x86_64-linux-gnu.so -> Orange/widgets/utils\nrunning develop\nrunning egg_info\nwriting Orange3.egg-info/PKG-INFO\nwriting dependency_links to Orange3.egg-info/dependency_links.txt\nwriting entry points to Orange3.egg-info/entry_points.txt\nwriting requirements to Orange3.egg-info/requires.txt\nwriting top-level names to Orange3.egg-info/top_level.txt\ndependency /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages/numpy/core/include/numpy/arrayobject.h won't be automatically included in the manifest: the path must be relative\ndependency /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages/numpy/core/include/numpy/arrayscalars.h won't be automatically included in the manifest: the path must be relative\ndependency /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages/numpy/core/include/numpy/ndarrayobject.h won't be automatically included in the manifest: the path must be relative\ndependency /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages/numpy/core/include/numpy/ndarraytypes.h won't be automatically included in the manifest: the path must be relative\ndependency /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages/numpy/core/include/numpy/npy_math.h won't be automatically included in the manifest: the path must be relative\ndependency /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages/numpy/core/include/numpy/ufuncobject.h won't be automatically included in the manifest: the path must be relative\ndependency /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages/numpy/core/include/numpy/arrayobject.h won't be automatically included in the manifest: the path must be relative\ndependency /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages/numpy/core/include/numpy/arrayscalars.h won't be automatically included in the manifest: the path must be relative\ndependency /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages/numpy/core/include/numpy/ndarrayobject.h won't be automatically included in the manifest: the path must be relative\ndependency /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages/numpy/core/include/numpy/ndarraytypes.h won't be automatically included in the manifest: the path must be relative\ndependency /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages/numpy/core/include/numpy/npy_math.h won't be automatically included in the manifest: the path must be relative\ndependency /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages/numpy/core/include/numpy/ufuncobject.h won't be automatically included in the manifest: the path must be relative\ndependency /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages/numpy/core/include/numpy/arrayobject.h won't be automatically included in the manifest: the path must be relative\ndependency /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages/numpy/core/include/numpy/arrayscalars.h won't be automatically included in the manifest: the path must be relative\ndependency /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages/numpy/core/include/numpy/ndarrayobject.h won't be automatically included in the manifest: the path must be relative\ndependency /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages/numpy/core/include/numpy/ndarraytypes.h won't be automatically included in the manifest: the path must be relative\ndependency /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages/numpy/core/include/numpy/npy_math.h won't be automatically included in the manifest: the path must be relative\ndependency /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages/numpy/core/include/numpy/ufuncobject.h won't be automatically included in the manifest: the path must be relative\ndependency /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages/numpy/core/include/numpy/arrayobject.h won't be automatically included in the manifest: the path must be relative\ndependency /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages/numpy/core/include/numpy/arrayscalars.h won't be automatically included in the manifest: the path must be relative\ndependency /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages/numpy/core/include/numpy/ndarrayobject.h won't be automatically included in the manifest: the path must be relative\ndependency /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages/numpy/core/include/numpy/ndarraytypes.h won't be automatically included in the manifest: the path must be relative\ndependency /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages/numpy/core/include/numpy/npy_math.h won't be automatically included in the manifest: the path must be relative\ndependency /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages/numpy/core/include/numpy/ufuncobject.h won't be automatically included in the manifest: the path must be relative\ndependency /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages/numpy/core/include/numpy/arrayobject.h won't be automatically included in the manifest: the path must be relative\ndependency /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages/numpy/core/include/numpy/arrayscalars.h won't be automatically included in the manifest: the path must be relative\ndependency /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages/numpy/core/include/numpy/ndarrayobject.h won't be automatically included in the manifest: the path must be relative\ndependency /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages/numpy/core/include/numpy/ndarraytypes.h won't be automatically included in the manifest: the path must be relative\ndependency /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages/numpy/core/include/numpy/ufuncobject.h won't be automatically included in the manifest: the path must be relative\ndependency /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages/numpy/core/include/numpy/arrayobject.h won't be automatically included in the manifest: the path must be relative\ndependency /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages/numpy/core/include/numpy/arrayscalars.h won't be automatically included in the manifest: the path must be relative\ndependency /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages/numpy/core/include/numpy/ndarrayobject.h won't be automatically included in the manifest: the path must be relative\ndependency /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages/numpy/core/include/numpy/ndarraytypes.h won't be automatically included in the manifest: the path must be relative\ndependency /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages/numpy/core/include/numpy/npy_math.h won't be automatically included in the manifest: the path must be relative\ndependency /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages/numpy/core/include/numpy/ufuncobject.h won't be automatically included in the manifest: the path must be relative\ndependency /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages/numpy/core/include/numpy/arrayobject.h won't be automatically included in the manifest: the path must be relative\ndependency /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages/numpy/core/include/numpy/arrayscalars.h won't be automatically included in the manifest: the path must be relative\ndependency /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages/numpy/core/include/numpy/ndarrayobject.h won't be automatically included in the manifest: the path must be relative\ndependency /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages/numpy/core/include/numpy/ndarraytypes.h won't be automatically included in the manifest: the path must be relative\ndependency /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages/numpy/core/include/numpy/npy_math.h won't be automatically included in the manifest: the path must be relative\ndependency /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages/numpy/core/include/numpy/ufuncobject.h won't be automatically included in the manifest: the path must be relative\nreading manifest file 'Orange3.egg-info/SOURCES.txt'\nreading manifest template 'MANIFEST.in'\nadding license file 'LICENSE'\nwriting manifest file 'Orange3.egg-info/SOURCES.txt'\nrunning build_ext\ncopying build/lib.linux-x86_64-cpython-38/Orange/classification/_tree_scorers.cpython-38-x86_64-linux-gnu.so -> Orange/classification\ncopying build/lib.linux-x86_64-cpython-38/Orange/data/_contingency.cpython-38-x86_64-linux-gnu.so -> Orange/data\ncopying build/lib.linux-x86_64-cpython-38/Orange/data/_io.cpython-38-x86_64-linux-gnu.so -> Orange/data\ncopying build/lib.linux-x86_64-cpython-38/Orange/data/_valuecount.cpython-38-x86_64-linux-gnu.so -> Orange/data\ncopying build/lib.linux-x86_64-cpython-38/Orange/data/_variable.cpython-38-x86_64-linux-gnu.so -> Orange/data\ncopying build/lib.linux-x86_64-cpython-38/Orange/distance/_distance.cpython-38-x86_64-linux-gnu.so -> Orange/distance\ncopying build/lib.linux-x86_64-cpython-38/Orange/preprocess/_discretize.cpython-38-x86_64-linux-gnu.so -> Orange/preprocess\ncopying build/lib.linux-x86_64-cpython-38/Orange/preprocess/_relieff.cpython-38-x86_64-linux-gnu.so -> Orange/preprocess\ncopying build/lib.linux-x86_64-cpython-38/Orange/projection/_som.cpython-38-x86_64-linux-gnu.so -> Orange/projection\ncopying build/lib.linux-x86_64-cpython-38/Orange/classification/_simple_tree.cpython-38-x86_64-linux-gnu.so -> Orange/classification\ncopying build/lib.linux-x86_64-cpython-38/Orange/widgets/utils/_grid_density.cpython-38-x86_64-linux-gnu.so -> Orange/widgets/utils\nCreating /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages/Orange3.egg-link (link to .)\nAdding Orange3 3.34.0.dev0+3423a8e to easy-install.pth file\nInstalling orange-canvas script to /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/bin\n\nInstalled /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e\nProcessing dependencies for Orange3==3.34.0.dev0+3423a8e\nSearching for XlsxWriter==3.2.0\nBest match: XlsxWriter 3.2.0\nAdding XlsxWriter 3.2.0 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages\nSearching for xlrd==2.0.1\nBest match: xlrd 2.0.1\nAdding xlrd 2.0.1 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages\nSearching for setuptools==75.3.0\nBest match: setuptools 75.3.0\nAdding setuptools 75.3.0 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages\nSearching for serverfiles==0.3.1\nBest match: serverfiles 0.3.1\nAdding serverfiles 0.3.1 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages\nSearching for scipy==1.10.1\nBest match: scipy 1.10.1\nAdding scipy 1.10.1 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages\nSearching for scikit-learn==1.3.2\nBest match: scikit-learn 1.3.2\nAdding scikit-learn 1.3.2 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages\nSearching for requests==2.32.3\nBest match: requests 2.32.3\nAdding requests 2.32.3 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages\nSearching for qtconsole==5.6.1\nBest match: qtconsole 5.6.1\nAdding qtconsole 5.6.1 to easy-install.pth file\nInstalling jupyter-qtconsole script to /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/bin\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages\nSearching for PyYAML==6.0.2\nBest match: PyYAML 6.0.2\nAdding PyYAML 6.0.2 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages\nSearching for python-louvain==0.16\nBest match: python-louvain 0.16\nAdding python-louvain 0.16 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages\nSearching for pyqtgraph==0.13.3\nBest match: pyqtgraph 0.13.3\nAdding pyqtgraph 0.13.3 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages\nSearching for pygments==2.19.1\nBest match: pygments 2.19.1\nAdding pygments 2.19.1 to easy-install.pth file\nInstalling pygmentize script to /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/bin\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages\nSearching for pip==24.3.1\nBest match: pip 24.3.1\nAdding pip 24.3.1 to easy-install.pth file\nInstalling pip script to /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/bin\nInstalling pip3 script to /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/bin\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages\nSearching for pandas==2.0.3\nBest match: pandas 2.0.3\nAdding pandas 2.0.3 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages\nSearching for orange-widget-base==4.22.0\nBest match: orange-widget-base 4.22.0\nAdding orange-widget-base 4.22.0 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages\nSearching for orange-canvas-core==0.1.35\nBest match: orange-canvas-core 0.1.35\nAdding orange-canvas-core 0.1.35 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages\nSearching for openpyxl==3.1.5\nBest match: openpyxl 3.1.5\nAdding openpyxl 3.1.5 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages\nSearching for openTSNE==1.0.1\nBest match: openTSNE 1.0.1\nAdding openTSNE 1.0.1 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages\nSearching for numpy==1.24.4\nBest match: numpy 1.24.4\nAdding numpy 1.24.4 to easy-install.pth file\nInstalling f2py script to /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/bin\nInstalling f2py3 script to /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/bin\nInstalling f2py3.8 script to /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/bin\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages\nSearching for networkx==3.1\nBest match: networkx 3.1\nAdding networkx 3.1 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages\nSearching for matplotlib==3.7.5\nBest match: matplotlib 3.7.5\nAdding matplotlib 3.7.5 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages\nSearching for keyrings.alt==5.0.2\nBest match: keyrings.alt 5.0.2\nAdding keyrings.alt 5.0.2 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages\nSearching for keyring==25.5.0\nBest match: keyring 25.5.0\nAdding keyring 25.5.0 to easy-install.pth file\nInstalling keyring script to /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/bin\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages\nSearching for joblib==1.4.2\nBest match: joblib 1.4.2\nAdding joblib 1.4.2 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages\nSearching for httpx==0.28.1\nBest match: httpx 0.28.1\nAdding httpx 0.28.1 to easy-install.pth file\nInstalling httpx script to /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/bin\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages\nSearching for chardet==5.2.0\nBest match: chardet 5.2.0\nAdding chardet 5.2.0 to easy-install.pth file\nInstalling chardetect script to /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/bin\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages\nSearching for Bottleneck==1.4.0\nBest match: Bottleneck 1.4.0\nAdding Bottleneck 1.4.0 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages\nSearching for baycomp==1.0.3\nBest match: baycomp 1.0.3\nAdding baycomp 1.0.3 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages\nSearching for AnyQt==0.2.0\nBest match: AnyQt 0.2.0\nAdding AnyQt 0.2.0 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages\nSearching for threadpoolctl==3.5.0\nBest match: threadpoolctl 3.5.0\nAdding threadpoolctl 3.5.0 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages\nSearching for certifi==2024.12.14\nBest match: certifi 2024.12.14\nAdding certifi 2024.12.14 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages\nSearching for urllib3==2.2.3\nBest match: urllib3 2.2.3\nAdding urllib3 2.2.3 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages\nSearching for idna==3.10\nBest match: idna 3.10\nAdding idna 3.10 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages\nSearching for charset-normalizer==3.4.1\nBest match: charset-normalizer 3.4.1\nAdding charset-normalizer 3.4.1 to easy-install.pth file\nInstalling normalizer script to /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/bin\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages\nSearching for packaging==24.2\nBest match: packaging 24.2\nAdding packaging 24.2 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages\nSearching for QtPy==2.4.2\nBest match: QtPy 2.4.2\nAdding QtPy 2.4.2 to easy-install.pth file\nInstalling qtpy script to /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/bin\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages\nSearching for ipykernel==6.29.5\nBest match: ipykernel 6.29.5\nAdding ipykernel 6.29.5 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages\nSearching for jupyter-client==8.6.3\nBest match: jupyter-client 8.6.3\nAdding jupyter-client 8.6.3 to easy-install.pth file\nInstalling jupyter-kernel script to /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/bin\nInstalling jupyter-kernelspec script to /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/bin\nInstalling jupyter-run script to /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/bin\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages\nSearching for jupyter-core==5.7.2\nBest match: jupyter-core 5.7.2\nAdding jupyter-core 5.7.2 to easy-install.pth file\nInstalling jupyter script to /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/bin\nInstalling jupyter-migrate script to /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/bin\nInstalling jupyter-troubleshoot script to /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/bin\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages\nSearching for traitlets==5.14.3\nBest match: traitlets 5.14.3\nAdding traitlets 5.14.3 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages\nSearching for tzdata==2024.2\nBest match: tzdata 2024.2\nAdding tzdata 2024.2 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages\nSearching for pytz==2024.2\nBest match: pytz 2024.2\nAdding pytz 2024.2 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages\nSearching for python-dateutil==2.9.0.post0\nBest match: python-dateutil 2.9.0.post0\nAdding python-dateutil 2.9.0.post0 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages\nSearching for typing-extensions==4.12.2\nBest match: typing-extensions 4.12.2\nAdding typing-extensions 4.12.2 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages/setuptools/_vendor\nSearching for qasync==0.27.1\nBest match: qasync 0.27.1\nAdding qasync 0.27.1 to easy-install.pth file\ndetected new path './setuptools/_vendor'\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages\nSearching for dictdiffer==0.9.0\nBest match: dictdiffer 0.9.0\nAdding dictdiffer 0.9.0 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages\nSearching for requests-cache==1.2.1\nBest match: requests-cache 1.2.1\nAdding requests-cache 1.2.1 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages\nSearching for commonmark==0.9.1\nBest match: commonmark 0.9.1\nAdding commonmark 0.9.1 to easy-install.pth file\nInstalling cmark script to /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/bin\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages\nSearching for docutils==0.20.1\nBest match: docutils 0.20.1\nAdding docutils 0.20.1 to easy-install.pth file\nInstalling docutils script to /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/bin\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages\nSearching for et-xmlfile==2.0.0\nBest match: et-xmlfile 2.0.0\nAdding et-xmlfile 2.0.0 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages\nSearching for importlib-resources==6.4.5\nBest match: importlib-resources 6.4.5\nAdding importlib-resources 6.4.5 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages\nSearching for pyparsing==3.1.4\nBest match: pyparsing 3.1.4\nAdding pyparsing 3.1.4 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages\nSearching for pillow==10.4.0\nBest match: pillow 10.4.0\nAdding pillow 10.4.0 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages\nSearching for kiwisolver==1.4.7\nBest match: kiwisolver 1.4.7\nAdding kiwisolver 1.4.7 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages\nSearching for fonttools==4.55.3\nBest match: fonttools 4.55.3\nAdding fonttools 4.55.3 to easy-install.pth file\nInstalling fonttools script to /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/bin\nInstalling pyftmerge script to /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/bin\nInstalling pyftsubset script to /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/bin\nInstalling ttx script to /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/bin\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages\nSearching for cycler==0.12.1\nBest match: cycler 0.12.1\nAdding cycler 0.12.1 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages\nSearching for contourpy==1.1.1\nBest match: contourpy 1.1.1\nAdding contourpy 1.1.1 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages\nSearching for jaraco.context==6.0.1\nBest match: jaraco.context 6.0.1\nAdding jaraco.context 6.0.1 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages\nSearching for jaraco.classes==3.4.0\nBest match: jaraco.classes 3.4.0\nAdding jaraco.classes 3.4.0 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages\nSearching for jeepney==0.8.0\nBest match: jeepney 0.8.0\nAdding jeepney 0.8.0 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages\nSearching for SecretStorage==3.3.3\nBest match: SecretStorage 3.3.3\nAdding SecretStorage 3.3.3 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages\nSearching for importlib-metadata==8.5.0\nBest match: importlib-metadata 8.5.0\nAdding importlib-metadata 8.5.0 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages\nSearching for jaraco.functools==4.1.0\nBest match: jaraco.functools 4.1.0\nAdding jaraco.functools 4.1.0 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages\nSearching for httpcore==1.0.7\nBest match: httpcore 1.0.7\nAdding httpcore 1.0.7 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages\nSearching for anyio==4.5.2\nBest match: anyio 4.5.2\nAdding anyio 4.5.2 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages\nSearching for tornado==6.4.2\nBest match: tornado 6.4.2\nAdding tornado 6.4.2 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages\nSearching for pyzmq==26.2.0\nBest match: pyzmq 26.2.0\nAdding pyzmq 26.2.0 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages\nSearching for psutil==6.1.1\nBest match: psutil 6.1.1\nAdding psutil 6.1.1 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages\nSearching for nest-asyncio==1.6.0\nBest match: nest-asyncio 1.6.0\nAdding nest-asyncio 1.6.0 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages\nSearching for matplotlib-inline==0.1.7\nBest match: matplotlib-inline 0.1.7\nAdding matplotlib-inline 0.1.7 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages\nSearching for ipython==8.12.3\nBest match: ipython 8.12.3\nAdding ipython 8.12.3 to easy-install.pth file\nInstalling ipython script to /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/bin\nInstalling ipython3 script to /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/bin\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages\nSearching for debugpy==1.8.11\nBest match: debugpy 1.8.11\nAdding debugpy 1.8.11 to easy-install.pth file\nInstalling debugpy script to /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/bin\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages\nSearching for comm==0.2.2\nBest match: comm 0.2.2\nAdding comm 0.2.2 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages\nSearching for platformdirs==4.3.6\nBest match: platformdirs 4.3.6\nAdding platformdirs 4.3.6 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages\nSearching for six==1.17.0\nBest match: six 1.17.0\nAdding six 1.17.0 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages\nSearching for url-normalize==1.4.3\nBest match: url-normalize 1.4.3\nAdding url-normalize 1.4.3 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages\nSearching for cattrs==24.1.2\nBest match: cattrs 24.1.2\nAdding cattrs 24.1.2 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages\nSearching for attrs==24.3.0\nBest match: attrs 24.3.0\nAdding attrs 24.3.0 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages\nSearching for zipp==3.20.2\nBest match: zipp 3.20.2\nAdding zipp 3.20.2 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages\nSearching for backports.tarfile==1.2.0\nBest match: backports.tarfile 1.2.0\nbackports.tarfile 1.2.0 is already the active version in easy-install.pth\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages/setuptools/_vendor\nSearching for more-itertools==10.5.0\nBest match: more-itertools 10.5.0\nAdding more-itertools 10.5.0 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages\nSearching for cryptography==44.0.0\nBest match: cryptography 44.0.0\nAdding cryptography 44.0.0 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages\nSearching for h11==0.14.0\nBest match: h11 0.14.0\nAdding h11 0.14.0 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages\nSearching for exceptiongroup==1.2.2\nBest match: exceptiongroup 1.2.2\nAdding exceptiongroup 1.2.2 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages\nSearching for sniffio==1.3.1\nBest match: sniffio 1.3.1\nAdding sniffio 1.3.1 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages\nSearching for pexpect==4.9.0\nBest match: pexpect 4.9.0\nAdding pexpect 4.9.0 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages\nSearching for stack-data==0.6.3\nBest match: stack-data 0.6.3\nAdding stack-data 0.6.3 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages\nSearching for prompt-toolkit==3.0.48\nBest match: prompt-toolkit 3.0.48\nAdding prompt-toolkit 3.0.48 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages\nSearching for pickleshare==0.7.5\nBest match: pickleshare 0.7.5\nAdding pickleshare 0.7.5 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages\nSearching for jedi==0.19.2\nBest match: jedi 0.19.2\nAdding jedi 0.19.2 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages\nSearching for decorator==5.1.1\nBest match: decorator 5.1.1\nAdding decorator 5.1.1 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages\nSearching for backcall==0.2.0\nBest match: backcall 0.2.0\nAdding backcall 0.2.0 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages\nSearching for cffi==1.17.1\nBest match: cffi 1.17.1\nAdding cffi 1.17.1 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages\nSearching for ptyprocess==0.7.0\nBest match: ptyprocess 0.7.0\nAdding ptyprocess 0.7.0 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages\nSearching for pure-eval==0.2.3\nBest match: pure-eval 0.2.3\nAdding pure-eval 0.2.3 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages\nSearching for asttokens==3.0.0\nBest match: asttokens 3.0.0\nAdding asttokens 3.0.0 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages\nSearching for executing==2.1.0\nBest match: executing 2.1.0\nAdding executing 2.1.0 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages\nSearching for wcwidth==0.2.13\nBest match: wcwidth 0.2.13\nAdding wcwidth 0.2.13 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages\nSearching for parso==0.8.4\nBest match: parso 0.8.4\nAdding parso 0.8.4 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages\nSearching for pycparser==2.22\nBest match: pycparser 2.22\nAdding pycparser 2.22 to easy-install.pth file\n\nUsing /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages\nFinished processing dependencies for Orange3==3.34.0.dev0+3423a8e\nVerifying Orange installation...\n✅ Orange installation successful!\nSuccessfully installed orange using Python 3.8\n",
    "setup_res_stderr": "Using CPython 3.7.9\nCreating virtual environment at: .venv\nActivate with: source .venv/bin/activate\nResolved 18 packages in 128ms\nPrepared 18 packages in 2ms\nInstalled 18 packages in 139ms\n + cython==0.29.37\n + exceptiongroup==1.2.2\n + importlib-metadata==6.7.0\n + iniconfig==2.0.0\n + numpy==1.17.5\n + packaging==24.0\n + pluggy==1.2.0\n + pyqt5==5.15.10\n + pyqt5-qt5==5.15.16\n + pyqt5-sip==12.13.0\n + pyqtwebengine==5.15.6\n + pyqtwebengine-qt5==5.15.16\n + pytest==7.4.4\n + setuptools==59.8.0\n + tomli==2.0.1\n + typing-extensions==4.7.1\n + wheel==0.42.0\n + zipp==3.15.0\n  × No solution found when resolving dependencies:\n  ╰─▶ Because the current Python version (3.7.9) does not satisfy Python>=3.8 and all of:\n          scipy>=1.9.0,<=1.9.1\n          scipy>=1.10.0,<=1.10.1\n      depend on Python>=3.8,<3.12, we can conclude that all of:\n          scipy>=1.9.0,<=1.9.1\n          scipy>=1.10.0,<=1.10.1\n       cannot be used.\n      And because only the following versions of scipy are available:\n          scipy<=1.9.0\n          scipy==1.9.1\n          scipy==1.9.2\n          scipy==1.9.3\n          scipy==1.10.0\n          scipy==1.10.1\n          scipy==1.11.0\n          scipy==1.11.1\n          scipy==1.11.2\n          scipy==1.11.3\n          scipy==1.11.4\n          scipy==1.12.0\n          scipy==1.13.0\n          scipy==1.13.1\n          scipy==1.14.0\n          scipy==1.14.1\n          scipy==1.15.0\n      we can conclude that all of:\n          scipy>=1.9.0,<1.9.2\n          scipy>1.9.3,<1.11.0\n       cannot be used. (1)\n\n      Because the current Python version (3.7.9) does not satisfy Python>=3.8 and scipy>=1.9.2,<=1.9.3 depends on Python>=3.8,\n      we can conclude that scipy>=1.9.2,<=1.9.3 cannot be used.\n      And because we know from (1) that all of:\n          scipy>=1.9.0,<1.9.2\n          scipy>1.9.3,<1.11.0\n       cannot be used, we can conclude that scipy>=1.9.0,<1.11.0 cannot be used.\n      And because scipy==1.11.0 was yanked (reason: License Violation), we can conclude that scipy>=1.9.0,<1.11.1 cannot be\n      used. (2)\n\n      Because the current Python version (3.7.9) does not satisfy Python>=3.8 and scipy>=1.11.1,<=1.11.3 depends on\n      Python>=3.9,<3.13, we can conclude that scipy>=1.11.1,<=1.11.3 cannot be used.\n      And because we know from (2) that scipy>=1.9.0,<1.11.1 cannot be used, we can conclude that scipy>=1.9.0,<1.11.4 cannot\n      be used. (3)\n\n      Because the current Python version (3.7.9) does not satisfy Python>=3.8 and scipy>=1.11.4,<=1.13.1 depends on\n      Python>=3.9, we can conclude that scipy>=1.11.4,<=1.13.1 cannot be used.\n      And because we know from (3) that scipy>=1.9.0,<1.11.4 cannot be used, we can conclude that scipy>=1.9.0,<1.14.0 cannot\n      be used. (4)\n\n      Because the current Python version (3.7.9) does not satisfy Python>=3.8 and scipy>=1.14.0 depends on Python>=3.10, we can\n      conclude that scipy>=1.14.0 cannot be used.\n      And because we know from (4) that scipy>=1.9.0,<1.14.0 cannot be used, we can conclude that scipy>=1.9.0 cannot be used.\n      And because you require scipy>=1.9, we can conclude that your requirements are unsatisfiable.\n\n      hint: Pre-releases are available for `scipy` in the requested range (e.g., 1.15.0rc2), but pre-releases weren't enabled\n      (try: `--prerelease=allow`)\nResolved 59 packages in 825ms\nInstalled 52 packages in 506ms\n + anyqt==0.2.0\n + attrs==24.2.0\n + backcall==0.2.0\n + cattrs==23.1.2\n + certifi==2024.12.14\n + charset-normalizer==3.4.1\n + commonmark==0.9.1\n + cycler==0.11.0\n + debugpy==1.7.0\n + decorator==5.1.1\n + dictdiffer==0.9.0\n + docutils==0.20.1\n + entrypoints==0.4\n + fonttools==4.38.0\n + idna==3.10\n + ipykernel==6.16.2\n + ipython==7.34.0\n + ipython-genutils==0.2.0\n + jedi==0.19.2\n + jupyter-client==7.4.9\n + jupyter-core==4.12.0\n + kiwisolver==1.4.5\n + matplotlib==3.5.3\n + matplotlib-inline==0.1.6\n + nest-asyncio==1.6.0\n + orange-canvas-core==0.1.35\n + orange-widget-base==4.22.0\n + parso==0.8.4\n + pexpect==4.9.0\n + pickleshare==0.7.5\n + pillow==9.5.0\n + pip==24.0\n + platformdirs==4.0.0\n + prompt-toolkit==3.0.48\n + psutil==6.1.1\n + ptyprocess==0.7.0\n + pygments==2.17.2\n + pyparsing==3.1.4\n + pyqtgraph==0.12.3\n + python-dateutil==2.9.0.post0\n + pyzmq==26.2.0\n + qasync==0.25.0\n + qtconsole==5.4.4\n + qtpy==2.4.2\n + requests==2.31.0\n + requests-cache==1.1.1\n + six==1.17.0\n + tornado==6.2\n + traitlets==5.9.0\n + url-normalize==1.4.3\n + urllib3==2.0.7\n + wcwidth==0.2.13\nResolved 2 packages in 3ms\nInstalled 2 packages in 24ms\n + psycopg2==2.9.9\n + pymssql==2.3.2\nResolved 19 packages in 199ms\nInstalled 8 packages in 1.23s\n + catboost==1.2.7\n + graphviz==0.20.1\n + pandas==1.3.5\n + plotly==5.18.0\n + pytz==2024.2\n + scipy==1.7.3\n + tenacity==8.2.3\n + xgboost==1.6.2\nResolved 5 packages in 57ms\nInstalled 3 packages in 26ms\n + joblib==1.3.2\n + scikit-learn==1.0.2\n + threadpoolctl==3.1.0\nIn file included from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1830,\n                 from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,\n                 from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/arrayobject.h:4,\n                 from Orange/classification/_tree_scorers.c:775:\n/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning \"Using deprecated NumPy API, disable it with \" \"#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION\" [-Wcpp]\n   17 | #warning \"Using deprecated NumPy API, disable it with \" \\\n      |  ^~~~~~~\nOrange/classification/_tree_scorers.c: In function ‘__pyx_pf_6Orange_14classification_13_tree_scorers_2find_threshold_entropy’:\nOrange/classification/_tree_scorers.c:3427:27: warning: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘int’ [-Wsign-compare]\n 3427 |   __pyx_t_7 = ((__pyx_v_N <= __pyx_v_min_leaf) != 0);\n      |                           ^~\nOrange/classification/_tree_scorers.c: In function ‘__pyx_pf_6Orange_14classification_13_tree_scorers_6find_threshold_MSE’:\nOrange/classification/_tree_scorers.c:4883:27: warning: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘int’ [-Wsign-compare]\n 4883 |   __pyx_t_1 = ((__pyx_v_N <= __pyx_v_min_leaf) != 0);\n      |                           ^~\nOrange/classification/_tree_scorers.c: In function ‘__pyx_pf_6Orange_14classification_13_tree_scorers_8find_binarization_MSE’:\nOrange/classification/_tree_scorers.c:5629:43: warning: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘int’ [-Wsign-compare]\n 5629 |           for (__pyx_t_19 = 0; __pyx_t_19 < __pyx_t_18; __pyx_t_19+=1) {\n      |                                           ^\nOrange/classification/_tree_scorers.c:5750:39: warning: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘int’ [-Wsign-compare]\n 5750 |           __pyx_t_20 = ((__pyx_v_left >= __pyx_v_min_leaf) != 0);\n      |                                       ^~\nOrange/classification/_tree_scorers.c:5756:53: warning: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘int’ [-Wsign-compare]\n 5756 |           __pyx_t_20 = (((__pyx_v_N - __pyx_v_left) >= __pyx_v_min_leaf) != 0);\n      |                                                     ^~\nOrange/classification/_tree_scorers.c: In function ‘__pyx_pf_6Orange_14classification_13_tree_scorers_14compute_predictions_csr’:\nOrange/classification/_tree_scorers.c:7217:41: warning: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘int’ [-Wsign-compare]\n 7217 |         for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) {\n      |                                         ^\nOrange/classification/_tree_scorers.c: In function ‘__pyx_pf_6Orange_14classification_13_tree_scorers_16compute_predictions_csc’:\nOrange/classification/_tree_scorers.c:7874:41: warning: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘int’ [-Wsign-compare]\n 7874 |         for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) {\n      |                                         ^\nOrange/classification/_tree_scorers.c:7934:150: warning: comparison of integer expressions of different signedness: ‘__pyx_t_5numpy_int32_t’ {aka ‘int’} and ‘unsigned int’ [-Wsign-compare]\n 7934 |               __pyx_t_16 = (((*((__pyx_t_5numpy_int32_t const  *) ( /* dim=0 */ (__pyx_v_indices.data + __pyx_t_15 * __pyx_v_indices.strides[0]) ))) != __pyx_v_i) != 0);\n      |                                                                                                                                                      ^~\nIn file included from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1830,\n                 from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,\n                 from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/arrayobject.h:4,\n                 from Orange/data/_contingency.c:775:\n/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning \"Using deprecated NumPy API, disable it with \" \"#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION\" [-Wcpp]\n   17 | #warning \"Using deprecated NumPy API, disable it with \" \\\n      |  ^~~~~~~\nOrange/data/_io.c: In function ‘__pyx_pf_6Orange_4data_3_io_sparse_read_float.constprop’:\nOrange/data/_io.c:4120:43: warning: ‘__pyx_v_decs’ may be used uninitialized in this function [-Wmaybe-uninitialized]\n 4120 |           __pyx_v_value = ((__pyx_v_value * __pyx_v_decs) + (__pyx_v_c & 0xf));\n      |                            ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~\nOrange/data/_io.c:4318:24: warning: ‘__pyx_v_value’ may be used uninitialized in this function [-Wmaybe-uninitialized]\n 4318 |           __pyx_t_10 = PyFloat_FromDouble(__pyx_v_value); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 223, __pyx_L5_error)\n      |                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\nOrange/data/_io.c:683:40: warning: ‘__pyx_v_attr_index’ may be used uninitialized in this function [-Wmaybe-uninitialized]\n  683 |   #define PyInt_FromLong               PyLong_FromLong\n      |                                        ^~~~~~~~~~~~~~~\nOrange/data/_io.c:1590:7: note: ‘__pyx_v_attr_index’ was declared here\n 1590 |   int __pyx_v_attr_index;\n      |       ^~~~~~~~~~~~~~~~~~\nOrange/data/_io.c:3183:25: warning: ‘__pyx_v_atomp’ may be used uninitialized in this function [-Wmaybe-uninitialized]\n 3183 |           __pyx_v_atomp = (__pyx_v_atomp + 1);\n      |           ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~\nIn file included from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1830,\n                 from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,\n                 from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/arrayobject.h:4,\n                 from Orange/data/_valuecount.c:775:\n/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning \"Using deprecated NumPy API, disable it with \" \"#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION\" [-Wcpp]\n   17 | #warning \"Using deprecated NumPy API, disable it with \" \\\n      |  ^~~~~~~\nIn file included from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1830,\n                 from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,\n                 from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/arrayobject.h:4,\n                 from Orange/distance/_distance.c:775:\n/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning \"Using deprecated NumPy API, disable it with \" \"#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION\" [-Wcpp]\n   17 | #warning \"Using deprecated NumPy API, disable it with \" \\\n      |  ^~~~~~~\nIn file included from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1830,\n                 from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,\n                 from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/arrayobject.h:4,\n                 from Orange/preprocess/_discretize.c:774:\n/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning \"Using deprecated NumPy API, disable it with \" \"#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION\" [-Wcpp]\n   17 | #warning \"Using deprecated NumPy API, disable it with \" \\\n      |  ^~~~~~~\nIn file included from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1830,\n                 from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,\n                 from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/arrayobject.h:4,\n                 from Orange/preprocess/_relieff.cpp:790:\n/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning \"Using deprecated NumPy API, disable it with \" \"#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION\" [-Wcpp]\n   17 | #warning \"Using deprecated NumPy API, disable it with \" \\\n      |  ^~~~~~~\nIn file included from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1830,\n                 from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,\n                 from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/arrayobject.h:4,\n                 from Orange/projection/_som.c:775:\n/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning \"Using deprecated NumPy API, disable it with \" \"#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION\" [-Wcpp]\n   17 | #warning \"Using deprecated NumPy API, disable it with \" \\\n      |  ^~~~~~~\nOrange/projection/_som.c: In function ‘__pyx_pw_6Orange_10projection_4_som_5update_hex’:\nOrange/projection/_som.c:3863:7: warning: ‘__pyx_v_win_y’ may be used uninitialized in this function [-Wmaybe-uninitialized]\n 3863 |   int __pyx_v_win_y;\n      |       ^~~~~~~~~~~~~\nOrange/projection/_som.c:3862:7: warning: ‘__pyx_v_win_x’ may be used uninitialized in this function [-Wmaybe-uninitialized]\n 3862 |   int __pyx_v_win_x;\n      |       ^~~~~~~~~~~~~\nOrange/projection/_som.c: In function ‘__pyx_pf_6Orange_10projection_4_som_8update_sparse.constprop’:\nOrange/projection/_som.c:4934:7: warning: ‘__pyx_v_win_y’ may be used uninitialized in this function [-Wmaybe-uninitialized]\n 4934 |   int __pyx_v_win_y;\n      |       ^~~~~~~~~~~~~\nOrange/projection/_som.c:4933:7: warning: ‘__pyx_v_win_x’ may be used uninitialized in this function [-Wmaybe-uninitialized]\n 4933 |   int __pyx_v_win_x;\n      |       ^~~~~~~~~~~~~\nOrange/projection/_som.c: In function ‘__pyx_pw_6Orange_10projection_4_som_7get_winners_sparse’:\nOrange/projection/_som.c:4732:223: warning: ‘__pyx_v_win_y’ may be used uninitialized in this function [-Wmaybe-uninitialized]\n 4732 |           *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int16_t *, __pyx_pybuffernd_winners.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_winners.diminfo[0].strides, __pyx_t_27, __pyx_pybuffernd_winners.diminfo[1].strides) = __pyx_v_win_y;\n      |           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~\nOrange/projection/_som.c:4307:7: note: ‘__pyx_v_win_y’ was declared here\n 4307 |   int __pyx_v_win_y;\n      |       ^~~~~~~~~~~~~\nOrange/projection/_som.c:4721:223: warning: ‘__pyx_v_win_x’ may be used uninitialized in this function [-Wmaybe-uninitialized]\n 4721 |           *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int16_t *, __pyx_pybuffernd_winners.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_winners.diminfo[0].strides, __pyx_t_26, __pyx_pybuffernd_winners.diminfo[1].strides) = __pyx_v_win_x;\n      |           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~\nOrange/projection/_som.c:4306:7: note: ‘__pyx_v_win_x’ was declared here\n 4306 |   int __pyx_v_win_x;\n      |       ^~~~~~~~~~~~~\nOrange/projection/_som.c: In function ‘__pyx_pf_6Orange_10projection_4_som_10update_sparse_hex.constprop’:\nOrange/projection/_som.c:5682:7: warning: ‘__pyx_v_win_y’ may be used uninitialized in this function [-Wmaybe-uninitialized]\n 5682 |   int __pyx_v_win_y;\n      |       ^~~~~~~~~~~~~\nOrange/projection/_som.c:5681:7: warning: ‘__pyx_v_win_x’ may be used uninitialized in this function [-Wmaybe-uninitialized]\n 5681 |   int __pyx_v_win_x;\n      |       ^~~~~~~~~~~~~\nOrange/projection/_som.c: In function ‘__pyx_pw_6Orange_10projection_4_som_1get_winners’:\nOrange/projection/_som.c:3184:223: warning: ‘__pyx_v_win_y’ may be used uninitialized in this function [-Wmaybe-uninitialized]\n 3184 |           *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int16_t *, __pyx_pybuffernd_winners.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_winners.diminfo[0].strides, __pyx_t_23, __pyx_pybuffernd_winners.diminfo[1].strides) = __pyx_v_win_y;\n      |           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~\nOrange/projection/_som.c:2887:7: note: ‘__pyx_v_win_y’ was declared here\n 2887 |   int __pyx_v_win_y;\n      |       ^~~~~~~~~~~~~\nOrange/projection/_som.c:3173:223: warning: ‘__pyx_v_win_x’ may be used uninitialized in this function [-Wmaybe-uninitialized]\n 3173 |           *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int16_t *, __pyx_pybuffernd_winners.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_winners.diminfo[0].strides, __pyx_t_22, __pyx_pybuffernd_winners.diminfo[1].strides) = __pyx_v_win_x;\n      |           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~\nOrange/projection/_som.c:2886:7: note: ‘__pyx_v_win_x’ was declared here\n 2886 |   int __pyx_v_win_x;\n      |       ^~~~~~~~~~~~~\nOrange/projection/_som.c: In function ‘__pyx_pw_6Orange_10projection_4_som_3update’:\nOrange/projection/_som.c:3357:7: warning: ‘__pyx_v_win_y’ may be used uninitialized in this function [-Wmaybe-uninitialized]\n 3357 |   int __pyx_v_win_y;\n      |       ^~~~~~~~~~~~~\nOrange/classification/_simple_tree.c: In function ‘gain_ratio_c’:\nOrange/classification/_simple_tree.c:63:9: warning: implicit declaration of function ‘qsort_r’; did you mean ‘qsort’? [-Wimplicit-function-declaration]\n   63 |         qsort_r(base, nel, size, compar, thunk)\n      |         ^~~~~~~\nOrange/classification/_simple_tree.c:147:9: note: in expansion of macro ‘QSORT_R_FUNC’\n  147 |         QSORT_R_FUNC(examples, size, sizeof(struct Example), (void*) &compar_attr, compar_examples);\n      |         ^~~~~~~~~~~~\n/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.7/site-packages/setuptools/command/easy_install.py:159: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.\n  EasyInstallDeprecationWarning,\n/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.7/site-packages/setuptools/command/install.py:37: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.\n  setuptools.SetuptoolsDeprecationWarning,\nwarning: no files found matching 'README*' under directory 'Orange'\nwarning: no files found matching 'LICENSE' under directory 'Orange'\nwarning: no files found matching '*.basket' under directory 'Orange/datasets'\nwarning: no files found matching '*.svg' under directory 'Orange/canvas'\nwarning: no files found matching '*.js' under directory 'Orange/widgets'\nwarning: no files found matching '*.css' under directory 'Orange/widgets'\nwarning: no files found matching '*.html' under directory 'Orange/widgets'\nwarning: no files found matching '*.svg' under directory 'distribute'\nwarning: no files found matching 'COPYING'\n/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.7/site-packages/pkg_resources/__init__.py:119: PkgResourcesDeprecationWarning:  is an invalid version and will not be supported in a future release\n  PkgResourcesDeprecationWarning,\n/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.7/site-packages/setuptools/command/install.py:37: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.\n  setuptools.SetuptoolsDeprecationWarning,\n/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.7/site-packages/pkg_resources/__init__.py:119: PkgResourcesDeprecationWarning:  is an invalid version and will not be supported in a future release\n  PkgResourcesDeprecationWarning,\nerror: Couldn't find a setup script in /tmp/easy_install-wbkfvoe6/scipy-1.15.0.tar.gz\nUsing CPython 3.8.20\nCreating virtual environment at: .venv\nActivate with: source .venv/bin/activate\nResolved 15 packages in 117ms\nPrepared 15 packages in 1ms\nInstalled 15 packages in 103ms\n + cython==0.29.37\n + exceptiongroup==1.2.2\n + iniconfig==2.0.0\n + numpy==1.24.4\n + packaging==24.2\n + pluggy==1.5.0\n + pyqt5==5.15.11\n + pyqt5-qt5==5.15.16\n + pyqt5-sip==12.15.0\n + pyqtwebengine==5.15.7\n + pyqtwebengine-qt5==5.15.16\n + pytest==8.3.4\n + setuptools==75.3.0\n + tomli==2.2.1\n + wheel==0.45.1\nResolved 59 packages in 132ms\nInstalled 55 packages in 166ms\n + anyio==4.5.2\n + backports-tarfile==1.2.0\n + baycomp==1.0.3\n + bottleneck==1.4.0\n + certifi==2024.12.14\n + cffi==1.17.1\n + chardet==5.2.0\n + charset-normalizer==3.4.1\n + contourpy==1.1.1\n + cryptography==44.0.0\n + cycler==0.12.1\n + et-xmlfile==2.0.0\n + fonttools==4.55.3\n + h11==0.14.0\n + httpcore==1.0.7\n + httpx==0.28.1\n + idna==3.10\n + importlib-metadata==8.5.0\n + importlib-resources==6.4.5\n + jaraco-classes==3.4.0\n + jaraco-context==6.0.1\n + jaraco-functools==4.1.0\n + jeepney==0.8.0\n + joblib==1.4.2\n + keyring==25.5.0\n + keyrings-alt==5.0.2\n + kiwisolver==1.4.7\n + matplotlib==3.7.5\n + more-itertools==10.5.0\n + networkx==3.1\n + openpyxl==3.1.5\n + opentsne==1.0.1\n + pandas==2.0.3\n + pillow==10.4.0\n + pip==24.3.1\n + pycparser==2.22\n + pyparsing==3.1.4\n + python-dateutil==2.9.0.post0\n + python-louvain==0.16\n + pytz==2024.2\n + pyyaml==6.0.2\n + requests==2.32.3\n + scikit-learn==1.3.2\n + scipy==1.10.1\n + secretstorage==3.3.3\n + serverfiles==0.3.1\n + six==1.17.0\n + sniffio==1.3.1\n + threadpoolctl==3.5.0\n + typing-extensions==4.12.2\n + tzdata==2024.2\n + urllib3==2.2.3\n + xlrd==2.0.1\n + xlsxwriter==3.2.0\n + zipp==3.20.2\nResolved 64 packages in 73ms\nInstalled 41 packages in 137ms\n + anyqt==0.2.0\n + asttokens==3.0.0\n + attrs==24.3.0\n + backcall==0.2.0\n + cattrs==24.1.2\n + comm==0.2.2\n + commonmark==0.9.1\n + debugpy==1.8.11\n + decorator==5.1.1\n + dictdiffer==0.9.0\n + docutils==0.20.1\n + executing==2.1.0\n + ipykernel==6.29.5\n + ipython==8.12.3\n + jedi==0.19.2\n + jupyter-client==8.6.3\n + jupyter-core==5.7.2\n + matplotlib-inline==0.1.7\n + nest-asyncio==1.6.0\n + orange-canvas-core==0.1.35\n + orange-widget-base==4.22.0\n + parso==0.8.4\n + pexpect==4.9.0\n + pickleshare==0.7.5\n + platformdirs==4.3.6\n + prompt-toolkit==3.0.48\n + psutil==6.1.1\n + ptyprocess==0.7.0\n + pure-eval==0.2.3\n + pygments==2.19.1\n + pyqtgraph==0.13.3\n + pyzmq==26.2.0\n + qasync==0.27.1\n + qtconsole==5.6.1\n + qtpy==2.4.2\n + requests-cache==1.2.1\n + stack-data==0.6.3\n + tornado==6.4.2\n + traitlets==5.14.3\n + url-normalize==1.4.3\n + wcwidth==0.2.13\nResolved 2 packages in 7ms\nInstalled 2 packages in 15ms\n + psycopg2==2.9.10\n + pymssql==2.3.2\nResolved 23 packages in 20ms\nInstalled 6 packages in 601ms\n + catboost==1.2.7\n + graphviz==0.20.3\n + nvidia-nccl-cu12==2.24.3\n + plotly==5.24.1\n + tenacity==9.0.0\n + xgboost==2.1.3\nIn file included from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages/numpy/core/include/numpy/ndarraytypes.h:1940,\n                 from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,\n                 from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages/numpy/core/include/numpy/arrayobject.h:5,\n                 from Orange/classification/_tree_scorers.c:775:\n/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning \"Using deprecated NumPy API, disable it with \" \"#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION\" [-Wcpp]\n   17 | #warning \"Using deprecated NumPy API, disable it with \" \\\n      |  ^~~~~~~\nOrange/classification/_tree_scorers.c: In function ‘__pyx_pf_6Orange_14classification_13_tree_scorers_2find_threshold_entropy’:\nOrange/classification/_tree_scorers.c:3427:27: warning: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘int’ [-Wsign-compare]\n 3427 |   __pyx_t_7 = ((__pyx_v_N <= __pyx_v_min_leaf) != 0);\n      |                           ^~\nOrange/classification/_tree_scorers.c: In function ‘__pyx_pf_6Orange_14classification_13_tree_scorers_6find_threshold_MSE’:\nOrange/classification/_tree_scorers.c:4883:27: warning: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘int’ [-Wsign-compare]\n 4883 |   __pyx_t_1 = ((__pyx_v_N <= __pyx_v_min_leaf) != 0);\n      |                           ^~\nOrange/classification/_tree_scorers.c: In function ‘__pyx_pf_6Orange_14classification_13_tree_scorers_8find_binarization_MSE’:\nOrange/classification/_tree_scorers.c:5629:43: warning: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘int’ [-Wsign-compare]\n 5629 |           for (__pyx_t_19 = 0; __pyx_t_19 < __pyx_t_18; __pyx_t_19+=1) {\n      |                                           ^\nOrange/classification/_tree_scorers.c:5750:39: warning: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘int’ [-Wsign-compare]\n 5750 |           __pyx_t_20 = ((__pyx_v_left >= __pyx_v_min_leaf) != 0);\n      |                                       ^~\nOrange/classification/_tree_scorers.c:5756:53: warning: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘int’ [-Wsign-compare]\n 5756 |           __pyx_t_20 = (((__pyx_v_N - __pyx_v_left) >= __pyx_v_min_leaf) != 0);\n      |                                                     ^~\nOrange/classification/_tree_scorers.c: In function ‘__pyx_pf_6Orange_14classification_13_tree_scorers_14compute_predictions_csr’:\nOrange/classification/_tree_scorers.c:7217:41: warning: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘int’ [-Wsign-compare]\n 7217 |         for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) {\n      |                                         ^\nOrange/classification/_tree_scorers.c: In function ‘__pyx_pf_6Orange_14classification_13_tree_scorers_16compute_predictions_csc’:\nOrange/classification/_tree_scorers.c:7874:41: warning: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘int’ [-Wsign-compare]\n 7874 |         for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) {\n      |                                         ^\nOrange/classification/_tree_scorers.c:7934:150: warning: comparison of integer expressions of different signedness: ‘__pyx_t_5numpy_int32_t’ {aka ‘int’} and ‘unsigned int’ [-Wsign-compare]\n 7934 |               __pyx_t_16 = (((*((__pyx_t_5numpy_int32_t const  *) ( /* dim=0 */ (__pyx_v_indices.data + __pyx_t_15 * __pyx_v_indices.strides[0]) ))) != __pyx_v_i) != 0);\n      |                                                                                                                                                      ^~\nIn file included from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages/numpy/core/include/numpy/ndarraytypes.h:1940,\n                 from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,\n                 from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages/numpy/core/include/numpy/arrayobject.h:5,\n                 from Orange/data/_contingency.c:775:\n/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning \"Using deprecated NumPy API, disable it with \" \"#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION\" [-Wcpp]\n   17 | #warning \"Using deprecated NumPy API, disable it with \" \\\n      |  ^~~~~~~\nOrange/data/_io.c: In function ‘__pyx_pf_6Orange_4data_3_io_sparse_read_float.constprop’:\nOrange/data/_io.c:4120:43: warning: ‘__pyx_v_decs’ may be used uninitialized in this function [-Wmaybe-uninitialized]\n 4120 |           __pyx_v_value = ((__pyx_v_value * __pyx_v_decs) + (__pyx_v_c & 0xf));\n      |                            ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~\nOrange/data/_io.c:4318:24: warning: ‘__pyx_v_value’ may be used uninitialized in this function [-Wmaybe-uninitialized]\n 4318 |           __pyx_t_10 = PyFloat_FromDouble(__pyx_v_value); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 223, __pyx_L5_error)\n      |                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\nOrange/data/_io.c:683:40: warning: ‘__pyx_v_attr_index’ may be used uninitialized in this function [-Wmaybe-uninitialized]\n  683 |   #define PyInt_FromLong               PyLong_FromLong\n      |                                        ^~~~~~~~~~~~~~~\nOrange/data/_io.c:1590:7: note: ‘__pyx_v_attr_index’ was declared here\n 1590 |   int __pyx_v_attr_index;\n      |       ^~~~~~~~~~~~~~~~~~\nOrange/data/_io.c:3183:25: warning: ‘__pyx_v_atomp’ may be used uninitialized in this function [-Wmaybe-uninitialized]\n 3183 |           __pyx_v_atomp = (__pyx_v_atomp + 1);\n      |           ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~\nIn file included from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages/numpy/core/include/numpy/ndarraytypes.h:1940,\n                 from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,\n                 from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages/numpy/core/include/numpy/arrayobject.h:5,\n                 from Orange/data/_valuecount.c:775:\n/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning \"Using deprecated NumPy API, disable it with \" \"#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION\" [-Wcpp]\n   17 | #warning \"Using deprecated NumPy API, disable it with \" \\\n      |  ^~~~~~~\nIn file included from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages/numpy/core/include/numpy/ndarraytypes.h:1940,\n                 from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,\n                 from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages/numpy/core/include/numpy/arrayobject.h:5,\n                 from Orange/distance/_distance.c:775:\n/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning \"Using deprecated NumPy API, disable it with \" \"#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION\" [-Wcpp]\n   17 | #warning \"Using deprecated NumPy API, disable it with \" \\\n      |  ^~~~~~~\nIn file included from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages/numpy/core/include/numpy/ndarraytypes.h:1940,\n                 from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,\n                 from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages/numpy/core/include/numpy/arrayobject.h:5,\n                 from Orange/preprocess/_discretize.c:774:\n/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning \"Using deprecated NumPy API, disable it with \" \"#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION\" [-Wcpp]\n   17 | #warning \"Using deprecated NumPy API, disable it with \" \\\n      |  ^~~~~~~\nIn file included from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages/numpy/core/include/numpy/ndarraytypes.h:1940,\n                 from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,\n                 from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages/numpy/core/include/numpy/arrayobject.h:5,\n                 from Orange/preprocess/_relieff.cpp:790:\n/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning \"Using deprecated NumPy API, disable it with \" \"#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION\" [-Wcpp]\n   17 | #warning \"Using deprecated NumPy API, disable it with \" \\\n      |  ^~~~~~~\nIn file included from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages/numpy/core/include/numpy/ndarraytypes.h:1940,\n                 from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,\n                 from /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages/numpy/core/include/numpy/arrayobject.h:5,\n                 from Orange/projection/_som.c:775:\n/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning \"Using deprecated NumPy API, disable it with \" \"#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION\" [-Wcpp]\n   17 | #warning \"Using deprecated NumPy API, disable it with \" \\\n      |  ^~~~~~~\nOrange/projection/_som.c: In function ‘__pyx_pw_6Orange_10projection_4_som_5update_hex’:\nOrange/projection/_som.c:3863:7: warning: ‘__pyx_v_win_y’ may be used uninitialized in this function [-Wmaybe-uninitialized]\n 3863 |   int __pyx_v_win_y;\n      |       ^~~~~~~~~~~~~\nOrange/projection/_som.c:3862:7: warning: ‘__pyx_v_win_x’ may be used uninitialized in this function [-Wmaybe-uninitialized]\n 3862 |   int __pyx_v_win_x;\n      |       ^~~~~~~~~~~~~\nOrange/projection/_som.c: In function ‘__pyx_pf_6Orange_10projection_4_som_8update_sparse.constprop’:\nOrange/projection/_som.c:4934:7: warning: ‘__pyx_v_win_y’ may be used uninitialized in this function [-Wmaybe-uninitialized]\n 4934 |   int __pyx_v_win_y;\n      |       ^~~~~~~~~~~~~\nOrange/projection/_som.c:4933:7: warning: ‘__pyx_v_win_x’ may be used uninitialized in this function [-Wmaybe-uninitialized]\n 4933 |   int __pyx_v_win_x;\n      |       ^~~~~~~~~~~~~\nOrange/projection/_som.c: In function ‘__pyx_pf_6Orange_10projection_4_som_10update_sparse_hex.constprop’:\nOrange/projection/_som.c:5682:7: warning: ‘__pyx_v_win_y’ may be used uninitialized in this function [-Wmaybe-uninitialized]\n 5682 |   int __pyx_v_win_y;\n      |       ^~~~~~~~~~~~~\nOrange/projection/_som.c:5681:7: warning: ‘__pyx_v_win_x’ may be used uninitialized in this function [-Wmaybe-uninitialized]\n 5681 |   int __pyx_v_win_x;\n      |       ^~~~~~~~~~~~~\nOrange/projection/_som.c: In function ‘__pyx_pw_6Orange_10projection_4_som_1get_winners’:\nOrange/projection/_som.c:3184:223: warning: ‘__pyx_v_win_y’ may be used uninitialized in this function [-Wmaybe-uninitialized]\n 3184 |           *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int16_t *, __pyx_pybuffernd_winners.rcbuffer->pybuffer.buf, __pyx_t_22, __pyx_pybuffernd_winners.diminfo[0].strides, __pyx_t_23, __pyx_pybuffernd_winners.diminfo[1].strides) = __pyx_v_win_y;\n      |           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~\nOrange/projection/_som.c:2887:7: note: ‘__pyx_v_win_y’ was declared here\n 2887 |   int __pyx_v_win_y;\n      |       ^~~~~~~~~~~~~\nOrange/projection/_som.c:3173:223: warning: ‘__pyx_v_win_x’ may be used uninitialized in this function [-Wmaybe-uninitialized]\n 3173 |           *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int16_t *, __pyx_pybuffernd_winners.rcbuffer->pybuffer.buf, __pyx_t_23, __pyx_pybuffernd_winners.diminfo[0].strides, __pyx_t_22, __pyx_pybuffernd_winners.diminfo[1].strides) = __pyx_v_win_x;\n      |           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~\nOrange/projection/_som.c:2886:7: note: ‘__pyx_v_win_x’ was declared here\n 2886 |   int __pyx_v_win_x;\n      |       ^~~~~~~~~~~~~\nOrange/projection/_som.c: In function ‘__pyx_pw_6Orange_10projection_4_som_3update’:\nOrange/projection/_som.c:3357:7: warning: ‘__pyx_v_win_y’ may be used uninitialized in this function [-Wmaybe-uninitialized]\n 3357 |   int __pyx_v_win_y;\n      |       ^~~~~~~~~~~~~\nOrange/projection/_som.c: In function ‘__pyx_pw_6Orange_10projection_4_som_7get_winners_sparse’:\nOrange/projection/_som.c:4732:223: warning: ‘__pyx_v_win_y’ may be used uninitialized in this function [-Wmaybe-uninitialized]\n 4732 |           *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int16_t *, __pyx_pybuffernd_winners.rcbuffer->pybuffer.buf, __pyx_t_26, __pyx_pybuffernd_winners.diminfo[0].strides, __pyx_t_27, __pyx_pybuffernd_winners.diminfo[1].strides) = __pyx_v_win_y;\n      |           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~\nOrange/projection/_som.c:4307:7: note: ‘__pyx_v_win_y’ was declared here\n 4307 |   int __pyx_v_win_y;\n      |       ^~~~~~~~~~~~~\nOrange/projection/_som.c:4721:223: warning: ‘__pyx_v_win_x’ may be used uninitialized in this function [-Wmaybe-uninitialized]\n 4721 |           *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int16_t *, __pyx_pybuffernd_winners.rcbuffer->pybuffer.buf, __pyx_t_27, __pyx_pybuffernd_winners.diminfo[0].strides, __pyx_t_26, __pyx_pybuffernd_winners.diminfo[1].strides) = __pyx_v_win_x;\n      |           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~\nOrange/projection/_som.c:4306:7: note: ‘__pyx_v_win_x’ was declared here\n 4306 |   int __pyx_v_win_x;\n      |       ^~~~~~~~~~~~~\nOrange/classification/_simple_tree.c: In function ‘gain_ratio_c’:\nOrange/classification/_simple_tree.c:63:9: warning: implicit declaration of function ‘qsort_r’; did you mean ‘qsort’? [-Wimplicit-function-declaration]\n   63 |         qsort_r(base, nel, size, compar, thunk)\n      |         ^~~~~~~\nOrange/classification/_simple_tree.c:147:9: note: in expansion of macro ‘QSORT_R_FUNC’\n  147 |         QSORT_R_FUNC(examples, size, sizeof(struct Example), (void*) &compar_attr, compar_examples);\n      |         ^~~~~~~~~~~~\n/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages/setuptools/_distutils/dist.py:261: UserWarning: Unknown distribution option: 'test_suite'\n  warnings.warn(msg)\n/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages/setuptools/_distutils/dist.py:261: UserWarning: Unknown distribution option: 'test_suite'\n  warnings.warn(msg)\n/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages/setuptools/command/develop.py:41: EasyInstallDeprecationWarning: easy_install command is deprecated.\n!!\n\n        ********************************************************************************\n        Please avoid running ``setup.py`` and ``easy_install``.\n        Instead, use pypa/build, pypa/installer or other\n        standards-based tools.\n\n        See https://github.com/pypa/setuptools/issues/917 for details.\n        ********************************************************************************\n\n!!\n  easy_install.initialize_options(self)\n/home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e/.venv/lib/python3.8/site-packages/setuptools/_distutils/cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated.\n!!\n\n        ********************************************************************************\n        Please avoid running ``setup.py`` directly.\n        Instead, use pypa/build, pypa/installer or other\n        standards-based tools.\n\n        See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.\n        ********************************************************************************\n\n!!\n  self.initialize_options()\nwarning: no files found matching 'README*' under directory 'Orange'\nwarning: no files found matching 'LICENSE' under directory 'Orange'\nwarning: no files found matching '*.basket' under directory 'Orange/datasets'\nwarning: no files found matching '*.svg' under directory 'Orange/canvas'\nwarning: no files found matching '*.js' under directory 'Orange/widgets'\nwarning: no files found matching '*.css' under directory 'Orange/widgets'\nwarning: no files found matching '*.html' under directory 'Orange/widgets'\nwarning: no files found matching '*.svg' under directory 'distribute'\nwarning: no files found matching 'COPYING'\n",
    "new_commit_res_code": 0,
    "new_commit_res_stdout": "============================= test session starts ==============================\nplatform linux -- Python 3.8.20, pytest-8.3.4, pluggy-1.5.0\nrootdir: /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e\nconfigfile: pyproject.toml\nplugins: anyio-4.5.2, typeguard-4.3.0\ncollected 18 items\n\nr2e_tests/test_1.py sss...............                                   [100%]\n\n==================================== PASSES ====================================\n=========================== short test summary info ============================\nPASSED r2e_tests/test_1.py::TestOWDataSampler::test_bigger_output_warning\nPASSED r2e_tests/test_1.py::TestOWDataSampler::test_bigger_size_with_replacement\nPASSED r2e_tests/test_1.py::TestOWDataSampler::test_bigger_size_without_replacement\nPASSED r2e_tests/test_1.py::TestOWDataSampler::test_bootstrap\nPASSED r2e_tests/test_1.py::TestOWDataSampler::test_cv_output_migration\nPASSED r2e_tests/test_1.py::TestOWDataSampler::test_cv_outputs\nPASSED r2e_tests/test_1.py::TestOWDataSampler::test_empty_sample\nPASSED r2e_tests/test_1.py::TestOWDataSampler::test_error_message\nPASSED r2e_tests/test_1.py::TestOWDataSampler::test_image_export\nPASSED r2e_tests/test_1.py::TestOWDataSampler::test_minimum_size\nPASSED r2e_tests/test_1.py::TestOWDataSampler::test_msg_base_class\nPASSED r2e_tests/test_1.py::TestOWDataSampler::test_no_intersection_in_outputs\nPASSED r2e_tests/test_1.py::TestOWDataSampler::test_send_report\nPASSED r2e_tests/test_1.py::TestOWDataSampler::test_shuffling\nPASSED r2e_tests/test_1.py::TestOWDataSampler::test_stratified_on_unbalanced_data\nSKIPPED [1] .venv/lib/python3.8/site-packages/orangewidget/tests/base.py:244: image exporting not tested as .widget was not set\nSKIPPED [1] .venv/lib/python3.8/site-packages/orangewidget/tests/base.py:238: minimum size not tested as .widget was not set\nSKIPPED [1] .venv/lib/python3.8/site-packages/orangewidget/tests/base.py:250: msg base class not tested as .widget was not set\n======================== 15 passed, 3 skipped in 4.77s =========================\nWidgets left: 0    Max widgets: 1408 \n\n",
    "new_commit_res_stderr": "",
    "old_commit_res_code": 1,
    "old_commit_res_stdout": "============================= test session starts ==============================\nplatform linux -- Python 3.8.20, pytest-8.3.4, pluggy-1.5.0\nrootdir: /home/gcpuser/buckets/local_repoeval_bucket/repos/orange3_3423a8ea9a827f778a13129d31cb21df9cc05b5e\nconfigfile: pyproject.toml\nplugins: anyio-4.5.2, typeguard-4.3.0\ncollected 18 items\n\nr2e_tests/test_1.py sss......F........                                   [100%]\n\n=================================== FAILURES ===================================\n_____________________ TestOWDataSampler.test_empty_sample ______________________\n\nself = <r2e_tests.test_1.TestOWDataSampler testMethod=test_empty_sample>\n\n    def test_empty_sample(self):\n        w = self.widget\n        self.send_signal(w.Inputs.data, self.iris)\n    \n        self.set_fixed_sample_size(150)\n        self.assertEqual(len(self.get_output(w.Outputs.data_sample)), 150)\n        self.assertEqual(len(self.get_output(w.Outputs.remaining_data)), 0)\n    \n        self.set_fixed_sample_size(0)\n>       self.assertEqual(len(self.get_output(w.Outputs.data_sample)), 0)\nE       AssertionError: 1 != 0\n\nr2e_tests/test_1.py:189: AssertionError\n==================================== PASSES ====================================\n=========================== short test summary info ============================\nPASSED r2e_tests/test_1.py::TestOWDataSampler::test_bigger_output_warning\nPASSED r2e_tests/test_1.py::TestOWDataSampler::test_bigger_size_with_replacement\nPASSED r2e_tests/test_1.py::TestOWDataSampler::test_bigger_size_without_replacement\nPASSED r2e_tests/test_1.py::TestOWDataSampler::test_bootstrap\nPASSED r2e_tests/test_1.py::TestOWDataSampler::test_cv_output_migration\nPASSED r2e_tests/test_1.py::TestOWDataSampler::test_cv_outputs\nPASSED r2e_tests/test_1.py::TestOWDataSampler::test_error_message\nPASSED r2e_tests/test_1.py::TestOWDataSampler::test_image_export\nPASSED r2e_tests/test_1.py::TestOWDataSampler::test_minimum_size\nPASSED r2e_tests/test_1.py::TestOWDataSampler::test_msg_base_class\nPASSED r2e_tests/test_1.py::TestOWDataSampler::test_no_intersection_in_outputs\nPASSED r2e_tests/test_1.py::TestOWDataSampler::test_send_report\nPASSED r2e_tests/test_1.py::TestOWDataSampler::test_shuffling\nPASSED r2e_tests/test_1.py::TestOWDataSampler::test_stratified_on_unbalanced_data\nSKIPPED [1] .venv/lib/python3.8/site-packages/orangewidget/tests/base.py:244: image exporting not tested as .widget was not set\nSKIPPED [1] .venv/lib/python3.8/site-packages/orangewidget/tests/base.py:238: minimum size not tested as .widget was not set\nSKIPPED [1] .venv/lib/python3.8/site-packages/orangewidget/tests/base.py:250: msg base class not tested as .widget was not set\nFAILED r2e_tests/test_1.py::TestOWDataSampler::test_empty_sample - AssertionE...\n=================== 1 failed, 14 passed, 3 skipped in 2.88s ====================\nWidgets left: 0    Max widgets: 1408 \n\n",
    "old_commit_res_stderr": ""
}
Orange/widgets/data/owdatasampler.py Orange/widgets/data/tests/test_owdatasampler.py
We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[ISSUE]
**Title:** Data Sampler returns non-empty sample when requesting a size of zero

**Description:**
When setting the sample size to zero in the Data Sampler widget, the resulting data sample is not empty as expected. This leads to incorrect data distribution and potential crashes.

**Example Code:**
```python
widget.send_signal('Data', iris_data)

widget.set_fixed_sample_size(150)
# Expected: 150 samples and 0 remaining data

widget.set_fixed_sample_size(0)
# Expected: 0 samples and all 150 data remaining
```

**Expected Behavior:**
Setting the sample size to zero should produce an empty data sample and retain all data in the remaining dataset.

**Actual Behavior:**
After setting the sample size to zero, the data sample contains one instance instead of being empty, causing an assertion failure.
[/ISSUE]
--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.

--- BEGIN FILE ---
```
### Orange/widgets/data/owdatasampler.py
import math

from AnyQt.QtWidgets import QFormLayout
from AnyQt.QtCore import Qt

import numpy as np
import sklearn.model_selection as skl

from Orange.widgets import gui
from Orange.widgets.settings import Setting
from Orange.data import Table
from Orange.data.sql.table import SqlTable
from Orange.widgets.utils.localization import pl
from Orange.widgets.utils.widgetpreview import WidgetPreview
from Orange.widgets.widget import Msg, OWWidget, Input, Output
from Orange.util import Reprable


class OWDataSampler(OWWidget):
    name = "Data Sampler"
    description = "Randomly draw a subset of data points " \
                  "from the input dataset."
    icon = "icons/DataSampler.svg"
    priority = 100
    category = "Transform"
    keywords = ["random"]

    _MAX_SAMPLE_SIZE = 2 ** 31 - 1

    class Inputs:
        data = Input("Data", Table)

    class Outputs:
        data_sample = Output("Data Sample", Table, default=True)
        remaining_data = Output("Remaining Data", Table)

    want_main_area = False
    resizing_enabled = False

    RandomSeed = 42
    FixedProportion, FixedSize, CrossValidation, Bootstrap = range(4)
    SqlTime, SqlProportion = range(2)

    selectedFold: int

    use_seed = Setting(True)
    replacement = Setting(False)
    stratify = Setting(False)
    sql_dl = Setting(False)
    sampling_type = Setting(FixedProportion)
    sampleSizeNumber = Setting(1)
    sampleSizePercentage = Setting(70)
    sampleSizeSqlTime = Setting(1)
    sampleSizeSqlPercentage = Setting(0.1)
    number_of_folds = Setting(10)
    selectedFold = Setting(1)

    # Older versions of the widget had swapped outputs for cross validation
    # Migrations set this to True for compability with older workflows
    compatibility_mode = Setting(False, schema_only=True)

    settings_version = 2

    class Information(OWWidget.Information):
        compatibility_mode = Msg(
            "Compatibility mode\n"
            "New versions of widget have swapped outputs for cross validation"
        )

    class Warning(OWWidget.Warning):
        could_not_stratify = Msg("Stratification failed.\n{}")
        bigger_sample = Msg('Sample is bigger than input.')

    class Error(OWWidget.Error):
        too_many_folds = Msg("Number of subsets exceeds data size.")
        sample_larger_than_data = Msg("Sample can't be larger than data.")
        not_enough_to_stratify = Msg("Data is too small to stratify.")
        no_data = Msg("Dataset is empty.")

    def __init__(self):
        super().__init__()
        if self.compatibility_mode:
            self.Information.compatibility_mode()

        self.data = None
        self.indices = None
        self.sampled_instances = self.remaining_instances = None

        self.sampling_box = gui.vBox(self.controlArea, "Sampling Type")
        sampling = gui.radioButtons(self.sampling_box, self, "sampling_type",
                                    callback=self.sampling_type_changed)

        def set_sampling_type(i):
            def set_sampling_type_i():
                self.sampling_type = i
                self.sampling_type_changed()
            return set_sampling_type_i

        gui.appendRadioButton(sampling, "Fixed proportion of data:")
        self.sampleSizePercentageSlider = gui.hSlider(
            gui.indentedBox(sampling), self,
            "sampleSizePercentage",
            minValue=0, maxValue=100, ticks=10, labelFormat="%d %%",
            callback=set_sampling_type(self.FixedProportion))

        gui.appendRadioButton(sampling, "Fixed sample size")
        ibox = gui.indentedBox(sampling)
        self.sampleSizeSpin = gui.spin(
            ibox, self, "sampleSizeNumber", label="Instances: ",
            minv=1, maxv=self._MAX_SAMPLE_SIZE,
            callback=set_sampling_type(self.FixedSize),
            controlWidth=90)
        gui.checkBox(
            ibox, self, "replacement", "Sample with replacement",
            callback=set_sampling_type(self.FixedSize))

        gui.appendRadioButton(sampling, "Cross validation")
        form = QFormLayout(
            formAlignment=Qt.AlignLeft | Qt.AlignTop,
            labelAlignment=Qt.AlignLeft,
            fieldGrowthPolicy=QFormLayout.AllNonFixedFieldsGrow)
        ibox = gui.indentedBox(sampling, orientation=form)
        form.addRow("Number of subsets:",
                    gui.spin(
                        ibox, self, "number_of_folds", 2, 100,
                        addToLayout=False,
                        callback=self.number_of_folds_changed))
        self.selected_fold_spin = gui.spin(
            ibox, self, "selectedFold", 1, self.number_of_folds,
            addToLayout=False, callback=self.fold_changed)
        form.addRow("Unused subset:" if not self.compatibility_mode
                    else "Selected subset:", self.selected_fold_spin)

        gui.appendRadioButton(sampling, "Bootstrap")

        self.sql_box = gui.vBox(self.controlArea, "Sampling Type")
        sampling = gui.radioButtons(self.sql_box, self, "sampling_type",
                                    callback=self.sampling_type_changed)
        gui.appendRadioButton(sampling, "Time:")
        ibox = gui.indentedBox(sampling)
        spin = gui.spin(ibox, self, "sampleSizeSqlTime", minv=1, maxv=3600,
                        callback=set_sampling_type(self.SqlTime))
        spin.setSuffix(" sec")
        gui.appendRadioButton(sampling, "Percentage")
        ibox = gui.indentedBox(sampling)
        spin = gui.spin(ibox, self, "sampleSizeSqlPercentage", spinType=float,
                        minv=0.0001, maxv=100, step=0.1, decimals=4,
                        callback=set_sampling_type(self.SqlProportion))
        spin.setSuffix(" %")
        self.sql_box.setVisible(False)

        self.options_box = gui.vBox(self.controlArea, "Options", addSpaceBefore=False)
        self.cb_seed = gui.checkBox(
            self.options_box, self, "use_seed",
            "Replicable (deterministic) sampling",
            callback=self.settings_changed)
        self.cb_stratify = gui.checkBox(
            self.options_box, self, "stratify",
            "Stratify sample (when possible)", callback=self.settings_changed)
        self.cb_sql_dl = gui.checkBox(
            self.options_box, self, "sql_dl", "Download data to local memory",
            callback=self.settings_changed)
        self.cb_sql_dl.setVisible(False)

        gui.button(self.buttonsArea, self, "Sample Data",
                   callback=self.commit)

    def sampling_type_changed(self):
        self.settings_changed()

    def number_of_folds_changed(self):
        self.selected_fold_spin.setMaximum(self.number_of_folds)
        self.sampling_type = self.CrossValidation
        self.settings_changed()

    def fold_changed(self):
        # a separate callback - if we decide to cache indices
        self.sampling_type = self.CrossValidation

    def settings_changed(self):
        self._update_sample_max_size()
        self.indices = None

    @Inputs.data
    def set_data(self, dataset):
        self.data = dataset
        if dataset is not None:
            sql = isinstance(dataset, SqlTable)
            self.sampling_box.setVisible(not sql)
            self.sql_box.setVisible(sql)
            self.cb_seed.setVisible(not sql)
            self.cb_stratify.setVisible(not sql)
            self.cb_sql_dl.setVisible(sql)

            if not sql:
                self._update_sample_max_size()
                self.updateindices()
        else:
            self.indices = None
            self.clear_messages()
        self.commit()

    def _update_sample_max_size(self):
        """Limit number of instances to input size unless using replacement."""
        if not self.data or self.replacement:
            self.sampleSizeSpin.setMaximum(self._MAX_SAMPLE_SIZE)
        else:
            self.sampleSizeSpin.setMaximum(len(self.data))

    def commit(self):
        if self.data is None:
            sample = other = None
            self.sampled_instances = self.remaining_instances = None
        elif isinstance(self.data, SqlTable):
            other = None
            if self.sampling_type == self.SqlProportion:
                sample = self.data.sample_percentage(
                    self.sampleSizeSqlPercentage, no_cache=True)
            else:
                sample = self.data.sample_time(
                    self.sampleSizeSqlTime, no_cache=True)
            if self.sql_dl:
                sample.download_data()
                sample = Table(sample)

        else:
            if self.indices is None or not self.use_seed:
                self.updateindices()
                if self.indices is None:
                    return
            if self.sampling_type in (
                    self.FixedProportion, self.FixedSize, self.Bootstrap):
                remaining, sample = self.indices
            elif self.sampling_type == self.CrossValidation:
                if self.compatibility_mode:
                    remaining, sample = self.indices[self.selectedFold - 1]
                else:
                    sample, remaining = self.indices[self.selectedFold - 1]

            sample = self.data[sample]
            other = self.data[remaining]
            self.sampled_instances = len(sample)
            self.remaining_instances = len(other)

        self.Outputs.data_sample.send(sample)
        self.Outputs.remaining_data.send(other)

    def updateindices(self):
        self.Error.clear()
        self.Warning.clear()
        repl = True
        data_length = len(self.data)
        num_classes = len(self.data.domain.class_var.values) \
            if self.data.domain.has_discrete_class else 0

        size = None
        if not data_length:
            self.Error.no_data()
        elif self.sampling_type == self.FixedSize:
            size = self.sampleSizeNumber
            repl = self.replacement
        elif self.sampling_type == self.FixedProportion:
            size = np.ceil(self.sampleSizePercentage / 100 * data_length)
            repl = False
        elif self.sampling_type == self.CrossValidation:
            if data_length < self.number_of_folds:
                self.Error.too_many_folds()
        else:
            assert self.sampling_type == self.Bootstrap

        if not repl and size is not None and (size > data_length):
            self.Error.sample_larger_than_data()
        if not repl and data_length <= num_classes and self.stratify:
            self.Error.not_enough_to_stratify()

        if self.Error.active:
            self.indices = None
            return

        # By the above, we can safely assume there is data
        if self.sampling_type == self.FixedSize and repl and size and \
                size > len(self.data):
            # This should only be possible when using replacement
            self.Warning.bigger_sample()

        stratified = (self.stratify and
                      isinstance(self.data, Table) and
                      self.data.domain.has_discrete_class)
        try:
            self.indices = self.sample(data_length, size, stratified)
        except ValueError as ex:
            self.Warning.could_not_stratify(str(ex))
            self.indices = self.sample(data_length, size, stratified=False)

    def sample(self, data_length, size, stratified):
        rnd = self.RandomSeed if self.use_seed else None
        if self.sampling_type == self.FixedSize:
            sampler = SampleRandomN(
                size, stratified=stratified, replace=self.replacement,
                random_state=rnd)
        elif self.sampling_type == self.FixedProportion:
            sampler = SampleRandomP(
                self.sampleSizePercentage / 100, stratified=stratified,
                random_state=rnd)
        elif self.sampling_type == self.Bootstrap:
            sampler = SampleBootstrap(data_length, random_state=rnd)
        else:
            sampler = SampleFoldIndices(
                self.number_of_folds, stratified=stratified, random_state=rnd)
        return sampler(self.data)

    def send_report(self):
        if self.sampling_type == self.FixedProportion:
            tpe = f"Random sample with {self.sampleSizePercentage} % of data"
        elif self.sampling_type == self.FixedSize:
            if self.sampleSizeNumber == 1:
                tpe = "Random data instance"
            else:
                tpe = f"Random sample with {self.sampleSizeNumber} data instances"
                if self.replacement:
                    tpe += ", with replacement"
        elif self.sampling_type == self.CrossValidation:
            tpe = f"{self.number_of_folds}-fold cross-validation " \
                  f"without subset #{self.selectedFold}"
        elif self.sampling_type == self.Bootstrap:
            tpe = "Bootstrap"
        else:  # pragma: no cover
            assert False
        if self.stratify:
            tpe += ", stratified (if possible)"
        if self.use_seed:
            tpe += ", deterministic"
        items = [("Sampling type", tpe)]
        if self.sampled_instances is not None:
            items += [
                ("Input", f"{len(self.data)} {pl(len(self.data), 'instance')}"),
                ("Sample", f"{self.sampled_instances} {pl(self.sampled_instances, 'instance')}"),
                ("Remaining", f"{self.remaining_instances} {pl(self.remaining_instances, 'instance')}"),
            ]
        self.report_items(items)

    @classmethod
    def migrate_settings(cls, settings, version):
        if not version or version < 2 \
                and settings["sampling_type"] == cls.CrossValidation:
            settings["compatibility_mode"] = True


class SampleFoldIndices(Reprable):
    def __init__(self, folds=10, stratified=False, random_state=None):
        """Samples data based on a number of folds.

        Args:
            folds (int): Number of folds
            stratified (bool): Return stratified indices (if applicable).
            random_state (Random): An initial state for replicable random
            behavior

        Returns:
            tuple-of-arrays: A tuple of array indices one for each fold.

        """
        self.folds = folds
        self.stratified = stratified
        self.random_state = random_state

    def __call__(self, table):
        if self.stratified and table.domain.has_discrete_class:
            splitter = skl.StratifiedKFold(
                self.folds, shuffle=True, random_state=self.random_state)
            splitter.get_n_splits(table.X, table.Y)
            ind = splitter.split(table.X, table.Y)
        else:
            splitter = skl.KFold(
                self.folds, shuffle=True, random_state=self.random_state)
            splitter.get_n_splits(table)
            ind = splitter.split(table)
        return tuple(ind)


class SampleRandomN(Reprable):
    def __init__(self, n=0, stratified=False, replace=False,
                 random_state=None):
        self.n = n
        self.stratified = stratified
        self.replace = replace
        self.random_state = random_state

    def __call__(self, table):
        if self.replace:
            # pylint: disable=no-member
            rgen = np.random.RandomState(self.random_state)
            sample = rgen.randint(0, len(table), self.n)
            o = np.ones(len(table))
            o[sample] = 0
            others = np.nonzero(o)[0]
            return others, sample
        if self.n == len(table):
            rgen = np.random.RandomState(self.random_state)
            sample = np.arange(self.n)
            rgen.shuffle(sample)
            return np.array([], dtype=int), sample
        elif self.stratified and table.domain.has_discrete_class:
            test_size = max(len(table.domain.class_var.values), self.n)
            splitter = skl.StratifiedShuffleSplit(
                n_splits=1, test_size=test_size,
                train_size=len(table) - test_size,
                random_state=self.random_state)
            splitter.get_n_splits(table.X, table.Y)
            ind = splitter.split(table.X, table.Y)
        else:
            splitter = skl.ShuffleSplit(
                n_splits=1, test_size=self.n, random_state=self.random_state)
            splitter.get_n_splits(table)
            ind = splitter.split(table)
        return next(iter(ind))


class SampleRandomP(Reprable):
    def __init__(self, p=0, stratified=False, random_state=None):
        self.p = p
        self.stratified = stratified
        self.random_state = random_state

    def __call__(self, table):
        n = int(math.ceil(len(table) * self.p))
        return SampleRandomN(n, self.stratified,
                             random_state=self.random_state)(table)


class SampleBootstrap(Reprable):
    def __init__(self, size=0, random_state=None):
        self.size = size
        self.random_state = random_state

    def __call__(self, table=None):
        """Bootstrap indices

        Args:
            table: Not used (but part of the signature)
        Returns:
            tuple (out_of_sample, sample) indices
        """
        # pylint: disable=no-member
        rgen = np.random.RandomState(self.random_state)
        sample = rgen.randint(0, self.size, self.size)
        sample.sort()  # not needed for the code below, just for the user
        insample = np.ones((self.size,), dtype=bool)
        insample[sample] = False
        remaining = np.flatnonzero(insample)
        return remaining, sample


if __name__ == "__main__":  # pragma: no cover
    WidgetPreview(OWDataSampler).run(Table("iris"))

```
--- END FILE ---

Please first localize the bug based on the issue statement, and then generate *SEARCH/REPLACE* edits to fix the issue.

Every *SEARCH/REPLACE* edit must use this format:
1. The file path
2. The start of search block: <<<<<<< SEARCH
3. A contiguous chunk of lines to search for in the existing source code
4. The dividing line: =======
5. The lines to replace into the source code
6. The end of the replace block: >>>>>>> REPLACE

Here is an example:

```python
### mathweb/flask/app.py
<<<<<<< SEARCH
from flask import Flask
=======
import math
from flask import Flask
>>>>>>> REPLACE
```
</solution>

Please note that the *SEARCH/REPLACE* edit REQUIRES PROPER INDENTATION. If you would like to add the line '        print(x)', you must fully write that out, with all those spaces before the code!
Wrap each *SEARCH/REPLACE* edit in a code block as shown in the example above. If you have multiple *SEARCH/REPLACE* edits, use a separate code block for each one.
[ISSUE]
**Title:** Data Sampler returns non-empty sample when requesting a size of zero

**Description:**
When setting the sample size to zero in the Data Sampler widget, the resulting data sample is not empty as expected. This leads to incorrect data distribution and potential crashes.

**Example Code:**
```python
widget.send_signal('Data', iris_data)

widget.set_fixed_sample_size(150)
# Expected: 150 samples and 0 remaining data

widget.set_fixed_sample_size(0)
# Expected: 0 samples and all 150 data remaining
```

**Expected Behavior:**
Setting the sample size to zero should produce an empty data sample and retain all data in the remaining dataset.

**Actual Behavior:**
After setting the sample size to zero, the data sample contains one instance instead of being empty, causing an assertion failure.
[/ISSUE]
{
    "TestOWDataSampler.test_bigger_output_warning": "PASSED",
    "TestOWDataSampler.test_bigger_size_with_replacement": "PASSED",
    "TestOWDataSampler.test_bigger_size_without_replacement": "PASSED",
    "TestOWDataSampler.test_bootstrap": "PASSED",
    "TestOWDataSampler.test_cv_output_migration": "PASSED",
    "TestOWDataSampler.test_cv_outputs": "PASSED",
    "TestOWDataSampler.test_empty_sample": "PASSED",
    "TestOWDataSampler.test_error_message": "PASSED",
    "TestOWDataSampler.test_image_export": "PASSED",
    "TestOWDataSampler.test_minimum_size": "PASSED",
    "TestOWDataSampler.test_msg_base_class": "PASSED",
    "TestOWDataSampler.test_no_intersection_in_outputs": "PASSED",
    "TestOWDataSampler.test_send_report": "PASSED",
    "TestOWDataSampler.test_shuffling": "PASSED",
    "TestOWDataSampler.test_stratified_on_unbalanced_data": "PASSED"
}
diff --git a/Orange/widgets/data/owdatasampler.py b/Orange/widgets/data/owdatasampler.py
index 15cbf3f53..6f14556ce 100644
--- a/Orange/widgets/data/owdatasampler.py
+++ b/Orange/widgets/data/owdatasampler.py
@@ -107,7 +107,7 @@ class OWDataSampler(OWWidget):
         ibox = gui.indentedBox(sampling)
         self.sampleSizeSpin = gui.spin(
             ibox, self, "sampleSizeNumber", label="Instances: ",
-            minv=1, maxv=self._MAX_SAMPLE_SIZE,
+            minv=0, maxv=self._MAX_SAMPLE_SIZE,
             callback=set_sampling_type(self.FixedSize),
             controlWidth=90)
         gui.checkBox(
@@ -395,11 +395,15 @@ class SampleRandomN(Reprable):
             o[sample] = 0
             others = np.nonzero(o)[0]
             return others, sample
-        if self.n == len(table):
+        if self.n in (0, len(table)):
             rgen = np.random.RandomState(self.random_state)
-            sample = np.arange(self.n)
-            rgen.shuffle(sample)
-            return np.array([], dtype=int), sample
+            shuffled = np.arange(len(table))
+            rgen.shuffle(shuffled)
+            empty = np.array([], dtype=int)
+            if self.n == 0:
+                return shuffled, empty
+            else:
+                return empty, shuffled
         elif self.stratified and table.domain.has_discrete_class:
             test_size = max(len(table.domain.class_var.values), self.n)
             splitter = skl.StratifiedShuffleSplit(

{"Orange/widgets/data/owdatasampler.py": "import math\n\nfrom AnyQt.QtWidgets import QFormLayout\nfrom AnyQt.QtCore import Qt\n\nimport numpy as np\nimport sklearn.model_selection as skl\n\nfrom Orange.widgets import gui\nfrom Orange.widgets.settings import Setting\nfrom Orange.data import Table\nfrom Orange.data.sql.table import SqlTable\nfrom Orange.widgets.utils.localization import pl\nfrom Orange.widgets.utils.widgetpreview import WidgetPreview\nfrom Orange.widgets.widget import Msg, OWWidget, Input, Output\nfrom Orange.util import Reprable\n\n\nclass OWDataSampler(OWWidget):\n    name = \"Data Sampler\"\n    description = \"Randomly draw a subset of data points \" \\\n                  \"from the input dataset.\"\n    icon = \"icons/DataSampler.svg\"\n    priority = 100\n    category = \"Transform\"\n    keywords = [\"random\"]\n\n    _MAX_SAMPLE_SIZE = 2 ** 31 - 1\n\n    class Inputs:\n        data = Input(\"Data\", Table)\n\n    class Outputs:\n        data_sample = Output(\"Data Sample\", Table, default=True)\n        remaining_data = Output(\"Remaining Data\", Table)\n\n    want_main_area = False\n    resizing_enabled = False\n\n    RandomSeed = 42\n    FixedProportion, FixedSize, CrossValidation, Bootstrap = range(4)\n    SqlTime, SqlProportion = range(2)\n\n    selectedFold: int\n\n    use_seed = Setting(True)\n    replacement = Setting(False)\n    stratify = Setting(False)\n    sql_dl = Setting(False)\n    sampling_type = Setting(FixedProportion)\n    sampleSizeNumber = Setting(1)\n    sampleSizePercentage = Setting(70)\n    sampleSizeSqlTime = Setting(1)\n    sampleSizeSqlPercentage = Setting(0.1)\n    number_of_folds = Setting(10)\n    selectedFold = Setting(1)\n\n    # Older versions of the widget had swapped outputs for cross validation\n    # Migrations set this to True for compability with older workflows\n    compatibility_mode = Setting(False, schema_only=True)\n\n    settings_version = 2\n\n    class Information(OWWidget.Information):\n        compatibility_mode = Msg(\n            \"Compatibility mode\\n\"\n            \"New versions of widget have swapped outputs for cross validation\"\n        )\n\n    class Warning(OWWidget.Warning):\n        could_not_stratify = Msg(\"Stratification failed.\\n{}\")\n        bigger_sample = Msg('Sample is bigger than input.')\n\n    class Error(OWWidget.Error):\n        too_many_folds = Msg(\"Number of subsets exceeds data size.\")\n        sample_larger_than_data = Msg(\"Sample can't be larger than data.\")\n        not_enough_to_stratify = Msg(\"Data is too small to stratify.\")\n        no_data = Msg(\"Dataset is empty.\")\n\n    def __init__(self):\n        super().__init__()\n        if self.compatibility_mode:\n            self.Information.compatibility_mode()\n\n        self.data = None\n        self.indices = None\n        self.sampled_instances = self.remaining_instances = None\n\n        self.sampling_box = gui.vBox(self.controlArea, \"Sampling Type\")\n        sampling = gui.radioButtons(self.sampling_box, self, \"sampling_type\",\n                                    callback=self.sampling_type_changed)\n\n        def set_sampling_type(i):\n            def set_sampling_type_i():\n                self.sampling_type = i\n                self.sampling_type_changed()\n            return set_sampling_type_i\n\n        gui.appendRadioButton(sampling, \"Fixed proportion of data:\")\n        self.sampleSizePercentageSlider = gui.hSlider(\n            gui.indentedBox(sampling), self,\n            \"sampleSizePercentage\",\n            minValue=0, maxValue=100, ticks=10, labelFormat=\"%d %%\",\n            callback=set_sampling_type(self.FixedProportion))\n\n        gui.appendRadioButton(sampling, \"Fixed sample size\")\n        ibox = gui.indentedBox(sampling)\n        self.sampleSizeSpin = gui.spin(\n            ibox, self, \"sampleSizeNumber\", label=\"Instances: \",\n            minv=1, maxv=self._MAX_SAMPLE_SIZE,\n            callback=set_sampling_type(self.FixedSize),\n            controlWidth=90)\n        gui.checkBox(\n            ibox, self, \"replacement\", \"Sample with replacement\",\n            callback=set_sampling_type(self.FixedSize))\n\n        gui.appendRadioButton(sampling, \"Cross validation\")\n        form = QFormLayout(\n            formAlignment=Qt.AlignLeft | Qt.AlignTop,\n            labelAlignment=Qt.AlignLeft,\n            fieldGrowthPolicy=QFormLayout.AllNonFixedFieldsGrow)\n        ibox = gui.indentedBox(sampling, orientation=form)\n        form.addRow(\"Number of subsets:\",\n                    gui.spin(\n                        ibox, self, \"number_of_folds\", 2, 100,\n                        addToLayout=False,\n                        callback=self.number_of_folds_changed))\n        self.selected_fold_spin = gui.spin(\n            ibox, self, \"selectedFold\", 1, self.number_of_folds,\n            addToLayout=False, callback=self.fold_changed)\n        form.addRow(\"Unused subset:\" if not self.compatibility_mode\n                    else \"Selected subset:\", self.selected_fold_spin)\n\n        gui.appendRadioButton(sampling, \"Bootstrap\")\n\n        self.sql_box = gui.vBox(self.controlArea, \"Sampling Type\")\n        sampling = gui.radioButtons(self.sql_box, self, \"sampling_type\",\n                                    callback=self.sampling_type_changed)\n        gui.appendRadioButton(sampling, \"Time:\")\n        ibox = gui.indentedBox(sampling)\n        spin = gui.spin(ibox, self, \"sampleSizeSqlTime\", minv=1, maxv=3600,\n                        callback=set_sampling_type(self.SqlTime))\n        spin.setSuffix(\" sec\")\n        gui.appendRadioButton(sampling, \"Percentage\")\n        ibox = gui.indentedBox(sampling)\n        spin = gui.spin(ibox, self, \"sampleSizeSqlPercentage\", spinType=float,\n                        minv=0.0001, maxv=100, step=0.1, decimals=4,\n                        callback=set_sampling_type(self.SqlProportion))\n        spin.setSuffix(\" %\")\n        self.sql_box.setVisible(False)\n\n        self.options_box = gui.vBox(self.controlArea, \"Options\", addSpaceBefore=False)\n        self.cb_seed = gui.checkBox(\n            self.options_box, self, \"use_seed\",\n            \"Replicable (deterministic) sampling\",\n            callback=self.settings_changed)\n        self.cb_stratify = gui.checkBox(\n            self.options_box, self, \"stratify\",\n            \"Stratify sample (when possible)\", callback=self.settings_changed)\n        self.cb_sql_dl = gui.checkBox(\n            self.options_box, self, \"sql_dl\", \"Download data to local memory\",\n            callback=self.settings_changed)\n        self.cb_sql_dl.setVisible(False)\n\n        gui.button(self.buttonsArea, self, \"Sample Data\",\n                   callback=self.commit)\n\n    def sampling_type_changed(self):\n        self.settings_changed()\n\n    def number_of_folds_changed(self):\n        self.selected_fold_spin.setMaximum(self.number_of_folds)\n        self.sampling_type = self.CrossValidation\n        self.settings_changed()\n\n    def fold_changed(self):\n        # a separate callback - if we decide to cache indices\n        self.sampling_type = self.CrossValidation\n\n    def settings_changed(self):\n        self._update_sample_max_size()\n        self.indices = None\n\n    @Inputs.data\n    def set_data(self, dataset):\n        self.data = dataset\n        if dataset is not None:\n            sql = isinstance(dataset, SqlTable)\n            self.sampling_box.setVisible(not sql)\n            self.sql_box.setVisible(sql)\n            self.cb_seed.setVisible(not sql)\n            self.cb_stratify.setVisible(not sql)\n            self.cb_sql_dl.setVisible(sql)\n\n            if not sql:\n                self._update_sample_max_size()\n                self.updateindices()\n        else:\n            self.indices = None\n            self.clear_messages()\n        self.commit()\n\n    def _update_sample_max_size(self):\n        \"\"\"Limit number of instances to input size unless using replacement.\"\"\"\n        if not self.data or self.replacement:\n            self.sampleSizeSpin.setMaximum(self._MAX_SAMPLE_SIZE)\n        else:\n            self.sampleSizeSpin.setMaximum(len(self.data))\n\n    def commit(self):\n        if self.data is None:\n            sample = other = None\n            self.sampled_instances = self.remaining_instances = None\n        elif isinstance(self.data, SqlTable):\n            other = None\n            if self.sampling_type == self.SqlProportion:\n                sample = self.data.sample_percentage(\n                    self.sampleSizeSqlPercentage, no_cache=True)\n            else:\n                sample = self.data.sample_time(\n                    self.sampleSizeSqlTime, no_cache=True)\n            if self.sql_dl:\n                sample.download_data()\n                sample = Table(sample)\n\n        else:\n            if self.indices is None or not self.use_seed:\n                self.updateindices()\n                if self.indices is None:\n                    return\n            if self.sampling_type in (\n                    self.FixedProportion, self.FixedSize, self.Bootstrap):\n                remaining, sample = self.indices\n            elif self.sampling_type == self.CrossValidation:\n                if self.compatibility_mode:\n                    remaining, sample = self.indices[self.selectedFold - 1]\n                else:\n                    sample, remaining = self.indices[self.selectedFold - 1]\n\n            sample = self.data[sample]\n            other = self.data[remaining]\n            self.sampled_instances = len(sample)\n            self.remaining_instances = len(other)\n\n        self.Outputs.data_sample.send(sample)\n        self.Outputs.remaining_data.send(other)\n\n    def updateindices(self):\n        self.Error.clear()\n        self.Warning.clear()\n        repl = True\n        data_length = len(self.data)\n        num_classes = len(self.data.domain.class_var.values) \\\n            if self.data.domain.has_discrete_class else 0\n\n        size = None\n        if not data_length:\n            self.Error.no_data()\n        elif self.sampling_type == self.FixedSize:\n            size = self.sampleSizeNumber\n            repl = self.replacement\n        elif self.sampling_type == self.FixedProportion:\n            size = np.ceil(self.sampleSizePercentage / 100 * data_length)\n            repl = False\n        elif self.sampling_type == self.CrossValidation:\n            if data_length < self.number_of_folds:\n                self.Error.too_many_folds()\n        else:\n            assert self.sampling_type == self.Bootstrap\n\n        if not repl and size is not None and (size > data_length):\n            self.Error.sample_larger_than_data()\n        if not repl and data_length <= num_classes and self.stratify:\n            self.Error.not_enough_to_stratify()\n\n        if self.Error.active:\n            self.indices = None\n            return\n\n        # By the above, we can safely assume there is data\n        if self.sampling_type == self.FixedSize and repl and size and \\\n                size > len(self.data):\n            # This should only be possible when using replacement\n            self.Warning.bigger_sample()\n\n        stratified = (self.stratify and\n                      isinstance(self.data, Table) and\n                      self.data.domain.has_discrete_class)\n        try:\n            self.indices = self.sample(data_length, size, stratified)\n        except ValueError as ex:\n            self.Warning.could_not_stratify(str(ex))\n            self.indices = self.sample(data_length, size, stratified=False)\n\n    def sample(self, data_length, size, stratified):\n        rnd = self.RandomSeed if self.use_seed else None\n        if self.sampling_type == self.FixedSize:\n            sampler = SampleRandomN(\n                size, stratified=stratified, replace=self.replacement,\n                random_state=rnd)\n        elif self.sampling_type == self.FixedProportion:\n            sampler = SampleRandomP(\n                self.sampleSizePercentage / 100, stratified=stratified,\n                random_state=rnd)\n        elif self.sampling_type == self.Bootstrap:\n            sampler = SampleBootstrap(data_length, random_state=rnd)\n        else:\n            sampler = SampleFoldIndices(\n                self.number_of_folds, stratified=stratified, random_state=rnd)\n        return sampler(self.data)\n\n    def send_report(self):\n        if self.sampling_type == self.FixedProportion:\n            tpe = f\"Random sample with {self.sampleSizePercentage} % of data\"\n        elif self.sampling_type == self.FixedSize:\n            if self.sampleSizeNumber == 1:\n                tpe = \"Random data instance\"\n            else:\n                tpe = f\"Random sample with {self.sampleSizeNumber} data instances\"\n                if self.replacement:\n                    tpe += \", with replacement\"\n        elif self.sampling_type == self.CrossValidation:\n            tpe = f\"{self.number_of_folds}-fold cross-validation \" \\\n                  f\"without subset #{self.selectedFold}\"\n        elif self.sampling_type == self.Bootstrap:\n            tpe = \"Bootstrap\"\n        else:  # pragma: no cover\n            assert False\n        if self.stratify:\n            tpe += \", stratified (if possible)\"\n        if self.use_seed:\n            tpe += \", deterministic\"\n        items = [(\"Sampling type\", tpe)]\n        if self.sampled_instances is not None:\n            items += [\n                (\"Input\", f\"{len(self.data)} {pl(len(self.data), 'instance')}\"),\n                (\"Sample\", f\"{self.sampled_instances} {pl(self.sampled_instances, 'instance')}\"),\n                (\"Remaining\", f\"{self.remaining_instances} {pl(self.remaining_instances, 'instance')}\"),\n            ]\n        self.report_items(items)\n\n    @classmethod\n    def migrate_settings(cls, settings, version):\n        if not version or version < 2 \\\n                and settings[\"sampling_type\"] == cls.CrossValidation:\n            settings[\"compatibility_mode\"] = True\n\n\nclass SampleFoldIndices(Reprable):\n    def __init__(self, folds=10, stratified=False, random_state=None):\n        \"\"\"Samples data based on a number of folds.\n\n        Args:\n            folds (int): Number of folds\n            stratified (bool): Return stratified indices (if applicable).\n            random_state (Random): An initial state for replicable random\n            behavior\n\n        Returns:\n            tuple-of-arrays: A tuple of array indices one for each fold.\n\n        \"\"\"\n        self.folds = folds\n        self.stratified = stratified\n        self.random_state = random_state\n\n    def __call__(self, table):\n        if self.stratified and table.domain.has_discrete_class:\n            splitter = skl.StratifiedKFold(\n                self.folds, shuffle=True, random_state=self.random_state)\n            splitter.get_n_splits(table.X, table.Y)\n            ind = splitter.split(table.X, table.Y)\n        else:\n            splitter = skl.KFold(\n                self.folds, shuffle=True, random_state=self.random_state)\n            splitter.get_n_splits(table)\n            ind = splitter.split(table)\n        return tuple(ind)\n\n\nclass SampleRandomN(Reprable):\n    def __init__(self, n=0, stratified=False, replace=False,\n                 random_state=None):\n        self.n = n\n        self.stratified = stratified\n        self.replace = replace\n        self.random_state = random_state\n\n    def __call__(self, table):\n        if self.replace:\n            # pylint: disable=no-member\n            rgen = np.random.RandomState(self.random_state)\n            sample = rgen.randint(0, len(table), self.n)\n            o = np.ones(len(table))\n            o[sample] = 0\n            others = np.nonzero(o)[0]\n            return others, sample\n        if self.n == len(table):\n            rgen = np.random.RandomState(self.random_state)\n            sample = np.arange(self.n)\n            rgen.shuffle(sample)\n            return np.array([], dtype=int), sample\n        elif self.stratified and table.domain.has_discrete_class:\n            test_size = max(len(table.domain.class_var.values), self.n)\n            splitter = skl.StratifiedShuffleSplit(\n                n_splits=1, test_size=test_size,\n                train_size=len(table) - test_size,\n                random_state=self.random_state)\n            splitter.get_n_splits(table.X, table.Y)\n            ind = splitter.split(table.X, table.Y)\n        else:\n            splitter = skl.ShuffleSplit(\n                n_splits=1, test_size=self.n, random_state=self.random_state)\n            splitter.get_n_splits(table)\n            ind = splitter.split(table)\n        return next(iter(ind))\n\n\nclass SampleRandomP(Reprable):\n    def __init__(self, p=0, stratified=False, random_state=None):\n        self.p = p\n        self.stratified = stratified\n        self.random_state = random_state\n\n    def __call__(self, table):\n        n = int(math.ceil(len(table) * self.p))\n        return SampleRandomN(n, self.stratified,\n                             random_state=self.random_state)(table)\n\n\nclass SampleBootstrap(Reprable):\n    def __init__(self, size=0, random_state=None):\n        self.size = size\n        self.random_state = random_state\n\n    def __call__(self, table=None):\n        \"\"\"Bootstrap indices\n\n        Args:\n            table: Not used (but part of the signature)\n        Returns:\n            tuple (out_of_sample, sample) indices\n        \"\"\"\n        # pylint: disable=no-member\n        rgen = np.random.RandomState(self.random_state)\n        sample = rgen.randint(0, self.size, self.size)\n        sample.sort()  # not needed for the code below, just for the user\n        insample = np.ones((self.size,), dtype=bool)\n        insample[sample] = False\n        remaining = np.flatnonzero(insample)\n        return remaining, sample\n\n\nif __name__ == \"__main__\":  # pragma: no cover\n    WidgetPreview(OWDataSampler).run(Table(\"iris\"))\n"}
A user will ask you to solve a task. You should first draft your thinking process (inner monologue). Then, generate the solution.

Your response format must follow the template below:
<think>
Your thoughts or/and draft, like working through an exercise on scratch paper. Be as casual and as long as you want until you are confident to generate a correct solution.
</think>
<solution>
Final solution presented to the user.
</solution>
system
We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[ISSUE]
**Title:** Data Sampler returns non-empty sample when requesting a size of zero

**Description:**
When setting the sample size to zero in the Data Sampler widget, the resulting data sample is not empty as expected. This leads to incorrect data distribution and potential crashes.

**Example Code:**
```python
widget.send_signal('Data', iris_data)

widget.set_fixed_sample_size(150)
# Expected: 150 samples and 0 remaining data

widget.set_fixed_sample_size(0)
# Expected: 0 samples and all 150 data remaining
```

**Expected Behavior:**
Setting the sample size to zero should produce an empty data sample and retain all data in the remaining dataset.

**Actual Behavior:**
After setting the sample size to zero, the data sample contains one instance instead of being empty, causing an assertion failure.
[/ISSUE]
--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.

--- BEGIN FILE ---
```
### Orange/widgets/data/owdatasampler.py
import math

from AnyQt.QtWidgets import QFormLayout
from AnyQt.QtCore import Qt

import numpy as np
import sklearn.model_selection as skl

from Orange.widgets import gui
from Orange.widgets.settings import Setting
from Orange.data import Table
from Orange.data.sql.table import SqlTable
from Orange.widgets.utils.localization import pl
from Orange.widgets.utils.widgetpreview import WidgetPreview
from Orange.widgets.widget import Msg, OWWidget, Input, Output
from Orange.util import Reprable


class OWDataSampler(OWWidget):
    name = "Data Sampler"
    description = "Randomly draw a subset of data points " \
                  "from the input dataset."
    icon = "icons/DataSampler.svg"
    priority = 100
    category = "Transform"
    keywords = ["random"]

    _MAX_SAMPLE_SIZE = 2 ** 31 - 1

    class Inputs:
        data = Input("Data", Table)

    class Outputs:
        data_sample = Output("Data Sample", Table, default=True)
        remaining_data = Output("Remaining Data", Table)

    want_main_area = False
    resizing_enabled = False

    RandomSeed = 42
    FixedProportion, FixedSize, CrossValidation, Bootstrap = range(4)
    SqlTime, SqlProportion = range(2)

    selectedFold: int

    use_seed = Setting(True)
    replacement = Setting(False)
    stratify = Setting(False)
    sql_dl = Setting(False)
    sampling_type = Setting(FixedProportion)
    sampleSizeNumber = Setting(1)
    sampleSizePercentage = Setting(70)
    sampleSizeSqlTime = Setting(1)
    sampleSizeSqlPercentage = Setting(0.1)
    number_of_folds = Setting(10)
    selectedFold = Setting(1)

    # Older versions of the widget had swapped outputs for cross validation
    # Migrations set this to True for compability with older workflows
    compatibility_mode = Setting(False, schema_only=True)

    settings_version = 2

    class Information(OWWidget.Information):
        compatibility_mode = Msg(
            "Compatibility mode\n"
            "New versions of widget have swapped outputs for cross validation"
        )

    class Warning(OWWidget.Warning):
        could_not_stratify = Msg("Stratification failed.\n{}")
        bigger_sample = Msg('Sample is bigger than input.')

    class Error(OWWidget.Error):
        too_many_folds = Msg("Number of subsets exceeds data size.")
        sample_larger_than_data = Msg("Sample can't be larger than data.")
        not_enough_to_stratify = Msg("Data is too small to stratify.")
        no_data = Msg("Dataset is empty.")

    def __init__(self):
        super().__init__()
        if self.compatibility_mode:
            self.Information.compatibility_mode()

        self.data = None
        self.indices = None
        self.sampled_instances = self.remaining_instances = None

        self.sampling_box = gui.vBox(self.controlArea, "Sampling Type")
        sampling = gui.radioButtons(self.sampling_box, self, "sampling_type",
                                    callback=self.sampling_type_changed)

        def set_sampling_type(i):
            def set_sampling_type_i():
                self.sampling_type = i
                self.sampling_type_changed()
            return set_sampling_type_i

        gui.appendRadioButton(sampling, "Fixed proportion of data:")
        self.sampleSizePercentageSlider = gui.hSlider(
            gui.indentedBox(sampling), self,
            "sampleSizePercentage",
            minValue=0, maxValue=100, ticks=10, labelFormat="%d %%",
            callback=set_sampling_type(self.FixedProportion))

        gui.appendRadioButton(sampling, "Fixed sample size")
        ibox = gui.indentedBox(sampling)
        self.sampleSizeSpin = gui.spin(
            ibox, self, "sampleSizeNumber", label="Instances: ",
            minv=1, maxv=self._MAX_SAMPLE_SIZE,
            callback=set_sampling_type(self.FixedSize),
            controlWidth=90)
        gui.checkBox(
            ibox, self, "replacement", "Sample with replacement",
            callback=set_sampling_type(self.FixedSize))

        gui.appendRadioButton(sampling, "Cross validation")
        form = QFormLayout(
            formAlignment=Qt.AlignLeft | Qt.AlignTop,
            labelAlignment=Qt.AlignLeft,
            fieldGrowthPolicy=QFormLayout.AllNonFixedFieldsGrow)
        ibox = gui.indentedBox(sampling, orientation=form)
        form.addRow("Number of subsets:",
                    gui.spin(
                        ibox, self, "number_of_folds", 2, 100,
                        addToLayout=False,
                        callback=self.number_of_folds_changed))
        self.selected_fold_spin = gui.spin(
            ibox, self, "selectedFold", 1, self.number_of_folds,
            addToLayout=False, callback=self.fold_changed)
        form.addRow("Unused subset:" if not self.compatibility_mode
                    else "Selected subset:", self.selected_fold_spin)

        gui.appendRadioButton(sampling, "Bootstrap")

        self.sql_box = gui.vBox(self.controlArea, "Sampling Type")
        sampling = gui.radioButtons(self.sql_box, self, "sampling_type",
                                    callback=self.sampling_type_changed)
        gui.appendRadioButton(sampling, "Time:")
        ibox = gui.indentedBox(sampling)
        spin = gui.spin(ibox, self, "sampleSizeSqlTime", minv=1, maxv=3600,
                        callback=set_sampling_type(self.SqlTime))
        spin.setSuffix(" sec")
        gui.appendRadioButton(sampling, "Percentage")
        ibox = gui.indentedBox(sampling)
        spin = gui.spin(ibox, self, "sampleSizeSqlPercentage", spinType=float,
                        minv=0.0001, maxv=100, step=0.1, decimals=4,
                        callback=set_sampling_type(self.SqlProportion))
        spin.setSuffix(" %")
        self.sql_box.setVisible(False)

        self.options_box = gui.vBox(self.controlArea, "Options", addSpaceBefore=False)
        self.cb_seed = gui.checkBox(
            self.options_box, self, "use_seed",
            "Replicable (deterministic) sampling",
            callback=self.settings_changed)
        self.cb_stratify = gui.checkBox(
            self.options_box, self, "stratify",
            "Stratify sample (when possible)", callback=self.settings_changed)
        self.cb_sql_dl = gui.checkBox(
            self.options_box, self, "sql_dl", "Download data to local memory",
            callback=self.settings_changed)
        self.cb_sql_dl.setVisible(False)

        gui.button(self.buttonsArea, self, "Sample Data",
                   callback=self.commit)

    def sampling_type_changed(self):
        self.settings_changed()

    def number_of_folds_changed(self):
        self.selected_fold_spin.setMaximum(self.number_of_folds)
        self.sampling_type = self.CrossValidation
        self.settings_changed()

    def fold_changed(self):
        # a separate callback - if we decide to cache indices
        self.sampling_type = self.CrossValidation

    def settings_changed(self):
        self._update_sample_max_size()
        self.indices = None

    @Inputs.data
    def set_data(self, dataset):
        self.data = dataset
        if dataset is not None:
            sql = isinstance(dataset, SqlTable)
            self.sampling_box.setVisible(not sql)
            self.sql_box.setVisible(sql)
            self.cb_seed.setVisible(not sql)
            self.cb_stratify.setVisible(not sql)
            self.cb_sql_dl.setVisible(sql)

            if not sql:
                self._update_sample_max_size()
                self.updateindices()
        else:
            self.indices = None
            self.clear_messages()
        self.commit()

    def _update_sample_max_size(self):
        """Limit number of instances to input size unless using replacement."""
        if not self.data or self.replacement:
            self.sampleSizeSpin.setMaximum(self._MAX_SAMPLE_SIZE)
        else:
            self.sampleSizeSpin.setMaximum(len(self.data))

    def commit(self):
        if self.data is None:
            sample = other = None
            self.sampled_instances = self.remaining_instances = None
        elif isinstance(self.data, SqlTable):
            other = None
            if self.sampling_type == self.SqlProportion:
                sample = self.data.sample_percentage(
                    self.sampleSizeSqlPercentage, no_cache=True)
            else:
                sample = self.data.sample_time(
                    self.sampleSizeSqlTime, no_cache=True)
            if self.sql_dl:
                sample.download_data()
                sample = Table(sample)

        else:
            if self.indices is None or not self.use_seed:
                self.updateindices()
                if self.indices is None:
                    return
            if self.sampling_type in (
                    self.FixedProportion, self.FixedSize, self.Bootstrap):
                remaining, sample = self.indices
            elif self.sampling_type == self.CrossValidation:
                if self.compatibility_mode:
                    remaining, sample = self.indices[self.selectedFold - 1]
                else:
                    sample, remaining = self.indices[self.selectedFold - 1]

            sample = self.data[sample]
            other = self.data[remaining]
            self.sampled_instances = len(sample)
            self.remaining_instances = len(other)

        self.Outputs.data_sample.send(sample)
        self.Outputs.remaining_data.send(other)

    def updateindices(self):
        self.Error.clear()
        self.Warning.clear()
        repl = True
        data_length = len(self.data)
        num_classes = len(self.data.domain.class_var.values) \
            if self.data.domain.has_discrete_class else 0

        size = None
        if not data_length:
            self.Error.no_data()
        elif self.sampling_type == self.FixedSize:
            size = self.sampleSizeNumber
            repl = self.replacement
        elif self.sampling_type == self.FixedProportion:
            size = np.ceil(self.sampleSizePercentage / 100 * data_length)
            repl = False
        elif self.sampling_type == self.CrossValidation:
            if data_length < self.number_of_folds:
                self.Error.too_many_folds()
        else:
            assert self.sampling_type == self.Bootstrap

        if not repl and size is not None and (size > data_length):
            self.Error.sample_larger_than_data()
        if not repl and data_length <= num_classes and self.stratify:
            self.Error.not_enough_to_stratify()

        if self.Error.active:
            self.indices = None
            return

        # By the above, we can safely assume there is data
        if self.sampling_type == self.FixedSize and repl and size and \
                size > len(self.data):
            # This should only be possible when using replacement
            self.Warning.bigger_sample()

        stratified = (self.stratify and
                      isinstance(self.data, Table) and
                      self.data.domain.has_discrete_class)
        try:
            self.indices = self.sample(data_length, size, stratified)
        except ValueError as ex:
            self.Warning.could_not_stratify(str(ex))
            self.indices = self.sample(data_length, size, stratified=False)

    def sample(self, data_length, size, stratified):
        rnd = self.RandomSeed if self.use_seed else None
        if self.sampling_type == self.FixedSize:
            sampler = SampleRandomN(
                size, stratified=stratified, replace=self.replacement,
                random_state=rnd)
        elif self.sampling_type == self.FixedProportion:
            sampler = SampleRandomP(
                self.sampleSizePercentage / 100, stratified=stratified,
                random_state=rnd)
        elif self.sampling_type == self.Bootstrap:
            sampler = SampleBootstrap(data_length, random_state=rnd)
        else:
            sampler = SampleFoldIndices(
                self.number_of_folds, stratified=stratified, random_state=rnd)
        return sampler(self.data)

    def send_report(self):
        if self.sampling_type == self.FixedProportion:
            tpe = f"Random sample with {self.sampleSizePercentage} % of data"
        elif self.sampling_type == self.FixedSize:
            if self.sampleSizeNumber == 1:
                tpe = "Random data instance"
            else:
                tpe = f"Random sample with {self.sampleSizeNumber} data instances"
                if self.replacement:
                    tpe += ", with replacement"
        elif self.sampling_type == self.CrossValidation:
            tpe = f"{self.number_of_folds}-fold cross-validation " \
                  f"without subset #{self.selectedFold}"
        elif self.sampling_type == self.Bootstrap:
            tpe = "Bootstrap"
        else:  # pragma: no cover
            assert False
        if self.stratify:
            tpe += ", stratified (if possible)"
        if self.use_seed:
            tpe += ", deterministic"
        items = [("Sampling type", tpe)]
        if self.sampled_instances is not None:
            items += [
                ("Input", f"{len(self.data)} {pl(len(self.data), 'instance')}"),
                ("Sample", f"{self.sampled_instances} {pl(self.sampled_instances, 'instance')}"),
                ("Remaining", f"{self.remaining_instances} {pl(self.remaining_instances, 'instance')}"),
            ]
        self.report_items(items)

    @classmethod
    def migrate_settings(cls, settings, version):
        if not version or version < 2 \
                and settings["sampling_type"] == cls.CrossValidation:
            settings["compatibility_mode"] = True


class SampleFoldIndices(Reprable):
    def __init__(self, folds=10, stratified=False, random_state=None):
        """Samples data based on a number of folds.

        Args:
            folds (int): Number of folds
            stratified (bool): Return stratified indices (if applicable).
            random_state (Random): An initial state for replicable random
            behavior

        Returns:
            tuple-of-arrays: A tuple of array indices one for each fold.

        """
        self.folds = folds
        self.stratified = stratified
        self.random_state = random_state

    def __call__(self, table):
        if self.stratified and table.domain.has_discrete_class:
            splitter = skl.StratifiedKFold(
                self.folds, shuffle=True, random_state=self.random_state)
            splitter.get_n_splits(table.X, table.Y)
            ind = splitter.split(table.X, table.Y)
        else:
            splitter = skl.KFold(
                self.folds, shuffle=True, random_state=self.random_state)
            splitter.get_n_splits(table)
            ind = splitter.split(table)
        return tuple(ind)


class SampleRandomN(Reprable):
    def __init__(self, n=0, stratified=False, replace=False,
                 random_state=None):
        self.n = n
        self.stratified = stratified
        self.replace = replace
        self.random_state = random_state

    def __call__(self, table):
        if self.replace:
            # pylint: disable=no-member
            rgen = np.random.RandomState(self.random_state)
            sample = rgen.randint(0, len(table), self.n)
            o = np.ones(len(table))
            o[sample] = 0
            others = np.nonzero(o)[0]
            return others, sample
        if self.n == len(table):
            rgen = np.random.RandomState(self.random_state)
            sample = np.arange(self.n)
            rgen.shuffle(sample)
            return np.array([], dtype=int), sample
        elif self.stratified and table.domain.has_discrete_class:
            test_size = max(len(table.domain.class_var.values), self.n)
            splitter = skl.StratifiedShuffleSplit(
                n_splits=1, test_size=test_size,
                train_size=len(table) - test_size,
                random_state=self.random_state)
            splitter.get_n_splits(table.X, table.Y)
            ind = splitter.split(table.X, table.Y)
        else:
            splitter = skl.ShuffleSplit(
                n_splits=1, test_size=self.n, random_state=self.random_state)
            splitter.get_n_splits(table)
            ind = splitter.split(table)
        return next(iter(ind))


class SampleRandomP(Reprable):
    def __init__(self, p=0, stratified=False, random_state=None):
        self.p = p
        self.stratified = stratified
        self.random_state = random_state

    def __call__(self, table):
        n = int(math.ceil(len(table) * self.p))
        return SampleRandomN(n, self.stratified,
                             random_state=self.random_state)(table)


class SampleBootstrap(Reprable):
    def __init__(self, size=0, random_state=None):
        self.size = size
        self.random_state = random_state

    def __call__(self, table=None):
        """Bootstrap indices

        Args:
            table: Not used (but part of the signature)
        Returns:
            tuple (out_of_sample, sample) indices
        """
        # pylint: disable=no-member
        rgen = np.random.RandomState(self.random_state)
        sample = rgen.randint(0, self.size, self.size)
        sample.sort()  # not needed for the code below, just for the user
        insample = np.ones((self.size,), dtype=bool)
        insample[sample] = False
        remaining = np.flatnonzero(insample)
        return remaining, sample


if __name__ == "__main__":  # pragma: no cover
    WidgetPreview(OWDataSampler).run(Table("iris"))

```
--- END FILE ---

Please first localize the bug based on the issue statement, and then generate *SEARCH/REPLACE* edits to fix the issue.

Every *SEARCH/REPLACE* edit must use this format:
1. The file path
2. The start of search block: <<<<<<< SEARCH
3. A contiguous chunk of lines to search for in the existing source code
4. The dividing line: =======
5. The lines to replace into the source code
6. The end of the replace block: >>>>>>> REPLACE

Here is an example:

```python
### mathweb/flask/app.py
<<<<<<< SEARCH
from flask import Flask
=======
import math
from flask import Flask
>>>>>>> REPLACE
```
</solution>

Please note that the *SEARCH/REPLACE* edit REQUIRES PROPER INDENTATION. If you would like to add the line '        print(x)', you must fully write that out, with all those spaces before the code!
Wrap each *SEARCH/REPLACE* edit in a code block as shown in the example above. If you have multiple *SEARCH/REPLACE* edits, use a separate code block for each one.
user