instance_id stringlengths 21 53 | repo stringclasses 188
values | language stringclasses 1
value | pull_number int64 20 148k | title stringlengths 6 144 | body stringlengths 0 83.4k | created_at stringdate 2015-09-25 03:17:17 2025-07-10 16:50:35 | problem_statement stringlengths 188 240k | hints_text stringlengths 0 145k | resolved_issues listlengths 1 6 | base_commit stringlengths 40 40 | commit_to_review dict | reference_review_comments listlengths 1 62 | merged_commit stringlengths 40 40 | merged_patch stringlengths 297 9.87M | metadata dict |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
sqlfluff__sqlfluff-1430@3dd22c7 | sqlfluff/sqlfluff | Python | 1,430 | Fix runtime error (IndexError ) when linting file with jinja "if" | ### Brief summary of the change made
Fixes #1414
### Pull Request checklist
- [X] Please confirm you have completed any of the necessary steps below.
- Included test cases to demonstrate any code changes, which may be one or more of the following:
- `.yml` rule test cases in `test/fixtures/rules/std_rule_c... | 2021-09-21T23:00:34Z | Runtime error (IndexError ) linting file with jinja "if"
## Expected Behaviour
Get list of rule violations by line for the file:
```sql
-- This file combines product data from individual brands into a staging table
{% set products = [
'tabe1',
'table2'] %}
{% for product in products %}
SELECT
bra... | I reproduced this error with the `jinja` templater, so it is not specific to dbt.
```
-- This file combines product data from individual brands into a staging table
{% set products = [
'tabe1',
'table2'] %}
{% for product in products %}
SELECT
brand,
country_code,
category,
name,
id
FROM... | [
{
"body": "## Expected Behaviour\r\n\r\nGet list of rule violations by line for the file:\r\n\r\n```sql\r\n-- This file combines product data from individual brands into a staging table\r\n{% set products = [\r\n 'tabe1',\r\n 'table2'] %}\r\n\r\n{% for product in products %}\r\nSELECT\r\n brand,\r\n count... | 250fe2852cbd4f14d396477318bdd6ddbd175b9b | {
"head_commit": "3dd22c7cc49329bee2186c74cd79763420c1e0c1",
"head_commit_message": "Add \"no cover\" pragma",
"patch_to_review": "diff --git a/src/sqlfluff/core/templaters/base.py b/src/sqlfluff/core/templaters/base.py\nindex e41857408bb..ed9e4e7d969 100644\n--- a/src/sqlfluff/core/templaters/base.py\n+++ b/src/... | [
{
"diff_hunk": "@@ -0,0 +1,16 @@\n+-- This file combines product data from individual brands into a staging table\n+{% set products = [\n+ 'table1',\n+ 'table2'] %}\n+\n+{% for product in products %}\n+SELECT\n+ brand,\n+ country_code,\n+ category,\n+ name,\n+ id\n+FROM\n+ product",
"line": null,
... | b977d63a8552a7d60e9310ef5efceeedb2123361 | diff --git a/src/sqlfluff/core/templaters/base.py b/src/sqlfluff/core/templaters/base.py
index e41857408bb..a95671e8300 100644
--- a/src/sqlfluff/core/templaters/base.py
+++ b/src/sqlfluff/core/templaters/base.py
@@ -285,8 +285,14 @@ def templated_slice_to_source_slice(
ts_start_sf_stop, ts_stop_sf_sto... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
scikit-learn__scikit-learn-19046@44604d9 | scikit-learn/scikit-learn | Python | 19,046 | FIX Incorrect warning when clustering boolean data | Fixes #18996
Input X was being converted to float at the beginning of fit() method. However when a pairwise boolean metric was requested, X was again converted to boolean with multiple warning.
This caused were two issues:
1. The data, if it was already of boolean type, was first converted to float and later to ... | 2020-12-20T08:47:55Z | Incorrect warning when clustering boolean data
#### Describe the bug
When clustering data with a metric that requires boolean data, the console fills up with a huge number of `DataConversionWarning` messages telling me the input data needs to be boolean, even though it already is.
#### Steps/Code to Reproduce
```p... | Thanks for the report.
We do convert `X` to floats at the very beginning of `fit`():
```py
X = self._validate_data(X, dtype=float)
```
Maybe we should leave it to `bool` if the metric is in `pairwise.PAIRWISE_BOOLEAN_FUNCTIONS`.
Would you like to submit a PR @peastman ?
take | [
{
"body": "#### Describe the bug\r\nWhen clustering data with a metric that requires boolean data, the console fills up with a huge number of `DataConversionWarning` messages telling me the input data needs to be boolean, even though it already is.\r\n\r\n#### Steps/Code to Reproduce\r\n```python\r\nimport nump... | 4db51e6cbc1639f2e08059bc625bdd0c16f03a78 | {
"head_commit": "44604d9442c6fcc72e8caa131c059e378e057c5b",
"head_commit_message": "FIX- Incorrect warning when clustering boolean data scikit-learn#18996",
"patch_to_review": "diff --git a/sklearn/cluster/_optics.py b/sklearn/cluster/_optics.py\nindex 8998963704562..b6785693ebee7 100755\n--- a/sklearn/cluster/_... | [
{
"diff_hunk": "@@ -243,7 +245,13 @@ def fit(self, X, y=None):\n self : instance of OPTICS\n The instance.\n \"\"\"\n- X = self._validate_data(X, dtype=float)\n+\n+ dtype = bool if self.metric in PAIRWISE_BOOLEAN_FUNCTIONS else float\n+ if dtype == bool and X.dty... | 478306db4bf89b8c1ba10c285ca78418b9515be3 | diff --git a/doc/whats_new/v1.0.rst b/doc/whats_new/v1.0.rst
index 154c32617c4ba..78dc95026c45e 100644
--- a/doc/whats_new/v1.0.rst
+++ b/doc/whats_new/v1.0.rst
@@ -70,6 +70,9 @@ Changelog
in multicore settings. :pr:`19052` by
:user:`Yusuke Nagasaka <YusukeNagasaka>`.
+- |Fix| Fixes incorrect multiple data-conv... | {
"difficulty": "medium",
"estimated_review_effort": 2,
"problem_domain": "Bug Fixes"
} |
scikit-learn__scikit-learn-18987@86ea8b7 | scikit-learn/scikit-learn | Python | 18,987 | change stats.mode to collections.Counter, for better performance. | <!--
Thanks for contributing a pull request! Please ensure you have taken a look at
the contribution guidelines: https://github.com/scikit-learn/scikit-learn/blob/master/CONTRIBUTING.md#pull-request-checklist
-->
#### Reference Issues/PRs
<!--
Example: Fixes #1234. See also #3456.
Please use keywords (e.g., Fi... | 2020-12-09T21:53:04Z | SimpleImputer performance on strings
#### Describe the bug
SimpleImputer is extremely slow on string/object categories using option "most_frequent".
#### Steps/Code to Reproduce
```python
import sys; print('python', sys.version)
import numpy as np
import pandas as pd
from sklearn.impute import SimpleImput... | Yep we are using `scipy.stats.mode` which is doing a terrible job with a numpy array with object dtype (probably fall-back to iterate with a Python for loop). I think that we should default using `Counter` when we have this type of data (the same way we use `set` to get uniques).
I put some code to illustrate that `... | [
{
"body": "#### Describe the bug\r\n\r\nSimpleImputer is extremely slow on string/object categories using option \"most_frequent\".\r\n\r\n#### Steps/Code to Reproduce\r\n\r\n```python\r\nimport sys; print('python', sys.version)\r\nimport numpy as np\r\nimport pandas as pd\r\nfrom sklearn.impute import SimpleIm... | 8ebb614a8dc09c7baccb45c6a2cd7d087d8e2ed6 | {
"head_commit": "86ea8b758ab4f24b1c91c0bacd97959123cee998",
"head_commit_message": "add a test for testing all _most_frequent options",
"patch_to_review": "diff --git a/sklearn/impute/_base.py b/sklearn/impute/_base.py\nindex dd6922ce5b9f3..644a268b66728 100644\n--- a/sklearn/impute/_base.py\n+++ b/sklearn/imput... | [
{
"diff_hunk": "@@ -34,15 +35,17 @@ def _most_frequent(array, extra_value, n_repeat):\n of the array.\"\"\"\n # Compute the most frequent value in array only\n if array.size > 0:\n- with warnings.catch_warnings():\n- # stats.mode raises a warning when input array contains object... | 63ee33ba901a5c9669d19ad31174d88c59bec854 | diff --git a/doc/whats_new/v0.24.rst b/doc/whats_new/v0.24.rst
index cd65b584010c1..f69b205764aef 100644
--- a/doc/whats_new/v0.24.rst
+++ b/doc/whats_new/v0.24.rst
@@ -369,6 +369,10 @@ Changelog
estimator's `random_state` attribute, allowing to use it with more external classes.
:pr:`15636` by :user:`David Corte... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Performance Optimizations"
} |
saltstack__salt-60502@36404a8 | saltstack/salt | Python | 60,502 | Fixing various functions in the file state module that use user.info | ### What does this PR do?
Fixing various functions in the file state module that use user.info to get group information, certain hosts particularly proxy minions do not have the user.info function avaiable. In those cases we fall back to using the username for the group name. Also moving the existing file state modu... | 2021-07-07T18:35:26Z | [BUG] file.symlink requires group attribute on proxy minion
**Description**
Creation of a symlink fails on a proxy minion when the optional parameter `group` is not specified.
**Setup**
I run a salt-master with several salt-proxy instances for Junos devices. As part of my state file, I wish to create a symlink loc... | Fix: [salt-userinfo.txt](https://github.com/saltstack/salt/files/4826567/salt-userinfo.txt)
@rodecker Thanks for the report. Seems like we should detect if this is running on a proxy minion and handle the situation different.
the Core team will not be able to get to this in `Aluminium` but we will review a PR if any... | [
{
"body": "**Description**\r\nCreation of a symlink fails on a proxy minion when the optional parameter `group` is not specified.\r\n\r\n**Setup**\r\nI run a salt-master with several salt-proxy instances for Junos devices. As part of my state file, I wish to create a symlink locally on the salt-master.\r\n\r\n*... | a63f56178516be5e0da448d56e96b12fcd4f9bb6 | {
"head_commit": "36404a8bcf8904ece8f3f2b37c0a2928ca4fc092",
"head_commit_message": "Mock return from file.check_perms depending on the platform we are running tests on.",
"patch_to_review": "diff --git a/changelog/57786.fixed b/changelog/57786.fixed\nnew file mode 100644\nindex 000000000000..ddf8a3ea4142\n--- /d... | [
{
"diff_hunk": "@@ -0,0 +1,439 @@\n+import logging\n+import os\n+\n+import pytest\n+import salt.serializers.json as jsonserializer\n+import salt.serializers.msgpack as msgpackserializer\n+import salt.serializers.plist as plistserializer\n+import salt.serializers.python as pythonserializer\n+import salt.serializ... | 9cad5b34a8e3a21687b1fcaf81ee639a004c33e1 | diff --git a/changelog/57786.fixed b/changelog/57786.fixed
new file mode 100644
index 000000000000..ddf8a3ea4142
--- /dev/null
+++ b/changelog/57786.fixed
@@ -0,0 +1 @@
+Fixing various functions in the file state module that use user.info to get group information, certain hosts particularly proxy minions do not have th... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
sktime__sktime-5240@b13031a | sktime/sktime | Python | 5,240 | [ENH] Add a `CurveFitForecaster` based on `scipy` `optimize_curve` | <!--
Thanks for contributing a pull request! Please ensure you have taken a look
at our contribution guide: https://github.com/sktime/sktime/blob/main/CONTRIBUTING.md
-->
#### Reference Issues/PRs
Fixes #5238
<!--
Example: Fixes #1234. See also #3456.
Please use keywords (e.g., Fixes) to create link to th... | 2023-09-14T16:59:50Z | [ENH] `scipy.curve_fit` based forecaster
**Is your feature request related to a problem? Please describe.**
In scipy there exist the `curve_fit` method. This takes a function, x, and y data and some initial parameters. If x are time series indexes this can be used to perform forecasting:
**Describe the solution ... | > Describe alternatives you've considered
> Implement a new forecaster.
> Extend `TrendForecaster` (idea from @fkiraly)
FYI, looking at your PR and the code, I think writing a new estimator is probably the better solution. | [
{
"body": "**Is your feature request related to a problem? Please describe.**\r\nIn scipy there exist the `curve_fit` method. This takes a function, x, and y data and some initial parameters. If x are time series indexes this can be used to perform forecasting: \r\n\r\n\r\n**Describe the solution you'd like**\r... | e5a6121446f2a9441d13f01167e30070bf325d23 | {
"head_commit": "b13031abdff697cc34fb6295359ec222906d9aac",
"head_commit_message": "Fix doc string issues",
"patch_to_review": "diff --git a/docs/source/api_reference/forecasting.rst b/docs/source/api_reference/forecasting.rst\nindex 3506e711f10..7715dbd5adc 100644\n--- a/docs/source/api_reference/forecasting.rs... | [
{
"diff_hunk": "@@ -0,0 +1,177 @@\n+# !/usr/bin/env python3 -u\n+# copyright: sktime developers, BSD-3-Clause License (see LICENSE file)\n+\"\"\"Implements FunctionForecaster.\"\"\"\n+\n+__author__ = [\"benheid\"]\n+__all__ = [\"CurveFitForecaster\"]\n+\n+import numpy as np\n+import pandas as pd\n+from scipy.op... | 6db6002e44568cbbfb4e8c383cf46bad63e8f3b7 | diff --git a/docs/source/api_reference/forecasting.rst b/docs/source/api_reference/forecasting.rst
index 3506e711f10..35e476af411 100644
--- a/docs/source/api_reference/forecasting.rst
+++ b/docs/source/api_reference/forecasting.rst
@@ -149,6 +149,7 @@ Trend forecasters
TrendForecaster
PolynomialTrendForecast... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "New Feature Additions"
} |
saltstack__salt-60303@f50dc5f | saltstack/salt | Python | 60,303 | Consolidating beacon configuration mapping code | ### What does this PR do?
Move the commonly used code that converts a list to a dictionary into salt.utils.beacons. Fixing inotify beacon close function to ensure the configuration is converted from the provided list format into a dictionary.
### What issues does this PR fix or reference?
Fixes: #60241 #60755
... | 2021-06-02T17:24:30Z | [BUG] inotify beacon fails with AttributeError: 'list' object has no attribute 'get'
**Description**
The inotify beacon fails after sending an event and spams the logfile with python stack traces.
**Setup**
```
beacons:
enabled: true
watch_important_files:
- beacon_module: inotify
- disable_during_sta... | the following patch solves the reported bug:
```
--- inotify.py 2021-03-24 21:53:25.000000000 +0000
+++ /tmp/inotify.py 2021-05-24 15:26:24.761516777 +0000
@@ -366,9 +366,17 @@
return ret
-def close(config):
+def _close(config):
beacon_name = config.get("_beacon_name", "inotify")
notifie... | [
{
"body": "**Description**\r\nThe inotify beacon fails after sending an event and spams the logfile with python stack traces.\r\n\r\n**Setup**\r\n```\r\nbeacons:\r\n enabled: true\r\n watch_important_files:\r\n - beacon_module: inotify\r\n - disable_during_state_run: true\r\n - files:\r\n /opt/newdir/... | a63f56178516be5e0da448d56e96b12fcd4f9bb6 | {
"head_commit": "f50dc5fb0e80d16664b89c4ef6b40b414da1651a",
"head_commit_message": "Merge branch 'master' into 60241_beacon_dict_to_list_consolidate",
"patch_to_review": "diff --git a/changelog/60241.fixed b/changelog/60241.fixed\nnew file mode 100644\nindex 000000000000..21cb0765134f\n--- /dev/null\n+++ b/chang... | [
{
"diff_hunk": "@@ -44,6 +48,7 @@ def test_threshold_reached():\n mock = MagicMock(return_value=46)\n with patch.dict(haproxy.__salt__, {\"haproxy.get_sessions\": mock}):\n ret = haproxy.beacon(config)\n+ log.debug(\"=== ret %s ===\", ret)",
"line": null,
"original_line": 51,
... | 373c2bb9e90d0469782b0508ca76bf63e4db0a64 | diff --git a/changelog/60241.fixed b/changelog/60241.fixed
new file mode 100644
index 000000000000..21cb0765134f
--- /dev/null
+++ b/changelog/60241.fixed
@@ -0,0 +1 @@
+Move the commonly used code that converts a list to a dictionary into salt.utils.beacons. Fixing inotify beacon close function to ensure the configur... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
sktime__sktime-5325@4e5ed46 | sktime/sktime | Python | 5,325 | [DOC] Documented ax argument and the figure in plot_series | #### Reference Issues/PRs
#### What does this implement/fix? Explain your changes.
This resolves #5323 . I have added the `ax` argument and the figure to the docstring of the plot_series.
#### Does your contribution introduce a new dependency? If yes, which one?
No
#### What should a reviewer concentrate the... | 2023-09-27T19:16:09Z | [DOC] `plot_series` docstring should document the `ax` argument and the figure that is plotted
The `plot_series` docstring does not but should document:
* the `ax` argument
* the figure that is plotted
A good example for this does not exist in `sktime` as far as I can find, but one can look at `plot_crossplot_st... | Hello, I started working on this issue . Since I am new to open source any suggestions would be helpful. | [
{
"body": "The `plot_series` docstring does not but should document:\r\n\r\n* the `ax` argument\r\n* the figure that is plotted\r\n\r\nA good example for this does not exist in `sktime` as far as I can find, but one can look at `plot_crossplot_std` in `skpro` for some inspiration (or docstring copy-paste).",
... | 73d3d20b6c1b1eadf09e9270c52c53fb7cb098bd | {
"head_commit": "4e5ed465b55397d2761dd6c7ee8b2dbd078bd139",
"head_commit_message": "moved description to top and made reference to the actual parameters",
"patch_to_review": "diff --git a/examples/01a_forecasting_sklearn.ipynb b/examples/01a_forecasting_sklearn.ipynb\nindex 1ac338607d5..da2a0263e73 100644\n--- a... | [
{
"diff_hunk": "@@ -30,6 +30,22 @@ def plot_series(\n ):\n \"\"\"Plot one or more time series.\n \n+ Description",
"line": null,
"original_line": 33,
"original_start_line": null,
"path": "sktime/utils/plotting.py",
"start_line": null,
"text": "@user1:\nThanks!\r\n\r\ncan you kindl... | 41f1e34b8a4f87dc219b4945d08299d31b891803 | diff --git a/sktime/utils/plotting.py b/sktime/utils/plotting.py
index f6ca75e4ba8..6d0d4ce669b 100644
--- a/sktime/utils/plotting.py
+++ b/sktime/utils/plotting.py
@@ -30,6 +30,20 @@ def plot_series(
):
"""Plot one or more time series.
+ This function allows you to plot one or more
+ time series on a sin... | {
"difficulty": "low",
"estimated_review_effort": 3,
"problem_domain": "Documentation Updates"
} |
sqlfluff__sqlfluff-1402@1456e97 | sqlfluff/sqlfluff | Python | 1,402 | Allow optional enforcing of implicit aliasing of tables (L011) and columns (L012) | ### Brief summary of the change made
Fixes #1400
### Are there any other side effects of this change that we should be aware of?
Affects rules L011 and L012 which inherits from this. Default is left as explicit.
### Pull Request checklist
- [x] Please confirm you have completed any of the necessary steps belo... | 2021-09-14T18:21:28Z | Add configuration support for implicit table aliasing (Rule L011).
Hi 👋
I'm working with a team that uses implicit aliasing as their standard practice - and wishes to remove `AS` from table references and joins.
To be able to fully implement SQLFluff as a linter, it would be great to add configuration support t... | [
{
"body": "Hi 👋 \r\n\r\nI'm working with a team that uses implicit aliasing as their standard practice - and wishes to remove `AS` from table references and joins.\r\n\r\nTo be able to fully implement SQLFluff as a linter, it would be great to add configuration support to L011 to make this possible.\r\n\r\nHer... | 40b7e6b361a27b7b0a62a7933ded2c21b9be681d | {
"head_commit": "1456e97b6d881a8cb5274a9bdb8cb951ed842756",
"head_commit_message": "Merge branch 'main' into allow-implicit-aliasing",
"patch_to_review": "diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md\nindex adba75a5b46..1525c3028ea 100644\n--- a/CONTRIBUTING.md\n+++ b/CONTRIBUTING.md\n@@ -101,6 +101,14 @@ tox ... | [
{
"diff_hunk": "@@ -94,6 +94,12 @@\n \"validation\": [\"before\", \"after\"],\n \"definition\": (\"Should operator be placed before or after newlines.\"),\n },\n+ \"aliasing\": {\n+ \"validation\": [\"implicit\", \"explicit\"],\n+ \"definition\": (\n+ \"Should ali... | 2df1cb95f142b3f95119099360c853c99341c618 | diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index d18134589ea..eeb819b7c64 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -130,6 +130,14 @@ tox -e generate-fixture-yml,cov-init,py38,cov-report,linting
> generates the results for tests in that Python version and the `cov-report-nobt`
> environment reports th... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "New Feature Additions"
} | |
saltstack__salt-60257@80580aa | saltstack/salt | Python | 60,257 | Update pcs support for > 0.10 | ### What does this PR do?
This PR accommodates the cluster auth and setup when using newer version of PCS.
### What issues does this PR fix or reference?
Fixes: #56924
### Previous Behavior
When authenticating and setting up a cluster the command would fail against pcs < 0.10
### New Behavior
Creating and ... | 2021-05-26T10:14:31Z | [FEATURE] PCS module/state broken for Pacemaker 2.x
**Description**
Debian Buster saw a version change for both their ```pcs``` and ```pacemaker``` packages. Pacemaker moved from 1.x to 2.x, and it looks like some of the related PCS syntax has changed enough to break the current Salt PCS module/state.
**Setup**
... | Including some additional context about the two changes I reported, there are undoubtedly more. This is from the ClusterLabs doc for Pacemaker 2.x: https://clusterlabs.org/pacemaker/doc/en-US/Pacemaker/2.0/html/Clusters_from_Scratch
* The command has been changed from ```pcs cluster auth```to ```pcs host auth``` (... | [
{
"body": "**Description**\r\nDebian Buster saw a version change for both their ```pcs``` and ```pacemaker``` packages. Pacemaker moved from 1.x to 2.x, and it looks like some of the related PCS syntax has changed enough to break the current Salt PCS module/state.\r\n\r\n**Setup**\r\n\r\nI'm running ```2019.2.2... | 09efe7206ef5ee6a70c5df624a9e41a5a24f04a2 | {
"head_commit": "80580aa778c451110a8b386caee4e695062743e7",
"head_commit_message": "Merge branch 'master' of https://github.com/waynegemmell/salt",
"patch_to_review": "diff --git a/changelog/56924.fixed b/changelog/56924.fixed\nnew file mode 100644\nindex 000000000000..3335977350f4\n--- /dev/null\n+++ b/changelo... | [
{
"diff_hunk": "@@ -168,22 +188,39 @@ def auth(nodes, pcsuser=\"hacluster\", pcspasswd=\"hacluster\", extra_args=None):\n return __salt__[\"cmd.run_all\"](cmd, output_loglevel=\"trace\", python_shell=False)\n \n \n-def is_auth(nodes):\n+def is_auth(nodes, pcsuser=\"hacluster\", pcspasswd=\"hacluster\"):\n ... | 7ecf0c1fa00c1e682c3e8517fc6db59ca06af96a | diff --git a/changelog/56924.fixed b/changelog/56924.fixed
new file mode 100644
index 000000000000..3335977350f4
--- /dev/null
+++ b/changelog/56924.fixed
@@ -0,0 +1 @@
+Updated pcs support to handle auth and setup for new syntax supporting version 0.10
diff --git a/salt/modules/pcs.py b/salt/modules/pcs.py
index d3102... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "New Feature Additions"
} |
sktime__sktime-5112@b947ce7 | sktime/sktime | Python | 5,112 | [ENH] make `statsforecast` adapter compatible with optional `predict` `level` arguments, and different init param sets | #### Reference Issues/PRs
Fixes #5024 and #5207:
* Versions previous to v1.5.0 of `statsforecast` do not have the `level`
argument in the `predict` or `predict_in_sample` methods of the
forecasters.
* `statsforecast` removed the `parallel` argument in some estimator since v1.6.0
Details:
#### What does thi... | 2023-08-16T18:58:20Z | [BUG] StatsForecastAutoCES: predict() got an unexpected keyword argument 'level'
**Describe the bug**
StatsForecastAutoCES model complains about `TypeError: predict_in_sample() got an unexpected keyword argument 'level'` when `.predict()` is called after `.fit()`
**To Reproduce**
```python
from sktime.forecas... | Hi @arnaujc91, it's not really a bug. These models were added in `sktime` in May I think, and since v1.5.0 `statsforecast` support `level` arguments for `AutoCES`. You can see it in the [release notes](https://github.com/Nixtla/statsforecast/releases/tag/v1.5.0), and this is the relevant [PR](https://github.com/Nixtla/... | [
{
"body": "**Describe the bug**\r\n\r\nStatsForecastAutoCES model complains about `TypeError: predict_in_sample() got an unexpected keyword argument 'level'` when `.predict()` is called after `.fit()`\r\n\r\n\r\n**To Reproduce**\r\n```python\r\nfrom sktime.forecasting.statsforecast import StatsForecastAutoCES\r... | 65c725d560a811aa2430f3ba2925f8000588e770 | {
"head_commit": "b947ce7c3a1235ce3fb8c1a7a9ffe827aec30921",
"head_commit_message": "small refactoring",
"patch_to_review": "diff --git a/.all-contributorsrc b/.all-contributorsrc\nindex 01ccb678145..8afe13528c9 100644\n--- a/.all-contributorsrc\n+++ b/.all-contributorsrc\n@@ -469,6 +469,15 @@\n \"bug\"\n... | [
{
"diff_hunk": "@@ -27,10 +31,46 @@ def __init__(self):\n super().__init__()\n \n self._forecaster = None\n+ pred_supported = self._check_supports_pred_int()\n+ self._support_pred_int_in_sample = pred_supported[\"int_in_sample\"]\n+ self._support_pred_int = pred_supported[\"... | ba40adecfdc23b1357d318cdbe85d54771e6fbb9 | diff --git a/.all-contributorsrc b/.all-contributorsrc
index 01ccb678145..8afe13528c9 100644
--- a/.all-contributorsrc
+++ b/.all-contributorsrc
@@ -469,6 +469,15 @@
"bug"
]
},
+ {
+ "login": "Arnau",
+ "name": "Arnau",
+ "avatar_url": "https://avatars.githubusercontent.com/u/3828... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "Bug Fixes"
} |
sktime__sktime-5049@8c9b857 | sktime/sktime | Python | 5,049 | [ENH] Add DropNA transformer | <!--
Thanks for contributing a pull request! Please ensure you have taken a look
at our contribution guide: https://github.com/sktime/sktime/blob/main/CONTRIBUTING.md
-->
#### Reference Issues/PRs
Fixes #4977.
#### What does this implement/fix? Explain your changes.
Implements a `DropNA` transformer that sav... | 2023-08-07T18:44:30Z | [BUG] Using IndexSubset together with PandasTransformAdaptor(method="dropna") in a pipeline fails
**Describe the bug**
Using `IndexSubset` and `PandasTransformAdaptor(method="dropna")` together in a pipeline fails in some orderings. `PandasTransformAdaptor` appears to be operating on the untransformed/not subset `X`. ... | I see - the problem is that the `PandasTransformAdaptor` drops exactly the columns with NAs that it sees at the moment, and these can differ between `fit` and `predict`.
So, in a sense, `PandasTransformAdaptor` does what it's told to do, but the implied behaviour is problematic and does not match the user expectatio... | [
{
"body": "**Describe the bug**\r\nUsing `IndexSubset` and `PandasTransformAdaptor(method=\"dropna\")` together in a pipeline fails in some orderings. `PandasTransformAdaptor` appears to be operating on the untransformed/not subset `X`. \r\n\r\n**To Reproduce**\r\nThe example below fails. It works with the `Pan... | 7525ea527e8d0b0c322456c4cdae18cffb80ef8e | {
"head_commit": "8c9b8574d71a48242ab7d9ea99cb9b2d4177ab8e",
"head_commit_message": "Update API reference",
"patch_to_review": "diff --git a/.all-contributorsrc b/.all-contributorsrc\nindex 8a63a0b9424..c0ecd44499f 100644\n--- a/.all-contributorsrc\n+++ b/.all-contributorsrc\n@@ -2286,6 +2286,16 @@\n \"bu... | [
{
"diff_hunk": "@@ -0,0 +1,239 @@\n+# copyright: sktime developers, BSD-3-Clause License (see LICENSE file)\n+\"\"\"Transformer to drop rows or columns containing missing values.\"\"\"\n+\n+__author__ = [\"hliebert\"]\n+\n+from sktime.transformations.base import BaseTransformer\n+\n+\n+class DropNA(BaseTransfor... | b959aacdb00ca96081901db3b85994d8c85acc15 | diff --git a/.all-contributorsrc b/.all-contributorsrc
index 8a63a0b9424..c0ecd44499f 100644
--- a/.all-contributorsrc
+++ b/.all-contributorsrc
@@ -2286,6 +2286,16 @@
"bug",
"code"
]
+ },
+ {
+ "login": "hliebert",
+ "name": "Helge Liebert",
+ "avatar_url": "https://avatar... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
saltstack__salt-59997@26b1e7d | saltstack/salt | Python | 59,997 | Update schedule state module and remote module to report changes | ### What does this PR do?
Updating the add, delete, modify, enable_job, and disable_job functions to return appropriate changes. Moving all scheduler tests to pytest.
### What issues does this PR fix or reference?
Fixes: #59844
### Merge requirements satisfied?
**[NOTICE] Bug fixes or features added to Salt ... | 2021-04-09T19:20:29Z | [BUG] schedule states do not report changes
**Description**
The `schedule.absent` state never reports changes, even if it does or would do something.
The `schedule.present` state only reports changes if it's going to change an existing job.
**Steps to Reproduce the behavior**
```yaml
# salt-call state.single sch... | @OrangeDog Like this?
```yaml
$ sudo salt-call state.single schedule.present job1 function=test.ping seconds=3600 --state-output=full --state-verbose=true
local:
----------
ID: job1
Function: schedule.present
Result: True
Comment: Adding new job job1 to schedule
Started: 15:20:1... | [
{
"body": "**Description**\r\nThe `schedule.absent` state never reports changes, even if it does or would do something.\r\nThe `schedule.present` state only reports changes if it's going to change an existing job.\r\n\r\n**Steps to Reproduce the behavior**\r\n```yaml\r\n# salt-call state.single schedule.present... | 66cf74140b0c30add27371c034834315c6faca30 | {
"head_commit": "26b1e7d3a4d40f19492aeb257852cd6c1348f047",
"head_commit_message": "increase sleep to 5 seconds.",
"patch_to_review": "diff --git a/changelog/59844.fixed b/changelog/59844.fixed\nnew file mode 100644\nindex 000000000000..df568b1165a8\n--- /dev/null\n+++ b/changelog/59844.fixed\n@@ -0,0 +1 @@\n+Up... | [
{
"diff_hunk": "@@ -553,25 +556,30 @@ def modify(name, **kwargs):\n if \"function\" not in kwargs:\n kwargs[\"function\"] = _current.get(\"function\")\n \n+ # Remove the auto generated _seconds value\n if \"_seconds\" in _current:\n _current[\"seconds\"] = _current[\"_seconds\"]\n ... | 35feeeecf325b2e8ace407713af5be61210e147a | diff --git a/changelog/59844.fixed b/changelog/59844.fixed
new file mode 100644
index 000000000000..df568b1165a8
--- /dev/null
+++ b/changelog/59844.fixed
@@ -0,0 +1 @@
+Updating the add, delete, modify, enable_job, and disable_job functions to return appropriate changes.
diff --git a/salt/modules/schedule.py b/salt/mo... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
sqlfluff__sqlfluff-1378@b723afe | sqlfluff/sqlfluff | Python | 1,378 | Improve datatypes: CHARACTER VARYING for ANSI, and Postgres and also TIMESTAMP AT TIME ZONE for Postgres | ### Brief summary of the change made
Added CHARACTER VARYING as parsable data types to ANSI
Added CHARACTER VARYING and TIMESTAMP AT TIME ZONE "MY_TIMEZONE" as parsable data types to Postgres
Fixes #1331
Fixes #733
### Are there any other side effects of this change that we should be aware of?
No
### Pull... | 2021-09-10T18:21:51Z | [Postgres] unparseable error on `character varying` type
-- If this is a parsing or linting issue, please include a minimal SQL example which reproduces the issue, along with the `sqlfluff parse` output, `sqlfluff lint` output and `sqlfluff fix` output when relevant. Finally, please add any labels that are related to t... | [
{
"body": "-- If this is a parsing or linting issue, please include a minimal SQL example which reproduces the issue, along with the `sqlfluff parse` output, `sqlfluff lint` output and `sqlfluff fix` output when relevant. Finally, please add any labels that are related to the issue before submitting so that it ... | b8e6096f5e2e0cd2281a4f5550dd7d654fd14152 | {
"head_commit": "b723afe589c2ca562f420ed7958f277207c8cc2f",
"head_commit_message": "Regenerated yml",
"patch_to_review": "diff --git a/src/sqlfluff/dialects/dialect_ansi.py b/src/sqlfluff/dialects/dialect_ansi.py\nindex 5db776a98a3..c4aec27b53c 100644\n--- a/src/sqlfluff/dialects/dialect_ansi.py\n+++ b/src/sqlfl... | [
{
"diff_hunk": "@@ -527,19 +527,28 @@ class DatatypeSegment(BaseSegment):\n Sequence(\n OneOf(\"time\", \"timestamp\"),\n Bracketed(Ref(\"NumericLiteralSegment\"), optional=True),\n- Sequence(OneOf(\"WITH\", \"WITHOUT\"), \"TIME\", \"ZONE\", optional=True),\n+ ... | 52ce04b45418578bf37298cf298753874fced5c5 | diff --git a/src/sqlfluff/dialects/dialect_ansi.py b/src/sqlfluff/dialects/dialect_ansi.py
index 5db776a98a3..0e9451063d0 100644
--- a/src/sqlfluff/dialects/dialect_ansi.py
+++ b/src/sqlfluff/dialects/dialect_ansi.py
@@ -530,16 +530,22 @@ class DatatypeSegment(BaseSegment):
Sequence(OneOf("WITH", "WITHOUT"... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} | |
scikit-learn__scikit-learn-19664@74af261 | scikit-learn/scikit-learn | Python | 19,664 | ENH BaseLabelPropagation to accept sparse matrices | <!--
Thanks for contributing a pull request! Please ensure you have taken a look at
the contribution guidelines: https://github.com/scikit-learn/scikit-learn/blob/main/CONTRIBUTING.md
-->
Fixes #17085
Closes #17384
#### Reference Issues/PRs
<!--
Example: Fixes #1234. See also #3456.
Please use keywords (e.g., ... | 2021-03-11T17:53:04Z | LabelPropagation raises TypeError: A sparse matrix was passed
#### Describe the bug
LabelPropagation (and LabelSpreading) error out for sparse matrices.
#### Steps/Code to Reproduce
```
import sklearn
from scipy.sparse import csr_matrix
from sklearn.datasets import make_classification
from sklearn.semi_sup... | Just checked: the fix seems to work for kernel='rbf', too.
Hi, I would like to take over since this is stalled.
Hi @cozek , sure go ahead: FYI you can comment "take" in this issue and it will automatically assigned to you. | [
{
"body": "#### Describe the bug\r\n\r\nLabelPropagation (and LabelSpreading) error out for sparse matrices.\r\n\r\n#### Steps/Code to Reproduce\r\n\r\n```\r\nimport sklearn\r\nfrom scipy.sparse import csr_matrix\r\nfrom sklearn.datasets import make_classification\r\nfrom sklearn.semi_supervised import LabelPro... | 2620a5545a806ee416d9d10e07c2de30cdd9bf20 | {
"head_commit": "74af2619067962ceefb759e0f2244eafcfc4161a",
"head_commit_message": "fix changelog edit",
"patch_to_review": "diff --git a/doc/whats_new/v0.24.rst b/doc/whats_new/v0.24.rst\nindex 84e712c05ea79..45919ea77ae2d 100644\n--- a/doc/whats_new/v0.24.rst\n+++ b/doc/whats_new/v0.24.rst\n@@ -12,6 +12,12 @@ ... | [
{
"diff_hunk": "@@ -12,6 +12,12 @@ Version 0.24.2\n Changelog\n ---------\n \n+:mod:`sklearn.semi_supervised`\n+..............................\n+\n+- |Fix| :meth:`BaseLabelPropagation.fit` does not accept sparse matrix.\n+ :pr:`19664` by :user:`Kaushik Amar Das <cozek>`.\n+",
"line": null,
"original_li... | 6aa1693a138a585e3086c14b4228ed14b4edaddb | diff --git a/doc/whats_new/v1.3.rst b/doc/whats_new/v1.3.rst
index 3ef8a7653b5f7..a95a80cb1fd02 100644
--- a/doc/whats_new/v1.3.rst
+++ b/doc/whats_new/v1.3.rst
@@ -210,6 +210,13 @@ Changelog
during `transform` with no prior call to `fit` or `fit_transform`.
:pr:`25190` by :user:`Vincent Maladière <Vincent-Maladi... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
scikit-learn__scikit-learn-18842@097c465 | scikit-learn/scikit-learn | Python | 18,842 | DOC Add var_ attribute and deprecate sigma_ in GaussianNB | <!--
Thanks for contributing a pull request! Please ensure you have taken a look at
the contribution guidelines: https://github.com/scikit-learn/scikit-learn/blob/master/CONTRIBUTING.md#pull-request-checklist
-->
#### Reference Issues/PRs
<!--
Example: Fixes #1234. See also #3456.
Please use keywords (e.g., Fi... | 2020-11-15T08:08:26Z | In `sklearn.naive_bayes`, `GaussianNB` model return an attribute called `sigma_`.
In the document, `sigma_` is the variance of each feature per class, but in general, it means standard variation. So we either change its name to `variance_` or call `sigma_` the std of each feature per class. | Line reference: https://github.com/scikit-learn/scikit-learn/blob/a84ba0c0b8b4948a5571ce1a815102c43d35cdd1/sklearn/naive_bayes.py#L156
Indeed,although the documentation states clearly that it is variance it can be a bit misleading since it is usually used for standard deviation.
In most of the code, the variance ... | [
{
"body": "In the document, `sigma_` is the variance of each feature per class, but in general, it means standard variation. So we either change its name to `variance_` or call `sigma_` the std of each feature per class.",
"number": 16760,
"title": "In `sklearn.naive_bayes`, `GaussianNB` model return... | 2d95acfe95c28bd8e8a5793021a43ff71c5c6864 | {
"head_commit": "097c465735a2df4371683eaa390b0b16f00b8912",
"head_commit_message": "Add back var_ attrib and add deprecated notice",
"patch_to_review": "diff --git a/sklearn/naive_bayes.py b/sklearn/naive_bayes.py\nindex 77ddb467a4b4c..fe109761377ce 100644\n--- a/sklearn/naive_bayes.py\n+++ b/sklearn/naive_bayes... | [
{
"diff_hunk": "@@ -153,6 +153,13 @@ class labels known to the classifier\n epsilon_ : float\n absolute additive value to variances\n \n+ sigma_ : ndarray of shape (n_classes, n_features)\n+ variance of each feature per class\n+\n+ .. deprecated:: 0.24\n+ ``sigma_`` was d... | b553c5c7b4b43796886a9bd5c99a4f65746b1293 | diff --git a/doc/whats_new/v1.0.rst b/doc/whats_new/v1.0.rst
index ecdb38440bf0b..07e616cc47710 100644
--- a/doc/whats_new/v1.0.rst
+++ b/doc/whats_new/v1.0.rst
@@ -65,6 +65,14 @@ Changelog
- |Enhancement| Validate user-supplied gram matrix passed to linear models
via the `precompute` argument. :pr:`19004` by :user... | {
"difficulty": "low",
"estimated_review_effort": 2,
"problem_domain": "Documentation Updates"
} |
sktime__sktime-4772@01a4a24 | sktime/sktime | Python | 4,772 | [BUG] Fix `predict_residuals` internal data type conversion | Fixes https://github.com/sktime/sktime/issues/4766
The `predict_residuals` internal calculation of residuals could break due to different data types for the observed and the predicted, as in some cases the observed would be obtained from `self._y` which can be data type coerced.
The "optimal" solution would be to... | 2023-06-26T17:22:41Z | [BUG] `predict_residuals(y=None)` does not work if forecaster is fitted with a Series.
**Describe the bug**
I fitted a simple pipeline using a `pd.Series` as input for fit. Calling `predict_residuals()` lead to an exception.
**To Reproduce**
``` python
from sktime.datasets import load_longley
from sktime.forecas... | Confirmed on current main, python 3.11, windows | [
{
"body": "**Describe the bug**\r\nI fitted a simple pipeline using a `pd.Series` as input for fit. Calling `predict_residuals()` lead to an exception.\r\n\r\n**To Reproduce**\r\n``` python\r\nfrom sktime.datasets import load_longley\r\nfrom sktime.forecasting.model_selection import temporal_train_test_split\r\... | 32493231800d94f8a5b6df6d1bc42ae0fb398c69 | {
"head_commit": "01a4a24bd3f9c47eef73545b62c785ddbd4626e8",
"head_commit_message": "bugfix",
"patch_to_review": "diff --git a/sktime/forecasting/base/_base.py b/sktime/forecasting/base/_base.py\nindex e09e0ff28b7..c25c19d2827 100644\n--- a/sktime/forecasting/base/_base.py\n+++ b/sktime/forecasting/base/_base.py\... | [
{
"diff_hunk": "@@ -58,3 +60,21 @@ def test_heterogeneous_get_fitted_params():\n \n reconciler.fit(y_agg)\n reconciler.get_fitted_params() # triggers an error pre-fix\n+\n+\n+@pytest.mark.skipif(\n+ not _check_estimator_deps(SARIMAX, severity=\"none\"),\n+ reason=\"skip test if required soft depe... | 3daa440b1ca995e49f130e5717368cbd8d1b97b7 | diff --git a/sktime/forecasting/base/_base.py b/sktime/forecasting/base/_base.py
index e09e0ff28b7..c25c19d2827 100644
--- a/sktime/forecasting/base/_base.py
+++ b/sktime/forecasting/base/_base.py
@@ -1129,10 +1129,7 @@ def predict_residuals(self, y=None, X=None):
y_pred = self.predict(fh=fh, X=X)
i... | {
"difficulty": "medium",
"estimated_review_effort": 2,
"problem_domain": "Bug Fixes"
} |
sqlfluff__sqlfluff-1364@88ee40a | sqlfluff/sqlfluff | Python | 1,364 | Issues 854, 1321: Handle Jinja leading whitespace-only lines | Fixes #854, #1321
Preserves leading whitespace-only lines in SQL files when the Jinja templater is used.
### Pull Request checklist
- [x] Please confirm you have completed any of the necessary steps below.
- Included test cases to demonstrate any code changes, which may be one or more of the following:
- `.... | 2021-09-07T17:37:02Z | Fix command mangles file when jinja comment is present
## Expected Behaviour
Correctly fix trailing commas from input file.
Input file `stg_payments.sql`:
```sql
with source as (
{#-
Normally we would select from the table here, but we are using seeds to load
our data in this project
#}
... | A few minutes after posting this and playing with the above SQL a bit more, I was able to pinpointed the real issue. `sqlfluff` actually has no problems with Jinja comments of the form `{# ... #}`.
It does, however, get lost with the pattern `{#- ... #}` from above. Removing the dash at the beginning of the comment ... | [
{
"body": "## Expected Behaviour\r\nCorrectly fix trailing commas from input file.\r\n\r\nInput file `stg_payments.sql`:\r\n```sql\r\nwith source as (\r\n\r\n {#-\r\n Normally we would select from the table here, but we are using seeds to load\r\n our data in this project\r\n #}\r\n select * from... | 0f2bd2cc627f59351f9fef5c16cc80370bf86fd4 | {
"head_commit": "88ee40a04c216bd5db6b9c218ba75a0a0516c38a",
"head_commit_message": "Add \"pragma: noqa\" for newly \"not covered\" line",
"patch_to_review": "diff --git a/src/sqlfluff/core/templaters/jinja.py b/src/sqlfluff/core/templaters/jinja.py\nindex 58b7b49b483..0576f66539a 100644\n--- a/src/sqlfluff/core/... | [
{
"diff_hunk": "@@ -934,7 +934,7 @@ def _split_uniques_coalesce_rest(\n if last_owu_idx is None or last_owu_idx + 1 >= len(\n int_file_slice.slice_buffer\n ):\n- cur_idx = 0\n+ cur_i... | 70b9092aec7973bc4afd8fdd16404038f4bcc041 | diff --git a/src/sqlfluff/core/templaters/dbt.py b/src/sqlfluff/core/templaters/dbt.py
index 21b1f13b5f4..7d9095e6230 100644
--- a/src/sqlfluff/core/templaters/dbt.py
+++ b/src/sqlfluff/core/templaters/dbt.py
@@ -259,13 +259,16 @@ def process(self, *, fname, in_str=None, config=None, formatter=None):
except Db... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
scikit-learn__scikit-learn-18964@f4ea8a0 | scikit-learn/scikit-learn | Python | 18,964 | FIX take into account mask in the ordering in grid_to_graph | <!--
Thanks for contributing a pull request! Please ensure you have taken a look at
the contribution guidelines: https://github.com/scikit-learn/scikit-learn/blob/master/CONTRIBUTING.md#pull-request-checklist
-->
#### Reference Issues/PRs
Fixes #18963
#### What does this implement/fix? Explain your changes.... | 2020-12-03T20:36:23Z | sklearn.feature_extraction.grid_to_graph may reorder vertices
#### Describe the bug
In grid_to_graph, you expect the vertices to correspond to the implicit order defined by the mask. This is not always the case, due to the occurrence of isolated vertices that are dismissed in the reindexing of the vertices.
####... | Hello, I'm new in contributing, is this open and does it need help ?
Hi @CryoFantom
#18964 is taking care of it, it mostly needs a review.
Hi, Can I contribute to it , Is this open?
If you can review #18964...
Best,
B
@bthirion I am trying to figure out the issue here (I am not too familiar with graphs and the fu... | [
{
"body": "\r\n#### Describe the bug\r\nIn grid_to_graph, you expect the vertices to correspond to the implicit order defined by the mask. This is not always the case, due to the occurrence of isolated vertices that are dismissed in the reindexing of the vertices.\r\n\r\n#### Steps/Code to Reproduce\r\n\r\n```... | 03245ee3afe5ee9e2ff626e2290f02748d95e497 | {
"head_commit": "f4ea8a0947b0f4c713d99b4620e577861d0c3ddc",
"head_commit_message": "removed np.bool",
"patch_to_review": "diff --git a/doc/whats_new/v1.0.rst b/doc/whats_new/v1.0.rst\nindex 6a565b8d5e21b..17aee986ad1ba 100644\n--- a/doc/whats_new/v1.0.rst\n+++ b/doc/whats_new/v1.0.rst\n@@ -45,6 +45,7 @@ Changelo... | [
{
"diff_hunk": "@@ -77,7 +77,8 @@ def _mask_edges_weights(mask, edges, weights=None):\n maxval = edges.max()\n else:\n maxval = 0\n- order = np.searchsorted(np.unique(edges.ravel()), np.arange(maxval + 1))\n+ order = np.searchsorted(np.unique(np.where(mask.ravel())),\n+ ... | 5ada5036caff1fdaa7985a7112ed7270eaee8102 | diff --git a/doc/whats_new/v1.0.rst b/doc/whats_new/v1.0.rst
index 7d8175a3b5046..d9f63cc62add4 100644
--- a/doc/whats_new/v1.0.rst
+++ b/doc/whats_new/v1.0.rst
@@ -156,6 +156,7 @@ Changelog
as `base_estimator` in ::class:`calibration.CalibratedClassifierCV`.
:pr:`20087` by :user:`Clément Fauchereau <clement-f>`.... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
sktime__sktime-5012@cdf2851 | sktime/sktime | Python | 5,012 | [BUG] fix BaseWindowSplitter get_n_split method for hierarchical data | Fixes #4971
#### What does this implement/fix? Explain your changes.
<!--
A clear and concise description of what you have implemented.
-->
The logic of the `BaseWindowSplitter.get_n_split` method does not work for hierarchical cases. This is mainly because it counts cutoffs on y, assuming that it is either a ... | 2023-08-03T00:45:56Z | [BUG] get_n_splits of window splitter does not reflect the number of splits for hierarchical data
**Describe the bug**
<!--
A clear and concise description of what the bug is.
-->
`get_n_splits` method returns the wrong number of splits when hierarchical data is passed into window based splitter.
**To Reprodu... | @fkiraly, do you have opinion on which of the two should be the expected behaviour of `get_n_splits` method for hierarchical data?
I think it should always be equal to what `split` would return? | [
{
"body": "**Describe the bug**\r\n<!--\r\nA clear and concise description of what the bug is.\r\n-->\r\n\r\n`get_n_splits` method returns the wrong number of splits when hierarchical data is passed into window based splitter. \r\n\r\n**To Reproduce**\r\n\r\n```python\r\nfrom sktime.utils._testing.hierarchical ... | ff6f059c5d78af345c061209147fd42c1c7d6cdf | {
"head_commit": "cdf2851df7c9e5b769a084170af64f7598d85924",
"head_commit_message": "change to check_is_scitype",
"patch_to_review": "diff --git a/sktime/forecasting/model_selection/_split.py b/sktime/forecasting/model_selection/_split.py\nindex 5fb23b18e8f..bca136ad2c6 100644\n--- a/sktime/forecasting/model_sele... | [
{
"diff_hunk": "@@ -996,12 +996,26 @@ def get_n_splits(self, y: Optional[ACCEPTED_Y_TYPES] = None) -> int:\n n_splits : int\n The number of splits.\n \"\"\"\n+ from sktime.datatypes import check_is_scitype\n+\n if y is None:\n raise ValueError(\n ... | 181d002fcce1478c45b334e137323f40ec89b698 | diff --git a/sktime/forecasting/model_selection/_split.py b/sktime/forecasting/model_selection/_split.py
index 9fca2a4dadb..81f7c29073d 100644
--- a/sktime/forecasting/model_selection/_split.py
+++ b/sktime/forecasting/model_selection/_split.py
@@ -1089,12 +1089,38 @@ def get_n_splits(self, y: Optional[ACCEPTED_Y_TYPES... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
saltstack__salt-59864@c400735 | saltstack/salt | Python | 59,864 | Fix #59863 | ### What issues does this PR fix or reference?
Fixes: #59863 | 2021-03-22T13:12:25Z | [BUG] Hetzner cloud driver does not recognize machines when rolling out a map
**Description**
When you are using the hetzner driver for saltcloud and try to rollout a machine, via a map
```
salt-cloud -m my.map
```
there is an error which pops up, caused by trying to convert a `PrivateNet`-model from package `... | Hi there! Welcome to the Salt Community! Thank you for making your first contribution. We have a lengthy process for issues and PRs. Someone from the Core Team will follow up as soon as possible. In the meantime, here’s some information that may help as you continue your Salt journey.
Please be sure to review our [Code... | [
{
"body": "**Description**\r\nWhen you are using the hetzner driver for saltcloud and try to rollout a machine, via a map\r\n\r\n```\r\nsalt-cloud -m my.map\r\n```\r\n\r\nthere is an error which pops up, caused by trying to convert a `PrivateNet`-model from package `hcloud` into an dictionary by using a propert... | 9f2570f933c71098fdfcf36b82e5cac893d0d6ae | {
"head_commit": "c4007352b365d6bd1f91b33b07f21134dc340f0b",
"head_commit_message": "Lint",
"patch_to_review": "diff --git a/changelog/59864.fixed b/changelog/59864.fixed\nnew file mode 100644\nindex 000000000000..6c1d3b9b6002\n--- /dev/null\n+++ b/changelog/59864.fixed\n@@ -0,0 +1 @@\n+Fix Hetzner cloud driver d... | [
{
"diff_hunk": "@@ -83,13 +83,19 @@ def _datacenter_to_dict(datacenter):\n }\n \n \n-def _network_to_dict(net):\n+def _public_network_to_dict(net):\n return {\n \"ipv4\": getattr(net.ipv4, \"ip\", None),\n \"ipv6\": getattr(net.ipv6, \"ip\", None),\n }\n \n \n+def _private_network_to... | 0b0a14be6d16af66f4b596a2bd8e96a391ef5a08 | diff --git a/changelog/59864.fixed b/changelog/59864.fixed
new file mode 100644
index 000000000000..6c1d3b9b6002
--- /dev/null
+++ b/changelog/59864.fixed
@@ -0,0 +1 @@
+Fix Hetzner cloud driver does not recognize machines when rolling out a map
\ No newline at end of file
diff --git a/salt/cloud/clouds/hetzner.py b/sa... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
scikit-learn__scikit-learn-18691@bce45b5 | scikit-learn/scikit-learn | Python | 18,691 | FIX validate input array-like in KDTree and BallTree | #### Reference Issues/PRs
Closes #14650
Superseded and closes #17400 | 2020-10-27T11:11:03Z | KDTree / BallTree seg fault
Both tree structures seg fault on init if the supplied data array has points with different dimensions.
```python
import numpy as np
from sklearn.neighbors import KDTree
X = [(1,2,3), (2,5), (5,5,1,2)]
Y = np.array(X)
KDTree(Y)
```
> Segmentation fault (core dumped)
Pip free... | I think that might rather be an array with an object dtype. Thanks for the
report
A PR with some validation of the passed `X` array would be welcome to fix this.
> I think that might rather be an array with an object dtype.
I can confirm.
Would you be interested in proposing a PR to fix it @drejanko ? Arrays wi... | [
{
"body": "Both tree structures seg fault on init if the supplied data array has points with different dimensions.\r\n\r\n```python\r\nimport numpy as np\r\nfrom sklearn.neighbors import KDTree\r\n\r\n\r\nX = [(1,2,3), (2,5), (5,5,1,2)]\r\nY = np.array(X)\r\nKDTree(Y)\r\n```\r\n> Segmentation fault (core dumped... | 4d7e61159db3fb59c474674b3d9f9c656d310e49 | {
"head_commit": "bce45b509e824f783d2b605f8e4cc5ecfb88332e",
"head_commit_message": "Move validation before shape call.",
"patch_to_review": "diff --git a/doc/whats_new/v0.24.rst b/doc/whats_new/v0.24.rst\nindex 21009245cc654..54b5806433ac7 100644\n--- a/doc/whats_new/v0.24.rst\n+++ b/doc/whats_new/v0.24.rst\n@@ ... | [
{
"diff_hunk": "@@ -65,3 +65,14 @@ def test_query_haversine():\n \n assert_array_almost_equal(dist1, dist2)\n assert_array_almost_equal(ind1, ind2)\n+\n+\n+def test_array_object_type():\n+ X = [(1, 2, 3), (2, 5), (5, 5, 1, 2)]\n+ # dtype parameter enforced by NEP 34",
"line": null,
"origin... | 53ed703efc7cffa8f28b220e0874edbc2208dcac | diff --git a/doc/whats_new/v0.24.rst b/doc/whats_new/v0.24.rst
index f691ecce5fe4e..ee027d69f1e9b 100644
--- a/doc/whats_new/v0.24.rst
+++ b/doc/whats_new/v0.24.rst
@@ -623,6 +623,11 @@ Changelog
the data intrinsic dimensionality is too high for tree-based methods.
:pr:`17148` by :user:`Geoffrey Bolmier <gbolmier... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
sktime__sktime-4757@6e046b9 | sktime/sktime | Python | 4,757 | [DOC] Improvements to formulations in the README | <!--
Thanks for contributing a pull request! Please ensure you have taken a look
at our contribution guide: https://github.com/sktime/sktime/blob/main/CONTRIBUTING.md
-->
#### Reference Issues/PRs
Fixes #4755
<!--
Example: Fixes #1234. See also #3456.
Please use keywords (e.g., Fixes) to create link to the... | 2023-06-24T08:28:40Z | [DOC] improve formulations and user experience of repo README
#### Describe the issue linked to the documentation
I would like to enhance certain sections to give them a more professional feel.
<!--
Tell us about the confusion introduced in the documentation.
--> | @ksachdeva Could you please assign me to this issue, or should I proceed to raise a pull request directly?
Sure! Can you expand in more detail which sections you would like to work on?
The introductory lines for the "Features" and "Where to ask questions" section
"Questions and feedback are extremely welcome! Please ... | [
{
"body": "#### Describe the issue linked to the documentation\r\nI would like to enhance certain sections to give them a more professional feel.\r\n<!--\r\nTell us about the confusion introduced in the documentation.\r\n-->\r\n\r\n",
"number": 4755,
"title": "[DOC] improve formulations and user experie... | bb494a74536cb45461273007d274076ecdca933c | {
"head_commit": "6e046b9221194bae0ca1532d035cae6d8c18f189",
"head_commit_message": "Update README.md",
"patch_to_review": "diff --git a/README.md b/README.md\nindex 5f2232b4325..ae21e48d3d3 100644\n--- a/README.md\n+++ b/README.md\n@@ -1,12 +1,12 @@\n <a href=\"https://www.sktime.net\"><img src=\"https://github.... | [
{
"diff_hunk": "@@ -41,28 +41,28 @@ sktime is a library for time series analysis in Python. It provides a unified in\n [roadmap]: https://www.sktime.net/en/latest/roadmap.html\n [related software]: https://www.sktime.net/en/latest/related_software.html\n \n-## :speech_balloon: Where to ask questions\n+## :speec... | 3ffe3a32f94f5b6683281b0a81fc1e1371c40e88 | diff --git a/README.md b/README.md
index 5f2232b4325..e9f01f00d5d 100644
--- a/README.md
+++ b/README.md
@@ -6,7 +6,7 @@
:rocket: **Version 0.19.2 out now!** [Check out the release notes here](https://www.sktime.net/en/latest/changelog.html).
-sktime is a library for time series analysis in Python. It provides a u... | {
"difficulty": "low",
"estimated_review_effort": 1,
"problem_domain": "Documentation Updates"
} |
scikit-learn__scikit-learn-18612@546535e | scikit-learn/scikit-learn | Python | 18,612 | FIX sort radius neighbors results when sort_results=True and algorithm="brute" | Fixes #18583.
Calling `radius_neighbors` method of `NearestNeighbors` was not sorting the result by distance when `sort_results=True`, when fitted with `algorithm="brute"`.
This PR fixes this issue, and clarifies the docstring. | 2020-10-12T22:57:54Z | radius_neighbors method of NearestNeighbors doesn't sort by distance when sort_results=True
#### Bug description
Calling radius_neighbors method of NearestNeighbors doesn't sort indices and distances by distance when sort_results=True is set. It appears to be sorting both by indices values instead, which doesn't seem ... | Looks like two changes are needed here, first for the docstring to specify sorting by distance, and second for the sorting logic to go by results instead of indices, yes? | [
{
"body": "#### Bug description\r\nCalling radius_neighbors method of NearestNeighbors doesn't sort indices and distances by distance when sort_results=True is set. It appears to be sorting both by indices values instead, which doesn't seem intuitive. The documentation of the sort_results argument of that metho... | fdb9233f72caec3d3f9720e073b2efdc141847ff | {
"head_commit": "546535e727fa95940e7577bb8ef82eebdc1d1d3e",
"head_commit_message": "FIX PR number",
"patch_to_review": "diff --git a/doc/whats_new/v0.24.rst b/doc/whats_new/v0.24.rst\nindex edd3afe62dbdf..652fa97ad4479 100644\n--- a/doc/whats_new/v0.24.rst\n+++ b/doc/whats_new/v0.24.rst\n@@ -536,6 +536,10 @@ Cha... | [
{
"diff_hunk": "@@ -678,6 +678,38 @@ def test_radius_neighbors_returns_array_of_objects():\n assert_array_equal(neigh_ind, expected_ind)\n \n \n+@pytest.mark.parametrize([\"algorithm\", \"metric\"], [(\"ball_tree\", \"euclidean\"),\n+ (\"kd_tree\", \"euclide... | 43ca348912c144b71d86cc8b88c4a744f6965ee9 | diff --git a/doc/whats_new/v0.24.rst b/doc/whats_new/v0.24.rst
index edd3afe62dbdf..caf32fbc0f6aa 100644
--- a/doc/whats_new/v0.24.rst
+++ b/doc/whats_new/v0.24.rst
@@ -536,6 +536,14 @@ Changelog
will raise a `ValueError` when fitting on data with all constant features.
:pr:`18370` by :user:`Trevor Waite <trewait... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
sqlfluff__sqlfluff-1336@9b9880a | sqlfluff/sqlfluff | Python | 1,336 | Improve function support in Postgres dialect | ### Brief summary of the change made
This is an enhancement of the FunctionDefinitionGrammar class for Postgres. It is comprehensive to allow all of the ending keywords, regardless of ordering.
Fixes #1288.
Includes all function endings as specified at https://www.postgresql.org/docs/9.1/sql-createfunction.html ... | 2021-08-30T14:26:40Z | Add support for function endings in dialect `postgres`
Defining functions in Postgres and ending the with some typical indications:
```
[...]
LANGUAGE plpgsql IMMUTABLE PARALLEL SAFE
```
or variations, such as:
```
[...]
LANGUAGE plpgsql STABLE PARALLEL SAFE
```
Executed with
```
sqlfluff lint --dia... | [
{
"body": "Defining functions in Postgres and ending the with some typical indications:\r\n\r\n```\r\n[...]\r\nLANGUAGE plpgsql IMMUTABLE PARALLEL SAFE\r\n```\r\nor variations, such as:\r\n```\r\n[...]\r\nLANGUAGE plpgsql STABLE PARALLEL SAFE\r\n```\r\n\r\n\r\nExecuted with\r\n\r\n```\r\nsqlfluff lint --dialect... | 24261c2a93a66fbbbd9797188d51b6a400705b6e | {
"head_commit": "9b9880aa5b74a4fd7a2a9fb2926a374ca995487e",
"head_commit_message": "Upgraded postgres dialect functions to allow more complex inputs and outputs",
"patch_to_review": "diff --git a/src/sqlfluff/dialects/dialect_ansi.py b/src/sqlfluff/dialects/dialect_ansi.py\nindex a163aad4b5f..38e5d8e95bf 100644\... | [
{
"diff_hunk": "@@ -8,4 +8,87 @@ CREATE OR REPLACE FUNCTION increment(i integer) RETURNS integer AS '\n BEGIN\r\n RETURN i + 1;\r\n END;\r\n-' LANGUAGE plpgsql;\r\n+' LANGUAGE plpgsql VOLATILE;\r\n+\r\n+CREATE OR REPLACE FUNCTION increment(i integer) RETURNS integer AS '\r\n+ BEGIN\r\n+ ... | 756c36a3248fe76c201c8f6b92c78b3606866421 | diff --git a/src/sqlfluff/dialects/dialect_ansi.py b/src/sqlfluff/dialects/dialect_ansi.py
index a163aad4b5f..38e5d8e95bf 100644
--- a/src/sqlfluff/dialects/dialect_ansi.py
+++ b/src/sqlfluff/dialects/dialect_ansi.py
@@ -87,7 +87,7 @@
RegexLexer("double_quote", r'"([^"\\]|\\.)*"', CodeSegment),
RegexL... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "New Feature Additions"
} | |
sktime__sktime-4759@6f4b8c2 | sktime/sktime | Python | 4,759 | [ENH] Implementing SplitterSummarizer Transformer | <!--
Thanks for contributing a pull request! Please ensure you have taken a look
at our contribution guide: https://github.com/sktime/sktime/blob/main/CONTRIBUTING.md
-->
#### Reference Issues/PRs
<!--
Example: Fixes #1234. See also #3456.
Please use keywords (e.g., Fixes) to create link to the issues or pul... | 2023-06-24T16:26:59Z | [ENH] `SplitterSummarizer` which applies a series-to-primitive transformer per split
From discussion with @abishalom on discord.
I infer that it would be great to have a "splitter summarizer", which is a series-to-series transformer.
It takes as a parameter a series-to-primitives transformer `t` and a splitter `c... | might be a nice (but somewhat challenging) good first issue, using the `transformer_simple` extension template.
Hello, I would love to take this issue for a first contribution if possible. Thanks
of course! Let us know if you need help getting started.
Here's the guide for implementing estimators: https://www.sktime... | [
{
"body": "From discussion with @abishalom on discord.\r\n\r\nI infer that it would be great to have a \"splitter summarizer\", which is a series-to-series transformer.\r\n\r\nIt takes as a parameter a series-to-primitives transformer `t` and a splitter `cv`.\r\n\r\nIt transforms a single series `X` into a sing... | 0c8b8a15cfe63922742adbbb66717712aaaf3d0a | {
"head_commit": "6f4b8c2685d17d30d5d625d38164d2cc318ac286",
"head_commit_message": "new code version",
"patch_to_review": "diff --git a/sktime/transformations/series/summarize.py b/sktime/transformations/series/summarize.py\nindex e7dde126074..4a23c33d982 100644\n--- a/sktime/transformations/series/summarize.py\... | [
{
"diff_hunk": "@@ -750,3 +750,140 @@ def get_test_params(cls, parameter_set=\"default\"):\n params4 = {\"summary_function\": None, \"quantiles\": (0.1, 0.2, 0.25)}\n \n return [params1, params2, params3, params4]\n+\n+\n+class SplitterSummarizer(BaseTransformer):\n+ \"\"\"Create summary valu... | a1e21e9dc72d003685c1fb951886a2c83aca78bf | diff --git a/docs/source/api_reference/transformations.rst b/docs/source/api_reference/transformations.rst
index b9667702e7e..dcb9b05dfc1 100644
--- a/docs/source/api_reference/transformations.rst
+++ b/docs/source/api_reference/transformations.rst
@@ -142,6 +142,7 @@ These transformers extract simple summary features.... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "New Feature Additions"
} |
saltstack__salt-59310@ef8be75 | saltstack/salt | Python | 59,310 | Allow the nameservers to be populated from systemd-resolve | ### What does this PR do?
Allow the nameservers to be populated from systemd-resolve.
### What issues does this PR fix or reference?
Fixes: #57618
### Merge requirements satisfied?
**[NOTICE] Bug fixes or features added to Salt require tests.**
<!-- Please review the [test documentation](https://docs.saltstac... | 2021-01-16T00:43:18Z | [BUG] Grain does not report configured nameservers for systemd-resolved
**Description**
On systems using `systemd-resolved`, by default the `/etc/resolv.conf` file lists 127.0.0.53 as the nameserver (for clients not using the libc or bus APIs). The list of actual nameservers is available e.g. via `systemd-resolve --st... | If not mistaken resolvectl was added 16.10. I don't know if there is any thing to update in salt as the grain just parse /etc/resolv.conf. Ubuntu resolvectl dose not update /etc/reolv.conf. I have a state for ubuntu 16.10 =< create syslink to /run/resolvconf/resolv.conf (not 100% on that path). I don't know why ubu... | [
{
"body": "**Description**\r\nOn systems using `systemd-resolved`, by default the `/etc/resolv.conf` file lists 127.0.0.53 as the nameserver (for clients not using the libc or bus APIs). The list of actual nameservers is available e.g. via `systemd-resolve --status`, or `resolvectl dns` on newer systems.\r\n\r\... | 3f589b998e4655fd4cdfcaf3e563c1da18068c03 | {
"head_commit": "ef8be75d53bd8dbbb4867e9173515766bf79694e",
"head_commit_message": "Override salt.utils.path.which so we do not find systemd-resolve.",
"patch_to_review": "diff --git a/changelog/57618.added b/changelog/57618.added\nnew file mode 100644\nindex 000000000000..d42c23173ad4\n--- /dev/null\n+++ b/chan... | [
{
"diff_hunk": "@@ -1216,5 +1204,67 @@ def parse_resolv(src=\"/etc/resolv.conf\"):\n \"search\": search,\n \"options\": options,\n }\n- except IOError:\n+ except OSError:\n+ return {}\n+\n+\n+def parse_systemd_resolve():\n+ \"\"\"\n+ Parse the information from ... | f4a0501e585cd7a539bb511b678a272994277104 | diff --git a/changelog/57618.added b/changelog/57618.added
new file mode 100644
index 000000000000..d42c23173ad4
--- /dev/null
+++ b/changelog/57618.added
@@ -0,0 +1 @@
+Allow the nameservers to be populated from systemd-resolve.
diff --git a/salt/grains/core.py b/salt/grains/core.py
index 5c5949bdcd37..db933360aff8 10... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
saltstack__salt-59034@ceb92ee | saltstack/salt | Python | 59,034 | Add SCRAM-SHA-256 support to postgres states | ### What does this PR do?
Adds SCRAM-SHA-256 support to postgres states.
### What issues does this PR fix or reference?
Fixes: #51217
### Previous Behavior
See referenced issue. Only plaintext and MD5 passwords supported.
### New Behavior
If `encrypted=scram-sha-256` is passed to the `postgres_user.present... | 2020-11-27T14:00:52Z | SCRAM-SHA-256 support for states.postgres_user
Current implementation either sends and compares plaintext or an md5hash.
There's no way to send plaintext for the server to hash, because it also adds `UNENCRYPTED` to the query.
> ERROR: UNENCRYPTED PASSWORD is no longer supported | Python 3 implementation of postgres' algorithm
```python
import base64
import hashlib
import hmac
import secrets
def scram_sha_256(password):
# TODO: saslprep
if not isinstance(password, (bytes, bytearray)):
password = password.encode('utf8')
iterations = 4096
salt = secrets.token... | [
{
"body": "Current implementation either sends and compares plaintext or an md5hash.\r\nThere's no way to send plaintext for the server to hash, because it also adds `UNENCRYPTED` to the query.\r\n> ERROR: UNENCRYPTED PASSWORD is no longer supported",
"number": 51217,
"title": "SCRAM-SHA-256 support for... | ec1a907465c2d6dff126b747a52035e19b9a105b | {
"head_commit": "ceb92eebd18dc6782cfab6605565282f24b6d3a5",
"head_commit_message": "Convert DB_ARGS constant to fixture",
"patch_to_review": "diff --git a/changelog/51271.added b/changelog/51271.added\nnew file mode 100644\nindex 000000000000..2125dbdc879f\n--- /dev/null\n+++ b/changelog/51271.added\n@@ -0,0 +1,... | [
{
"diff_hunk": "@@ -69,12 +69,10 @@ salt/(states|modules)/.*postgres.py:\n - unit.states.test_postgres_cluster\n - unit.states.test_postgres_database\n - unit.states.test_postgres_extension\n- - unit.states.test_postgres_group\n - unit.states.test_postgres_initdb\n - unit.states.test_postgres_languag... | 72de0653145bd3cf2821a6f6bbdc37e397e4370d | diff --git a/changelog/51271.added b/changelog/51271.added
new file mode 100644
index 000000000000..2125dbdc879f
--- /dev/null
+++ b/changelog/51271.added
@@ -0,0 +1,2 @@
+SCRAM-SHA-256 support for PostgreSQL passwords.
+Pass encrypted=scram-sha-256 to the postgres_user.present (or postgres_group.present) state.
diff -... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "Bug Fixes"
} |
saltstack__salt-58976@e02985d | saltstack/salt | Python | 58,976 | Fixes to check_requisite to account for parallelization | ### What does this PR do?
When we are checking requisites, run reconcile_procs just on those requisite states not all running states.
### What issues does this PR fix or reference?
Fixes: #49273
### Merge requirements satisfied?
**[NOTICE] Bug fixes or features added to Salt require tests.**
<!-- Please revi... | 2020-11-18T19:03:15Z | Salt parallelization is sequential if the parallel state object has any requisites
### Description of Issue/Question
Whatever backing scheduler is used for the parallelization feature seems to only work if the state has no requisites. If it does- for example, a dependency on a pkg.install- parallelization doesn't o... | @thatch45 can you comment on this?
Thanks,
Daniel
At first I looked at this and said "yes, that sounds right" but then I tested it and it does not behave the way I think it should. So the require_ins should make barrier2 wait for all of the parallels to run, but it should not block until it gets evaluated. So I tho... | [
{
"body": "### Description of Issue/Question\r\n\r\nWhatever backing scheduler is used for the parallelization feature seems to only work if the state has no requisites. If it does- for example, a dependency on a pkg.install- parallelization doesn't occur, instead it's ran sequentially.\r\n\r\nUnfortunately, t... | 439d4b6c682c0b98166332bd88ac1167256e1098 | {
"head_commit": "e02985d54abb5b00061e941f6888e634f5ff3f2b",
"head_commit_message": "Adding changelog.",
"patch_to_review": "diff --git a/changelog/58976.fixed b/changelog/58976.fixed\nnew file mode 100644\nindex 000000000000..c709ec1261a6\n--- /dev/null\n+++ b/changelog/58976.fixed\n@@ -0,0 +1 @@\n+When we are c... | [
{
"diff_hunk": "@@ -0,0 +1,15 @@\n+barrier:\n+ test.nop\n+ \n+{%- for x in [1,2,3,4,5,6,7,8,9,10] %}",
"line": null,
"original_line": 4,
"original_start_line": null,
"path": "tests/integration/files/file/base/issue-49273.sls",
"start_line": null,
"text": "@user1:\n```suggestion\r\n{%- ... | 70ec327960553d89d4bde7600ecbbdee64799586 | diff --git a/changelog/58976.fixed b/changelog/58976.fixed
new file mode 100644
index 000000000000..c709ec1261a6
--- /dev/null
+++ b/changelog/58976.fixed
@@ -0,0 +1 @@
+When we are checking requisites, run reconcile_procs just on those requisite states not all running states.
diff --git a/salt/state.py b/salt/state.py... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
sqlfluff__sqlfluff-1263@8110abb | sqlfluff/sqlfluff | Python | 1,263 | Support COUNT(0) preference over COUNT(*) or COUNT(1) | Fixes #1260
I've gone with the simpler option of two separate configs to avoid breaking backwards compatibility. So you can have:
```yml
prefer_count_1: True
```
or:
```yml
prefer_count_0: True
```
And if both are specified:
```yml
prefer_count_1: True
prefer_count_0: True
```
Then `prefer_co... | 2021-08-09T14:06:36Z | Support `COUNT(0)` as well as `COUNT(1)`
L047 allows enforcing consistency of use of `COUNT(*)` or `COUNT(1)`.
However some teams use `COUNT(0)` instead of either. Personally `COUNT(1)` has always made more sense to me, but that's by the by as sometimes you have to swallow your own preferences to follow team style.
... | [
{
"body": "L047 allows enforcing consistency of use of `COUNT(*)` or `COUNT(1)`.\r\n\r\nHowever some teams use `COUNT(0)` instead of either. Personally `COUNT(1)` has always made more sense to me, but that's by the by as sometimes you have to swallow your own preferences to follow team style.\r\n\r\nSo I would ... | df232be94bfa69fcca8ed5a83ef4adb54fabca9b | {
"head_commit": "8110abb5b93217a38b0b221ae1436661c32176c6",
"head_commit_message": "Update src/sqlfluff/rules/L047.py\n\nCo-authored-by: Barry Hart <barrywhart@yahoo.com>",
"patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex e01391e3822..a20ac0026b6 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\... | [
{
"diff_hunk": "@@ -87,7 +93,64 @@ def _eval(self, segment, **kwargs):\n ),\n ],\n )\n- if not self.prefer_count_1 and f_content[0].is_type(\"expression\"):\n+ elif self.prefer_count_1 and f_content[0].is_type(\"expression\"):",
... | 551f4f050c60784a8f89843ed3c5e87bb280ce99 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index cd7b7192e49..e82ee8ca073 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -10,13 +10,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Support for primary index name, collect stats improvement, COMMENT statement for teradata dialect... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "New Feature Additions"
} | |
sqlfluff__sqlfluff-1313@5bb43f8 | sqlfluff/sqlfluff | Python | 1,313 | Initial support for Transact-SQL (T-SQL) dialect | ### Brief summary of the change made
Idea of this PR is to get basic support for TSQL. Such that most of the TSQL code is parsable.
Fixes #660
Fixes: #1282
### Are there any other side effects of this change that we should be aware of?
Should not be any side effects.
### Pull Request checklist
Still in... | 2021-08-24T09:06:57Z | T-SQL dialect (Microsoft SQL Server Transact-SQL)
T-SQL support would be great for those of us stuck in MS Land! 😄
Create dialect for MS SQL DB
For parsing MS SQL DB sql scripts it seems to be useful to add special dialect.
For example, for table creation we have the following structure, which cannot be parsed w... | +1 for me.
Is there a guide on how this could be implemented?
I don't know about a guide, but if you look at existing files like dialect_bigquery.py or dialect_postgres.py, it'd be pretty similar. Essentially, each dialect is a Python module that specializes an existing"base" dialect module. In most cases, the base... | [
{
"body": "T-SQL support would be great for those of us stuck in MS Land! 😄\r\n",
"number": 660,
"title": "T-SQL dialect (Microsoft SQL Server Transact-SQL)"
},
{
"body": "For parsing MS SQL DB sql scripts it seems to be useful to add special dialect.\r\n\r\nFor example, for table creation we h... | 8419e5040a10886350d1801d0610b84ce329a53d | {
"head_commit": "5bb43f8c3387d30b05312635ec7a978aed5ee3c2",
"head_commit_message": "commit intial function fix tsql",
"patch_to_review": "diff --git a/src/sqlfluff/core/dialects/__init__.py b/src/sqlfluff/core/dialects/__init__.py\nindex 3d8895bd452..2835c6a310a 100644\n--- a/src/sqlfluff/core/dialects/__init__.... | [
{
"diff_hunk": "@@ -0,0 +1,177 @@\n+\"\"\" The MSSQL T-SQL dialect.\n+\n+https://docs.microsoft.com/en-us/sql/t-sql/language-elements/language-elements-transact-sql\n+\n+\n+\"\"\"\n+from enum import Enum\n+from typing import Generator, List, Tuple, NamedTuple, Optional, Union\n+\n+from sqlfluff.core.parser impo... | 0059611370b16f7093d1f7ccf809b71781d90d3c | diff --git a/README.md b/README.md
index cb66a6f2a09..17391f3a9de 100644
--- a/README.md
+++ b/README.md
@@ -27,6 +27,7 @@ Although SQL is reasonably consistent in its implementations, there are several
- [PostgreSQL](https://www.postgresql.org/) (aka Postgres)
- [Snowflake](https://www.snowflake.com/)
- [Teradata](... | {
"difficulty": "high",
"estimated_review_effort": 4,
"problem_domain": "New Feature Additions"
} |
saltstack__salt-58861@e6ca43b | saltstack/salt | Python | 58,861 | Fixes to pillar cache when backend is memory | ### What does this PR do?
Log a different obeject when debugging if we're using disk cache vs memory cache. The disk cache pillar class has the _dict_ object but the cache pillar object which is used with the memory cache does not include a _dict obeject because it is a dict already. Adding a test when pillar_cache_... | 2020-11-02T18:10:28Z | [BUG] AttributeError: 'CacheDict' object has no attribute '_dict' when memory used as pillar_cache_backend
**Description**
`pillar_cache_backed: memory` is not experimental it is just broken. pillar makes log.debug calls to `self.cache._dict` however the CacheDict object does not have a _dict Attribute. while the Cach... | zd-5931
It looks like the `CacheDisk` class has a `_dict` attribute, but the CacheDict one does not, since it is itself a Dict. It's likely that the log messages were added to handle when the cache option was to use disk instead of memory. | [
{
"body": "**Description**\r\n`pillar_cache_backed: memory` is not experimental it is just broken. pillar makes log.debug calls to `self.cache._dict` however the CacheDict object does not have a _dict Attribute. while the CacheDisk object does. this completely breaks pillar if you try setting the pillar_cache b... | 570ed6ae42f4b824c78e758b2e7113a1589f9306 | {
"head_commit": "e6ca43b40fe77c515305e99c162f9c46d60c4829",
"head_commit_message": "Adding changelog.",
"patch_to_review": "diff --git a/changelog/58861.fixed b/changelog/58861.fixed\nnew file mode 100644\nindex 000000000000..4655432225c8\n--- /dev/null\n+++ b/changelog/58861.fixed\n@@ -0,0 +1 @@\n+Log a differe... | [
{
"diff_hunk": "@@ -0,0 +1 @@\n+Log a different obeject when debugging if we're using disk cache vs memory cache. The disk cache pillar class has the dict object but the cache pillar object which is used with the memory cache does not include a _dict obeject because it is a dict already.",
"line": null,
... | d92905427bd05b14f919bf8ca01760135d0ac0d5 | diff --git a/changelog/58861.fixed b/changelog/58861.fixed
new file mode 100644
index 000000000000..4e31b63afd10
--- /dev/null
+++ b/changelog/58861.fixed
@@ -0,0 +1 @@
+Log a different object when debugging if we're using disk cache vs memory cache. The disk cache pillar class has the dict object but the cache pillar ... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
saltstack__salt-59411@34e5cd0 | saltstack/salt | Python | 59,411 | Adding the ability to clear and show the pillar cache enabled when pillar_cache is True. | ### What does this PR do?
Adding the ability to clear and show the pillar cache enabled when pillar_cache is True.
### What issues does this PR fix or reference?
Fixes: #37080
### Merge requirements satisfied?
**[NOTICE] Bug fixes or features added to Salt require tests.**
<!-- Please review the [test docum... | 2021-02-03T21:12:26Z | Clearing pillar cache from Master leaves stray files & does not appear to clear it
## Description of Issue/Question
Using the pillar cache with a disk backend. The `cache.clear_pillar` runner appears to clear the cache upon immediately calling `cache.pillar`, but the files still persist on the disk, and if it's within... | I am able to replicate this on 2016.3.3 with just regular pillar files.
```
[root@salt ~]# cat /srv/pillar/test.sls
this: one
that: two
those:
- three
- four
- five
[root@salt ~]# salt-call pillar.items
[WARNING ] /usr/lib/python2.7/site-packages/salt/grains/core.py:1493: DeprecationWarning: The "osmajorrelease"... | [
{
"body": "## Description of Issue/Question\n\nUsing the pillar cache with a disk backend. The `cache.clear_pillar` runner appears to clear the cache upon immediately calling `cache.pillar`, but the files still persist on the disk, and if it's within the cache TTL, the cached pillar data still gets retrieved, s... | 899ed0046c4d05417edf26e28a30b9969c0e3253 | {
"head_commit": "34e5cd0c2dd6ea477e0a955ea9e4fc112ea31b71",
"head_commit_message": "Docs cleanup. Removing unnecessary saltenv. Moving test to pytest.",
"patch_to_review": "diff --git a/changelog/37080.added b/changelog/37080.added\nnew file mode 100644\nindex 000000000000..ae81d22ef23b\n--- /dev/null\n+++ b/c... | [
{
"diff_hunk": "@@ -97,3 +98,103 @@ def show_pillar(minion=\"*\", **kwargs):\n \n compiled_pillar = pillar.compile_pillar()\n return compiled_pillar\n+\n+\n+def clear_pillar_cache(minion=\"*\", **kwargs):\n+ \"\"\"\n+ Clears the cached values when using pillar_cache\n+\n+ CLI Example:\n+\n+ ... | 831a38a7c5e9650dfaf5dd476545789e63f58acb | diff --git a/changelog/37080.added b/changelog/37080.added
new file mode 100644
index 000000000000..ae81d22ef23b
--- /dev/null
+++ b/changelog/37080.added
@@ -0,0 +1 @@
+Adding the ability to clear and show the pillar cache enabled when pillar_cache is True.
diff --git a/salt/pillar/__init__.py b/salt/pillar/__init__.p... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
sqlfluff__sqlfluff-1214@64c87c7 | sqlfluff/sqlfluff | Python | 1,214 | Issue 1207: Fix looping interaction between L008 and L030 | Resolves #1207 | 2021-07-18T21:29:43Z | COUNT dup in sqlfluff fix in 0.6.0 (from 0.5.3)
## Expected Behaviour
```
SELECT FLOOR(dt) ,count(*) FROM test
```
## Observed Behaviour
```
~ # sqlfluff fix --rules L008,L030 -f test.sql
==== finding fixable violations ====
WARNING One fix for L008 not applied, it would re-cause the same error.
WARNING... | I did some experimenting: it seems that rules L008 and L030 are the "minimum set" in order to reproduce the error, i.e.:
```
sqlfluff fix test.sql --rules L008,L030
``` | [
{
"body": "## Expected Behaviour\r\n\r\n```\r\nSELECT FLOOR(dt) ,count(*) FROM test\r\n```\r\n## Observed Behaviour\r\n\r\n```\r\n~ # sqlfluff fix --rules L008,L030 -f test.sql\r\n==== finding fixable violations ====\r\nWARNING One fix for L008 not applied, it would re-cause the same error.\r\nWARNING One... | 4e9b07fca0babd0070a9fc0a06ca9ed4e4daa24c | {
"head_commit": "64c87c73a67e14729cc30a223d6d1fb24345fda2",
"head_commit_message": "Remove now-unused code",
"patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex 06054d0d1e6..61fd77853cf 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -10,6 +10,7 @@ and this project adheres to [Semantic Version... | [
{
"diff_hunk": "@@ -38,16 +38,24 @@ def _eval(self, segment, raw_stack, **kwargs):\n This is a slightly odd one, because we'll almost always evaluate from a point a few places\n after the problem site. NB: We need at least two segments behind us for this to work.\n \"\"\"\n+ if le... | 3177e7557726f893fb054419bf79742386c82fdb | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 17ba14da0f4..183d67f8280 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Added dbt 0.20.* to the default test suite.
- Handle newlines in rule list configuration in .sqlfl... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
saltstack__salt-58851@3166cfb | saltstack/salt | Python | 58,851 | Gate elasticsearch runner requirements | ### What does this PR do?
Ensure that elasticsearch.index_exists is available before loading the elasticsearch returner.
### What issues does this PR fix or reference?
Fixes: #58015
### Merge requirements satisfied?
**[NOTICE] Bug fixes or features added to Salt require tests.**
<!-- Please review the [test ... | 2020-10-30T19:18:40Z | Elasticsearch returner fails when index exists.
### Description of Issue
When I trigger the elasticsearch returner the first time an index is created, on subsequent calls it just fails.
### Setup
```
elasticsearch:
hosts:
- "elastic7:9200"
- "elastic8:9200"
index_date: False
number_o... | @waynegemmell thanks for the report, could you please provide elastic version you're using?
Elastic 7.8
On Thu, Jul 23, 2020, 21:01 Kirill Ponomarev <notifications@github.com>
wrote:
> @waynegemmell <https://github.com/waynegemmell> thanks for the report,
> could you please provide elastic version you're using?
>
> —... | [
{
"body": "### Description of Issue\r\nWhen I trigger the elasticsearch returner the first time an index is created, on subsequent calls it just fails. \r\n\r\n### Setup\r\n```\r\nelasticsearch:\r\n hosts:\r\n - \"elastic7:9200\"\r\n - \"elastic8:9200\"\r\n index_date: False\r\n number_of_sha... | e443061612c3a20029d1f22c3829fe0fc82cd184 | {
"head_commit": "3166cfb120ed080ae6a8b29e5c07bb6a9160439f",
"head_commit_message": "Adding changelog.",
"patch_to_review": "diff --git a/changelog/58851.fixed b/changelog/58851.fixed\nnew file mode 100644\nindex 000000000000..961fd2a7bd61\n--- /dev/null\n+++ b/changelog/58851.fixed\n@@ -0,0 +1 @@\n+Ensure that e... | [
{
"diff_hunk": "@@ -122,6 +115,11 @@\n \n \n def __virtual__():\n+ if \"elasticsearch.index_exists\" not in __salt__:\n+ log.debug(\n+ \"Elasticsearch module not availble. Check that the elasticsearch library is installed.\"\n+ )\n+ return False",
"line": null,
"origi... | d3945268395e6af23a1e7f9fd7a74b11fc8069f6 | diff --git a/changelog/58851.fixed b/changelog/58851.fixed
new file mode 100644
index 000000000000..961fd2a7bd61
--- /dev/null
+++ b/changelog/58851.fixed
@@ -0,0 +1 @@
+Ensure that elasticsearch.index_exists is available before loading the elasticsearch returner.
diff --git a/salt/returners/elasticsearch_return.py b/s... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
sktime__sktime-4492@aca00d4 | sktime/sktime | Python | 4,492 | [BUG] fix `BATS` and `TBATS` `_predict_interval` interface | Fixes https://github.com/sktime/sktime/issues/4491
The `_predict_interval` interface in `_TbatsAdapter` was a bit of a mess.
There was also really strange code that triggered specifically whenever the `fh` was longer than the training data, I was unable to understand why that condition should be the same as "cont... | 2023-04-18T11:45:10Z | [BUG] TBATS can not produce a forecast with intervals when FH > History Period
**Describe the bug**
<!--
A clear and concise description of what the bug is.
-->
**To Reproduce**
```python
import numpy as np
import pandas as pd
import logging
from sktime.forecasting.tbats import TBATS
# generate train se... | FYI @yarnabrina,this looks similar to code you are currently refactoring for `statsmodels`.
This seems to come from `fh`, have you encountered this before?
update: bug confirmed, python 3.10, current main
This is also not coming from `fh`, that is fine.
It is coming from preceding code, which produces `pred_int` o... | [
{
"body": "**Describe the bug**\r\n<!--\r\nA clear and concise description of what the bug is.\r\n-->\r\n\r\n**To Reproduce**\r\n```python\r\nimport numpy as np\r\nimport pandas as pd\r\nimport logging\r\nfrom sktime.forecasting.tbats import TBATS\r\n\r\n\r\n# generate train set values\r\nnp.random.seed(42)\r\n... | f3bf24d6eefd21b91981a6b4177298276bef55c2 | {
"head_commit": "aca00d48baf4806d3b9202ae56f8602913e2de01",
"head_commit_message": "add test case from 4491",
"patch_to_review": "diff --git a/sktime/forecasting/base/adapters/_tbats.py b/sktime/forecasting/base/adapters/_tbats.py\nindex b4e8db6b945..c59c41765b9 100644\n--- a/sktime/forecasting/base/adapters/_tb... | [
{
"diff_hunk": "@@ -0,0 +1,39 @@\n+# -*- coding: utf-8 -*-\n+\"\"\"Tests for TBATS.\"\"\"\n+# copyright: sktime developers, BSD-3-Clause License (see LICENSE file)\n+\n+__author__ = [\"fkiraly\", \"ngupta23\"]\n+\n+import numpy as np\n+import pandas as pd\n+import pytest\n+\n+from sktime.forecasting.tbats impor... | 6122532ef7cfc237e77e5e81cb71c2ebdde0461c | diff --git a/sktime/forecasting/base/adapters/_tbats.py b/sktime/forecasting/base/adapters/_tbats.py
index b4e8db6b945..c59c41765b9 100644
--- a/sktime/forecasting/base/adapters/_tbats.py
+++ b/sktime/forecasting/base/adapters/_tbats.py
@@ -3,7 +3,7 @@
# copyright: sktime developers, BSD-3-Clause License (see LICENSE ... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "Bug Fixes"
} |
scikit-learn__scikit-learn-18269@6d7826e | scikit-learn/scikit-learn | Python | 18,269 | FIX MLPClassifier not iterating to max_iter if warm started | <!--
Thanks for contributing a pull request! Please ensure you have taken a look at
the contribution guidelines: https://github.com/scikit-learn/scikit-learn/blob/master/CONTRIBUTING.md#pull-request-checklist
-->
#### Reference Issues/PRs
<!--
Example: Fixes #1234. See also #3456.
Please use keywords (e.g., Fi... | 2020-08-27T05:20:27Z | warm_start behaviour inconsistent between MLPRegressor and MLPClassifier using SGD
When using `warm_start=True` and `solver="sgd"` in an `MLPClassifier,` if `fit()` has already been called once, subsequent calls to `fit()` only perform one training iteration, regardless of the value `max_iter` is set to. `MLPRegressor`... | Agreed that warm_start should perform the full set of iterations, unlike
partial_fit. | [
{
"body": "When using `warm_start=True` and `solver=\"sgd\"` in an `MLPClassifier,` if `fit()` has already been called once, subsequent calls to `fit()` only perform one training iteration, regardless of the value `max_iter` is set to. `MLPRegressor` exhibits what I imagine to be the desired behaviour: it train... | 8ba49f628092fe3fb1deea101910006aa6c76d49 | {
"head_commit": "6d7826e81f2061e0e423fa232c61c47519f6e6f8",
"head_commit_message": "Add a test for Issue 16812: warm starting MLPClassifier",
"patch_to_review": "diff --git a/sklearn/neural_network/_multilayer_perceptron.py b/sklearn/neural_network/_multilayer_perceptron.py\nindex 368a6b0e5dd56..2e827f6f9f8cf 10... | [
{
"diff_hunk": "@@ -662,6 +662,17 @@ def test_warm_start():\n clf.fit(X, y_i)\n \n \n+def test_warm_start_full_iteration():\n+ X = X_iris\n+ y = y_iris\n+ max_iter = 3\n+ clf = MLPClassifier(hidden_layer_sizes=2, solver='sgd',\n+ warm_start=True, max_iter=max_iter)... | e771b1eb74631c1e81e6dfcedd4c8c37b7d59520 | diff --git a/doc/whats_new/v0.24.rst b/doc/whats_new/v0.24.rst
index c6ef6e5994cdf..262c797f04d4e 100644
--- a/doc/whats_new/v0.24.rst
+++ b/doc/whats_new/v0.24.rst
@@ -433,6 +433,11 @@ Changelog
:class:`neural_network.MLPRegressor`.
:pr:`17759` by :user:`Srimukh Sripada <d3b0unce>`.
+- |Fix| Fix method :func:... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
sktime__sktime-4133@83010f8 | sktime/sktime | Python | 4,133 | [BUG] fix erroneous `int` coercion of `TrendForecaster` and `PolynomialTrendForecaster` on `DatetimeIndex` | Fixes https://github.com/sktime/sktime/issues/4131 and a parallel issue for `TrendForecaster` which is the cause of #3230 (also fixes #3230).
Erroneous coercion caused huge arrays to be allocated when the input data had a `DatetimeIndex`.
Also, previously, any time stamp based fits and coefficients were related t... | 2023-01-21T23:04:11Z | [BUG] `TrendForecaster` gives incorrect output
**Describe the bug**
The TrendForecaster produces unusual outputs on levels different from the target series.
**To Reproduce**
```python
from sktime.datasets import load_airline
from sktime.forecasting.trend import TrendForecaster
from sktime.utils.plotting impor... | This should be fixed now here: https://github.com/sktime/sktime/pull/4133
Cause is the same as bug https://github.com/sktime/sktime/issues/4131 - conversion to integer was erroneous for time stamp indexed time series.
```
Unable to allocate 2.74 TiB for an array with shape (376012800001,) and data type int64
```
... | [
{
"body": "**Describe the bug**\r\nThe TrendForecaster produces unusual outputs on levels different from the target series.\r\n\r\n**To Reproduce**\r\n\r\n```python\r\nfrom sktime.datasets import load_airline\r\nfrom sktime.forecasting.trend import TrendForecaster\r\nfrom sktime.utils.plotting import plot_serie... | cdaba80f28648e7c642f66edd87d64855a026cf5 | {
"head_commit": "83010f8cce4bc5759aa54f3981ba22b74423efba",
"head_commit_message": "higher rtol for numerical tests",
"patch_to_review": "diff --git a/sktime/forecasting/tests/test_trend.py b/sktime/forecasting/tests/test_trend.py\nindex 1034649fc3d..e3cdac78765 100644\n--- a/sktime/forecasting/tests/test_trend.... | [
{
"diff_hunk": "@@ -2,20 +2,60 @@\n \"\"\"Test trend forecasters.\"\"\"\n # copyright: sktime developers, BSD-3-Clause License (see LICENSE file)\n \n-__author__ = [\"mloning\"]\n+__author__ = [\"mloning\", \"fkiraly\"]\n __all__ = [\"get_expected_polynomial_coefs\"]\n \n import numpy as np\n import pandas as p... | 6d1ebe7c434481f69faee059f59c81c51396bdb8 | diff --git a/sktime/forecasting/tests/test_trend.py b/sktime/forecasting/tests/test_trend.py
index 1034649fc3d..c1eadc87551 100644
--- a/sktime/forecasting/tests/test_trend.py
+++ b/sktime/forecasting/tests/test_trend.py
@@ -2,20 +2,72 @@
"""Test trend forecasters."""
# copyright: sktime developers, BSD-3-Clause Lice... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "Bug Fixes"
} |
sqlfluff__sqlfluff-1133@656e718 | sqlfluff/sqlfluff | Python | 1,133 | Rename --parallel to --processes | Resolves #1057 | 2021-06-05T08:46:43Z | Better name for --parallel?
I feel that --threads instead of --parallel is clearer in terms of what the input value does. We can also then change the help string to specify that the number passed is the number of threads used. | `--threads` was the original suggestion. I used `--parallel` for two main reasons:
* Generally, to avoid incorrect terminology: the implementation uses processes rather than threads. (Python threads do not scale well for this kind of processing due to the [GIL](https://wiki.python.org/moin/GlobalInterpreterLock).)
* ... | [
{
"body": "I feel that --threads instead of --parallel is clearer in terms of what the input value does. We can also then change the help string to specify that the number passed is the number of threads used.",
"number": 1057,
"title": "Better name for --parallel?"
}
] | bcb5c6dfb42f1a195e8206f9dde7d9778877f099 | {
"head_commit": "656e718201c33d41072aa962334d83a99faf3832",
"head_commit_message": "Merge branch 'master' into nw/processes",
"patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex f25ad70e600..3c8bb88357a 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -7,6 +7,7 @@ and this project adheres to [S... | [
{
"diff_hunk": "@@ -288,7 +288,7 @@ def dialects(**kwargs):\n )\n @click.option(\n \"-p\",\n- \"--parallel\",\n+ \"--processes\",\n type=int,\n default=1,\n help=\"If set to a value higher than 1, run SQLFluff in parallel, \"",
"line": null,
"original_line": 294,
"original_star... | 81d8e46a34187470d1c05ee8fac7f489cd0b5069 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 1d9d4c9e69c..ded0327fd85 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -13,20 +13,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
ANSI dialect which defaults to the semicolon, but allows it to be more intuitive
when overriden ... | {
"difficulty": "low",
"estimated_review_effort": 2,
"problem_domain": "New Feature Additions"
} |
sqlfluff__sqlfluff-1141@78e2de8 | sqlfluff/sqlfluff | Python | 1,141 | Add mysql dialect support for DECLARE and IF | Also, added support for `DEFINER` to resolve [#1131](https://github.com/sqlfluff/sqlfluff/issues/1131) | 2021-06-07T10:51:50Z | Add support for `DEFINER`
Within the mysql dialect there is a keyword for `DEFINER` that exists for `CREATE PROCEDURE`/`CREATE FUNCTION` but is not currently supported. This would be good to add so that the mysql dialect is more completely supported.
Add mysql dialect support for `DECLARE` and `IF`
Add support for ... | [
{
"body": "Within the mysql dialect there is a keyword for `DEFINER` that exists for `CREATE PROCEDURE`/`CREATE FUNCTION` but is not currently supported. This would be good to add so that the mysql dialect is more completely supported.\r\n",
"number": 1131,
"title": "Add support for `DEFINER`"
},
{... | 879fd6faad6b2d73e828b9136711bb847077817f | {
"head_commit": "78e2de8b3b9f1a3620df87ab830e69023399c264",
"head_commit_message": "Merge branch 'AddDefinerSyntax' of https://github.com/silverbullettruck/sqlfluff",
"patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex 18787440ae5..fdb5040ae54 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -1... | [
{
"diff_hunk": "@@ -129,21 +136,129 @@ class CreateTableStatementSegment(\n ),\n Ref(\"DatatypeSegment\"),\n ),\n+ LocalVariableNameSegment=RegexParser(\n+ r\"`?[a-zA-Z0-9_]*`?\",\n+ CodeSegment,\n+ name=\"declared_variable\",\n+ type=\"variable\",\n+ ),\n+ ... | 946dd7f5cd3b36b39c00c0d19510d1e449ba8b5f | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9ff324f50b8..29e589a9541 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,14 +6,24 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleas... | {
"difficulty": "high",
"estimated_review_effort": 4,
"problem_domain": "New Feature Additions"
} | |
sqlfluff__sqlfluff-1115@b364df4 | sqlfluff/sqlfluff | Python | 1,115 | Issue 1079: L026 and BigQuery record fields | Resolves #1079 | 2021-05-30T19:06:50Z | L026 and BigQuery record fields
## Expected Behaviour
The linter only recognises tables from the before the first`.` in the column name when using the bigquery dialect.
## Observed Behaviour
The linter sees names in nested fields which are separated by dots as table names which are not referenced in the query.... | [
{
"body": "## Expected Behaviour\r\n\r\nThe linter only recognises tables from the before the first`.` in the column name when using the bigquery dialect.\r\n\r\n## Observed Behaviour\r\n\r\nThe linter sees names in nested fields which are separated by dots as table names which are not referenced in the query. ... | fde7b4c6a5755f8da6290e594fa3e122ddc1f0ae | {
"head_commit": "b364df46ce5fed515766f1cd32d7ee4a3e4609c0",
"head_commit_message": "PR review, run Black on L026.py",
"patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex bce968f93ba..8a4ce4d8a37 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -19,12 +19,14 @@ Contributors:\n - Fix bug [#1037](... | [
{
"diff_hunk": "@@ -417,8 +417,33 @@ class LiteralCoercionSegment(BaseSegment):\n )\n \n \n+@bigquery_dialect.segment(replace=True)\n+class ObjectReferenceSegment(ansi_dialect.get_segment(\"ObjectReferenceSegment\")): # type: ignore\n+ \"\"\"A reference to an object.\"\"\"\n+\n+ pass\n+\n+\n+@bigquer... | 2e4bda0ebfb43a23fc427969b55bdd2f0266d7f1 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index f25ad70e600..65561497944 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -12,6 +12,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Respect XDG base dirs on Mac OS ([#889](https://github.com/sqlfluff/sqlfluff/issues/889)).
- Fix bug... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "Bug Fixes"
} | |
sqlfluff__sqlfluff-1106@10bdbac | sqlfluff/sqlfluff | Python | 1,106 | Draft: Resolve parallel dbt templating issue | This PR has a couple of things to still shake out. Namely that one test is failing for a reason I don't understand, and it looks like the CLI output is treading on toes when running in parallel. Those issues aside, I think it's ready for a review, at least from an architecture standpoint.
This resolves #1088 .
I'... | 2021-05-26T21:10:14Z | Dbt templater re-runs compile for each file while running parallel
While debugging slow running using the new `--parallel` feature, I've found that the dbt templater is running the compile step again for each file.
I *think* this is because each file uses it's own `Linter` object and so doesn't utilise the cached me... | That sounds like a good plan. I like the design of using static methods in the worker processes because it limits the number of object instances being passed to the workers. With `multiprocessing.Pool`, I've seen things get pretty confusing if you call normal instance methods from the workers, because Python serializes... | [
{
"body": "While debugging slow running using the new `--parallel` feature, I've found that the dbt templater is running the compile step again for each file.\r\n\r\nI *think* this is because each file uses it's own `Linter` object and so doesn't utilise the cached methods on the dbt templater.\r\n\r\nThe solut... | 98990e93e306b87be3ee38622c62018b5e1e8ed2 | {
"head_commit": "10bdbacbd3679b29c3786fdef15def94d4354e9c",
"head_commit_message": "Fix filename passing",
"patch_to_review": "diff --git a/src/sqlfluff/core/linter/common.py b/src/sqlfluff/core/linter/common.py\nindex 03ed5428a3a..1ad7506f466 100644\n--- a/src/sqlfluff/core/linter/common.py\n+++ b/src/sqlfluff/... | [
{
"diff_hunk": "@@ -28,6 +29,19 @@ class NoQaDirective(NamedTuple):\n action: Optional[str] # \"enable\", \"disable\", or \"None\"\r\n \r\n \r\n+class RenderedFile(NamedTuple):\r\n+ \"\"\"An object to store the result of a templated file/string.\r\n+\r\n+ This is notable as it's the intermediate stat... | 54da5d0ed6a9ef5151cbce7caca78aa498e52176 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 3fd4aa41b1e..59afca64b4c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -17,6 +17,8 @@ Contributors:
- Fix bug [#1037](https://github.com/sqlfluff/sqlfluff/issues/1037), in which fix
logging had been sent to stdout when reading data from stdin.
- Add a little bit of... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "Code Refactoring / Architectural Improvement"
} |
saltstack__salt-58389@2a0641a | saltstack/salt | Python | 58,389 | Do not allow python2 to be added to salt-ssh tar by default | ### What does this PR do?
After dropping python 2 support from Salt we should not be adding python 2 modules to the salt-ssh binary by default. This PR addresses this by removing the code that automatically looked for python 2 modules and added them to the tar. This also ensures that `ssh_ext_alternatives` can still w... | 2020-09-05T02:27:21Z | [BUG] 06.11.2020 -- salt-ssh -- salt doesn't properly recognize appropriate python versions
**Description**
I have a Centos 7 master and an Centos 7 client. salt-ssh exits with the following error:
```
ERROR: Python version error. Recommendation(s) follow:
- Install Python 2.6/2.7 Salt dependencies on the Salt ... | Reading back, I just realized it references dependencies specifically for python2.6/2.7... so I installed those on the master just to be certain with:
```
yum install python2-libs python2-pip python2-setuptools python2-pyyaml python2-crypto python2-idna python2-jinja2 m2crypto python2-msgpack python2-psutil python2... | [
{
"body": "**Description**\r\n\r\nI have a Centos 7 master and an Centos 7 client. salt-ssh exits with the following error:\r\n\r\n```\r\nERROR: Python version error. Recommendation(s) follow:\r\n- Install Python 2.6/2.7 Salt dependencies on the Salt SSH \r\n master to interact with Python 2.6/2.7 targets\r\n-... | 1f69acd836d25374f3daf5843b4fe3b00e0667ca | {
"head_commit": "2a0641a1d2bd238ca9d6363f16c08e87e0b719b0",
"head_commit_message": "fix pytest ssh tests",
"patch_to_review": "diff --git a/changelog/57647.fixed b/changelog/57647.fixed\nnew file mode 100644\nindex 000000000000..f5d84cfa575e\n--- /dev/null\n+++ b/changelog/57647.fixed\n@@ -0,0 +1 @@\n+Do not all... | [
{
"diff_hunk": "@@ -381,7 +389,7 @@ def _get_supported_py_config(tops, extended_cfg):\n for the supported Python interpreter versions. This is then written into the thin.tgz\n archive and then verified by salt.client.ssh.ssh_py_shim.get_executable()\n \n- Note: Minimum default of 2.x versions is 2.7 ... | 68d519e6c0b15ef65531e804ac52277077b35258 | diff --git a/changelog/57647.fixed b/changelog/57647.fixed
new file mode 100644
index 000000000000..f5d84cfa575e
--- /dev/null
+++ b/changelog/57647.fixed
@@ -0,0 +1 @@
+Do not allow python2 to be added to salt-ssh tar since Salt deprecated Python 2.
diff --git a/doc/topics/ssh/index.rst b/doc/topics/ssh/index.rst
inde... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
scikit-learn__scikit-learn-18328@e4aabb5 | scikit-learn/scikit-learn | Python | 18,328 | FIX Ignore zero sample weights in precision recall curve | Fix #16065.
Supersede and close #16319. | 2020-09-02T17:15:03Z | [Feature Request/Improvement] Dealing with weight=0 in precision_recall_curve
It seems that when **sample_weight** is specified in **precision_recall_curve** function, all the scores in y_score will be reserved in the output thresholds, even though the corresponding weight of the score is zero.
```python
from sklea... | Maybe it's because the threshold of the input, they are very different because the first prediction value appears 2, which lead to 2 in threshold1`thresholds1 [0 1 2]`.
> Maybe it's because the threshold of the input, they are very different because the first prediction value appears 2, which lead to 2 in threshold1`th... | [
{
"body": "It seems that when **sample_weight** is specified in **precision_recall_curve** function, all the scores in y_score will be reserved in the output thresholds, even though the corresponding weight of the score is zero.\r\n\r\n```python\r\nfrom sklearn.metrics import precision_recall_curve \r\ny_true1... | 141123270a39c52a60e98017ca52795215dc2ce1 | {
"head_commit": "e4aabb5e0d11641a4a95a9820c922aa8f0c956c0",
"head_commit_message": "Add whatsnew",
"patch_to_review": "diff --git a/doc/whats_new/v0.24.rst b/doc/whats_new/v0.24.rst\nindex c3f3f993a2f57..72520c9b2a597 100644\n--- a/doc/whats_new/v0.24.rst\n+++ b/doc/whats_new/v0.24.rst\n@@ -379,6 +379,12 @@ Chan... | [
{
"diff_hunk": "@@ -742,7 +751,7 @@ def _binary_clf_curve(y_true, y_score, pos_label=None, sample_weight=None):\n \n \n @_deprecate_positional_args\n-def precision_recall_curve(y_true, probas_pred, *, pos_label=None,\n+def precision_recall_curve(y_true, y_score, *, pos_label=None,",
"line": null,
"origi... | b3075a442cf7b229ddad797fb0a3084811902408 | diff --git a/doc/whats_new/v1.0.rst b/doc/whats_new/v1.0.rst
index 4ccb4dd14b6a4..ce683958d913f 100644
--- a/doc/whats_new/v1.0.rst
+++ b/doc/whats_new/v1.0.rst
@@ -241,6 +241,12 @@ Changelog
are integral.
:pr:`9843` by :user:`Jon Crall <Erotemic>`.
+- |Fix| Samples with zero `sample_weight` values do not affec... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "New Feature Additions"
} |
sktime__sktime-4053@b6d9494 | sktime/sktime | Python | 4,053 | [ENH][BUG] clean up `Detrender` and implement correct multivariate behaviour | This PR improves the `Detrender`:
* it fixes https://github.com/sktime/sktime/issues/4051 and also simplifies the logic in the `Detrender`. As the `BaseForecasting` interface supports loop over hierarchy instances and variables natively, all the case distinctions internally can go, and with it goes the incorrect multi... | 2023-01-03T17:31:30Z | [BUG] incorrect multivariate detrending in `Detrender`
Currently, the `Detrender` transformer implements multivariate detrending incorrectly, and in contrast to what its docstring says.
The difference between "should" and "is" happens if the forecaster passed is genuinely multivariate - in that case, the `Detrender`... | [
{
"body": "Currently, the `Detrender` transformer implements multivariate detrending incorrectly, and in contrast to what its docstring says.\r\n\r\nThe difference between \"should\" and \"is\" happens if the forecaster passed is genuinely multivariate - in that case, the `Detrender` coerces it to univariate, a... | f416ee3fc5cbd6d4f64e543546052d920dcd94cf | {
"head_commit": "b6d949484abaeece770722dd7d10489b56ec1d7d",
"head_commit_message": "update test",
"patch_to_review": "diff --git a/sktime/transformations/series/detrend/_detrend.py b/sktime/transformations/series/detrend/_detrend.py\nindex 1fd3f2fbcb0..3179f687d23 100644\n--- a/sktime/transformations/series/detr... | [
{
"diff_hunk": "@@ -197,36 +183,15 @@ def _inverse_transform(self, X, y=None):\n Xt : pd.Series or pd.DataFrame, same type as X\n inverse transformed version of X\n \"\"\"\n- fh = ForecastingHorizon(X.index, is_relative=False)\n-\n- # univariate: X is pd.Series\n- ... | 65363e0e2b557be4db6d76ab3c90a6d60c565dc6 | diff --git a/sktime/transformations/series/detrend/_detrend.py b/sktime/transformations/series/detrend/_detrend.py
index 1fd3f2fbcb0..c362a69b6eb 100644
--- a/sktime/transformations/series/detrend/_detrend.py
+++ b/sktime/transformations/series/detrend/_detrend.py
@@ -4,10 +4,11 @@
"""Implements transformations to det... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "Bug Fixes"
} | |
saltstack__salt-57668@af05144 | saltstack/salt | Python | 57,668 | handle config load error when cache is not available for first time | ### What does this PR do?
When cache is not present, while copy we used cp_get_template, this return folder name and not the file path. Hence we got this error
```
[ERROR ] {'out': False, 'message': 'Could not load configuration due to : "[Errno 21] Is a directory: \'/tmp/tmpgcohosan\'"', 'format': 'set'}
```
... | 2020-06-14T06:12:55Z | [BUG] [RC1 Sodium] Could not load configuration due to : "[Errno 21] Is a directory.."
**Description**
When cache is not present, while copy we used cp_get_template, this return folder name and not the file path. Hence we got this error
```
[ERROR ] {'out': False, 'message': 'Could not load configuration due to : ... | [
{
"body": "**Description**\r\nWhen cache is not present, while copy we used cp_get_template, this return folder name and not the file path. Hence we got this error\r\n```\r\n[ERROR ] {'out': False, 'message': 'Could not load configuration due to : \"[Errno 21] Is a directory: \\'/tmp/tmpgcohosan\\'\"', 'forma... | b95213ec903402f25c1e0aeb3990fe8452ab63ce | {
"head_commit": "af051441aa70f8caa234e51bf423a71c8d66be8b",
"head_commit_message": "add unit test for bug fix",
"patch_to_review": "diff --git a/salt/modules/junos.py b/salt/modules/junos.py\nindex 5efaf71e6f94..39f5cfda0086 100644\n--- a/salt/modules/junos.py\n+++ b/salt/modules/junos.py\n@@ -131,8 +131,9 @@ de... | [
{
"diff_hunk": "@@ -131,8 +131,9 @@ def __enter__(self):\n \"Caching file {0} at {1}\".format(self._file_path, self._cached_folder)\n )\n if self._kwargs:\n- self._cached_file = __salt__[\"cp.get_template\"](\n- self._file_path, self._cac... | 5c4995db80b268c6c32a178ce53c280bf707edb8 | diff --git a/salt/modules/junos.py b/salt/modules/junos.py
index 5efaf71e6f94..e4291a51be3d 100644
--- a/salt/modules/junos.py
+++ b/salt/modules/junos.py
@@ -126,22 +126,25 @@ def __enter__(self):
else:
return local_cache_path
# continue for else part
- ... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} | |
saltstack__salt-57743@6e744c8 | saltstack/salt | Python | 57,743 | Fix to exsi grains | ### What does this PR do?
Moving import salt.modules.vsphere into virtual so we have access to test proxytype in opts. Gating the check with salt.utils.proxy.is_proxytype. Adding tests.
### What issues does this PR fix or reference?
Fixes: #57811
### Merge requirements satisfied?
**[NOTICE] Bug fixes or feat... | 2020-06-22T00:53:58Z | [BUG] Traceback on any Proxy Minion startup due to ESXI Grain module missing __opts__
**Description**
Start any Proxy Minion with 3001, and see the following error multiple times:
```
[ERROR ] Failed to import grains esxi, this is due most likely to a syntax error:
Traceback (most recent call last):
File "... | [
{
"body": "**Description**\r\n\r\nStart any Proxy Minion with 3001, and see the following error multiple times:\r\n\r\n```\r\n[ERROR ] Failed to import grains esxi, this is due most likely to a syntax error:\r\nTraceback (most recent call last):\r\n File \"/usr/local/lib/python3.6/site-packages/salt/loader.p... | b95213ec903402f25c1e0aeb3990fe8452ab63ce | {
"head_commit": "6e744c80ada88962d71f9634496837ce8791a4b2",
"head_commit_message": "Adding changelog file.",
"patch_to_review": "diff --git a/changelog/57743.fixed b/changelog/57743.fixed\nnew file mode 100644\nindex 000000000000..80266bc89db6\n--- /dev/null\n+++ b/changelog/57743.fixed\n@@ -0,0 +1,4 @@\n+Moving... | [
{
"diff_hunk": "@@ -104,7 +106,7 @@ def _grains():\n port=port,\n )\n GRAINS_CACHE.update(ret)\n- except KeyError:\n+ except KeyError as e:",
"line": null,
"original_line": 109,
"original_start_line": null,
"path": "salt/grains/esxi.py",
"start_l... | 46380f5b268e8747699919676c115db4e2fca821 | diff --git a/changelog/57743.fixed b/changelog/57743.fixed
new file mode 100644
index 000000000000..2f113cc0bff1
--- /dev/null
+++ b/changelog/57743.fixed
@@ -0,0 +1,4 @@
+Moving import salt.modules.vsphere into `__virtual__` so we have access to test proxytype in opts,
+previously this was causing a traceback when run... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} | |
saltstack__salt-57976@5f25190 | saltstack/salt | Python | 57,976 | Fix build scripts for OSX | # What does this PR do?
There are discrepancies in the output of pip-compile between versions of OSX. This adds all the discrepancies to the `req_pyobjc.in` file so they are present across all versions.
Also added `MACOS_DEPLOYMENT_TARGET=10.13` to the `build_env.sh` script so that python is built with the minimum ... | 2020-07-17T17:25:09Z | [BUG] Minion will not start on 3001.1 on mac 10.13.
**Description**
Trying to install 3001.1 on 10.13 (high sierra) it fails with this error when trying to start the minion:
```
Traceback (most recent call last):
File "/opt/salt/bin/salt-minion", line 6, in <module>
from pkg_resources import load_entry_point... | [
{
"body": "**Description**\r\nTrying to install 3001.1 on 10.13 (high sierra) it fails with this error when trying to start the minion:\r\n```\r\nTraceback (most recent call last):\r\n File \"/opt/salt/bin/salt-minion\", line 6, in <module>\r\n from pkg_resources import load_entry_point\r\n File \"/opt/sal... | 45efc4c1423f6ad233552cb7efbc9c5ff9f73a3b | {
"head_commit": "5f25190cc0204e58c2483a3eab73afe88e77101d",
"head_commit_message": "Fix build scripts for OSX\n\nThere are discrepancies between versions of OSX when you run\npip-compile. Added all the discrepancies to the req_pyobjc.in file\nAlso added `MACOS_DEPLOYMENT_TARGET=10.13` to the `build_env.sh` script\... | [
{
"diff_hunk": "@@ -29,29 +29,28 @@ pyobjc-framework-coreaudio==6.2.2 # via pyobjc, pyobjc-framework-coreaudiokit\n pyobjc-framework-coreaudiokit==6.2.2 # via pyobjc\n pyobjc-framework-corebluetooth==6.2.2 # via pyobjc\n pyobjc-framework-coredata==6.2.2 # via pyobjc, pyobjc-framework-cloudkit, pyobjc-framew... | ab1fadc90689f7448a20dc19d17ced02f7beb972 | diff --git a/pkg/osx/build_env.sh b/pkg/osx/build_env.sh
index 9db2b31efd40..ff65edaf1346 100755
--- a/pkg/osx/build_env.sh
+++ b/pkg/osx/build_env.sh
@@ -50,6 +50,9 @@ quit_on_error() {
############################################################################
echo -n -e "\033]0;Build_Env: Variables\007"
+MACOSX... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} | |
saltstack__salt-57613@55b1c9f | saltstack/salt | Python | 57,613 | Disk grains should not show virtual devices fix issue 57612 | ### What does this PR do?
Changes the disks.py to populate "disks" and "SSDs" only with real devices, skipping virtual devices like devmaps, loopback and RAM disks.
### What issues does this PR fix or reference?
Fixes: #57612
### Previous Behavior
In a machine with only one disk the grains shows:
```
# sa... | 2020-06-10T02:16:06Z | [BUG] Disk grains reports virtual block devices as "disks" or "SSDs"
**Description**
Virtual block devices, like loopbacks, ram disks and device-mappers were show as real devices.
The loopback and device-mapper devices are in the "disks" grain:
```
# salt-call grains.get disks
local:
- loop1
- dm-1
... | @piterpunk Thank you for reporting this issue and for the PR.
Thanks.
Thank you @piterpunk I have labeled this for the point release to Sodium, since our PR process is lengthy this seems more likely to pass PR testing and be merged for the following release and where we have the severity set to Medium this also seem... | [
{
"body": "**Description**\r\nVirtual block devices, like loopbacks, ram disks and device-mappers were show as real devices.\r\n\r\nThe loopback and device-mapper devices are in the \"disks\" grain:\r\n\r\n```\r\n# salt-call grains.get disks\r\nlocal:\r\n - loop1\r\n - dm-1\r\n - loop6\r\n - dm-6\r\... | b95213ec903402f25c1e0aeb3990fe8452ab63ce | {
"head_commit": "55b1c9fec102bab3efa2f7baf2f22299c45ff30f",
"head_commit_message": "Added unit tests for disks._linux_disks\n\n- Changed the classname to DisksGrainsTestCase. Previously it was\n IscsiGrainsTestCase, but no code related to iscsi is here.\n- Added the test__linux_disks to test disks._linux_disks. T... | [
{
"diff_hunk": "@@ -83,3 +83,43 @@ def test__windows_disks_retcode(self):\n result = disks._windows_disks()\n expected = {\"SSDs\": [], \"disks\": []}\n self.assertDictEqual(result, expected)\n+\n+ def test__linux_disks(self):\n+ \"\"\"\n+ Test grains._linux_... | f80ca1b1b083bb4143cb510c71ef705297f72ee2 | diff --git a/changelog/57612.changed b/changelog/57612.changed
new file mode 100644
index 000000000000..d4409b2a9c27
--- /dev/null
+++ b/changelog/57612.changed
@@ -0,0 +1,2 @@
+Changes the 'SSDs' grain name to 'ssds' as all grains needs to be
+resolved in lowered case.
diff --git a/changelog/57612.fixed b/changelog/5... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
saltstack__salt-58352@97d4ed9 | saltstack/salt | Python | 58,352 | Fix UnboundLocalError when address cannot be resolved in win_network.connect | ### What does this PR do?
`win_network.connect` could in certain cases end with `UnboundLocalError` because the variable used in except wasn't initialised yet, this fixes it
### What issues does this PR fix or reference?
Fixes: #53371
### Previous Behavior
```
The minion function caused an exception: Tracebac... | 2020-09-01T11:31:57Z | win_network network.connect gives error on failure
### Description of Issue
When running `salt 'Testmachine' network.connect 'badmachine' port=445` where badmachine is unreachable produces the following error:
```
The minion function caused an exception: Traceback (most recent call last):
File "c:\salt\bi... | This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue.
Thank you for updating this issue. It is no long... | [
{
"body": "### Description of Issue\r\nWhen running `salt 'Testmachine' network.connect 'badmachine' port=445` where badmachine is unreachable produces the following error:\r\n\r\n```\r\nThe minion function caused an exception: Traceback (most recent call last):\r\n File \"c:\\salt\\bin\\lib\\site-packag... | 713981bb8da709f0b89a6cd2fda1dc55fa989d94 | {
"head_commit": "97d4ed9836916f9e8192e7ac346b464a2db26900",
"head_commit_message": "Merge branch 'master' into fix-win-network-connect-err",
"patch_to_review": "diff --git a/changelog/53371.fixed b/changelog/53371.fixed\nnew file mode 100644\nindex 000000000000..fd515bd2353d\n--- /dev/null\n+++ b/changelog/53371... | [
{
"diff_hunk": "@@ -312,3 +311,20 @@ def test_get_route(self):\n \"source\": \"10.0.0.15\",\n },\n )\n+\n+ def test_connect_53371(self):\n+ \"\"\"\n+ Test that UnboundLocalError is not thrown on socket.gaierror\n+ as reported in #53371\n+ ... | d2ff06ac7e37e213707c927f87e5a6bdb9acff6b | diff --git a/changelog/53371.fixed b/changelog/53371.fixed
new file mode 100644
index 000000000000..fd515bd2353d
--- /dev/null
+++ b/changelog/53371.fixed
@@ -0,0 +1 @@
+Fixed UnboundLocalError when using win_network.connect
diff --git a/salt/modules/win_network.py b/salt/modules/win_network.py
index 7bfaeb80ae37..b82b... | {
"difficulty": "low",
"estimated_review_effort": 2,
"problem_domain": "Bug Fixes"
} |
sqlfluff__sqlfluff-1064@347ad5a | sqlfluff/sqlfluff | Python | 1,064 | Bracket Matching Refactor | Another biggie. Resolves #1046, relates to #962.
This took the linting time of out large dbt project from 16:37 to 7:30. That's over 50% so I'm pretty pleased.
The bottom line of what I've done is make bracketed elements their own segment and then made sure that in most cases, even where matching isn't successful... | 2021-05-17T11:02:48Z | Performance: Bracket Matching
sqlfluff 0.5.3
When parsing and linting very long files (10k chars+), in particular one that I'm working with that has many many brackets, an unreasonable amount of time is spent in the bracket matching routines. In particular, within the `_bracket_sensitive_look_ahead_match` of `Delimi... | [
{
"body": "sqlfluff 0.5.3\r\n\r\nWhen parsing and linting very long files (10k chars+), in particular one that I'm working with that has many many brackets, an unreasonable amount of time is spent in the bracket matching routines. In particular, within the `_bracket_sensitive_look_ahead_match` of `Delimited` gr... | bedf8018d8b21ae906f49e265d111b322bb6ef7d | {
"head_commit": "347ad5afecd0cf9a6ce9a4ee0cd55285b128b180",
"head_commit_message": "Revert \"py project\"\n\nThis reverts commit 78b5bdce07c1eb252975fdc1c7bc556fab19cef7.",
"patch_to_review": "diff --git a/src/sqlfluff/cli/formatters.py b/src/sqlfluff/cli/formatters.py\nindex 666e26d60b8..8a30653508d 100644\n---... | [
{
"diff_hunk": "@@ -604,16 +641,26 @@ def _bracket_sensitive_look_ahead_match(\n v_level=3,\n got=matcher,\n )\n- return ((), MatchResult.from_unmatched(segments), None)\n+ ... | 6d5c13c85460589c963dfe6f2e6f137fe4a25b1a | diff --git a/src/sqlfluff/cli/formatters.py b/src/sqlfluff/cli/formatters.py
index 666e26d60b8..8a30653508d 100644
--- a/src/sqlfluff/cli/formatters.py
+++ b/src/sqlfluff/cli/formatters.py
@@ -8,6 +8,7 @@
cli_table,
get_package_version,
get_python_version,
+ get_python_implementation,
pad_line,
... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "Performance Optimizations"
} | |
scikit-learn__scikit-learn-17992@ef2c4ee | scikit-learn/scikit-learn | Python | 17,992 | FIX Raise proper error for sparse dataframe with mixed dtypes | Fixes #17945.
Currently, function check_array() in validation.py throws a confusing exception while validating:
1. A sparse DataFrame with mixed numeric types
2. A sparse DataFrame with object types.
The error happens because for this cases the DataFrame creates a coo_matrix with dtype('object'), and when
trying t... | 2020-07-25T22:50:21Z | TruncatedSVD fails on DataFrame with mixture of Sparse columns int and float
#### Describe the bug
TruncatedSVD doesn't work on a DataFrame that has both Sparse[float64] and Sparse[int32] columns
Whereas it is working if the DataFrame has only Sparse[float64] and also if it has only Sparse[int32]
#### Steps/Code t... | Hi @LionelMassoulard. I would like to try and resolve this bug. Is it ok or are you already working on it?
Hi, no it's okay, I took a look and I think I isolated the issue to "check_array" but I didn't work on it any further.
The issues stems from `df.sparse.to_coo()` with mixed pandas sparse extension array results in... | [
{
"body": "#### Describe the bug\r\nTruncatedSVD doesn't work on a DataFrame that has both Sparse[float64] and Sparse[int32] columns\r\nWhereas it is working if the DataFrame has only Sparse[float64] and also if it has only Sparse[int32]\r\n\r\n#### Steps/Code to Reproduce\r\n\r\n```from sklearn.decomposition i... | 61ec6b9b79b0d04a7d891eb9f403e0b5278fc77f | {
"head_commit": "ef2c4eea6dfc9b0df07e5036815afe839ec657a5",
"head_commit_message": "test that invalid behaviour is fixed starting from pandas 1.1.0 (#17945)",
"patch_to_review": "diff --git a/doc/whats_new/v0.24.rst b/doc/whats_new/v0.24.rst\nindex aaf86a2f0576d..a72cca8517b51 100644\n--- a/doc/whats_new/v0.24.... | [
{
"diff_hunk": "@@ -1213,3 +1214,60 @@ def test_check_sparse_pandas_sp_format(sp_format):\n assert sp.issparse(result)\n assert result.format == sp_format\n assert_allclose_dense_sparse(sp_mat, result)\n+\n+\n+@pytest.mark.parametrize('ntype1, ntype2', [\n+ (\"longdouble\", \"float16\"),\n+ (\... | f60e8e27aa3e0b42ea83b91392212c3f24952315 | diff --git a/doc/whats_new/v0.24.rst b/doc/whats_new/v0.24.rst
index c5bd374f4c691..71b225d2100f5 100644
--- a/doc/whats_new/v0.24.rst
+++ b/doc/whats_new/v0.24.rst
@@ -461,6 +461,14 @@ Changelog
:meth:`tree.DecisionTreeRegressor.fit`, and has not effect.
:pr:`17614` by :user:`Juan Carlos Alfaro Jiménez <alfaro96... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
scikit-learn__scikit-learn-17987@6977ba7 | scikit-learn/scikit-learn | Python | 17,987 | EHN make some meta-estimators lenient towards missing values | <!--
Thanks for contributing a pull request! Please ensure you have taken a look at
the contribution guidelines: https://github.com/scikit-learn/scikit-learn/blob/master/CONTRIBUTING.md#pull-request-checklist
-->
#### Reference Issues/PRs: Fixes: #15319
<!--
Example: Fixes #1234. See also #3456.
Please use key... | 2020-07-25T14:13:26Z | Make sure meta-estimators are lenient towards missing data
This item is in our roadmap, and I don't totally understand it. Trying to kinda track the progress of those items, I'm creating this issue. Not sure who wrote it. @amueller maybe you could elaborate? (feel free to edit the description of the issue). | I think that we developed some meta-estimators which would call `check_X_y` and not allowing missing-values. However, this check can be done by the underlying estimator instead.
Let's give an example: If `BaggingClassifier` with an `HistGradientBoostingClassifier` as a base estimator. The gradient boosting will nati... | [
{
"body": "This item is in our roadmap, and I don't totally understand it. Trying to kinda track the progress of those items, I'm creating this issue. Not sure who wrote it. @amueller maybe you could elaborate? (feel free to edit the description of the issue).",
"number": 15319,
"title": "Make sure meta... | 0111511ea38a97503091ce34a3bb3621eedb8fcf | {
"head_commit": "6977ba74c65121ca0f0949493992b4d24e99da54",
"head_commit_message": "Update sklearn/ensemble/tests/test_common.py\n\nCo-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>",
"patch_to_review": "diff --git a/doc/whats_new/v0.24.rst b/doc/whats_new/v0.24.rst\nindex 2682902a20983..5f8e6455d0300 ... | [
{
"diff_hunk": "@@ -302,6 +302,22 @@ Changelog\n validity of the input is now delegated to the base estimator.\n :pr:`17233` by :user:`Zolisa Bleki <zoj613>`.\n \n+- |Enhancement| :class:`multiclass.OneVsOneClassifier` now accpets\n+ the inputs with missing values. Hence, estimators which can handle\n+ mi... | 04ee366be1793e4033f2639bbcf5c0523dd109ac | diff --git a/doc/whats_new/v0.24.rst b/doc/whats_new/v0.24.rst
index b61d71bfabe43..c6ef6e5994cdf 100644
--- a/doc/whats_new/v0.24.rst
+++ b/doc/whats_new/v0.24.rst
@@ -361,6 +361,12 @@ Changelog
validity of the input is now delegated to the base estimator.
:pr:`17233` by :user:`Zolisa Bleki <zoj613>`.
+- |Enha... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "New Feature Additions"
} |
saltstack__salt-57521@1f20a1a | saltstack/salt | Python | 57,521 | [master] fix to version.py | ### What does this PR do?
Fix to show the correct system version when running test.versions on OS X Mojave. Added tests.
### What issues does this PR fix or reference?
Fixes: #57467
### Merge requirements satisfied?
**[NOTICE] Bug fixes or features added to Salt require tests.**
<!-- Please review the [test... | 2020-06-02T17:32:42Z | [BUG] [RC1 Sodium] Mac report wrong system version in 3001 RC
**Description**
Running `test.versions` reports `version: Darwin 18.2.0 ` should be `version: 10.14.3 x86_64`
This is on a 10.14 (Mojave) machine but see the same on 10.13 (High sierra) also.
```
System Versions:
dist: darwin 18.2.0... | [
{
"body": "**Description**\r\nRunning `test.versions` reports `version: Darwin 18.2.0 ` should be `version: 10.14.3 x86_64`\r\nThis is on a 10.14 (Mojave) machine but see the same on 10.13 (High sierra) also.\r\n\r\n```\r\n System Versions:\r\n dist: darwin 18.2.0 \r\n locale: UTF-8... | 310405df2c2a0dafa07b39eb54178d0031ed12ee | {
"head_commit": "1f20a1a5d0ae1648486480fc09dab98b613778f8",
"head_commit_message": "Fix to show the correct system version when running test.verions on OS X Mojave. Added tests.",
"patch_to_review": "diff --git a/salt/version.py b/salt/version.py\nindex 721a1324039a..5b16346e8a4c 100644\n--- a/salt/version.py\n... | [
{
"diff_hunk": "@@ -83,3 +89,35 @@ def test_outputter(self):\n test.outputter\n \"\"\"\n self.assertEqual(self.run_function(\"test.outputter\", [\"text\"]), \"text\")\n+\n+ @slowTest\n+ def test_versions_version(self):\n+ \"\"\"\n+ test.versions\n+ \"\"\"\n+\n+... | 86997a8f482514094084e68cfd33ffd9e9ccb38d | diff --git a/salt/version.py b/salt/version.py
index 721a1324039a..fc20b1d4c16a 100644
--- a/salt/version.py
+++ b/salt/version.py
@@ -678,15 +678,19 @@ def system_version():
mac_ver = platform.mac_ver()
win_ver = platform.win32_ver()
- if lin_ver[0]:
- return " ".join(lin_ver)
- ... | {
"difficulty": "low",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} | |
sktime__sktime-3709@f288e4d | sktime/sktime | Python | 3,709 | [DOC] Document `evaluate` output DataFrame schema | <!--
Thanks for contributing a pull request! Please ensure you have taken a look
at our contribution guide: https://github.com/sktime/sktime/blob/main/CONTRIBUTING.md
-->
#### Reference Issues/PRs
Closes #3698
#### What does this implement/fix? Explain your changes.
Documents all columns in DataFrame of resu... | 2022-11-05T09:12:12Z | [DOC] `pd.DataFrame` output schema of `evaluate` needs to be documented properly in docstring
The docstring of `evaluate` in the `forecasting.model_evaluation` module only tells the user that the return is `pd.DataFrame` without further description of the schema.
Best way to glean the schema is to run the example; a... | [
{
"body": "The docstring of `evaluate` in the `forecasting.model_evaluation` module only tells the user that the return is `pd.DataFrame` without further description of the schema.\r\n\r\nBest way to glean the schema is to run the example; alternatively, the schema is tested by calls to `_check_evaluate_output`... | 9c9215262166219220d067b7504dd7db1a50fa63 | {
"head_commit": "f288e4d028feac6a5a21a4a5262b2a00ef2796b8",
"head_commit_message": "Update return signature docs",
"patch_to_review": "diff --git a/sktime/forecasting/model_evaluation/_functions.py b/sktime/forecasting/model_evaluation/_functions.py\nindex 4bf258207a5..c799d82f9df 100644\n--- a/sktime/forecastin... | [
{
"diff_hunk": "@@ -263,9 +263,18 @@ def evaluate(\n \n Returns\n -------\n- pd.DataFrame\n+ results : pd.DataFrame or dask.dataframe.DataFrame\n DataFrame that contains several columns with information regarding each\n refit/update and prediction of the forecaster.\n+ Retur... | 072ae0eb73605df860b0642581717ef914fe1319 | diff --git a/sktime/forecasting/model_evaluation/_functions.py b/sktime/forecasting/model_evaluation/_functions.py
index 4bf258207a5..37e66fb9db2 100644
--- a/sktime/forecasting/model_evaluation/_functions.py
+++ b/sktime/forecasting/model_evaluation/_functions.py
@@ -263,9 +263,23 @@ def evaluate(
Returns
... | {
"difficulty": "low",
"estimated_review_effort": 1,
"problem_domain": "Documentation Updates"
} | |
scikit-learn__scikit-learn-17959@f65e36c | scikit-learn/scikit-learn | Python | 17,959 | [MRG] Fix KMeans convergence when tol==0 | Fixes #17428
When ``tol==0``, convergence based on the norm of the difference of the centers between 2 iterations can fail due to rounding errors making the norm not exactly 0 (and leave iterations go until max_iter is reached).
This PR implements convergence based on the difference of the labels between 2 iterat... | 2020-07-20T17:36:22Z | locally failing kmeans convergence test (WSL)
```
> pytest -sv sklearn/cluster/tests/test_k_means.py -k test_kmeans_convergence
```
fails for me for both algorithms:
```pythontb
> assert km.n_iter_ < 300
E AssertionError: assert 300 < 300
E + where 300 = KMeans(algorithm='full', n_clusters=5,... | cc @jeremiedbb
Inertia basically stays the same after iteration 50, but there seems to be some floating point issues maybe?
```
Iteration 48, inertia 40826.39061567664
Iteration 49, inertia 40826.37236625354
Iteration 50, inertia 40826.37236625354
Iteration 51, inertia 40826.37236625354
Iteration 52, inertia 4... | [
{
"body": "```\r\n> pytest -sv sklearn/cluster/tests/test_k_means.py -k test_kmeans_convergence\r\n```\r\nfails for me for both algorithms:\r\n```pythontb\r\n> assert km.n_iter_ < 300\r\nE AssertionError: assert 300 < 300\r\nE + where 300 = KMeans(algorithm='full', n_clusters=5, n_init=1, ra... | f642ff79fd2d8bf3c41e54a03ee9aeec502732da | {
"head_commit": "f65e36c9c6f2725776857a5004f4fb829c8ea10c",
"head_commit_message": "address comments",
"patch_to_review": "diff --git a/sklearn/cluster/_kmeans.py b/sklearn/cluster/_kmeans.py\nindex a42a3b309a57d..0fb75f26d9ad1 100644\n--- a/sklearn/cluster/_kmeans.py\n+++ b/sklearn/cluster/_kmeans.py\n@@ -226,8... | [
{
"diff_hunk": "@@ -496,15 +513,25 @@ def _kmeans_single_lloyd(X, sample_weight, centers_init, max_iter=300,\n \n centers, centers_new = centers_new, centers\n \n- center_shift_tot = (center_shift**2).sum()\n- if center_shift_tot <= tol:\n+ if np.array_equal(labels, ... | 7a28c825f6d2b822e842fe89ffef5f699dc35bdb | diff --git a/doc/whats_new/v0.24.rst b/doc/whats_new/v0.24.rst
index 0267b8fd30e1f..12e878f9775ab 100644
--- a/doc/whats_new/v0.24.rst
+++ b/doc/whats_new/v0.24.rst
@@ -91,6 +91,9 @@ Changelog
:pr:`17995` by :user:`Thomaz Santana <Wikilicious>` and
:user:`Amanda Dsouza <amy12xx>`.
+- |Fix| Fixed a bug in :clas... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
sqlfluff__sqlfluff-1039@fbe97ae | sqlfluff/sqlfluff | Python | 1,039 | Read config from pyproject.toml | This PR adds support for `pyproject.toml` as a configuration source.
It would help keeping all configuration for a Python project in a single file, since this file is used by other major Python projects like [black] and [pytest].
Some implementation details:
- Takes precedence over `.sqlfluff`.
- `core` sec... | 2021-05-11T06:41:32Z | Look for project configuration in pyproject.toml.
A growing number of Python tools look for project-specific configuration in the `[tool.{app}]` section of the `pyproject.toml` file. It would be convenient if `sqlfluff` also inspected this section, especially for Python projects that use `poetry` as a build backend and... | @shawnohare this is a great idea. Do you know what the best practice precedence is between `pyproject.toml` and other files like `tox.ini` and `setup.cfg`? I'd love to make sure that SQLFluff is consistent with other tools in how it handles that.
This would also be a great first issue for anyone new to the project if p... | [
{
"body": "A growing number of Python tools look for project-specific configuration in the `[tool.{app}]` section of the `pyproject.toml` file. It would be convenient if `sqlfluff` also inspected this section, especially for Python projects that use `poetry` as a build backend and thus do not rely on `setup.cfg... | 454c2905dd4511851248037730a715ad32440473 | {
"head_commit": "fbe97aecd17910a490b2a703aa511370bd1299f0",
"head_commit_message": "Test pyproject.toml precedence",
"patch_to_review": "diff --git a/docs/source/configuration.rst b/docs/source/configuration.rst\nindex 87a42f1c155..ef150033b8e 100644\n--- a/docs/source/configuration.rst\n+++ b/docs/source/config... | [
{
"diff_hunk": "@@ -144,6 +144,34 @@ def get_global(cls) -> \"ConfigLoader\":\n global_loader = cls()\n return global_loader\n \n+ @staticmethod\n+ def _walk_toml(config: Dict[str, Any], base_key=()):\n+ \"\"\"Recursively walk the nested config inside a TOML file.\"\"\"\n+ ... | d034311a9a0c8be637ee550247d29b15488f2a9d | diff --git a/docs/source/configuration.rst b/docs/source/configuration.rst
index 0d3113860f4..94834fab720 100644
--- a/docs/source/configuration.rst
+++ b/docs/source/configuration.rst
@@ -19,13 +19,43 @@ any vales read from earlier files.
- :code:`tox.ini`
- :code:`pep8.ini`
- :code:`.sqlfluff`
+- :code:`pyproject.... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "New Feature Additions"
} |
scikit-learn__scikit-learn-17911@67725d4 | scikit-learn/scikit-learn | Python | 17,911 | [MRG] sklearn.metrics.normalized_mutual_info_score for continuous data does not return a warning #17892 | <!--
Thanks for contributing a pull request! Please ensure you have taken a look at
the contribution guidelines: https://github.com/scikit-learn/scikit-learn/blob/master/CONTRIBUTING.md#pull-request-checklist
-->
#### Reference Issues/PRs
<!--
Example: Fixes #1234. See also #3456.
Please use keywords (e.g., Fi... | 2020-07-12T19:15:35Z | using sklearn.metrics.normalized_mutual_info_score for continuous data does not return a warning
I have been informed that using sklearn.metrics.normalized_mutual_info_score to estimate a normalized mutual information score on continuous data should have returned at least a warning that this module is for use only on d... | I think the ``check_clustering`` function should call ``type_of_target``. We're doing that in the classification metrics. I think this has come up before, I think there's something in the issue tracker about that already.
I can take this.
I've implemented the change for `check_clustering` to raise an error for a floa... | [
{
"body": "I have been informed that using sklearn.metrics.normalized_mutual_info_score to estimate a normalized mutual information score on continuous data should have returned at least a warning that this module is for use only on discrete data; and error on floats.\r\n\r\nan example of test data:\r\n```\r\nn... | 9763856df466eed736163822f4bc7e1c592b05b5 | {
"head_commit": "67725d48ad7bc18e049c53b9ba74724094f7c9f0",
"head_commit_message": "Implement warning in check clustering",
"patch_to_review": "diff --git a/sklearn/metrics/cluster/_supervised.py b/sklearn/metrics/cluster/_supervised.py\nindex 703cfd86fe72e..565d25b3450dc 100644\n--- a/sklearn/metrics/cluster/_s... | [
{
"diff_hunk": "@@ -348,3 +348,12 @@ def test_fowlkes_mallows_score_properties():\n def test_mutual_info_score_positive_constant_label(labels_true, labels_pred):\n # non-regression test for #16355\n assert mutual_info_score(labels_true, labels_pred) >= 0\n+\n+\n+def test_check_clustering_error():\n+ ... | cc625ea46c2e3f4832b1f3685a217bd9da0abd23 | diff --git a/sklearn/metrics/cluster/_supervised.py b/sklearn/metrics/cluster/_supervised.py
index 703cfd86fe72e..7dcaa456410a0 100644
--- a/sklearn/metrics/cluster/_supervised.py
+++ b/sklearn/metrics/cluster/_supervised.py
@@ -15,6 +15,7 @@
# License: BSD 3 clause
+import warnings
from math import log
import... | {
"difficulty": "low",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
scikit-learn__scikit-learn-17935@c1af49a | scikit-learn/scikit-learn | Python | 17,935 | [MRG] FIX fix hinge_loss when labels are provided and not inferred from y_true | <!--
Thanks for contributing a pull request! Please ensure you have taken a look at
the contribution guidelines: https://github.com/scikit-learn/scikit-learn/blob/master/CONTRIBUTING.md#pull-request-checklist
-->
#### Reference Issues/PRs
<!--
Example: Fixes #1234. See also #3456.
Please use keywords (e.g., Fi... | 2020-07-16T14:34:19Z | Multilabel hinge_loss bug
#### Describe the bug
Multilabel hinge_loss fails if not all labels are present in y_true despite all the labels being explicitly provided using external labels argument (as defined in the function description).
#### Steps/Code to Reproduce
Example:
```python
from sklearn.metrics ... | seems reasonable, would you be kind enough to submit a PR?
Hi @adrinjalali, I just took a quick look at this, I think the easiest fix is to change the creation of `y_true_unique` to `y_true_unique = np.unique(labels or y_true)`. I can open a PR so we can discuss if this ticks the desired boxes. | [
{
"body": "#### Describe the bug\r\n\r\nMultilabel hinge_loss fails if not all labels are present in y_true despite all the labels being explicitly provided using external labels argument (as defined in the function description).\r\n\r\n#### Steps/Code to Reproduce\r\n\r\nExample:\r\n```python\r\n\r\nfrom sklea... | c6579afdc474e75686a1797d1322cfc3d6aaa601 | {
"head_commit": "c1af49abf6276ccfa4c34998f6b0632e31aa1754",
"head_commit_message": "Fix linting issues",
"patch_to_review": "diff --git a/sklearn/metrics/_classification.py b/sklearn/metrics/_classification.py\nindex d48f3e242231f..110bb8677db49 100644\n--- a/sklearn/metrics/_classification.py\n+++ b/sklearn/met... | [
{
"diff_hunk": "@@ -2102,7 +2102,30 @@ def test_hinge_loss_multiclass_with_missing_labels():\n np.clip(dummy_losses, 0, None, out=dummy_losses)\n dummy_hinge_loss = np.mean(dummy_losses)\n assert (hinge_loss(y_true, pred_decision, labels=labels) ==\n- dummy_hinge_loss)\n+ ... | 9301c00a73f1bb1ffacb6ddc37b6a2f1861af352 | diff --git a/doc/whats_new/v0.24.rst b/doc/whats_new/v0.24.rst
index ef3b9ecd2ebd6..c5bd374f4c691 100644
--- a/doc/whats_new/v0.24.rst
+++ b/doc/whats_new/v0.24.rst
@@ -326,6 +326,11 @@ Changelog
:pr:`17826` by :user:`Richard Decal <crypdick>` and
:user:`Joseph Willard <josephwillard>`
+- |Fix| bug in :func:`me... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
saltstack__salt-57281@f1c407a | saltstack/salt | Python | 57,281 | juniper modules/states docstring, parameter name fixes | ### What does this PR do?
Fix https://github.com/Juniper/salt/issues/141 & https://github.com/Juniper/salt/issues/142
### What issues does this PR fix or reference?
Fixes: Minor doc strings and parameter names
### Merge requirements satisfied?
**[NOTICE] Bug fixes or features added to Salt require tests.**
... | 2020-05-14T15:53:55Z | handle localhost session
### Description of Issue
```
[DEBUG ] Subprocess Thread-4-Schedule-__proxy_keepalive added
[DEBUG ] schedule.handle_func: adding this job to the jobcache with data {'id': 'fcr5a_native', 'fun': 'status.proxy_reconnect', 'fun_args': [], 'schedule': '__proxy_keepalive', 'jid': '20200414090... | @vnitinv I am working on the salt binary and from an email thread on the matter:
```
We figured out issue in supporting ioproc connectivity in salt binary and raised ticket in github. This issue is fixed and will send pull request soon.
```
Wondering if you could identify the PR or the fix, as fixing issues with th... | [
{
"body": "### Description of Issue\r\n```\r\n[DEBUG ] Subprocess Thread-4-Schedule-__proxy_keepalive added\r\n[DEBUG ] schedule.handle_func: adding this job to the jobcache with data {'id': 'fcr5a_native', 'fun': 'status.proxy_reconnect', 'fun_args': [], 'schedule': '__proxy_keepalive', 'jid': '20200414090... | c768a315e60408754a2b45403b8dc1e7c6275beb | {
"head_commit": "f1c407a05a8af27d54070821c17235d89a25b7b3",
"head_commit_message": "fix pre-commit failures",
"patch_to_review": "diff --git a/salt/modules/junos.py b/salt/modules/junos.py\nindex f61fbbca1439..c8a380a1b14a 100644\n--- a/salt/modules/junos.py\n+++ b/salt/modules/junos.py\n@@ -17,6 +17,7 @@\n # Im... | [
{
"diff_hunk": "@@ -272,15 +302,15 @@ def shutdown(name, **kwargs):\n \n \n @resultdecorator\n-def install_config(name, **kwargs):\n+def install_config(name, path, **kwargs):",
"line": null,
"original_line": 305,
"original_start_line": null,
"path": "salt/states/junos.py",
"start_line": null... | 2e5443bec60f3f9fac5924d42c42fbdcd1152483 | diff --git a/salt/modules/junos.py b/salt/modules/junos.py
index f61fbbca1439..9ac637da27ea 100644
--- a/salt/modules/junos.py
+++ b/salt/modules/junos.py
@@ -17,6 +17,7 @@
# Import Python libraries
from __future__ import absolute_import, print_function, unicode_literals
+import copy
import glob
import json
impo... | {
"difficulty": "low",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
sktime__sktime-3602@743a63c | sktime/sktime | Python | 3,602 | [BUG] Numba/np.median interaction raises error for large data sets run with n_jobs>1 issue #3582 | #### Reference Issues/PRs
Fixes #3582
#### What does this implement/fix? Explain your changes.
#3582 identified a bug that occurs with DrCIF classifier when n_jobs > 1 and the dataset is large. This originated in the numbaversion of the median function in utils/numba/stats.py. The problem is that when the data... | 2022-10-18T08:35:45Z | [BUG] Numba error when setting n_jobs
**Describe the bug**
<!--
-->
Numba error when setting n_jobs
**To Reproduce**
<!--
-->
How can i upload my dataset? It has to be related to my dataset because it works fine with sktime datasets.
```python
estimators = [("oscillator", DrCIF(n_jobs=6), oscillator_column... | Hi, I don't mind taking a look at this. If you are allowed to share your data (which you indicate towards in your issue) you can send it to me at m.middlehurst@uea.ac.uk, else some data characteristics such as the size would be helpful. How are you loading/formatting the data prior to fitting?
Could it be because the d... | [
{
"body": "**Describe the bug**\r\n<!--\r\n-->\r\nNumba error when setting n_jobs\r\n\r\n**To Reproduce**\r\n<!--\r\n-->\r\nHow can i upload my dataset? It has to be related to my dataset because it works fine with sktime datasets.\r\n\r\n```python\r\nestimators = [(\"oscillator\", DrCIF(n_jobs=6), oscillator_c... | 501fb9f97216eb7c3711ca89f8e157cdea17adf9 | {
"head_commit": "743a63c893392d6c5f7abbf08ac74a4cc09354ea",
"head_commit_message": "update comment in median function",
"patch_to_review": "diff --git a/sktime/utils/numba/stats.py b/sktime/utils/numba/stats.py\nindex 0cab58511c1..6667939a42c 100644\n--- a/sktime/utils/numba/stats.py\n+++ b/sktime/utils/numba/st... | [
{
"diff_hunk": "@@ -11,9 +11,27 @@ def mean(X):\n return np.mean(X)\n \n \n-@njit(fastmath=True, cache=True)\n def median(X):\n- \"\"\"Numba median function for a single time series.\"\"\"\n+ \"\"\"Numba median function for a single time series.\n+\n+ This function clones the data if the array pass... | ccf24f553b31cdea783752aa173b0df1432dc2a3 | diff --git a/sktime/classification/sklearn/_continuous_interval_tree.py b/sktime/classification/sklearn/_continuous_interval_tree.py
index 2af7258366b..cf73bb464f9 100644
--- a/sktime/classification/sklearn/_continuous_interval_tree.py
+++ b/sktime/classification/sklearn/_continuous_interval_tree.py
@@ -18,7 +18,7 @@
... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
sktime__sktime-3689@c058c3c | sktime/sktime | Python | 3,689 | [ENH] permutation pipeline prototype, delegator design | Alternative design to https://github.com/sktime/sktime/pull/3443 which does not add the functionality to the existing pipelines, but makes it extrinsic as a delegator.
More modular design-wise, and more flexible as it can be applied to any heterogeneous ensemble (as long as it is a forecaster). | 2022-11-01T20:25:32Z | [ENH] Tuning order of transformers in pipelines as a hyper-parameter
**Is your feature request related to a problem? Please describe.**
We have currently three sequential pipeline classes `TransformedTragetForecaster`, `ForecastingPipeline` and `TransformerPipeline`. Having several transformers chained raises the ques... | Very interesting idea! This one is not implemented yet 😁
On first sight, I would say, this should *not* be attached to the current pipeline classes, that's attaching "too much responsibility".
Options I can think of:
* descendants with the added functionality
* a `PermutationMultiplexer` or `PipelinePermute... | [
{
"body": "**Is your feature request related to a problem? Please describe.**\r\nWe have currently three sequential pipeline classes `TransformedTragetForecaster`, `ForecastingPipeline` and `TransformerPipeline`. Having several transformers chained raises the question which is the best order (permutation) of th... | a5f824a5fff1c3fc1babd3f34b94c5055ec040b0 | {
"head_commit": "c058c3c16d9942530a5b64e9191aebe64818f8b4",
"head_commit_message": "fix typo in docstring",
"patch_to_review": "diff --git a/sktime/base/_meta.py b/sktime/base/_meta.py\nindex a139f4a6f16..6c69aa1d27e 100644\n--- a/sktime/base/_meta.py\n+++ b/sktime/base/_meta.py\n@@ -17,14 +17,6 @@ class _Hetero... | [
{
"diff_hunk": "@@ -1448,3 +1450,192 @@ def get_test_params(cls, parameter_set=\"default\"):\n params = {\"forecaster_X\": fx, \"forecaster_y\": fy}\n \n return params\n+\n+\n+class Permute(_DelegatedForecaster, _HeterogenousMetaEstimator):\n+ \"\"\"Permutation compositor for permuting pipeli... | 8383c796d6416144e2de0094288cda7046c85adb | diff --git a/docs/source/api_reference/forecasting.rst b/docs/source/api_reference/forecasting.rst
index bf74db216d8..8a334219779 100644
--- a/docs/source/api_reference/forecasting.rst
+++ b/docs/source/api_reference/forecasting.rst
@@ -45,6 +45,7 @@ Pipelines can also be constructed using ``*``, ``+``, and ``|`` dunde... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "New Feature Additions"
} |
scikit-learn__scikit-learn-17846@c7f87e1 | scikit-learn/scikit-learn | Python | 17,846 | [MRG] Add codes to raise error when l1_ratio is out-of-range in elasticnet | #### Reference Issues/PRs
Fixes #17814
#### What does this implement/fix? Explain your changes.
This PR added codes (mainly copied from `sklearn/linearmodel/_logistic.py`) to raise `ValueError` in the Elasticnet implementation in `sklearn/linearmodel/_coordinate_descent.py` when the range is outside of `0<l1_... | 2020-07-06T09:16:39Z | l1_ratio in sklearn.linear_model's ElasticNet greater than 1?
I accidentally ran ElasticNet (from sklearn.linear_model) for l1_ratio >1, and no error or warning was raised. From the docsstring, it says that ``0 < l1_ratio < 1``. Should we raise a ValueError or something? Found this with @mathurinm.
If this turns out... | Yes, as far as I can tell there is no input validation of the `l1_ratio` range. A PR would be very welcome. Just please check if it's also an issue for other public functions/estimators that take `l1_ratio` as input (which also might need fixing).
@rth Thanks for the comment. It turns out that in ``sklearn/linearmodel/... | [
{
"body": "I accidentally ran ElasticNet (from sklearn.linear_model) for l1_ratio >1, and no error or warning was raised. From the docsstring, it says that ``0 < l1_ratio < 1``. Should we raise a ValueError or something? Found this with @mathurinm.\r\n\r\nIf this turns out to be something to be done, I could he... | 9b42b0cc7d5cf6978805619bc2433e3888c38d0c | {
"head_commit": "c7f87e1a9bd691263e8770d6eb93b77f1d3e18c2",
"head_commit_message": "Update sklearn/linear_model/tests/test_coordinate_descent.py\n\nCo-authored-by: Nicolas Hug <contact@nicolas-hug.com>",
"patch_to_review": "diff --git a/sklearn/linear_model/_coordinate_descent.py b/sklearn/linear_model/_coordina... | [
{
"diff_hunk": "@@ -58,6 +58,19 @@\n from sklearn.utils import check_array\n \n \n+@pytest.mark.parametrize('l1_ratio', (-1, 2, None, 10, 'something_wrong'))\n+def test_l1_ratio_param_invalid(l1_ratio):\n+ # Check that correct error is raised when l1_ratio in ElasticNet\n+ # is outside the correct range\n... | c3160e86a7c5fb2201b522fe9ed685e046b1a924 | diff --git a/sklearn/linear_model/_coordinate_descent.py b/sklearn/linear_model/_coordinate_descent.py
index 570d048de1e64..be60de2354ace 100644
--- a/sklearn/linear_model/_coordinate_descent.py
+++ b/sklearn/linear_model/_coordinate_descent.py
@@ -755,6 +755,11 @@ def fit(self, X, y, sample_weight=None, check_input=Tr... | {
"difficulty": "low",
"estimated_review_effort": 2,
"problem_domain": "Bug Fixes"
} |
scikit-learn__scikit-learn-17876@b3dba67 | scikit-learn/scikit-learn | Python | 17,876 | EHN raise error with inconsistant transformer_weight in FeatureUnion | <!--
Thanks for contributing a pull request! Please ensure you have taken a look at
the contribution guidelines: https://github.com/scikit-learn/scikit-learn/blob/master/CONTRIBUTING.md#pull-request-checklist
-->
#### Reference Issues/PRs
<!--
Example: Fixes #1234. See also #3456.
Please use keywords (e.g., Fi... | 2020-07-09T20:35:01Z | FeatureUnion silently ignores unknown transformer weights
<!--
Before submitting a bug, please make sure the issue hasn't been already
addressed by searching through the past issues.
-->
#### Describe the bug
<!--
A clear and concise description of what the bug is.
-->
Entries in the `transformer_weights` par... | Thanks for the report. A fix would be welcome
@jnothman I was just looking at FeatureUnion. I'll put together a quick fix and open a PR later today. | [
{
"body": "<!--\r\nBefore submitting a bug, please make sure the issue hasn't been already\r\naddressed by searching through the past issues.\r\n-->\r\n\r\n#### Describe the bug\r\n<!--\r\nA clear and concise description of what the bug is.\r\n-->\r\nEntries in the `transformer_weights` parameter of `FeatureUni... | c6579afdc474e75686a1797d1322cfc3d6aaa601 | {
"head_commit": "b3dba67ad2ec15c10c73d6f389b46a6915ce7002",
"head_commit_message": "Add comment to test",
"patch_to_review": "diff --git a/sklearn/pipeline.py b/sklearn/pipeline.py\nindex 992f63ab77703..ebecb3017a8e2 100644\n--- a/sklearn/pipeline.py\n+++ b/sklearn/pipeline.py\n@@ -13,6 +13,7 @@\n from itertools... | [
{
"diff_hunk": "@@ -868,6 +869,17 @@ def _validate_transformers(self):\n \"transform. '%s' (type %s) doesn't\" %\n (t, type(t)))\n \n+ def _validate_transformer_weights(self):\n+ if self.transformer_weights:",
"line": null,
"origi... | 33252111c9650ffd6a34daf452320a652f91e6eb | diff --git a/doc/whats_new/v0.24.rst b/doc/whats_new/v0.24.rst
index ef3b9ecd2ebd6..454829b2728ee 100644
--- a/doc/whats_new/v0.24.rst
+++ b/doc/whats_new/v0.24.rst
@@ -411,6 +411,14 @@ Changelog
:class:`neural_network.MLPRegressor`.
:pr:`17759` by :user:`Srimukh Sripada <d3b0unce>`.
+:mod:`sklearn.pipeline`
+.... | {
"difficulty": "medium",
"estimated_review_effort": 2,
"problem_domain": "Bug Fixes"
} |
sktime__sktime-3532@d06b1f0 | sktime/sktime | Python | 3,532 | [BUG] writing datasets to file in ts format | #### Reference Issues/PRs
<!--
Example: Fixes #1234. Fixes #302
Please use keywords (e.g., Fixes) to create link to the issues or pull requests
you resolved, so that they will automatically be closed when your pull request
is merged. See https://github.com/blog/1506-closing-issues-via-pull-requests
-->
fixes ... | 2022-10-05T15:55:37Z | [BUG]’write_dataframe_to_tsfile‘ doesn't work for length-unequal series
**Describe the bug**
I'm trying to make my own .ts format dataset using the function write_dataframe_to_tsfile.
There is no clear statement about whether length-unequal time series is supported in the definition of function 'write_dataframe_to_t... | About the func write_dataframe_to_tsfile, I linked this issue to #438 #1278
hi, thanks for that, I'll look into it
@TonyBagnall, kindly ask @achieveordie to review if/once ready, as he has been reworking the ts load/save functionality recently and documenting the ts file format spec that so far no one has properly wr... | [
{
"body": "**Describe the bug**\r\nI'm trying to make my own .ts format dataset using the function write_dataframe_to_tsfile.\r\nThere is no clear statement about whether length-unequal time series is supported in the definition of function 'write_dataframe_to_tsfile'. \r\nThere is a parameter named 'equal_len... | 769ba1ad5bf8c835db1d7926aad805f1b2aad7cd | {
"head_commit": "d06b1f0c3c2eadd4702542c16e9cb72f587d75c7",
"head_commit_message": "Merge branch 'main' into write_to_ts\n\n# Conflicts:\n#\tsktime/_contrib/datasets/__init__.py",
"patch_to_review": "diff --git a/sktime/datasets/__init__.py b/sktime/datasets/__init__.py\nindex af7b8a7584d..0554006bbfa 100644\n--... | [
{
"diff_hunk": "@@ -1550,24 +1596,59 @@ def write_dataframe_to_tsfile(\n \"\"\"\n # ensure data provided is a dataframe\n if not isinstance(data, pd.DataFrame):\n- raise ValueError(\"Data provided must be a DataFrame\")\n- if class_value_list is not None:\n- data, class_value_list =... | f540e72a722c108e00e5024d3d75e599b244d2f2 | diff --git a/sktime/_contrib/classification_experiments.py b/sktime/_contrib/classification_experiments.py
index e2fbdb7f697..03886acb39d 100644
--- a/sktime/_contrib/classification_experiments.py
+++ b/sktime/_contrib/classification_experiments.py
@@ -2,7 +2,7 @@
"""Classifier Experiments: code to run experiments as ... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "Bug Fixes"
} |
sktime__sktime-3460@a1554f6 | sktime/sktime | Python | 3,460 | [BUG] Fix `ConformalIntervals` update does not update residuals_matrix | #### Reference Issues/PRs
Fixes #3419
#### What does this implement/fix? Explain your changes.
As described in the bug, the `update` routine does not update the `residuals_matrix` which means the conformal intervals will be incorrect on the updated data. This PR computes the sliding residuals on the remaining p... | 2022-09-22T07:58:57Z | [BUG] `ConformalIntervals` update does not update residuals_matrix
**Describe the bug**
`ConformalIntervals` update only updates the forecaster, not the residuals_matrix for predicting intervals or quantiles.
**To Reproduce**
`_update` is defined as:
```
def _update(self, y, X=None, update_params=Tru... | Hm, I think both options are valid, but updating the residuals matrix should probably be the default.
Should we introduce a parameter `update_residuals` or similar?
> Hm, I think both options are valid, but updating the residuals matrix should probably be the default. Should we introduce a parameter `update_residuals`... | [
{
"body": "**Describe the bug**\r\n\r\n`ConformalIntervals` update only updates the forecaster, not the residuals_matrix for predicting intervals or quantiles.\r\n\r\n\r\n**To Reproduce**\r\n\r\n`_update` is defined as:\r\n\r\n```\r\n def _update(self, y, X=None, update_params=True):\r\n self.forecast... | 8b65ff98bfabef1b9854e63f17d4b4e36af4ff95 | {
"head_commit": "a1554f676bcfe6a827d1ee395461e98250eb06e0",
"head_commit_message": "Only update residuals matrix if update_params is true",
"patch_to_review": "diff --git a/sktime/forecasting/conformal.py b/sktime/forecasting/conformal.py\nindex ce61126b5bb..27ebabb05e7 100644\n--- a/sktime/forecasting/conformal... | [
{
"diff_hunk": "@@ -351,11 +370,23 @@ def _compute_sliding_residuals(self, y, X, forecaster, initial_window, sample_fr\n \n n_initial_window = self._parse_initial_window(y, initial_window=initial_window)\n \n- y_index = y.iloc[n_initial_window:].index\n+ full_y_index = y.iloc[n_initial_win... | f82ae3299e47e7ac4ac4052e2a5af86e1bb256f0 | diff --git a/sktime/forecasting/conformal.py b/sktime/forecasting/conformal.py
index ce61126b5bb..69e4ec55408 100644
--- a/sktime/forecasting/conformal.py
+++ b/sktime/forecasting/conformal.py
@@ -107,7 +107,7 @@ def __init__(
self,
forecaster,
method="empirical",
- initial_window=1,
+... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
scikit-learn__scikit-learn-17802@908c326 | scikit-learn/scikit-learn | Python | 17,802 | TST Fix test_float_precision fails on arm | Fixes #17796
(Extracted from #17622)
The failure was that `inertia[float64]=325.9393` and `inertia[float32]=325.9395` were not equal up to the 4th decimal place. But 4th decimal place corresponds to a relative error of ~3e-7 which is barely above machine epsilon for float32. There are many operations involved in co... | 2020-07-01T08:28:17Z | [0.23.1] test_float_precision[True-KMeans] failes on arm(rhel) processors
#### Describe the bug
On arm processors (AWS:gravition2, rhel), I get the following failure in version 0.23.1
```
Estimator = <class 'sklearn.cluster._kmeans.KMeans'>, is_sparse = True
@pytest.mark.parametrize('Estimator', [KMeans, Mini... | Thanks for the report. The requested precision for this test is too high. #17802 should fix it. | [
{
"body": "#### Describe the bug\r\nOn arm processors (AWS:gravition2, rhel), I get the following failure in version 0.23.1\r\n```\r\nEstimator = <class 'sklearn.cluster._kmeans.KMeans'>, is_sparse = True\r\n\r\n @pytest.mark.parametrize('Estimator', [KMeans, MiniBatchKMeans])\r\n @pytest.mark.parametrize... | 6b29bc69c59509e61d5a57c94cd27cc90456c060 | {
"head_commit": "908c32634850cf3cb1727ddf0f81d5124ce58e50",
"head_commit_message": "fix astype",
"patch_to_review": "diff --git a/sklearn/cluster/tests/test_k_means.py b/sklearn/cluster/tests/test_k_means.py\nindex 8ae054b3607f6..934e8634128f1 100644\n--- a/sklearn/cluster/tests/test_k_means.py\n+++ b/sklearn/cl... | [
{
"diff_hunk": "@@ -828,45 +828,41 @@ def test_max_iter_error():\n km.fit, X)\n \n \n-@pytest.mark.parametrize('Estimator', [KMeans, MiniBatchKMeans])\n-@pytest.mark.parametrize('is_sparse', [False, True])\n-def test_float_precision(Estimator, is_sparse):\n-\n- estimator = Estimator(... | aee5eb713b2ad998e2a32584af5746497bc8b484 | diff --git a/sklearn/cluster/tests/test_k_means.py b/sklearn/cluster/tests/test_k_means.py
index 8ae054b3607f6..97d6322d798cc 100644
--- a/sklearn/cluster/tests/test_k_means.py
+++ b/sklearn/cluster/tests/test_k_means.py
@@ -14,6 +14,7 @@
from sklearn.utils._testing import assert_warns
from sklearn.utils._testing imp... | {
"difficulty": "low",
"estimated_review_effort": 2,
"problem_domain": "Bug Fixes"
} |
saltstack__salt-56172@6c914ca | saltstack/salt | Python | 56,172 | Only change mine data if using new allow_tgt feature | ### What does this PR do?
With the new `allow_tgt` feature in the mine.get the data structure was changed. This PR ensures we only send this new data structure if we are using the new `allow_tgt` feature.
Fixes the issue in https://github.com/saltstack/salt/issues/56118
The initial issue made it so a master on ... | 2020-02-14T22:41:13Z | mine.get returns different dictionary format in version 3000
I created couple new servers today and noticed that the output of the mine function I use for getting the ip address of the minion is returning in a different format. I can find documentation about the change in format for defining a mine function, but no... | Probably introduced in https://github.com/saltstack/salt/pull/55760
CC: @github-abcde
> I can find documentation about the change in format for defining a mine function
Where? It's not mentioned in the release notes.
Interesting. The underscore-variables returned are for internal use only and should not be retu... | [
{
"body": "I created couple new servers today and noticed that the output of the mine function I use for getting the ip address of the minion is returning in a different format. I can find documentation about the change in format for defining a mine function, but nothing noting the difference in output.\r\n... | 9adc2214c3bb7c68f820f7bd5fe5e132b7b3fbc9 | {
"head_commit": "6c914caec888932cd263658b253d1c6297c41242",
"head_commit_message": "Use different targeting for windows/linux",
"patch_to_review": "diff --git a/doc/topics/releases/3000.rst b/doc/topics/releases/3000.rst\nindex b844fe163230..9affa1549c24 100644\n--- a/doc/topics/releases/3000.rst\n+++ b/doc/topi... | [
{
"diff_hunk": "@@ -213,9 +216,13 @@ def send(name, *args, **kwargs):\n :param str mine_function: The name of the execution_module.function to run\n and whose value will be stored in the salt mine. Defaults to ``name``.\n :param str allow_tgt: Targeting specification for ACL. Specifies which min... | f4c9c2a5cf0d50447c55dde7f6f8c505fa5c4dbd | diff --git a/doc/topics/releases/3000.rst b/doc/topics/releases/3000.rst
index b844fe163230..9affa1549c24 100644
--- a/doc/topics/releases/3000.rst
+++ b/doc/topics/releases/3000.rst
@@ -592,6 +592,19 @@ Enhancements to chroot
:py:func:`highstate<salt.modules.chroot.highstate>` that allow executing
states in sls ... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "Bug Fixes"
} |
sktime__sktime-3505@720a73b | sktime/sktime | Python | 3,505 | [GOV] CC observers role, update to role holders, add Guzal to CC | <!--
Thanks for contributing a pull request! Please ensure you have taken a look
at our contribution guide: https://github.com/sktime/sktime/blob/main/CONTRIBUTING.md
-->
#### Reference Issues/PRs
<!--
Example: Fixes #1234. See also #3456.
Please use keywords (e.g., Fixes) to create link to the issues or pul... | 2022-09-29T00:06:40Z | [DOC] Governance update: add observers
#### Describe the issue linked to the documentation
1. All governance page links in this repo lead to a page that doesn't exist
2. Observers' role in the CC is present but not documented.
#### Suggest a potential alternative/fix
<!--
Tell us how we could improve the do... | [
{
"body": "#### Describe the issue linked to the documentation\r\n\r\n1. All governance page links in this repo lead to a page that doesn't exist \r\n2. Observers' role in the CC is present but not documented.\r\n\r\n#### Suggest a potential alternative/fix\r\n\r\n<!--\r\nTell us how we could improve the docume... | b1976026ef03eb0956aeac9f5d16ebfef03c59dd | {
"head_commit": "720a73b35f022ee9df09a096bedc6554e3d7ac9e",
"head_commit_message": "chore: update team.rst",
"patch_to_review": "diff --git a/docs/source/about/team.rst b/docs/source/about/team.rst\nindex f64d1298fff..469e3adf3a4 100644\n--- a/docs/source/about/team.rst\n+++ b/docs/source/about/team.rst\n@@ -20,... | [
{
"diff_hunk": "@@ -320,6 +320,45 @@ For more details about our meetings, please go to our `community-council reposit\n \n To contact the CC directly, please send an email to info@sktime.org.\n \n+.. _cc-observers:\n+\n+CC observers\n+~~~~~~~~~~\n+\n+CC (community council) observers are core developers with add... | 90c3afca012386be0d5d2ff56e8c98d77990a1f5 | diff --git a/docs/source/about/team.rst b/docs/source/about/team.rst
index 57b0f0d55e3..23a7c5375e7 100644
--- a/docs/source/about/team.rst
+++ b/docs/source/about/team.rst
@@ -17,9 +17,23 @@ Community Council
- GitHub ID
* - Franz Kiraly
- :user:`fkiraly`
+ * - Guzal Bulatova
+ - :user: `GuzalBula... | {
"difficulty": "low",
"estimated_review_effort": 2,
"problem_domain": "Documentation Updates"
} | |
sqlfluff__sqlfluff-982@8329f7a | sqlfluff/sqlfluff | Python | 982 | Issue 968: Jinja templater throwing UnboundLocalError with "for" loop | Resolves #968, #630 | 2021-04-17T20:39:33Z | [BigQuery] Jinja for loop failing to parse
A simple Jinja loop with BigQuery fails to parse using sqlfluff 0.5.2, last working for this is version 0.3.6
## Expected Behaviour
No errors
## Observed Behaviour
```
[stijnzanders@stijn]$ sqlfluff parse test.sql
Traceback (most recent call last):
File "/home/s... | This looks like it may be the same underlying issue as #630. If so, that could be really helpful, as @alanmcruickshank mentioned he was having trouble reproducing that issue himself.
I'll take a quick look at this -- if I can reproduce it, it _may_ be easy to fix. 🤞🏽
Reproduced the error myself. Here are the local... | [
{
"body": "A simple Jinja loop with BigQuery fails to parse using sqlfluff 0.5.2, last working for this is version 0.3.6\r\n\r\n## Expected Behaviour\r\nNo errors\r\n\r\n## Observed Behaviour\r\n\r\n```\r\n[stijnzanders@stijn]$ sqlfluff parse test.sql\r\nTraceback (most recent call last):\r\n File \"/home/stij... | e1ae8df7404b6c0a4da8c43ef6b9facd0e028891 | {
"head_commit": "8329f7a6cfb04c88d1890277e2e8d903ebed5673",
"head_commit_message": "Issue 968: Jinja templater throwing UnboundLocalError with \"for\" loop",
"patch_to_review": "diff --git a/src/sqlfluff/core/templaters/python.py b/src/sqlfluff/core/templaters/python.py\nindex 814c427e93f..b56c29ef0e8 100644\n--... | [
{
"diff_hunk": "@@ -947,7 +949,11 @@ def _split_uniques_coalesce_rest(\n template_idx + raw_len,\n )\n \n- if starts[1] < stops[1] and last_owu_idx is not None:\n+ if (\n+ starts[1] < stops[1]\n+ and last_owu_idx is not None... | 702df9197aaef308f1a8dc6b30b0d6607bb3cb50 | diff --git a/src/sqlfluff/core/templaters/python.py b/src/sqlfluff/core/templaters/python.py
index 814c427e93f..eb0666cedd1 100644
--- a/src/sqlfluff/core/templaters/python.py
+++ b/src/sqlfluff/core/templaters/python.py
@@ -739,9 +739,6 @@ def _split_uniques_coalesce_rest(
# recursion.
... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
sqlfluff__sqlfluff-925@d4b55d7 | sqlfluff/sqlfluff | Python | 925 | Issue 911: [BigQuery] Using functions from other projects, quoted function names | Resolves #911
This PR changes the parse tree for `function_name`, hence the large number of files changed (`.yml` files for the parse test files). | 2021-04-05T19:26:10Z | [BigQuery] Using functions from other projects
Hi there!
I've tested these 2 different ways of calling _remote_ functions and both worked inside the BigQuery editor.
```sql
SELECT
`another-gcp-project`.functions.timestamp_parsing(log_tbl.first_move) AS first_move,
`another-gcp-project.functions.timesta... | Thanks, @barrachri -- I'm not surprised those are failing to parse. I'll try and look into this some time in the next few weeks. SQLFluff is definitely open to new contributors, and the parser is a common area for folks to start. If you feel like taking on this or other issues, we are here to help. It would be great to... | [
{
"body": "Hi there!\r\n\r\nI've tested these 2 different ways of calling _remote_ functions and both worked inside the BigQuery editor.\r\n\r\n```sql\r\nSELECT\r\n `another-gcp-project`.functions.timestamp_parsing(log_tbl.first_move) AS first_move,\r\n `another-gcp-project.functions.timestamp_parsing`(lo... | cbdcfb09feb4883de91de142956c3be6ac7f827d | {
"head_commit": "d4b55d757d1c836382235e289f9215822da9cecf",
"head_commit_message": "Issue 911: [BigQuery] Using functions from other projects, quoted function names",
"patch_to_review": "diff --git a/src/sqlfluff/dialects/dialect_ansi.py b/src/sqlfluff/dialects/dialect_ansi.py\nindex 5d5fd1aeed4..42e023474b0 100... | [
{
"diff_hunk": "@@ -759,13 +759,17 @@ class FunctionSegment(BaseSegment):\n type = \"function\"\n match_grammar = Sequence(\n Sequence(\n- Sequence(\n- # a stored function could be accessed by schema identifier\n+ # Project name, schema identifier, etc.\n+ ... | a6624bcb38799f9f42b280b93d4b95c549ad48b9 | diff --git a/src/sqlfluff/core/rules/std/L010.py b/src/sqlfluff/core/rules/std/L010.py
index 7a3037feae5..681f488a8d3 100644
--- a/src/sqlfluff/core/rules/std/L010.py
+++ b/src/sqlfluff/core/rules/std/L010.py
@@ -161,16 +161,22 @@ def _eval(self, segment, memory, parent_stack, **kwargs):
)
ret... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "Bug Fixes"
} |
scikit-learn__scikit-learn-17856@06c0088 | scikit-learn/scikit-learn | Python | 17,856 | ENH Add libsvm-like calibration procedure to CalibratedClassifierCV | <!--
Thanks for contributing a pull request! Please ensure you have taken a look at
the contribution guidelines: https://github.com/scikit-learn/scikit-learn/blob/master/CONTRIBUTING.md#pull-request-checklist
-->
#### Reference Issues/PRs
closes #16145
Follows from PR #16167
The first step was to refactor `Cal... | 2020-07-07T15:59:44Z | CalibratedClassifierCV should return an estimator calibrated via CV, not an ensemble of calibrated estimators
The current cross validation procedure adopted in the `CalibratedClassifierCV` does not follow the cross validation procedure described in the original Platt paper:
[Platt99] Probabilistic Outputs for Support ... | > Then the predictions from all the folds are concatenated in a single list, and calibration parameters for the base_estimator are determined using such list.
In other words, we should use `cross_val_predict` instead of a `cross_val_score`.
> The procedure described in Platt99 is what one would expect from a prop... | [
{
"body": "The current cross validation procedure adopted in the `CalibratedClassifierCV` does not follow the cross validation procedure described in the original Platt paper:\r\n[Platt99] Probabilistic Outputs for Support Vector Machines and Comparisons to Regularized Likelihood Methods, J. Platt, (1999)\r\n\r... | 8d10285ffc2d64eb6f2107dc248bdbbc41ad1b50 | {
"head_commit": "06c0088f75927fe874f1ba2343147ab5bd1bd8d6",
"head_commit_message": "update docs",
"patch_to_review": "diff --git a/doc/modules/calibration.rst b/doc/modules/calibration.rst\nindex cfc185c854edb..78edf290b6751 100644\n--- a/doc/modules/calibration.rst\n+++ b/doc/modules/calibration.rst\n@@ -96,8 +... | [
{
"diff_hunk": "@@ -377,145 +413,229 @@ def _more_tags(self):\n }\n \n \n-class _CalibratedClassifier:\n- \"\"\"Probability calibration with isotonic regression or sigmoid.\n+def _get_pred_fit_calibrator(estimator, X, y, train, test, supports_sw,\n+ method, classes, sample... | aff6bb88be120775499d3b749f3e894c065a0df3 | diff --git a/doc/modules/calibration.rst b/doc/modules/calibration.rst
index cb157a9d78c93..146601d70765e 100644
--- a/doc/modules/calibration.rst
+++ b/doc/modules/calibration.rst
@@ -96,9 +96,9 @@ in [0, 1]. Denoting the output of the classifier for a given sample by :math:`f_
the calibrator tries to predict :math:`... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "Code Refactoring / Architectural Improvement"
} |
saltstack__salt-55062@b223ad6 | saltstack/salt | Python | 55,062 | Fix empty reactor traceback in reactor.py |
### What does this PR do?
This PR prevent traceback when trying to list reactors when none are configured
### What issues does this PR fix or reference?
Fixes #53334
### Previous Behavior
`Passed invalid arguments: 'NoneType' object has no attribute '__getitem__'`
### New Behavior
`None`
### Tests... | 2019-10-19T05:20:48Z | reactor.list return "Passed invalid arguments" when no reactor are configured
### Description of Issue
When no reactors are configured, running `salt-run reactor.list` return:
```commandline
Passed invalid arguments: 'NoneType' object has no attribute '__getitem__'
Usage:
List currently configured reac... | I have replicated the bug. | [
{
"body": "### Description of Issue\r\nWhen no reactors are configured, running `salt-run reactor.list` return:\r\n\r\n```commandline\r\n\r\nPassed invalid arguments: 'NoneType' object has no attribute '__getitem__'\r\n\r\nUsage:\r\n\r\n List currently configured reactors\r\n\r\n CLI Example:\r\n\r\n .... | add441900601d09314644650d1510ac0d384c45e | {
"head_commit": "b223ad621ab0edb72d1d1020e32e66c4ca9e3d0b",
"head_commit_message": "Merge branch 'master' into fix-empty-reactor",
"patch_to_review": "diff --git a/salt/runners/reactor.py b/salt/runners/reactor.py\nindex 7e845127c608..3f25fcd5a19e 100644\n--- a/salt/runners/reactor.py\n+++ b/salt/runners/reactor... | [
{
"diff_hunk": "@@ -135,7 +136,7 @@ def delete(event, saltenv=\"base\", test=None):\n )\n \n res = sevent.get_event(wait=30, tag=\"salt/reactors/manage/delete-complete\")\n- return res[\"result\"]\n+ return res.get('result', None)",
"line": null,
"original_line": 139,
"... | c8bf41d0fe738c3a835e3ea14419ecd1e4d7b894 | diff --git a/changelog/53334.fixed b/changelog/53334.fixed
new file mode 100644
index 000000000000..6ee8e7632958
--- /dev/null
+++ b/changelog/53334.fixed
@@ -0,0 +1 @@
+Prevent traceback when trying to list reactors when none are configured.
diff --git a/salt/runners/reactor.py b/salt/runners/reactor.py
index 7e845127... | {
"difficulty": "low",
"estimated_review_effort": 2,
"problem_domain": "Bug Fixes"
} |
saltstack__salt-54740@07c2faf | saltstack/salt | Python | 54,740 | Update dpkg_lowpkg to handle deb files that have spaces in `dpkg -I` output | ### What does this PR do?
use re.match to find Name/Architecture/Version instead of startswith, some dpkg -I output has spaces between the description and colon
### What issues does this PR fix or reference?
Fixes #54739
### Previous Behavior
Deb packages that returned output of `dpkg -I` with spaces between ... | 2019-09-25T14:14:44Z | Unable to use pkg.install with 'sources' parameter in Ubuntu on some deb files
### Description of Issue
Unable to install some deb packages through pkg.install using the 'sources' parameter.
the dpkg_lowpkg module attempts to use 'startswith' to find the information from the output of `dpkg -I ...`
dpkg -I <path... | Thanks for reporting and addressing the issue!
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue.
... | [
{
"body": "### Description of Issue\r\nUnable to install some deb packages through pkg.install using the 'sources' parameter.\r\n\r\nthe dpkg_lowpkg module attempts to use 'startswith' to find the information from the output of `dpkg -I ...`\r\n\r\ndpkg -I <path/to/deb> returns info with spaces on some packages... | b95213ec903402f25c1e0aeb3990fe8452ab63ce | {
"head_commit": "07c2fafda7726a43d4818aaed71f9ed896c7605d",
"head_commit_message": "Merge branch 'master' into dpkg_output_fix",
"patch_to_review": "diff --git a/salt/modules/dpkg_lowpkg.py b/salt/modules/dpkg_lowpkg.py\nindex e267eea51bb6..4dcf2640ac3b 100644\n--- a/salt/modules/dpkg_lowpkg.py\n+++ b/salt/modul... | [
{
"diff_hunk": "@@ -12,10 +12,11 @@\n # Import Salt Libs\n import salt.modules.dpkg_lowpkg as dpkg\n \n+# Import Salt Testing Libs\n # Import Salt Testing Libs\n from tests.support.mixins import LoaderModuleMockMixin\n-from tests.support.mock import MagicMock, patch\n-from tests.support.unit import TestCase\n+f... | b552ea6d9437b462f8a380e4023cc7b249cebcef | diff --git a/salt/modules/dpkg_lowpkg.py b/salt/modules/dpkg_lowpkg.py
index e267eea51bb6..4dcf2640ac3b 100644
--- a/salt/modules/dpkg_lowpkg.py
+++ b/salt/modules/dpkg_lowpkg.py
@@ -87,11 +87,11 @@ def bin_pkg_info(path, saltenv="base"):
ret = {}
for line in result["stdout"].splitlines():
line = lin... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
saltstack__salt-49146@915811e | saltstack/salt | Python | 49,146 | Add FreeBSD support to pf executor | ### What does this PR do?
Enables FreeBSD support for the pf module; adds FreeBSD to OS whitelist and makes list of available loglevels OS-dependent.
### What issues does this PR fix or reference?
This PR fixes #33248.
### Previous Behavior
Does not execute under FreeBSD.
### New Behavior
Will now execute on Fre... | 2018-08-16T02:50:55Z | Execution module for FreeBSD Packet Filter
### Description of Issue/Question
I searched for an existing execution module that would be an equivalent of `iptables` for FreeBSD's `pf`. I couldn't find one in the docs/repo ( I looked in the develop branch). Is there a planned `pf` execution module for the future? Or mayb... | @avb76 i also did not see one available as well in the code. I will go ahead and label this as a feature request. i think this is a great idea :)
@Ch3LL: great :)
@avb76 I just noticed this issue, you may want to have a look at the new module I've proposed in #45905 to see if it works on FreeBSD too.
@jasperla Your p... | [
{
"body": "### Description of Issue/Question\n\nI searched for an existing execution module that would be an equivalent of `iptables` for FreeBSD's `pf`. I couldn't find one in the docs/repo ( I looked in the develop branch). Is there a planned `pf` execution module for the future? Or maybe there is one already... | a15d1fb1306be8f816e6768bfcdcc7411dbfa981 | {
"head_commit": "915811ee4ad3d199219e742c2ee99b06dc2268ff",
"head_commit_message": "Add FreeBSD support to pf executor",
"patch_to_review": "diff --git a/salt/modules/pf.py b/salt/modules/pf.py\nindex 7bb495e140ab..b5cd62511141 100644\n--- a/salt/modules/pf.py\n+++ b/salt/modules/pf.py\n@@ -22,13 +22,16 @@\n \n ... | [
{
"diff_hunk": "@@ -66,14 +66,29 @@ def test_disable_when_disabled(self):\n with patch.dict(pf.__salt__, {'cmd.run_all': mock_cmd}):\n self.assertFalse(pf.disable()['changes'])\n \n- def test_loglevel(self):\n+ def test_loglevel_freebsd(self):",
"line": null,
"original_line": 6... | 7d1e0c3f15883552ef14789054369839fd368404 | diff --git a/salt/modules/pf.py b/salt/modules/pf.py
index 7bb495e140ab..b5cd62511141 100644
--- a/salt/modules/pf.py
+++ b/salt/modules/pf.py
@@ -22,13 +22,16 @@
def __virtual__():
'''
- Only works on OpenBSD for now; other systems with pf (macOS, FreeBSD, etc)
- need to be tested before enabling them.
+... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "New Feature Additions"
} |
scikit-learn__scikit-learn-17662@7ff25e1 | scikit-learn/scikit-learn | Python | 17,662 | [MRG] ENH Add parameter to sklearn.manifold.TSNE to transition to squaring non-Euclidean distance metrics by default (#12401) | #### Reference Issues/PRs
Fixes #12401
Supersedes and closes #12419
The plan for deprecating legacy squaring behaviour is summarized in [this comment.](https://github.com/scikit-learn/scikit-learn/issues/12401#issuecomment-652893433)
#### What does this implement/fix? Explain your changes.
* Adds a `squar... | 2020-06-23T01:54:47Z | tSNE with non-Euclidean metric should be able to square the distances
Our tSNE implementation uses squared Euclidean distances by default, but does not square the distances when other metrics, or precomputed data, are provided. We had no certainty about whether the theory underlying tSNE was even valid for non-Euclidea... | I'd like to work on this.
I'm not sure that we have consensus from the core devs that this is the
right solution, but I'd be happy for you to work on it if you're confident
on what to do and how to test it.
I am not sure if tSNE should be used for non-Euclidean distances. Could not find anything
in the literature. N... | [
{
"body": "Our tSNE implementation uses squared Euclidean distances by default, but does not square the distances when other metrics, or precomputed data, are provided. We had no certainty about whether the theory underlying tSNE was even valid for non-Euclidean metrics (which was raised in the partial rewrite ... | c3f25168fe8c73b82af8f57ae536f4a9708c863e | {
"head_commit": "7ff25e1c82e78ebb2abf4c2db8d941988972a4ab",
"head_commit_message": "Fix line length linting issues\n\n`square_distance` -> `square_distances` pushed some lines > 79.",
"patch_to_review": "diff --git a/doc/whats_new/v0.24.rst b/doc/whats_new/v0.24.rst\nindex 895a9863cada8..36761ea8ef212 100644\n--... | [
{
"diff_hunk": "@@ -872,13 +884,64 @@ def test_tsne_with_different_distance_metrics():\n for metric, dist_func in zip(metrics, dist_funcs):\n X_transformed_tsne = TSNE(\n metric=metric, n_components=n_components_embedding,\n- random_state=0, n_iter=300).fit_transform(X)\n+ ... | 3b0e0774e9645b376cf7b63edc5d174a6fc63d14 | diff --git a/doc/whats_new/v0.24.rst b/doc/whats_new/v0.24.rst
index 895a9863cada8..ace46bb6c53a6 100644
--- a/doc/whats_new/v0.24.rst
+++ b/doc/whats_new/v0.24.rst
@@ -161,6 +161,15 @@ Changelog
- |Enhancement| :class:`isotonic.IsotonicRegression` now accepts 2darray with 1 feature as
input array. :pr:`17379` by :... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "New Feature Additions"
} |
scikit-learn__scikit-learn-17679@e68e854 | scikit-learn/scikit-learn | Python | 17,679 | BUG fix SparseCoder to follow scikit-learn API and allow cloning | #### Reference Issues/PRs
Fixes #8675
Fixes #16336
Supersedes and closes #16346
#### What does this implement/fix? Explain your changes.
SparseCoder cannot be used in a GridSearchCV because it could not be cloned. A parameter in the constructor had a different meaning when stored in an instance (dictionary). | 2020-06-23T16:57:36Z | Problem with SparseCoder Object, dictionary not assigned
## Code
```
import numpy as np
from sklearn.decomposition import SparseCoder
sparsecoding = SparseCoder(dictionary=np.random.random((4,8)), n_jobs=2)
print(sparsecoding)
```
## Output
```
SparseCoder(dictionary=None, n_jobs=2, split_sign=False,
... | No time to check this out right now, but it seems quite alarming to me, given that it implies basic functionality is broken. Thanks for the report
I have also encountered exactly the same problem. Here is a test code.
```test.py
from __future__ import print_function
import sklearn
from sklearn.decomposition impor... | [
{
"body": "## Code\r\n\r\n```\r\nimport numpy as np\r\nfrom sklearn.decomposition import SparseCoder\r\nsparsecoding = SparseCoder(dictionary=np.random.random((4,8)), n_jobs=2)\r\nprint(sparsecoding)\r\n```\r\n\r\n## Output\r\n```\r\nSparseCoder(dictionary=None, n_jobs=2, split_sign=False,\r\n transform_al... | e781ae8e3cdd1dace4806714c1aec87e195101aa | {
"head_commit": "e68e8546db31100e8571fff5f8a34687b93d9efa",
"head_commit_message": "remove one deprecated verification",
"patch_to_review": "diff --git a/sklearn/datasets/tests/test_base.py b/sklearn/datasets/tests/test_base.py\nindex cb04ba5c302c3..27770a6b17287 100644\n--- a/sklearn/datasets/tests/test_base.py... | [
{
"diff_hunk": "@@ -498,6 +500,19 @@ def test_sparse_coder_estimator():\n assert np.sqrt(np.sum((np.dot(code, V) - X) ** 2)) < 0.1\n \n \n+def test_sparse_coder_estimator_clone():\n+ n_components = 12\n+ rng = np.random.RandomState(0)\n+ V = rng.randn(n_components, n_features) # random init\n+ ... | b7db86972946dcfdd7a175c292494d8929f8ffcb | diff --git a/sklearn/datasets/tests/test_base.py b/sklearn/datasets/tests/test_base.py
index cb04ba5c302c3..27770a6b17287 100644
--- a/sklearn/datasets/tests/test_base.py
+++ b/sklearn/datasets/tests/test_base.py
@@ -2,7 +2,6 @@
import shutil
import tempfile
import warnings
-import numpy
from pickle import loads
f... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
sqlfluff__sqlfluff-888@11cd569 | sqlfluff/sqlfluff | Python | 888 | More rules logging and L003 indent improvement. | This resolves #734 (or at least part of it).
This fix for the original query is now:
```sql
SELECT
*
FROM foo
INNER JOIN bar
USING (baz)
WHERE qux = 1
```
however, if the `bar` is on a new line it still fixes to:
```sql
SELECT
*
FROM foo
INNER JOIN
bar
USING (baz)
WHERE... | 2021-03-24T16:42:08Z | sqlfluff fix uses incorrect indentation for `USING` keyword
-- If this is a parsing or linting issue, please include a minimal SQL example which reproduces the issue, along with the `sqlfluff parse` output, `sqlfluff lint` output and `sqlfluff fix` output when relevant. Finally, please add any labels that are related t... | I ran a related test, using this SQL (same as above, but omitting the word `INNER`):
```
SELECT
*
FROM foo
JOIN bar
USING (baz)
WHERE qux = 1
```
The result was:
```
SELECT
*
FROM foo
JOIN bar
USING (baz)
WHERE qux = 1
```
I'm not familiar with the details of the indentation algorit... | [
{
"body": "-- If this is a parsing or linting issue, please include a minimal SQL example which reproduces the issue, along with the `sqlfluff parse` output, `sqlfluff lint` output and `sqlfluff fix` output when relevant. Finally, please add any labels that are related to the issue before submitting so that it ... | 27ccd0979fdb3cd8d2ff3e538e81af23d18f6679 | {
"head_commit": "11cd5697ddd5778c5a18ce3b11513ab7e8237658",
"head_commit_message": "Linting",
"patch_to_review": "diff --git a/src/sqlfluff/core/rules/base.py b/src/sqlfluff/core/rules/base.py\nindex 457aaff3e7c..3200e35c5c5 100644\n--- a/src/sqlfluff/core/rules/base.py\n+++ b/src/sqlfluff/core/rules/base.py\n@@... | [
{
"diff_hunk": "@@ -1,24 +1,26 @@\n rule: L003\n \n-test_1:\n+test_reindent_first_line_1:\n fail_str: ' SELECT 1'\n fix_str: SELECT 1\n \n-test_2:\n+test_reindent_first_line_2:\n # Github Bug #99. Python2 Issues with fixing L003\n fail_str: ' select 1 from tbl;'\n fix_str: select 1 from tbl;\n \n... | 7814d901b0491402c628c1e82ddd3f172daec853 | diff --git a/src/sqlfluff/core/rules/base.py b/src/sqlfluff/core/rules/base.py
index 457aaff3e7c..3200e35c5c5 100644
--- a/src/sqlfluff/core/rules/base.py
+++ b/src/sqlfluff/core/rules/base.py
@@ -313,6 +313,8 @@ def crawl(
)
return vs, raw_stack, fixes, memory
+ new_lerrs = []
+ ... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "Bug Fixes"
} |
sqlfluff__sqlfluff-870@56b5bc8 | sqlfluff/sqlfluff | Python | 870 | Parse a and not b expression | Resolves #827 and #874
This logic change is causing a maximum recursion depth exceeded error in test cases `expression_recursion.sql` and `expression_recursion_2.sql`. I have increased the max depth to accommodate the increase.
Curious for your thoughts @barrywhart @dmateusp @alanmcruickshank | 2021-03-16T22:40:44Z | ANSI dialect can't parse expression with "AND NOT", e.g. "SELECT a AND NOT i.b FROM i"
-- If this is a parsing or linting issue, please include a minimal SQL example which reproduces the issue, along with the `sqlfluff parse` output, `sqlfluff lint` output and `sqlfluff fix` output when relevant. Finally, please add a... | Can you provide an entire query which demonstrates the problem? It can be a "toy" query, but having a complete query makes it much easier for us to reproduce and fix problems. Thanks!
> Can you provide an entire query which demonstrates the problem? It can be a "toy" query, but having a complete query makes it much eas... | [
{
"body": "-- If this is a parsing or linting issue, please include a minimal SQL example which reproduces the issue, along with the `sqlfluff parse` output, `sqlfluff lint` output and `sqlfluff fix` output when relevant. Finally, please add any labels that are related to the issue before submitting so that it ... | 33a92bfcd66384fb33f146df407cc3d86628a58a | {
"head_commit": "56b5bc831e38f1a9dc09eae6d19572a382f56a31",
"head_commit_message": "Lint",
"patch_to_review": "diff --git a/src/sqlfluff/__init__.py b/src/sqlfluff/__init__.py\nindex 876ff74c001..32076acb782 100644\n--- a/src/sqlfluff/__init__.py\n+++ b/src/sqlfluff/__init__.py\n@@ -20,6 +20,9 @@\n import pkg_re... | [
{
"diff_hunk": "@@ -20,6 +20,9 @@\n import pkg_resources\n import configparser\n \n+# Increase the maximum recursion depth from default of 10^4 to 10^5, see https://github.com/sqlfluff/sqlfluff/pull/870\n+sys.setrecursionlimit(10 ** 5)",
"line": null,
"original_line": 24,
"original_start_line": null... | 9a4f9351153129c38ba6c1a5984c33b4ca2455d4 | diff --git a/src/sqlfluff/core/dialects/dialect_ansi.py b/src/sqlfluff/core/dialects/dialect_ansi.py
index 937fd052ba4..1559c957a87 100644
--- a/src/sqlfluff/core/dialects/dialect_ansi.py
+++ b/src/sqlfluff/core/dialects/dialect_ansi.py
@@ -1191,18 +1191,21 @@ class CaseExpressionSegment(BaseSegment):
... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
sktime__sktime-2991@5170be0 | sktime/sktime | Python | 2,991 | [ENH] Changes to CNN Classifier | <!--
Thanks for contributing a pull request! Please ensure you have taken a look
at our contribution guide: https://github.com/alan-turing-institute/sktime/blob/main/CONTRIBUTING.md
-->
#### Reference Issues/PRs
<!--
Example: Fixes #1234. See also #3456.
Please use keywords (e.g., Fixes) to create link to th... | 2022-07-13T07:24:47Z | [ENH] Changing and Adding features to CNN Classifier
**Is your feature request related to a problem? Please describe.**
As discussed in the daily-stand up on 05-07-12, I wanted to propose some enhancements / changes to CNN Classifier (and hence to Deep Learning based estimators)
**Describe the solution you'd like**... | Yes, great additions, great suggestions!
> Also should allow specifying `lr` either within the optimiser or as parameter to the class itself.
I think this one is unnecessary, because you can pass the `lr` to the optimizer, which is an object you would then pass to the classifier class constructor. We do not need ... | [
{
"body": "**Is your feature request related to a problem? Please describe.**\r\nAs discussed in the daily-stand up on 05-07-12, I wanted to propose some enhancements / changes to CNN Classifier (and hence to Deep Learning based estimators)\r\n\r\n**Describe the solution you'd like**\r\n- [ ] Moving the `conver... | 5f31ac0224666ae0c2deb4d34383350a57579636 | {
"head_commit": "5170be04b83fd63fa72862e97d245466cc97c47c",
"head_commit_message": "converted encoders to class variables",
"patch_to_review": "diff --git a/sktime/classification/deep_learning/base.py b/sktime/classification/deep_learning/base.py\nindex 987198f9952..bbdb40116c5 100644\n--- a/sktime/classificatio... | [
{
"diff_hunk": "@@ -59,6 +80,12 @@ def __init__(\n verbose=False,\n loss=\"mean_squared_error\",\n metrics=None,\n+ random_seed=None,\n+ activation=\"sigmoid\",\n+ use_bias=True,\n+ optimizer_=None,",
"line": null,
"original_line": 86,
"original_st... | 4e8fe528ceb43b96bf6b89100bbecb9626a962b9 | diff --git a/sktime/classification/deep_learning/base.py b/sktime/classification/deep_learning/base.py
index 987198f9952..b6f8c865e77 100644
--- a/sktime/classification/deep_learning/base.py
+++ b/sktime/classification/deep_learning/base.py
@@ -66,6 +66,18 @@ def build_model(self, input_shape, n_classes, **kwargs):
... | {
"difficulty": "high",
"estimated_review_effort": 4,
"problem_domain": "New Feature Additions"
} |
saltstack__salt-47115@eb91887 | saltstack/salt | Python | 47,115 | salt-cloud/vmware if specified use ssh_host to deploy | Fixes #36543
### What does this PR do?
In the salt-cloud vmware provider, use ssh_host when specified to deploy salt.
### What issues does this PR fix or reference?
#36543
### Previous Behavior
Deploy salt through the first discovered IP address.
### New Behavior
If ssh_host is defined in the profile, p... | 2018-04-17T09:46:03Z | Salt Cloud / vmware: Allow 'ssh_host' in VM profile
### Description of Issue/Question
In my situation, I'm using Salt Cloud with VMWare to create VMs in vCenter. Some VMs need to have two NICs defined, but due to business reasons, only the IP on "Network adapter 1" (eth0) will be functional on first boot. Unfortunatel... | @benrolsen Thanks for filing this request and thank you to @nmadhok for volunteering to take a look at this one!
I have a similar request, but the use case is a bit different.
In my setup the deployed vm ip addresses are all internal to the cluster. Communication to the outside world is through NAT and port forwardin... | [
{
"body": "### Description of Issue/Question\n\nIn my situation, I'm using Salt Cloud with VMWare to create VMs in vCenter. Some VMs need to have two NICs defined, but due to business reasons, only the IP on \"Network adapter 1\" (eth0) will be functional on first boot. Unfortunately, Salt Cloud (or its vmware ... | 5852993f0f9704f1737d44caa247ebb35742b84d | {
"head_commit": "eb918874ec615b438bba284b61f836cf99094e70",
"head_commit_message": "salt-cloud/vmware if specified use ssh_host to deploy\n\nFixes #36543",
"patch_to_review": "diff --git a/salt/cloud/clouds/vmware.py b/salt/cloud/clouds/vmware.py\nindex c04cf52dc97d..022d807cf8db 100644\n--- a/salt/cloud/clouds/... | [
{
"diff_hunk": "@@ -2803,7 +2803,9 @@ def create(vm_):\n # ssh or smb using ip and install salt only if deploy is True\n if deploy:\n vm_['key_filename'] = key_filename\n- vm_['ssh_host'] = ip\n+ # if specified, prefer ssh_host to the discove... | c6a62966e680449dfbcecacc19455b9fd0559c4f | diff --git a/salt/cloud/clouds/vmware.py b/salt/cloud/clouds/vmware.py
index c04cf52dc97d..0984535bcb8f 100644
--- a/salt/cloud/clouds/vmware.py
+++ b/salt/cloud/clouds/vmware.py
@@ -2803,7 +2803,10 @@ def create(vm_):
# ssh or smb using ip and install salt only if deploy is True
if deploy:
... | {
"difficulty": "low",
"estimated_review_effort": 2,
"problem_domain": "New Feature Additions"
} |
saltstack__salt-47372@05ab624 | saltstack/salt | Python | 47,372 | Allow for passing in previously compiled grains to custom grain modules | ### What does this PR do?
If a grains module function accepts a variable named `grains` then the grains dict will be passed in.
### What issues does this PR fix or reference?
Closes #47338
### Previous Behavior
No grains are passed to custom grains modules
### New Behavior
Previously compiled grains are pa... | 2018-04-27T20:25:02Z | Accessing Grains in Custom Grains
This is a question and possibly a feature request.
When writing custom grains I want to be able to utilize already existing grain information (either from core grains or other custom grains) in my custom grain. This is useful for situations when one property of a minion depends on a... | No dunders are injected into the grains modules except for `__opts__`, because we use grains for loading other modules, and you can't reliably know that grains will already be loaded in order to reference them in other grains.
Also, the problem with importing other grains, is that the best way to load them is throug... | [
{
"body": "This is a question and possibly a feature request.\r\n\r\nWhen writing custom grains I want to be able to utilize already existing grain information (either from core grains or other custom grains) in my custom grain. This is useful for situations when one property of a minion depends on another prop... | 1de101b8abbb6976359e8e0f0506af9c2c867fd9 | {
"head_commit": "05ab624fcd8106c69785248822c2f731cefa4720",
"head_commit_message": "Allow for passing in previously compiled grains to custom grain modules\n\nCloses #47338",
"patch_to_review": "diff --git a/doc/topics/grains/index.rst b/doc/topics/grains/index.rst\nindex 2b1967815214..d1fbee3b70df 100644\n--- a... | [
{
"diff_hunk": "@@ -751,8 +751,14 @@ def grains(opts, force_refresh=False, proxy=None):\n # proxymodule for retrieving information from the connected\n # device.\n log.trace('Loading %s grain', key)\n- if funcs[key].__code__.co_argcount == 1:\n- ret ... | 4d0bbc71cedfd0d1013d79e25b041b7d83eff1f0 | diff --git a/doc/topics/grains/index.rst b/doc/topics/grains/index.rst
index 2b1967815214..eb6b4a6dd42d 100644
--- a/doc/topics/grains/index.rst
+++ b/doc/topics/grains/index.rst
@@ -269,6 +269,11 @@ grain will override that core grain. Similarly, grains from
``/etc/salt/minion`` override both core grains and custom g... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "New Feature Additions"
} |
sktime__sktime-2707@ac1ca16 | sktime/sktime | Python | 2,707 | [ENH] Add DummyClassifier | Fixes #2507.
#### What does this implement/fix? Explain your changes.
Adds a DummyClassifier that wraps over a sklearn DummyClassifier and inherits from BaseClassifier.
#### Does your contribution introduce a new dependency? If yes, which one?
No
#### PR checklist
##### For all contributions
- [x] I'... | 2022-05-27T23:11:32Z | [ENH] DummyClassifier
We should implement a `DummyClassifier`, similar to the one in `sklearn`.
Functionality can be equivalent, except that it should inherit from `BaseClassifier` in `sktime`.
Suggestion: impot `sklearn` `DummyClassifier`, loop through all the inputs and loop through `y`, create some 2D `X` for th... | If no one objects I am interested in working on it to get my feet wet. Seems like a great first issue!
Great! Have fun!
Here's the developer guide on adding a new estimator:
https://www.sktime.org/en/stable/developer_guide/add_estimators.html
In this case, we are dealing with a time series classifier, so it should i... | [
{
"body": "We should implement a `DummyClassifier`, similar to the one in `sklearn`.\r\nFunctionality can be equivalent, except that it should inherit from `BaseClassifier` in `sktime`.\r\n\r\nSuggestion: impot `sklearn` `DummyClassifier`, loop through all the inputs and loop through `y`, create some 2D `X` for... | f2284e2f338b3950d2e2c39ae67068e983d8296a | {
"head_commit": "ac1ca163084b9b081a6257ad84ef4ee000e04fe7",
"head_commit_message": "Call super().__init__()",
"patch_to_review": "diff --git a/.all-contributorsrc b/.all-contributorsrc\nindex acc8b08f63a..0aa46f0f0b5 100644\n--- a/.all-contributorsrc\n+++ b/.all-contributorsrc\n@@ -1566,6 +1566,15 @@\n \"c... | [
{
"diff_hunk": "@@ -0,0 +1,73 @@\n+# -*- coding: utf-8 -*-\n+\"\"\"Dummy time series classifier.\"\"\"\n+\n+__author__ = [\"ZiyaoWei\"]\n+__all__ = [\"DummyClassifier\"]\n+\n+import numpy as np\n+from sklearn.dummy import DummyClassifier as SklearnDummyClassifier\n+\n+from sktime.classification.base import Base... | f630a02a5059a3aaf7763f9cc2a7edd683cf1ec5 | diff --git a/.all-contributorsrc b/.all-contributorsrc
index 7b69c6f67b6..e779c41b7f8 100644
--- a/.all-contributorsrc
+++ b/.all-contributorsrc
@@ -1593,7 +1593,7 @@
"code"
]
},
- {
+ {
"login": "bethrice44",
"name": "bethrice44",
"avatar_url": "https://avatars.githubus... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "New Feature Additions"
} |
saltstack__salt-44455@766cd24 | saltstack/salt | Python | 44,455 | Fix for #38838 | ### What does this PR do?
fix behavior of aptpkg.list_pkgs function. Now it works as in description "List the packages currently INSTALLED in a dict"
### What issues does this PR fix or reference?
fix #38838
### Previous Behavior
return wrong data
check with #38838 issue
### New Behavior
returns info only ... | 2017-11-09T11:44:28Z | Failing to remove nginx
### Description of Issue/Question
Hi there,
I am playing with SaltStack, trying to get a feel for everything. I've ran into what I think could possibly be a bug - removing nginx does not work correctly. All involved machines are running fully updated Ubuntu 16.04 and all packages are current... | @Zorlin looks like i'm able to replicate this. Looks like salt runs this command to check if its been removed:
`dpkg-query --showformat '${Status} ${Package} ${Version} ${Architecture}' -W ` If you manually uninstall nginx as well the following packages still show up in the output of that command: nginx-common and n... | [
{
"body": "### Description of Issue/Question\r\nHi there,\r\n\r\nI am playing with SaltStack, trying to get a feel for everything. I've ran into what I think could possibly be a bug - removing nginx does not work correctly. All involved machines are running fully updated Ubuntu 16.04 and all packages are curren... | d0ae909afc09e637f3f5fb945072e1e4d4fd8f9d | {
"head_commit": "766cd24dbc5674e6e7f2f198b464828a603ead07",
"head_commit_message": "fix #38838\n\n update aptpkg.list_pkgs behavior",
"patch_to_review": "diff --git a/salt/modules/aptpkg.py b/salt/modules/aptpkg.py\nindex b79e6fa22999..c1928da963f5 100644\n--- a/salt/modules/aptpkg.py\n+++ b/salt/modules/aptpkg... | [
{
"diff_hunk": "@@ -1401,7 +1401,9 @@ def list_pkgs(versions_as_list=False,\n for realpkg, provides in six.iteritems(virtpkgs_all):\n # grep-available returns info on all virtual packages. Ignore any\n # virtual packages that do not have the real package installed.\n- ... | 6150aa88b13ead38cefae000cc749a05b51988cc | diff --git a/salt/modules/aptpkg.py b/salt/modules/aptpkg.py
index b79e6fa22999..5fd5f4e9f758 100644
--- a/salt/modules/aptpkg.py
+++ b/salt/modules/aptpkg.py
@@ -1392,7 +1392,7 @@ def list_pkgs(versions_as_list=False,
version_num)
# Check for virtual packages. W... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
saltstack__salt-55824@1ea15c4 | saltstack/salt | Python | 55,824 | Bug fixes in Junos-related components | ### What does this PR do?
Multiple bug fixes were done for Junos-related components in salt.
### What issues does this PR fix or reference?
- Fixes https://github.com/Juniper/salt/issues/85, https://github.com/Juniper/salt/issues/86, https://github.com/Juniper/salt/issues/88, https://github.com/Juniper/salt/issue... | 2020-01-09T09:20:45Z | install_config times out on longer commit checks
Using new timeoutdecorator still doesn't fix install_config for me when commit_check takes 30+ seconds as well. Looks like timeout is set temporarily for certain tasks but not the commit check.
The only way I can get longer device commits to work (that take +30 second... | @Zapotomous Could you please provide the following details.
* What branch of the repository are you currently using ??
Example :
```
git branch
* 2018.3.3
develop
updated_develop
```
* What is the salt command you are trying to run ??
Example:
`salt 'device_name' junos.install_config 'salt://config.set... | [
{
"body": "Using new timeoutdecorator still doesn't fix install_config for me when commit_check takes 30+ seconds as well. Looks like timeout is set temporarily for certain tasks but not the commit check.\r\n\r\nThe only way I can get longer device commits to work (that take +30 seconds to commit check as well)... | 2520ae8675185a747dbadd09bc47c305f476886f | {
"head_commit": "1ea15c433790ee0b54dcc6403da9a903572bf544",
"head_commit_message": "fix: salt.states.junos.rst:20:Pygments lexer name 'set' is not known",
"patch_to_review": "diff --git a/requirements/static/darwin.in b/requirements/static/darwin.in\nindex 9e48f6151d9d..9a73a138ca4e 100644\n--- a/requirements/st... | [
{
"diff_hunk": "@@ -33,16 +33,15 @@ def wrapper(*args, **kwargs):\n \n \n @resultdecorator\n-def rpc(name, dest=None, format=\"xml\", args=None, **kwargs):\n+def rpc(name, **kwargs):",
"line": null,
"original_line": 36,
"original_start_line": null,
"path": "salt/states/junos.py",
"start_line... | 40250634874684d66d4a2984a7520e8d95611713 | diff --git a/requirements/static/darwin.in b/requirements/static/darwin.in
index 6a49c0847cc7..8ea03ccadbb1 100644
--- a/requirements/static/darwin.in
+++ b/requirements/static/darwin.in
@@ -8,7 +8,7 @@ docker
futures>=2.0; python_version < '3.0'
jmespath
jsonschema
-junos-eznc
+junos-eznc==2.4.0
jxmlease
keyring=... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "Performance Optimizations"
} |
saltstack__salt-38716@c780d2a | saltstack/salt | Python | 38,716 | Fix for #38318 | This is my first foray in the salt codebase, so apologies in advance if I've got any of the process wrong.
### What does this PR do?
Fixes #38318
A file.recurse state with clean=True that "requires" another recurse state will correctly remove files that do not originate in from either state.
### What issues d... | 2017-01-12T21:35:51Z | file.recurse clean: True and requires not working together
### Description of Issue/Question
trying to help someone earlyer today i setup a test to make sure what i was saying would be true.
my test consisted of 2 file.recurse states. one requiring the other. the one with the require also had clean: True
when i r... | I'm the guy he was helping :)
FWIW, I did a similar test and got a similar result on 2016.3.1. I also tried with the first file state as a file.managed instead of file.recurse, and that behaved correctly, retaining the file managed by the "required" state and removing an extra one added by hand.
@whytewolf looks lik... | [
{
"body": "### Description of Issue/Question\r\ntrying to help someone earlyer today i setup a test to make sure what i was saying would be true. \r\nmy test consisted of 2 file.recurse states. one requiring the other. the one with the require also had clean: True\r\n\r\nwhen i ran the state it ran as expecting... | 424e83d4728319566fa30cb43822273bffd7020f | {
"head_commit": "c780d2a32b381f8ad6c2cada2f5005d99c99f68f",
"head_commit_message": "Move generation of managed files/dirs/symlinks in a recurse state into a new function, that is also used by _gen_keep_files to get this list of files to keep from required recurse states.\n\nFormatting fixes",
"patch_to_review":... | [
{
"diff_hunk": "@@ -406,16 +539,22 @@ def _process(name):\n # another state.\n if low['name'] == comp['file'] or low['__id__'] == comp['file']:\n fn = low['name']\n+ fun = low['fun']\n if os.path.isdir(fn):\n ... | 3807e2c2d9d4bec98fd731323ff2032c6e964531 | diff --git a/salt/states/file.py b/salt/states/file.py
index 96915736f400..20ea4e90e853 100644
--- a/salt/states/file.py
+++ b/salt/states/file.py
@@ -350,6 +350,139 @@ def _check_user(user, group):
return err
+def _gen_recurse_managed_files(
+ name,
+ source,
+ keep_symlinks=False,
+ ... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "Bug Fixes"
} |
sqlfluff__sqlfluff-865@9e69af8 | sqlfluff/sqlfluff | Python | 865 | Issue 855: UPDATE should support table aliasing and FROM clause | Resolves #855 | 2021-03-14T20:37:07Z | [BigQuery] Found unparsable section: 'UPDATE\n
Hi there!
I am running sqlfluff on a BigQuery update query and the linter throws an `unparsable section` error.
## lint
```sql
UPDATE
`my_project.my_table.my_table` AS tttd
SET
tttd.days=ttu.days,
tttd.closure=ttu.clousre
FROM
`{source_table_id}` A... | I think this issue is the result of two missing grammar features:
* Support for aliases in `UPDATE` statements (`AS tttd`). This [section of the docs](https://cloud.google.com/bigquery/docs/reference/standard-sql/dml-syntax#update_examples) has an example. This syntax is also supported by [Postgres](https://www.postgr... | [
{
"body": "Hi there!\r\n\r\nI am running sqlfluff on a BigQuery update query and the linter throws an `unparsable section` error.\r\n\r\n## lint \r\n\r\n```sql\r\nUPDATE\r\n `my_project.my_table.my_table` AS tttd\r\nSET\r\n tttd.days=ttu.days,\r\n tttd.closure=ttu.clousre\r\nFROM\r\n `{source_table_id}` AS ... | 9a0c8f55075352325fc4b92fd21bbe2c8f3913ba | {
"head_commit": "9e69af8f15fd65b68324321de5a229a13a60d776",
"head_commit_message": "Issue 855: UPDATE should support table aliasing and FROM clause",
"patch_to_review": "diff --git a/src/sqlfluff/core/dialects/ansi_keywords.py b/src/sqlfluff/core/dialects/ansi_keywords.py\nindex c3a9feadb2a..11c7882e4e1 100644\n... | [
{
"diff_hunk": "@@ -3,7 +3,8 @@ file:\n update_statement:\n keyword: UPDATE\n table_reference:\n- identifier: table_name\n+ table_reference:",
"line": null,
"original_line": 6,
"original_start_line": null,
"path": "test/fixtures/parser/ansi/update.yml",
"start_l... | e92618957ce03df832fdadb41aa7329907f46ab2 | diff --git a/src/sqlfluff/core/dialects/ansi_keywords.py b/src/sqlfluff/core/dialects/ansi_keywords.py
index c3a9feadb2a..11c7882e4e1 100644
--- a/src/sqlfluff/core/dialects/ansi_keywords.py
+++ b/src/sqlfluff/core/dialects/ansi_keywords.py
@@ -19,6 +19,7 @@
PARTITION
ORDER
ROWS
+SET
"""
ansi_unreserved_keywords... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "Code Style, Linting, Formatting Fixes"
} |
saltstack__salt-37094@0a2bc36 | saltstack/salt | Python | 37,094 | add size converter and start convert active size | ### What does this PR do?
fix #37093
### What issues does this PR fix or reference?
#37093
### Tests written?
No
| 2016-10-19T15:24:34Z | salt remount device every time
### Description of Issue/Question
if we have state with mount
```
/hugetlbfs:
mount.mounted:
- device: hugetlbfs
- fstype: hugetlbfs
- opts: size=110g,mode=0777
```
and already mount it with options size=110g,mode=0777 salt start remount this device every time.
### Setup
... | [
{
"body": "### Description of Issue/Question\n\nif we have state with mount\n\n```\n/hugetlbfs:\n mount.mounted:\n - device: hugetlbfs\n - fstype: hugetlbfs\n - opts: size=110g,mode=0777\n```\n\nand already mount it with options size=110g,mode=0777 salt start remount this device every time.\n### Setup... | 454a721bffc3a15d4010da45ed4cd5a964263e50 | {
"head_commit": "0a2bc366bd65ea3871b4850e727e2d9a4e9303ac",
"head_commit_message": "add size converter and start convert active size",
"patch_to_review": "diff --git a/salt/states/mount.py b/salt/states/mount.py\nindex 5761ea9e6d1e..cf4014fbeecc 100644\n--- a/salt/states/mount.py\n+++ b/salt/states/mount.py\n@@ ... | [
{
"diff_hunk": "@@ -39,6 +39,15 @@\n log = logging.getLogger(__name__)\n \n \n+def _size_convert(_re_size):\n+ converted_size = int(_re_size.group('size_value'))\n+ if _re_size.group('size_unit') == 'm':\n+ converted_size = int(size) * 1024\n+ if _re_size.group('size_unit') == 'g':\n+ con... | 7c4898457763f3db0cfcafef29b38c5b898f60e6 | diff --git a/salt/states/mount.py b/salt/states/mount.py
index 5761ea9e6d1e..7b8cae59dc19 100644
--- a/salt/states/mount.py
+++ b/salt/states/mount.py
@@ -39,6 +39,15 @@
log = logging.getLogger(__name__)
+def _size_convert(_re_size):
+ converted_size = int(_re_size.group('size_value'))
+ if _re_size.group('s... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} | |
scikit-learn__scikit-learn-17550@3bf9ad2 | scikit-learn/scikit-learn | Python | 17,550 | DOC Add example of using CV iterator to split train test | <!--
Thanks for contributing a pull request! Please ensure you have taken a look at
the contribution guidelines: https://github.com/scikit-learn/scikit-learn/blob/master/CONTRIBUTING.md#pull-request-checklist
-->
#### Reference Issues/PRs
closes #9193
#### What does this implement/fix? Explain your changes.
... | 2020-06-09T18:06:56Z | add support for groups in train_test_split
`train_test_split` has support for options 'stratify' and 'shuffle' but not 'groups'.
I'm interested in adding support for 'groups' to `train_test_split` (so that all samples from the same group will be in either train or test but not both). In 0.18.1 there is support for ... | Related to #8844 and #8845
Hm I'm not sure we want to go overboard with this helper.
You can do
```python
train_inds, test_inds = GroupShuffleSplit().split(X, y, goups).next()
X_train, X_test, y_train, y_test = X[train_inds], X[test_inds], y[train_inds], y[test_inds]
```
Okay, makes sense. That snippet is much m... | [
{
"body": "`train_test_split` has support for options 'stratify' and 'shuffle' but not 'groups'.\r\n\r\nI'm interested in adding support for 'groups' to `train_test_split` (so that all samples from the same group will be in either train or test but not both). In 0.18.1 there is support for the option 'stratify... | 071ce4bf8672a5fb9b3df66c2b2b5515a09a52d0 | {
"head_commit": "3bf9ad2a69be1aa4ba1ea77a70c0b1335f85ab8b",
"head_commit_message": "set random state",
"patch_to_review": "diff --git a/doc/modules/cross_validation.rst b/doc/modules/cross_validation.rst\nindex 61ea8c7ef4248..c8466a69ce25b 100644\n--- a/doc/modules/cross_validation.rst\n+++ b/doc/modules/cross_v... | [
{
"diff_hunk": "@@ -744,6 +744,35 @@ e.g. when searching for hyperparameters.\n For example, when using a validation set, set the ``test_fold`` to 0 for all\n samples that are part of the validation set, and to -1 for all other samples.\n \n+Using cross-validation iterators to split train and test\n+-----------... | 08e7dc7ef9582fa0a8416140b9238580400ba0c0 | diff --git a/doc/modules/cross_validation.rst b/doc/modules/cross_validation.rst
index 61ea8c7ef4248..fd181b3165e0c 100644
--- a/doc/modules/cross_validation.rst
+++ b/doc/modules/cross_validation.rst
@@ -744,6 +744,35 @@ e.g. when searching for hyperparameters.
For example, when using a validation set, set the ``test... | {
"difficulty": "low",
"estimated_review_effort": 1,
"problem_domain": "New Feature Additions"
} |
saltstack__salt-36375@8a400e0 | saltstack/salt | Python | 36,375 | Option to update htpasswd only if changed | ### What does this PR do?
Adds a boolean flag called `update` to `webutil.user_exists` to make it update a user's password if it has changed.
### What issues does this PR fix or reference?
Fixes #35445
### Previous Behavior
The file is not updated if the user exists in the file at all. There exists a `force` option,... | 2016-09-16T19:04:48Z | webutils.user_exits does not enforce password updates
### Description of Issue/Question
The webutils user_exists feature doesn't appear to enforce the password for a htpasswd user.
It will ensure it exists but will not update the password if the source password value changes.
If i use the force=True option it changes ... | @paul-mulvihill looks like you are correct. Glancing at the code [here](https://github.com/saltstack/salt/blob/develop/salt/states/htpasswd.py#L62) It just checks to see if the user already exists in the htpasswd file. If user exists then it does not update the information.
@paul-mulvihill @Ch3LL
I think if you apply... | [
{
"body": "### Description of Issue/Question\n\nThe webutils user_exists feature doesn't appear to enforce the password for a htpasswd user.\nIt will ensure it exists but will not update the password if the source password value changes.\nIf i use the force=True option it changes the file every run which is als... | 062e812e1b785a8d21ce9f9a7d3b73c4354cfecb | {
"head_commit": "8a400e0104b38a5d7240ab371781e3eae9c17442",
"head_commit_message": "Option to update htpasswd only if changed",
"patch_to_review": "diff --git a/salt/modules/htpasswd.py b/salt/modules/htpasswd.py\nindex 4114b895761f..6a35db05277f 100644\n--- a/salt/modules/htpasswd.py\n+++ b/salt/modules/htpassw... | [
{
"diff_hunk": "@@ -139,3 +139,46 @@ def userdel(pwfile, user, runas=None):\n out = __salt__['cmd.run'](cmd, runas=runas,\n python_shell=False).splitlines()\n return out\n+\n+\n+def verify(pwfile, user, password, opts='', runas=None):\n+ '''\n+ Return True if the htpa... | b02f79bb779681bd766e33270ae8176b0a041ffc | diff --git a/salt/modules/htpasswd.py b/salt/modules/htpasswd.py
index 4114b895761f..c05dc4ac4c75 100644
--- a/salt/modules/htpasswd.py
+++ b/salt/modules/htpasswd.py
@@ -139,3 +139,46 @@ def userdel(pwfile, user, runas=None):
out = __salt__['cmd.run'](cmd, runas=runas,
python_shell=... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
scikit-learn__scikit-learn-17526@0478d08 | scikit-learn/scikit-learn | Python | 17,526 | [MRG]Fix simple imputer for string input | #### Reference Issues/PRs
Fixes #17525
#### What does this implement/fix?
* Fix to accept list of strings in ```SimpleImputer``` with ```strategy```="most_frequent" or "constant"
* Add unittest
#### Any other comments?
* If this PR is not proper, please tell me. I will close:) | 2020-06-07T23:03:33Z | ValueError in SimpleImputer for string input with strategy='most_frequent'/'constant'
#### Describe the bug
* List of strings raise ValueError in SimpleImputer with strategy='most_frequent' (also 'constant')
#### Steps/Code to Reproduce
```python
import numpy as np
from sklearn.impute import SimpleImputer
... | I can reproduce the error. Since the documentation says that `fit` and `transform` methods allow `array-like` (`list` or `ndarray`) as input, I would assume that this is a bug.
@alfaro96 Thank you for your comment!
I tried to fix the issue at PR #17526.
I would be grateful if you could check the PR when you have t... | [
{
"body": "#### Describe the bug\r\n* List of strings raise ValueError in SimpleImputer with strategy='most_frequent' (also 'constant')\r\n\r\n#### Steps/Code to Reproduce\r\n\r\n```python\r\nimport numpy as np\r\nfrom sklearn.impute import SimpleImputer\r\n\r\n\r\nX = [['a', 'b', 'c'], ['d', 'e', np.nan]]\r\n\... | 53befd82e389da5fa1c96156759bd1bc908a8658 | {
"head_commit": "0478d08314a9f40ec04cbc736ee4c2130a70f8fb",
"head_commit_message": "Fix highlight in change log",
"patch_to_review": "diff --git a/doc/whats_new/v0.24.rst b/doc/whats_new/v0.24.rst\nindex 848b415890452..9cd8902f0643f 100644\n--- a/doc/whats_new/v0.24.rst\n+++ b/doc/whats_new/v0.24.rst\n@@ -61,6 +... | [
{
"diff_hunk": "@@ -351,6 +351,21 @@ def test_imputation_most_frequent_pandas(dtype):\n assert_array_equal(X_trans, X_true)\n \n \n+def test_imputation_most_frequent_string_list():\n+ X = [['a', 'b'],\n+ ['c', np.nan]]\n+\n+ X_true = np.array([\n+ ['a', 'b'],\n+ ['c', 'b']\n+ ... | 730585907b34b96e0d0b056339373ca3d703f3c6 | diff --git a/doc/whats_new/v0.24.rst b/doc/whats_new/v0.24.rst
index 848b415890452..9cd8902f0643f 100644
--- a/doc/whats_new/v0.24.rst
+++ b/doc/whats_new/v0.24.rst
@@ -61,6 +61,10 @@ Changelog
change since `None` was defaulting to these values already.
:pr:`16493` by :user:`Darshan N <DarshanGowda0>`.
+- |Feat... | {
"difficulty": "low",
"estimated_review_effort": 2,
"problem_domain": "Bug Fixes"
} |
sktime__sktime-2609@64f2971 | sktime/sktime | Python | 2,609 | [BUG] Fix Prophet with logistic growth #1079 | #### Reference Issues/PRs
Fixes #1079 and #2444
Copy and paste of #1868
#### What does this implement/fix? Explain your changes.
Adds the possibility to define the required "cap" and "floor" parameters for Prophet when its growth is set to logistic.
#### Any other comments?
Suggest closing old relevant issue... | 2022-05-06T09:23:48Z | [BUG] Prophet with logistic growth does not work
**Describe the bug**
It is not compatible with the case that the growth parameter of prophet is equal to ‘logistic‘
**To Reproduce**
```python
from sktime.datasets import load_airline
y = load_airline()
y = y.to_timestamp(freq="M")
y_train, y_test = temporal_t... | Yes, I can confirm this, this is because setting the growth parameter to "logistic" requires passing a `pd.DataFrame` with additional columns "cap" and "floor".
This is related to #980.
Well, but certainly not caused by #980 (because it's not merged yet), but potentially solved by #980, right?
> Yes, I can confirm... | [
{
"body": "**Describe the bug**\r\nIt is not compatible with the case that the growth parameter of prophet is equal to ‘logistic‘\r\n\r\n**To Reproduce**\r\n```python\r\n\r\nfrom sktime.datasets import load_airline\r\ny = load_airline()\r\ny = y.to_timestamp(freq=\"M\")\r\ny_train, y_test = temporal_train_test_... | 0e9400f789ad7b574fd37841cbc0c81e818e8f5e | {
"head_commit": "64f2971606cb7827029b710f18e0d49b6bb63eb5",
"head_commit_message": "Merge branch 'issue_1079' of https://github.com/k1m190r/sktime into issue_1079",
"patch_to_review": "diff --git a/sktime/forecasting/base/adapters/_fbprophet.py b/sktime/forecasting/base/adapters/_fbprophet.py\nindex 35b35198cbe.... | [
{
"diff_hunk": "@@ -142,7 +151,7 @@ def __init__(\n uncertainty_samples=1000,\n stan_backend=None,\n verbose=0,\n- interval_width=0,\n+ interval_width=0.80,",
"line": null,
"original_line": 154,
"original_start_line": null,
"path": "sktime/forecasting/fbprop... | 1f2505a15065188d644f0a71ed342a04946db91a | diff --git a/sktime/forecasting/base/adapters/_fbprophet.py b/sktime/forecasting/base/adapters/_fbprophet.py
index 35b35198cbe..a0f2f5dd14a 100644
--- a/sktime/forecasting/base/adapters/_fbprophet.py
+++ b/sktime/forecasting/base/adapters/_fbprophet.py
@@ -66,6 +66,18 @@ def _fit(self, y, X=None, fh=None):
... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
sqlfluff__sqlfluff-785@a773362 | sqlfluff/sqlfluff | Python | 785 | #716: Support configurable file extensions | This resolves #716.
This was originally configurable through a kwarg of the `Linter()` class, but nothing ever used that kwarg. I've moved the configuration of that value to the `FluffConfig` so that it can be driven by the config files. I've also added `.dml`, `.ddl` and `.sql.j2` files to the default search. | 2021-02-19T21:51:14Z | Add Support for Alternate File Types/Extensions
It would be awesome if sqlfluff could support configuring a list of file types/extensions to be considered by the `lint` and `fix` commands. Ideally, the configuration could be done in the `.sqlfluff` file.
One example would be Jinja2 files that are templated SQL state... | [
{
"body": "It would be awesome if sqlfluff could support configuring a list of file types/extensions to be considered by the `lint` and `fix` commands. Ideally, the configuration could be done in the `.sqlfluff` file.\r\n\r\nOne example would be Jinja2 files that are templated SQL statements. Using the conventi... | ca1b5d93fffa92ac3ac6dcc93fbe8594cf545861 | {
"head_commit": "a773362350e8b800b5eb164e1f3d8a7599fad351",
"head_commit_message": "#716: Support configurable file extensions",
"patch_to_review": "diff --git a/src/sqlfluff/core/default_config.cfg b/src/sqlfluff/core/default_config.cfg\nindex 04d3bef4205..f59e5593e97 100644\n--- a/src/sqlfluff/core/default_con... | [
{
"diff_hunk": "@@ -9,6 +9,9 @@ recurse = 0\n output_line_length = 80\r\n runaway_limit = 10\r\n ignore_templated_areas = True\r\n+# Comma seperated list of file extentions to lint.\r",
"line": null,
"original_line": 12,
"original_start_line": null,
"path": "src/sqlfluff/core/default_config.cfg"... | e5a099230e61253a91e7a022c5147f80879b4e23 | diff --git a/src/sqlfluff/core/default_config.cfg b/src/sqlfluff/core/default_config.cfg
index 04d3bef4205..669a11ad698 100644
--- a/src/sqlfluff/core/default_config.cfg
+++ b/src/sqlfluff/core/default_config.cfg
@@ -9,6 +9,10 @@ recurse = 0
output_line_length = 80
runaway_limit = 10
ignore_templated_areas = True
... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "New Feature Additions"
} | |
scikit-learn__scikit-learn-17478@b95a75c | scikit-learn/scikit-learn | Python | 17,478 | ENH add score_samples method in base search CV and add tests | #### Reference Issues/PRs
Fixes https://github.com/scikit-learn/scikit-learn/issues/12542.
Building on and closes https://github.com/scikit-learn/scikit-learn/pull/16275.
#### What does this implement/fix? Explain your changes.
This adds the ability to call `score_samples` on the estimator with the best found p... | 2020-06-06T17:17:21Z | Add a score_samples method to Pipeline and *SearchCV
Hello,
scikit-learn 0.20 provides more consistent outlier detection API.
- covariance.EllipticEnvelope
- svm.OneClassSVM
- ensemble.IsolationForest
- neighbors.LocalOutlierFactor
So I would like to use `Pipeline`, `GridSearchCV`, and `RandomizedSearchCV` ... | Does #13806 close this or is there something more to address?
Fixed in #13806
I think the *SearchCV are still missing, right?
I am working on this issue as part of the sklearn Paris Sprint 2020.
it looks like the related PR is stale. I will build on this PR and take this for the sprint | [
{
"body": "Hello,\r\n\r\nscikit-learn 0.20 provides more consistent outlier detection API.\r\n\r\n- covariance.EllipticEnvelope\r\n- svm.OneClassSVM\r\n- ensemble.IsolationForest\r\n- neighbors.LocalOutlierFactor\r\n\r\nSo I would like to use `Pipeline`, `GridSearchCV`, and `RandomizedSearchCV` that have a `sco... | e57fab1265969686a3c218c52dce507e7bd9486c | {
"head_commit": "b95a75ca11951d8ca5f427fee76b62066f280186",
"head_commit_message": "address some linting issues",
"patch_to_review": "diff --git a/sklearn/model_selection/_search.py b/sklearn/model_selection/_search.py\nindex f0ead220fafe6..3aabf809db37d 100644\n--- a/sklearn/model_selection/_search.py\n+++ b/sk... | [
{
"diff_hunk": "@@ -1097,6 +1099,64 @@ def compare_refit_methods_when_refit_with_acc(search_multi, search_acc, refit):\n assert getattr(search_multi, key) == getattr(search_acc, key)\n \n \n+@pytest.mark.parametrize('search_cv',\n+ [RandomizedSearchCV(estimator=DecisionTreeClassi... | ce6d6e13c0aa7b78e2bfd9a846267fe0fe44f13e | diff --git a/doc/whats_new/v0.24.rst b/doc/whats_new/v0.24.rst
index 2aebbaed470ab..8a9b081562bd6 100644
--- a/doc/whats_new/v0.24.rst
+++ b/doc/whats_new/v0.24.rst
@@ -91,6 +91,11 @@ Changelog
samples between the train and test set on each fold.
:pr:`13204` by :user:`Kyle Kosic <kykosic>`.
+- |Feature| :class:... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "New Feature Additions"
} |
sqlfluff__sqlfluff-782@548b920 | sqlfluff/sqlfluff | Python | 782 | L042: #89 No Subqueries in Joins | This resolves #89 (and also the oldest open issue right now!)
This flags up any subqueries in join clauses, indicating that the user should use CTEs instead.
Small note, I also corrected the naming of `MainTableExpressionGrammar` to `MainTableExpressionSegment` because it was a `Segment` and not a `Grammar`. 😄 | 2021-02-19T18:18:09Z | Rule: No nested selects within join clauses.
This is a pretty general, high-level quality check. I often see this issue with SQL written by new data scientists or engineers -- they'll deliver a working query, but it's monolithic and 50+ lines long. Even with proper indentation, it's hard to grasp what going on.
When... | I like this as an idea. Do you think it's about nested `SELECT` statements here? That would be the easiest to put a rule around: i.e. More than 3 nested select statements raises a linting error.
What I'm not sure about is whether that catches all the cases that you're thinking about. @barrywhart Anything else you t... | [
{
"body": "This is a pretty general, high-level quality check. I often see this issue with SQL written by new data scientists or engineers -- they'll deliver a working query, but it's monolithic and 50+ lines long. Even with proper indentation, it's hard to grasp what going on.\r\n\r\nWhen this occurs, SQLFluff... | 15fb561a40732c6f039ac3b82d30c114b5381f2c | {
"head_commit": "548b920fc15ed78b2900ddfba7406dd94fdc57b4",
"head_commit_message": "L042: #89 No Subqueries in Joins",
"patch_to_review": "diff --git a/src/sqlfluff/core/dialects/dialect_ansi.py b/src/sqlfluff/core/dialects/dialect_ansi.py\nindex 016383b07d5..a15793e8cb0 100644\n--- a/src/sqlfluff/core/dialects/... | [
{
"diff_hunk": "@@ -0,0 +1,64 @@\n+\"\"\"Implementation of Rule L042.\"\"\"\n+\n+from sqlfluff.core.rules.base import BaseCrawler, LintResult\n+\n+\n+class Rule_L042(BaseCrawler):\n+ \"\"\"Join clauses should not contain subqueries. Use CTEs instead.\n+\n+ NB: Some dialects don't allow CTEs, and for those... | 4fc1209fb8ac63da27188879aab063b0a71d47ee | diff --git a/src/sqlfluff/core/default_config.cfg b/src/sqlfluff/core/default_config.cfg
index a39bc0f8290..04d3bef4205 100644
--- a/src/sqlfluff/core/default_config.cfg
+++ b/src/sqlfluff/core/default_config.cfg
@@ -59,3 +59,7 @@ select_clause_trailing_comma = forbid
[sqlfluff:rules:L040] # Null & Boolean Literal... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Code Refactoring / Architectural Improvement"
} |
sqlfluff__sqlfluff-705@d178b84 | sqlfluff/sqlfluff | Python | 705 | Use pluggy to allow plugin architecture for custom rules | # Using pluggy to allow plugin architecture for custom rules (initially)
Resolves #164
This PR changes sqlfluff to allow custom rules to be plugged through [pluggy](https://pypi.org/project/pluggy/). I think the same system could be used for dialects.
I added an example of a plugin.
Notes:
* I changed th... | 2021-01-22T09:44:08Z | Enhancement: Allow adding organization-specific SQL rules using a plugin layer.
At Mailchimp, we have certain tables that contain sensitive information. In order to access this information safely, we have a few options:
* Instead of accessing the table directly, use a predefined view that filters out sensitive informa... | Well *that* is a very interesting idea! I'd not thought that far out.
Outputting the query as parsed JSON wouldn't be too hard - but I'm more curious about importing sqlfluff as a library and then extending it. Have you got any more detailed ideas about what that might look like?
I think the ideal case is to define ... | [
{
"body": "At Mailchimp, we have certain tables that contain sensitive information. In order to access this information safely, we have a few options:\r\n* Instead of accessing the table directly, use a predefined view that filters out sensitive information\r\n* If using the table directly, use a recommended se... | 7fa0276bd0323e712f46e5b0f351af1485e1a9de | {
"head_commit": "d178b84483c3dff57d14d747769bac170614904a",
"head_commit_message": "Test rules__test_helper skip",
"patch_to_review": "diff --git a/docs/source/developingplugins.rst b/docs/source/developingplugins.rst\nnew file mode 100644\nindex 00000000000..aadf4579c7c\n--- /dev/null\n+++ b/docs/source/develop... | [
{
"diff_hunk": "@@ -63,15 +63,17 @@ class Rule_Example_L001(BaseCrawler):\n ORDER BY bar\n \"\"\"\n \n- # Binary operators behave like keywords too.\n- _target_elems: List[Tuple[str, str]] = [(\"type\", \"orderby_clause\")]\n config_keywords = [\"forbidden_columns\"]\n \n+ def __init__(... | 7b6242d9d0a3fa049bd4ce641a691b20ef1ff6ba | diff --git a/docs/source/developingplugins.rst b/docs/source/developingplugins.rst
new file mode 100644
index 00000000000..aadf4579c7c
--- /dev/null
+++ b/docs/source/developingplugins.rst
@@ -0,0 +1,56 @@
+.. _developingpluginsref:
+
+Developing Plugins
+==================
+
+*SQLFluff* is extensible through "plugins"... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "New Feature Additions"
} |
scikit-learn__scikit-learn-17406@72a7b75 | scikit-learn/scikit-learn | Python | 17,406 | FEA allow unknowns in OrdinalEncoder transform | Sometimes it can be convenient to allow values (categories) in the transform of OrdinalEncoder that were not present in the fit data set. For example, a machine learning method, which is able of setting such an unknown sample of the corresponding feature to a neutral value (i.e. non-informative), could use the informat... | 2020-06-01T15:28:07Z | Handle Error Policy in OrdinalEncoder
Preprocessor class `OneHotEncoder` allows transformation if unknown values are found. It would be great to introduce the same option to `OrdinalEncoder`. It seems simple to do since `OrdinalEncoder` (as well as `OneHotEncoder`) is derived from `_BaseEncoder` which actually implemen... | Would #12264 meet your use cases? What specific behaviour do you seek? What
use cases?
No, #12264 is not my case but it is desirable too. I would like `OrdinalEncoder` do not throw an exception if it meets an unexpected value. I mean that unexpected value is value which `categories` does not contain.
What would it do ... | [
{
"body": "Preprocessor class `OneHotEncoder` allows transformation if unknown values are found. It would be great to introduce the same option to `OrdinalEncoder`. It seems simple to do since `OrdinalEncoder` (as well as `OneHotEncoder`) is derived from `_BaseEncoder` which actually implements handling error p... | 12e30fa10fb8dcbbed642cae3bd5a2b25d1ba11b | {
"head_commit": "72a7b7557d680e0b080c033dafffccbee7283b81",
"head_commit_message": "only astype(object) call",
"patch_to_review": "diff --git a/sklearn/preprocessing/_encoders.py b/sklearn/preprocessing/_encoders.py\nindex d8df3b3311783..27456170930c9 100644\n--- a/sklearn/preprocessing/_encoders.py\n+++ b/sklea... | [
{
"diff_hunk": "@@ -621,6 +622,18 @@ class OrdinalEncoder(_BaseEncoder):\n dtype : number type, default np.float64\n Desired dtype of output.\n \n+ handle_unknown : {'error', 'use_encoded_value}', default='error'\n+ When set to 'error' an error will be raised in case an unknown\n+ c... | 46f8f1a27272feb73817d836c1dd2cb930e7634e | diff --git a/doc/whats_new/v0.24.rst b/doc/whats_new/v0.24.rst
index 61e6f431af4e3..a7b38124a1bfb 100644
--- a/doc/whats_new/v0.24.rst
+++ b/doc/whats_new/v0.24.rst
@@ -330,6 +330,12 @@ Changelog
which clips the transformed values of test data to ``feature_range``.
:pr:`17833` by :user:`Yashika Sharma <yashika51>... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "New Feature Additions"
} |
sktime__sktime-1849@ef6f2a7 | sktime/sktime | Python | 1,849 | [ENH] add missing `fit` parameters to `statsmodels` Holt-Winters exponential smoothing interface | This PR adds parameters of `statsmodels.tsa.holtwinters` in `fit` as loopthrough to `sktime`'s `ExponentialSmoothing` interface.
So far, only the constructor parameters were accessible, not the parameters in `fit`.
Solves #1845. | 2022-01-07T19:30:39Z | [ENH] Add option to set smoothing parameters for ExponentialSmoothing class based models
`smoothing_level`, `smoothing_trend`, and `smoothing_seasonal` should be added as parameters to `ExponentialSmoothing` which wraps `statsmodels` exponential smoothing.
In `statsmodels`, these parameters are passed to `fit`, but ... | Hm, could you kindly paste a reference to the parameters you mentioned?
I just looked in `statsmodels`, and here is the list of parameters I could find.
The list does not include `smoothing_level`, `smoothing_trend`, or `smoothing_seasonal`.
```
endog,
trend=None,
damped_trend=False,
... | [
{
"body": "`smoothing_level`, `smoothing_trend`, and `smoothing_seasonal` should be added as parameters to `ExponentialSmoothing` which wraps `statsmodels` exponential smoothing.\r\n\r\nIn `statsmodels`, these parameters are passed to `fit`, but in `sktime`, they should be passed to `__init__` together with the... | 2e85dfb9a30924e7965a2dd645210cc598471391 | {
"head_commit": "ef6f2a78c72b5c093c5a818ab4cb712e7264554d",
"head_commit_message": "typos",
"patch_to_review": "diff --git a/sktime/forecasting/exp_smoothing.py b/sktime/forecasting/exp_smoothing.py\nindex c7c1fa74e6e..5523a2318a8 100644\n--- a/sktime/forecasting/exp_smoothing.py\n+++ b/sktime/forecasting/exp_sm... | [
{
"diff_hunk": "@@ -97,6 +147,16 @@ def __init__(\n self.initial_trend = initial_trend\n self.initial_seasonal = initial_seasonal\n self.initialization_method = initialization_method\n+ self.smoothing_level = smoothing_level\n+ self.smoothing_trend = smoothing_trend\n+ ... | d63ee9fcb4bf5d1467c5875682f9488b5c9ad5d6 | diff --git a/sktime/forecasting/exp_smoothing.py b/sktime/forecasting/exp_smoothing.py
index c7c1fa74e6e..8f721c65fa0 100644
--- a/sktime/forecasting/exp_smoothing.py
+++ b/sktime/forecasting/exp_smoothing.py
@@ -14,6 +14,8 @@
class ExponentialSmoothing(_StatsModelsAdapter):
"""Holt-Winters exponential smoothing ... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "New Feature Additions"
} |
scikit-learn__scikit-learn-17427@e7f8f96 | scikit-learn/scikit-learn | Python | 17,427 | MNT Deprecate coef_ and intercept_ in naive bayes estimators | #### Reference Issues/PRs
Closes #2237.
#### What does this implement/fix? Explain your changes.
This PR deprecates the attributes `coef_` and `intercept_` in `sklearn.naive_bayes.MultinomialNB`, `sklearn.naive_bayes.BernoulliNB` and `sklearn.naive_bayes.CategoricalNB`. | 2020-06-02T20:59:05Z | Naive Bayes has the wrong coef_ and intercept_
The coef_ and intercept_ on MultinomialNB don't behave like other linear models because they contain probabilities even in the binary case. They should contain log-odds ratios.
The ones in BernoulliNB (not documented) are even worse: they're not the coef and intercept use... | Moved to 0.14 for now, though I'm not sure if I can resolve it properly before then.
fair enough :)
I am retagging for 0.15. @larsmans, if you think that you can do this before, will free, but it doesn't seem very high priority to me.
Tagging to 1.0
I think we should fix this and I am happy to dispatch a student fo... | [
{
"body": "The coef_ and intercept_ on MultinomialNB don't behave like other linear models because they contain probabilities even in the binary case. They should contain log-odds ratios.\n\nThe ones in BernoulliNB (not documented) are even worse: they're not the coef and intercept used to make the actual predi... | 6b29bc69c59509e61d5a57c94cd27cc90456c060 | {
"head_commit": "e7f8f96f15b20b815a8648821c177986f8ca0f62",
"head_commit_message": "FIX More deprecations in tests",
"patch_to_review": "diff --git a/sklearn/naive_bayes.py b/sklearn/naive_bayes.py\nindex 11246203a8b94..0ba25f68054e8 100644\n--- a/sklearn/naive_bayes.py\n+++ b/sklearn/naive_bayes.py\n@@ -27,13 +... | [
{
"diff_hunk": "@@ -216,7 +216,8 @@ def test_fit_docstring_attributes(name, Estimator):\n else:\n est.fit(X, y)\n \n- skipped_attributes = {'n_features_in_'}\n+ # TODO: Remove \"coef_\" and \"intercept_\" in version 0.26\n+ skipped_attributes = {'n_features_in_', 'coef_', 'intercept_'}",
... | d084eb6c5348771484bb7c89d31d3e6f6819ede5 | diff --git a/doc/whats_new/v0.24.rst b/doc/whats_new/v0.24.rst
index 71538c3529202..3896487868072 100644
--- a/doc/whats_new/v0.24.rst
+++ b/doc/whats_new/v0.24.rst
@@ -190,6 +190,15 @@ Changelog
validity of the input is now delegated to the base estimator.
:pr:`17233` by :user:`Zolisa Bleki <zoj613>`.
+:mod:`s... | {
"difficulty": "medium",
"estimated_review_effort": 2,
"problem_domain": "Bug Fixes"
} |
scikit-learn__scikit-learn-17367@633b8ea | scikit-learn/scikit-learn | Python | 17,367 | [MRG] Add iterable values support for dictvectorizer | #### Reference Issues/PRs
Closes #6045
Closes #6369
Resumes #8750
#### What does this implement/fix? Explain your changes.
Add iterable support for value types in dictvectorizer | 2020-05-27T17:47:11Z | Accept multiple values for one categorical feature
Hello,
I think it is convenient to accept `list` as a value of `dict` in `DictVectorizer.fit()`
to accept multiple values for one categorical feature.
Assume that we use the category of movies as a feature,
and this category can be 'action', 'love-comedy', 'science-f... | Came across exactly this issue today. Seems appropriate to leave this remark here as a show of interest.
I think we've generally been avoiding making `DictVectorizer` too complex. It was developed as a bare-bones general solution after `text.CountVectorizer` blew out. I personally think this is reasonable functionalit... | [
{
"body": "Hello,\n\nI think it is convenient to accept `list` as a value of `dict` in `DictVectorizer.fit()`\nto accept multiple values for one categorical feature.\n\nAssume that we use the category of movies as a feature,\nand this category can be 'action', 'love-comedy', 'science-fiction', etc...\nSome movi... | e087f8a395f9db97145654c2429b7bdd107fd440 | {
"head_commit": "633b8eaeae8093b384fdbdc269f790c2638dfffb",
"head_commit_message": "Address comments.",
"patch_to_review": "diff --git a/doc/whats_new/v0.24.rst b/doc/whats_new/v0.24.rst\nindex 60bf06cef8d02..1335577e67479 100644\n--- a/doc/whats_new/v0.24.rst\n+++ b/doc/whats_new/v0.24.rst\n@@ -89,6 +89,13 @@ C... | [
{
"diff_hunk": "@@ -35,6 +36,10 @@ class DictVectorizer(TransformerMixin, BaseEstimator):\n a feature \"f\" that can take on the values \"ham\" and \"spam\" will become two\n features in the output, one signifying \"f=ham\", the other \"f=spam\".\n \n+ When feature values are iterables of strings (no... | c68a1604854074fc28e7cf783d193c1f2ab6b0bd | diff --git a/doc/modules/feature_extraction.rst b/doc/modules/feature_extraction.rst
index cedc43c23c16c..5091930ec0348 100644
--- a/doc/modules/feature_extraction.rst
+++ b/doc/modules/feature_extraction.rst
@@ -56,6 +56,27 @@ is a traditional numerical feature::
>>> vec.get_feature_names()
['city=Dubai', 'city=... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "New Feature Additions"
} |
scikit-learn__scikit-learn-17328@f9a6268 | scikit-learn/scikit-learn | Python | 17,328 | [MRG] Add extra requirements in setup.py | <!--
Thanks for contributing a pull request! Please ensure you have taken a look at
the contribution guidelines: https://github.com/scikit-learn/scikit-learn/blob/master/CONTRIBUTING.md#pull-request-checklist
-->
#### Reference Issues/PRs
<!--
Example: Fixes #1234. See also #3456.
Please use keywords (e.g., Fi... | 2020-05-24T20:45:23Z | extras_require for doc building
Now that we are using more dependent packages in our documentation builds, we should have an `extras_require` configuration in setup.py to install appropriate dependencies for building our docs. These dependencies are currently briefly listed in README.rst and doc/developers/contributing... | [
{
"body": "Now that we are using more dependent packages in our documentation builds, we should have an `extras_require` configuration in setup.py to install appropriate dependencies for building our docs. These dependencies are currently briefly listed in README.rst and doc/developers/contributing.rst and buil... | 936854579a3cc112f0686e397798d2aa73e5fab3 | {
"head_commit": "f9a6268de718f7efbef4883e2744f5e24f0bf321",
"head_commit_message": "Remove variables for packages versions",
"patch_to_review": "diff --git a/setup.py b/setup.py\nindex 90162b65644e5..3aa5f614ef125 100755\n--- a/setup.py\n+++ b/setup.py\n@@ -75,9 +75,26 @@\n zip_safe=False, # the package... | [
{
"diff_hunk": "@@ -256,10 +273,10 @@ def setup_package():\n cmdclass=cmdclass,\n python_requires=\">=3.6\",\n install_requires=[\n- 'numpy>={}'.format(NUMPY_MIN_VERSION),\n- 'scipy>={}'.format(SCIPY_MIN_VE... | 1f6e9d1332552ae8b8f75c9aced9a0cf7179af93 | diff --git a/setup.py b/setup.py
index 90162b65644e5..98710f36e5007 100755
--- a/setup.py
+++ b/setup.py
@@ -75,9 +75,26 @@
zip_safe=False, # the package can run out of an .egg file
include_package_data=True,
extras_require={
- 'alldeps': (
- 'numpy >= {}'.format(NU... | {
"difficulty": "low",
"estimated_review_effort": 2,
"problem_domain": "Dependency Updates & Env Compatibility"
} |
Subsets and Splits
Review Test Instances
Retrieves basic metadata about code review instances but doesn't provide any analytical insights or patterns beyond raw data access.