sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: pytorch
Issue: SDPA with nested backend: expose a way to avoid recomputing data layout information
Labels: triaged,module: sdpa

### 🚀 The feature, motivation and pitch

Hi, `torch.nn.functional.scaled_dot_product_attention` has a very nice torch.nested backend that allows to use e.g. flash attention with variable length inputs. In general, this is useful when doing training (fine-tuning) with padding, or during batched inference.

However, profiling SDPA and looking at the code, it happens that some overhead exists for the torch.nested backend, notably https://github.com/pytorch/pytorch/blob/49e964cad6c6f0241e08adb619bec637763888a8/aten/src/ATen/native/nested/cuda/NestedTensorTransformerFunctions.cpp#L228 which computes cumulative sequence length and maximum sequence length, especially this [to](https://github.com/pytorch/pytorch/blob/49e964cad6c6f0241e08adb619bec637763888a8/aten/src/ATen/native/nested/cuda/NestedTensorTransformerFunctions.cpp#L257C14-L257C14) operation. However, those are usually constants over different layers.

![image](https://github.com/pytorch/pytorch/assets/9808326/eed6e1bf-3611-4ebe-b102-82bac1fdbb4a)
(with code borrowed from the nice path in https://github.com/pytorch/pytorch/issues/105913, here max_seqlen=4096, pad percentage=0.4, batch_size=16, head_dim=128, num_heads=32)

As computing those stats only once [is recommended](https://github.com/Dao-AILab/flash-attention/issues/11#issuecomment-1156681278) for flash attention, it would be neat to be able to indeed compute them only once using PyTorch interface.

Related: https://github.com/huggingface/transformers/pull/25598

### Alternatives

/

### Additional context

/

cc @jbschlosser @bhosmer @cpuhrsch @erichan1 @drisspg @mikaylagawarecki
Repository: rust
Issue: Suggest using macro_use when trying to macro_export from a proc_macro
Labels: A-diagnostics,A-macros,T-compiler,D-newcomer-roadblock,D-terse

### Code

```Rust
// lib.rs of proc-macro crate
mod macros;
mod a_module;

// macros.rs
#[macro_export]
macro_rules! some_macro { ... }

// a_module.rs
some_macro!()
```


### Current output

```Shell
error: cannot export macro_rules! macros from a `proc-macro` crate type currently
  --> macros/src/macros.rs:14:1
   |
14 | macro_rules! some_macro {
   | ^^^^^^^^^^^^^^^^^^^^^^^
```


### Desired output

```Shell
error: cannot export macro_rules! macros from a `proc-macro` crate type currently
  --> macros/src/macros.rs:14:1
   |
14 | macro_rules! some_macro {
   | ^^^^^^^^^^^^^^^^^^^^^^^
   | 
   | help: to share macros between modules in a proc-macro crate, mark the module defining the macro as #[macro_use] or re-export the macro
```


### Rationale and extra context

proc-macro crates can only export proc macros and visibility of macro_rules is weird. The compiler error does not suggest what to do to use the macro in different modules.

The following code is invalid without a reexport of the macro 
```
pub use crate::macros::some_macro;
```


### Other cases

```Rust
// lib.rs of proc-macro crate
#[macro_use]
mod macros;
```

OR
```rust
// macros.rs
#[macro_export]
macro_rules! some_macro { ... }

pub(crate) use some_macro; // now the macro is available for use to everyone following normal visibility rules
```
fix the problem

### Anything else?

The output should code changes too. It's not clear which one of the fixes should be suggested
Repository: PowerToys
Issue: Power Rename Enumerate not working with dates and/or regex groups
Labels: Issue-Bug,Product-PowerRename,Area-Quality,Priority-2,Status-Reproducible

### Microsoft PowerToys version

**(EDIT 1)** tested with 0.73.0 and 0.74.1

### Installation method

Microsoft Store

### Running as admin

None

### Area(s) with issue?

PowerRename

### Steps to reproduce

**(EDIT 1)** ZIP FILE WITH SHORT .MP4 WITH REPRODUCTION
[powertoys_powerrename_bug.zip](https://github.com/microsoft/PowerToys/files/12550633/powertoys_powerrename_bug.zip)

**(EDIT 1)** EXTRA SCREENSHOTS REQUESTED

- folder structure
![folder_structure](https://github.com/microsoft/PowerToys/assets/2933045/64ed5968-176a-4b5c-8b88-9a1275e1d17c)

- enumerate not working: showing a dollar sign instead (at the end of the )
![enumerate_not_working___showing_dollar_sign_instead](https://github.com/microsoft/PowerToys/assets/2933045/25514a44-2125-490f-a1e0-8d079bbb8068)


So when using the syntax for enumerating items, `${}`, on the "Renamed" tab the numbers do not appear. I believe this might be related to the fact that I am also using the syntax to create a date (`$YYYY, $MM, $DD`, etc.). When using both it seems they don't play along well.

When using dates individually, all is fine.
When using `${}` individually, also fine.
When I mix both, `$YYYY` with `${}` or `$1` from regex groups, the *Renamed* column does not display the enumeration properly.
**(EDIT 1)** It shows a dollar sign instead.

I deeply apologize if this is a mistake on my part, but I think it is a bug.

### ✔️ Expected Behavior

_No response_

### ❌ Actual Behavior

_No response_

### Other Software

_No response_
Repository: opencv
Issue: [docs] Canny edge detector: `L2Gradient=True` arg description seems to not perfectly match the code
Labels: category: imgproc,category: documentation

### Describe the doc issue

In the [cv::Canny docs](https://docs.opencv.org/4.x/dd/d1a/group__imgproc__feature.html#ga04723e007ed888ddf11d9ba04e2232de) is specified: 
<img width="686" alt="image" src="https://github.com/opencv/opencv/assets/1041752/5244a121-9346-40c6-8ba8-13d60f599945">

that `sqrt(dx**2 + dy**2)` is used to compute gradient magnitude if `L2Gradient=True` is specified. But in the code https://github.com/opencv/opencv/blob/e8f94182f577894410cc59d5d20979dff69d8878/modules/imgproc/src/canny.cpp#L450

it seems that the square root is not performed. If I'm right, I guess this might influence that the passed `Threshold1` needs to be squared for the case of `L2Gradient=True` (as not the L2norm seems calculated, but L2-norm-squared)

### Fix suggestion

_No response_
Repository: pytorch
Issue: RuntimeError: tried to get Double out of SymFloat
Labels: triaged,oncall: pt2,module: dynamic shapes

### 🐛 Describe the bug

This test case

```
    def test_double_from_sym_float(self):
        def f(x, factor):
            return torch.sym_int(x.size(0) * factor)

        make_fx(f, tracing_mode="symbolic")(torch.randn(5, 4), torch.tensor(2.0))
```

fails with

```
======================================================================
ERROR: test_double_from_sym_float (__main__.TestSymbolicTracing)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/data/users/ezyang/b/pytorch/torch/testing/_internal/common_utils.py", line 2388, in wrapper
    method(*args, **kwargs)
  File "/data/users/ezyang/b/pytorch/test/test_proxy_tensor.py", line 1062, in test_double_from_sym_float
    make_fx(f, tracing_mode="symbolic")(torch.randn(5, 4), torch.tensor(2.0))
  File "/data/users/ezyang/b/pytorch/torch/fx/experimental/proxy_tensor.py", line 838, in wrapped
    t = dispatch_trace(wrap_key(func, args, fx_tracer, pre_dispatch), tracer=fx_tracer, concrete_args=tuple(phs))
  File "/data/users/ezyang/b/pytorch/torch/_compile.py", line 24, in inner
    return torch._dynamo.disable(fn, recursive)(*args, **kwargs)
  File "/data/users/ezyang/b/pytorch/torch/_dynamo/eval_frame.py", line 338, in _fn
    return fn(*args, **kwargs)
  File "/data/users/ezyang/b/pytorch/torch/_dynamo/external_utils.py", line 17, in inner
    return fn(*args, **kwargs)
  File "/data/users/ezyang/b/pytorch/torch/fx/experimental/proxy_tensor.py", line 461, in dispatch_trace
    graph = tracer.trace(root, concrete_args)
  File "/data/users/ezyang/b/pytorch/torch/fx/_symbolic_trace.py", line 817, in trace
    (self.create_arg(fn(*args)),),
  File "/data/users/ezyang/b/pytorch/torch/fx/experimental/proxy_tensor.py", line 497, in wrapped
    out = f(*tensors)
  File "/data/users/ezyang/b/pytorch/test/test_proxy_tensor.py", line 1060, in f
    return torch.sym_int(x.size(0) * factor)
  File "/data/users/ezyang/b/pytorch/torch/__init__.py", line 420, in sym_int
    return py_int(a)  # type: ignore[operator]
RuntimeError: tried to get Double out of SymFloat
```

A workaround is to write factor.item() instead of factor. There is probably a mistake in how we implement the Scalar extraction object, possibly on x.size(0) itself.

Test case extracted torchvision retinanet: https://github.com/pytorch/pytorch/issues/108337

### Versions

main

cc @msaroufim @wconstab @bdhirsh @anijain2305
Repository: vscode
Issue: Unit test info output in telemetry
Labels: debt,telemetry

We should stay away from logging to tests, esp. when we now have to find leak messages:

```
  AIAdapter
    ✔ Simple event
    ✔ addional data
[66705:0907/173543.231511:INFO:CONSOLE(149)] "Telemetry property: reallyLongPropertyValue has been trimmed to 8192, the original length is 20050", source: file:///Users/bpasero/Development/Microsoft/vscode/out/vs/platform/telemetry/common/telemetryUtils.js (149)
    ✔ property limits
    ✔ Different data types
    ✔ Nested data

  TelemetryService
    ✔ Disposing
    ✔ Simple event
    ✔ Event with data
    ✔ common properties added to *all* events, simple event
    ✔ common properties added to *all* events, event with data
    ✔ TelemetryInfo comes from properties
    ✔ telemetry on by default
[66705:0907/173543.286541:INFO:CONSOLE(768)] "FakeTimers: clearTimeout was invoked to clear a native timer instead of one created by this library.
To automatically clean-up native timers, use `shouldClearNativeTimers`.", source: /Users/bpasero/Development/Microsoft/vscode/node_modules/sinon/node_modules/@sinonjs/fake-timers/src/fake-timers-src.js (768)
    ✔ Error events
    ✔ Handle global errors
    ✔ Error Telemetry removes PII from filename with spaces
    ✔ Uncaught Error Telemetry r
```

```
  ExtHostTelemetry
    ✔ Validate sender instances
    ✔ Ensure logger gets proper telemetry level during initialization
    ✔ Simple log event to TelemetryLogger
    ✔ Simple log event to TelemetryLogger with options
    ✔ Ensure logger properly cleans PII
[66705:0907/173553.536909:INFO:CONSOLE(200)] "Below are logs for extension telemetry events sent to the telemetry output channel API once the log level is set to trace.", source: file:///Users/bpasero/Development/Microsoft/vscode/out/vs/workbench/api/test/browser/extHostTelemetry.test.js (200)
    ✔ Ensure output channel is logged to
```
Repository: TypeScript
Issue: `ReturnType` and `InstanceType` don't work for functions/constructors with `never` in their parameters
Labels: Suggestion,Help Wanted,Domain: lib.d.ts,Experimentation Needed,Effort: Casual

### 🔎 Search Terms

ReturnType InstanceType any never

### 🕗 Version & Regression Information

- This is the behavior in every version I tried, and I reviewed the FAQ for entries about `ReturnType` and `InstanceType`.

### ⏯ Playground Link

https://www.typescriptlang.org/play#code/C4TwDgpgBA+gjFAvFAShYBXATgOwCrgQA8AFAHQUCGWA5gM4BcUOEAbhFgJRIB8UA5ADMA9sP48AUAHopUOQD0A-BImhIsAExIoASRx1glHAGMIBSERYB3KOSq1GzNh26I+Q0eOmyFioA

### 💻 Code

```ts
type _1 = ReturnType<(...args: never) => 'foo'>
//   ^? type _1 = any

type _2 = InstanceType<new (...args: never) => 'foo'>
//   ^? type _2 = any
```


### 🙁 Actual behavior

`ReturnType` and `InstanceType` always evaluate to `any` when given a function/constructor whose parameters are `...args: never` (or `...args: never[]`, `a: never, b: string`, etc).

### 🙂 Expected behavior

`ReturnType` and `InstanceType` should return the actual return/instance type.

### Additional information about the issue

Changing the parameter constraint in the conditions of these types from `any` to `never` seems to fix the issue:

```ts
type ReturnType<T extends (...args: any) => any> = T extends (...args: never) => infer R ? R : any

type InstanceType<T extends abstract new (...args: any) => any> = T extends abstract new (...args: never) => infer R ? R : any
```

I don't think this will cause any regressions, and did some spot-checking to validate that, but haven't run the entire test suite or anything like that yet.
Repository: excalidraw
Issue: Sidebar.onClose should fire only on close not on open
Labels: package:excalidraw

## Expected Behavior
The onClose prop of the Sidebar component fires only when the sidebar is closed.

## Actual Behavior
The onClose prop of the Sidebar component fires both when the sidebar is opened and closed.
Repository: pytorch
Issue: Collect more env variables in `collect_env.py`
Labels: triaged,needs research

### 🚀 The feature, motivation and pitch

`torch.utils.collect_env` is a script that collects certain information about a user's OS, setup and hardware. The current bug report template asks every bug reporter to include this script's output so that PyTorch maintainers can track down bugs more easily. 

While the script already collects a lot of information, there are multiple environment variables controlling `torch`'s behavior that are not included in the output. Some examples:

- `TORCH_ALLOW_TF32_CUBLAS_OVERRIDE`
- `TORCH_LINALG_PREFER_CUSOLVER`
- `TORCH_CUDNN_USE_HEURISTIC_MODE_B`
- `TORCH_NCCL_USE_COMM_NONBLOCKING`
- `CUBLAS_WORKSPACE_CONFIG`
- `NVIDIA_TF32_OVERRIDE`
- and many more ...

My proposal is to add all environment variables starting with either `TORCH_`, `PYTORCH_`, `CUBLAS_` or `NVIDIA_` to `collect_env`'s output. This might be helpful to reproduce and track down bugs.

Possible downsides: Environment variables might contain personal information, such as the user's name. It should, however, be possible to minimize this risk by stripping/replacing certain parts based on some simple heuristics.

### Alternatives

_No response_

### Additional context

I can work on a PR myself, if this is considered a useful addition.
Repository: godot
Issue: Models with armatures/rigging from blender is broken.
Labels: bug,topic:import

### Godot version

4.1.1 [bd6af8e0e]

### System information

Godot v4.1.1.stable - Windows 6.3.9600 - Vulkan (Compatibility) - Intel(R) HD Graphics 4400 () - Intel(R) Core(TM) i3-4005U CPU @ 1.70GHz (4 Threads)

### Issue description

As title says. I imported a model with an armature from blender using the .gITF export, .blend (that gets converted to gITF automatically), or FBX to gITF (using the plugin) and its not working as intended. using only deformation bones, +y up.

Tested with a base model.
![image](https://github.com/godotengine/godot/assets/144369587/ff7535fb-acfc-4a81-a424-4a49f4e00cc8)
![image](https://github.com/godotengine/godot/assets/144369587/e4e95df6-8a23-48c3-afe7-c36a8a74a699)

Tested with a cube
![image](https://github.com/godotengine/godot/assets/144369587/06a3ae75-d9db-40b3-a11e-5a4e9a452209)
![image](https://github.com/godotengine/godot/assets/144369587/7316a3ed-9c80-41c9-936b-3791629840d6)

**How do you expect it to work instead**
Same as Godot 3.5.2 LTS. I exported the models there and there seems to be no problems with armatures.

### Steps to reproduce

1. Make a cube + add an armature then rig automatic weights in blender 3.4.1
2. Export cube as gITF or save directly to godot project

### Minimal reproduction project

N/A
Repository: node
Issue: Discussion: Name of the flag for the “ESM by default” mode
Labels: module,cli,esm

Building off of https://github.com/nodejs/node/issues/49432, what should the flag be named for this proposed new mode? Yes, this is the bikeshed thread.

I think we have a few constraints:
- Whatever we choose needs to begin with `--experimental` (for now, until it goes stable).
- It needs to either be a flag that takes a value, like our existing `--input-type=module` / `--input-type=commonjs`; or have an obvious opposite, so that if/when this new mode becomes the new Node default there’s some way to opt back into the previous CommonJS-first behavior.
- If it takes a value, those values should be `module` and `commonjs` for consistency with the existing `--input-type` and the `package.json` `"type"` field.
- We shouldn’t pick `--experimental-module` because there was a prior flag named `--experimental-modules` which still exists as a noop, and it would be confusing to users if nothing happens when they try to use the flag but made a typo.

Please vote using emoji:

- 🚀  `--experimental-type=module` / `--experimental-type=commonjs`
- 🎉  `--experimental-default-type=module` / `--experimental-default-type=commonjs`
- ❤️  `--experimental-implicit-type=module` / `--experimental-implicit-type=commonjs`
- 👀  `--experimental-esm-by-default` / `--no-experimental-esm-by-default`
Repository: PowerToys
Issue: FancyZones - keyboard shortcut to span particular zones
Labels: Idea-Enhancement,FancyZones-Editor,FancyZones-Layouts

### Description of the new feature / enhancement

I can span zones with the mouse and dragging to the boundary between zones, but it would be quicker to have a keyboard shortcut to say "put current window in zone config" where zone configs can be defined as a start zone+stop zone.

### Scenario when this would be used?

I would use this multiple times each day.  I have three monitors and I want to span two monitors with my Visual Studio window.  Undocking and redocking my PC causes me to have to re-span multiple Visual Studio instances.  Also, I have to re-span every time I open a new solution in VS.

Maybe another way would be to set a default zone config for an app (or maybe for a file associated with an app, like each .sln could get its own default zone config).

And...why not save which zones each app is spanning and restore that when the monitor config changes (dock and redock or oops, I powered off a monitor by accident).

### Supporting information

_No response_
Repository: PowerToys
Issue: Crop and Lock zoom
Labels: Needs-Triage,Needs-Team-Response

### Description of the new feature / enhancement

It would be great if the crop and lock function also had a zoom or resize feature. So crop and lock the section of the window you desire, then grab a handle and resize the window to what you want, enlarging (magnifying) the contents of the window.

### Scenario when this would be used?

There are many programs whose font size or general look is too small for modern screens. Though there are some magnifying applications, they are more like lenses where everything is magnified in a certain area or the whole screen is magnified. Some also let you change font size, but that doesn't work in many applications. It would be great to be able to lock the area you want cropped and just zoom that (by grabbing the window edge/corner and dragging).

See example attached.

![image](https://github.com/microsoft/PowerToys/assets/12972565/8f3cacf0-c206-4104-89cd-9dc7698aaf9d)


### Supporting information

_No response_
Repository: vscode
Issue: New terminal not opening in default project path in remote connection
Labels: bug,remote,terminal-process

<!-- ⚠️⚠️ 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?: Yes

<!-- 🪓 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. -->
- VS Code Version: 1.81.1
- OS Version: 22H2

Steps to Reproduce:

1. Open wsl terminal on Windows 10 os
2. Clone and/or access a project within a wsl directory using terminal
3. Type 'code .' to launch VScode in the current directory
4. In VScode click on the 'Terminal' tab and then 'New Terminal'
5. Notice that the default file path is not where the project you opened is located in. This doesn't occur when using VScode without a remote connection.
Repository: PowerToys
Issue: Search in keyboard manager
Labels: Idea-Enhancement,Product-Keyboard Shortcut Manager,Needs-Triage,Needs-Team-Response

### Description of the new feature / enhancement

I would like to propose an enhancement to the software that allows for more efficient management of custom keyboard shortcuts. Currently, it can be challenging to locate and edit existing shortcuts if you have many of them.

### Scenario when this would be used?

when creating new shortcuts

### Supporting information

This proposed feature would enhance usability and efficiency for users who regularly utilize custom keyboard shortcuts. It would make organizing and editing shortcuts more straightforward, and also simplify the process of adding new ones.

I believe that this feature would be a significant asset to many users and help make the software even more user-friendly
Repository: flutter
Issue: Reinstate mac-328-g140 when issues are resolved
Labels: team-infra,P3,infra: device lab,triaged-infra

### Is there an existing issue for this?

- [X] I have searched the [existing infra issues](https://github.com/flutter/flutter/issues?q=is%3Aopen+is%3Aissue+label%3Ateam-infra)

### Type of Request

infra task

### Infrastructure Environment

Devicelab

### What is happening?

https://chromium-swarm.appspot.com/bot?id=mac-328-g140 was removed due to https://github.com/flutter/flutter/issues/134222

This issue is to track its reinstatement after the original issue is resolved.

### Steps to reproduce

_No response_

### Expected results

_No response_
Repository: next.js
Issue: ISR + Vercel: next/link STILL doesn't trigger revalidation
Labels: bug,Pages Router

### Link to the code that reproduces this issue or a replay of the bug

https://github.com/sdjnes/vercel-next-isr-test

### To Reproduce

A repository with a MRE: https://github.com/sdjnes/vercel-next-isr-test (update to the latest versions)

### Current vs. Expected behavior

The same issue was reported, marked as fixed in `v13.4.1` and closed - #43289 

However the issue is still present tho. I used the latest Next.js version but the revalidate still only works after a hard refresh (CMD + R) or directly using the specific url of the page. Navigating with <Link /> is showing old data.

@ijjk you seem to have test this on `localhost` where it works as expected. However when testing it on a Vercel deployment it is still not fixed.

Here is a video of the problem. As you can see, when navigating using <Link /> the data doesn't revalidate. Only once I do a hard refresh the time seems to update.

https://github.com/vercel/next.js/assets/57874728/27936dd3-072a-4615-8c56-9adf34bc539a



### Verify canary release

- [X] I verified that the issue exists in the latest Next.js canary release

### Provide environment information

```bash
Operating System:
      Platform: darwin
      Arch: arm64
      Version: Darwin Kernel Version 22.2.0: Fri Nov 11 02:03:51 PST 2022; root:xnu-8792.61.2~4/RELEASE_ARM64_T6000
    Binaries:
      Node: 16.16.0
      npm: 8.11.0
      Yarn: 1.22.19
      pnpm: N/A
    Relevant Packages:
      next: 13.4.19
      eslint-config-next: 13.3.4
      react: 18.2.0
      react-dom: 18.2.0
      typescript: 5.0.4
    Next.js Config:
      output: N/A
```


### Which area(s) are affected? (Select all that apply)

Data fetching (gS(S)P, getInitialProps)

### Additional context

_No response_