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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
scikit-learn__scikit-learn-20880@a0d6a70 | scikit-learn/scikit-learn | Python | 20,880 | ENH add `only_non_negative` parameter to `_check_sample_weight` | <!--
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
-->
#### Reference Issues/PRs
Fixes #20036.
Partially addressed https://github.com/scikit-learn/scikit-learn/issues/15531
##... | 2021-08-28T22:41:25Z | Improve error message for negative values in sample_weight
With sklearn Version 0.22.1 a linear regression with negative sample weights fails with the following (unclear) error message.
Would be helpful if (e.g. `_check_sample_weight`) checks for negative weights and raises an appropriate error message.
```pytb
... | We could add a parameter `only_positive` that will be a boolean in `_check_sample_weight`.
By default, it would be False to be backward compatible and we can it to True and raise an error for negative weight in the estimator where it makes sense (I recall that we did something like this in `AdaBoost`). | [
{
"body": "With sklearn Version 0.22.1 a linear regression with negative sample weights fails with the following (unclear) error message.\r\nWould be helpful if (e.g. `_check_sample_weight`) checks for negative weights and raises an appropriate error message.\r\n\r\n```pytb\r\n File \"C:\\Users\\gm889704\\.con... | 89d66b39a0949c01beee5eb9739e192b8bcac7bd | {
"head_commit": "a0d6a70c90416b63cd2ec65823558aaa23a964df",
"head_commit_message": "formatting with black .",
"patch_to_review": "diff --git a/sklearn/linear_model/_base.py b/sklearn/linear_model/_base.py\nindex 79d6f321cb124..6e1d6acb0cc91 100644\n--- a/sklearn/linear_model/_base.py\n+++ b/sklearn/linear_model/... | [
{
"diff_hunk": "@@ -1479,7 +1479,9 @@ def _check_psd_eigenvalues(lambdas, enable_warnings=False):\n return lambdas\n \n \n-def _check_sample_weight(sample_weight, X, dtype=None, copy=False):\n+def _check_sample_weight(\n+ sample_weight, X, only_non_negative=False, dtype=None, copy=False",
"line": nul... | 6864e9bfbbc5daaaf43dd23e137c2d3beac54486 | diff --git a/doc/whats_new/v1.1.rst b/doc/whats_new/v1.1.rst
index 1639b4b691c65..fba40e25a9e7e 100644
--- a/doc/whats_new/v1.1.rst
+++ b/doc/whats_new/v1.1.rst
@@ -38,9 +38,20 @@ Changelog
:pr:`123456` by :user:`Joe Bloggs <joeongithub>`.
where 123456 is the *pull request* number, not the issue number.
-
-... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
scikit-learn__scikit-learn-20761@da31226 | scikit-learn/scikit-learn | Python | 20,761 | FIX compute `y_std` properly with multi-target in GPR | #### Reference Issues/PRs
Fixes [#17394](https://github.com/scikit-learn/scikit-learn/issues/17394). Fixes [#18065](https://github.com/scikit-learn/scikit-learn/issues/18065).
#### What does this implement/fix? Explain your changes.
GaussianProcessRegressor could not retrieve `y_std`
for `predict(X, retu... | 2021-08-17T04:47:07Z | GaussianProcessRegressor cannot correctly predict std in multi-target scene
I used GaussianProcessRegressor like this:
```python
from sklearn.gaussian_process.kernels import Matern
from sklearn.gaussian_process import GaussianProcessRegressor
import numpy as np
ls = [
([2, 3, 4, 5], [1, 1, 3]),
([5, 3,... | Hello, can I work on this ?
what version are you using?
I was able to reproduce this in the following environment.
```
>>> import sklearn
>>> sklearn.show_versions()
System:
python: 3.6.9 (default, Apr 18 2020, 01:56:04) [GCC 8.4.0]
executable: /usr/bin/python3
machine: Linux-4.19.104+-x86_64-with-... | [
{
"body": "I used GaussianProcessRegressor like this:\r\n```python\r\nfrom sklearn.gaussian_process.kernels import Matern\r\nfrom sklearn.gaussian_process import GaussianProcessRegressor\r\nimport numpy as np\r\n\r\nls = [\r\n ([2, 3, 4, 5], [1, 1, 3]),\r\n ([5, 3, 1, 3], [1, 4, 3]),\r\n ([2, 7, 2, 5],... | 7aabe53e730947df0f6f1f85d640e6daea5bfc9f | {
"head_commit": "da31226d868149f733aee1083bea83ca5173fa58",
"head_commit_message": "fix changelog",
"patch_to_review": "diff --git a/doc/whats_new/v1.0.rst b/doc/whats_new/v1.0.rst\nindex 40076c0b275dd..d9686ac26af7a 100644\n--- a/doc/whats_new/v1.0.rst\n+++ b/doc/whats_new/v1.0.rst\n@@ -43,6 +43,14 @@ Fixed mod... | [
{
"diff_hunk": "@@ -424,7 +424,11 @@ def predict(self, X, return_std=False, return_cov=False):\n y_var[y_var_negative] = 0.0\n \n # undo normalisation\n- y_var = y_var * self._y_train_std ** 2\n+ y_var = np.outer(y_var, self._y_train_std ** 2)\n+... | d52a00ef22422099e4622ac2a41da1ee4416c95b | diff --git a/doc/whats_new/v1.0.rst b/doc/whats_new/v1.0.rst
index 9717962fa74db..c27565bc3968d 100644
--- a/doc/whats_new/v1.0.rst
+++ b/doc/whats_new/v1.0.rst
@@ -43,6 +43,14 @@ Fixed models
between sparse and dense input. :pr:`21195`
by :user:`Jérémie du Boisberranger <jeremiedbb>`.
+:mod:`sklearn.gaussian_p... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
sqlfluff__sqlfluff-2336@3691e64 | sqlfluff/sqlfluff | Python | 2,336 | L026: Handle DML statements and multiple levels of nesting | <!--Firstly, thanks for adding this feature! Secondly, please check the key steps against the checklist below to make your contribution easy to merge.-->
<!--Please give the Pull Request a meaningful title (including the dialect this PR is for if it is dialect specific), as this will automatically be added to the re... | 2022-01-17T21:35:10Z | L026: Rule incorrectly flag column does not exist in `FROM` clause in an UPDATE statement.
## Expected Behaviour
L026 should not fail when a subquery in an UPDATE statement references a column from the UPDATE target.
## Observed Behaviour
L026 failed due to reference was not found in the FROM clause with the f... | [
{
"body": "## Expected Behaviour\r\n\r\nL026 should not fail when a subquery in an UPDATE statement references a column from the UPDATE target.\r\n\r\n## Observed Behaviour\r\n\r\nL026 failed due to reference was not found in the FROM clause with the following error printed (When using `sample.sql` content belo... | 37a993f7ad841ab3035d1db5ce6525f2e5584fd5 | {
"head_commit": "3691e6435aa48c065c56629d8bebfb32c0685838",
"head_commit_message": "Merge branch 'main' into bhart-issue_2265_l026_handle_update_statements",
"patch_to_review": "diff --git a/src/sqlfluff/core/rules/analysis/select.py b/src/sqlfluff/core/rules/analysis/select.py\nindex 33eba2e973f..2e0a313ef37 10... | [
{
"diff_hunk": "@@ -100,4 +66,84 @@ def _eval(self, context: RuleContext) -> EvalResultType:\n ):\n return LintResult()\n \n- return super()._eval(context=context)\n+ violations: List[LintResult] = []\n+ start_types = [\"select_statement\", \"delete_statement\", \"update... | a5e83b3253eddcfc1924057353b23117ff24532f | diff --git a/src/sqlfluff/core/rules/analysis/select.py b/src/sqlfluff/core/rules/analysis/select.py
index 33eba2e973f..2e0a313ef37 100644
--- a/src/sqlfluff/core/rules/analysis/select.py
+++ b/src/sqlfluff/core/rules/analysis/select.py
@@ -124,7 +124,7 @@ def _has_value_table_function(table_expr, dialect):
# ... | {
"difficulty": "high",
"estimated_review_effort": 4,
"problem_domain": "Bug Fixes"
} | |
sqlfluff__sqlfluff-2285@2a45c67 | sqlfluff/sqlfluff | Python | 2,285 | Update L009 to operate in raw, not templated space | <!--Firstly, thanks for adding this feature! Secondly, please check the key steps against the checklist below to make your contribution easy to merge.-->
<!--Please give the Pull Request a meaningful title (including the dialect this PR is for if it is dialect specific), as this will automatically be added to the re... | 2022-01-11T17:50:19Z | dbt - L009: Files must end with a single trailing newline.
<!--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.-->
## Expected Behaviour
No error
## Obs... | @tekumara is this all that's in the file?
Please could you post the output of `sqlfluff parse <file>` here?
Yep that's all.
Here's the tail of `sqlfluff parse`:
```
[L: 8, P: 1] | identifier: 'RunID'
[L: 8, P: 44] | [META] dedent:... | [
{
"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.-->\r\n\r\n## Expected Behaviour\r\nNo error\r\n\r\n\r\n## Observed Behaviour\r\n```\r\nL:... | faf16d06ecf6ba0d19cb5ab0c029f73383d5dc2d | {
"head_commit": "2a45c67926452c68e820ed68f12ec886a6749901",
"head_commit_message": "More comments",
"patch_to_review": "diff --git a/src/sqlfluff/core/rules/functional/__init__.py b/src/sqlfluff/core/rules/functional/__init__.py\nindex 9ab43488147..8e7f84dd363 100644\n--- a/src/sqlfluff/core/rules/functional/__i... | [
{
"diff_hunk": "@@ -10,3 +10,7 @@ test_fail_no_final_newline:\n test_fail_multiple_final_newlines:\n fail_str: \"SELECT foo FROM bar\\n\\n\"\n fix_str: \"SELECT foo FROM bar\\n\"\n+\n+test_pass_templated_plus_raw_newlines:\n+ pass_str: |\n+ {{ \"\\n\\n\" }}",
"line": null,
"original_line": 16,
... | 1a6ba87a80469361db3773361029df44443be6d4 | diff --git a/src/sqlfluff/core/rules/functional/__init__.py b/src/sqlfluff/core/rules/functional/__init__.py
index 9ab43488147..8e7f84dd363 100644
--- a/src/sqlfluff/core/rules/functional/__init__.py
+++ b/src/sqlfluff/core/rules/functional/__init__.py
@@ -12,7 +12,8 @@
use one or the other for readability.
"""
-__... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "Code Style, Linting, Formatting Fixes"
} |
sqlfluff__sqlfluff-2283@8cbc61d | sqlfluff/sqlfluff | Python | 2,283 | Remove DATE, DATETIME and TIME from BigQuery DatePart | <!--Firstly, thanks for adding this feature! Secondly, please check the key steps against the checklist below to make your contribution easy to merge.-->
<!--Please give the Pull Request a meaningful title (including the dialect this PR is for if it is dialect specific), as this will automatically be added to the re... | 2022-01-11T14:02:35Z | L010: SQLFluff 0.9.1 capitalizes columns named date when used as parameters in DATE_ADD
<!--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.-->
## Expected B... | Good spot!
I think this is a parsing issue rather than an issue with L010.
If you parse with a more obvious column name
e.g.
```sql
SELECT DATE_ADD(abc, INTERVAL 5 YEAR) AS display_date
FROM
model
```
the function looks like:
```
[L: 1, P: 8] | function:
[L: 1, P: 8] ... | [
{
"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.-->\r\n\r\n## Expected Behaviour\r\nWhen run on a SQL file containing a line like DATE_ADD... | 89dcc39b7fb114677b28c8533dcf43ed74fade53 | {
"head_commit": "8cbc61d89faf333167d4a4eb577115a3e70ab2b8",
"head_commit_message": "Add test case",
"patch_to_review": "diff --git a/src/sqlfluff/dialects/dialect_bigquery.py b/src/sqlfluff/dialects/dialect_bigquery.py\nindex d1541dff738..8bc802ef37d 100644\n--- a/src/sqlfluff/dialects/dialect_bigquery.py\n+++ b... | [
{
"diff_hunk": "@@ -26,15 +26,17 @@ file:\n function_name:\n function_name_identifier: EXTRACT\n bracketed:\n- start_bracket: (\n- date_part: DATE\n- keyword: FROM\n- expression:\n+ - start_bracket: (\n+ ... | 957dac2e08ede4256dc29339dffeb96e98ecc67b | diff --git a/src/sqlfluff/dialects/dialect_bigquery.py b/src/sqlfluff/dialects/dialect_bigquery.py
index d1541dff738..8bc802ef37d 100644
--- a/src/sqlfluff/dialects/dialect_bigquery.py
+++ b/src/sqlfluff/dialects/dialect_bigquery.py
@@ -209,7 +209,7 @@
# Add additional datetime units
# https://cloud.google.com/bigque... | {
"difficulty": "low",
"estimated_review_effort": 2,
"problem_domain": "Bug Fixes"
} |
saltstack__salt-61732@bd92250 | saltstack/salt | Python | 61,732 | Ensure config module loads opts from the named_context. | ### What does this PR do?
Ensure opts is included in pack for minion_mods and config loads opts from the named_context.
### What issues does this PR fix or reference?
Fixes: #61297
### Previous Behavior
When used with deltaproxy, the config module would use the `__opts__` from the last sub proxy minion that u... | 2022-02-27T17:51:56Z | deltaproxy overriding minion configuration settings
### Description of Issue
I am evaluating the deltaproxy feature released on 3004 version and noticed the configuration settings for other deltaproxy managed minions are getting overridden with the settings defined for the last minion defined under "ids". This results... | 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 of Issue\r\nI am evaluating the deltaproxy feature released on 3004 version and noticed the configuration settings for other deltaproxy managed minions are getting overridden with the settings defined for the last minion defined under \"ids\". This results in cases like targeting one ... | ee8a9a7b544cf4e3329489b3f39e9e1a6f7c55b5 | {
"head_commit": "bd92250f110db88758e671866f768cd8fa153096",
"head_commit_message": "Adding changelog",
"patch_to_review": "diff --git a/changelog/61297.fixed b/changelog/61297.fixed\nnew file mode 100644\nindex 000000000000..1c64eb26602c\n--- /dev/null\n+++ b/changelog/61297.fixed\n@@ -0,0 +1 @@\n+Ensure opts is... | [
{
"diff_hunk": "@@ -137,3 +137,13 @@ def test_state_highstate(salt_master, salt_cli, tmp_path, proxy_id):\n ret = salt_cli.run(\"state.highstate\", minion_tgt=proxy_id)\n for value in ret.json.values():\n assert value[\"result\"] is True\n+\n+\n+def test_config_get(salt_cli, proxy_id... | 64e33cb585e8e46306482a74c30e93640ee1532d | diff --git a/changelog/61297.fixed b/changelog/61297.fixed
new file mode 100644
index 000000000000..1c64eb26602c
--- /dev/null
+++ b/changelog/61297.fixed
@@ -0,0 +1 @@
+Ensure opts is included in pack for minion_mods and config loads opts from the named_context.
diff --git a/salt/loader/__init__.py b/salt/loader/__ini... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
sqlfluff__sqlfluff-2279@2f4cd40 | sqlfluff/sqlfluff | Python | 2,279 | L052: Fix case where no preceding segments and mulitline | <!--Firstly, thanks for adding this feature! Secondly, please check the key steps against the checklist below to make your contribution easy to merge.-->
<!--Please give the Pull Request a meaningful title (including the dialect this PR is for if it is dialect specific), as this will automatically be added to the re... | 2022-01-10T23:10:46Z | L052: Auto-fix appended extra `semicolon` in `CREATE TABLE` statement when `multiline_newline` is `True`
## Expected Behaviour
* Auto-fix of L052 should move `;` at the end of `CREATE TABLE` statement to the next line when `multiline_newline = True`.
## Observed Behaviour
* Auto-fix printed the following when ... | @jpy-git: Interested in looking at this one? It relates to L052, which you added recently. | [
{
"body": "## Expected Behaviour\r\n\r\n* Auto-fix of L052 should move `;` at the end of `CREATE TABLE` statement to the next line when `multiline_newline = True`.\r\n\r\n## Observed Behaviour\r\n\r\n* Auto-fix printed the following when `sqlfluff fix` is executed:\r\n```\r\n==== finding fixable violations ====... | df04310cbfcc7b422b56fbf32f7640fe767c0433 | {
"head_commit": "2f4cd4080e66db3a514b8934d258f6d0197510b0",
"head_commit_message": "Merge branch 'main' into extra_semicolons_create_table",
"patch_to_review": "diff --git a/src/sqlfluff/rules/L052.py b/src/sqlfluff/rules/L052.py\nindex 68cda935998..7d4f2d2de37 100644\n--- a/src/sqlfluff/rules/L052.py\n+++ b/src... | [
{
"diff_hunk": "@@ -193,21 +193,38 @@ def _eval(self, context: RuleContext) -> Optional[LintResult]:\n anchor_segment = self._handle_trailing_inline_comments(\n context, anchor_segment\n )\n-\n- fixes = [\n- ... | 4bd0ffb42da0642a4675cf62114f856f70030245 | diff --git a/src/sqlfluff/rules/L052.py b/src/sqlfluff/rules/L052.py
index 68cda935998..ddb5ab6827b 100644
--- a/src/sqlfluff/rules/L052.py
+++ b/src/sqlfluff/rules/L052.py
@@ -193,21 +193,38 @@ def _eval(self, context: RuleContext) -> Optional[LintResult]:
anchor_segment = self._handle_trailing_in... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
sqlfluff__sqlfluff-2273@7b08f79 | sqlfluff/sqlfluff | Python | 2,273 | L025 should look at subqueries | <!--Firstly, thanks for adding this feature! Secondly, please check the key steps against the checklist below to make your contribution easy to merge.-->
<!--Please give the Pull Request a meaningful title (including the dialect this PR is for if it is dialect specific), as this will automatically be added to the re... | 2022-01-10T15:36:33Z | L025 removes alias which is used in subquery
_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._
## Expected Behaviour
With fixing ~L031~ L025 the alias shoul... | I believe this is actually rule L025 not L031 which is causing the issue.
Minimal reproducible test case:
```sql
SELECT
col1,
(
SELECT
count(*)
FROM
base b
WHERE
a.col2 = b.col2
)
FROM
without_dup a;
```
And then run:
```... | [
{
"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._\r\n\r\n## Expected Behaviour\r\nWith fixing ~L031~ L025 the alias should replaced correctly... | aaa652645c874e3b50ce9b28e86144ee11cb39ce | {
"head_commit": "7b08f7956ebf223617d4ca79ff9ea2f98cd627fa",
"head_commit_message": "Add comment",
"patch_to_review": "diff --git a/src/sqlfluff/core/rules/analysis/select_crawler.py b/src/sqlfluff/core/rules/analysis/select_crawler.py\nindex 65ed980019d..b0294c0e85d 100644\n--- a/src/sqlfluff/core/rules/analysis... | [
{
"diff_hunk": "@@ -38,50 +59,78 @@ class Rule_L025(Rule_L020):\n \n \"\"\"\n \n- def _lint_references_and_aliases(\n- self,\n- table_aliases,\n- standalone_aliases,\n- references,\n- col_aliases,\n- using_cols,\n- parent_select,\n- ):\n- \"\"\"C... | f77e3aae1b3626939068261204b275b246a4d9a7 | diff --git a/src/sqlfluff/core/rules/analysis/select_crawler.py b/src/sqlfluff/core/rules/analysis/select_crawler.py
index 65ed980019d..b0294c0e85d 100644
--- a/src/sqlfluff/core/rules/analysis/select_crawler.py
+++ b/src/sqlfluff/core/rules/analysis/select_crawler.py
@@ -1,7 +1,7 @@
"""Tools for more complex analysis... | {
"difficulty": "high",
"estimated_review_effort": 4,
"problem_domain": "Code Refactoring / Architectural Improvement"
} |
scikit-learn__scikit-learn-20860@8862c6a | scikit-learn/scikit-learn | Python | 20,860 | ENH add support for `'passthrough'` 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/main/CONTRIBUTING.md
-->
#### Reference Issues/PRs
Fixes #20699
<!--
Example: Fixes #1234. See also #3456.
Please use keywords (e.g., Fixes) to cr... | 2021-08-27T10:00:38Z | Support "passthrough" in FeatureUnion
Right now setting an estimator to ``"passthrough"`` in ``FeatureUnion`` is not supported (the validation errors).
I think that is a bit inconsistent as we have it in `ColumnTransformer` and `Pipeline`. It's actually quite natural in ``FeatureUnion`` to keep the original features, ... | I read about FeatureUnion and find it it's a real problem. I think the passthrough feature can be done if we do little modification of FeatureSelection constructor. Here we can introduce a new parameter "passthrough" and by default value can be set to None and whenever any value is passes as a parameter of "passthro... | [
{
"body": "Right now setting an estimator to ``\"passthrough\"`` in ``FeatureUnion`` is not supported (the validation errors).\r\nI think that is a bit inconsistent as we have it in `ColumnTransformer` and `Pipeline`. It's actually quite natural in ``FeatureUnion`` to keep the original features, so I think it's... | 40e1f895b172b9941fdcdefffd5a2aa8556ed227 | {
"head_commit": "8862c6a4362cceffb775e9d58812f4ed2bb21827",
"head_commit_message": "Add documentation for passthrough",
"patch_to_review": "diff --git a/sklearn/pipeline.py b/sklearn/pipeline.py\nindex 34788d64de9e9..d73529d90a42b 100644\n--- a/sklearn/pipeline.py\n+++ b/sklearn/pipeline.py\n@@ -17,6 +17,7 @@\n ... | [
{
"diff_hunk": "@@ -942,7 +945,7 @@ def _validate_transformers(self):\n \n # validate estimators\n for t in transformers:\n- if t == \"drop\":\n+ if t == \"drop\" or t == \"passthrough\":",
"line": null,
"original_line": 948,
"original_start_line": null,
"pa... | 36de49e1be05bdcf7835779bf983a5442c13b693 | diff --git a/doc/whats_new/v1.1.rst b/doc/whats_new/v1.1.rst
index fba40e25a9e7e..9c1084e393e8d 100644
--- a/doc/whats_new/v1.1.rst
+++ b/doc/whats_new/v1.1.rst
@@ -53,6 +53,12 @@ Changelog
:pr:`20880` by :user:`Guillaume Lemaitre <glemaitre>`
and :user:`András Simon <simonandras>`.
+:mod:`sklearn.pipeline`
+..... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "New Feature Additions"
} |
sqlfluff__sqlfluff-2231@1066466 | sqlfluff/sqlfluff | Python | 2,231 | Don't allow fixes to COPY code from templated regions | <!--Firstly, thanks for adding this feature! Secondly, please check the key steps against the checklist below to make your contribution easy to merge.-->
<!--Please give the Pull Request a meaningful title (including the dialect this PR is for if it is dialect specific), as this will automatically be added to the re... | 2022-01-04T14:26:34Z | sqlfluff fix with dbt templater replaces aliases with sources
<!--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.-->
## Expected Behaviour
No replacement ... | @tekumara what lint was being raised by the original query? Helps narrow things down 😄
```
L: 2 | P: 60 | L031 | Avoid aliases in from clauses and join conditions.
```
This makes sense thanks.
So L031 forbids the use of aliases in FROM/JOIN clauses
i.e. instead of
```sql
SELECT t.foo
FROM bar AS t
```
i... | [
{
"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.-->\r\n\r\n## Expected Behaviour\r\n\r\nNo replacement of aliases with the source, because... | c0151a85aed01226ef816745fbf2d5ac15751a75 | {
"head_commit": "10664661da36bef0f176db7f791f2a1b333fa8a0",
"head_commit_message": "Merge branch 'main' into bhart-issue_2051_no_copy_code_out_of_template",
"patch_to_review": "diff --git a/src/sqlfluff/core/rules/base.py b/src/sqlfluff/core/rules/base.py\nindex 3f238d58e94..635532d7e24 100644\n--- a/src/sqlfluf... | [
{
"diff_hunk": "@@ -114,11 +114,14 @@ class LintFix:\n the *position* that this fix should be applied at. For deletions\n it represents the segment to delete, for creations it implies the\n position to create at (with the existing element at this position\n- to be ... | 42321685ed7a7f5a5bb21194287feae513cb0020 | diff --git a/src/sqlfluff/core/rules/base.py b/src/sqlfluff/core/rules/base.py
index 3f238d58e94..fd38a801bd9 100644
--- a/src/sqlfluff/core/rules/base.py
+++ b/src/sqlfluff/core/rules/base.py
@@ -114,11 +114,14 @@ class LintFix:
the *position* that this fix should be applied at. For deletions
... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "Bug Fixes"
} |
saltstack__salt-61665@670def4 | saltstack/salt | Python | 61,665 | Unblock Deltaproxy startup when controlled proxy minions fail | ### What does this PR do?
wrap the call to the proxy init functions in a try except, so we are able to continue with the rest in case one has an issue.
### What issues does this PR fix or reference?
Fixes: #61377
### Previous Behavior
When starting up if one of the controlled proxy minions threw an exception ... | 2022-02-18T00:48:50Z | [BUG] Deltaproxy should skip failed sub proxy devices
**Description**
When using deltaproxy with multiple sub proxy minions, if the connection phase of one sub proxy fails it should be skipped.
**Setup**
Configure deltaproxy with multiple proxy minion ids.
**Steps to Reproduce the behavior**
Ensure at least on... | [
{
"body": "**Description**\r\nWhen using deltaproxy with multiple sub proxy minions, if the connection phase of one sub proxy fails it should be skipped.\r\n\r\n**Setup**\r\nConfigure deltaproxy with multiple proxy minion ids.\r\n\r\n**Steps to Reproduce the behavior**\r\nEnsure at least one proxy minion will h... | cbb22cfd2bb939864657df99f798443a48bde797 | {
"head_commit": "670def42646ef19b83e66ff0f5476b405b6a2e34",
"head_commit_message": "swapping in a dummy proxy minion for tests. Adding options to dummy proxy minion to simulate an exception handling in the init function.",
"patch_to_review": "diff --git a/changelog/61377.fixed b/changelog/61377.fixed\nnew file ... | [
{
"diff_hunk": "@@ -418,7 +418,14 @@ def post_master_init(self, master):\n _fq_proxyname = proxyopts[\"proxy\"][\"proxytype\"]\n \n proxy_init_fn = _proxy_minion.proxy[_fq_proxyname + \".init\"]\n- proxy_init_fn(proxyopts)\n+ try:\n+ proxy_init_fn(proxyopts)\n+ ex... | 47a0c4aebfa3b82953da1e72b37306008fa4c542 | diff --git a/changelog/61377.fixed b/changelog/61377.fixed
new file mode 100644
index 000000000000..6c10147038a6
--- /dev/null
+++ b/changelog/61377.fixed
@@ -0,0 +1 @@
+Do not block the deltaproxy startup. Wrap the call to the individual proxy initialization functions in a try...except, catching the exception, loggin... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} | |
sqlfluff__sqlfluff-2223@85e8938 | sqlfluff/sqlfluff | Python | 2,223 | Simplify nested cases | <!--Firstly, thanks for adding this feature! Secondly, please check the key steps against the checklist below to make your contribution easy to merge.-->
<!--Please give the Pull Request a meaningful title (including the dialect this PR is for if it is dialect specific), as this will automatically be added to the re... | 2022-01-02T17:03:55Z | New rule: Nested CASEs with conditions on the same column
When conditions in iterative `CASE` statements are on the same column they should be simplified without any cost i.e.
```sql
CASE
WHEN species = 'Cat' THEN 'Meow'
ELSE
CASE
WHEN species = 'Dog' THEN 'Woof'
END
END as sound
```
is real... | Is there ever a situation where nested CASE statements are needed?
Since the CASE statement is effectively an IF/ELIF/ELSE structure you could reduce all nested case statements?
i.e.
```SQL
CASE
WHEN species = “Cat” THEN “Meow”
ELSE
CASE
WHEN number_of_legs = 8 THEN “<spider_sounds>”
END
END as... | [
{
"body": "When conditions in iterative `CASE` statements are on the same column they should be simplified without any cost i.e. \r\n\r\n```sql\r\nCASE\r\n WHEN species = 'Cat' THEN 'Meow'\r\n ELSE\r\n CASE\r\n WHEN species = 'Dog' THEN 'Woof'\r\n END\r\nEND as sound\r\n```\r\n\r\nis really just\r\n\r\n... | 043011fd9dd3d31d504800c2c8cfa40cd04154b1 | {
"head_commit": "85e8938c04f048d951ba45acc0e74b0ec1bedb81",
"head_commit_message": "Add back a blank line",
"patch_to_review": "diff --git a/src/sqlfluff/rules/L058.py b/src/sqlfluff/rules/L058.py\nnew file mode 100644\nindex 00000000000..90cba2a1e6d\n--- /dev/null\n+++ b/src/sqlfluff/rules/L058.py\n@@ -0,0 +1,8... | [
{
"diff_hunk": "@@ -0,0 +1,189 @@\n+rule: L058\n+\n+test_pass_1:\n+ # The nested CASE is under a \"WHEN\", not an \"ELSE\".\n+ pass_str: |\n+ SELECT\n+ c1,\n+ CASE\n+ WHEN species = 'Rat' THEN\n+ CASE\n+ WHEN species = 'Dog' THEN 'Woof'\n+ ... | f76f7d0c79d613ed62df8b1198770ff35681cd27 | diff --git a/src/sqlfluff/rules/L058.py b/src/sqlfluff/rules/L058.py
new file mode 100644
index 00000000000..0f87995b0c8
--- /dev/null
+++ b/src/sqlfluff/rules/L058.py
@@ -0,0 +1,89 @@
+"""Implementation of Rule L058."""
+
+from sqlfluff.core.parser import NewlineSegment, WhitespaceSegment
+from sqlfluff.core.rules.bas... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "New Feature Additions"
} |
scikit-learn__scikit-learn-20575@14a6cd1 | scikit-learn/scikit-learn | Python | 20,575 | MAINT Uses available_if in pipeline | <!--
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
-->
#### Reference Issues/PRs
<!--
Example: Fixes #1234. See also #3456.
Please use keywords (e.g., Fixes) to create link to th... | 2021-07-20T19:26:30Z | Using `available_if` causes failed test cases due to different error message format
<!--
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.
-->
Using `availab... | Yep the previous error message was meaningful. We should solve this issue. | [
{
"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\nUsing `available_if` to replace `if_delegate_has_method` in t... | d753d4dc1a5aa73f753cb3ecc26d7ebb474dbfad | {
"head_commit": "14a6cd160f152072eb8dc9751bf3f36bc91e8150",
"head_commit_message": "MAINT Uses avaliable_if in pipeline",
"patch_to_review": "diff --git a/sklearn/pipeline.py b/sklearn/pipeline.py\nindex 0814632721ba4..523e2871bc69a 100644\n--- a/sklearn/pipeline.py\n+++ b/sklearn/pipeline.py\n@@ -18,7 +18,7 @@\... | [
{
"diff_hunk": "@@ -33,6 +33,13 @@\n __all__ = [\"Pipeline\", \"FeatureUnion\", \"make_pipeline\", \"make_union\"]\n \n \n+def _final_estimator_has(attr):\n+ \"\"\"Check that final_estimator has `attr`.\n+\n+ Used together with `avaliable_if` in `Pipeline`.\"\"\"\n+ return lambda self: getattr(self._fi... | 1e644b595fb98aa790b603461089c5a18b1623d5 | diff --git a/sklearn/pipeline.py b/sklearn/pipeline.py
index 0814632721ba4..195771adbd723 100644
--- a/sklearn/pipeline.py
+++ b/sklearn/pipeline.py
@@ -18,7 +18,7 @@
from .base import clone, TransformerMixin
from .utils._estimator_html_repr import _VisualBlock
-from .utils.metaestimators import if_delegate_has_met... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
scikit-learn__scikit-learn-20752@5b004f5 | scikit-learn/scikit-learn | Python | 20,752 | FIX raise error for max_df and min_df greater than 1 in Vectorizer | <!--
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
-->
#### Reference Issues/PRs
<!--
Example: Fixes #1234. See also #3456.
Please use keywords (e.g., Fixes) to create link to th... | 2021-08-15T18:14:30Z | Text vectorizer with unwanted float for max_idf or min_idf
When working using CountVectorizer and accidentaly set max_df with float greater than 1.0 and give me wrong result. According to documentation we can set max_idf or min_idf with float [0,1] or int when using CountVectorizer.
#### Steps/Code to Reproduce
... | Thank you for your detailed bug report.
I was able to reproduce it and would like to contribute a PR. Is a warning sufficient or should it throw an error? | [
{
"body": "When working using CountVectorizer and accidentaly set max_df with float greater than 1.0 and give me wrong result. According to documentation we can set max_idf or min_idf with float [0,1] or int when using CountVectorizer.\r\n\r\n#### Steps/Code to Reproduce\r\n\r\nTaken from example:\r\n```python\... | a246a2e26d82084109fbeec72ec3364661aa5c81 | {
"head_commit": "5b004f5eb61f99df4a61e308a6955ccf244febf2",
"head_commit_message": "changelog",
"patch_to_review": "diff --git a/doc/whats_new/v1.0.rst b/doc/whats_new/v1.0.rst\nindex b4fcbee992383..3a6d6124feff4 100644\n--- a/doc/whats_new/v1.0.rst\n+++ b/doc/whats_new/v1.0.rst\n@@ -366,6 +366,10 @@ Changelog\n... | [
{
"diff_hunk": "@@ -366,6 +366,10 @@ Changelog\n error with unsupported value type.\n :pr:`19520` by :user:`Jeff Zhao <kamiyaa>`.\n \n+- |Fix| Fixed a bug in :class:`feature_extraction.CountVectorizer` by raising an",
"line": null,
"original_line": 369,
"original_start_line": null,
"path": "... | 98802a691d909e0a31df055062b3d98561bf13a9 | diff --git a/doc/whats_new/v1.1.rst b/doc/whats_new/v1.1.rst
index 1a9f773ce08df..a473908d8f1e7 100644
--- a/doc/whats_new/v1.1.rst
+++ b/doc/whats_new/v1.1.rst
@@ -46,13 +46,21 @@ Changelog
:pr:`21032` by :user:`Guillaume Lemaitre <glemaitre>`.
:mod:`sklearn.ensemble`
-...........................
+................. | {
"difficulty": "low",
"estimated_review_effort": 2,
"problem_domain": "Bug Fixes"
} |
saltstack__salt-61567@f186c10 | saltstack/salt | Python | 61,567 | Fix #53513 - parse error in manage.versions | ### What does this PR do?
This changes manage.versions naive approach to calling minion `test.version`,
which always assumed the response would be a version number. Now we only assume
it's a version number if `test.version` returns 0 retcode. Otherwise we will
say that the minion is offline.
### What issues does this... | 2022-02-01T23:25:41Z | salt-run manage.versions produces ValueError exception
### Description of Issue
salt-run manage.versions produces ValueError exception
```python
# salt-run manage.versions
Exception occurred in runner manage.versions: Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/salt/client/mixins.... | I experienced the same error on the Salt master version **2019.2.1**
```shell
# salt-run manage.versions
Exception occurred in runner manage.versions: Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/salt/client/mixins.py", line 377, in low
data['return'] = func(*args, **kwargs)
... | [
{
"body": "### Description of Issue\r\nsalt-run manage.versions produces ValueError exception\r\n\r\n```python\r\n# salt-run manage.versions\r\nException occurred in runner manage.versions: Traceback (most recent call last):\r\n File \"/usr/lib/python2.7/site-packages/salt/client/mixins.py\", line 387, in _low... | 062637a17e59f2647726fac72ff2d49962420e84 | {
"head_commit": "f186c109cdc249b4eac8dc3959d931876be16124",
"head_commit_message": "Merge branch 'master' into tc/fix-53513-salt-version-error",
"patch_to_review": "diff --git a/changelog/53513.fixed b/changelog/53513.fixed\nnew file mode 100644\nindex 000000000000..9a653c8476a0\n--- /dev/null\n+++ b/changelog/5... | [
{
"diff_hunk": "@@ -0,0 +1,45 @@\n+import pytest\n+\n+\n+@pytest.fixture\n+def blackout_minion(salt_minion, salt_master, salt_run_cli):\n+ with pytest.helpers.temp_file(\n+ \"top.sls\",\n+ \"\"\"base:\\n '*':\\n - fnord\"\"\",\n+ salt_master.pillar_tree.base.paths[0],",
"line": n... | 2cdafeebcc26f73fc07d99c2be9e0bceca03e47d | diff --git a/changelog/53513.fixed b/changelog/53513.fixed
new file mode 100644
index 000000000000..9a653c8476a0
--- /dev/null
+++ b/changelog/53513.fixed
@@ -0,0 +1 @@
+Changed manage.versions to report minions offline if minion call fails.
diff --git a/salt/runners/manage.py b/salt/runners/manage.py
index a4786106594... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
sqlfluff__sqlfluff-2130@51d0620 | sqlfluff/sqlfluff | Python | 2,130 | Lint spaces in qualified names | Fixes #1754
This rule change adds another type of unnecessary whitespace to L039. Any whitespace or newline segments found within a reference segment type are removed.
Per @jpy-git 's suggestion this has been implemented as a change to an existing rule, but this could be spun out into its own rule if that's pre... | 2021-12-17T15:14:17Z | New Rule suggestion: flag spaces in qualified names
TSQL technically allows for spaces between the elements of a qualified name. This is confusing and bad practice. I assume it is also confusing and bad practice in other dialects, if it's even allowed.
We should be able to fix this automatically.
Anti-pattern:
... | I think this should maybe be part of the excess whitespace rule | [
{
"body": "TSQL technically allows for spaces between the elements of a qualified name. This is confusing and bad practice. I assume it is also confusing and bad practice in other dialects, if it's even allowed.\r\n\r\nWe should be able to fix this automatically.\r\n\r\nAnti-pattern:\r\n```\r\nSELECT [thistab... | e63a17dbb8375c7013d52afb3d94bbfd08421de6 | {
"head_commit": "51d0620ed8cc84f3338de7d60485b3982f13b2c6",
"head_commit_message": "Merge branch 'main' into Lint_Spaces_In_Qualified_Names",
"patch_to_review": "diff --git a/src/sqlfluff/rules/L039.py b/src/sqlfluff/rules/L039.py\nindex df964ca8c35..6f23ebccb39 100644\n--- a/src/sqlfluff/rules/L039.py\n+++ b/sr... | [
{
"diff_hunk": "@@ -66,4 +66,32 @@ def _eval(self, context: RuleContext) -> Optional[List[LintResult]]:\n )\n prev_newline = False\n prev_whitespace = None\n+\n+ if (\n+ seg.is_type(\"object_reference\")\n+ or seg.i... | 117c647fe772ce864dded47a308d2db284220147 | diff --git a/src/sqlfluff/rules/L039.py b/src/sqlfluff/rules/L039.py
index df964ca8c35..970a37c71d4 100644
--- a/src/sqlfluff/rules/L039.py
+++ b/src/sqlfluff/rules/L039.py
@@ -66,4 +66,22 @@ def _eval(self, context: RuleContext) -> Optional[List[LintResult]]:
)
prev_newline = ... | {
"difficulty": "medium",
"estimated_review_effort": 2,
"problem_domain": "New Feature Additions"
} |
saltstack__salt-61631@c35dc2b | saltstack/salt | Python | 61,631 | Adding retry functionality when parallel is set to True | ### What does this PR do?
Making the retry state system feature available when parallel is set to True.
### What issues does this PR fix or reference?
Fixes: #61630 #61439
### Previous Behavior
When the retry options are set in a state and parallel is set to True, the job is rerun regardless of the original st... | 2022-02-11T17:15:17Z | [BUG] retry state option unavailble when parallel is True
**Description**
When the `retry` options are set in a state and parallel is set to True, the job is rerun regardless of the original state results and the subsequent runs are not done in parallel.
**Setup**
Basic state that includes `parallel: True` and `re... | [
{
"body": "**Description**\r\nWhen the `retry` options are set in a state and parallel is set to True, the job is rerun regardless of the original state results and the subsequent runs are not done in parallel.\r\n\r\n**Setup**\r\nBasic state that includes `parallel: True` and `retry` options:\r\n\r\n```\r\n{% ... | 43e122a08d2e5782995f5f5399b9655f7bc7db5b | {
"head_commit": "c35dc2ba15d3d3d1d5760c45ebc79064779d6924",
"head_commit_message": "Making the retry state system feature available when parallel is set to True.",
"patch_to_review": "diff --git a/changelog/61630.fixed b/changelog/61630.fixed\nnew file mode 100644\nindex 000000000000..c7472bd8f7fc\n--- /dev/null... | [
{
"diff_hunk": "@@ -2016,11 +2016,74 @@ def _call_parallel_target(self, name, cdata, low):\n }\n \n utc_finish_time = datetime.datetime.utcnow()\n+ timezone_delta = datetime.datetime.utcnow() - datetime.datetime.now()\n+ local_finish_time = utc_finish_time - timezone_delta\n+ ... | 813710c075792da5173e0e47523e07ba96d178e9 | diff --git a/changelog/61630.fixed b/changelog/61630.fixed
new file mode 100644
index 000000000000..c7472bd8f7fc
--- /dev/null
+++ b/changelog/61630.fixed
@@ -0,0 +1 @@
+Making the retry state system feature available when parallel is set to True.
diff --git a/salt/state.py b/salt/state.py
index e410cf712796..a8a3624cd... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "Bug Fixes"
} | |
sqlfluff__sqlfluff-2128@afe6d0d | sqlfluff/sqlfluff | Python | 2,128 | Normalise input newlines | <!--Firstly, thanks for adding this feature! Secondly, please check the key steps against the checklist below to make your contribution easy to merge.-->
<!--Please give the Pull Request a meaningful title (including the dialect this PR is for if it is dialect specific), as this will automatically be added to the re... | 2021-12-16T21:28:22Z | Feature request: Enable use of unix-style line endings when running sqlfluff fix command on Windows
In our environment, we use Windows PCs for development, but the company standard is that SQL files have unix-style line endings (LF). We use bash under WSL a lot, and set Windows editors to use LF only. However, the on... | I think the answer to this is just a config option to specify line endings when writing files, with options of maybe `system default`, LF and CRLF?
A config option would be perfect. For completeness, may as well include CR for Classic Mac, although probably not use much any more.
I'm going to take a look at adding thi... | [
{
"body": "In our environment, we use Windows PCs for development, but the company standard is that SQL files have unix-style line endings (LF). We use bash under WSL a lot, and set Windows editors to use LF only. However, the only python we have available is on Windows. When running sqlfluff fix under python... | d841ee733e5397a253dd866ea2b85c66b9a7c7c9 | {
"head_commit": "afe6d0dfdfea5808387b70c88ecd3eab05586ea4",
"head_commit_message": "Merge branch 'main' into normalise_newlines",
"patch_to_review": "diff --git a/src/sqlfluff/core/linter/linter.py b/src/sqlfluff/core/linter/linter.py\nindex 0c96b7f338b..8c110439757 100644\n--- a/src/sqlfluff/core/linter/linter.... | [
{
"diff_hunk": "@@ -116,6 +116,11 @@ def _load_raw_file_and_config(\n # Return the raw file and config\n return raw_file, file_config, encoding\n \n+ @staticmethod\n+ def _normalise_newlines(string: str) -> str:\n+ \"\"\"Normalise newlines to unix-style line endings.\"\"\"\n+ ... | e158aa92d2ff1ddb57f8d444d347ae6ecf8468ef | diff --git a/src/sqlfluff/core/linter/linter.py b/src/sqlfluff/core/linter/linter.py
index 0c96b7f338b..a720700c611 100644
--- a/src/sqlfluff/core/linter/linter.py
+++ b/src/sqlfluff/core/linter/linter.py
@@ -16,7 +16,7 @@
)
import pathspec
-
+import regex
from tqdm import tqdm
from sqlfluff.core.errors import ... | {
"difficulty": "low",
"estimated_review_effort": 2,
"problem_domain": "New Feature Additions"
} |
saltstack__salt-61519@d64d458 | saltstack/salt | Python | 61,519 | port batch tests and fix returncode logic | ### What does this PR do?
Fixes retcode logic with batch execution and ports relevant tests to pytest
### What issues does this PR fix or reference?
Fixes: https://github.com/saltstack/salt/issues/60361
### Previous Behavior
Wrong retcode (or error)
### New Behavior
Correct retcode and no error
### Merg... | 2022-01-26T02:32:19Z | [BUG] Batch execution of multiple modules fails with salt global exception
**Description**
Batched running of multiple modules fails due to TypeError exception. Both batch.py and salt.py assume a single return code for batched execution runs, but running multiple modules results in a dictionary of return codes.
Ap... | 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\nBatched running of multiple modules fails due to TypeError exception. Both batch.py and salt.py assume a single return code for batched execution runs, but running multiple modules results in a dictionary of return codes.\r\n\r\nApplied the following patches to job.py and salt.py ... | f0d9fc5cfcd2672a8d274a75c117f455174b22a7 | {
"head_commit": "d64d458c924775211289a7d92043c3345fb0576b",
"head_commit_message": "Merge branch 'master' into batch-failure",
"patch_to_review": "diff --git a/changelog/60361.fixed b/changelog/60361.fixed\nnew file mode 100644\nindex 000000000000..fad476428a77\n--- /dev/null\n+++ b/changelog/60361.fixed\n@@ -0,... | [
{
"diff_hunk": "@@ -0,0 +1,203 @@\n+\"\"\"\n+ :codeauthor: Nicole Thomas <nicole@saltstack.com>\n+\"\"\"\n+\n+import pytest\n+import salt.utils.platform\n+\n+pytestmark = [\n+ pytest.mark.windows_whitelisted,\n+ pytest.mark.slow_test,\n+]\n+\n+\n+@pytest.fixture(scope=\"module\")\n+def run_timeout():\n... | 396d2dc405079af7cc869f026cdf78512d281348 | diff --git a/changelog/60361.fixed b/changelog/60361.fixed
new file mode 100644
index 000000000000..fad476428a77
--- /dev/null
+++ b/changelog/60361.fixed
@@ -0,0 +1 @@
+Batch runs now return proper retcodes in a tuple of the form (result, retcode)
diff --git a/salt/cli/batch.py b/salt/cli/batch.py
index cc934e0dc2a5..... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
saltstack__salt-61499@9332fb5 | saltstack/salt | Python | 61,499 | Fix Python 2 syntax used in status commands, notably status.netdev | ### What does this PR do?
Fixes Python 2 syntax that was used and had not been converted to Python 3.
In Python 2 a dictionary.keys() function returns a list which could be joined with another list using '+'.
In Python 3 a distionary.keys() function returns a view object which cannot be added to another view object ... | 2022-01-21T23:30:10Z | [BUG] status.netdev is no longer working on AIX
**Description**
The execution module command is no longer working in Python 3 versions of AIX salt-minion, getting dict handling errors
**Setup**
Run the command
```
salt <minion> status.netdev
```
Please be as specific as possible and give set-up details.
... | Here is working with 2017.7.8
```root@p1243-pvm2:/home/cecuser/test_2017.7/salt_2017.7.8# salt-call --local status.netdev
local:
----------
en0:
|_
----------
ipv4:
----------
Address:
129.40.60.162
Coll:
... | [
{
"body": "**Description**\r\nThe execution module command is no longer working in Python 3 versions of AIX salt-minion, getting dict handling errors\r\n\r\n\r\n\r\n**Setup**\r\nRun the command\r\n```\r\nsalt <minion> status.netdev\r\n```\r\n\r\nPlease be as specific as possible and give set-up details.\r\n\r\n... | eed47a52af5503bbbac16711abf7a03a8f040ad2 | {
"head_commit": "9332fb544c036ff264c729b0da70df111ad143b3",
"head_commit_message": "Added skip test if Python 3.5 or less (Debian 9), since OrderedDict is not default",
"patch_to_review": "diff --git a/changelog/60909.fixed b/changelog/60909.fixed\nnew file mode 100644\nindex 000000000000..c3e86b78560c\n--- /dev... | [
{
"diff_hunk": "@@ -0,0 +1,175 @@\n+import logging\n+import sys\n+\n+import salt.modules.status as status\n+from tests.support.mock import MagicMock, patch\n+\n+try:",
"line": null,
"original_line": 7,
"original_start_line": null,
"path": "tests/pytests/unit/modules/test_aix_status.py",
"sta... | 01c59bc6e7645dd28f6e35d8bba9c0f989badd19 | diff --git a/changelog/60909.fixed b/changelog/60909.fixed
new file mode 100644
index 000000000000..c3e86b78560c
--- /dev/null
+++ b/changelog/60909.fixed
@@ -0,0 +1 @@
+Fixed Python 2 syntax for Python 3, allow for view objects returned by dictionary keys() function
diff --git a/salt/modules/status.py b/salt/modules/s... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
sktime__sktime-8237@0952475 | sktime/sktime | Python | 8,237 | [BUG] fix incorrect scitype inference in forecasting pipelines for polymorphic forecasters | Fixes #8218 | 2025-05-02T11:50:16Z | [BUG] PytorchForecastingNBeats cannot be used within a TransformedTargetForecaster pipeline
**Describe the bug**
PytorchForecastingNBeats cannot be used within a TransformedTargetForecaster pipeline since it is not considered a "forecaster", but its first tag is "global_forecaster".
**To Reproduce**
```python
from skt... | @fkiraly, how does sktime evaluate the line `pipe = MinMaxScaler() * model`? I understand that the `* ` operator is overridden—could you explain why this is the case? | [
{
"body": "**Describe the bug**\nPytorchForecastingNBeats cannot be used within a TransformedTargetForecaster pipeline since it is not considered a \"forecaster\", but its first tag is \"global_forecaster\".\n\n**To Reproduce**\n```python\nfrom sktime.forecasting.pytorchforecasting import PytorchForecastingNBea... | 5dea61d7e52b958ef10e5eb468d44e56b154f58d | {
"head_commit": "0952475e86b0381462f32be2335e9aeb6afb96a3",
"head_commit_message": "replace scitype with is_scitype",
"patch_to_review": "diff --git a/sktime/forecasting/compose/_pipeline.py b/sktime/forecasting/compose/_pipeline.py\nindex f9281683260..a3fd3df93eb 100644\n--- a/sktime/forecasting/compose/_pipeli... | [
{
"diff_hunk": "@@ -93,7 +93,11 @@ def _check_steps(self, estimators, allow_postproc=False):\n COERCIBLE_SCITYPES = set(COERCIBLE_SCITYPES) - set(ALLOWED_SCITYPES)\n ACCEPTED_SCITYPES = ALLOWED_SCITYPES + list(COERCIBLE_SCITYPES)\n \n- est_scitypes = [scitype(x) for x in estimators]\n+ ... | 6d51b8fb992dc6c706ae6d8029c7227820887595 | diff --git a/sktime/forecasting/compose/_pipeline.py b/sktime/forecasting/compose/_pipeline.py
index f9281683260..cfa0cc71c0d 100644
--- a/sktime/forecasting/compose/_pipeline.py
+++ b/sktime/forecasting/compose/_pipeline.py
@@ -93,20 +93,20 @@ def _check_steps(self, estimators, allow_postproc=False):
COERCIBL... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
scikit-learn__scikit-learn-20380@e378755 | scikit-learn/scikit-learn | Python | 20,380 | ENH Allow `sample_weight` and other `fit_params` in RFE | #### Reference Issues/PRs
This PR takes over the work from #7333 and fixes #7308
closes #7333
#### What does this implement/fix? Explain your changes.
This PR just continues the work from the original PR by implementing the changes on the current _main_ branch
The original description reads:
> Adds sup... | 2021-06-26T18:34:03Z | RFE/RFECV doesn't work with sample weights
As far as I can tell, `sklearn.feature_selection.RFE` has no way to pass sample weights to the estimator alongside the data.
I have fixed this in my code with:
``` diff
index bbe0cda..f5072b2 100644
--- a/sklearn/feature_selection/rfe.py
+++ b/sklearn/feature_selectio... | yeah I think you can open a PR for that. You need to add tests, though.
Note that testing for sample weights usually involves checking that weights
correspond to repeating samples.
On 1 September 2016 at 03:33, Andreas Mueller notifications@github.com
wrote:
> yeah I think you can open a PR for that. You need to add... | [
{
"body": "As far as I can tell, `sklearn.feature_selection.RFE` has no way to pass sample weights to the estimator alongside the data.\r\n\r\nI have fixed this in my code with:\r\n\r\n``` diff\r\nindex bbe0cda..f5072b2 100644\r\n--- a/sklearn/feature_selection/rfe.py\r\n+++ b/sklearn/feature_selection/rfe.py\r... | 238451d55ed57c3d16bc42f6a74f5f0126a7c700 | {
"head_commit": "e37875534bb16f95af50363d05c393e57924ff15",
"head_commit_message": "Update sklearn/feature_selection/_rfe.py\n\nCo-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>",
"patch_to_review": "diff --git a/doc/whats_new/v1.0.rst b/doc/whats_new/v1.0.rst\nindex ecb4b5972a669..ce252a502e28d 100644... | [
{
"diff_hunk": "@@ -336,14 +339,19 @@ def score(self, X, y):\n y : array of shape [n_samples]\n The target values.\n \n+ **fit_params : dict\n+ Parameters to pass to the `score` method of the estimator.",
"line": null,
"original_line": 343,
"original_start_line"... | 65b34899e14f715333ccc3852d8b84e1da643d37 | diff --git a/doc/whats_new/v1.0.rst b/doc/whats_new/v1.0.rst
index ecb4b5972a669..ce252a502e28d 100644
--- a/doc/whats_new/v1.0.rst
+++ b/doc/whats_new/v1.0.rst
@@ -337,6 +337,11 @@ Changelog
when the variance threshold is negative.
:pr:`20207` by :user:`Tomohiro Endo <europeanplaice>`
+- |Enhancement| :func:`f... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "New Feature Additions"
} |
scikit-learn__scikit-learn-20416@b497a1a | scikit-learn/scikit-learn | Python | 20,416 | FIX check X in LedoitWolf to not allow 0 samples array | #### Reference Issues/PRs
Fix #20362
#### What does this implement/fix? Explain your changes.
This pull-request implements the array checks to the following functions:
- ledoit_wolf_shrinkage
- ledoit_wolf
#### Any other comments?
Should we extend this check to other covariance functions?
If yes, p... | 2021-06-28T13:00:30Z | `sklearn.covariance.ledoit_wolf` throws ZeroDivisionError
#### Describe the bug
`sklearn.covariance.ledoit_wolf` throws `ZeroDivisionError` when `X` is an empty array
#### Steps/Code to Reproduce
~~~python
import numpy as np
from sklearn.covariance import ledoit_wolf
ledoit_wolf(X=np.zeros((0,2)))
~~~
... | Hi,
What should be the _ledoit_wolf_ behaviour when giving an empty array?
Do you except a personalized scikit-learn error or do you except having a zero return?
On my side, I think it should raise an error of the kind: _ValueError: Found array with 0 sample(s) (shape=(0, 2)) while a minimum of 1 is required._
... | [
{
"body": "\r\n\r\n#### Describe the bug\r\n`sklearn.covariance.ledoit_wolf` throws `ZeroDivisionError` when `X` is an empty array\r\n\r\n#### Steps/Code to Reproduce\r\n\r\n\r\n~~~python\r\nimport numpy as np\r\nfrom sklearn.covariance import ledoit_wolf\r\nledoit_wolf(X=np.zeros((0,2)))\r\n~~~\r\n\r\n#### Exp... | cf286be4f3f5bb9b604efd068aaa87dc303bb4ac | {
"head_commit": "b497a1a61fb0a63f4b1a4ec9b8755e730257f467",
"head_commit_message": "add array checks to ledoit_wolf covariances",
"patch_to_review": "diff --git a/sklearn/covariance/_shrunk_covariance.py b/sklearn/covariance/_shrunk_covariance.py\nindex 494c65d01186c..952ac777e947a 100644\n--- a/sklearn/covarian... | [
{
"diff_hunk": "@@ -198,6 +198,7 @@ def ledoit_wolf_shrinkage(X, assume_centered=False, block_size=1000):\n where mu = trace(cov) / n_features\n \"\"\"\n X = np.asarray(X)\n+ X = check_array(X, accept_sparse=True)",
"line": null,
"original_line": 201,
"original_start_line": null,
... | 99e5e53164e41cd453614d0e949888bf771532af | diff --git a/doc/whats_new/v0.24.rst b/doc/whats_new/v0.24.rst
index f54e20e5154bc..9303a98ea4c97 100644
--- a/doc/whats_new/v0.24.rst
+++ b/doc/whats_new/v0.24.rst
@@ -73,7 +73,7 @@ Changelog
- |Fix|: Fixed a bug in :class:`linear_model.LogisticRegression`: the
sample_weight object is not modified anymore. :pr:`19... | {
"difficulty": "low",
"estimated_review_effort": 2,
"problem_domain": "Bug Fixes"
} |
scikit-learn__scikit-learn-20207@6eca840 | scikit-learn/scikit-learn | Python | 20,207 | API Raises an error when a negative threshold is chosen in VarianceThreshold | <!--
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
-->
#### Reference Issues/PRs
Fixes #20206
#### What does this implement/fix? Explain your changes.
I made a quick fix of... | 2021-06-03T15:04:19Z | Unexpected behavior of VarianceThreshold when a threshold is negative.
#### Describe the bug
When a threshold is negative, an unexpected result returns.
For now, I'm not sure why this happens.
#### Steps/Code to Reproduce
Example:
```python
data = [[0, 1, 2, 3, 4],
[0, 2, 2, 3, 5],
[1,... | [
{
"body": "#### Describe the bug\r\n\r\nWhen a threshold is negative, an unexpected result returns.\r\nFor now, I'm not sure why this happens.\r\n\r\n#### Steps/Code to Reproduce\r\n\r\n\r\n\r\nExample:\r\n```python\r\ndata = [[0, 1, 2, 3, 4],\r\n [0, 2, 2, 3, 5],\r\n [1, 1, 2, 4, 0]]\r\n\r\n for... | 5c3cb6b0af04344d41d542b718d682604d6aa685 | {
"head_commit": "6eca8401d0c48a6a82f1992cc6001049c9f9ee05",
"head_commit_message": "Add whats new",
"patch_to_review": "diff --git a/doc/whats_new/v1.0.rst b/doc/whats_new/v1.0.rst\nindex 02c77459ddc22..7b743255618c1 100644\n--- a/doc/whats_new/v1.0.rst\n+++ b/doc/whats_new/v1.0.rst\n@@ -295,6 +295,10 @@ Changel... | [
{
"diff_hunk": "@@ -295,6 +295,10 @@ Changelog\n :pr:`17169` by :user:`Dmytro Lituiev <DSLituiev>`\n and :user:`Julien Jerphanion <jjerphan>`.\n \n+- |Fix| Fixed a bug in class:`feature_selection.VarianceThreshold`\n+ when a variance threshold is negative.",
"line": null,
"original_line": 299,
... | adb9fe7d946f321579fdcb1cffd5a3e956f22e40 | diff --git a/doc/whats_new/v1.0.rst b/doc/whats_new/v1.0.rst
index 02c77459ddc22..8e5d085954891 100644
--- a/doc/whats_new/v1.0.rst
+++ b/doc/whats_new/v1.0.rst
@@ -295,6 +295,10 @@ Changelog
:pr:`17169` by :user:`Dmytro Lituiev <DSLituiev>`
and :user:`Julien Jerphanion <jjerphan>`.
+- |API| Raises an error in ... | {
"difficulty": "low",
"estimated_review_effort": 2,
"problem_domain": "Bug Fixes"
} | |
sktime__sktime-8031@c4158ff | sktime/sktime | Python | 8,031 | [ENH] `ray` parallelization backend | #### Reference Issues/PRs
<!--
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.
If no issue exists, you can open one here: http... | 2025-03-23T15:59:20Z | [ENH] Bring ray into sktime parallelize directly
**Is your feature request related to a problem? Please describe.**
Not a "problem" directly but i was wondering if it would be worthwhile to have a direct ray backend instead of having to go through joblib.
**Describe the solution you'd like**
Write a new function in t... | I agree it would be worthwhile! | [
{
"body": "**Is your feature request related to a problem? Please describe.**\nNot a \"problem\" directly but i was wondering if it would be worthwhile to have a direct ray backend instead of having to go through joblib. \n\n**Describe the solution you'd like**\nWrite a new function in the sktime.parrallel file... | 9a630a78abfb1e1018db5440b284a827886f5904 | {
"head_commit": "c4158ff5dc6b826f394019b49aa2dce5690874c4",
"head_commit_message": "[ENH] Add skip clause for ray backend if not installed to match with dask",
"patch_to_review": "diff --git a/pyproject.toml b/pyproject.toml\nindex 4f133b0b5b7..3ccfe3983ef 100644\n--- a/pyproject.toml\n+++ b/pyproject.toml\n@@ -... | [
{
"diff_hunk": "@@ -62,6 +63,8 @@ def parallelize(fun, iter, meta=None, backend=None, backend_params=None):\n If ``n_jobs`` is not passed, it will default to ``-1``, other parameters\n will default to ``joblib`` defaults.\n - \"dask\": any valid keys for ``dask.compute`` can be passe... | e7a8105a3760a9a83fc64411b0f7e81069c4a094 | diff --git a/.all-contributorsrc b/.all-contributorsrc
index 8037228d1ee..5095e08c876 100644
--- a/.all-contributorsrc
+++ b/.all-contributorsrc
@@ -3420,7 +3420,8 @@
"avatar_url": "https://avatars.githubusercontent.com/LHoelper",
"profile": "https://github.com/LHoelper",
"contributions": [
- ... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "New Feature Additions"
} |
sqlfluff__sqlfluff-2120@98898e2 | sqlfluff/sqlfluff | Python | 2,120 | Allowed array/struct values in `default` definition of `declare` | closes #2119
### 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_cases`.
- `.sql`/`.yml` parser test ... | 2021-12-15T18:15:06Z | Add support for arrays and structs in DECLARE...DEFAULT (bigquery dialect)
Bigquery dialect currently does not support arrays and structs values in `DEFAULT` section of `DECLARE`
causing `PRS` error
```sql
DECLARE arr1 ARRAY<STRING> DEFAULT ['aaaa', 'bbb', 'cccc'];
DECLARE str1 STRUCT<f1 STRING, f2 STRING, f3 STRIN... | [
{
"body": "Bigquery dialect currently does not support arrays and structs values in `DEFAULT` section of `DECLARE`\r\ncausing `PRS` error\r\n```sql\r\nDECLARE arr1 ARRAY<STRING> DEFAULT ['aaaa', 'bbb', 'cccc'];\r\nDECLARE str1 STRUCT<f1 STRING, f2 STRING, f3 STRING> DEFAULT ('aaaa', 'bbb', 'cccc');\r\n```\r\nli... | bf12e8b2371fdcfc617282256c2d9d2d4d9e9f7e | {
"head_commit": "98898e25e13717d251916108033bde0fda267f50",
"head_commit_message": "added `tuple` segment + tests",
"patch_to_review": "diff --git a/src/sqlfluff/dialects/dialect_bigquery.py b/src/sqlfluff/dialects/dialect_bigquery.py\nindex a462c3eac86..ab0e68de685 100644\n--- a/src/sqlfluff/dialects/dialect_bi... | [
{
"diff_hunk": "@@ -585,18 +585,29 @@ class TypelessStructSegment(BaseSegment):\n type = \"typeless_struct\"\n match_grammar = Sequence(\n \"STRUCT\",\n- Bracketed(\n- Delimited(\n- AnyNumberOf(\n- Sequence(\n- Ref(\"Base... | 9bb62cfab42e25870e6419208f154c37c81e4fe4 | diff --git a/src/sqlfluff/dialects/dialect_bigquery.py b/src/sqlfluff/dialects/dialect_bigquery.py
index a462c3eac86..2f244b6286d 100644
--- a/src/sqlfluff/dialects/dialect_bigquery.py
+++ b/src/sqlfluff/dialects/dialect_bigquery.py
@@ -135,6 +135,19 @@
Ref("QuotedIdentifierSegment"),
Ref("NakedIdenti... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "New Feature Additions"
} | |
sqlfluff__sqlfluff-2096@65ddcf6 | sqlfluff/sqlfluff | Python | 2,096 | Grammar: Adds support for ALTER VIEW statement for Postgres dialect | ### Brief summary of the change made
Adds support for parsing `ALTER VIEW` statements for the Postgres dialect
Closes #2094
### Are there any other side effects of this change that we should be aware of?
None
### Pull Request checklist
- [x] Please confirm you have completed any of the necessary steps below.... | 2021-12-11T19:51:59Z | Postgres: Add support for ALTER VIEW statement
## Expected Behaviour
SQLFluff should be able to parse `ALTER VIEW` statements
## Observed Behaviour
```shell
sqlfluff lint --dialect postgres -n sample.sql
== [sample.sql] FAIL ... | [
{
"body": "## Expected Behaviour\r\nSQLFluff should be able to parse `ALTER VIEW` statements\r\n\r\n## Observed Behaviour\r\n```shell\r\nsqlfluff lint --dialect postgres -n sample.sql\r\n\r\n== [sample.sql] FAIL ... | 7aecf672872d05b608d614dc1f2b040e17a4f902 | {
"head_commit": "65ddcf60951e0bc3d6864cf6a4e892692c2320e4",
"head_commit_message": "Merge branch 'main' into 2094-postgres-alter-view",
"patch_to_review": "diff --git a/src/sqlfluff/dialects/dialect_postgres.py b/src/sqlfluff/dialects/dialect_postgres.py\nindex 47961e83795..b8fa950c317 100644\n--- a/src/sqlfluff... | [
{
"diff_hunk": "@@ -1647,6 +1647,83 @@ class DropMaterializedViewStatementSegment(BaseSegment):\n )\n \n \n+@postgres_dialect.segment()\n+class AlterViewStatementSegment(BaseSegment):\n+ \"\"\"A `ALTER VIEW` statement.",
"line": null,
"original_line": 1652,
"original_start_line": null,
"p... | d6c867ce98be6e3ef13e32da1b99618f9c26cd28 | diff --git a/src/sqlfluff/dialects/dialect_postgres.py b/src/sqlfluff/dialects/dialect_postgres.py
index 47961e83795..374d4065ab7 100644
--- a/src/sqlfluff/dialects/dialect_postgres.py
+++ b/src/sqlfluff/dialects/dialect_postgres.py
@@ -1647,6 +1647,83 @@ class DropMaterializedViewStatementSegment(BaseSegment):
)
... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "New Feature Additions"
} | |
saltstack__salt-61476@1c831b0 | saltstack/salt | Python | 61,476 | Fixed user.present which was breaking when updating workphone,homephone, fullname and "other" fields in case int was passed instead of string | ### What does this PR do?
Fixed user.present which was breaking when updating workphone,homephone, fullname and "other" fields in case int was passed instead of string
### What issues does this PR fix or reference?
Fixes #53961
### Previous Behavior
user.present (for updating the user) was breaking when any of t... | 2022-01-18T12:08:07Z | user.present updating workphone, homephone fails
A state definition like this:
foo:
user:
- present
- workphone: 123
fails:
comment: These values could not be changed: {u'workphone': 123}
I think the problem is that "123" is (internally) of type int instead of string and the final check if the ... | @sotho
Does the state work without these changes if you modify your state to this?
```
foo:
user:
- present
- workphone: '123'
```
I still think we might want to make the change to always cast these values to a string but I am just wondering if this is a reasonable work around for now.
Ultim... | [
{
"body": "A state definition like this:\r\n\r\nfoo:\r\n user:\r\n - present\r\n - workphone: 123\r\n\r\nfails:\r\n comment: These values could not be changed: {u'workphone': 123}\r\n\r\nI think the problem is that \"123\" is (internally) of type int instead of string and the final check if the update w... | e2c9452f211804b95f3b5129f659cc9c12c079ec | {
"head_commit": "1c831b012b4f219327e471b217b28c354f56e675",
"head_commit_message": "Removed some comments",
"patch_to_review": "diff --git a/changelog/53961.fixed b/changelog/53961.fixed\nnew file mode 100644\nindex 000000000000..a5235eada7f0\n--- /dev/null\n+++ b/changelog/53961.fixed\n@@ -0,0 +1 @@\n+Fixed use... | [
{
"diff_hunk": "@@ -13,7 +13,18 @@\n \n @pytest.fixture\n def configure_loader_modules():\n- return {user: {}}\n+ shadow_info = MagicMock(\n+ return_value={\"min\": 2, \"max\": 88888, \"inact\": 77, \"warn\": 14, \"passwd\": \"\"}\n+ )\n+ shadow_hash = MagicMock(return_value=\"abcd\")\n+ d... | e33c14a31da97465fd1a1a8506b65dfc8b7c6ea9 | diff --git a/changelog/53961.fixed b/changelog/53961.fixed
new file mode 100644
index 000000000000..a5235eada7f0
--- /dev/null
+++ b/changelog/53961.fixed
@@ -0,0 +1 @@
+Fixed user.present which was breaking when updating workphone,homephone, fullname and "other" fields in case int was passed instead of string
\ No new... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
sktime__sktime-7954@b60f068 | sktime/sktime | Python | 7,954 | [ENH] `HierarchyEnsembleForecaster` parallelization backends | <!--
Welcome to sktime, and thanks for contributing!
Please have a look at our contribution guide:
https://www.sktime.net/en/latest/get_involved/contributing.html
-->
#### Reference Issues/PRs
<!--
Example: Fixes #1234. See also #3456.
Please use keywords (e.g., Fixes) to create link to the issues or pull r... | 2025-03-08T19:44:01Z | [ENH] Let HEF fit and predict in parallel
**Is your feature request related to a problem? Please describe.**
As it is the HierarchyEnsembleForecaster fits every model one at a time which may result in long training times if the hierarchy becomes sufficiently large.
**Describe the solution you'd like**
Instead enable ... | @LHoelper
Thanks for raising this issue!
This is one of the PRs I have raised which solves similar issue: https://github.com/sktime/sktime/pull/7683
And this could be a good reference point to start working on this forecaster.
Although it needs some insights from @fkiraly if it would align well with the forecaster arc... | [
{
"body": "**Is your feature request related to a problem? Please describe.**\nAs it is the HierarchyEnsembleForecaster fits every model one at a time which may result in long training times if the hierarchy becomes sufficiently large. \n\n**Describe the solution you'd like**\nInstead enable the option to use t... | c2650f95531593f8ff914d142b880b03ec3254a6 | {
"head_commit": "b60f0680f2db0183cdeb4bc7727380a7c20611be",
"head_commit_message": "Refactor: Rename function to _predict_one_forecaster to avoid confusion",
"patch_to_review": "diff --git a/.all-contributorsrc b/.all-contributorsrc\nindex eb81ca53925..1d0c83e5be0 100644\n--- a/.all-contributorsrc\n+++ b/.all-co... | [
{
"diff_hunk": "@@ -109,10 +143,20 @@ class HierarchyEnsembleForecaster(_HeterogenousEnsembleForecaster):\n \n _steps_attr = \"_forecasters\"\n \n- def __init__(self, forecasters, by=\"level\", default=None):\n+ def __init__(\n+ self, forecasters, by=\"level\", default=None, backend=None, backe... | 39fe9ac9973239d8721abef83a013a8a457c5be0 | diff --git a/.all-contributorsrc b/.all-contributorsrc
index ecf627af201..59b7d99389b 100644
--- a/.all-contributorsrc
+++ b/.all-contributorsrc
@@ -3414,6 +3414,15 @@
"code"
]
},
+ {
+ "login": "LHoelper",
+ "name": "Luca Hölper",
+ "avatar_url": "https://avatars.githubuserconten... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "New Feature Additions"
} |
sqlfluff__sqlfluff-2059@e7a44d9 | sqlfluff/sqlfluff | Python | 2,059 | Fix L043 issue when trying to autofix functions | <!--Firstly, thanks for adding this feature! Secondly, please check the key steps against the checklist below to make your contribution easy to merge.-->
<!--Please give the Pull Request a meaningful title (including the dialect this PR is for if it is dialect specific), as this will automatically be added to the re... | 2021-12-06T20:13:48Z | Applying rule L043 threw an Exception
<!--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.-->
## Expected Behaviour
No exception
## Observed Behaviour
``... | can confirm that I also see this error, I'll take a look this evening
reformatted to only raise the L043 exception
```sql
SELECT
dv_runid,
CASE
WHEN LEAD(dv_startdateutc) OVER (
PARTITION BY rowid ORDER BY dv_startdateutc
) IS NULL
THEN 1
ELSE 0
END A... | [
{
"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.-->\r\n\r\n## Expected Behaviour\r\nNo exception\r\n\r\n## Observed Behaviour\r\n```\r\nCR... | 215a1f55bee09e7ad1bd822bf92d6bd771ef2592 | {
"head_commit": "e7a44d9c801f45f9ce17f714d5f8400e31cf3142",
"head_commit_message": "Merge branch 'main' into fix_L043_issue",
"patch_to_review": "diff --git a/src/sqlfluff/rules/L043.py b/src/sqlfluff/rules/L043.py\nindex 52592bc19a1..34e05462026 100644\n--- a/src/sqlfluff/rules/L043.py\n+++ b/src/sqlfluff/rules... | [
{
"diff_hunk": "@@ -216,11 +216,18 @@ def _eval(self, context: RuleContext) -> Optional[LintResult]:\n \n # Locate column reference in condition expression.\n column_reference_segment = next(\n- segment\n- for segment in condition_expression.... | e261719241cc7f23f5e8b694f3d95078199e3a3c | diff --git a/src/sqlfluff/rules/L043.py b/src/sqlfluff/rules/L043.py
index 52592bc19a1..5f888880024 100644
--- a/src/sqlfluff/rules/L043.py
+++ b/src/sqlfluff/rules/L043.py
@@ -216,11 +216,18 @@ def _eval(self, context: RuleContext) -> Optional[LintResult]:
# Locate column reference in condition expr... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
scikit-learn__scikit-learn-20159@45d3af5 | scikit-learn/scikit-learn | Python | 20,159 | FIX Fix RandomForestRegressor doesn't accept max_samples=1.0 #20156 | <!--
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
-->
#### Reference Issues/PRs
<!--
Example: Fixes #1234. See also #3456.
Please use keywords (e.g., Fixes) to create link to th... | 2021-05-28T07:47:38Z | RandomForestRegressor doesn't accept max_samples=1.0
#### Describe the bug
This example from the doc works:
```py
from sklearn.ensemble import RandomForestRegressor
from sklearn.datasets import make_regression
X, y = make_regression(n_features=4, n_informative=2,
random_state=0, shuffle=F... | I am able to confirm the error in the following environment.
```
System:
python: 3.8.10 (default, May 12 2021, 15:46:43) [GCC 8.3.0]
executable: /usr/local/bin/python
machine: Linux-5.4.0-72-generic-x86_64-with-glibc2.2.5
Python dependencies:
pip: 21.1.2
setuptools: 57.0.0
sklearn:... | [
{
"body": "#### Describe the bug\r\nThis example from the doc works:\r\n\r\n```py\r\nfrom sklearn.ensemble import RandomForestRegressor\r\nfrom sklearn.datasets import make_regression\r\nX, y = make_regression(n_features=4, n_informative=2,\r\n random_state=0, shuffle=False)\r\nregr = Rand... | c9d223ccc58e2569b8e67f1d0217dd57a93ec07f | {
"head_commit": "45d3af5900eb6e7bfdf94798f2fa9030a2b466f4",
"head_commit_message": "Update sklearn/ensemble/tests/test_forest.py\n\nCo-authored-by: Olivier Grisel <olivier.grisel@ensta.org>",
"patch_to_review": "diff --git a/doc/whats_new/v1.0.rst b/doc/whats_new/v1.0.rst\nindex 29a4bce98ecb0..1d3b6569ed25a 1006... | [
{
"diff_hunk": "@@ -257,6 +257,10 @@ Changelog\n :class:`ensemble.StackingClassifier` and :class:`ensemble.StackingRegressor`.\n :pr:`19564` by `Thomas Fan`_.\n \n+- |Fix| Fixed the range of the argument max_samples to be (0.0, 1.0]\n+ in :class:`ensemble.BaseForest` and the class that inherits it.",
"... | 928e29e378279578f4df4429455abefab878e607 | diff --git a/doc/whats_new/v1.0.rst b/doc/whats_new/v1.0.rst
index 29a4bce98ecb0..7cbf0ada220ab 100644
--- a/doc/whats_new/v1.0.rst
+++ b/doc/whats_new/v1.0.rst
@@ -257,6 +257,12 @@ Changelog
:class:`ensemble.StackingClassifier` and :class:`ensemble.StackingRegressor`.
:pr:`19564` by `Thomas Fan`_.
+- |Fix| Fix... | {
"difficulty": "low",
"estimated_review_effort": 2,
"problem_domain": "Bug Fixes"
} |
saltstack__salt-61450@f36002f | saltstack/salt | Python | 61,450 | Transport refactor | ### What does this PR do?
Refactor transports to make them more plug-able. This PR adds the concept of channels to salt. Channels handle specifics related to salt such as message structure, authentication, ect. Transports are simplified to only handle sending and receiving messages over the wire.
### What issues ... | 2022-01-12T22:04:22Z | [TECH DEBT] Make transports more plug-able
Refactor transport to make them more plug-able. Transports should not need to know anything about authentication. To reduce code duplication refactor and make a distinction between channels and transports. Channels will handle auth and other salt specifics and will rely on tra... | [
{
"body": "Refactor transport to make them more plug-able. Transports should not need to know anything about authentication. To reduce code duplication refactor and make a distinction between channels and transports. Channels will handle auth and other salt specifics and will rely on transports to simply send m... | 637e74f0f2e80723fa30eb8f83a86af440c6ba4e | {
"head_commit": "f36002f323c8e1f218d9223cded2a4d44200fd19",
"head_commit_message": "Fix lint error",
"patch_to_review": "diff --git a/changelog/61161.fixed b/changelog/61161.fixed\nnew file mode 100644\nindex 000000000000..742d06fef7bd\n--- /dev/null\n+++ b/changelog/61161.fixed\n@@ -0,0 +1 @@\n+Re-factor transp... | [
{
"diff_hunk": "@@ -85,6 +91,12 @@ def recv_chunked(dest, chunk, append=False, compressed=True, mode=None):\n \"\"\"\n This function receives files copied to the minion using ``salt-cp`` and is\n not intended to be used directly on the CLI.\n+\n+ CLI Example:\n+\n+ .. code-block:: bash\n+\n+ ... | 8830a05a5d5deca545692e808691162cf74359e3 | diff --git a/changelog/61161.fixed b/changelog/61161.fixed
new file mode 100644
index 000000000000..742d06fef7bd
--- /dev/null
+++ b/changelog/61161.fixed
@@ -0,0 +1 @@
+Re-factor transport to make them more plug-able
diff --git a/doc/topics/channels/index.rst b/doc/topics/channels/index.rst
new file mode 100644
index ... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "Code Refactoring / Architectural Improvement"
} | |
sktime__sktime-7943@0b2c6d7 | sktime/sktime | Python | 7,943 | [ENH] extend `_check_soft_dependencies` to allow dependency disjunctions | This PR extends functionality of `_check_soft_dependencies` to allow dependency disjunctions, i.e., to specify "package X or package Y must be present", with inclusive (logical) or.
To specify a logical "or", replace a package str with a list of strings. On the second nesting level, this will be interpreted as "or".... | 2025-03-05T16:29:30Z | [BUG] `DartsRegressionModel` can not be used if `u8darts` is not installed even if `darts` is installed
In `darts` adapter, `u8darts` is mentioned as the dependency since it has smaller dependency set than full `darts`. But `darts` is a proper superset of `u8darts` and both gets imported as `import darts` only. Therefo... | FYI @fnhirwa for Darts
FYI @fkiraly for general enhancement scope for dependency management
This needs to enhance the dependency on our side then, will open a PR for the fix.
@yarnabrina, this is confusing, can you explain the proper relation between `darts` and `u8darts`?
Am I correctly understanding:
* these a... | [
{
"body": "In `darts` adapter, `u8darts` is mentioned as the dependency since it has smaller dependency set than full `darts`. But `darts` is a proper superset of `u8darts` and both gets imported as `import darts` only. Therefore as a user if I have `darts` installed, my expectation is I should be able to use `... | 3d5db1181025daff0fe174d9701bdca312114693 | {
"head_commit": "0b2c6d78b386570ec54507ed5b1dac4022fc295a",
"head_commit_message": "Update _dependencies.py",
"patch_to_review": "diff --git a/sktime/forecasting/base/adapters/_darts.py b/sktime/forecasting/base/adapters/_darts.py\nindex 4776bb604f4..73c2153ac99 100644\n--- a/sktime/forecasting/base/adapters/_da... | [
{
"diff_hunk": "@@ -125,23 +154,51 @@ def _check_soft_dependencies(\n if normalize_reqs:\n pkg_env_version = _normalize_version(pkg_env_version)\n \n+ return package_version_req, pkg_env_version\n+\n+ # each element of the list \"package\" must be satisfied\n+ for package_req in... | 9a298098f8c86610c1d08063d75ed6821332a581 | diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md
index 60b4ccd36c9..5f109dccd80 100644
--- a/CONTRIBUTORS.md
+++ b/CONTRIBUTORS.md
@@ -6,7 +6,7 @@ Contributors
<!-- Please add your badges to .all-contibutorsrc -->
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
-[, as this will automatically be added to the re... | 2021-12-01T22:11:59Z | L052 - Add option for newline semicolon just for multiline queries
We use newline'd semicolons, but only for multiline queries. A config option for this would be great.
Eg.
```
SELECT foo FROM bar;
```
But also:
```
SELECT foo
FROM bar
;
``` | Where would you propose adding the semi-colon for something like
```sql
with cte as (
select a from b
)
select * from cte
```
Under it. It'd just be useful for the multiline gang if there was a config option for snapping inline to single line queries only
makes sense, just checking 😄 Do you know if we ha... | [
{
"body": "We use newline'd semicolons, but only for multiline queries. A config option for this would be great.\r\n\r\nEg.\r\n```\r\nSELECT foo FROM bar;\r\n```\r\n\r\nBut also:\r\n```\r\nSELECT foo\r\nFROM bar\r\n;\r\n```",
"number": 2013,
"title": "L052 - Add option for newline semicolon just for mul... | da1f3409b686f98f286a8983826e7a7f68c83b8a | {
"head_commit": "4427d0e4428a77e11558e2b0c8d5260db49a9fe4",
"head_commit_message": "Merge branch 'main' into L052_multiline_newline",
"patch_to_review": "diff --git a/src/sqlfluff/core/default_config.cfg b/src/sqlfluff/core/default_config.cfg\nindex 1a4b2dbf985..197b1610059 100644\n--- a/src/sqlfluff/core/defaul... | [
{
"diff_hunk": "@@ -77,18 +117,37 @@ test_pass_multi_statement_no_trailing_semi_colon_custom_require:\n L052:\n require_final_semicolon: True\n \n-test_fail_multi_statement_no_trailing_semi_colon_custom_require_newline:\n+test_pass_multi_statement_no_trailing_semi_colon_custom_require_oneline:",
... | 0bd49648fc021837836059f4a51bb8ee95015743 | diff --git a/src/sqlfluff/core/default_config.cfg b/src/sqlfluff/core/default_config.cfg
index 1a4b2dbf985..197b1610059 100644
--- a/src/sqlfluff/core/default_config.cfg
+++ b/src/sqlfluff/core/default_config.cfg
@@ -91,7 +91,7 @@ prefer_count_1 = False
prefer_count_0 = False
[sqlfluff:rules:L052] # Semi-colon for... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "New Feature Additions"
} |
sktime__sktime-7872@07ed0c6 | sktime/sktime | Python | 7,872 | [BUG] MAPA forecaster - missing clone, using exogenous data | #### Reference Issues/PRs
Fixes #7822
#### What does this implement/fix? Explain your changes.
As mentioned in #7822, these changes:
* if a base_forecaster is passed, it should be cloned and not used directly
* base_forecaster should be passed the X, exogenous data
#### Any other comments?
All tests are p... | 2025-02-20T12:43:11Z | [BUG] MAPA forecaster - missing clone, using exogenous data
There are two bugs in the `MAPAforecaster` that should be fixed:
* if a `base_forecaster` is passed, it should be cloned and not used directly
* `base_forecaster` should be passed the `X`, exogenous data
FYI @phoeenniixx | I will take this up after I am done with another issue, until then if anyone else wants to go for it feel free! | [
{
"body": "There are two bugs in the `MAPAforecaster` that should be fixed:\n\n* if a `base_forecaster` is passed, it should be cloned and not used directly\n* `base_forecaster` should be passed the `X`, exogenous data\n\nFYI @phoeenniixx",
"number": 7822,
"title": "[BUG] MAPA forecaster - missing clone... | b33cbef0b48ffefe0b2d9712eec297d5a23f1780 | {
"head_commit": "07ed0c669543957c308f0a9c84f2d49500710ef8",
"head_commit_message": "Removed _fh references in code",
"patch_to_review": "diff --git a/sktime/forecasting/mapa.py b/sktime/forecasting/mapa.py\nindex 2e4c8c39803..793b97a2f2a 100644\n--- a/sktime/forecasting/mapa.py\n+++ b/sktime/forecasting/mapa.py\... | [
{
"diff_hunk": "@@ -161,30 +161,29 @@ def __init__(\n self.weights = weights\n self.base_forecaster = base_forecaster\n \n- self._aggregation_levels = (\n+ self.aggregation_levels = (",
"line": null,
"original_line": 164,
"original_start_line": null,
"path": "sktime... | b32299cbdd81c8fc5d9dd9f277a2276cb3c6c71b | diff --git a/sktime/forecasting/mapa.py b/sktime/forecasting/mapa.py
index 2e4c8c39803..eb4df03073c 100644
--- a/sktime/forecasting/mapa.py
+++ b/sktime/forecasting/mapa.py
@@ -137,8 +137,8 @@ class MAPAForecaster(BaseForecaster):
"X_inner_mtype": "pd.DataFrame",
"ignores-exogeneous-X": False,
... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
saltstack__salt-61423@97aef6c | saltstack/salt | Python | 61,423 | Adding ability for scheduler module to work in offline mode | ### What does this PR do?
Adding the ability to add, delete, purge, and modify Salt scheduler jobs when the Salt minion is not running.
### What issues does this PR fix or reference?
Fixes: #61324, #54846
### Merge requirements satisfied?
**[NOTICE] Bug fixes or features added to Salt require tests.**
<!-- Pl... | 2022-01-06T00:15:10Z | [FEATURE] schedule state/module not working without minion running
**Description**
Setting up a schedule while the minion is not running gives an error "Failed to add job X to schedule.".
This needs to be more verbose, specifically stating either in the docs or in the error that the minion needs to be running bef... | @p3lim Thanks for the report. This is expected behavior. The schedule module and schedule state module utilize the Salt event bus to add a scheduled job to the running minion, if the Salt minion is not running then the event bus for the minion is unavailable. The above functionality would require an update to the mo... | [
{
"body": "**Description**\r\n\r\nSetting up a schedule while the minion is not running gives an error \"Failed to add job X to schedule.\".\r\n\r\nThis needs to be more verbose, specifically stating either in the docs or in the error that the minion needs to be running before a schedule can be added.\r\n\r\nOr... | c5ceaf521022f8edb533bfbc6b2966bf6e86e132 | {
"head_commit": "97aef6c9309d42265c65dec8a9c63b910d2f5ae0",
"head_commit_message": "Fixing test_purge failures.",
"patch_to_review": "diff --git a/changelog/61324.added b/changelog/61324.added\nnew file mode 100644\nindex 000000000000..d67051a8da4d\n--- /dev/null\n+++ b/changelog/61324.added\n@@ -0,0 +1 @@\n+Add... | [
{
"diff_hunk": "@@ -30,31 +32,85 @@ def sock_dir(tmp_path):\n return str(tmp_path / \"test-socks\")\n \n \n+@pytest.fixture\n+def schedule_config_file():\n+ config_dir = schedule.__opts__.get(\"conf_dir\", None)",
"line": null,
"original_line": 37,
"original_start_line": null,
"path": "te... | f7fc35feaabfd37c6c80e8f355468acdc9420336 | diff --git a/changelog/61324.added b/changelog/61324.added
new file mode 100644
index 000000000000..d67051a8da4d
--- /dev/null
+++ b/changelog/61324.added
@@ -0,0 +1 @@
+Adding the ability to add, delete, purge, and modify Salt scheduler jobs when the Salt minion is not running.
diff --git a/salt/modules/schedule.py b/... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "New Feature Additions"
} |
sqlfluff__sqlfluff-2121@d0d52a4 | sqlfluff/sqlfluff | Python | 2,121 | postgres: Add datatypes | <!--Firstly, thanks for adding this feature! Secondly, please check the key steps against the checklist below to make your contribution easy to merge.-->
<!--Please give the Pull Request a meaningful title (including the dialect this PR is for if it is dialect specific), as this will automatically be added to the re... | 2021-12-16T07:58:13Z | postgres: Implement explicit datatypes
<!--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.-->
## Expected Behaviour
SqlFluff should post an error message if... | @kayman-mk referring [here](https://github.com/sqlfluff/sqlfluff/blob/8ccb55943d539278840296bcca9a6aad9baec670/src/sqlfluff/dialects/dialect_ansi.py#L299) in `dialect_ansi.py` there are no specific datatypes implemented for any of SQLFluff.
so even something like this will still parse:
:\n match_grammar = OneOf(\"DATEADD\", \"DATEDIFF\")\n \n \n+@redshift_dialect.segment(replace=True)\n+class DatatypeIdentifierSegment(BaseSegment):\n+ \"\"\"A scalar or aggregate function.\n+\n+ Revert back to the ANSI d... | d0c0941ee45ddaed84ec4537d25c9208dd321c9a | diff --git a/src/sqlfluff/dialects/dialect_postgres.py b/src/sqlfluff/dialects/dialect_postgres.py
index ab3d6cee5a3..6fa1a48a54c 100644
--- a/src/sqlfluff/dialects/dialect_postgres.py
+++ b/src/sqlfluff/dialects/dialect_postgres.py
@@ -374,8 +374,10 @@ class DateTimeTypeIdentifier(BaseSegment):
Bracketed(... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
sqlfluff__sqlfluff-1979@fa207f9 | sqlfluff/sqlfluff | Python | 1,979 | Fix L009 FileSegment child + new create_before/create_after edit types | <!--Firstly, thanks for adding this feature! Secondly, please check the key steps against the checklist below to make your contribution easy to merge.-->
<!--Please give the Pull Request a meaningful title (including the dialect this PR is for if it is dialect specific), as this will automatically be added to the re... | 2021-11-26T00:26:04Z | Nuisance: L052 (require_final_semicolon = True) does not reliably add `;` if L009 is on and EOF line does not exist already
If:
- Rule 009 is not excluded (default)
- There is no single trailing newline (as rule 009 requires)
- Rule 052 parameter `require_final_semicolon = True` (not default)
Then `sqlfluff fix` ... | @barrywhart
May have the same nature as my previous [Issue](https://github.com/sqlfluff/sqlfluff/issues/1881)
But this one does not corrupt SQL: only a nuisance that `fix` behaviour is not according to expectations
Will look into this, not sure it's related to the other issue
cool, I think I've found the fix for thi... | [
{
"body": "If:\r\n- Rule 009 is not excluded (default)\r\n- There is no single trailing newline (as rule 009 requires)\r\n- Rule 052 parameter `require_final_semicolon = True` (not default)\r\n\r\nThen `sqlfluff fix` adds newline, but does not add a semicolon (`;`).\r\n\r\nRelated experiments:\r\n- Value of ano... | f3f59af615bf20c0d78929336f04851372140939 | {
"head_commit": "fa207f91e0b60da126b5253f8032b50dd4210091",
"head_commit_message": "resolve outstanding unit tests",
"patch_to_review": "diff --git a/src/sqlfluff/core/parser/segments/base.py b/src/sqlfluff/core/parser/segments/base.py\nindex 3b8e43435fc..b8eb2d68b76 100644\n--- a/src/sqlfluff/core/parser/segmen... | [
{
"diff_hunk": "@@ -91,15 +91,17 @@ def _eval(self, context: RuleContext) -> Optional[LintResult]:\n # We can't fail on a meta segment\n return None\n else:\n- # So this looks like the end of the file, but we\n- # need to check that each parent segment is al... | 0ba3eb39600386c59c5c6bc66c22adf5d2c9985d | diff --git a/src/sqlfluff/core/parser/segments/base.py b/src/sqlfluff/core/parser/segments/base.py
index 3b8e43435fc..b8eb2d68b76 100644
--- a/src/sqlfluff/core/parser/segments/base.py
+++ b/src/sqlfluff/core/parser/segments/base.py
@@ -973,7 +973,11 @@ def apply_fixes(self, fixes):
if f.ed... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "Bug Fixes"
} |
sqlfluff__sqlfluff-1923@2783431 | sqlfluff/sqlfluff | Python | 1,923 | L043 refinement: Add autofix for common use of CASE to fill NULL values. | <!--Firstly, thanks for adding this feature! Secondly, please check the key steps against the checklist below to make your contribution easy to merge.-->
<!--Please give the Pull Request a meaningful title (including the dialect this PR is for if it is dialect specific), as this will automatically be added to the re... | 2021-11-17T18:14:27Z | New rule: COALESCE instead of CASE/IF when possible
In all dialects that have `COALESCE` code such as `CASE WHEN num_cats IS NULL THEN 0 ELSE num_cats END` are bad practices because they are very long and need to be simplified as `COALESCE(num_cats, 0)` which is much shorter and a lot more readable. | Is this different to [Rule_L043](https://docs.sqlfluff.com/en/stable/rules.html#sqlfluff.core.rules.Rule_L043)?
@tunetheweb Yes. Here CASE does not necessarily actually return a boolean. However we may expand the scope of L043 to include it.
Looking into this, agree it should be a refinement of L043 | [
{
"body": "In all dialects that have `COALESCE` code such as `CASE WHEN num_cats IS NULL THEN 0 ELSE num_cats END` are bad practices because they are very long and need to be simplified as `COALESCE(num_cats, 0)` which is much shorter and a lot more readable. \r\n",
"number": 1797,
"title": "New rule: C... | b4335a3868e8b6101c47c8baabd921b88b58caf6 | {
"head_commit": "2783431af5fc119108dc3ea5104086b270698b8b",
"head_commit_message": "Merge branch 'main' into L043_refinement",
"patch_to_review": "diff --git a/src/sqlfluff/rules/L043.py b/src/sqlfluff/rules/L043.py\nindex b666aaf360e..b2a27c92b8c 100644\n--- a/src/sqlfluff/rules/L043.py\n+++ b/src/sqlfluff/rule... | [
{
"diff_hunk": "@@ -1,154 +1,261 @@\n \"\"\"Implementation of Rule L043.\"\"\"\n-from typing import Optional\n+from typing import List, Optional\n \n from sqlfluff.core.parser import (\n WhitespaceSegment,\n SymbolSegment,\n KeywordSegment,\n )\n+from sqlfluff.core.parser.segments.base import BaseSe... | d4ef6f251c8deb9e88f1b8783f3ed58394a6274f | diff --git a/src/sqlfluff/rules/L043.py b/src/sqlfluff/rules/L043.py
index b666aaf360e..52592bc19a1 100644
--- a/src/sqlfluff/rules/L043.py
+++ b/src/sqlfluff/rules/L043.py
@@ -1,11 +1,12 @@
"""Implementation of Rule L043."""
-from typing import Optional
+from typing import List, Optional
from sqlfluff.core.parser ... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "New Feature Additions"
} |
scikit-learn__scikit-learn-19888@f821087 | scikit-learn/scikit-learn | Python | 19,888 | FIX Fixes unknown handling for str dtypes in OrdinalEncoder.transform | <!--
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
-->
#### Reference Issues/PRs
<!--
Example: Fixes #1234. See also #3456.
Please use keywords (e.g., Fixes) to create link to th... | 2021-04-13T18:55:41Z | Ordinal encoder is not able to raising error inspite of the handle_unknown = 'use_encoded_value
#### Describe the bug
Using OrdinalEncoder(handle_unknown = 'use_encoded_value', unknown_value = -9)
I expected it to handle all the unknown values. But it seems to fail if we got a value which is lexicographically smal... | You are not using the same dtype between `fit` and `transform`. Passing a Python list will be converted to a numpy array of dtype `object` while you are passing a NumPy of string dtype at transform:
```python
import numpy as np
from sklearn.preprocessing import OrdinalEncoder
enc = OrdinalEncoder(handle_unknown='... | [
{
"body": "#### Describe the bug\r\nUsing OrdinalEncoder(handle_unknown = 'use_encoded_value', unknown_value = -9)\r\n\r\nI expected it to handle all the unknown values. But it seems to fail if we got a value which is lexicographically smaller than all the values OrdinalEncoder is fitted during the training.\r\... | ab65c8b7d672164e43479f38a95788376229fed0 | {
"head_commit": "f821087c7930a148d49f8820c675cf58c7a29674",
"head_commit_message": "DOC Adds whats new",
"patch_to_review": "diff --git a/doc/whats_new/v1.0.rst b/doc/whats_new/v1.0.rst\nindex 23211cd3a95b1..c0480fa52456d 100644\n--- a/doc/whats_new/v1.0.rst\n+++ b/doc/whats_new/v1.0.rst\n@@ -276,7 +276,7 @@ Cha... | [
{
"diff_hunk": "@@ -150,6 +150,10 @@ def _transform(self, X, handle_unknown='error', force_all_finite=True,\n if (self.categories_[i].dtype.kind in ('U', 'S')\n and self.categories_[i].itemsize > Xi.itemsize):\n Xi = Xi.astype(self.categori... | 88231f490be7b90ee849403eebc7364d7cfe3d4e | diff --git a/doc/whats_new/v0.24.rst b/doc/whats_new/v0.24.rst
index 2cfe6970dd7b1..a1ed8f8d60891 100644
--- a/doc/whats_new/v0.24.rst
+++ b/doc/whats_new/v0.24.rst
@@ -48,6 +48,9 @@ Changelog
`'use_encoded_value'` strategies.
:pr:`19234` by `Guillaume Lemaitre <glemaitre>`.
+- |Fix| :meth:`preprocessing.Ordina... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
sqlfluff__sqlfluff-1958@09ec766 | sqlfluff/sqlfluff | Python | 1,958 | New rule to flag special characters in identifiers | Fixes #1746
### Brief summary of the change made
A new linting rule: flag special characters in identifiers.
If an identifier includes a character other than alphanumeric or underscore, this rule will flag it.
This rule includes configuration settings to control which types of identifiers fall under the rule.
... | 2021-11-22T18:30:52Z | New rule suggestion: identify and flag special characters in object names
Should these sorts of issues be bugs or enhancements?
We should be able to identify and flag special characters in names when creating objects.
Anti-pattern:
```
CREATE TABLE DBO.ColumnNames
(
[TrailingSpace ] INT,
[Greater>Tha... | Enhancement I say. It’s asking for additional functionality not saying existing functionality doesn’t work.
Dialect missing things are more interesting. Is it a bug that we don’t support a syntax that’s a valid part of the language? Or an enhancement to add that support? Bug has the template to fill out though so pr... | [
{
"body": "Should these sorts of issues be bugs or enhancements?\r\n\r\nWe should be able to identify and flag special characters in names when creating objects.\r\n\r\nAnti-pattern:\r\n```\r\nCREATE TABLE DBO.ColumnNames\r\n(\r\n [TrailingSpace ] INT,\r\n [Greater>Than] INT,\r\n [Less<Than] INT,\r\n ... | 67023b85c41d23d6c6d69812a41b207c4f8a9331 | {
"head_commit": "09ec766e34241eeb9cdf31c3899329c45a4ea1b0",
"head_commit_message": "Rule: Special Characters in names: code review results",
"patch_to_review": "diff --git a/src/sqlfluff/core/default_config.cfg b/src/sqlfluff/core/default_config.cfg\nindex 1805c701b57..1a4b2dbf985 100644\n--- a/src/sqlfluff/core... | [
{
"diff_hunk": "@@ -0,0 +1,88 @@\n+\"\"\"Implementation of Rule L057.\"\"\"\n+\n+from typing import Optional\n+\n+from sqlfluff.core.rules.base import BaseRule, LintResult, RuleContext\n+from sqlfluff.core.rules.doc_decorators import (\n+ document_configuration,\n+)\n+from sqlfluff.rules.L014 import identifi... | 465f286a975cda06aa1d33eace50b756184164c4 | diff --git a/src/sqlfluff/core/default_config.cfg b/src/sqlfluff/core/default_config.cfg
index 1805c701b57..1a4b2dbf985 100644
--- a/src/sqlfluff/core/default_config.cfg
+++ b/src/sqlfluff/core/default_config.cfg
@@ -96,3 +96,8 @@ require_final_semicolon = False
[sqlfluff:rules:L054] # GROUP BY/ORDER BY column refe... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "New Feature Additions"
} |
sqlfluff__sqlfluff-1896@497bf15 | sqlfluff/sqlfluff | Python | 1,896 | Add INSERT INTO statements to Redshift Dialect | ### Brief summary of the change made
Fixes #1895 , the Insert Into statement was added to the Redshift dialect. Note that this differs from the ANSI/Postgres dialects in a few ways. Postgres, for example, can upsert but that is not a possibility in Redshift.
### Are there any other side effects of this change that ... | 2021-11-13T19:59:51Z | Redshift Dialect Cannot Parse INSERT INTO Statement
## Expected Behaviour
SQLFluff ought to be able to parse the following SQL statement using the Redshift dialect:
```
INSERT INTO s1.t1 (
SELECT
col1,
col2,
col3
FROM testtable
);
```
## Observed Behaviour
SQLFluff notes ... | [
{
"body": "## Expected Behaviour\r\nSQLFluff ought to be able to parse the following SQL statement using the Redshift dialect:\r\n```\r\nINSERT INTO s1.t1 (\r\n SELECT\r\n col1,\r\n col2,\r\n col3\r\n FROM testtable\r\n );\r\n```\r\n\r\n## Observed Behaviour\r\nSQLFluff notes that th... | 8477a15b4b0c51144cf3df5f635a530566e25eb1 | {
"head_commit": "497bf15ba08484e4571da94d55c7fc0a21ba7368",
"head_commit_message": "Formatting and removed Insert Statement from StatementSegment",
"patch_to_review": "diff --git a/src/sqlfluff/dialects/dialect_redshift.py b/src/sqlfluff/dialects/dialect_redshift.py\nindex fd80d013d8c..f8c83e2bc56 100644\n--- a/... | [
{
"diff_hunk": "@@ -249,6 +250,34 @@ class CreateTableStatementSegment(BaseSegment):\n )\n \n \n+@redshift_dialect.segment(replace=True)\n+class InsertStatementSegment(BaseSegment):\n+ \"\"\"A `INSERT` statement.",
"line": null,
"original_line": 255,
"original_start_line": null,
"path": "... | 0328260d558053c4726567500a5ddd7b5e5c62a6 | diff --git a/src/sqlfluff/dialects/dialect_redshift.py b/src/sqlfluff/dialects/dialect_redshift.py
index fd80d013d8c..27967f992e8 100644
--- a/src/sqlfluff/dialects/dialect_redshift.py
+++ b/src/sqlfluff/dialects/dialect_redshift.py
@@ -13,6 +13,7 @@
BaseSegment,
Delimited,
Nothing,
+ OptionallyBracke... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} | |
sqlfluff__sqlfluff-1879@bc7d53d | sqlfluff/sqlfluff | Python | 1,879 | Add rule L051 to forbid lone JOIN | <!--Firstly, thanks for adding this feature! Secondly, please check the key steps against the checklist below to make your contribution easy to merge.-->
<!--Please give the Pull Request a meaningful title (including the dialect this PR is for if it is dialect specific), as this will automatically be added to the re... | 2021-11-10T18:37:53Z | Add rule to not allow plain JOIN
Add rule to not allow "naked" joins, i.e. `JOIN`.
```sql
SELECT
...
FROM
customer
-- Should be an explicit join type, e.g. INNER JOIN or LEFT JOIN
JOIN orders ON customer.id = orders.customer_id
```
Potentially, you could also add a setting to assume all naked `JOIN... | Would be very similar to rule L033 if anyone is looking to implement this and wants to know where to start.
@tunetheweb could I be assigned this one please :)
Sure
We don't really use the assign label that much on this project so feel free to just leave a comment like "I'll look at this one" and then we'll consider ... | [
{
"body": "Add rule to not allow \"naked\" joins, i.e. `JOIN`.\r\n\r\n```sql\r\nSELECT\r\n ...\r\nFROM\r\n customer\r\n -- Should be an explicit join type, e.g. INNER JOIN or LEFT JOIN\r\n JOIN orders ON customer.id = orders.customer_id\r\n```\r\n\r\nPotentially, you could also add a setting to assume all n... | 606626572eefaff2709d504d2cb3e85a2750f956 | {
"head_commit": "bc7d53d99b5eabb9445331e19e50676cec2b7ab4",
"head_commit_message": "Merge branch 'main' into no_lone_into",
"patch_to_review": "diff --git a/src/sqlfluff/rules/L051.py b/src/sqlfluff/rules/L051.py\nnew file mode 100644\nindex 00000000000..e3c5c3fd5b0\n--- /dev/null\n+++ b/src/sqlfluff/rules/L051.... | [
{
"diff_hunk": "@@ -0,0 +1,60 @@\n+\"\"\"Implementation of Rule L051.\"\"\"\n+from typing import Optional\n+from sqlfluff.core.parser.segments.raw import KeywordSegment, WhitespaceSegment\n+\n+from sqlfluff.core.rules.base import BaseRule, LintResult, LintFix, RuleContext\n+from sqlfluff.core.rules.doc_decorato... | eb6c88575a74726b63a15fea95c20f0838cb4f2b | diff --git a/src/sqlfluff/rules/L051.py b/src/sqlfluff/rules/L051.py
new file mode 100644
index 00000000000..903be7904c3
--- /dev/null
+++ b/src/sqlfluff/rules/L051.py
@@ -0,0 +1,56 @@
+"""Implementation of Rule L051."""
+from typing import Optional
+from sqlfluff.core.parser.segments.raw import KeywordSegment, Whitesp... | {
"difficulty": "low",
"estimated_review_effort": 3,
"problem_domain": "New Feature Additions"
} |
sktime__sktime-7689@3f62196 | sktime/sktime | Python | 7,689 | Enable the HF Transformers Forecaster to pass model as object | Fixes https://github.com/sktime/sktime/issues/6561
Here’s a summary of the PR content in bullet points:
- **Extended functionality**: The PR enhances the `HFTransformersForecaster` class.
- **Dual model input**: It now accepts:
- A **string parameter** for loading a pretrained Hugging Face model.
- A **trans... | 2025-01-25T12:42:21Z | [ENH] Enable the HF Transformers Forecaster to pass object.
**Is your feature request related to a problem? Please describe.**
Currently, it is only possible to pass a string to the sktime Adapter. With this string, the model is downloaded. I would like to have the option to pass an actual hf transformers object. This... | @benHeid
To let the adapter accept the transformers model object along with the string implementation, I propose modifying the core class `HFTransformersForecaster` where it will also be consistent with the backend compatibility of accepting the model name and downloading it.
**Code Changes**
```{python}
## Mo... | [
{
"body": "**Is your feature request related to a problem? Please describe.**\r\nCurrently, it is only possible to pass a string to the sktime Adapter. With this string, the model is downloaded. I would like to have the option to pass an actual hf transformers object. This would enable the users to better fit o... | 4895a484b55872b782016bdf5f515313af6943df | {
"head_commit": "3f621961c2ac6f94abee8be9308e42504ac18813",
"head_commit_message": "add test_hf_transformers_forecaster",
"patch_to_review": "diff --git a/sktime/forecasting/hf_transformers_forecaster.py b/sktime/forecasting/hf_transformers_forecaster.py\nindex 5efb7793524..db62f2fbd22 100644\n--- a/sktime/forec... | [
{
"diff_hunk": "@@ -0,0 +1,84 @@\n+\"\"\"Tests for HFTransformersForecaster.\"\"\"\n+\n+__author__ = [\"Spinachboul\"]\n+\n+import pytest\n+from skbase.utils.dependencies import _check_soft_dependencies\n+\n+from sktime.tests.test_switch import run_test_for_class\n+\n+# Check if transformers is installed\n+TRAN... | d3459c4a5048ff10eb622b683615ef2c4f12119b | diff --git a/sktime/forecasting/hf_transformers_forecaster.py b/sktime/forecasting/hf_transformers_forecaster.py
index 5efb7793524..feeed2d42ff 100644
--- a/sktime/forecasting/hf_transformers_forecaster.py
+++ b/sktime/forecasting/hf_transformers_forecaster.py
@@ -30,9 +30,14 @@ class HFTransformersForecaster(BaseForec... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "New Feature Additions"
} |
sktime__sktime-7637@e3d49eb | sktime/sktime | Python | 7,637 | [ENH] forecasting `evaluate`: new `return_model` parameter to return fitted estimator states | #### Reference Issues/PRs
Fixes #7636
#### What does this implement/fix? Explain your changes.
This draft PR enhances the `evaluate` function in sktime to optionally return fitted models for each fold in the cross-validation. This is implemented through a new `return_model` parameter which, when set to `True`... | 2025-01-13T18:46:10Z | [ENH] Improve output of `evaluate` when using grid search forecasters
**Is your feature request related to a problem? Please describe.**
When using `evaluate` with a grid search forecaster (e.g. ) it is currently not possible to retrieve and inspect the best forecaster (or even the different version of the forecaster)... | I see - `get_fitted_params` is not sufficient in the `strategy="update"` case, right? Because intermediate states will be overwritten.
> I see - `get_fitted_params` is not sufficient in the `strategy="update"` case, right? Because intermediate states will be overwritten.
But this is an issue regardless of the strate... | [
{
"body": "**Is your feature request related to a problem? Please describe.**\r\nWhen using `evaluate` with a grid search forecaster (e.g. ) it is currently not possible to retrieve and inspect the best forecaster (or even the different version of the forecaster) fitted in each CV fold. This is relevant if the ... | 99a18e61bad502f8b22cddb4e167bd36adbe2098 | {
"head_commit": "e3d49eb0a710499961e82e57816b12be6b213e0e",
"head_commit_message": "Use explicit kwargs when calling functions",
"patch_to_review": "diff --git a/sktime/forecasting/model_evaluation/_functions.py b/sktime/forecasting/model_evaluation/_functions.py\nindex 8ae6e774190..d8afccf796c 100644\n--- a/skt... | [
{
"diff_hunk": "@@ -326,6 +340,7 @@ def evaluate(\n strategy: str = \"refit\",\n scoring: Optional[Union[callable, list[callable]]] = None,\n return_data: bool = False,\n+ return_model: bool = False,",
"line": null,
"original_line": 343,
"original_start_line": null,
"path": "sktim... | ac54aa16cb81328a59c3ccb2f133d7c7405dfa3b | diff --git a/sktime/forecasting/model_evaluation/_functions.py b/sktime/forecasting/model_evaluation/_functions.py
index 8ae6e774190..b273f0dcc08 100644
--- a/sktime/forecasting/model_evaluation/_functions.py
+++ b/sktime/forecasting/model_evaluation/_functions.py
@@ -7,6 +7,7 @@
import time
import warnings
+from c... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "New Feature Additions"
} |
sktime__sktime-7660@7e54a75 | sktime/sktime | Python | 7,660 | [ENH] Add regularization hyperparameter in ReconcilerForecaster | <!--
Welcome to sktime, and thanks for contributing!
Please have a look at our contribution guide:
https://www.sktime.net/en/latest/get_involved/contributing.html
-->
#### Reference Issues/PRs
Fixes #7051
<!--
Example: Fixes #1234. See also #3456.
Please use keywords (e.g., Fixes) to create link to the is... | 2025-01-18T09:16:03Z | [ENH] Add optional regularization hyperparameter to ReconcilerForecaster
**Is your feature request related to a problem? Please describe.**
When using optimal reconciliation methods, if more than 1 timeseries in the hierarchy has constant 0 values or is highly correlated with another, the residual covariance matrix ca... | FYI @ciaran-g
I could work on this | [
{
"body": "**Is your feature request related to a problem? Please describe.**\r\nWhen using optimal reconciliation methods, if more than 1 timeseries in the hierarchy has constant 0 values or is highly correlated with another, the residual covariance matrix can be singular and its inversion will break the code ... | 6077c25a113b1faa639750c5875a76a1350de417 | {
"head_commit": "7e54a75b1b4c29b30c69cc910f1f8e090fa895e2",
"head_commit_message": "Add tests",
"patch_to_review": "diff --git a/.all-contributorsrc b/.all-contributorsrc\nindex ad4440829e1..843d0aeebe7 100644\n--- a/.all-contributorsrc\n+++ b/.all-contributorsrc\n@@ -3240,6 +3240,15 @@\n \"code\"\n ... | [
{
"diff_hunk": "@@ -402,6 +406,12 @@ def _get_g_matrix_mint(self, shrink=False, diag_only=False):\n np.dot(\n inv(\n np.dot(np.transpose(self.s_matrix), np.dot(cov_mat, self.s_matrix))\n+ + self.alpha\n+ * np.eye(\n+ ... | 6a7505720de9b6c6a1322c9bd73cfd1ea8aeba6e | diff --git a/sktime/forecasting/reconcile.py b/sktime/forecasting/reconcile.py
index 050ecc397b3..cae440cc2a4 100644
--- a/sktime/forecasting/reconcile.py
+++ b/sktime/forecasting/reconcile.py
@@ -58,6 +58,9 @@ class ReconcilerForecaster(BaseForecaster):
* If True, prediction data frames include total values a... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "New Feature Additions"
} |
sqlfluff__sqlfluff-1818@2c5eb6a | sqlfluff/sqlfluff | Python | 1,818 | Added trigger support in ANSI - and extended it in Postgres | ### Brief summary of the change made
Added CreateTrigger and DropTrigger statement segments in ANSI. ANSI doesn't support Alter Trigger.
Added AlterTrigger in Postgres - and extended Create and Drop to match the PG14 docs. ANSI definitions were reverse engineered from the Postgres docs (what they said they didn't sup... | 2021-11-03T22:14:12Z | Postgresql: Found unparsable section: DROP TRIGGER IF EXISTS my_trigger ON something;
# Expected Behaviour
The code snippet is parsed successfully.
# Observed Behaviour
PRS error
`L: 41 | P: 1 | PRS | Line 41, Position 1: Found unparsable section: DROP TRIGGER IF EXISTS my_trigger ON something;'`
# S... | [
{
"body": "# Expected Behaviour\r\n\r\nThe code snippet is parsed successfully.\r\n\r\n# Observed Behaviour\r\n\r\nPRS error\r\n\r\n`L: 41 | P: 1 | PRS | Line 41, Position 1: Found unparsable section: DROP TRIGGER IF EXISTS my_trigger ON something;'`\r\n\r\n# Steps to Reproduce\r\n\r\nParse this with postgr... | 8c9c44209ff197dc5aa50fc7456cf5a7ee3d027f | {
"head_commit": "2c5eb6a707752d717a837ae5fd77e4628ce39b91",
"head_commit_message": "Added trigger support in ANSI - and extended it in postgres",
"patch_to_review": "diff --git a/src/sqlfluff/dialects/dialect_ansi.py b/src/sqlfluff/dialects/dialect_ansi.py\nindex 0694f858850..351b0d1d6cc 100644\n--- a/src/sqlflu... | [
{
"diff_hunk": "@@ -3157,3 +3166,86 @@ class DatePartFunctionNameSegment(BaseSegment):\n \n type = \"function_name\"\n match_grammar = Sequence(\"DATEADD\")\n+\n+\n+@ansi_dialect.segment()\n+class CreateTriggerStatementSegment(BaseSegment):\n+ \"\"\"Create Trigger Statement.\n+\n+ Taken from speci... | a13d486574be512d47e48e4dff3e29ce7c610927 | diff --git a/src/sqlfluff/dialects/dialect_ansi.py b/src/sqlfluff/dialects/dialect_ansi.py
index abfaaf1d2de..25ad170e1b3 100644
--- a/src/sqlfluff/dialects/dialect_ansi.py
+++ b/src/sqlfluff/dialects/dialect_ansi.py
@@ -740,6 +740,13 @@ class SequenceReferenceSegment(ObjectReferenceSegment):
type = "sequence_refe... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} | |
sktime__sktime-7622@c172e9f | sktime/sktime | Python | 7,622 | [MNT] Test case to ensure an AssertionError is thrown if EXCLUDED_TESTS_BY_TEST is not updated |
#### Reference Issues/PRs
fixes #7618
#### What does this implement/fix? Explain your changes.
Wrote a test case to ensure an AssertionError is thrown if EXCLUDED_TESTS_BY_TEST is not updated.
#### PR-checklist
- [x] The PR title starts with either [ENH], [MNT], [DOC], or [BUG]. [BUG] - bugfix, [MNT] - CI... | 2025-01-08T23:55:47Z | [ENH] `EXCLUDED_TESTS_BY_TEST` should be automatically in sync when test_params are added to estimators
**Describe the bug**
`EXCLUDED_TESTS_BY_TEST` does not update automatically when test_params are added to estimators and there are no tests to ensure the same.
**Expected behavior**
A test should ensure that `EX... | I will be looking into this.
Thanks! I think it should not update automatically, I would simply add another test that checks whether the list is up to date, i.e., estimators that pass that specific test should not be on the list. | [
{
"body": "**Describe the bug**\r\n`EXCLUDED_TESTS_BY_TEST` does not update automatically when test_params are added to estimators and there are no tests to ensure the same.\r\n\r\n**Expected behavior**\r\nA test should ensure that `EXCLUDED_TESTS_BY_TEST` is up to date with estimators that do not have at least... | 4895a484b55872b782016bdf5f515313af6943df | {
"head_commit": "c172e9fd0b5b69f62a51d1ce2635433e860816ea",
"head_commit_message": "Wrote a test case to ensure an AssertionError is thrown if EXCLUDED_TESTS_BY_TEST is not updated",
"patch_to_review": "diff --git a/sktime/tests/_config.py b/sktime/tests/_config.py\nindex 98b3067f446..10c2d80d198 100644\n--- a/s... | [
{
"diff_hunk": "@@ -1,10 +1,33 @@\n \"\"\"Tests for the test utilities.\"\"\"\n \n-from sktime.tests._config import EXCLUDE_ESTIMATORS\n+from sktime.registry import all_estimators\n+from sktime.tests._config import EXCLUDE_ESTIMATORS, EXCLUDED_TESTS_BY_TEST\n from sktime.tests.test_switch import run_test_for_cl... | 37adcf2037fe678d304e66b6d23257f4d6c88cec | diff --git a/sktime/tests/_config.py b/sktime/tests/_config.py
index 614a9429845..b58113cc0e9 100644
--- a/sktime/tests/_config.py
+++ b/sktime/tests/_config.py
@@ -259,25 +259,21 @@
# exclude tests but keyed by test name
EXCLUDED_TESTS_BY_TEST = {
"test_get_test_params_coverage": [
- "Arsenal",
- ... | {
"difficulty": "low",
"estimated_review_effort": 3,
"problem_domain": "Test Suite / CI Enhancements"
} |
saltstack__salt-61337@d2ae5a7 | saltstack/salt | Python | 61,337 | Add iptables doc example | ### What does this PR do?
Adds a mention of `name` vs `name_` to iptables state docs.
### What issues does this PR fix or reference?
Fixes: #60880
### Merge requirements satisfied?
**[NOTICE] Bug fixes or features added to Salt require tests.**
<!-- Please review the [test documentation](https://docs.sal... | 2021-12-08T19:03:17Z | [BUG] `iptables.append` state does not pass `name` argument to iptables command
**Description**
The `iptables.append` state does not pass `-name: SSH` to iptables as `--name SSH`, instead of that `--name DEFAULT` is passed. Looks like the `name` argument is reserved by the state itself. Any other argument like `- foo:... | 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\nThe `iptables.append` state does not pass `-name: SSH` to iptables as `--name SSH`, instead of that `--name DEFAULT` is passed. Looks like the `name` argument is reserved by the state itself. Any other argument like `- foo: bar` is passed as `--foo bar`.\r\n\r\n**Setup**\r\n`test.s... | f53ddde51021e64cacd5f0dc04f275c9ec9398f4 | {
"head_commit": "d2ae5a7cfa84edca9613854cdd88719efda29fd5",
"head_commit_message": "Add iptables doc example\n\nFixes #60880",
"patch_to_review": "diff --git a/changelog/60880.fixed b/changelog/60880.fixed\nnew file mode 100644\nindex 000000000000..c855e8db5307\n--- /dev/null\n+++ b/changelog/60880.fixed\n@@ -0,... | [
{
"diff_hunk": "@@ -0,0 +1 @@\n+Added info to docs for iptables `- name_:` vs `- name:`.",
"line": null,
"original_line": 1,
"original_start_line": null,
"path": "changelog/60880.fixed",
"start_line": null,
"text": "@user1:\nchangelog files are not required for doc changes.\n\n@author:\n... | 2156d57a7095775cc3147c8c7128da8493a2a960 | diff --git a/salt/states/iptables.py b/salt/states/iptables.py
index 2ab20ebebb82..73b9e56992f5 100644
--- a/salt/states/iptables.py
+++ b/salt/states/iptables.py
@@ -189,6 +189,7 @@
appearance of ``-m policy``, it is interpreted as the ``--proto`` option of
the policy extension (see the iptables-extensions(8... | {
"difficulty": "low",
"estimated_review_effort": 1,
"problem_domain": "Bug Fixes"
} |
sktime__sktime-7648@b7be403 | sktime/sktime | Python | 7,648 | [ENH] add fit_strategy for TinyTimeMixerForecaster | <!--
Welcome to sktime, and thanks for contributing!
Please have a look at our contribution guide:
https://www.sktime.net/en/latest/get_involved/contributing.html
-->
#### Reference Issues/PRs
<!--
Example: Fixes #1234. See also #3456.
Please use keywords (e.g., Fixes) to create link to the issues or pull r... | 2025-01-16T02:54:15Z | [ENH] Generalize training options for pre-trained models
since we have a bunch of pre-trained models in sktime, we now want to make them more coherent and comparable functionality especially with training strategy.
I have collected the implemented training strategies for the following models
`HFPatchTSTForecaster`,... | Would an extension template be helpful as a reference for new global forecasters that contributors want to implement?
> Would an extension template be helpful as a reference for new global forecasters that contributors want to implement?
yes that sounds good, that template should also cover the caching behavior as i... | [
{
"body": "since we have a bunch of pre-trained models in sktime, we now want to make them more coherent and comparable functionality especially with training strategy.\r\n\r\nI have collected the implemented training strategies for the following models\r\n`HFPatchTSTForecaster`, `HFPatchTSTForecaster`,`TimesFM... | cc92e8053da45b20ce673aaf2e3bbc4ed5bbcf2c | {
"head_commit": "b7be4034036362623ff1e96077780341f6468bb5",
"head_commit_message": "Added fit strategy parameter for ttm forecaster to allow proper handling of model fine-tuning. Also refactored the comments accordingly.",
"patch_to_review": "diff --git a/sktime/forecasting/ttm.py b/sktime/forecasting/ttm.py\nin... | [
{
"diff_hunk": "@@ -125,6 +129,14 @@ class TinyTimeMixerForecaster(_BaseGlobalForecaster):\n fit and predict on it. The broadcasting is happening inside automatically,\n from the outerside api perspective, the input and output are the same,\n only one multiindex output from ``predict``.\... | 72a0bd9871c58900e786be1488693b8dc31ec501 | diff --git a/sktime/forecasting/ttm.py b/sktime/forecasting/ttm.py
index ea9fc57112f..fa699a7c4bf 100644
--- a/sktime/forecasting/ttm.py
+++ b/sktime/forecasting/ttm.py
@@ -31,12 +31,12 @@ class TinyTimeMixerForecaster(_BaseGlobalForecaster):
open-sourced by IBM Research. With less than 1 Million parameters, TTM i... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Code Refactoring / Architectural Improvement"
} |
scikit-learn__scikit-learn-19784@0eae21b | scikit-learn/scikit-learn | Python | 19,784 | FIX Uses the color max for colormap in ConfusionMatrixDisplay | <!--
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
-->
#### Reference Issues/PRs
<!--
Example: Fixes #1234. See also #3456.
Please use keywords (e.g., Fixes) to create link to th... | 2021-03-30T02:06:30Z | ConfusionMatrixDisplay miscolors text if colormap has more than 256 colors
#### Describe the bug
When ConfusionMatrixDisplay is deciding on text colors, it uses colormap entry 256 as the text color for labeling cells below the mean value. This is line 125 of metrics/_plot/confusion_matrix.py:
`cmap_min, cmap_max = se... | [
{
"body": "#### Describe the bug\r\nWhen ConfusionMatrixDisplay is deciding on text colors, it uses colormap entry 256 as the text color for labeling cells below the mean value. This is line 125 of metrics/_plot/confusion_matrix.py:\r\n`cmap_min, cmap_max = self.im_.cmap(0), self.im_.cmap(256)`\r\n\r\nThis caus... | de1262c35e2aa4ee062d050281ee576ce9e35c94 | {
"head_commit": "0eae21b95708d4f241ae8b6fb6a8ba955ec4b301",
"head_commit_message": "Merge remote-tracking branch 'upstream/main' into confusion_matrix_max",
"patch_to_review": "diff --git a/doc/whats_new/v1.0.rst b/doc/whats_new/v1.0.rst\nindex d26c5dd0c347d..08f6d34c6a379 100644\n--- a/doc/whats_new/v1.0.rst\n+... | [
{
"diff_hunk": "@@ -380,3 +380,17 @@ def test_confusion_matrix_with_unknown_labels(pyplot, constructor_name):\n display_labels = [tick.get_text() for tick in disp.ax_.get_xticklabels()]\n expected_labels = [str(i) for i in range(n_classes + 1)]\n assert_array_equal(expected_labels, display_labels)\n... | 9b625cfeaac677f20b57b68288bf3a799219ec5b | diff --git a/doc/whats_new/v1.0.rst b/doc/whats_new/v1.0.rst
index d26c5dd0c347d..08f6d34c6a379 100644
--- a/doc/whats_new/v1.0.rst
+++ b/doc/whats_new/v1.0.rst
@@ -324,6 +324,9 @@ Changelog
are integral.
:pr:`9843` by :user:`Jon Crall <Erotemic>`.
+- |Fix| :meth:`metrics.ConfusionMatrixDisplay.plot` uses the c... | {
"difficulty": "low",
"estimated_review_effort": 2,
"problem_domain": "Bug Fixes"
} | |
sqlfluff__sqlfluff-1803@a822a1f | sqlfluff/sqlfluff | Python | 1,803 | Prevent L019 plus L034 corrupting SQL | ### Brief summary of the change made
Fixes #1734
### Are there any other side effects of this change that we should be aware of?
No.
### 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 on... | 2021-11-01T17:00:22Z | TSQL linting fix: L019+L034 breaks the code
The following code breaks when fixed:
```
SELECT
[ID]
, CASE
WHEN [ID] = 1 THEN NULL
ELSE 1
END AS [CaseOutput]
, [DataDate]
FROM #temp1
```
## Expected Behaviour
Workable code.
## Observed Behaviour
```
S... | Note: The output SQL is broken because it's missing the comma after `[DataDate]`.
And there's a comma after CaseOutput, which breaks the SQL for TSQL at least.
I did some preliminary investigation. I think L034 is running after L019's edits have already been applied, so when it attempts to reorder the columns, it's ina... | [
{
"body": "The following code breaks when fixed:\r\n\r\n```\r\n SELECT\r\n [ID]\r\n , CASE\r\n WHEN [ID] = 1 THEN NULL\r\n ELSE 1\r\n END AS [CaseOutput]\r\n , [DataDate]\r\n FROM #temp1\r\n```\r\n\r\n## Expected Behaviour\r\n\r\nWorkable code.\r\n\r\n## Observed Behaviour\... | f3f808050fee5b43e0ee0c58cc7b3f540b227ae0 | {
"head_commit": "a822a1f1749e80313c3f5eff8ff9ed6f6f338727",
"head_commit_message": "L019 plus L034 corrupts SQL",
"patch_to_review": "diff --git a/src/sqlfluff/rules/L019.py b/src/sqlfluff/rules/L019.py\nindex 7f439dc82dd..7580c4559ad 100644\n--- a/src/sqlfluff/rules/L019.py\n+++ b/src/sqlfluff/rules/L019.py\n@@... | [
{
"diff_hunk": "@@ -176,11 +186,11 @@ def _eval(self, context: RuleContext) -> Optional[LintResult]:\n for d in memory[\"whitespace_deletions\"]\n ],\n LintFix(\n- \"edit\",\n- ... | 223d04e00b4625007e0d4cb856fdb2f67dfadfa8 | diff --git a/src/sqlfluff/rules/L019.py b/src/sqlfluff/rules/L019.py
index 7f439dc82dd..74448127f1e 100644
--- a/src/sqlfluff/rules/L019.py
+++ b/src/sqlfluff/rules/L019.py
@@ -1,9 +1,8 @@
"""Implementation of Rule L019."""
-from typing import Dict, Any, Optional
-
-from sqlfluff.core.parser import WhitespaceSegment... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "Code Style, Linting, Formatting Fixes"
} |
sqlfluff__sqlfluff-1811@e1b61fb | sqlfluff/sqlfluff | Python | 1,811 | ANSI: Add TABLESAMPLE support | ### Brief summary of the change made
closes #1809
The SQL Standard 2003 introduced the TABLESAMPLE clause, which has been available in postgres since version 9.5. I personally use it on AWS Athena/PrestoDB to reduce the size of the result set.
The syntax, as seen [here](https://wiki.postgresql.org/wiki/TABLESA... | 2021-11-03T02:02:40Z | TABLESAMPLE BERNOULLI fails as unparsable section
`TABLESAMPLE BERNOULLI` statements fail.
## Expected Behaviour
`TABLESAMPLE` statements should not fail, at least using the `postgres` dialect (though I believe even ansi should support this).
## Observed Behaviour
The following query fails linting:
```sql
... | This is a great first issue that should be easy to add support for, following the steps here: https://github.com/sqlfluff/sqlfluff/wiki/Contributing-Dialect-Changes | [
{
"body": "`TABLESAMPLE BERNOULLI` statements fail.\r\n\r\n## Expected Behaviour\r\n`TABLESAMPLE` statements should not fail, at least using the `postgres` dialect (though I believe even ansi should support this). \r\n\r\n## Observed Behaviour\r\nThe following query fails linting:\r\n\r\n```sql\r\nSELECT colnam... | e429294f22fe5bc18e49ff17ec792c16be14dcbb | {
"head_commit": "e1b61fb120569ed44ea9131b85373caa558655d9",
"head_commit_message": "run black",
"patch_to_review": "diff --git a/src/sqlfluff/dialects/dialect_ansi.py b/src/sqlfluff/dialects/dialect_ansi.py\nindex 0694f858850..30cc7acdae1 100644\n--- a/src/sqlfluff/dialects/dialect_ansi.py\n+++ b/src/sqlfluff/di... | [
{
"diff_hunk": "@@ -3157,3 +3160,20 @@ class DatePartFunctionNameSegment(BaseSegment):\n \n type = \"function_name\"\n match_grammar = Sequence(\"DATEADD\")\n+\n+\n+@ansi_dialect.segment()\n+class SamplingExpressionSegment(BaseSegment):\n+ \"\"\"A sampling expression.\"\"\"\n+\n+ type = \"ansi_sam... | 98bb5cb33e5e1a90bd910e2792109d9d9250b34b | diff --git a/src/sqlfluff/dialects/dialect_ansi.py b/src/sqlfluff/dialects/dialect_ansi.py
index 0694f858850..abfaaf1d2de 100644
--- a/src/sqlfluff/dialects/dialect_ansi.py
+++ b/src/sqlfluff/dialects/dialect_ansi.py
@@ -13,44 +13,42 @@
"""
from enum import Enum
-from typing import Generator, List, Tuple, NamedTupl... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
saltstack__salt-61329@8e96acf | saltstack/salt | Python | 61,329 | Resolves "[BUG] regressions in mysql_cache module #61222" | ### What does this PR do?
### What issues does this PR fix or reference?
Fixes: #61222
### Merge requirements satisfied?
**[NOTICE] Bug fixes or features added to Salt require tests.**
<!-- Please review the [test documentation](https://docs.saltproject.io/en/master/topics/tutorials/writing_tests.html) for de... | 2021-12-06T16:30:38Z | [BUG] regressions in mysql_cache module
Two recent regressions in the mysql_cache module have broken it fairly significantly. One is a generic function argument ordering bug which breaks the module globally, while the other only manifests when using PyMySQL (instead of MySQLdb) as the db connector.
I can't seem to ... | @sagetherage - not sure if calling to_bytes() with surrogatepass is an acceptable choice, but it solved the immediate problem for me, and I can't see any major downside to it off the top of my head.
@waynew @terminalimage @sagetherage - please note that the current codebase (as of 3004.1, which is what AWS Linux has RP... | [
{
"body": "Two recent regressions in the mysql_cache module have broken it fairly significantly. One is a generic function argument ordering bug which breaks the module globally, while the other only manifests when using PyMySQL (instead of MySQLdb) as the db connector.\r\n\r\nI can't seem to push PRs anymore,... | fdfc7c58c347d106cf688c693f8fcff01540700d | {
"head_commit": "8e96acf5eebcf90b81257b2ec072eec669453e38",
"head_commit_message": "- format to make the linter happy",
"patch_to_review": "diff --git a/salt/cache/mysql_cache.py b/salt/cache/mysql_cache.py\nindex 87ad78eade0b..f512cb5677e6 100644\n--- a/salt/cache/mysql_cache.py\n+++ b/salt/cache/mysql_cache.py... | [
{
"diff_hunk": "@@ -118,7 +118,8 @@ def run_query(conn, query, retries=3, args=None):\n else:\n log.info(\"mysql_cache: recreating db connection due to: %r\", e)\n __context__[\"mysql_client\"] = MySQLdb.connect(**__context__[\"mysql_kwargs\"])\n- return run_query(__context__[... | 5d4aa665e288c5940848f3b4657d3f8fb3fb7190 | diff --git a/salt/cache/mysql_cache.py b/salt/cache/mysql_cache.py
index 87ad78eade0b..aad94514ea2d 100644
--- a/salt/cache/mysql_cache.py
+++ b/salt/cache/mysql_cache.py
@@ -90,7 +90,7 @@ def __virtual__():
return bool(MySQLdb), "No python mysql client installed." if MySQLdb is None else ""
-def run_query(con... | {
"difficulty": "low",
"estimated_review_effort": 2,
"problem_domain": "Bug Fixes"
} |
scikit-learn__scikit-learn-20451@5fb0801 | scikit-learn/scikit-learn | Python | 20,451 | DOC Improve documentation regarding some pitfalls in interpretation | <!--
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
-->
#### Reference Issues/PRs
Fixes #19413
<!--
Example: Fixes #1234. See also #3456.
Please use keywords (e.g., Fixes) to cre... | 2021-07-03T02:00:54Z | Improve documentation regarding some pitfalls in interpretation
We have now a couple of tutorials in the `inspection` section of our documentation. We try to document the pitfalls regarding interpreting the output of the inspection methods. However, it seems that we could improve our discussions several aspects:
* w... | Thanks for opening the issue !
For the first point, we could give an example with synthetic data to show how controlling over different sets of variables leads to different coefficients which don't recover the "causal ones" _even_ if the learnt model has very good fit. I can try to craft an example.
For the seco... | [
{
"body": "We have now a couple of tutorials in the `inspection` section of our documentation. We try to document the pitfalls regarding interpreting the output of the inspection methods. However, it seems that we could improve our discussions several aspects:\r\n\r\n* we should emphasize that the inspection to... | 005711801654d65785cef1f1d58a96b4cc0629a6 | {
"head_commit": "5fb08010154d617b97b6871c12d0283209083a10",
"head_commit_message": "Fix pep8 violations",
"patch_to_review": "diff --git a/examples/inspection/plot_causal_interpretation.py b/examples/inspection/plot_causal_interpretation.py\nnew file mode 100644\nindex 0000000000000..49be8a661b907\n--- /dev/null... | [
{
"diff_hunk": "@@ -0,0 +1,126 @@\n+\"\"\"\n+================================================\n+Causal Interpretation of Machine Learning Models\n+================================================\n+\n+Machine Learning models are great for measuring statistical associations.\n+Unfortunately, unless we're willing... | f9d5286cf19f98deee3cb8514ffffd42d1cc1917 | diff --git a/examples/inspection/plot_causal_interpretation.py b/examples/inspection/plot_causal_interpretation.py
new file mode 100644
index 0000000000000..4e37205b2faba
--- /dev/null
+++ b/examples/inspection/plot_causal_interpretation.py
@@ -0,0 +1,185 @@
+"""
+===================================================
+Fa... | {
"difficulty": "medium",
"estimated_review_effort": 2,
"problem_domain": "Documentation Updates"
} |
sqlfluff__sqlfluff-1796@9f4a196 | sqlfluff/sqlfluff | Python | 1,796 | L028 fix - Allow SELECT column alias in WHERE clauses for certain dialects | ### Brief summary of the change made
Fixes #1710
### Are there any other side effects of this change that we should be aware of?
Sets Snowflake and Redshift as only two dialects that allow this
### Pull Request checklist
- [x] Please confirm you have completed any of the necessary steps below.
- Included te... | 2021-10-31T22:14:44Z | Rule L028 flags false positive when using aliased columns
```sql
select
t.col0,
t.col1 + 1 as alias_col1
from table1 as t
where alias_col1 > 5
```
## Expected Behaviour
Passes
## Observed Behaviour
```
L: 5 | P: 7 | L028 | Unqualified reference 'alias_col1' found in single table select which ... | Is that valid SQL in Postgres?
Usually `WHERE` clause is evaluated before the `SELECT` so can’t use column aliases in `WHERE` clause: https://stackoverflow.com/questions/8370114/referring-to-a-column-alias-in-a-where-clause
I'm unsure. The [Postgres documentation](https://www.postgresql.org/docs/9.5/sql-select.html#... | [
{
"body": "```sql\r\nselect\r\n t.col0,\r\n t.col1 + 1 as alias_col1\r\nfrom table1 as t\r\nwhere alias_col1 > 5\r\n```\r\n\r\n## Expected Behaviour\r\nPasses\r\n\r\n## Observed Behaviour\r\n```\r\nL: 5 | P: 7 | L028 | Unqualified reference 'alias_col1' found in single table select which is inconsiste... | 27d2f2f2263dc248d4add57792240f146fa9c9dc | {
"head_commit": "9f4a19684a8dc5e3cda79e1f324a267e54d09b84",
"head_commit_message": "Merge branch 'main' into l028-allow-select-alias-for-redshift",
"patch_to_review": "diff --git a/src/sqlfluff/rules/L028.py b/src/sqlfluff/rules/L028.py\nindex 5be833698bb..4ebb4dce447 100644\n--- a/src/sqlfluff/rules/L028.py\n++... | [
{
"diff_hunk": "@@ -97,15 +102,17 @@ def _lint_references_and_aliases(\n return violation_buff or None\n \n def _eval(self, context: RuleContext) -> EvalResultType:\n- \"\"\"Override Rule L025 for dialects that use structs.\n-\n- Some dialects use structs (e.g. column.field) which look... | 4bdc2f992096013c35af648b9bdaa5dee514f598 | diff --git a/src/sqlfluff/rules/L028.py b/src/sqlfluff/rules/L028.py
index 5be833698bb..d5aebc1d58c 100644
--- a/src/sqlfluff/rules/L028.py
+++ b/src/sqlfluff/rules/L028.py
@@ -43,6 +43,7 @@ class Rule_L028(Rule_L025):
"""
config_keywords = ["single_table_references", "force_enable"]
+ _allow_select_alia... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
scikit-learn__scikit-learn-20145@2f27c0e | scikit-learn/scikit-learn | Python | 20,145 | ENH Adds n_features_to_select upper limit to SeqFeatureSelector | <!--
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
-->
#### Reference Issues/PRs
Fixes #20137
<!--
Example: Fixes #1234. See also #3456.
Please use keywords (e.g., Fixes) to cre... | 2021-05-27T08:42:15Z | sklearn.feature_selection.SequentialFeatureSelector Select features as long as score gets better.
Dear Developers,
Currently one can give `sklearn.feature_selection.SequentialFeatureSelector`
parameter 'n_features_to_select'
to get desired number of features.
It would be desired, that instead of giving a fixed... | I agree. The problem is how to manage backward compat with the current behavior without introducing too many spurious deprecation warnings and too many new parameters...
@norbusan suggested the following strategy in a private conversation: add a new `tol` parameter as an absolute tolerance on the score change before... | [
{
"body": "Dear Developers,\r\n\r\nCurrently one can give `sklearn.feature_selection.SequentialFeatureSelector`\r\nparameter 'n_features_to_select'\r\nto get desired number of features.\r\n\r\nIt would be desired, that instead of giving a fixed number of 'n_features_to_select' one could use it as an upper limit... | 6447ec596407f67731872f653ea0da57545c674b | {
"head_commit": "2f27c0e6cb162af2cf48db6e9deb4c2597b49765",
"head_commit_message": "Update sklearn/feature_selection/_sequential.py\n\nCo-authored-by: Thomas J. Fan <thomasjpfan@gmail.com>",
"patch_to_review": "diff --git a/doc/whats_new/v1.0.rst b/doc/whats_new/v1.0.rst\nindex fa5d9c9a43850..7240940862af0 10064... | [
{
"diff_hunk": "@@ -335,6 +335,14 @@ Changelog\n `sample_weight` passed by a user were overwritten during the fit.\n :pr:`20515` by :user:`Carsten Allefeld <allefeld>`.\n \n+- |Feature| Added auto mode to :class:`feature_selection.SequentialFeatureSelection`.\n+ If the argument `n_features_to_select` is `'... | bdc6d8aa3a4d8625a757a59f18d59780166ca8cb | diff --git a/doc/whats_new/v1.1.rst b/doc/whats_new/v1.1.rst
index 36859342ef6bf..0412e6c72cd74 100644
--- a/doc/whats_new/v1.1.rst
+++ b/doc/whats_new/v1.1.rst
@@ -110,6 +110,17 @@ Changelog
reconstruction of a `X` target when a `Y` parameter is given. :pr:`19680` by
:user:`Robin Thibaut <robinthibaut>`.
+:mod... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "New Feature Additions"
} |
sqlfluff__sqlfluff-1775@cbd7163 | sqlfluff/sqlfluff | Python | 1,775 | L029: Optionally check quoted identifiers in addition to naked identifiers | Fixes #1747
This PR adjusts L029 to optionally check quoted identifiers in addition to naked identifiers.
In order to do this, we are adding a new configuration keyword, quoted_identifiers_policy, which represents the same thing as unquoted_identifiers_policy but for quoted identifiers.
The options for quoted_iden... | 2021-10-28T19:48:22Z | New Rule Suggestion: Identify and flag object names that are reserved words
We should be able to identify and flag the creation of objects that share names with reserved words.
Anti-pattern:
```
CREATE TABLE DBO.ColumnNames2
(
[Table] INT,
[Select] INT,
[Create] INT,
[Drop] INT
)
``` | [
{
"body": "We should be able to identify and flag the creation of objects that share names with reserved words.\r\n\r\nAnti-pattern:\r\n```\r\nCREATE TABLE DBO.ColumnNames2\r\n(\r\n [Table] INT,\r\n [Select] INT,\r\n [Create] INT,\r\n [Drop] INT\r\n)\r\n```",
"number": 1747,
"title": "New Ru... | 69b5c1ff283faacc90d2f413820674a10bbc6fe4 | {
"head_commit": "cbd716339b63b1c1ab356bac179ef248af47b8c2",
"head_commit_message": "L029: Check quoted identifiers in addition to naked identifiers",
"patch_to_review": "diff --git a/src/sqlfluff/rules/L029.py b/src/sqlfluff/rules/L029.py\nindex cec9d5b1a64..9b51ba8100b 100644\n--- a/src/sqlfluff/rules/L029.py\n... | [
{
"diff_hunk": "@@ -36,3 +36,11 @@ test_fail_keyword_as_identifier_5:\n rules:\n L029:\n unquoted_identifiers_policy: column_aliases\n+\n+test_fail_keyword_as_quoted_identifier:\n+ fail_str: SELECT x AS [date] FROM tbl AS parameter\n+ configs:\n+ rules:\n+ L029:\n+ unquoted_id... | 96313655a72bcc7a14730851450ba8a20e013bd7 | diff --git a/src/sqlfluff/core/default_config.cfg b/src/sqlfluff/core/default_config.cfg
index e464f898909..d545be8287b 100644
--- a/src/sqlfluff/core/default_config.cfg
+++ b/src/sqlfluff/core/default_config.cfg
@@ -71,6 +71,7 @@ force_enable = False
[sqlfluff:rules:L029] # Keyword identifiers
unquoted_identifier... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "New Feature Additions"
} | |
sqlfluff__sqlfluff-1765@a839d60 | sqlfluff/sqlfluff | Python | 1,765 | Postgres - Support parameters and identifiers prepended with _ and containing $ | ### Brief summary of the change made
Patched code lexer to allow $ (as long as it doesn't start with this)
Patched Parameter and NakedIdentifier segments to allow them to start with _, and contain $
Fixes #1742
### Are there any other side effects of this change that we should be aware of?
No
### Pull Reque... | 2021-10-26T18:51:45Z | Postgres - Parsing failure for identifiers starting with _
Thanks for this great linter and actively developing and maintaining it!
## Expected Behaviour
Linter should run through and not fail.
## Observed Behaviour
```
L: 1 | P: 1 | PRS | Line 1, Position 1: Found unparsable section: 'CREATE OR REPLA... | Hey @xamanu, root cause isn't a lack of support for functions, it's a parsing issue with parameters prepended with `_`, PR up to fix, will rename appropriately | [
{
"body": "Thanks for this great linter and actively developing and maintaining it!\r\n\r\n## Expected Behaviour\r\n\r\nLinter should run through and not fail.\r\n\r\n## Observed Behaviour\r\n\r\n```\r\nL: 1 | P: 1 | PRS | Line 1, Position 1: Found unparsable section: 'CREATE OR REPLACE FUNCTION public.foo... | 5afcf5ee0d13abac5c1c2d54bca73a59a20d5923 | {
"head_commit": "a839d60eac50461e27361168b9bf84ffa0c36119",
"head_commit_message": "Fixed greediness of naked identifier parser",
"patch_to_review": "diff --git a/src/sqlfluff/dialects/dialect_postgres.py b/src/sqlfluff/dialects/dialect_postgres.py\nindex b52609d59c2..1c0598ba6d0 100644\n--- a/src/sqlfluff/diale... | [
{
"diff_hunk": "@@ -145,6 +148,19 @@\n )\n \n postgres_dialect.replace(\n+ NakedIdentifierSegment=SegmentGenerator(\n+ # Generate the anti template from the set of reserved keywords\n+ lambda dialect: RegexParser(\n+ r\"([A-Z_]+|[0-9]*[A-Z_$])[A-Z0-9_$]*\",",
"line": null,
"o... | fe28fb54aab87b0f158034819635f7c2e85ca271 | diff --git a/src/sqlfluff/dialects/dialect_postgres.py b/src/sqlfluff/dialects/dialect_postgres.py
index 0977dcb8eae..9513862e2c3 100644
--- a/src/sqlfluff/dialects/dialect_postgres.py
+++ b/src/sqlfluff/dialects/dialect_postgres.py
@@ -11,12 +11,14 @@
BaseSegment,
Delimited,
RegexLexer,
+ RegexParser... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
sqlfluff__sqlfluff-1763@b1e719c | sqlfluff/sqlfluff | Python | 1,763 | "sqlfluff fix": Write to a temporary .sql file first | ### Brief summary of the change made
Fixes #1761
### Are there any other side effects of this change that we should be aware of?
...
### 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 ... | 2021-10-26T17:28:28Z | dbt postgres fix command errors with UnicodeEncodeError and also wipes the .sql file
_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._
## Expected Behaviour
... | I get a dbt-related error -- can you provide your project file as well? Also, what operating system are you running this on? I tested a simplified (non-dbt) version of your file on my Mac, and it worked okay.
```
dbt.exceptions.DbtProjectError: Runtime Error
no dbt_project.yml found at expected path /Users/bhart... | [
{
"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._\r\n\r\n## Expected Behaviour\r\nViolation failure notice at a minimum, without wiping the f... | a10057635e5b2559293a676486f0b730981f037a | {
"head_commit": "b1e719c7473cc8218147ac538fa8cf75720d8bfc",
"head_commit_message": "\"sqlfluff fix\": Write to a temporary .sql file first",
"patch_to_review": "diff --git a/src/sqlfluff/core/linter/linted_file.py b/src/sqlfluff/core/linter/linted_file.py\nindex 3a8593edd94..9275067f10c 100644\n--- a/src/sqlfluf... | [
{
"diff_hunk": "@@ -493,7 +494,19 @@ def persist_tree(self, suffix: str = \"\") -> bool:\n if suffix:\n root, ext = os.path.splitext(fname)\n fname = root + suffix + ext\n- # Actually write the file.\n- with open(fname, \"w\", encoding=self.encod... | e3fb8535acf3cdded95476fbfc723a8359550d94 | diff --git a/src/sqlfluff/core/linter/linted_file.py b/src/sqlfluff/core/linter/linted_file.py
index 3a8593edd94..cbbeff68bed 100644
--- a/src/sqlfluff/core/linter/linted_file.py
+++ b/src/sqlfluff/core/linter/linted_file.py
@@ -7,6 +7,8 @@
import os
import logging
+import shutil
+import tempfile
from typing impor... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
sktime__sktime-7597@299b43c | sktime/sktime | Python | 7,597 | [ENH] Set `context_len` and `horizon_len` per default in `TimesFMForecaster` | <!--
Welcome to sktime, and thanks for contributing!
Please have a look at our contribution guide:
https://www.sktime.net/en/latest/get_involved/contributing.html
-->
#### Reference Issues/PRs
- Fixes #7209.
#### What does this implement/fix? Explain your changes.
As discussed in #7209, this PR enhances... | 2025-01-03T09:08:11Z | [ENH] in `TimesFMForecaster`, `context_len` and `horizon_len` should be set automatically per default
`TimesFMForecaster` should set `context_len` and `horizon` len to a reasonable value, automatically per default.
The `horizon_len` can be obtained from `fh`, but it makes sense to give the user the option to overrid... | yes that sure sounds good. there are no specific values ideal for the defaults, but there are a few considerations
- `context_length` should be a multiple of `input_patch_len`, which by default is `input_patch_len=32` for loading the model checkpoint.
- `horizon_len` should ideally be a less than or equal to `context... | [
{
"body": "`TimesFMForecaster` should set `context_len` and `horizon` len to a reasonable value, automatically per default.\r\n\r\nThe `horizon_len` can be obtained from `fh`, but it makes sense to give the user the option to override.\r\n\r\nThe `context_len` can also be set to an automatic choice, in the defa... | 1f4bd06c8261418969b505a9f7da46339095b84b | {
"head_commit": "299b43ca29b7dfa17fff1a06b95c710d1b2cb980",
"head_commit_message": "[ENH] Set context_len and horizon_len per default in TimesFMForecaster",
"patch_to_review": "diff --git a/.all-contributorsrc b/.all-contributorsrc\nindex b779b3f9767..d91d19e4bae 100644\n--- a/.all-contributorsrc\n+++ b/.all-con... | [
{
"diff_hunk": "@@ -35,17 +35,23 @@ class TimesFMForecaster(_BaseGlobalForecaster):\n \n Parameters\n ----------\n- context_len : int\n+ context_len : int, optional (default=None)\n The length of the input context sequence.\n+ If set to None, the context length is automatically comp... | abf9659d7cb72ffcf823c92dc1056cababa90f0f | diff --git a/.all-contributorsrc b/.all-contributorsrc
index b779b3f9767..d91d19e4bae 100644
--- a/.all-contributorsrc
+++ b/.all-contributorsrc
@@ -3260,10 +3260,10 @@
]
},
{
- "login": "TanviPooranmal",
+ "login": "tanvincible",
"name": "Tanvi Pooranmal Meena",
- "avatar_url": "... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "New Feature Additions"
} |
scikit-learn__scikit-learn-19869@42548fc | scikit-learn/scikit-learn | Python | 19,869 | FIX add support for multilabel classification in RidgeClassifier* | closes #19858
closes #19882
build on the top of #19859
This PR fixes the `predict` method in `RidgeClassifierCV` and enables support for `RidgeClassifier` when the target is a multilabel indicator matrix.
The common tests are using #19859. The change in this PR should be limited to `ridge.py` and `test_ridge.p... | 2021-04-12T21:43:52Z | RidgeClassifierCV is not supporting properly multilabel-indicator
Our documentation state that `RidgeClassifierCV` is supporting `multilabel-indicator`.
However, a call to `predict`, will output an array of (n_samples,) containing `n_classes` instead of a matrix of `(n_samples, n_classes). The method `score` will fail... | This is only the case when `cv=None`
Hello! I can try fixing this if nobody else wants to?
You will also need to investigate a couple of things because I find it fishy that we are supposed to provide support for `multilabel-indicator` for `RegressionClassifierCV` with `cv=None` and not provide the same support for `Reg... | [
{
"body": "Our documentation state that `RidgeClassifierCV` is supporting `multilabel-indicator`.\r\nHowever, a call to `predict`, will output an array of (n_samples,) containing `n_classes` instead of a matrix of `(n_samples, n_classes). The method `score` will fail in this case.\r\n\r\nIt looks like we should... | 5aecf201a3d9ee8896566a057b3a576f1e31d410 | {
"head_commit": "42548fce029e53db9b54bb5f6112b51445d1b2b0",
"head_commit_message": "update whats new",
"patch_to_review": "diff --git a/doc/whats_new/v1.0.rst b/doc/whats_new/v1.0.rst\nindex ba3f6d6d1110d..b011e203ce357 100644\n--- a/doc/whats_new/v1.0.rst\n+++ b/doc/whats_new/v1.0.rst\n@@ -229,6 +229,11 @@ Chan... | [
{
"diff_hunk": "@@ -2120,6 +2123,119 @@ def check_classifiers_multilabel_representation_invariance(\n assert type(y_pred) == type(y_pred_list_of_lists)\n \n \n+@ignore_warnings(category=FutureWarning)\n+def check_classifiers_multilabel_format_output(name, classifier_orig):\n+ \"\"\"Check the output of th... | 65fb1b02fb1eae58edbb71e6993dcea1ae1fade3 | diff --git a/doc/modules/multiclass.rst b/doc/modules/multiclass.rst
index 043d158825a6f..1cf85b08db66a 100644
--- a/doc/modules/multiclass.rst
+++ b/doc/modules/multiclass.rst
@@ -102,6 +102,7 @@ can provide additional strategies beyond what is built-in:
- :class:`neural_network.MLPClassifier`
- :class:`neighbor... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "New Feature Additions"
} |
scikit-learn__scikit-learn-19643@9bd35c2 | scikit-learn/scikit-learn | Python | 19,643 | ENH Raises error in hinge_loss when 'pred_decision' is invalid |
<!--
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
-->
#### Reference Issues/PRs
Fixes #19638
#### What does this implement/fix? Explain your changes.
With multiclass targ... | 2021-03-08T13:34:43Z | [BUG] hinge_loss multi
```python
>>> sklearn.metrics.hinge_loss(y_true=[2,1,0,1,0,1,1], pred_decision=[0,1,2,1,0,2,1])
2378 y_true = le.transform(y_true)
2379 mask = np.ones_like(pred_decision, dtype=bool)
-> 2380 mask[np.arange(y_true.shape[0]), y_true] = False
2381 margi... | In this case `y_true` has three classes, while the `pred_decision` is 1d which is for binary classification. We most likely want to error when the shape of `pred_decision` is not consistent with `y_true` (or `labels`).
Also `pred_decision` should be the output of `decision_function`. It looks like the output of `predic... | [
{
"body": "```python\r\n>>> sklearn.metrics.hinge_loss(y_true=[2,1,0,1,0,1,1], pred_decision=[0,1,2,1,0,2,1])\r\n\r\n 2378 y_true = le.transform(y_true)\r\n 2379 mask = np.ones_like(pred_decision, dtype=bool)\r\n-> 2380 mask[np.arange(y_true.shape[0]), y_true] = False\r\n 2381 ... | 42e90e9ba28fb37c2c9bd3e8aed1ac2387f1d5d5 | {
"head_commit": "9bd35c239662ba63cd53a924b554944f4018fb58",
"head_commit_message": "Add precision to error messages.",
"patch_to_review": "diff --git a/doc/whats_new/v1.0.rst b/doc/whats_new/v1.0.rst\nindex 3e36438dda095..06764d2be6003 100644\n--- a/doc/whats_new/v1.0.rst\n+++ b/doc/whats_new/v1.0.rst\n@@ -165,6... | [
{
"diff_hunk": "@@ -2135,6 +2136,33 @@ def test_hinge_loss_multiclass_missing_labels_with_labels_none():\n hinge_loss(y_true, pred_decision)\n \n \n+def test_hinge_loss_multiclass_no_consistent_pred_decision_shape():\n+ # test for inconsistency between multiclass problem and pred_decision\n+ # arg... | 6fd0a21d396e9f723db3df6dab82ad8c4e394e0a | diff --git a/doc/whats_new/v1.0.rst b/doc/whats_new/v1.0.rst
index 3e36438dda095..06764d2be6003 100644
--- a/doc/whats_new/v1.0.rst
+++ b/doc/whats_new/v1.0.rst
@@ -165,6 +165,11 @@ Changelog
class methods and will be removed in 1.2.
:pr:`18543` by `Guillaume Lemaitre`_.
+- |Enhancement| A fix to raise an error... | {
"difficulty": "low",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
sktime__sktime-6039@ad840de | sktime/sktime | Python | 6,039 | [ENH] `NeuralForecastRNN` should auto-detect `freq` | Enhances `NeuralForecastRNN` to interpret `freq` from `ForecastingHorizon` when passed as `"auto"`
<!--
Welcome to sktime, and thanks for contributing!
Please have a look at our contribution guide:
https://www.sktime.net/en/latest/get_involved/contributing.html
-->
#### Reference Issues/PRs
<!--
Example: Fixe... | 2024-03-01T03:44:12Z | [ENH] `NeuralForecastRNN` should auto-detect `freq`
Right now, a `freq` argument needs to be passed to the constructor of `NeuralForecastRNN`, and it will raise exception if not.
To my understanding, this must always be identical with the `freq` of the data (as `pandas` coerced),
Therefore, this information is ava... | FYI @yarnabrina
I replied to your comment in the PR, but I think it got lost in later conversations.
I'm not sure if I understand how to use `fh.freq` always. If user passes a relative `fh`, say `[1, 6, 12]`, will that object always have a `freq` attribute? May be that is handled in `BaseForecaster` or in `Forecast... | [
{
"body": "Right now, a `freq` argument needs to be passed to the constructor of `NeuralForecastRNN`, and it will raise exception if not.\r\n\r\nTo my understanding, this must always be identical with the `freq` of the data (as `pandas` coerced),\r\nTherefore, this information is available in `fit`, so why not... | 940777de2cc414288da67c4b0dee461e8522e9f0 | {
"head_commit": "ad840deebbd8682318e93aa3232ae97658b9c9f2",
"head_commit_message": "[ENH] `NeuralForecastRNN` should auto-detect `freq` (#6003)\n\nEnhances `NeuralForecastRNN` to interpret `freq` from `ForecastingHorizon` when passed as `\"auto\"`",
"patch_to_review": "diff --git a/.all-contributorsrc b/.all-con... | [
{
"diff_hunk": "@@ -179,6 +181,16 @@ def _fit(\n if not fh.is_all_out_of_sample(cutoff=self.cutoff):\n raise NotImplementedError(\"in-sample prediction is currently not supported\")\n \n+ if self.freq == \"auto\":\n+ if fh.freq:\n+ # interpret freq from Forec... | 6fdc9ce03337033abf60b4c5eed53ba1db9687f5 | diff --git a/.all-contributorsrc b/.all-contributorsrc
index 322255745f9..def3ac070dd 100644
--- a/.all-contributorsrc
+++ b/.all-contributorsrc
@@ -2613,6 +2613,7 @@
"avatar_url": "https://avatars.githubusercontent.com/u/90601662?s=96&v=4",
"profile": "https://github.com/geetu040",
"contributions"... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "New Feature Additions"
} |
sqlfluff__sqlfluff-1678@5841eee | sqlfluff/sqlfluff | Python | 1,678 | Robust Jinja raw/template mapping | ### Brief summary of the change made
Fixes #1437
There are two main aspects to the design:
* During slicing, creates a second Jinja template that is **structurally** identical, but literals and templated blocks are replaced and/or tagged with UUIDs. Using this alternate template, all template output can be fully... | 2021-10-16T22:02:36Z | Jinja: Can we do a more robust mapping between expanded code and original templated code?
SQLFluff has a hard time applying fixes without getting deeper into Jinja. As Alan mentioned in a recent interview, Jinja doesn't seem to support this. I have a suspicion that if we look really closely at Jinja, we may be able to ... | This looks like a good template to experiment with. It contains 3 copies of the same loop. `sqlfluff fix` refuses to fix it -- it appears to be discarding all the fixes because it can't map them to the source. (I say this because if I remove two copies of the loop, it is able to fix the file.)
```
INFO * ... | [
{
"body": "SQLFluff has a hard time applying fixes without getting deeper into Jinja. As Alan mentioned in a recent interview, Jinja doesn't seem to support this. I have a suspicion that if we look really closely at Jinja, we may be able to do some things to make this work, although they may be hacky at first. ... | c5106a29f1d1273a6f65287498d8de3e217caad0 | {
"head_commit": "5841eee5baf31dff77bda024ed888fdc0df5cf50",
"head_commit_message": "More work on L003",
"patch_to_review": "diff --git a/src/sqlfluff/core/parser/grammar/sequence.py b/src/sqlfluff/core/parser/grammar/sequence.py\nindex 580156fee8d..dc27134f0dd 100644\n--- a/src/sqlfluff/core/parser/grammar/seque... | [
{
"diff_hunk": "@@ -411,13 +628,59 @@ def _slice_template(cls, in_str: str) -> Iterator[RawFileSlice]:\n # returns, it has simply grouped them differently than we\n # want.\n trailing_chars = len(m.group(0))\n- yield RawFileSlice(\n-... | bc3d784f7f2d4b49d0f9e27b40554370c4b6895e | diff --git a/plugins/sqlfluff-templater-dbt/sqlfluff_templater_dbt/templater.py b/plugins/sqlfluff-templater-dbt/sqlfluff_templater_dbt/templater.py
index ad4ad599601..8e27a8d9d74 100644
--- a/plugins/sqlfluff-templater-dbt/sqlfluff_templater_dbt/templater.py
+++ b/plugins/sqlfluff-templater-dbt/sqlfluff_templater_dbt/... | {
"difficulty": "high",
"estimated_review_effort": 4,
"problem_domain": "New Feature Additions"
} |
sktime__sktime-6005@4b9147a | sktime/sktime | Python | 6,005 | [BUG] Fixed SARIMAX fail when X is passed to predict but not fit | <!--
Welcome to sktime, and thanks for contributing!
Please have a look at our contribution guide:
https://www.sktime.net/en/latest/get_involved/contributing.html
-->
#### Reference Issues/PRs
<!--
Example: Fixes #1234. See also #3456.
Please use keywords (e.g., Fixes) to create link to the issues or pull r... | 2024-02-25T17:38:09Z | [BUG] `SARIMAX` fails when `X` is passed in `predict` but not used in `fit`
## Minimal Reproducible Example
```pycon
>>>
>>> from sktime.datasets import load_longley
>>> from sktime.forecasting.sarimax import SARIMAX
>>> from sktime.split import temporal_train_test_split
>>>
>>> y, X = load_longley()
>>>
... | On looking into this issue, I found that the error was initially because of this code snippet
```python
if X is not None:
ind_drop = self._X.index
X = X.loc[~X.index.isin(ind_drop)]
# Entire range of the forecast horizon is required
X = X.iloc[: (fh_int[-1] + 1)] # include end point
```
Since w... | [
{
"body": "## Minimal Reproducible Example\r\n\r\n```pycon\r\n>>> \r\n>>> from sktime.datasets import load_longley\r\n>>> from sktime.forecasting.sarimax import SARIMAX\r\n>>> from sktime.split import temporal_train_test_split\r\n>>> \r\n>>> y, X = load_longley()\r\n>>> \r\n>>> y_train, _, _, X_test = temporal_... | 14c88c69d2a0e961390e749278b5349470d35332 | {
"head_commit": "4b9147adbb5f980ff740b462f66bae022cce6015",
"head_commit_message": "Merge branch 'sktime:main' into Sarimax_exog_fix",
"patch_to_review": "diff --git a/sktime/forecasting/base/adapters/_statsmodels.py b/sktime/forecasting/base/adapters/_statsmodels.py\nindex 1f00fe1066f..07479944c7e 100644\n--- a... | [
{
"diff_hunk": "@@ -111,12 +111,15 @@ def _predict(self, fh, X):\n # statsmodels exog must contain test indices only.\n # For discussion see https://github.com/sktime/sktime/issues/3830\n if X is not None:\n- ind_drop = self._X.index\n- X = X.loc[~X.index.isin(ind_d... | 227dd8a7bfe1abb50f02ab3dee9d54fc0e581984 | diff --git a/sktime/forecasting/base/adapters/_statsmodels.py b/sktime/forecasting/base/adapters/_statsmodels.py
index 1f00fe1066f..b7efd883810 100644
--- a/sktime/forecasting/base/adapters/_statsmodels.py
+++ b/sktime/forecasting/base/adapters/_statsmodels.py
@@ -110,13 +110,15 @@ def _predict(self, fh, X):
#... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
saltstack__salt-60782@3a87440 | saltstack/salt | Python | 60,782 | Clean up bare exceptions | ### What does this PR do?
Clean up bare exceptions. Log exceptions that are overly broad, narrow down others.
### What issues does this PR fix or reference?
Partially resolves: #60781
### Merge requirements satisfied?
**[NOTICE] Bug fixes or features added to Salt require tests.**
<!-- Please review the [... | 2021-08-23T20:52:59Z | [TECH DEBT] Clean up bare/broad exception handling
### Description of the tech debt to be addressed, include links and screenshots
Clean up exception handling of bare exceptions and/or overly broad exceptions..
Things like this:
```
try:
...
except Exception:
pass
````
Should be excepting a specifi... | [
{
"body": "### Description of the tech debt to be addressed, include links and screenshots\r\n\r\nClean up exception handling of bare exceptions and/or overly broad exceptions..\r\n\r\nThings like this:\r\n```\r\ntry:\r\n ...\r\nexcept Exception:\r\n pass\r\n````\r\n\r\nShould be excepting a specific except... | c1e38f4a8a90bc55639ceaeb590d515591825c2a | {
"head_commit": "3a8744061695bfd503ded8a5772269cc3cede552",
"head_commit_message": "Clean up bare exceptions",
"patch_to_review": "diff --git a/salt/client/ssh/__init__.py b/salt/client/ssh/__init__.py\nindex d31e1952838c..1fae655d50df 100644\n--- a/salt/client/ssh/__init__.py\n+++ b/salt/client/ssh/__init__.py\... | [
{
"diff_hunk": "@@ -771,7 +771,7 @@ def _load_module(self, name):\n except SystemExit as error:\n try:\n fn_, _, caller, _ = traceback.extract_tb(sys.exc_info()[2])[-1]\n- except Exception: # pylint: disable=broad-except\n+ except IndexError: # pylint:... | b93be174d090ae4fe9df8f41c8cba86fdd901b65 | diff --git a/salt/client/ssh/__init__.py b/salt/client/ssh/__init__.py
index d31e1952838c..1fae655d50df 100644
--- a/salt/client/ssh/__init__.py
+++ b/salt/client/ssh/__init__.py
@@ -11,6 +11,7 @@
import logging
import multiprocessing
import os
+import queue
import re
import subprocess
import sys
@@ -614,11 +615,... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Code Refactoring / Architectural Improvement"
} | |
sktime__sktime-6031@7130f97 | sktime/sktime | Python | 6,031 | [ENH] forecasting tuners, `return_n_best_forecasters=-1` to return performances of all forecasters | <!--
Welcome to sktime, and thanks for contributing!
Please have a look at our contribution guide:
https://www.sktime.net/en/latest/get_involved/contributing.html
-->
#### Reference Issues/PRs
<!--
Example: Fixes #1234. See also #3456.
Please use keywords (e.g., Fixes) to create link to the issues or pull r... | 2024-02-28T20:04:28Z | [ENH] Allow `return_n_best_forecasters` in `ForecastingGridSearchCV ` to be -1 (select all forecasters)
**Is your feature request related to a problem? Please describe.**
I would like the class `ForecastingGridSearchCV ` to have a possibility to return ALL forecasters. Right now we have the `return_n_best_forecasters... | sounds like a good idea to me - we should do it in all the other forecasting tuners too, and not forget to update docstrings.
Marking this a good first issue since I think it's a nicely defined entry contribution.
Can I try to work on this?
I'm new here, so I don't know how assignments work here, or can anyone wo... | [
{
"body": "**Is your feature request related to a problem? Please describe.**\r\nI would like the class `ForecastingGridSearchCV ` to have a possibility to return ALL forecasters. Right now we have the `return_n_best_forecasters ` argument in the API which lets you choose how many forecasters you want to return... | d19fda18c6476630b038e1f7fe5f6c8ca4a21991 | {
"head_commit": "7130f97baf79417f5d415e858c20ae9624a6452a",
"head_commit_message": "Add testing for `ForecastingRandomizedSearchCV`",
"patch_to_review": "diff --git a/sktime/forecasting/model_selection/_tune.py b/sktime/forecasting/model_selection/_tune.py\nindex 3b73b9454ba..71555226339 100644\n--- a/sktime/for... | [
{
"diff_hunk": "@@ -353,35 +353,72 @@ def test_gscv_backends(backend_set):\n gscv.fit(y, X)\n \n \n+def test_BaseGridSearch(",
"line": null,
"original_line": 356,
"original_start_line": null,
"path": "sktime/forecasting/model_selection/tests/test_tune.py",
"start_line": null,
"text":... | 62a21cb8b495fa997c154e98c314ec35cdf52b33 | diff --git a/sktime/forecasting/model_selection/_tune.py b/sktime/forecasting/model_selection/_tune.py
index e579cf8248b..a7afe38c0e7 100644
--- a/sktime/forecasting/model_selection/_tune.py
+++ b/sktime/forecasting/model_selection/_tune.py
@@ -267,7 +267,10 @@ def evaluate_candidates(candidate_params):
# Sele... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "New Feature Additions"
} |
sqlfluff__sqlfluff-1638@d3f058b | sqlfluff/sqlfluff | Python | 1,638 | Stop rule L048 complaining if literal is followed by a semicolon | ### Brief summary of the change made
Fixes #1626
### Are there any other side effects of this change that we should be aware of?
Nope. Fairly easy one this.
### Pull Request checklist
- [x] Please confirm you have completed any of the necessary steps below.
- Included test cases to demonstrate any code cha... | 2021-10-13T21:15:42Z | Snowflake / `L048`: Mistakenly flagged whitespace is needed after 'UTC' in a session set statement.
## Expected Behaviour
Linting should pass in the following SQL:
```
ALTER SESSION SET TIMEZONE = 'UTC';
```
## Observed Behaviour
Linting failed due to whitespace missing between `'UTC'` and `;`
To get the... | That seems to me like a rule bug with rule L048 rather than something specific to `UTC` or Snowflake.
There’s already an exemption for commas for the same reason so should be easy enough to add semi-colon as well:
https://github.com/sqlfluff/sqlfluff/blob/87710e73a1712366437ef3cc85e3196279cbf007/src/sqlfluff/rule... | [
{
"body": "## Expected Behaviour\r\n\r\nLinting should pass in the following SQL:\r\n```\r\nALTER SESSION SET TIMEZONE = 'UTC';\r\n```\r\n\r\n## Observed Behaviour\r\n\r\nLinting failed due to whitespace missing between `'UTC'` and `;`\r\n\r\nTo get the linter to pass, we'll need to add a space between them - W... | 30a04a0bbef04e195578d919adbf0ad984daa0f0 | {
"head_commit": "d3f058b5ed383a39f0f267e4b20c28199ab3cf34",
"head_commit_message": "Merge branch 'main' into update-l048-for-semicolons",
"patch_to_review": "diff --git a/src/sqlfluff/rules/L048.py b/src/sqlfluff/rules/L048.py\nindex 7dfd565f32e..2c0c0568f0b 100644\n--- a/src/sqlfluff/rules/L048.py\n+++ b/src/sq... | [
{
"diff_hunk": "@@ -44,6 +44,10 @@ def _missing_whitespace(seg, before=True):\n https://github.com/sqlfluff/sqlfluff/issues/943\n \"\"\"\n simple_res = Rule_L006._missing_whitespace(seg, before=before)\n- if not before and seg and seg.is_type(\"comma\"):\n+ if (\n+ ... | 8db7224de243743a89588c6d80d4f6941afd5a20 | diff --git a/src/sqlfluff/rules/L048.py b/src/sqlfluff/rules/L048.py
index 7dfd565f32e..a47d5aaeb32 100644
--- a/src/sqlfluff/rules/L048.py
+++ b/src/sqlfluff/rules/L048.py
@@ -44,6 +44,6 @@ def _missing_whitespace(seg, before=True):
https://github.com/sqlfluff/sqlfluff/issues/943
"""
simple_... | {
"difficulty": "low",
"estimated_review_effort": 2,
"problem_domain": "Bug Fixes"
} |
sqlfluff__sqlfluff-1618@eb8649e | sqlfluff/sqlfluff | Python | 1,618 | Snowflake drop column fixes | ### Brief summary of the change made
Fixes #1617. Linting an 'alter table drop dolumn statement' raised an unparsable section error. Including this specific sequence fixes the issue.
### Are there any other side effects of this change that we should be aware of?
Not that I'm aware of.
### Pull Request checklist... | 2021-10-13T08:14:53Z | Snowflake / drop column: unparsable section for drop column statement
## Expected Behaviour
I expected to be able to lint a SQL file containing a 'alter table ... drop column ...' statement.
## Observed Behaviour
When linting this SQL statement an unparsable section error occurred, see code report below:
```bash
... | [
{
"body": "## Expected Behaviour\r\nI expected to be able to lint a SQL file containing a 'alter table ... drop column ...' statement.\r\n\r\n## Observed Behaviour\r\nWhen linting this SQL statement an unparsable section error occurred, see code report below:\r\n```bash\r\n== [test_schema/test_table/drop_test_c... | 633a23f258d9a0c377cb92a94f66035b651e0e35 | {
"head_commit": "eb8649e015c8734e138eb001b846277e1066f1a0",
"head_commit_message": "Update test files",
"patch_to_review": "diff --git a/src/sqlfluff/dialects/dialect_snowflake.py b/src/sqlfluff/dialects/dialect_snowflake.py\nindex 854eadbdfca..8193dd8bc82 100644\n--- a/src/sqlfluff/dialects/dialect_snowflake.py... | [
{
"diff_hunk": "@@ -788,11 +788,15 @@ class AlterTableColumnStatementSegment(BaseSegment):\n \"ALTER\",\n \"TABLE\",\n Ref(\"TableReferenceSegment\"),\n- OneOf(\"ALTER\", \"MODIFY\"),\n+ OneOf(\"ALTER\", \"MODIFY\", \"DROP\"),\n OptionallyBracketed(\n De... | e146a31fbc57d467ef6d053234000d87b8a16cec | diff --git a/src/sqlfluff/dialects/dialect_snowflake.py b/src/sqlfluff/dialects/dialect_snowflake.py
index 21a789c00f0..7920e3544f6 100644
--- a/src/sqlfluff/dialects/dialect_snowflake.py
+++ b/src/sqlfluff/dialects/dialect_snowflake.py
@@ -791,45 +791,56 @@ class AlterTableColumnStatementSegment(BaseSegment):
... | {
"difficulty": "low",
"estimated_review_effort": 2,
"problem_domain": "Bug Fixes"
} | |
saltstack__salt-60615@f671697 | saltstack/salt | Python | 60,615 | Reworking the mysql modules so that passwordless does not use unix_socket plugin | ### What does this PR do?
Reworking the mysql module and state so that passwordless does not try to use unix_socket until unix_socket is set to True. Adding tests to test passwordless and unix_socket functionality.
### What issues does this PR fix or reference?
Fixes: #59337
### Merge requirements satisfied?
... | 2021-07-23T22:26:25Z | [BUG] allow_passwordless in mysql_user.present force the use of unix_socket
**Description**
allow_passwordless in mysql_user.present force the use of unix_socket even if the unix_socket set to false
**Setup**
```
phpmyadmin-user:
mysql_user.present:
- name: phpmyadmin
- host: 'localhost'
- allow... | It looks like it is requiring the unix socket to be enabled, as the default is likely assuming you are trying to use this over the network, but if you are using it locally it wouldn't work as the docs indicate:
```
unix_socket
If ``True`` and allow_passwordless is ``True``, the unix_socket auth
plug... | [
{
"body": "**Description**\r\nallow_passwordless in mysql_user.present force the use of unix_socket even if the unix_socket set to false\r\n\r\n**Setup**\r\n```\r\nphpmyadmin-user:\r\n mysql_user.present:\r\n - name: phpmyadmin\r\n - host: 'localhost'\r\n - allow_passwordless: true\r\n - unix_socke... | 83390a70ee25c849a2741e5932447649348bf939 | {
"head_commit": "f67169780f2749286534993677c7db8df98ab02d",
"head_commit_message": "Merge branch 'master' into 59337_mysql_user_passwordless",
"patch_to_review": "diff --git a/changelog/59337.fixed b/changelog/59337.fixed\nnew file mode 100644\nindex 000000000000..210359c8741f\n--- /dev/null\n+++ b/changelog/593... | [
{
"diff_hunk": "@@ -1612,12 +1598,33 @@ def _mysql_user_create(\n else:\n log.error(\"Auth via unix_socket can be set only for host=localhost\")",
"line": null,
"original_line": 1599,
"original_start_line": null,
"path": "salt/modules/mysql.py",
"start_lin... | 670883a4ac50bcb7f955b345f475a2d29f5b1cf8 | diff --git a/changelog/59337.fixed b/changelog/59337.fixed
new file mode 100644
index 000000000000..210359c8741f
--- /dev/null
+++ b/changelog/59337.fixed
@@ -0,0 +1 @@
+Reworking the mysql module and state so that passwordless does not try to use unix_socket until unix_socket is set to True.
diff --git a/salt/modules... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
saltstack__salt-60619@78ec1a4 | saltstack/salt | Python | 60,619 | Beacon system fixes | ### What does this PR do?
Have the beacon call run through a try...except, catching any errors logging and firing an event that includes the error.
Fixing the swapusage beacon to ensure value is a tring before we attempt to filter out the %. Adding additional tests.
Moving tests/unit/test_beacons.py to tests/pyte... | 2021-07-25T20:32:07Z | (config) error in one beacon affects all beacons
**Description**
When there is a (configuration) error in one beacon, other beacons are not reported.
**Setup**
Master plus a minion.
**Steps to Reproduce the behavior**
Activate a set of beacons on the minion, e.g. `load`, `status` and `swapusage`.
But configur... | [
{
"body": "**Description**\r\nWhen there is a (configuration) error in one beacon, other beacons are not reported.\r\n\r\n**Setup**\r\nMaster plus a minion.\r\n\r\n**Steps to Reproduce the behavior**\r\nActivate a set of beacons on the minion, e.g. `load`, `status` and `swapusage`.\r\nBut configure `swapusage` ... | 5fc67b64e0769730d1d28cf89a6bdb1e5c311c0f | {
"head_commit": "78ec1a4fab60b5ce49bb211c4285d626a801e1fb",
"head_commit_message": "Merge branch 'master' into 60585_beacon_fixes",
"patch_to_review": "diff --git a/changelog/60585.fixed b/changelog/60585.fixed\nnew file mode 100644\nindex 000000000000..65314cc2c90c\n--- /dev/null\n+++ b/changelog/60585.fixed\n@... | [
{
"diff_hunk": "@@ -125,16 +126,35 @@ def process(self, config, grains):\n continue\n \n # Fire the beacon!\n- raw = self.beacons[fun_str](b_config[mod])\n- for data in raw:\n+ error = None\n+ try:\n+ ... | e80c7e08a01594d1590b4210e9e17502d6bd144e | diff --git a/changelog/60585.fixed b/changelog/60585.fixed
new file mode 100644
index 000000000000..5a1f2735a217
--- /dev/null
+++ b/changelog/60585.fixed
@@ -0,0 +1,2 @@
+Have the beacon call run through a try...except, catching any errors, logging and firing an event that includes the error.
+Fixing the swapusage bea... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} | |
sqlfluff__sqlfluff-1612@1efbb3f | sqlfluff/sqlfluff | Python | 1,612 | TSQL: fix statement delimitation | Fixes #1581
Fixes #1555
The TSQL dialect allows for optional semicolon delimiters between statements. Since they are optional, we cannot rely on them to delimit the codebase. This code change removes all places where we assume semicolons will delimit and replaces them with optional references.
As part of this... | 2021-10-12T17:40:29Z | TSQL: Incorrect indent in if block
Example code:
```sql
if @debug = 1
begin
print '<something>';
print '<something else>';
return
end
```
## Expected Behaviour
The indentation is correct like this.
## Observed Behaviour
The third line (`print '<something else>';`) is de-indented to the s... | This might be related:
```sql
create procedure <name>
@debug bit = 0
as
begin
begin try
declare @a int;
declare @b int;
declare @c int
select @d = '<something>'
```
Again, I would expect the last two `declare` statements to be on the same indentation level as the previous one. Howe... | [
{
"body": "Example code:\r\n```sql\r\nif @debug = 1\r\n begin\r\n print '<something>';\r\n print '<something else>';\r\n return\r\n end\r\n```\r\n\r\n## Expected Behaviour\r\nThe indentation is correct like this.\r\n\r\n## Observed Behaviour\r\nThe third line (`print '<something else>';`) is de-inden... | 853ceef4094a6eeecb4d75611d7df90941572310 | {
"head_commit": "1efbb3fac06fa25d3510055b6d084a1739603b88",
"head_commit_message": "Fix Statement Delimitation Issue",
"patch_to_review": "diff --git a/src/sqlfluff/core/parser/segments/meta.py b/src/sqlfluff/core/parser/segments/meta.py\nindex 86a0c7f8fd7..8674fe6e4ff 100644\n--- a/src/sqlfluff/core/parser/segm... | [
{
"diff_hunk": "@@ -1199,3 +1252,122 @@ class FileSegment(BaseFileSegment):\n allow_gaps=True,\n allow_trailing=True,\n )\n+\n+\n+@tsql_dialect.segment(replace=True)\n+class DeleteStatementSegment(BaseSegment):\n+ \"\"\"A `DELETE` statement.\n+\n+ DELETE FROM <table name> [ WHERE <sear... | 48bf20f329c1eaf8f13f622be41c74cb6fbd7cd0 | diff --git a/src/sqlfluff/core/parser/segments/meta.py b/src/sqlfluff/core/parser/segments/meta.py
index 86a0c7f8fd7..8674fe6e4ff 100644
--- a/src/sqlfluff/core/parser/segments/meta.py
+++ b/src/sqlfluff/core/parser/segments/meta.py
@@ -2,6 +2,8 @@
from sqlfluff.core.parser.match_wrapper import match_wrapper
from s... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "Code Style, Linting, Formatting Fixes"
} |
sktime__sktime-7562@5d6fbb7 | sktime/sktime | Python | 7,562 | [ENH] Enable `EnbPIForecaster` to work with `sktime` native bootstrap algorithms | #### Reference Issues/PRs
fixes #7561
Depends on https://github.com/sktime/sktime/pull/8023 for test fixes, which should be merged first.
#### What does this implement/fix? Explain your changes.
Add the option to bootstrap algorithms to return the indices. Change the Enbpi forecaster so that it works with nativ... | 2024-12-22T18:48:14Z | [ENH] Enable Enbpi with native bootstrap algorithms.
**Is your feature request related to a problem? Please describe.**
Currently enbpi is only usable with bootstrap algorithms from tsbootstrap. Change it so that it uses only bootstrap algorithms implemented in sktime. tsbootstrap would still be possible by using the ... | Hey @benHeid I have tried this issue ..I hope I am doing the right thing | [
{
"body": "**Is your feature request related to a problem? Please describe.**\r\nCurrently enbpi is only usable with bootstrap algorithms from tsbootstrap. Change it so that it uses only bootstrap algorithms implemented in sktime. tsbootstrap would still be possible by using the tsbootstrapadapter.\r\n\r\nRequi... | d550696f282e724c85fac4d6184052e3bc4f34fe | {
"head_commit": "5d6fbb70ec216db78cd02a5c35ba073114f8dbf3",
"head_commit_message": "Fix comments",
"patch_to_review": "diff --git a/sktime/forecasting/enbpi.py b/sktime/forecasting/enbpi.py\nindex 65c140d3b1a..536de213740 100644\n--- a/sktime/forecasting/enbpi.py\n+++ b/sktime/forecasting/enbpi.py\n@@ -1,6 +1,8 ... | [
{
"diff_hunk": "@@ -128,13 +134,41 @@ def __init__(\n \n super().__init__()\n \n- from tsbootstrap import MovingBlockBootstrap\n+ from tsbootstrap import BaseTimeSeriesBootstrap, MovingBlockBootstrap\n \n- self.bootstrap_transformer_ = (\n- clone(bootstrap_transformer)\n-... | 6f5f9d9df428cee8b4a7d04ef19a0d5aee17d42a | diff --git a/docs/source/api_reference/tags.rst b/docs/source/api_reference/tags.rst
index 12fc4a43215..bdc88c51556 100644
--- a/docs/source/api_reference/tags.rst
+++ b/docs/source/api_reference/tags.rst
@@ -151,6 +151,7 @@ transform a single time series object (``"transformer"`` type).
capability__inverse_transf... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "New Feature Additions"
} |
saltstack__salt-60505@41e7597 | saltstack/salt | Python | 60,505 | fix npm installed 60339 | ### What does this PR do?
What it says on the tin, fixes #60339
### Previous Behavior
Previously the state only looked at the return type from the module to
determine if npm.install worked.
### New Behavior
Since at some point npm changed their behavior, it makes more sense to just
rely on the retcode - 0 is succ... | 2021-07-08T05:21:36Z | [BUG] npm.installed is broken on arch linux (possibly more)
**Description**
npm.installed reports a failure the first time it runs, even though it appears successful
**Setup**
```
npm:
pkg.installed
bower:
npm.installed
```
run this state on archlinux :point_up:
**Steps to Reproduce the behavior**
... | Either this never worked or npm must have fixed a bug. https://github.com/saltstack/salt/pull/30657 added the ability to pass the silent flag - before that it was *always* used, which means it never would have produced the json output.
I don't understand that at all.
I can write a fix for this tomorrow.
Okay, loo... | [
{
"body": "**Description**\r\nnpm.installed reports a failure the first time it runs, even though it appears successful\r\n\r\n**Setup**\r\n```\r\nnpm:\r\n pkg.installed\r\n\r\nbower:\r\n npm.installed\r\n```\r\nrun this state on archlinux :point_up: \r\n\r\n**Steps to Reproduce the behavior**\r\nsudo salt-ca... | f5e8e98607578100641ffd87f61a03268366a3e6 | {
"head_commit": "41e75977ba3ef245e23ea9a976e5856d45107d01",
"head_commit_message": "Skip install failure",
"patch_to_review": "diff --git a/changelog/60339.fixed b/changelog/60339.fixed\nnew file mode 100644\nindex 000000000000..4d6a526d3d02\n--- /dev/null\n+++ b/changelog/60339.fixed\n@@ -0,0 +1 @@\n+Fixed faul... | [
{
"diff_hunk": "@@ -1,9 +1,13 @@\n import pytest\n+from salt.exceptions import CommandExecutionError\n \n \n @pytest.fixture(scope=\"module\", autouse=True)\n def install_npm(sminion):\n- sminion.functions.pkg.install(\"npm\")\n+ try:\n+ sminion.functions.pkg.install(\"npm\")",
"line": null,
... | 576c4513d882a46d594fd61e4e0990d3de2f7001 | diff --git a/changelog/60339.fixed b/changelog/60339.fixed
new file mode 100644
index 000000000000..4d6a526d3d02
--- /dev/null
+++ b/changelog/60339.fixed
@@ -0,0 +1 @@
+Fixed faulty error message in npm.installed state.
diff --git a/salt/states/npm.py b/salt/states/npm.py
index 2afe84c0e44d..535a516a1d4e 100644
--- a/... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
sqlfluff__sqlfluff-1574@7d46a39 | sqlfluff/sqlfluff | Python | 1,574 | TSQL temp tables | Fixes #1572
TSQL temp tables are identified by a single-hash or double-hash prefix.
https://docs.microsoft.com/en-us/sql/t-sql/statements/create-table-transact-sql?view=sql-server-ver15#temporary-tables
TSQL changes:
+hash_prefix RegexLexer
+inline_comment RegexLexer patch to remove hash commenting
+HashId... | 2021-10-09T12:05:21Z | TSQL: Support for temp tables
TSQL uses hashes to represent temp tables, not comments.
## Expected Behaviour
The following parses:
```
SELECT a
,b
,c
FROM #UnionA;
Select d
,e
,f
FROM ##UnionB;
```
## Observed Behaviour
The above code is unparseable because the temp table names are ... | [
{
"body": "TSQL uses hashes to represent temp tables, not comments.\r\n\r\n\r\n## Expected Behaviour\r\n\r\nThe following parses:\r\n```\r\nSELECT a\r\n\t\t,b\r\n\t\t,c\r\nFROM #UnionA;\r\n\r\nSelect\td\r\n\t\t,e\r\n\t\t,f\r\nFROM ##UnionB;\r\n\r\n```\r\n\r\n## Observed Behaviour\r\n\r\nThe above code is unpar... | eb44ebd3a6242dff3fe55862013e0e24061ba3c4 | {
"head_commit": "7d46a3926c789787b795db5d5e5abf642a9787e9",
"head_commit_message": "TSQL temp tables",
"patch_to_review": "diff --git a/src/sqlfluff/dialects/dialect_tsql.py b/src/sqlfluff/dialects/dialect_tsql.py\nindex 051415620b4..06c6bc581d9 100644\n--- a/src/sqlfluff/dialects/dialect_tsql.py\n+++ b/src/sqlf... | [
{
"diff_hunk": "@@ -51,14 +52,34 @@\n ),\n # T-SQL unicode strings\n RegexLexer(\"single_quote_with_n\", r\"N'([^'\\\\]|\\\\.)*'\", CodeSegment),\n+ RegexLexer(\n+ \"hash_prefix\",\n+ r\"[#]+[a-zA-Z0-9_]+\",",
"line": null,
"original_line": 57,
"o... | e170f4cf9327ba53315653f5259ce900ac72061a | diff --git a/src/sqlfluff/dialects/dialect_tsql.py b/src/sqlfluff/dialects/dialect_tsql.py
index 051415620b4..ef067ad27ba 100644
--- a/src/sqlfluff/dialects/dialect_tsql.py
+++ b/src/sqlfluff/dialects/dialect_tsql.py
@@ -23,6 +23,7 @@
BaseFileSegment,
Indent,
AnyNumberOf,
+ CommentSegment,
)
from ... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} | |
scikit-learn__scikit-learn-19411@93908d7 | scikit-learn/scikit-learn | Python | 19,411 | ENH Allow multiple scorers input to permutation_importance | <!--
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
-->
#### Reference Issues/PRs
Fixes #18701
<!--
Example: Fixes #1234. See also #3456.
Please use keywords (e.g., Fixes) to... | 2021-02-09T14:45:18Z | Allow permutation_importance to accept multiple scorers in `scoring`
#### Describe the workflow you want to enable
We would like to compare permutation importance using different scorers and since our model is big, running multiple `permutation_importance` per scoring is not efficient. It would be nice if we can pass ... | This seems to be an interesting feature. I think it could be done efficiently without requiring so much trick. It comes back to call `_weight_scorer` in a loop with different scorers.
Interesting idea but I am not sure what the output would look like: a dict of `Bunch`, one for each scorer?
The caching mechanism of `... | [
{
"body": "#### Describe the workflow you want to enable\r\nWe would like to compare permutation importance using different scorers and since our model is big, running multiple `permutation_importance` per scoring is not efficient. It would be nice if we can pass a list/tuple/dict to `scoring` arg and get multi... | 1ea79056f7f2b3c7d8b022d28abb8c26ad9c91d2 | {
"head_commit": "93908d777888d2b460214d7134f178b2f5fff8e0",
"head_commit_message": "bux fix for loop",
"patch_to_review": "diff --git a/sklearn/inspection/_permutation_importance.py b/sklearn/inspection/_permutation_importance.py\nindex 688f6e9e68e03..8fb3b831921f6 100644\n--- a/sklearn/inspection/_permutation_i... | [
{
"diff_hunk": "@@ -143,14 +159,36 @@ def permutation_importance(estimator, X, y, *, scoring=None, n_repeats=5,\n random_state = check_random_state(random_state)\n random_seed = random_state.randint(np.iinfo(np.int32).max + 1)\n \n- scorer = check_scoring(estimator, scoring=scoring)\n- baseline_sc... | e497efc595f950ade1dbbddf1b4562145a03e27a | diff --git a/doc/modules/permutation_importance.rst b/doc/modules/permutation_importance.rst
index aa28aba6827da..833c9fb9a696e 100644
--- a/doc/modules/permutation_importance.rst
+++ b/doc/modules/permutation_importance.rst
@@ -16,6 +16,16 @@ indicative of how much the model depends on the feature. This technique
ben... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "New Feature Additions"
} |
scikit-learn__scikit-learn-19407@318c2a8 | scikit-learn/scikit-learn | Python | 19,407 | Fix ValueError on HistGradientBoostingRegressor with least_absolute_deviation loss function fit call with sample_weight parameter | #### Reference Issues/PRs
Fixes #19400.
| 2021-02-09T09:59:40Z | HistGradientBoostingRegressor with 'least_absolute_deviation' loss function and sample_weight raises ValueError: `indices` and `arr` must have the same number of dimensions
#### Describe the bug
`HistGradientBoostingRegressor` with `least_absolute_deviation` loss function raises ValueError on `fit` call with `sample_w... | Thanks for the report and for the reproducible example, I can reproduce.
The fix is simply to update
```py
median_res = _weighted_percentile(y_true[indices]
- raw_predictions[indices],
sample_wei... | [
{
"body": "#### Describe the bug\r\n`HistGradientBoostingRegressor` with `least_absolute_deviation` loss function raises ValueError on `fit` call with `sample_weight` parameter.\r\n\r\n#### Steps/Code to Reproduce\r\n```python\r\nimport numpy as np\r\nfrom sklearn.experimental import enable_hist_gradient_boosti... | 7e197fd600b72483ff2343b8d2605368d1ab24bf | {
"head_commit": "318c2a806b0dbd8940cf3e69a90c9a730a5dea55",
"head_commit_message": "fix code style error",
"patch_to_review": "diff --git a/sklearn/ensemble/_hist_gradient_boosting/loss.py b/sklearn/ensemble/_hist_gradient_boosting/loss.py\nindex f256408bf01fb..4bbf59dc01088 100644\n--- a/sklearn/ensemble/_hist_... | [
{
"diff_hunk": "@@ -203,6 +203,18 @@ def test_least_absolute_deviation():\n assert gbdt.score(X, y) > .9\n \n \n+def test_least_absolute_deviation_sample_weight():\n+ # non regression test for issue #19400\n+ # make sure no error is thrown during fit of\n+ # HistGradientBoostingRegressor with least... | ab769fe379314cf8e3461009bad904489402f3a8 | diff --git a/doc/whats_new/v0.24.rst b/doc/whats_new/v0.24.rst
index e5831a20a2b53..d34273532cda6 100644
--- a/doc/whats_new/v0.24.rst
+++ b/doc/whats_new/v0.24.rst
@@ -12,6 +12,13 @@ Version 0.24.2
Changelog
---------
+:mod:`sklearn.ensemble`
+.......................
+
+- |Fix| Fixed a bug in :class:`ensemble.Hist... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
sktime__sktime-5628@db854c3 | sktime/sktime | Python | 5,628 | [ENH] fix loss of time zone attribute in `ForecastingHorizon.to_absolute` | Fixes https://github.com/sktime/sktime/issues/5584.
`tz` information can be lost in an intermediate step where the index is coerced to period.
The fix is to restore it later, in this case. | 2023-12-15T17:44:01Z | [BUG] `ForecastingHorizon.to_absolute` is loosing tz information from `cutoff`
**Describe the bug**
The `to_absolute` method from `ForecastingHorizon` does not keep the `tz` information from `cutoff`.
**To Reproduce**
```python
cutoff = pd.Timestamp("2020-01-01", tz="utc")
fh_absolute = ForecastingHorizon(rang... | this may be a previous instance, which might contain a fix in the instance of a single forecaster:
https://github.com/sktime/sktime/pull/5464
I am just adding a link to this relevant resource:
https://xkcd.com/2867/ | [
{
"body": "**Describe the bug**\r\nThe `to_absolute` method from `ForecastingHorizon` does not keep the `tz` information from `cutoff`.\r\n\r\n**To Reproduce**\r\n\r\n```python\r\ncutoff = pd.Timestamp(\"2020-01-01\", tz=\"utc\")\r\nfh_absolute = ForecastingHorizon(range(100), freq=\"h\").to_absolute(cutoff)\r\... | 9daa6d718569187b541161b0065e1fdf5bd7afe6 | {
"head_commit": "db854c3b353fce93f186a3434f0d7edef3544d8e",
"head_commit_message": "fix fh",
"patch_to_review": "diff --git a/sktime/forecasting/base/_fh.py b/sktime/forecasting/base/_fh.py\nindex 01cbfca4374..141b5fcebe9 100644\n--- a/sktime/forecasting/base/_fh.py\n+++ b/sktime/forecasting/base/_fh.py\n@@ -870... | [
{
"diff_hunk": "@@ -870,6 +870,12 @@ def _to_absolute(fh: ForecastingHorizon, cutoff) -> ForecastingHorizon:\n _check_cutoff(cutoff, relative)\n is_timestamp = isinstance(cutoff, pd.DatetimeIndex)\n \n+ # remembert timezone to restore it later",
"line": null,
"original_line": 873,... | 4b06a45447910d83ef16423bf1991b4e66117280 | diff --git a/sktime/forecasting/base/_fh.py b/sktime/forecasting/base/_fh.py
index 01cbfca4374..ff5341c9610 100644
--- a/sktime/forecasting/base/_fh.py
+++ b/sktime/forecasting/base/_fh.py
@@ -870,6 +870,12 @@ def _to_absolute(fh: ForecastingHorizon, cutoff) -> ForecastingHorizon:
_check_cutoff(cutoff, relativ... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
scikit-learn__scikit-learn-19390@5c42856 | scikit-learn/scikit-learn | Python | 19,390 | API deprecate default of `min_samples` for `RANSACRegressor` | <!--
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
-->
#### Reference Issues/PRs
<!--
Example: Fixes #1234. See also #3456.
Please use keywords (e.g., Fixes) to create link to th... | 2021-02-07T09:53:43Z | Better default min_samples for RANSACRegressor?
`min_samples` is set by default to be `n_features+1`
This fails when `n_features + 1` > `n_samples`, since at every iteration `min_samples` iteration is required.
I don't really know what a better default would be for this case would be | cc @ahojnnes
@MechCoder I would raise a ValueError in this case with a meaningful message.
> @MechCoder I would raise a ValueError in this case with a meaningful message.
I think that we need a better default, because the user would be getting
an error message on a parameter that he did not set.
What is the rationa... | [
{
"body": "`min_samples` is set by default to be `n_features+1`\n\nThis fails when `n_features + 1` > `n_samples`, since at every iteration `min_samples` iteration is required.\n\nI don't really know what a better default would be for this case would be\n",
"number": 6437,
"title": "Better default min_s... | 83398f4470373adaf232e96c377cf025d626a9b3 | {
"head_commit": "5c428561ceba76370c4ea6f263f44e961e145865",
"head_commit_message": "Update sklearn/linear_model/_ransac.py\n\nCo-authored-by: Julien Jerphanion <git@jjerphan.xyz>",
"patch_to_review": "diff --git a/doc/whats_new/v1.0.rst b/doc/whats_new/v1.0.rst\nindex 3b23360fe60c4..6b407ce97e0f7 100644\n--- a/d... | [
{
"diff_hunk": "@@ -289,7 +298,15 @@ def fit(self, X, y, sample_weight=None):\n base_estimator = LinearRegression()\n \n if self.min_samples is None:\n- # assume linear model by default\n+ if not isinstance(base_estimator, LinearRegression):\n+ # FIXME: i... | 049cbcd22c1a8e654f5e389678ee8dbcd3b8c344 | diff --git a/doc/whats_new/v1.0.rst b/doc/whats_new/v1.0.rst
index 3b23360fe60c4..8707779c9dd14 100644
--- a/doc/whats_new/v1.0.rst
+++ b/doc/whats_new/v1.0.rst
@@ -417,6 +417,11 @@ Changelog
- |Enhancement| Validate user-supplied gram matrix passed to linear models
via the `precompute` argument. :pr:`19004` by :us... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
sqlfluff__sqlfluff-1553@2ad63e7 | sqlfluff/sqlfluff | Python | 1,553 | TSQL - BEGIN/END blocks | ### Brief summary of the change made
Fixes #1555
Adding BEGIN/END blocks to TSQL. This will improve our parsing of stored procedures, and lay the foundation for properly parsing IF/ELSE statements and functions.
In order to support BEGIN/END blocks, I'm introducing a new segment called the BatchSegment. A batc... | 2021-10-07T21:16:42Z | TSQL: Incorrect indent in if block
Example code:
```sql
if @debug = 1
begin
print '<something>';
print '<something else>';
return
end
```
## Expected Behaviour
The indentation is correct like this.
## Observed Behaviour
The third line (`print '<something else>';`) is de-indented to the s... | [
{
"body": "Example code:\r\n```sql\r\nif @debug = 1\r\n begin\r\n print '<something>';\r\n print '<something else>';\r\n return\r\n end\r\n```\r\n\r\n## Expected Behaviour\r\nThe indentation is correct like this.\r\n\r\n## Observed Behaviour\r\nThe third line (`print '<something else>';`) is de-inden... | 304a197829f98e7425a46d872ada73176137e5ae | {
"head_commit": "2ad63e7e2a4697c5299c94cb799ed252f72d7179",
"head_commit_message": "BEGIN/END",
"patch_to_review": "diff --git a/src/sqlfluff/dialects/dialect_tsql.py b/src/sqlfluff/dialects/dialect_tsql.py\nindex 2fada2a91e2..6cfa44027a3 100644\n--- a/src/sqlfluff/dialects/dialect_tsql.py\n+++ b/src/sqlfluff/di... | [
{
"diff_hunk": "@@ -65,11 +67,7 @@\n tsql_dialect.replace(\n # Below delimiterstatement might need to be removed in the future as delimiting\n # is optional with semicolon and GO is a end of statement indicator.",
"line": null,
"original_line": 69,
"original_start_line": 68,
"path": "src... | e22b721561627784046357b9f4045ddb28966bda | diff --git a/src/sqlfluff/dialects/dialect_tsql.py b/src/sqlfluff/dialects/dialect_tsql.py
index 2fada2a91e2..594bef161db 100644
--- a/src/sqlfluff/dialects/dialect_tsql.py
+++ b/src/sqlfluff/dialects/dialect_tsql.py
@@ -21,6 +21,8 @@
OptionallyBracketed,
Dedent,
AnyNumberOf,
+ BaseFileSegment,
+ I... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "Code Style, Linting, Formatting Fixes"
} | |
scikit-learn__scikit-learn-19438@82fa07b | scikit-learn/scikit-learn | Python | 19,438 | ENH kind accept a list of str in plot_partial_dependence | closes #19305
This PR proposes that:
* `kind` supports a list of str of the same length as `features` to specify different PD plots for each axis.
* When a `kind="both"` and a 2-way partial dependence is requested in feature, a warning is raised instead of not making any plot. The warning will stipulate to pass... | 2021-02-11T17:26:49Z | Limitation of ICE when required for 1D and 2D interactions
The following code requested to display ICE will fail:
```python
features = ["EDUCATION", "AGE", ("EDUCATION", "AGE")]
fig, ax = plt.subplots(figsize=(15, 5))
_ = plot_partial_dependence(
model.named_steps['histgradientboostingregressor'],
X_tra... | I would be okay with no warning and document that the 2d interactions do not have ICE.
I would warn (to educate users that 2-way ICEs are impossible to render in a 2d plot) and also allow for `kind` to be a list of strings. But no strong opinion. Either way, I agree we should document this.
take
> I would warn (to educ... | [
{
"body": "The following code requested to display ICE will fail:\r\n\r\n```python\r\nfeatures = [\"EDUCATION\", \"AGE\", (\"EDUCATION\", \"AGE\")]\r\nfig, ax = plt.subplots(figsize=(15, 5))\r\n_ = plot_partial_dependence(\r\n model.named_steps['histgradientboostingregressor'],\r\n X_train_preprocessed, f... | dbcd4d5f391f903e7df16607a0ef246c6c5b2cc8 | {
"head_commit": "82fa07bc7bbbe1291704fd971985c92ab15929a1",
"head_commit_message": "TST",
"patch_to_review": "diff --git a/doc/whats_new/v1.1.rst b/doc/whats_new/v1.1.rst\nindex f755aeba20030..0599141300de7 100644\n--- a/doc/whats_new/v1.1.rst\n+++ b/doc/whats_new/v1.1.rst\n@@ -113,10 +113,10 @@ Changelog\n \n -... | [
{
"diff_hunk": "@@ -232,18 +232,37 @@ def plot_partial_dependence(\n \n .. versionadded:: 0.22\n \n- kind : {'average', 'individual', 'both'}, default='average'\n+ kind : {'average', 'individual', 'both'} or list of such str, \\\n+ default='average'\n Whether to plot the partial... | 937244da30dc1e5c12fc54b0e89d4d69d452933e | diff --git a/doc/whats_new/v1.1.rst b/doc/whats_new/v1.1.rst
index 634ab0a01300c..91aa2a2859fd8 100644
--- a/doc/whats_new/v1.1.rst
+++ b/doc/whats_new/v1.1.rst
@@ -435,6 +435,16 @@ Changelog
`max_iter` and `tol`.
:pr:`21341` by :user:`Arturo Amor <ArturoAmorQ>`.
+:mod:`sklearn.inspection`
+....................... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
sqlfluff__sqlfluff-1524@ef41132 | sqlfluff/sqlfluff | Python | 1,524 | Support Double Precision in ANSI | ### Brief summary of the change made
Fixes #1523
### Are there any other side effects of this change that we should be aware of?
Nope. This was already supported in a similar fashion in Exasol.
### Pull Request checklist
- [x] Please confirm you have completed any of the necessary steps below.
- Included t... | 2021-10-06T18:48:57Z | sqlfluff 0.6.8 fails on 'double precision' in CREATE TABLE
_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._
## Expected Behaviour
I'm a new user of sqlfl... | [
{
"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._\r\n\r\n## Expected Behaviour\r\n\r\nI'm a new user of sqlfluff but I'm excited to try it on... | 46188cf0d8cb1cb69888373280b8d83d29eb834d | {
"head_commit": "ef4113295ad48d3204cf5a6e975351c2a68c60f4",
"head_commit_message": "Support Double Precision in ANSI",
"patch_to_review": "diff --git a/src/sqlfluff/dialects/dialect_ansi.py b/src/sqlfluff/dialects/dialect_ansi.py\nindex 1c5ec425a44..2ccf3c5d7da 100644\n--- a/src/sqlfluff/dialects/dialect_ansi.py... | [
{
"diff_hunk": "@@ -547,6 +547,7 @@ class DatatypeSegment(BaseSegment):\n Bracketed(Ref(\"NumericLiteralSegment\"), optional=True),\n Sequence(OneOf(\"WITH\", \"WITHOUT\"), \"TIME\", \"ZONE\", optional=True),\n ),\n+ Sequence(\"DOUBLE\", Sequence(\"PRECISION\", optional=Tr... | 1aa8b25d730c2b49de027a5ccdce7200f6e27fd0 | diff --git a/src/sqlfluff/dialects/dialect_ansi.py b/src/sqlfluff/dialects/dialect_ansi.py
index 1c5ec425a44..4f3e89ab8f8 100644
--- a/src/sqlfluff/dialects/dialect_ansi.py
+++ b/src/sqlfluff/dialects/dialect_ansi.py
@@ -547,6 +547,10 @@ class DatatypeSegment(BaseSegment):
Bracketed(Ref("NumericLiteralSegm... | {
"difficulty": "low",
"estimated_review_effort": 2,
"problem_domain": "Bug Fixes"
} | |
sktime__sktime-5597@30e5135 | sktime/sktime | Python | 5,597 | [ENH] Add `fit_kwargs` to Prophet | <!--
Welcome to sktime, and thanks for contributing!
Please have a look at our contribution guide:
https://www.sktime.net/en/latest/get_involved/contributing.html
-->
#### Reference Issues/PRs
<!--
Example: Fixes #1234. See also #3456.
Please use keywords (e.g., Fixes) to create link to the issues or pull r... | 2023-12-02T18:10:51Z | [ENH] Pass `pmdarima` and `prophet` models' `fit_params` to constructor
Native (not `sktime`) `pmdarima` models `ARIMA` and `AutoARIMA`, and `Prophet` (in`prophet`, not `sktime`) have some parameters which can be passed via `fit_params` (natively in `pmdarima` or `prophet`).
Users should be able to pass those paramete... | Can I work on this issue @fkiraly ?
@Ris-Bali yes pls 🙂
FYI @jasminelaw, duplicate of your #3687.
Contributions appreciated!
@fkiraly I would like to pick this up for the Prophet model. How would you like the interface to look like? I was thinking that a `fit_kwargs` would work best here since these parameters can ... | [
{
"body": "Native (not `sktime`) `pmdarima` models `ARIMA` and `AutoARIMA`, and `Prophet` (in`prophet`, not `sktime`) have some parameters which can be passed via `fit_params` (natively in `pmdarima` or `prophet`).\r\nUsers should be able to pass those parameters through the constructor of the `sktime` interfac... | df21a0c0275ebf28deb30efac5d469c9f0d178e3 | {
"head_commit": "30e5135faa37543a10206eb3d948a0f25cf5116a",
"head_commit_message": "Add `fit_kwargs` to `get_test_params`",
"patch_to_review": "diff --git a/sktime/forecasting/base/adapters/_fbprophet.py b/sktime/forecasting/base/adapters/_fbprophet.py\nindex acfd91f4707..79ac65bf044 100644\n--- a/sktime/forecas... | [
{
"diff_hunk": "@@ -138,6 +140,7 @@ def __init__(\n freq=None,\n add_seasonality=None,\n add_country_holidays=None,\n+ fit_kwargs=None,",
"line": null,
"original_line": 143,
"original_start_line": null,
"path": "sktime/forecasting/fbprophet.py",
"start_line": n... | 1ffa1701507d3624e8c72db59926e032d42ccd3d | diff --git a/sktime/forecasting/base/adapters/_fbprophet.py b/sktime/forecasting/base/adapters/_fbprophet.py
index acfd91f4707..79ac65bf044 100644
--- a/sktime/forecasting/base/adapters/_fbprophet.py
+++ b/sktime/forecasting/base/adapters/_fbprophet.py
@@ -116,11 +116,12 @@ def _fit(self, y, X, fh):
df["ca... | {
"difficulty": "low",
"estimated_review_effort": 3,
"problem_domain": "New Feature Additions"
} |
scikit-learn__scikit-learn-19568@ab70ffd | scikit-learn/scikit-learn | Python | 19,568 | Sequential feature selection - unsupervised learning | <!--
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
-->
#### Reference Issues/PRs
Fixes #19538 .
<!--
Example: Fixes #1234. See also #3456.
Please use keywords (e.g., Fixes) to c... | 2021-02-26T03:54:36Z | Sequential forward selection - unsupervised fit_transform bug
#### Describe the bug
<!--
A clear and concise description of what the bug is.
-->
When trying to use Sequential Forward Selection in a unsupervised setting with no target labels y an error results when trying to follow the documentation
Example:
... | I agree, `SequentialFeatureSelector` is validating `y` when it need not place any constraints or validation on `y`, including allowing it to be None.
A pull request fixing this is very welcome. It would require an update to the docstrings, tests, `fit` signature and call to `_validate_data`.
Can I take this issue? C... | [
{
"body": "\r\n\r\n#### Describe the bug\r\n<!--\r\nA clear and concise description of what the bug is.\r\n-->\r\nWhen trying to use Sequential Forward Selection in a unsupervised setting with no target labels y an error results when trying to follow the documentation\r\n\r\nExample:\r\n```python\r\nfrom sklear... | 44c40b35d061a6b0408c172a7b0eeeacc13b4c80 | {
"head_commit": "ab70ffd810e50d7cf722e59e6708a4a43ed842dd",
"head_commit_message": "test file lint fix",
"patch_to_review": "diff --git a/doc/whats_new/v1.0.rst b/doc/whats_new/v1.0.rst\nindex 3e36438dda095..8a8603c90b932 100644\n--- a/doc/whats_new/v1.0.rst\n+++ b/doc/whats_new/v1.0.rst\n@@ -207,6 +207,14 @@ Ch... | [
{
"diff_hunk": "@@ -207,6 +207,14 @@ Changelog\n for non-English characters. :pr:`18959` by :user:`Zero <Zeroto521>`\n and :user:`wstates <wstates>`.\n \n+:mod:`sklearn.feature_selection`\n+.......................",
"line": null,
"original_line": 211,
"original_start_line": 210,
"path": "doc... | c213e3ebfd2ce01e0904ea300a3dcbf0e9a09cf2 | diff --git a/doc/whats_new/v1.0.rst b/doc/whats_new/v1.0.rst
index a5beb23a48d3f..51acb45870ccd 100644
--- a/doc/whats_new/v1.0.rst
+++ b/doc/whats_new/v1.0.rst
@@ -358,6 +358,11 @@ Changelog
`sample_weight` passed by a user were overwritten during the fit.
:pr:`20515` by :user:`Carsten Allefeld <allefeld>`.
+-... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
scikit-learn__scikit-learn-19499@aee83c8 | scikit-learn/scikit-learn | Python | 19,499 | FIX adjust inliner criterion in RANSACRegressor | #### Reference Issues/PRs
Fixes #19497.
Fixes #16147.
#### What does this implement/fix? Explain your changes.
This fix implement solution discussed in #16147:
inlier_mask_subset = residuals_subset <= residual_threshold
that replace the current <
This make the code work also with perfect horizontal lines (... | 2021-02-19T08:44:28Z | RANSAC - residual threshold calculation
Within the RANSAC algorithm, a residual threshold is calculated:
`residual_threshold = np.median(np.abs(y - np.median(y))`
If more than half of the values of y are equal to the median of y, this returns a residual threshold of 0. In that case, the line
`inlier_mask_sub... | ```python
np.median(np.abs(y - np.median(y))
```
is the definition of the Median Absolute Deviation. For the case that you provide the MAD is equal to zero and this is correct.
So I think that we could do several things to improve the estimator:
1. raise a proper error message when we compute the MAD and expla... | [
{
"body": "Within the RANSAC algorithm, a residual threshold is calculated:\r\n\r\n`residual_threshold = np.median(np.abs(y - np.median(y))`\r\n\r\nIf more than half of the values of y are equal to the median of y, this returns a residual threshold of 0. In that case, the line \r\n\r\n`inlier_mask_subset = res... | 6f7ae911f18fda59669309582706f1aa1f36374d | {
"head_commit": "aee83c8da4f7e15b7a43021cfc6055b801272106",
"head_commit_message": "Merge branch 'main' of https://github.com/scikit-learn/scikit-learn into bugfix_ransac_residual_threshold",
"patch_to_review": "diff --git a/doc/modules/linear_model.rst b/doc/modules/linear_model.rst\nindex f1f376dc641c9..7ed8cb... | [
{
"diff_hunk": "@@ -95,7 +95,8 @@ class RANSACRegressor(MetaEstimatorMixin, RegressorMixin,\n residual_threshold : float, default=None\n Maximum residual for a data sample to be classified as an inlier.\n By default the threshold is chosen as the MAD (median absolute\n- deviation) of ... | 2e6c428986a253fab79aba8b5ee6b97228a10576 | diff --git a/doc/modules/linear_model.rst b/doc/modules/linear_model.rst
index 762a2a9ef74be..fcc8ed5437ad4 100644
--- a/doc/modules/linear_model.rst
+++ b/doc/modules/linear_model.rst
@@ -1265,8 +1265,8 @@ Each iteration performs the following steps:
whether the estimated model is valid (see ``is_model_valid``).
... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
scikit-learn__scikit-learn-19356@b7ecc50 | scikit-learn/scikit-learn | Python | 19,356 | FIX Adds check_array to inverse_transform of StandardScaler | Reference Issues/PRs
Fixes #19354
What does this implement/fix? Explain your changes.
This PR checks the input array of the `inverse_transform` function of the StandardScaler similar like its done in the MinMaxScaler.
| 2021-02-05T15:24:19Z | Input format for StandardScaler
#### Describe the issue linked to the documentation
In the documentation the input array for the StandardScaler is given by:
scale_ndarray of shape (n_features,) or None
I have the following example where I transform an int array and a float array:
```
from sklearn.preprocessing i... | The output of `preprocess_fn.transform` is a float array:
```py
from sklearn.preprocessing import StandardScaler
import numpy as np
x = np.array([
[1, 1, 1, 0, 1, 0],
[1, 1, 1, 0, 1, 0],
[0, 8, 0, 1, 0, 0],
[1, 4, 1, 1, 0, 0],
[0, 1, 0, 0, 1, 0],
[0, 4, 0, 1, 0, 1]])
preprocess_fn=StandardScaler(... | [
{
"body": "#### Describe the issue linked to the documentation\r\nIn the documentation the input array for the StandardScaler is given by:\r\nscale_ndarray of shape (n_features,) or None\r\nI have the following example where I transform an int array and a float array:\r\n\r\n```\r\nfrom sklearn.preprocessing im... | e23dd851476ef54c2153d6178500a3e2345f95b4 | {
"head_commit": "b7ecc5017b52a0f9a7a6f41ec6f7fa3c88f2c20f",
"head_commit_message": "add check_array to inverse_transform of StandardScaler",
"patch_to_review": "diff --git a/sklearn/preprocessing/_data.py b/sklearn/preprocessing/_data.py\nindex 5814875e04bff..a1cf54d4ff445 100644\n--- a/sklearn/preprocessing/_da... | [
{
"diff_hunk": "@@ -917,6 +917,9 @@ def inverse_transform(self, X, copy=None):\n check_is_fitted(self)\n \n copy = copy if copy is not None else self.copy\n+ X = check_array(X, accept_sparse='csr', copy=self.copy, ",
"line": null,
"original_line": 920,
"original_start_line": n... | f1fde5823875474b80ead44eca9cd0668c95147d | diff --git a/doc/whats_new/v1.0.rst b/doc/whats_new/v1.0.rst
index 25e0b369bebd3..b3c5c12f1c980 100644
--- a/doc/whats_new/v1.0.rst
+++ b/doc/whats_new/v1.0.rst
@@ -187,6 +187,9 @@ Changelog
positioning strategy ``knots``.
:pr:`18368` by :user:`Christian Lorentzen <lorentzenchr>`.
+- |Fix| :meth:`preprocessing.... | {
"difficulty": "low",
"estimated_review_effort": 2,
"problem_domain": "Documentation Updates"
} |
sqlfluff__sqlfluff-1504@8c19251 | sqlfluff/sqlfluff | Python | 1,504 | Disable rules L026 and L028 for BigQuery by default, with option to reenable | ### Brief summary of the change made
Fixes #1503
### Are there any other side effects of this change that we should be aware of?
Rules L026 and L028 will now be disabled by default for BigQuery which technically is a breaking change. However I suspect most BigQuery users will have already disabled these in config... | 2021-10-04T10:59:37Z | L026 error while using bigquery nested field
Consider the following sql:
```sql
WITH commit_info AS (
SELECT
commit,
author.name AS author_name
FROM `bigquery-public-data.github_repos.commits`
LIMIT 10
)
SELECT * FROM commit_info
```
## Expected Behaviour
Lint should not fa... | I use BigQuery a lot and to be honest I turn off L026 in my `.sqlfluff` config as don't think this rule useful for BigQuery.
Perhaps there's a case to be made to exclude BigQuery from this rule by default? We did a similar change for another rule for postgres in #1482 but that would mean no BigQuery user can benefit... | [
{
"body": "Consider the following sql:\r\n\r\n```sql\r\nWITH commit_info AS (\r\n SELECT\r\n commit,\r\n author.name AS author_name\r\n FROM `bigquery-public-data.github_repos.commits`\r\n LIMIT 10\r\n)\r\n\r\nSELECT * FROM commit_info\r\n```\r\n\r\n## Expected Behaviour\r\nLint should no... | fa4e1d0d1d4626abae610dbc2925b1568fc43820 | {
"head_commit": "8c19251e7e67ff7607ce9d6a60a773c4da815f40",
"head_commit_message": "Add extra docs for rule L033",
"patch_to_review": "diff --git a/src/sqlfluff/core/default_config.cfg b/src/sqlfluff/core/default_config.cfg\nindex e85fde9da9a..75c19a9b595 100644\n--- a/src/sqlfluff/core/default_config.cfg\n+++ b... | [
{
"diff_hunk": "@@ -39,4 +45,38 @@ test_pass_object_referenced_4:\n FROM `example_dataset2.example_table2` AS et2\n configs:\n core:\n- dialect: bigquery\n\\ No newline at end of file\n+ dialect: bigquery\n+ rules:\n+ L026:\n+ force_enable: True\n+\n+test_pass_object_reference... | 1c6ec0815a60056d52e2cd2bb98cd977f7302beb | diff --git a/src/sqlfluff/core/default_config.cfg b/src/sqlfluff/core/default_config.cfg
index e85fde9da9a..75c19a9b595 100644
--- a/src/sqlfluff/core/default_config.cfg
+++ b/src/sqlfluff/core/default_config.cfg
@@ -66,6 +66,12 @@ extended_capitalisation_policy = consistent
[sqlfluff:rules:L016]
ignore_comment_lines... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Code Style, Linting, Formatting Fixes"
} |
scikit-learn__scikit-learn-19391@0898bd6 | scikit-learn/scikit-learn | Python | 19,391 | FIX raise error when enet_path and lasso_path receive unknown parameters | <!--
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
-->
#### Reference Issues/PRs
<!--
Example: Fixes #1234. See also #3456.
Please use keywords (e.g., Fixes) to create link to th... | 2021-02-07T11:23:01Z | enet_path does not pass params to coordinate descent solver
`params` parameter to `enet_path` is documented as "keyword arguments passed to the coordinate descent solver." Rather they are processed in `enet_path` and not directly passed anywhere. Thus currently one can pass arbitrary keyword arguments to `enet_path` wi... | Can I take this? A tip to get me going would be nice though. Will try to finish within 1 week.
Basically we need to raise an error if excess parents are passed.
Hint: If instead of using params.get you use params.pop, any excess parameters will be easy to see.
Hello! @jnothman and @kkang2097 could I help with that?
... | [
{
"body": "`params` parameter to `enet_path` is documented as \"keyword arguments passed to the coordinate descent solver.\" Rather they are processed in `enet_path` and not directly passed anywhere. Thus currently one can pass arbitrary keyword arguments to `enet_path` without error (for instance I accidentall... | 6b2d5a973a0b35453bb163fda72930dc4791945e | {
"head_commit": "0898bd6c1f84a39f73eacf5b699405469bbb0c2a",
"head_commit_message": "Flake8",
"patch_to_review": "diff --git a/sklearn/linear_model/_coordinate_descent.py b/sklearn/linear_model/_coordinate_descent.py\nindex ea1216c0b55f0..ebdca9aa32ffe 100644\n--- a/sklearn/linear_model/_coordinate_descent.py\n++... | [
{
"diff_hunk": "@@ -435,6 +435,18 @@ def enet_path(X, y, *, l1_ratio=0.5, eps=1e-3, n_alphas=100, alphas=None,\n :ref:`examples/linear_model/plot_lasso_coordinate_descent_path.py\n <sphx_glr_auto_examples_linear_model_plot_lasso_coordinate_descent_path.py>`.\n \"\"\"\n+ X_offset_param = params.po... | 405734ae8aac4200159d321ac72dfbc5b45e07f7 | diff --git a/doc/whats_new/v1.0.rst b/doc/whats_new/v1.0.rst
index 7f44c62eb7329..f435988fc3297 100644
--- a/doc/whats_new/v1.0.rst
+++ b/doc/whats_new/v1.0.rst
@@ -492,6 +492,11 @@ Changelog
(only supported by `lbfgs`).
:pr:`20231` by :user:`Toshihiro Nakae <tnakae>`.
+- |Fix| The dictionary `params` in :func:... | {
"difficulty": "low",
"estimated_review_effort": 2,
"problem_domain": "Bug Fixes"
} |
scikit-learn__scikit-learn-19308@004db52 | scikit-learn/scikit-learn | Python | 19,308 | FIX MultiOutputRegressor correctly ducktypes fitted estimators | <!--
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
-->
#### Reference Issues/PRs
<!--
Example: Fixes #1234. See also #3456.
Please use keywords (e.g., Fixes) to create link to th... | 2021-01-31T02:23:05Z | Issue with predict function of MultiOutputRegressor when used with StackingRegressor
<!--
Before submitting a bug, please make sure the issue hasn't been already
addressed by searching through the past issues.
-->
#### Describe the bug
An error is raised when I was trying to use MultiOutputRegressor along with S... | Please provide a complete, runnable code snippet that reproduces the error.
A reproducible example:
```python
from sklearn.datasets import load_linnerud
from sklearn.ensemble import ExtraTreesRegressor
from sklearn.ensemble import StackingRegressor
from sklearn.multioutput import MultiOutputRegressor
X, y = l... | [
{
"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\nAn error is raised when I was trying to use MultiOutputRegressor along with StackingRegressor.\r\n\r\n```pytb\r\nValueError ... | 9cfacf1540a991461b91617c779c69753a1ee4c0 | {
"head_commit": "004db5278cc39412c7071fe296fd6c59a0c21fff",
"head_commit_message": "Merge remote-tracking branch 'upstream/main' into multiouputregressor_predict",
"patch_to_review": "diff --git a/doc/whats_new/v0.24.rst b/doc/whats_new/v0.24.rst\nindex f549b31f51aa7..20ccbef056edc 100644\n--- a/doc/whats_new/v0... | [
{
"diff_hunk": "@@ -20,6 +20,13 @@ Changelog\n `'use_encoded_value'` strategies.\n :pr:`19234` by `Guillaume Lemaitre <glemaitre>`.\n \n+:mod:`sklearn.multioutput`\n+..........................\n+\n+- |Fix| :class:`multioutput.MultiOutputRegressor` now works with estimators\n+ that dynamically define `predi... | 4b38c7088d223425f2799ed7bedb99f445dba070 | diff --git a/doc/whats_new/v0.24.rst b/doc/whats_new/v0.24.rst
index 68ea8ba0f7a72..2cfe6970dd7b1 100644
--- a/doc/whats_new/v0.24.rst
+++ b/doc/whats_new/v0.24.rst
@@ -48,6 +48,13 @@ Changelog
`'use_encoded_value'` strategies.
:pr:`19234` by `Guillaume Lemaitre <glemaitre>`.
+:mod:`sklearn.multioutput`
+......... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
scikit-learn__scikit-learn-19234@9a39c24 | scikit-learn/scikit-learn | Python | 19,234 | FIX validate handle_unkown strategies in OrdinalEncoder | closes #19228
Check the strategy passed to `handle_unknown` in `OrdinalEncoder`. | 2021-01-21T18:33:46Z | OrdinalEncoder does not check the input of handle_unknown
During a lecture today, the following was working:
```python
from sklearn.preprocessing import OrdinalEncoder
enc = OrdinalEncoder(handle_unknown="ignore")
X = [['Male', 1], ['Female', 3], ['Female', 2]]
enc.fit_transform(X)
```
```
array([[1., 0.]... | [
{
"body": "During a lecture today, the following was working:\r\n\r\n```python\r\nfrom sklearn.preprocessing import OrdinalEncoder\r\n\r\nenc = OrdinalEncoder(handle_unknown=\"ignore\")\r\nX = [['Male', 1], ['Female', 3], ['Female', 2]]\r\nenc.fit_transform(X)\r\n```\r\n\r\n```\r\narray([[1., 0.],\r\n [0.... | 4db51e6cbc1639f2e08059bc625bdd0c16f03a78 | {
"head_commit": "9a39c2436b9dfa7f299d15915295b89a6290f5b6",
"head_commit_message": "pr number",
"patch_to_review": "diff --git a/doc/whats_new/v0.24.rst b/doc/whats_new/v0.24.rst\nindex ffa6fe96ec3c5..f549b31f51aa7 100644\n--- a/doc/whats_new/v0.24.rst\n+++ b/doc/whats_new/v0.24.rst\n@@ -2,6 +2,24 @@\n \n .. cur... | [
{
"diff_hunk": "@@ -624,33 +624,48 @@ def test_ordinal_encoder_handle_unknowns_numeric(dtype):\n assert_array_equal(X_trans_inv, inv_exp)\n \n \n-def test_ordinal_encoder_handle_unknowns_raise():\n+@pytest.mark.parametrize(\n+ \"params, err_type, err_msg\",\n+ [\n+ (\n+ {\"handle_unk... | f0e688d884cab5160c60ffea29a4b2e94f302fb6 | diff --git a/doc/whats_new/v0.24.rst b/doc/whats_new/v0.24.rst
index ffa6fe96ec3c5..f549b31f51aa7 100644
--- a/doc/whats_new/v0.24.rst
+++ b/doc/whats_new/v0.24.rst
@@ -2,6 +2,24 @@
.. currentmodule:: sklearn
+.. _changes_0_24_2:
+
+Version 0.24.2
+==============
+
+**TBD 2021**
+
+Changelog
+---------
+
+:mod:`sk... | {
"difficulty": "low",
"estimated_review_effort": 2,
"problem_domain": "Bug Fixes"
} | |
sktime__sktime-5607@c3aa8b4 | sktime/sktime | Python | 5,607 | num_epochs renamed to n_epochs in SimpleRNNClassifier and SimpleRNNRegressor |
#### Reference Issues/PRs
Fixes #5485
#### What does this implement/fix? Explain your changes.
I have renamed num_epoches to n_epoches in sktime/classification/deep_learning/rnn.py and sktime/regression/deep_learning/rnn.py.
| 2023-12-07T15:59:16Z | [ENH] `num_epochs` should be renamed to `n_epochs` in `SimpleRNNClassifier` and `SimpleRNNRegressor`
Currently, we take `n_epochs` in all other estimators within the `deep_learning` subpackage with the exception of `SimpleRNNClassifier`. This inconsistency should be addressed with a deprecation of the usage of `num_epo... | agree.
Not a bug though, I would classify this as an enhancement.
Plus, we should do the same for the regressor.
Is this issue open, Can you assign it to me ?
Done! Welcome to sktime :)
Feel free to ask for help if you feel stuck. Thanks | [
{
"body": "Currently, we take `n_epochs` in all other estimators within the `deep_learning` subpackage with the exception of `SimpleRNNClassifier`. This inconsistency should be addressed with a deprecation of the usage of `num_epochs` in favor of `n_epochs`.",
"number": 5485,
"title": "[ENH] `num_epochs... | 7abfa1b099102dc8d6f8ab29de5d9bab435a400d | {
"head_commit": "c3aa8b43354c52966d9917077c26f715bf6106fb",
"head_commit_message": "Update rnn.py",
"patch_to_review": "diff --git a/sktime/classification/deep_learning/rnn.py b/sktime/classification/deep_learning/rnn.py\nindex cbac0badb9d..de7ac1dae09 100644\n--- a/sktime/classification/deep_learning/rnn.py\n++... | [
{
"diff_hunk": "@@ -63,10 +63,19 @@ def __init__(\n activation=\"sigmoid\",\n use_bias=True,\n optimizer=None,\n+ n_epochs=100,\n ):\n _check_dl_dependencies(severity=\"error\")\n super().__init__()\n- self.num_epochs = num_epochs\n+ # Deprecated ... | b2c2351e8a8ee9cf7decc433756cd404801461cf | diff --git a/sktime/classification/deep_learning/rnn.py b/sktime/classification/deep_learning/rnn.py
index cbac0badb9d..369ab4c0efa 100644
--- a/sktime/classification/deep_learning/rnn.py
+++ b/sktime/classification/deep_learning/rnn.py
@@ -11,8 +11,13 @@
from sktime.classification.deep_learning.base import BaseDeepCl... | {
"difficulty": "low",
"estimated_review_effort": 2,
"problem_domain": "Code Refactoring / Architectural Improvement"
} |
sktime__sktime-5398@120fff9 | sktime/sktime | Python | 5,398 | [ENH] `iisignature` backend option for `SignatureTransformer` | <!--
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 #1591.
This PR also adds an option to choose no augmentation, currently the code returns an error if augme... | 2023-10-11T10:54:54Z | [BUG] `RuntimeError` when `SignatureTransformer` is run on large datasets
SignatureTransformer throws a RuntimeError when calling fit on the DuckDuckGeese dataset. I assume this is an issue with the number of dimensions?
```
File "E:\_ProgramFiles\Anaconda3\envs\sktime-workshop-boss\lib\site-packages\esig\backends.... | For some more context, we are running signatures on the whole UEA multivariate archive. I would like to include the method in our future evaluations.
Pinging @jambo6 as they may know more.
This is actually an error thrown by `esig` to help prevent memory errors down the line.
Signature feature dimension increase... | [
{
"body": "SignatureTransformer throws a RuntimeError when calling fit on the DuckDuckGeese dataset. I assume this is an issue with the number of dimensions?\r\n\r\n```\r\nFile \"E:\\_ProgramFiles\\Anaconda3\\envs\\sktime-workshop-boss\\lib\\site-packages\\esig\\backends.py\", line 118, in compute_signature\r\n... | 9aac291934c8090eedb8005c1a139e6879b3941f | {
"head_commit": "120fff943c966e21f42209278375642260dafa67",
"head_commit_message": "responde to requested change, allow the user to specify additional iisignature backend parameters and check for soft-dependency",
"patch_to_review": "diff --git a/.all-contributorsrc b/.all-contributorsrc\nindex 093a48a5fd0..878c... | [
{
"diff_hunk": "@@ -95,6 +95,7 @@ regression = [\n ]\n transformations = [\n \"esig>=0.9.7,<0.10\",\n+ \"iisignature>=0.24\",",
"line": null,
"original_line": 98,
"original_start_line": null,
"path": "pyproject.toml",
"start_line": null,
"text": "@user2:\nI think these should have... | 810413526cc8dad587a41a40e2851381d4af5a12 | diff --git a/.all-contributorsrc b/.all-contributorsrc
index d14d64c52b3..3e1edaf2c4c 100644
--- a/.all-contributorsrc
+++ b/.all-contributorsrc
@@ -2376,6 +2376,15 @@
"code"
]
},
+ {
+ "login": "sz85512678",
+ "name": "Zhen Shao",
+ "avatar_url": "https://avatars.githubuserconten... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "Bug Fixes"
} |
scikit-learn__scikit-learn-19182@ea65b81 | scikit-learn/scikit-learn | Python | 19,182 | Fix sample_weight overwriting bug | <!--
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
-->
#### Reference Issues/PRs
<!--
Example: Fixes #1234. See also #3456.
Please use keywords (e.g., Fixes) to create link to ... | 2021-01-16T11:00:07Z | Use of class_weight dictionary in LogisticRegression modifies sample_weight object
#### Describe the bug
When a dictionary is supplied to keyword argument `class_weight` with unequal weights and `sample_weight` is specified, the sample weight object is modified.
#### Steps/Code to Reproduce
```python
from sklea... | Whoops. We should have a `check_array` that should make a copy if we are going to modify the weights.
@KrisKusano Thanks for the report | [
{
"body": "\r\n#### Describe the bug\r\nWhen a dictionary is supplied to keyword argument `class_weight` with unequal weights and `sample_weight` is specified, the sample weight object is modified.\r\n\r\n#### Steps/Code to Reproduce\r\n```python\r\nfrom sklearn.datasets import load_iris\r\nfrom sklearn.linear_... | 0aee596bb32136df8c68371d696770251c7d14a0 | {
"head_commit": "ea65b81734ef631b6f558afd1a59ab0c9162f5b7",
"head_commit_message": "Change the default copy param from False to True",
"patch_to_review": "diff --git a/sklearn/linear_model/tests/test_logistic.py b/sklearn/linear_model/tests/test_logistic.py\nindex 480472504a92b..0c91ddce290fb 100644\n--- a/sklea... | [
{
"diff_hunk": "@@ -1869,3 +1869,28 @@ def test_multinomial_identifiability_on_iris(fit_intercept):\n assert_allclose(clf.coef_.sum(axis=0), 0, atol=1e-10)\n if fit_intercept:\n clf.intercept_.sum(axis=0) == pytest.approx(0, abs=1e-15)\n+\n+\n+@pytest.mark.parametrize(\"multi_class\", {'ovr', 'm... | 5bf8bb04780140a1ae42d33839a23b6ef226e457 | diff --git a/doc/whats_new/v1.0.rst b/doc/whats_new/v1.0.rst
index a00523ec2223b..2cef882dac513 100644
--- a/doc/whats_new/v1.0.rst
+++ b/doc/whats_new/v1.0.rst
@@ -89,6 +89,10 @@ Changelog
not corresponding to their objective. :pr:`19172` by
:user:`Mathurin Massias <mathurinm>`
+- |Fix|: Fixed a bug in :class:... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
saltstack__salt-60217@d950e1f | saltstack/salt | Python | 60,217 | Fixing rabbitmq.list_user_permissions |
### What does this PR do?
Fixing rabbitmq.list_user_permissions to ensure we are returning a permission list with three elements even when some values are empty.
### What issues does this PR fix or reference?
Fixes: #49115
### Merge requirements satisfied?
**[NOTICE] Bug fixes or features added to Salt requi... | 2021-05-19T22:22:16Z | 'rabbitmq_user.present' always report changes when read permisson is empty
### Description of Issue/Question
The state 'salt.states.rabbitmq_user' always report changes when the read permission is set to empty for a user.
### Setup
```
rabbit_user:
rabbitmq_user.present:
- name: user
- password: pa... | @polak785 thanks for the report.
Hello,
Any update on this bug?
We still have it on Salt 3002.1 and with RabbitMQ 3.8.9
@polak785 Apologies for the delay on this one. The issue is that when only two permissions are specified in the initial state run and the third is left as an empty string, on the second run th... | [
{
"body": "### Description of Issue/Question\r\n\r\nThe state 'salt.states.rabbitmq_user' always report changes when the read permission is set to empty for a user.\r\n\r\n### Setup\r\n```\r\nrabbit_user:\r\n rabbitmq_user.present:\r\n - name: user\r\n - password: password\r\n - perms:\r\n - 'tes... | 5b8ca47bb0ed14365db662a535001588c70e403e | {
"head_commit": "d950e1f72da897cecf1f4dd294590de5d1dd66ad",
"head_commit_message": "removing debugging lines.",
"patch_to_review": "diff --git a/changelog/49115.fixed b/changelog/49115.fixed\nnew file mode 100644\nindex 000000000000..30ebe3c585c0\n--- /dev/null\n+++ b/changelog/49115.fixed\n@@ -0,0 +1,2 @@\n+\n+... | [
{
"diff_hunk": "@@ -0,0 +1,116 @@\n+import logging\n+import time\n+\n+import attr\n+import pytest\n+from saltfactories.daemons.container import Container\n+from saltfactories.utils import random_string\n+from saltfactories.utils.ports import get_unused_localhost_port\n+\n+docker = pytest.importorskip(\"docker\"... | 555d641a55f1ed457198e7e401364daf597bedd2 | diff --git a/changelog/49115.fixed b/changelog/49115.fixed
new file mode 100644
index 000000000000..b6e3aeafa420
--- /dev/null
+++ b/changelog/49115.fixed
@@ -0,0 +1 @@
+Fixing rabbitmq.list_user_permissions to ensure we are returning a permission list with three elements even when some values are empty.
diff --git a/s... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
scikit-learn__scikit-learn-19159@d9767cc | scikit-learn/scikit-learn | Python | 19,159 | Dictionary Learning: transform_alpha default equal to alpha | …ctionaryLearning
<!--
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
-->
#### Reference Issues/PRs
<!--
Example: Fixes #1234. See also #3456.
Please use keywords (e.g., Fixe... | 2021-01-12T15:32:54Z | Dictionary Learning: transform_alpha default is not equal to alpha ?
Hello,
I recently noticed that the parameter `transform_alpha` in `sklearn.decomposition.DictionaryLearning` has a default value equal to 1.0 and not equal to `alpha` (the main regularization parameter). I think it can be misleading, because we ex... | I agree it's a bit confusing. However the default transform algorithm ('omp') is different from the default fit_algorithm ('lars' but it's actually lasso_lars) and the regularization is not the same. For 'omp' it's controlled by ``transform_n_nonzero_coefs``.
The doc could definitely be clearer. Would you be interes... | [
{
"body": "Hello, \r\n\r\nI recently noticed that the parameter `transform_alpha` in `sklearn.decomposition.DictionaryLearning` has a default value equal to 1.0 and not equal to `alpha` (the main regularization parameter). I think it can be misleading, because we expect the sparse code computed by `transform` t... | 69d6378666dc8a4c5b370c05ddc78359149170cd | {
"head_commit": "d9767ccefa56283333e989df3f206da1763e89b2",
"head_commit_message": "Update sklearn/decomposition/_dict_learning.py\n\nCo-authored-by: Jérémie du Boisberranger <34657725+jeremiedbb@users.noreply.github.com>",
"patch_to_review": "diff --git a/sklearn/decomposition/_dict_learning.py b/sklearn/decomp... | [
{
"diff_hunk": "@@ -909,6 +909,9 @@ def _transform(self, X, dictionary):\n SparseCoder.\"\"\"\n X = self._validate_data(X, reset=False)\n \n+ if hasattr(self, \"alpha\") and self.transform_alpha is None:\n+ self.transform_alpha = self.alpha",
"line": null,
"original_lin... | 4f4a7cbf6e0d9f9f37276930ee0ea202197fc56f | diff --git a/doc/whats_new/v1.0.rst b/doc/whats_new/v1.0.rst
index c76d29dd6bd2b..e2534de607924 100644
--- a/doc/whats_new/v1.0.rst
+++ b/doc/whats_new/v1.0.rst
@@ -59,6 +59,16 @@ Changelog
- |API| :class:`cluster.Birch` attributes, `fit_` and `partial_fit_`, are
deprecated and will be removed in 1.2. :pr:`19297` b... | {
"difficulty": "low",
"estimated_review_effort": 2,
"problem_domain": "Documentation Updates"
} |
scikit-learn__scikit-learn-19155@62a5068 | scikit-learn/scikit-learn | Python | 19,155 | CI Add workflow to check Changelog entry. | #### Reference Issues/PRs
Fixes #10451
#### What does this implement/fix? Explain your changes.
Add a github action checking if the pull request is referenced in the changelog together with its author.
#### Any other comments?
Need the creation of a label "no-changelog" for pull requests that do not need to be... | 2021-01-11T21:00:36Z | Have Travis ensure that what's new is updated
Sometimes when PRs are merged I waste time going back to double check that what's new has been updated.
We should make a travis run for PRs only that fails if tests are modified and what's new isn't modified. Perhaps we should even check that the diff to what's new menti... | Since that I am the first one to forget about it, it would be awesome (until the point that I want to kill Travis to throw those errors in addition of the flake8 one :P). Indeed, I am not sure 100% which case we are supposed to do a what's new entry or not.
The flake8 build could serve for such checking I think.
I t... | [
{
"body": "Sometimes when PRs are merged I waste time going back to double check that what's new has been updated.\r\n\r\nWe should make a travis run for PRs only that fails if tests are modified and what's new isn't modified. Perhaps we should even check that the diff to what's new mentions the current PR# (al... | 26c5530e792c1319ddd3335e23d1f36cf90f6c3d | {
"head_commit": "62a506861e9c16348764e5187da6749ac3402312",
"head_commit_message": "More explicit comment and message\n\nCo-authored-by: Nicolas Hug <contact@nicolas-hug.com>",
"patch_to_review": "diff --git a/.github/workflows/check_changelog.yml b/.github/workflows/check_changelog.yml\nnew file mode 100644\nin... | [
{
"diff_hunk": "@@ -0,0 +1,33 @@\n+name: Check Changelog\n+# This check makes sure that the changelog is properly updated\n+# when a PR introduces a change in a test file.\n+# To bypass this check, label the PR with no-changelog.\n+on:\n+ pull_request:\n+\n+jobs:\n+ check:\n+ runs-on: ubuntu-latest\n+ ... | 59c60f60958e84a611cf3f4d1e891979eab954c4 | diff --git a/.github/workflows/check-changelog.yml b/.github/workflows/check-changelog.yml
new file mode 100644
index 0000000000000..7d954c530cff8
--- /dev/null
+++ b/.github/workflows/check-changelog.yml
@@ -0,0 +1,54 @@
+name: Check Changelog
+# This check makes sure that the changelog is properly updated
+# when a P... | {
"difficulty": "low",
"estimated_review_effort": 2,
"problem_domain": "Test Suite / CI Enhancements"
} |
sqlfluff__sqlfluff-1431@13f9c44 | sqlfluff/sqlfluff | Python | 1,431 | Fix some issues where the SQL file is corrupted by lint "fixes" in or near Jinja loops | Fixes #1162, #1425
### Are there any other side effects of this change that we should be aware of?
This PR adds a couple of new internal features to SQLFluff:
* `TemplatedFile` adds a new property, `raw_slice_block_info`, which identifies logical sections of the templated file: e.g. blocks and loops.
* All `Li... | 2021-09-22T12:56:50Z | SQL JINJA IS EXPLODING with sqlfluff fix
-- 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 ... | @jonny-mills: If you run `sqlfluff lint` on this file, are you seeing a parse error? I'm seeing this (note the parse error on line 3):
```
sqlfluff lint test.sql
== [test.sql] FAIL
L: 3 | P: 37 | PRS | Line 5, Position 25: Found unparsable section: ' as
| 1_col\n \n CASE WHEN 2...'
L: ... | [
{
"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 ... | a50454c963ee8d942d2fa60ab2b48eca31ce5175 | {
"head_commit": "13f9c4422689635bd36d01e42d8b0e3411e97647",
"head_commit_message": "Black",
"patch_to_review": "diff --git a/src/sqlfluff/core/linter/linted_dir.py b/src/sqlfluff/core/linter/linted_dir.py\nindex c1492fb0e93..d427b23a512 100644\n--- a/src/sqlfluff/core/linter/linted_dir.py\n+++ b/src/sqlfluff/cor... | [
{
"diff_hunk": "@@ -314,6 +321,21 @@ def fix_string(self) -> Tuple[Any, bool]:\n )\n local_type_list = [slc.slice_type for slc in local_raw_slices]\n \n+ if set(local_raw_slices).intersection(raw_slices_in_template_loop):\n+ # The patch is being applied to a loo... | 78f6b2ddc57cae5e522f0c6cb005908cb39d9473 | diff --git a/src/sqlfluff/core/linter/linted_dir.py b/src/sqlfluff/core/linter/linted_dir.py
index c1492fb0e93..d427b23a512 100644
--- a/src/sqlfluff/core/linter/linted_dir.py
+++ b/src/sqlfluff/core/linter/linted_dir.py
@@ -57,7 +57,7 @@ def check_tuples(self, by_path: bool = False): # pragma: no cover
"""De... | {
"difficulty": "high",
"estimated_review_effort": 4,
"problem_domain": "Bug Fixes"
} |
scikit-learn__scikit-learn-19124@80762cc | scikit-learn/scikit-learn | Python | 19,124 | DOC Update docs for StandardScaler.scale_ to include 0 variance | #### Reference Issues/PRs
Fixes #19104
#### What does this implement/fix? Explain your changes.
Updates the docstring of StandardScaler's scale_ attribute to include the scenario when variance is 0, so that scale_ is not sqrt(var).
#### Any other comments?
| 2021-01-06T06:38:47Z | Standard Scalar scaler.scale_ = np.sqrt(scaler.var_)
Can someone please double check the code for StandardScaler attributes .scale_ and .var_ attributes? .scale_ is suppose to represent the standard deviation which is the square root of the variance. I used the default settings for Scikit-learn 0.23.2 and found that my... | > .scale_ is suppose to represent the standard deviation
Not really, it's supposed to represent the scaling of the data by the standard scaler, which tries to achieve zero mean and unit variance.
If a variance is 0, we can't achieve unit variance, and we leave the data as-is, which means the scaling factor is 1.
... | [
{
"body": "Can someone please double check the code for StandardScaler attributes .scale_ and .var_ attributes? .scale_ is suppose to represent the standard deviation which is the square root of the variance. I used the default settings for Scikit-learn 0.23.2 and found that my .scale_ was 1.0 and my .var_ was ... | da395dde3804152562e461662e947c0edde4b5e3 | {
"head_commit": "80762ccfe56647e079fc0c1ec7a9a3d85a1f23ad",
"head_commit_message": "Fixes #19104: Update documentation of StandardScaler.scale_ to include 0\nvariance",
"patch_to_review": "diff --git a/sklearn/preprocessing/_data.py b/sklearn/preprocessing/_data.py\nindex 478d41ecc768a..573e9f0dc1805 100644\n---... | [
{
"diff_hunk": "@@ -617,8 +617,11 @@ class StandardScaler(TransformerMixin, BaseEstimator):\n Attributes\n ----------\n scale_ : ndarray of shape (n_features,) or None\n- Per feature relative scaling of the data. This is calculated using\n- `np.sqrt(var_)`. Equal to ``None`` when ``wit... | 6404b4886fbda60bca5f9272f05eca268fb2dc7f | diff --git a/sklearn/preprocessing/_data.py b/sklearn/preprocessing/_data.py
index 478d41ecc768a..3921b898c072d 100644
--- a/sklearn/preprocessing/_data.py
+++ b/sklearn/preprocessing/_data.py
@@ -617,8 +617,11 @@ class StandardScaler(TransformerMixin, BaseEstimator):
Attributes
----------
scale_ : ndarr... | {
"difficulty": "low",
"estimated_review_effort": 1,
"problem_domain": "Bug Fixes"
} |
scikit-learn__scikit-learn-19126@30b85d7 | scikit-learn/scikit-learn | Python | 19,126 | FIX accept meta-estimator in SelfTrainingClassifier | closes #19119
`SelfTrainingClassifier` did not accept nested estimators that did not expose `predict_proba`.
One fix is to validate a fitted estimator where we know if `predict_proba` will be then available.
| 2021-01-06T10:46:49Z | StackClassifier is SelfTrainingClassifier throws error
<!--
Before submitting a bug, please make sure the issue hasn't been already
addressed by searching through the past issues.
-->
#### Describe the bug
When using StackClassifier as the "estimator" for SelfTrainingClassifier, an error is thrown related to "p... | ~~ @riyadhctg Could you modify your minimal example such that it can run.~~
I did update the original example with a case that should not indeed fail.
I think that there might be an underlying bug but the error that you obtain is normal. `SGDClassifier()` that is your final estimator does not have `predict_proba` de... | [
{
"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\nWhen using StackClassifier as the \"estimator\" for SelfTrainingClassifier, an error is thrown related to \"predict_proba\" even th... | 6902b1014745cbf3b1a7a85eac60b7e8e882d715 | {
"head_commit": "30b85d7e36db7ceb09787a8690dc78cf839315fe",
"head_commit_message": "update whats new",
"patch_to_review": "diff --git a/doc/whats_new/v0.24.rst b/doc/whats_new/v0.24.rst\nindex 7197b74b94faa..3e28934eee61b 100644\n--- a/doc/whats_new/v0.24.rst\n+++ b/doc/whats_new/v0.24.rst\n@@ -2,6 +2,23 @@\n \n... | [
{
"diff_hunk": "@@ -207,8 +207,11 @@ def fit(self, X, y):\n \n if self.n_iter_ == 1:\n # Only validate in the first iteration so that n_iter=0 is\n- # equivalent to the base_estimator itself.\n- _validate_estimator(self.base_estimator)\n+ ... | d8728de0275b35d3a656e8635215fcbc8e93b95d | diff --git a/doc/whats_new/v0.24.rst b/doc/whats_new/v0.24.rst
index 7197b74b94faa..c501405275696 100644
--- a/doc/whats_new/v0.24.rst
+++ b/doc/whats_new/v0.24.rst
@@ -2,6 +2,23 @@
.. currentmodule:: sklearn
+.. _changes_0_24_1:
+
+Version 0.24.1
+==============
+
+Changelog
+---------
+
+:mod:`sklearn.semi_super... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
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.