sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: pytorch
Issue: PyObject preservation does not prevent weakrefs being cleared by Python garbage collector
Labels: triaged,module: python frontend

### 🐛 Describe the bug

If a dead cycle holds the last reference to a resurrectable Tensor, gc will clear its weakrefs. One implication of this interaction is that entries can spuriously vanish from WeakTensorKeyDictionary, which is used in various places across the code base.

Repro:
```python
import gc; gc.disable()
a = torch.tensor(1.)
param = torch.tensor(2., requires_grad=True)
param.grad = a
b = [a]
b.append(b) # create a cycle

def callback(x):
    print("callback called!")

a_ref = weakref.ref(a, callback)

del a, b
gc.collect()
print("done collecting")
assert a_ref() is None
```

https://github.com/pytorch/pytorch/issues/75932 is a good read for more background; this issue is the same as that one except we also check weakrefs. The TLDR:

Today, PyObject preservation logic already has special handling for interaction with Python's garbage collector in two ways:
1) [In the original PR to add PyObject preservation](https://github.com/pytorch/pytorch/pull/56017),  @ezyang and @albanD foresaw that if gc detected a  unreachable cycle that included a ressurectable Tensor, `tp_clear` may be called on it, preventing a clean resurrection. The fix here is to tell `tp_traverse` to not traverse its members in the case we are resurrectable (thus preventing any cycle involving the resurrectable Tensor from being detected).
2) Later @Chillee [investigated](https://github.com/pytorch/pytorch/issues/75932) a separate case where the ressurectable Tensor is not directly part of the cycle, but is instead kept alive by a reference from a dead cycle. The `tp_traverse` fix did not address this because `tp_clear` will be called on all unreachable objects whether they are directly part of the cycle or not. The resolution here is to bail from `tp_clear` if the Tensor is resurrectable.

The `tp_clear` fix, however,  does not prevent weakrefs from already being cleared because gc clears weakrefs before calling `tp_clear`!

https://github.com/python/cpython/blob/e65a1eb93ae35f9fbab1508606e3fbc89123629f/Python/gc.c#L1725-L1744
https://github.com/python/cpython/blob/main/InternalDocs/garbage_collector.md#destroying-unreachable-objects



### Versions

main

cc @albanD
Repository: go
Issue: cmd/compile: avoid allocs by better tracking of literals for interface conversions and make
Labels: compiler/runtime,BugReport

In this example, converting a concrete value to an interface does not cause the integer value to be heap allocated:

```go
fmt.Println(1000) 
```

For that example, escape analysis currently marks the value as escaping to the heap due to the interface conversion and the call to fmt.Println (and all that happens inside Println), but walk later recognizes the value does not need to be heap allocated.

On the other hand, the integer value in the following interface conversion does get heap allocated because the optimization in walk is thwarted by the literal getting assigned to a local variable prior to use in the interface conversion:

```go
v := 1000
fmt.Println(v) 
```

We should be able to recognize this and get a similar result with those two cases. (This would be a follow up to Josh's work in #18704).

Separately, this slice can be stack allocated with a constant size (if it doesn't otherwise escape):

```go
s := make([]int, 100)
```

But this slice is heap allocated because escape analysis treats it as having a non-constant size:

```go
count := 100
s := make([]int, count)
```
We also should be able to recognize this.

The above scenarios might happen in a single function, but can also be the result of inlining one function into another.

We can hopefully handle this early in the compiler after inlining and devirtualization but before finalizing escape analysis results. Part of the solution can be using the new-ish ir.ReassignOracle.

---------------

I have a rough proof-of-concept that seems to hopefully handle cases similar to the ones above for basic literals and I plan to send a couple of CLs. The approach likely could be extended further. (I noticed this a while ago when working on #62653; there is some overlap with cases handled between that issue and this issue, though #62653 would be the broader solution for interface conversions).
Repository: vscode
Issue: Inline git blame cannot be deactivated
Labels: info-needed,git

<!-- ⚠️⚠️ Do Not Delete This! bug_report_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- 🕮 Read our guide about submitting issues: https://github.com/microsoft/vscode/wiki/Submitting-Bugs-and-Suggestions -->
<!-- 🔎 Search existing issues to avoid creating duplicates. -->
<!-- 🧪 Test using the latest Insiders build to see if your issue has already been fixed: https://code.visualstudio.com/insiders/ -->
<!-- 💡 Instead of creating your report here, use 'Report Issue' from the 'Help' menu in VS Code to pre-fill useful information. -->
<!-- 🔧 Launch with `code --disable-extensions` to check. -->
Does this issue occur when all extensions are disabled?: Did not try yet

<!-- 🪓 If you answered No above, use 'Help: Start Extension Bisect' from Command Palette to try to identify the cause. -->
<!-- 📣 Issues caused by an extension need to be reported directly to the extension publisher. The 'Help > Report Issue' dialog can assist with this. -->
Version:
```
Version: 1.96.0 (Universal)
Commit: 138f619c86f1199955d53b4166bef66ef252935c
Date: 2024-12-11T02:29:09.626Z (1 mo ago)
Electron: 32.2.6
ElectronBuildId: 10629634
Chromium: 128.0.6613.186
Node.js: 20.18.1
V8: 12.8.374.38-electron.0
OS: Darwin arm64 23.6.0
```

Steps to Reproduce:

1. Change user settings: `"git.blame.editorDecoration.enabled": false`
2. Reload window
3. Inline blame is still there


Note that I'm also using gitlens and want to use the one from gitlens instead of this one. I like the Popup from gitlens better when hovering.
Since it displays both now, I want to deactivate the native one.
Repository: stable-diffusion-webui
Issue: [Feature Request]: Hide specific directory buttons when viewing extra networks in Dirs view style
Labels: enhancement

### Is there an existing issue for this?

- [x] I have searched the existing issues and checked the recent builds/commits

### What would your feature do ?

I would like there to be a setting that lets you select available directories in your extra networks tab to hide individually.

I like to keep my LoRAs organized in folders by their supported checkpoints and categories. For instance, my checkpoints are SDXL, Pony, and Illustrious. Then within those folders I have Characters (Male, Female, Non-Human), Styles, and Concepts. Then I have even more specific folders within those.

The result is I get every possible directory as a button I can click to filter the cards. There's the feature that hides folders and models from being shown if the folder starts with a period, but it hides _all_ the subfolders and models within that folder.

I know I could simply have fewer folders to reduce the amount of directory buttons, but I think the ability to hide specific ones to have a personalized list would be a good feature overall.

Alongside this, I think being able to save presets of hidden buttons would be great when going between different checkpoint versions.

### Proposed workflow

1. Go to .... 
2. Press ....
3. ...


### Additional information

_No response_
Repository: kubernetes
Issue: The pod is in pending state and cannot be scheduled.
Labels: kind/bug,sig/scheduling,needs-triage

### What happened?

https://github.com/kubernetes/kubernetes/blob/e69a5ed9b3764347c485cd4854149f3174d4bd95/pkg/scheduler/framework/plugins/volumebinding/binder.go#L471-L474
During pod scheduling, if the csi does not create a PV in time due to certain reasons, an error is reported due to timeout. However, the annotation volume.kubernetes.io/selected-node of the PVC is not deleted, and local scheduling fails. The scheduler starts to schedule other pods.
If the current deployment has pod anti-affinity, it cannot be scheduled to the same node. When the second copy is scheduled, the csi is normal. Assume that the copy is scheduled to the master1 node.
At the same time, the csi creates the PV of the first replica pod corresponding to the deployment on the master1 node.
When the first pod is scheduled again, the first pod cannot be scheduled and remains in the pending state due to pod anti-affinity.
Why is the PVC of the pod that fails to be scheduled not considered during pod scheduling?


### What did you expect to happen?

The pod should be rescheduled successfully.

### How can we reproduce it (as minimally and precisely as possible)?

Simulate a fault that the csi cannot work properly. When BindPodVolumes times out, restore the csi.

### Anything else we need to know?

_No response_

### Kubernetes version

<details>

```console
$ kubectl version
# paste output here
```
1.31
</details>


### Cloud provider

<details>

</details>


### OS version

<details>

```console
# On Linux:
$ cat /etc/os-release
# paste output here
$ uname -a
# paste output here

# On Windows:
C:\> wmic os get Caption, Version, BuildNumber, OSArchitecture
# paste output here
```

</details>


### Install tools

<details>

</details>


### Container runtime (CRI) and version (if applicable)

<details>

</details>


### Related plugins (CNI, CSI, ...) and versions (if applicable)

<details>

</details>
Repository: material-ui
Issue: [Autocomplete] Custom slot props types
Labels: status: waiting for author,typescript,package: material-ui,component: autocomplete

### Steps to reproduce

Steps:
1. Open this link to live example: https://stackblitz.com/edit/react-wgjewylg?file=Demo.tsx
2. Check the typescript error on the `listbox` slot prop: `Types of parameters 'props' and 'props' are incompatible.
      Property 'a' is missing in type 'HTMLAttributes<HTMLElement>' but required in type 'CustomListboxProps'.`


### Current behavior

I cannot define or extend the type of the listbox (and other) slot props when passing a custom component. For the Paper and Popper there are two interfaces `AutocompletePaperSlotPropsOverrides` and `AutocompletePopperSlotPropsOverrides` that could be redeclared but that is less flexible.

### Expected behavior

I can use custom slots with custom props with type safety.

### Context

I want to use a TreeView in the Autocomplete component. Thus I either have to replace the paper or listbox slot.

Is something like a TreeViewSelect planned at some point in the future?

### Your environment

<details>
  <summary><code>npx @mui/envinfo</code></summary>

```
  Don't forget to mention which browser you used.
  Output from `npx @mui/envinfo` goes here.
```
</details>


**Search keywords**: autocomplete slot props
Repository: vscode
Issue: SCM Graph - display list of files in the commit in the graph
Labels: feature-request,scm


Type: <b>Feature Request</b>

currently the source control graph does not have a file explorer view.
if you have a file with a large number of changes ex. package-lock.json in a commit and you are clicking on the commit it takes a long time to open the diff view. most of the time i want to know the file names i have in the commit and then explore one or two of these file.
the current implementation forces to view all file diff instead of specific files, making it slower in my opinion.
my suggestion is to have a file explorer kind of view (Git Graph like approach).

VS Code version: Code - Insiders 1.97.0-insider (3d0aeb47a2ecfde9ff5141470b30c36d41c321d9, 2025-01-20T05:04:25.114Z)
OS version: Windows_NT x64 10.0.22621
Modes:


<!-- generated by issue reporter -->
Repository: PowerToys
Issue: Text Extractor
Labels: Needs-Triage

### Description of the new feature / enhancement

We cannot extract  the text of Bangla Language.  Please add this facility.

### Scenario when this would be used?

when it would use many MS  bangla app, bangla website and Bangla image then we can not text copy as The English text.

### Supporting information

_No response_
Repository: opencv
Issue: Wrong python type hints for imread
Labels: bug,category: python bindings

### System Information

OpenCV python version 4.10.0.84 / Fails also on OpenCV python version 4.11.0.86
Operating System / Platform: Ubuntu 24.04
python version 3.10.14


### Detailed description

I would like to report that the function `cv2.imread` reports a return type `cv2.typing.MatLike` when according to documentation, it should report `cv2.typing.MatLike | None`.

[Documentation](https://docs.opencv.org/4.10.0/d4/da8/group__imgcodecs.html#gab32ee19e22660912565f8140d0f675a8):
> The function imread loads an image from the specified file and returns it. If the image cannot be read (because of missing file, improper permissions, unsupported or invalid format), the function returns an empty matrix ( [Mat::data](https://docs.opencv.org/4.10.0/d3/d63/classcv_1_1Mat.html#a4d33bed1c850265370d2af0ff02e1564)==NULL ).

Note: In OpenCV for python, this translates into returning `None`.

Additional notes:
- Correctly reporting through the typing system that the function `cv2.imread` can return `None` in case the image cannot be read allows users to be forced through static type checkers to explicitly handle (or at least log) the case where a image can not be read. This adds value.
- This issue might apply to other functions. `cv2.imdecode` is one example.

### Steps to reproduce

```python
import tempfile

import cv2

with tempfile.TemporaryFile() as temp_file:
    temp_file.write(b"Corrupted binary data. Not a image")
    temp_file.seek(0)
    image = cv2.imread(str(temp_file.name))
    assert image is None
```

This code passes, showing that the type hint (no None returned) doesn't match the actual behavior.

### Issue submission checklist

- [x] I report the issue, it's not a question
- [x] I checked the problem with documentation, FAQ, open issues, forum.opencv.org, Stack Overflow, etc and have not found any solution
- [x] I updated to the latest OpenCV version and the issue is still there
- [x] There is reproducer code and related data files (videos, images, onnx, etc)
Repository: rust
Issue: Tracking Issue for `#![feature(phantom_variance_markers)]`
Labels: T-libs-api,C-tracking-issue

Feature gate: `#![feature(phantom_variance_markers)]`

This is a tracking issue for phantom variance markers, which are identical to `PhantomData` but provide a self-documenting variance rather than contrived types such as `PhantomData<fn() -> T>` to indicate contravariance.

### Public API

```rust
// in core::marker

pub struct PhantomCovariant<T: ?Sized>(/* ... */);
pub struct PhantomInvariant<T: ?Sized>(/* ... */);
pub struct PhantomContravariant<T: ?Sized>(/* ... */);
pub struct PhantomCovariantLifetime<'a>(/* ... */);
pub struct PhantomInvariantLifetime<'a>(/* ... */);
pub struct PhantomContravariantLifetime<'a>(/* ... */);

pub trait Variance: Sealed {}
impl<T: ?Sized> Variance for PhantomCovariant<T> {}
impl<T: ?Sized> Variance for PhantomInvariant<T> {}
impl<T: ?Sized> Variance for PhantomContravaiant<T> {}
impl<T: ?Sized> Variance for PhantomCovariantLifetime<T> {}
impl<T: ?Sized> Variance for PhantomInvariantLifetime<T> {}
impl<T: ?Sized> Variance for PhantomContravaiantLifetime<T> {}

pub fn variance<T: Variance>() -> T {}

// also the trait impls you would expect; identical to PhantomData
```

### Steps / History

- [x] ACP: https://github.com/rust-lang/libs-team/issues/488
- [ ] Implementation: #135807
- [ ] Final comment period (FCP)[^1]
- [ ] Stabilization PR

### Unresolved Questions

- Should there be a single `Lifetime` type or one for each possible variance? The former would mean writing `PhantomCovariant<Lifetime<'a>>` instead of `PhantomCovariantLifetime<'a>`, with the API otherwise being identical.
- Should the values be directly constructable, eliminating the need for `::new()`? This would presumably mean adding 4–6 lang items, depending on the previous bullet point.

[^1]: https://std-dev-guide.rust-lang.org/feature-lifecycle/stabilization.html
Repository: vscode
Issue: Do not enable editor.stickyScroll.enabled on every update by default
Labels: editor-sticky-scroll

<!-- ⚠️⚠️ Do Not Delete This! feature_request_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- Please search existing issues to avoid creating duplicates. -->

<!-- Describe the feature you'd like. -->

Hi.
On every update seems like editor.stickyScroll.enabled is set to enable, this is quite anoying if you dislike the feature, please do not override local settings on updates.

Regards.
Repository: ollama
Issue: Support for Multiple Images in /chat Endpoint
Labels: feature request

Currently, the /chat endpoint includes the images field, but it only supports a single image. While this is functional, it introduces an additional layer of complexity when performing RAG with images embedded in base64.

For instance, if the content retriever returns multiple embeddings with the highest scores referencing different images, we need to manually reconstruct the full images (potentially missing lower-score records in case the embedding size isn't big enough to store the whole image in one record) and then make a separate /chat call for each retrieved image. Finally, all the responses must be summarized into one.

This manual process could be significantly simplified if the images field allowed for passing multiple images in a single request.

Is there any plan in the near future to support multiple images in the images field? This enhancement would greatly streamline workflows and reduce the overhead in scenarios like the one described above.

Additionally, I’m just getting started and don’t have much experience yet, so it’s possible that I’m overlooking something that could make this process easier. If there’s a better approach or workaround I might have missed, I’d be grateful for any guidance.

Thank you beforehand!
Repository: opencv
Issue: VideoCapture using CAP_FFMPEG to capture the camera device
Labels: feature,category: videoio(camera)

Currently, opencv does not support using the ffmpeg backend to open the camera device. Is there any support plan at present?
My current problem is that I want to use ffmpeg's hardware acceleration to decode the camera data.
Repository: tensorflow
Issue: Tensorflow 2.14.0 installation/run on C++ in visual studio code
Labels: type:build/install,awaiting PR merge,TF2.14

### Issue type

Build/Install

### Have you reproduced the bug with TensorFlow Nightly?

No

### Source

source

### TensorFlow version

2.14

### Custom code

Yes

### OS platform and distribution

macos 14.4

### Mobile device

_No response_

### Python version

_No response_

### Bazel version

6.1

### GCC/compiler version

_No response_

### CUDA/cuDNN version

_No response_

### GPU model and memory

_No response_

### Current behavior?

Hi I would like to try to run a custom model on C++, how should I setup the tensorflow so that i could call and use function like i did in python?

### Standalone code to reproduce the issue

```shell
tried bazel build //tensorflow/tools/pip_package, yet it pops up error 
Skipping '//tensorflow/tools/pip_package': no such target '//tensorflow/tools/pip_package:pip_package': target 'pip_package' not declared in package 'tensorflow/tools/pip_package' defined by /Users/XXXX/Documents/testing/tensorflow/tensorflow/tools/pip_package/BUILD (Tip: use `query "//tensorflow/tools/pip_package:*"` to see all the targets in that package)
WARNING: Target pattern parsing failed.
ERROR: no such target '//tensorflow/tools/pip_package:pip_package': target 'pip_package' not declared in package 'tensorflow/tools/pip_package' defined by /Users/XXXX/Documents/testing/tensorflow/tensorflow/tools/pip_package/BUILD (Tip: use `query "//tensorflow/tools/pip_package:*"` to see all the targets in that package)
```

### Relevant log output

```shell

```
Repository: rust
Issue: relaxing a non-`Sized` bounds is a hard-warning
Labels: T-lang,C-bug

https://github.com/rust-lang/rust/blob/b605c65b6eb5fa71783f8e26df69975f9f1680ee/compiler/rustc_hir_analysis/src/hir_ty_lowering/bounds.rs#L97-L111

```rust
fn foo() -> impl ?Send {}
```

```
warning: relaxing a default bound only does something for `?Sized`; all other traits are not bound by default
 --> src/lib.rs:1:18
  |
1 | fn foo() -> impl ?Send {}
  |                  ^^^^^
```

This should either be a (future-compat) lint or a hard-error.
Repository: storybook
Issue: [Bug]: Component on Docs page doesn't recover from error
Labels: bug,addon: docs,upgrade:8.5

### Describe the bug

When visiting a docs page and changing a story so that it throws an error, the docs page successfully shows the error. Reverting the change and make the story render successfully doesn't lead to a recovered docs page. The docs page remains in an error state.

### Reproduction link

-

### Reproduction steps

1. Checkout Mealdrop
2. Start Storybook
3. Go to http://localhost:6006/?path=/docs/components-button--docs
4. Edit src/components/Button/Button.tsx -> Add a useEffect and throw an error inside it
5. Go to the browser, component successfully crashes
6. Revert the change
7. Go to the browser -> component doesn’t recover. It remains in an error state

### System

```bash
-
```

### Additional context

_No response_
Repository: storybook
Issue: [Bug]: Vitest doesnt work with Svelte CSF when using the legacyTemplate option to support the old v4 API
Labels: bug,svelte,addon: test,upgrade:8.5

### Describe the bug

The new v5 of the addon has a legacyTemplate option that allows users to keep using deprecated APIs (how to define stories) until they've successfully migrated to the new API.

The legacy support works by injecting a Vite plugin that has enforce: 'pre' that will behind the scenes, migrate the stories source to the new API.

This means it has to run as the very first plugin, before the Svelte plugin compiles the source to JS.
But in Vitest, the plugin is added after the Svelte plugin. This would have been fixed by enforce: 'pre', except the Svelte Vite plugin also uses enforce: 'pre', so that gets to go first because it is the first plugin in the list.

**Workaround**:
There's a fairly straight forward userland workaround right now.
When configuring the Storybook Vitest workspace, don't extend the existing Vite config, but instead copy it in manually to the definition, so that the user can add the storybookTest() plugin before the Svelte plugin

### Reproduction link

-

### Reproduction steps

_No response_

### System

```bash
-
```

### Additional context

_No response_
Repository: storybook
Issue: [Bug]: Init scaffolds broken template files in a Nextjs+JS project
Labels: bug,nextjs,upgrade:8.5

### Describe the bug

The template components (Button.jsx, etc.) uses the prop-types package to define prop types, but that package isn't added as a dependency, so starting Storybook results in a Webpack compile error.

Presumably prop-types was already part of Next.js with React 18, but not with React 19.

But we don't do that for Next.js. The quick fix would be to also the dependency in Next.js + JavaScript projects. But given the package has finally been removed from React in v19, we're actually adding legacy practices now with every init, so long term we should update our template components to not rely on prop-types. I don't know if react-docgen and/or react-docgen-typescript supports JSDoc types?

### Reproduction link

-

### Reproduction steps

-

### System

```bash
-
```

### Additional context

_No response_