sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: pytorch
Issue: mark_dynamic may error too aggressively
Labels: triaged,oncall: pt2,module: dynamic shapes

### 🐛 Describe the bug

Suppose you have pseudocode like this:

```
B = 4
x = torch.randn(B, 16)
y = torch.randn(B, 16)
torch._dynamo.mark_dynamic(x, 0)

@torch.compile()
def f(x, y):
    return x + y

f(x, y)
```

This will fail, because the addition with y will cause x to get specialized.

One might reasonably argue that this is what you want to happen, because you asked for x to be dynamic, and it wasn't. But in non-synthetic examples, it might be quite difficult to identify all of the locations you need to mark_dynamic to ensure all of the unifications work out. In particular, I was trying to understand why we fail to maintain dynamic batch size in HuggingFace T5, and the reason is that in generation, there are a decent number of graph breaks in some of the preparatory code which allocates tensors that also have batch size (remember, eager mode does not currently propagate dynamic dim). Understanding where you have to insert `mark_dynamic` also requires you to understand where all the graph breaks are happening, not an easy feat!

It would be simple enough to delete the "require that computation involving this tensor must be dynamic" test (or perhaps, keep it but under some other name; in fact, ShapeEnv is directly factored this way). But could there be something even better we can do? One observation is we might still want mark dynamic to interact with `assume_static_by_default`; the desire is to avoid a recompilation by noting that a kernel should be compiled dynamically from the getgo.

