ernie-research/MEnvBench huggingface dataset:
Repository: home-assistant/core (Python)

Issue:
Significant Change support for remote
Add [significant change](https://developers.home-assistant.io/docs/significant_change_index) support to the remote integration. All official properties need to be taken into consideration when deciding if a change is significant. If the integration has device classes, they should be taken into consideration and tested.

See the [developer documentation](https://developers.home-assistant.io/docs/core/entity/remote) for more information about the entity properties and device classes.

For an example of a significant change platform, see [the light integration](https://github.com/home-assistant/core/blob/dev/homeassistant/components/light/significant_change.py) and it's [tests](https://github.com/home-assistant/core/blob/dev/tests/components/light/test_significant_change.py). For example on how to differentiate based on device classes, see [the sensor integration](https://github.com/home-assistant/core/blob/dev/homeassistant/components/sensor/significant_change.py).

To get started with this issue, you will need to set up a Home Assistant development environment. The easiest approach is to get started using [a dev container](https://developers.home-assistant.io/docs/en/development_environment.html#developing-with-devcontainer).

Once you have a development environment set up, run the following and follow the instructions:

```python
python3 -m script.scaffold significant_change
```



Discussion: There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.



Fix (patch):
diff --git a/homeassistant/components/remote/significant_change.py b/homeassistant/components/remote/significant_change.py
new file mode 100644
index 0000000000000..8e5a36690411d
--- /dev/null
+++ b/homeassistant/components/remote/significant_change.py
@@ -0,0 +1,27 @@
+"""Helper to test significant Remote state changes."""
+from __future__ import annotations
+
+from typing import Any
+
+from homeassistant.core import HomeAssistant, callback
+
+from . import ATTR_CURRENT_ACTIVITY
+
+
+@callback
+def async_check_significant_change(
+    hass: HomeAssistant,
+    old_state: str,
+    old_attrs: dict,
+    new_state: str,
+    new_attrs: dict,
+    **kwargs: Any,
+) -> bool | None:
+    """Test if state significantly changed."""
+    if old_state != new_state:
+        return True
+
+    if old_attrs.get(ATTR_CURRENT_ACTIVITY) != new_attrs.get(ATTR_CURRENT_ACTIVITY):
+        return True
+
+    return False
Repository: getmoto/moto (Python)

Issue:
resourcegroupstaggingapi get_resources doesn't properly filter on s3:bucket
When using the `get_resources` method from the resource groups tagging api with `s3:bucket` as an entry in `ResourceTypesFilters`, no S3 Buckets are being returned. Moto seems to only return S3 buckets when `s3` is provided as a filter rather than the full `s3:bucket`

Here's a snippet that shows the issue:

```python
@mock_aws
class MyTestClass(unittest.TestCase):
    def setUp(self):
        s3 = boto3.resource("s3", region_name="us-east-1")
        s3.create_bucket(Bucket="test-bucket")
        s3.BucketTagging("test-bucket").put(
            Tagging={
                "TagSet": [
                    {"Key": "foo", "Value": "bar"}
                ]
            }
        )

    def test_stuff(self):
        boto3.client("resourcegroupstaggingapi", region_name="us-east-1").get_resources(
                    ResourceTypeFilters=["s3:bucket"]
                )["ResourceTagMappingList"] # Empty list! This should be returning the bucket
        
        boto3.client("resourcegroupstaggingapi", region_name="us-east-1").get_resources(
                    ResourceTypeFilters=["s3"]
                )["ResourceTagMappingList"] # This does work and returns the bucket properly
```

`s3:buckets` is a valid type filter that works in the real AWS API, and is even called out in the docs as an example https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/resourcegroupstaggingapi/client/get_resources.html. It seems that moto should support this as well.

Relevant Versions:
moto - 5.0.9
boto3 - 1.34.135
Python - 3.11.6
MacOS - 14.5



Fix (patch):
diff --git a/moto/resourcegroupstaggingapi/models.py b/moto/resourcegroupstaggingapi/models.py
index 55d5e5f556d0..c3548be44f43 100644
--- a/moto/resourcegroupstaggingapi/models.py
+++ b/moto/resourcegroupstaggingapi/models.py
@@ -211,7 +211,11 @@ def format_tag_keys(
                 yield {"ResourceARN": f"{vault.backup_vault_arn}", "Tags": tags}
 
         # S3
-        if not resource_type_filters or "s3" in resource_type_filters:
+        if (
+            not resource_type_filters
+            or "s3" in resource_type_filters
+            or "s3:bucket" in resource_type_filters
+        ):
             for bucket in self.s3_backend.buckets.values():
                 tags = self.s3_backend.tagger.list_tags_for_resource(bucket.arn)["Tags"]
                 if not tags or not tag_filter(
Repository: ibis-project/ibis (Python)

Issue:
bug: Scalar.ifelse(Column, Column) results in Scalar, not Column
### What happened?

```python
import pandas as pd
import ibis
ibis.options.interactive = True
ibis.options.verbose = True

df = pd.DataFrame({"x": range(3)})
inp = ibis.memtable(df)
ibis.literal(True).ifelse(inp.x, -inp.x)
```
Results in the scalar 0, what I'm guessing is the first entry in inp.x:

```
SELECT CASE WHEN CAST(:param_1 AS BOOLEAN) THEN t0.x ELSE -t0.x END AS "Where(True, x, Negate(x))" 
FROM _ibis_memtable1 AS t0
0
```

I would expect the Scalar `True` to get broadcast to the cardinality of the two columns, so I get `[0, 1, 2]`

### What version of ibis are you using?

4.0.0

### What backend(s) are you using, if any?

DuckDB

### Relevant log output

_No response_

### Code of Conduct

- [X] I agree to follow this project's Code of Conduct


Discussion: Thanks for the report, https://github.com/ibis-project/ibis/pull/5197 should fix it.
Thank you for the super quick fix! Been really liking Ibis so far. Occasionally I find a rough edge, but you seem to be working on this so actively that I'm confident that I can find a workaround. Thank you!



Fix (patch):
diff --git a/ibis/expr/operations/logical.py b/ibis/expr/operations/logical.py
index 20a2feb1426c..d982cf77aa3f 100644
--- a/ibis/expr/operations/logical.py
+++ b/ibis/expr/operations/logical.py
@@ -169,16 +169,11 @@ class Where(Value):
     true_expr = rlz.any
     false_null_expr = rlz.any
 
+    output_shape = rlz.shape_like("args")
+
     @attribute.default
     def output_dtype(self):
-        return rlz.highest_precedence_dtype(
-            [
-                self.true_expr,
-                self.false_null_expr,
-            ]
-        )
-
-    output_shape = rlz.shape_like("bool_expr")
+        return rlz.highest_precedence_dtype([self.true_expr, self.false_null_expr])
 
 
 @public
Repository: astronomer/astronomer-cosmos (Python)

Issue:
Tag selector not working with tests using the manifest json
There is a bug with the parsing of tests (at lease when using load_from_dbt_manifest).

Dbt does not populate the tags on the tests, still I would expected the behavior like in dbt  that tests for the models matched by a tag are selected. The current implementation in astronomer-cosmos however only considers nodes in the `filtered-notes` for tests.

https://github.com/astronomer/astronomer-cosmos/blob/2e3e4fd77db427441646a6139d5ac017b186366e/cosmos/dbt/graph.py#L326

I would hope that this can be fixed by iterating through nodes not filtered_nodes in the following line:

https://github.com/astronomer/astronomer-cosmos/blob/2e3e4fd77db427441646a6139d5ac017b186366e/cosmos/dbt/graph.py#L375

Alternatively there could be a way to do a second run through the nodes in the selector to catch all tests that depend on selected models:

https://github.com/astronomer/astronomer-cosmos/blob/2e3e4fd77db427441646a6139d5ac017b186366e/cosmos/dbt/selector.py#L84

I have not thought too much about possible side effects.

*Current Workaround*: Use a different selection method or explicitly tag tests.

--

astronomer-cosmos version 1.1.3
dbt-core vserion 1.5.7




Discussion: @nicohein This seems to be a limitation of Cosmos custom selector, which is used with `LoadMethod.CUSTOM` or `LoadMethod.DBT_MANIFEST`. If using `load_via_dbt_ls`, the selector behaviour would be just like dbt's.

Would you like to make a contribution to support this use-case in the custom selector?

@tatiana while I would like to make a contribution I am currently unable to give commitments. I am happy to be around for testing also beta versions within our test environment.



Fix (patch):
diff --git a/cosmos/dbt/selector.py b/cosmos/dbt/selector.py
index 0e6034a0b..f195f225b 100644
--- a/cosmos/dbt/selector.py
+++ b/cosmos/dbt/selector.py
@@ -108,6 +108,9 @@ def should_include_node(node_id: str, node: DbtNode) -> bool:
 
         visited_nodes.add(node_id)
 
+        if node.resource_type == DbtResourceType.TEST:
+            node.tags = getattr(nodes.get(node.depends_on[0]), "tags", [])
+
         if config.tags:
             if not (set(config.tags) <= set(node.tags)):
                 return False
Repository: huggingface/optimum (Python)

Issue:
`KeyError: 'sentence-transformers'` Unable to export sentence-transformers models
### System Info

```shell
- `optimum` version: 1.12.1.dev0
- `transformers` version: 4.34.0.dev0
- Platform: Linux-5.15.109+-x86_64-with-glibc2.35
- Python version: 3.10.12
- Huggingface_hub version: 0.16.4
- PyTorch version (GPU?): 2.0.1+cu118 (cuda availabe: False)
- Tensorflow version (GPU?): not installed (cuda availabe: NA)
```


### Who can help?

@mht-sharma @fxmarty 

### Information

- [ ] The official example scripts
- [ ] My own modified scripts

### Tasks

- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [ ] My own task or dataset (give details below)

### Reproduction (minimal, reproducible, runnable)

Running
```sh
optimum-cli export onnx -m hkunlp/instructor-large test
```

Produces
```
Framework not specified. Using pt to export to ONNX.
Traceback (most recent call last):
  File "/usr/local/bin/optimum-cli", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.10/dist-packages/optimum/commands/optimum_cli.py", line 163, in main
    service.run()
  File "/usr/local/lib/python3.10/dist-packages/optimum/commands/export/onnx.py", line 232, in run
    main_export(
  File "/usr/local/lib/python3.10/dist-packages/optimum/exporters/onnx/__main__.py", line 322, in main_export
    model = TasksManager.get_model_from_task(
  File "/usr/local/lib/python3.10/dist-packages/optimum/exporters/tasks.py", line 1680, in get_model_from_task
    model_class = TasksManager.get_model_class_for_task(
  File "/usr/local/lib/python3.10/dist-packages/optimum/exporters/tasks.py", line 1148, in get_model_class_for_task
    tasks_to_model_loader = TasksManager._LIBRARY_TO_TASKS_TO_MODEL_LOADER_MAP[library]
KeyError: 'sentence-transformers'
```

This was introduced in this [commit](https://github.com/huggingface/optimum/commit/d1e05f3f7a6f3da863b0e8d9275c1c63f78d8c0a).

### Expected behavior

The model should export normally. Reverting to commit 59b7e478031a86809ed5a24e00e5144d35b5f693 does not have this error.



Fix (patch):
diff --git a/optimum/exporters/tasks.py b/optimum/exporters/tasks.py
index c770d27c4b..a31fa6272f 100644
--- a/optimum/exporters/tasks.py
+++ b/optimum/exporters/tasks.py
@@ -1525,6 +1525,9 @@ def infer_library_from_model(
                 "The library_name could not be automatically inferred. If using the command-line, please provide the argument --library (transformers,diffusers,timm)!"
             )
 
+        if library_name == "sentence-transformers":
+            return "transformers"
+
         return library_name
 
     @classmethod
Repository: huggingface/optimum (Python)

Issue:
Add support for RemBERT in the ONNX export
### Feature request

Add RemBERT to supported architectures for ONNX export.

### Motivation

The support for [RemBert](https://huggingface.co/docs/transformers/model_doc/rembert) was previously available in Transformers see [here](https://github.com/huggingface/transformers/issues/16308). However,  now it seems that RemBERT is no longer supported.

### Your contribution

I can help by testing implementation or providing the code if provided by some tutorial. I was not able to find documentation on how to do that.


Discussion: Hi, I would love to review a PR, adding a model is usually something like https://github.com/huggingface/optimum/pull/1161/files
where we add a model config (in this case it will just inherit from bert text encoder config) and the appropriate hub models for testing.



Fix (patch):
diff --git a/docs/source/exporters/onnx/overview.mdx b/docs/source/exporters/onnx/overview.mdx
index 2eaada7dad..57005b8567 100644
--- a/docs/source/exporters/onnx/overview.mdx
+++ b/docs/source/exporters/onnx/overview.mdx
@@ -83,6 +83,7 @@ Supported architectures from [🤗 Transformers](https://huggingface.co/docs/tra
 - PoolFormer
 - Qwen2(Qwen1.5)
 - RegNet
+- RemBERT
 - ResNet
 - Roberta
 - Roformer
diff --git a/optimum/exporters/onnx/model_configs.py b/optimum/exporters/onnx/model_configs.py
index bca7cf24ac..b39d19ec78 100644
--- a/optimum/exporters/onnx/model_configs.py
+++ b/optimum/exporters/onnx/model_configs.py
@@ -162,6 +162,10 @@ class SplinterOnnxConfig(BertOnnxConfig):
     DEFAULT_ONNX_OPSET = 11
 
 
+class RemBertOnnxConfig(BertOnnxConfig):
+    DEFAULT_ONNX_OPSET = 11
+
+
 class DistilBertOnnxConfig(BertOnnxConfig):
     DEFAULT_ONNX_OPSET = 14  # now uses F.scaled_dot_product_attention by default for transformers>=4.46.0
 
diff --git a/optimum/exporters/tasks.py b/optimum/exporters/tasks.py
index c50fa5cdfa..0a3758e97c 100644
--- a/optimum/exporters/tasks.py
+++ b/optimum/exporters/tasks.py
@@ -431,6 +431,15 @@ class TasksManager:
             onnx="BertOnnxConfig",
             tflite="BertTFLiteConfig",
         ),
+        "rembert": supported_tasks_mapping(
+            "fill-mask",
+            "feature-extraction",
+            "text-classification",
+            "multiple-choice",
+            "token-classification",
+            "question-answering",
+            onnx="RemBertOnnxConfig",
+        ),
         # For big-bird and bigbird-pegasus being unsupported, refer to model_configs.py
         # "big-bird": supported_tasks_mapping(
         #     "feature-extraction",
Repository: Qiskit/qiskit (Python)

Issue:
`Target.has_calibration` errors for instructions without properties
### Environment

- **Qiskit version**: 1.1.0
- **Python version**: 3.12
- **Operating system**: Fedora Linux 40


### What is happening?

If a `Target` has an `Instruction` with `None` for its `InstructionProperties`, `Target.has_calibration` raises an `AttributeError`.

### How can we reproduce the issue?

Consider this case from the `Target` docstring with the `has_calibration` call added at the end:

```python
from qiskit.circuit.library import CXGate
from qiskit.transpiler import Target, InstructionProperties

target = Target()
cx_properties = {
    (0, 1): None,
    (1, 0): None,
    (0, 2): None,
    (2, 0): None,
    (0, 3): None,
    (2, 3): None,
    (3, 0): None,
    (3, 2): None
}
target.add_instruction(CXGate(), cx_properties)

target.has_calibration("cx", (0, 1))  # AttributeError!
```

### What should happen?

The last line above should return `False`

### Any suggestions?

I will submit a PR.



Fix (patch):
diff --git a/qiskit/transpiler/target.py b/qiskit/transpiler/target.py
index f7b5227c0266..53daa4ccbe65 100644
--- a/qiskit/transpiler/target.py
+++ b/qiskit/transpiler/target.py
@@ -892,7 +892,7 @@ def has_calibration(
             return False
         if qargs not in self._gate_map[operation_name]:
             return False
-        return getattr(self._gate_map[operation_name][qargs], "_calibration") is not None
+        return getattr(self._gate_map[operation_name][qargs], "_calibration", None) is not None
 
     def get_calibration(
         self,
diff --git a/releasenotes/notes/target-has-calibration-no-properties-f3be18f2d58f330a.yaml b/releasenotes/notes/target-has-calibration-no-properties-f3be18f2d58f330a.yaml
new file mode 100644
index 000000000000..07970679722d
--- /dev/null
+++ b/releasenotes/notes/target-has-calibration-no-properties-f3be18f2d58f330a.yaml
@@ -0,0 +1,7 @@
+---
+fixes:
+  - |
+    :meth:`.Target.has_calibration` has been updated so that it does not raise
+    an exception for an instruction that has been added to the target with
+    ``None`` for its instruction properties. Fixes
+    `#12525 <https://github.com/Qiskit/qiskit/issues/12525>`__.
Repository: Azure/azure-cli (Python)

Issue:
ACR task will append one extra line to the manifest
### Describe the bug

The line version: v1.1.0 will be added as 1st line no matter what.

Steps to reproduce the behavior:

Prepare a task manifest
Attach it when creating ACR task
az acr task show -n webapptask -r $cR  --query step.encodedTaskContent -o tsv | base64 --decode
Result:

![Image](https://github.com/user-attachments/assets/c700f1a2-81fc-45eb-a20b-1c3f224b9805)

What it will cause is - if I somehow wrote the manifest in the wrong format (the example above is not invalid), I cannot get the correct line number due to this issue:

![Image](https://github.com/user-attachments/assets/3dd7599e-e977-4bfc-8f01-23233aed7d68)

### Related command

`az acr task show -n webapptask -r $cR  --query step.encodedTaskContent -o tsv | base64 --decode`

### Errors

n/a

### Issue script & Debug output

n/a

### Expected behavior

The line version: v1.1.0 should not always be added.

### Environment Summary

OS: [e.g. Ubuntu, Windows]: Cloud Shell
Azure CLI/PowerShell/SDK version: 2.70.0
Docker version: N/A
Datetime (UTC) when the issue occurred: 2025-03-19T08:50:19:87Z
Registry and image names: N/A

### Additional context

_No response_


Discussion: <!-- thank-you-comment: do not delete/edit this line -->
Thank you for opening this issue, we will look into it.
Here is the original issue: https://github.com/Azure/acr/issues/825
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @toddysm, @luisdlp, @northtyphoon, @terencet-dev.
<!-- Policy app identification https://img.shields.io/static/v1?label=PullRequestIssueManagement. -->



Fix (patch):
diff --git a/src/azure-cli/azure/cli/command_modules/acr/_utils.py b/src/azure-cli/azure/cli/command_modules/acr/_utils.py
index 5f0bd739e65..575dc44bb99 100644
--- a/src/azure-cli/azure/cli/command_modules/acr/_utils.py
+++ b/src/azure-cli/azure/cli/command_modules/acr/_utils.py
@@ -248,8 +248,11 @@ def get_yaml_template(cmd_value, timeout, file):
     :param str timeout: The timeout for each step
     :param str file: The task definition
     """
-    yaml_template = "version: v1.1.0\n"
+    yaml_template = ""
+    # The default version is required to be added to cmd source Task.
+    # The version is expeced to be included in the file for file source Task.
     if cmd_value:
+        yaml_template += "version: v1.1.0\n"
         yaml_template += "steps: \n  - cmd: {0}\n    disableWorkingDirectoryOverride: true\n".format(cmd_value)
         if timeout:
             yaml_template += "    timeout: {0}\n".format(timeout)
Repository: vyperlang/vyper (Python)

Issue:
initializer hint improvement
### Version Information

* vyper Version (output of `vyper --version`): v0.4.0rc6

### What's your issue about?

when a module is not imported that needs to be initialized, the hint does not say where to find the module. e.g.:
```
InitializerException: `base_token` uses `ownable`, but it is not initialized with `ownable`

  (hint: try importing ownable first)

  contract "tmp/token.vy:4", line 4:0 
       3
  ---> 4 initializes: base_token
  -------^
       5 exports: base_token.IERC20
```

### How can it be fixed?

Fill this in if you know how to fix it.




Fix (patch):
diff --git a/vyper/semantics/analysis/module.py b/vyper/semantics/analysis/module.py
index d0b019db7a..d6bbea1b48 100644
--- a/vyper/semantics/analysis/module.py
+++ b/vyper/semantics/analysis/module.py
@@ -514,7 +514,8 @@ def visit_InitializesDecl(self, node):
                     break
 
             if rhs is None:
-                hint = f"try importing {item.alias} first"
+                hint = f"try importing `{item.alias}` first "
+                hint += f"(located at `{item.module_t._module.path}`)"
             elif not isinstance(annotation, vy_ast.Subscript):
                 # it's `initializes: foo` instead of `initializes: foo[...]`
                 hint = f"did you mean {module_ref.id}[{lhs} := {rhs}]?"
Repository: nautobot/nautobot (Python)

Issue:
search widget does not verify if user is logged in
### Environment
* Nautobot version (Docker tag too if applicable): 1.5.9
* Python version: 3.10
* Database platform, version:
* Middleware(s):

<!--
    If user has two or more Nautobot windows opened and is logged out after some time of inactivity or user log out in one window, switch to the second window and search for something he get "No results found" instead of login window (or at least message that user is logged out).
-->
### Steps to Reproduce
1. Open two Nautobot windows
2. Log out in one window
3. Switch to the second window and search for any object (prefix, device, etc.)
4. You will receive "No results found" instead of login window (or at least message that user is logged out).

<!-- What did you expect to happen? -->
To receive login window.

<!-- What happened instead? -->
Received confusing message "No results found".




Fix (patch):
diff --git a/changes/3617.changed b/changes/3617.changed
new file mode 100644
index 00000000000..0c218c5d0cd
--- /dev/null
+++ b/changes/3617.changed
@@ -0,0 +1,1 @@
+SearchForms on Nautobot homepage now redirect users to login page when they are not authenticated.
diff --git a/nautobot/core/views/__init__.py b/nautobot/core/views/__init__.py
index 4b62c6b6ffc..1bd9cb3a6f5 100644
--- a/nautobot/core/views/__init__.py
+++ b/nautobot/core/views/__init__.py
@@ -107,9 +107,14 @@ def get(self, request, *args, **kwargs):
         return self.render_to_response(context)
 
 
-class SearchView(View):
+class SearchView(AccessMixin, View):
     def get(self, request):
 
+        # if user is not authenticated, redirect to login page
+        # when attempting to search
+        if not request.user.is_authenticated:
+            return self.handle_no_permission()
+
         # No query
         if "q" not in request.GET:
             return render(