In this case, there is something we can do. We could allocate dynamic dimensions for all shapes in the beginning, and then infer all the ones that should be dynamic (e.g., because they were marked dynamic). For all other unconstrained dimensions, we would monomorphize them (that's the assume static by default). We give up the benefits of performing dynamo tracing with static shapes (something that is quite profitable for compile time), but save a recompile. This may be a case of penny-wise pound-foolish though, depending on the relative costs of allocating lots of symbols vs eating a recompile. A hybrid approach is to optimistically trace with everything static, and only if a mark_dynamic is violated, we trigger a retrace with everything dynamic by default.

As a short term unblocker, it probably makes sense to special case T5 a little so that it goes the slow route (but then successfully compiles dynamic batch size). Maybe if we can eliminate enough graph breaks things will get better.

### Versions

main

cc @msaroufim @wconstab @bdhirsh @anijain2305
Repository: tensorflow
Issue: Check fail can be triggered in `tf.raw_ops.EmptyTensorList` due to overflow under jit compile mode.
Labels: stat:awaiting tensorflower,type:bug,comp:ops,TF 2.13

<details><summary>Click to expand!</summary> 
 
 ### Issue Type

Bug

### Have you reproduced the bug with TF nightly?

Yes

### Source

source

### Tensorflow Version

2.14.0

### Custom Code

Yes

### OS Platform and Distribution

Ubuntu 20.04

### Mobile device

Ubuntu 20.04

### Python version

3.8.10

### Bazel version

_No response_

### GCC/Compiler version

_No response_

### CUDA/cuDNN version

_No response_

### GPU model and memory

_No response_

### Current Behaviour?

Check fail can be triggered in `tf.raw_ops.EmptyTensorList` under jit compile mode. While in normal mode, it won't be triggered but through an InvalidArgumentError.

### Standalone code to reproduce the issue

```shell
import os 
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
import tensorflow as tf
import numpy as np

element_shape=tf.random.uniform([3], dtype=tf.dtypes.int64, minval=-100000000, maxval=1000000000)
max_num_elements=tf.random.uniform([], dtype=tf.dtypes.int32, minval=-100000, maxval=1000000)
element_dtype=tf.dtypes.int32

@tf.function(jit_compile=True)
def fuzz_jit():
    y = tf.raw_ops.EmptyTensorList(element_shape=element_shape, max_num_elements=max_num_elements, element_dtype=element_dtype)
    return y

def fuzz_normal():
    y = tf.raw_ops.EmptyTensorList(element_shape=element_shape, max_num_elements=max_num_elements, element_dtype=element_dtype)
    return y

y1 = fuzz_jit() # trigger the check fail under jit compile mode.
print('[+] JIT ok')
y2 = fuzz_normal() # if you run y2 first, it will through error rather than check fail.
print('[+] Normal ok')
```


### Relevant log output

```shell
% python test.py
2023-06-02 11:41:06.810728: F tensorflow/core/framework/tensor_shape.cc:201] Non-OK-status: InitDims(dim_sizes) status: INVALID_ARGUMENT: Encountered overflow when multiplying 246417692688323817 with 562326056, result: -1
zsh: abort (core dumped)  python test.py
```
</details>
Repository: PowerToys
Issue: powerrename 文件夹检索增强
Labels: Needs-Triage,Needs-Team-Response

### Description of the new feature / enhancement

在读取文件目录前添加选项判断是否只更改父文件夹名称，以降低不必要的性能占用和可能的子文件名称的错误名称更改

### Scenario when this would be used?

仅需更改父文件夹名称时，若文件夹内包含大量文件夹，powerrename占用大量性能和内存，此时添加选项判断是否读取子文件夹内容可以增强工作效率和降低不必要的性能占用
![image](https://github.com/microsoft/PowerToys/assets/46293794/31a8e90d-5fb8-4d20-b67f-10eabd6df268)
![image](https://github.com/microsoft/PowerToys/assets/46293794/4b380229-deb7-4b5b-99de-f55629888cb1)


### Supporting information

_No response_
Repository: opencv
Issue: findchessboardcornersSB with CPU and GPU will get the different corner points.
Labels: bug

### System Information

OpenCV version: 4.5.0
Operating System / Platform: windows10
Compiler & compiler version: c++11 / vs2019

### Detailed description

I get the different corner points When I use the function of  findchessboardcornersSB with CPU and GPU.
And then I try to use findchessboardcornersSB with different computer(CPU). I get the difference,too. But the difference with different CPU is better then difference between CPU and GPU.

I want to know which is better, and..if I want to let it didn't get the different corner point.  How can I do?

### Steps to reproduce

...

### 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: storybook
Issue: [Bug]: Unable to migrate MDX stories to Storybook 7
Labels: bug,has workaround,mdx

### Describe the bug

Hello! I'm attempting to migrate over to Storybook v7 and I'm having issues building with standalone/unattached Mdx files. I've tried all different versions of suggested syntaxes in the documentation, including the suggestion that you can drop the `Meta` tag completely.

Could you point me in the right direction?

## Console output

`npm run storybook`

```
ModuleBuildError: Module build failed (from ./node_modules/@storybook/mdx2-csf/loader.js):
Could not parse expression with acorn: Unexpected content after expression
    at processResult (/home/gabek/src/webv2-merge/owncast/web/node_modules/webpack/lib/NormalModule.js:764:19)
    at <anonymous> (/home/gabek/src/webv2-merge/owncast/web/node_modules/webpack/lib/NormalModule.js:866:5)
    at <anonymous> (/home/gabek/src/webv2-merge/owncast/web/node_modules/loader-runner/lib/LoaderRunner.js:400:11)
    at <anonymous> (/home/gabek/src/webv2-merge/owncast/web/node_modules/loader-runner/lib/LoaderRunner.js:252:18)
    at context.callback (/home/gabek/src/webv2-merge/owncast/web/node_modules/loader-runner/lib/LoaderRunner.js:124:13)
    at Object.loader (/home/gabek/src/webv2-merge/owncast/web/node_modules/@storybook/mdx2-csf/loader.js:32:12)

WARN Broken build, fix the error above.
WARN You may need to refresh the browser.
```



### To Reproduce

The following `Test.mdx` reproduces the error.

## Test.mdx

```markdown
# Test.mdx

This is a test file.

```

### System

```shell
Environment Info:

  System:
    OS: Linux 6.0 Pop!_OS 22.04 LTS
    CPU: (8) x64 Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz
  Binaries:
    Node: 19.9.0 - ~/.local/share/nvm/v19.9.0/bin/node
    npm: 9.6.7 - ~/src/webv2-merge/owncast/web/node_modules/.bin/npm
  Browsers:
    Chrome: 108.0.5359.124
    Firefox: 108.0
  npmPackages:
    @storybook/addon-a11y: 7.0.18 => 7.0.18
    @storybook/addon-actions: 7.0.18 => 7.0.18
    @storybook/addon-docs: 7.0.18 => 7.0.18
    @storybook/addon-essentials: ^7.0.18 => 7.0.18
    @storybook/addon-links: 7.0.18 => 7.0.18
    @storybook/addon-styling: ^1.0.8 => 1.0.8
    @storybook/addon-viewport: 7.0.18 => 7.0.18
    @storybook/blocks: ^7.0.18 => 7.0.18
    @storybook/cli: 7.0.18 => 7.0.18
    @storybook/mdx2-csf: 1.1.0 => 1.1.0
    @storybook/nextjs: ^7.0.18 => 7.0.18
    @storybook/preset-scss: ^1.0.3 => 1.0.3
    @storybook/react: 7.0.18 => 7.0.18
    @storybook/testing-library: 0.1.0 => 0.1.0
```


### Additional context

_No response_
Repository: flutter
Issue: Canvas drawing image is fuzzy and jagged 
Labels: e: device-specific,platform-ios,engine,a: images,has reproducible steps,P2,found in release: 3.10,found in release: 3.12,team-ios,triaged-ios

              The Paint filterQuality property is causing this issue

_Originally posted by @HaijunWei in https://github.com/flutter/flutter/issues/126902#issuecomment-1549283313_
Repository: vscode
Issue: Crash when rebuilding application menu on wayland
Labels: bug,upstream,freeze-slow-crash-leak,linux,electron,confirmed,upstream-issue-linked,wayland

Extracted from https://github.com/microsoft/vscode/issues/181533#issuecomment-1565576439

```
Crash reason:  SIGSEGV /SEGV_MAPERR
Crash address: 0x1010101
Process uptime: 142 seconds

Thread 0 (crashed)
 0  code-insiders!views::View::UnregisterChildrenForVisibleBoundsNotification(views::View*) [view.cc : 2859 + 0x0]
 1  code-insiders!views::View::UnregisterChildrenForVisibleBoundsNotification(views::View*) [view.cc : 2860 + 0x5]
 2  code-insiders!views::View::DoRemoveChildView(views::View*, bool, bool, views::View*) [view.cc : 2702 + 0x8]
 3  code-insiders!views::View::RemoveAllChildViews() [view.cc : 340 + 0x12]
 4  code-insiders!electron::MenuBar::RebuildChildren() [menu_bar.cc : 234 + 0x5]
 5  code-insiders!electron::RootView::SetMenu(electron::ElectronMenuModel*) [root_view.cc : 71 + 0x8]
 6  code-insiders!electron::api::BaseWindow::SetMenu(v8::Isolate*, v8::Local<v8::Value>) [electron_api_base_window.cc : 0 + 0x8]
 7  code-insiders!gin_helper::Dispatcher<void (electron::api::BaseWindow*, v8::Isolate*, v8::Local<v8::Value>)>::DispatchToCallback(v8::FunctionCallbackInfo<v8::Value> const&) [callback.h : 267 + 0x3]
 8  code-insiders!v8::internal::Builtin_HandleApiCall(int, unsigned long*, v8::internal::Isolate*) [api-arguments-inl.h : 146 + 0x3]
```

@Mithras can you provide the following details to help us repro the issue,

1) Are you using custom or native titlebar ?
2) Are you starting the application with `--ozone-platform=wayland --enable-features=WaylandWindowDecorations` ?
3) Where did you install insiders from ? Snap, deb or rpm ?
4) A video recording showing the exact repro steps will be helpful.
Repository: vscode
Issue: Restarting the extension host ends up starting the web worker extension host
Labels: bug,extension-host

* run out of sources
* run `Developer: Restart Extension Host`
* observe that the web worker extension host is started

cc @bpasero
Repository: material-ui
Issue: [Slider] Add range mark
Labels: new feature,waiting for 👍,component: slider

### Duplicates

- [X] I have searched the existing issues

### Latest version

- [X] I have tested the latest version

### Summary 💡

Slider's Marks are very useful.
But it would be more useful to be able to define Marks with a start point and an end point.

### Examples 🌈

_No response_

### Motivation 🔦

_No response_
Repository: pytorch
Issue: Unknow error when using `make_graphed_callables`
Labels: triaged,module: cuda graphs

### 🐛 Describe the bug

When I try to run the following code, 
```python
import torch

def test_func(t1: torch.Tensor, t2: torch.Tensor):
    return t1 + t2

r1 = torch.randn([1, 4, 8, 3, 3]).to('cuda')
r2 = torch.randn([1, 4, 8, 3, 3]).to('cuda')
tmp = torch.randn([1, 4, 8, 2]).to('cuda').requires_grad_()
r2[..., 1, 1] = tmp[..., 1]

cudagraph_func = torch.cuda.make_graphed_callables(test_func, (r1, r2))
```

I got the error msg:
```
    result = Variable._execution_engine.run_backward(  # Calls into the C++ engine to run the backward pass
RuntimeError: CUDA error: operation would make the legacy stream depend on a capturing blocking stream
CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1.
Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.
```

### Versions

PyTorch version: 2.0.0a0+1767026
Is debug build: False
CUDA used to build PyTorch: 12.1
ROCM used to build PyTorch: N/A

OS: Ubuntu 20.04.5 LTS (x86_64)
GCC version: (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
Clang version: Could not collect
CMake version: version 3.24.1
Libc version: glibc-2.31

Python version: 3.9.16 (main, Mar  8 2023, 14:00:05)  [GCC 11.2.0] (64-bit runtime)
Python platform: Linux-5.4.0-131-generic-x86_64-with-glibc2.31
Is CUDA available: True
CUDA runtime version: 12.1.66
CUDA_MODULE_LOADING set to: LAZY

cc @mcarilli @ezyang
Repository: flutter
Issue: Add a dart subcommand
Labels: tool,c: proposal,P3,team-tool,triaged-tool

### Is there an existing issue for this?

- [X] I have searched the [existing issues](https://github.com/flutter/flutter/issues)
- [X] I have read the [guide to filing a bug](https://flutter.dev/docs/resources/bug-reports)

### Use case

With the [deprecation of the `format` subcommand for flutter,](https://github.com/flutter/flutter/issues/115809) there will soon be a higher probability that there is a difference in Dart-version (and therefore possibly formatting) between different developer and/or CI environments.

For example, I routinely have work on projects that support different minimum versions of Flutter, and I manage these using [asdf-vm](https://asdf-vm.com/), which means that e.g. which flutter will always return $HOME/.asdf/shims/flutter and there might be others on my team using similar solutions. The `dart`-binary in that same directory might point to a completely different version of Dart.

Currently, there is no way of reliably locating the Dart SDK used by Flutter if the PATH is not reliable. 


### Proposal

It would be great if we could get a `dart` subcommand for `flutter` so that we can run Dart-specific commands while ensuring that we use the same version of Dart that is included with Flutter.

CC @christopherfujino
Repository: storybook
Issue: [Bug]: inline Canvas on MDX2 are not wrap within an iframe
Labels: bug,mdx

### Describe the bug

On a MDX2 page, I need to have a demo component, which import my CSS, therefore this demo component needs to be wrap within an iframe, otherwise my CSS apply to the whole story.

I use a demo component, within `<Canvas>`, and not a story, within `<Story>`, because I don't have a real story.
I am not documenting a component, I am documenting the typography, aka my CSS itself.

I found on [this issue](https://github.com/storybookjs/storybook/issues/12018#issuecomment-674006252) that on MDX1, we could use `inline={false}` to make a code block be wrap with an iframe. The props exist on Canvas, so I try it, but no iframe is rendered, and therefore when displaying my story, my CSS apply to the whole story, making it look differently than the other stories.

Is it supposed to works like this with MDX2 or do we have a new way of doing this?

### To Reproduce

documentation/typography.mdx
```tsx
import { Canvas, Meta } from '@storybook/blocks';
import TypographyDemo from "./TypographyDemo.tsx";

<Meta title="Documentation/Typography" />

# Typography

The typography that you nee to use ...

Example:

<Canvas inline={false}>
  <TypographyDemo />
</Canvas>
```

documentation/TypographyDemo.tsx
```tsx
import "css-reset.css";
import "theme.css";
import React from "react";

const TypographyDemo = () => (<h1>An H1 title</h1>)

export default TypographyDemo;
```

With the story + component above, the CSS reset + theme will also apply to the _Typography_ title at the beginning of the story.

https://stackblitz.com/edit/github-huenqe?file=stories%2Ftypography.mdx  => I have no idea if this thing is working.

### System

```shell
System:
    OS: Linux
    CPU: x64
  Binaries:
    Node: 16.20.0 - ~/.nvm/versions/node/v16.20.0/bin/node
    npm: 8.19.4 - ~/.nvm/versions/node/v16.20.0/bin/npm
  Browsers:
    Chrome: 114.0.5735.90
    Firefox: 113.0.2
  npmPackages:
    @storybook/addon-actions: ^7.0.7 => 7.0.8 
    @storybook/addon-essentials: ^7.0.7 => 7.0.8 
    @storybook/addon-links: ^7.0.7 => 7.0.8 
    @storybook/react: ^7.0.7 => 7.0.8 
    @storybook/react-webpack5: ^7.0.7 => 7.0.8
```


### Additional context

main.mjs
```js
export default {
  stories: ["../documentation/**/*.mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"],
  addons: ["@storybook/addon-links", "@storybook/addon-essentials", "storybook-dark-mode"],
  framework: {
    name: "@storybook/react-webpack5",
    options: {},
  },
  webpackFinal: async (config, { configType }) => {
    //  ...
    return config;
  },
};
```
Repository: PowerToys
Issue: [Peek] Peek files via MTP (Phone via USB)
Labels: Idea-Enhancement,Help Wanted,Product-Peek

### Description of the new feature / enhancement

Peek should be able to preview files stored on an MTP device, preferably with ability to go back and forth between files as usual

### Scenario when this would be used?

Browsing pictures from your phone mostly
I know, sync exists, Phone app exists and many otherss but nothing beats Explorer and just plugging in to get exactly the file you need

### Supporting information

Due to the way MTP is implemented even if it seems mostly seamless apps aren't aware of the context when opening a file from such device, it would be nice to get this somehow addressed too, but this is out of scope for PowerToys and a change that needs to ship with the OS itself
Repository: vscode
Issue: Custom editors should not allow to make edits after extension host restart
Labels: bug,help wanted,custom-editors

This is a follow up from https://github.com/microsoft/vscode/issues/180514

When the EH restarts with an opened custom editor, that editor continues to be editable but does not report any dirty indication and does not allow to be saved because the old EH it was talking to is gone.

![Recording 2023-06-02 at 10 50 46](https://github.com/microsoft/vscode/assets/900690/019493e2-e359-4fe2-b633-4b42f2909afb)

I think a custom editor should detect that it lost the connection to its extension on the EH side and then do something, such as:
* turn readonly to prevent further edits
* show an indication to the user what happened

//cc @Tyriar
Repository: TypeScript
Issue: Per-decorator opt-in for type metadata emit
Labels: Suggestion,Awaiting More Feedback

# Suggestion

Emit type metadata only for decorators that need it.

## 🔍 Search Terms

decorator metadata

## ✅ Viability Checklist

My suggestion meets these guidelines:

* [x] This wouldn't be a breaking change in existing TypeScript/JavaScript code
* [x] This wouldn't change the runtime behavior of existing JavaScript code
* [ ] This could be implemented without emitting different JS based on the types of the expressions
* [ ] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, new syntax sugar for JS, etc.)
* [ ] This feature would agree with the rest of [TypeScript's Design Goals](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals).

## ⭐ Suggestion

_Note: This might be non-viable under the checklist because it require type-based emit, but type metadata for decorators is already type-based emit, so maybe this is an area where it's ok..._

Currently, the `emitDecoratorMetadata` flag emits metadata for every decorated field, even though many decorators might not need that metadata, which can cause bloat.

The compiler could instead look at some statically available metadata about the decorator itself, so that the decorator can opt-in to type metadata. This opt-in could be part of the type of the decorator function, ie you have to cast the decorator to a type that signals the decorator needs metadata:

```ts
const property = (options): ClassAccessorDecoratorWithMetadata => (target, context) => { /* ... */ };
```

## 📃 Motivating Example

Any program that uses a combination of decorators that need type metadata and those that don't.

## 💻 Use Cases

Workarounds are difficult here. Maybe developers can create separate projects and try to isolate those that require type metadata, but that might not always be possible - there might be single files that uses both decorators that require type-metadata and decorators that don't.

cc @rbuckton
Repository: pytorch
Issue: TypeError: (): incompatible function arguments
Labels: needs reproduction,module: cpp-extensions,triaged

### 🐛 Describe the bug

Hello，I am customizing process group backends using cpp extensions according to PyTorch Tutorials，[Customize Process Group Backends Using Cpp Extensions — PyTorch Tutorials 2.0.1+cu117 documentation](https://pytorch.org/tutorials/intermediate/process_group_cpp_extension_tutorial.html) . But an error occurred . It seems to be type error, but I find the type is right. So how can I fix it? The following is the detailed error:
```
File “/opt/conda/lib/python3.8/site-packages/torch/distributed/distributed_c10d.py”, line 895, in init_process_group
default_pg = _new_process_group_helper(
File “/opt/conda/lib/python3.8/site-packages/torch/distributed/distributed_c10d.py”, line 1029, in _new_process_group_helper
backend_class = creator_fn(backend_prefix_store, group_rank, group_size, timeout)
TypeError: (): incompatible function arguments. The following argument types are supported:
1. (arg0: c10d::Store, arg1: int, arg2: int, arg3: datetime.timedelta) → c10d::Backend
```

### Versions

torch.__version__: 2.0.0+cu117

cc @malfet @zou3519
Repository: PowerToys
Issue: When PowerToys is updated, the icon on my taskbar vanishes.
Labels: Issue-Bug,Needs-Triage

### Microsoft PowerToys version

0.70.1

### Installation method

PowerToys auto-update

### Running as admin

admin

### Area(s) with issue?

General

### Steps to reproduce

1.Power Toys tells me it has a new version.
2.I click "アップデートする" button.
3.I wait until Power Toys finishes its update.
4.When the update finishes, the icon on my taskbar vanishes.

### ✔️ Expected Behavior

4.When the update finishes, the icon on my taskbar remains.

### ❌ Actual Behavior

4.When the update finishes, the icon on my taskbar vanishes.

### Other Software

_No response_