sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: vscode
Issue: I should be able to select multiple lines of python code and hit control F and it automatically imports it into the search box...
Labels: editor-find,under-discussion

<!-- ⚠️⚠️ 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. -->
GPT generated this for me so I'll just preface it by saying with the utmost respect so I can maintain my super fast workflow..............................I find it quite illogical and limiting that Visual Studio Code does not provide an option to automatically place selected multiple lines of text into the find box with Ctrl+F. For developers, especially those working with Python, this functionality is incredibly useful. Every time I manually copy and paste multiple lines into the search box, it accurately finds the relevant code without any issues. Therefore, it would be highly beneficial to at least offer a setting that users can enable to allow multi-line selections to be placed into the search box. This would enhance the search experience without compromising the simplicity and efficiency for those who do not need this feature...... And another vital a completely logical thing that I think should be added is obviously after you select any sort of text you know and it goes into the fine box obviously you should be able to select another selection and press control H and of course it would automatically be input into the replace box this seems like a misstep and may I say the only misstep because you guys really did everything else perfectly and made the best code editor in the world....
Repository: flutter
Issue: Regression in `bench_update_many_child_layers.canvaskit.drawFrameDuration.outlierRatio`
Labels: c: regression,c: performance,platform-web,perf: speed,P2,team-web,triaged-web

Introduced in https://github.com/flutter/flutter/pull/150940

https://flutter-flutter-perf.skia.org/e/?keys=X1a6f32f856f0314a8209f5f217db41fb&selected=commit%3D41380%26name%3D%252Carch%253Dintel%252Cbranch%253Dmaster%252Cconfig%253Ddefault%252Cdevice_type%253Dnone%252Cdevice_version%253Dnone%252Chost_type%253Dlinux%252Csub_result%253Dbench_update_many_child_layers.canvaskit.drawFrameDuration.outlierRatio%252Ctest%253Dweb_benchmarks_canvaskit%252C&xbaroffset=41380
Repository: pytorch
Issue: [pipelining] Non-first stage only takes tensors
Labels: triaged,module: pipelining

## Problem

Currently `input_args` argument for [`PipelineStage`](https://pytorch.org/docs/main/distributed.pipelining.html#torch.distributed.pipelining.stage.PipelineStage) only supports tensors because we create tensors as recv buffers for non-first stages to receive these arguments. Due to this limitation, if the model partition `forward` outputs something like `tensor, None` this is not supported. Also, if the input argument signature to a models forward  contains a mix of args and kwargs (e.g. `tokens, input_tensor=None, ...`), the entire argument list must be passed in and kwargs cannot be used selectively.

## Possible Solutions

- Add support for non-tensor arguments by performing an additional P2P communication (send/recv) to communicate the metadata of the arguments. We can leverage [send_object_list](https://pytorch.org/docs/main/distributed.html#torch.distributed.send_object_list) for this. This can be optional and only turned on if there are any non-tensor arguments, otherwise just use regular send/recv.
- Provide the user a transform function in `PipelineStage constructor` which allows users to dictate how the args and kwargs will be passed into the model's forward. Also solves issues mentioned in https://github.com/pytorch/pytorch/issues/130058 because we can pass in schedule state arguments.

## Plan of changes
1. Update `PipelineStage` constructor such that it takes `input_args` and `input_kwargs` of any type. Update recv_buffer and send_buffer creation such that it will only create buffers for tensors and ignore others.
2. Add custom transform function to `PipelineStage` to allow users to transform the `args`, `kwargs`, `retrieved_args`, and also pass in relevant current Stage information.
3. Add support for communicating non-tensor args by using `send_object_list` or something equivalent to exchange metadata before the real data is sent.
Repository: pytorch
Issue: [pipelining] Expose a transform function to inject additional metadata into model forward
Labels: triaged,module: pipelining

In the forward logic of the model chunks, there may be some arguments related to pipeline state that the logic is dependent on such as 
- current stage index
- current microbatch id

We can add a transform function in the `PipelineStage` init that adds kwargs in a certain predefined format and naming and passes that into the forward function to use.
Repository: TypeScript
Issue: Move to new file refactor misses shorthand property referencing import
Labels: Bug,Help Wanted

### 🔎 Search Terms

shorthand property refactor

### 🕗 Version & Regression Information

- This is the behavior in every version I tried, and I reviewed the FAQ for entries about shorthand properties


### ⏯ Playground Link

https://www.typescriptlang.org/play/?#code/JYWwDg9gTgLgBAZxtApnAZlCI4CIB0A9EqrgNwBQFhhcAbggMYQAmaAtAHxwBKK6AQ0bIocLnACyEOmmRwAdigDuGYABsUVGpOnB5AczgwAFsAQYArvOHAI8uEvVq4UFDAF6jxtKEiwKKAAefvDoVjZ2cAIAFACUcADeFHApcMzyCBAa+GoQ+tEJJK4AvrGUxVq0UnR6hiZmltYwtvaOas6uINKy3nC+0DABwQONEfYARnGJyanpmdm5+UUoZRQVQA

### 💻 Code

```ts
import store from "./store";

// vscode -> Refactor -> Move to new file

// Moving this function will retain the import
export function a() {
    console.log({store});
}

// Moving this function will remove the import
export function b() {
    console.log(store);
}
```


### 🙁 Actual behavior

Import statement is removed when function `b` is removed.


### 🙂 Expected behavior

Import statement is retained when function `b` is removed because it's used by function `a`.


### Additional information about the issue

Happens in vscode and when using `LanguageService.getEditsForRefactor`.
Repository: rust
Issue: Tracking Issue for PathBuf::add_extension and Path::with_added_extension
Labels: T-libs-api,C-tracking-issue,disposition-merge,finished-final-comment-period

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

This is a tracking issue for

* `PathBuf::add_extension`
* `Path::with_added_extension `
 
### Public API

```rust
impl PathBuf {
    pub fn add_extension<S: AsRef<OsStr>>(&mut self, extension: S) -> bool { ... )
}

impl Path {
    pub fn with_added_extension<S: AsRef<OsStr>>(&self, extension: S) -> PathBuf { ... }
}
```

### Steps / History

* [x]  ACP: https://github.com/rust-lang/libs-team/issues/368
* [x]  Implementation: https://github.com/rust-lang/rust/pull/123600/
* [ ]  Final comment period (FCP)
* [ ]  Stabilization PR

 
### Unresolved Questions

None yet.

## Footnotes

1. https://std-dev-guide.rust-lang.org/feature-lifecycle/stabilization.html [↩](#user-content-fnref-1-39877e12402a53c830c980b62b917a0e)
Repository: PowerToys
Issue: Monaco source code file preview interferes with HTML preview in Outlook
Labels: Issue-Bug,Needs-Triage

### Microsoft PowerToys version

0.82.0

### Installation method

PowerToys auto-update

### Running as admin

Yes

### Area(s) with issue?

File Explorer: Preview Pane

### Steps to reproduce

1. In PowerTools settings, select File Explorer add-ons > Preview Pane.
2. Turn On Source code files (Monaco)
3. Open an email message in Microsoft Outlook that has an attached .html file.
4. Click on the attached .html file

### ✔️ Expected Behavior

The expected result is that the .html file should be previewed in Outlook.

### ❌ Actual Behavior

Outlook gives error "This file cannot be previewed because there is no previewer installed for it".

Note that Outlook can preview other file types. And if the Monaco preview handler is turned off, then Outlook can preview .html again.

This is _especially_ unexpected behavior because .html is not a source code file format.

### Other Software

Windows 11 Enterprise version 23H2
Microsoft® Outlook® for Microsoft 365 MSO (Version 2308 Build 16.0.16731.20542) 64-bit
The default browser is Firefox 127.0.2, i.e. that's what is used to preview the .html file
Repository: godot
Issue: Detect and warn when available system RAM is too low for LTO compilation to succeed in SCons
Labels: enhancement,topic:buildsystem

### Tested versions

- Godot 4.3 dev [6a13fdc]

### System information

kde neon 6.1, 6gb ram, apu

### Issue description

I have been trying to compile Godot in the latest master when i compile the web export template it hangs with:

```console
[ 76%] Linking Program bin/godot.web.template_release.wasm32.js ...
[ 78%] em++: warning: -pthread + ALLOW_MEMORY_GROWTH may run non-wasm code slowly, see https://github.com/WebAssembly/design/issues/1271 [-Wpthreads-mem-growth]
[ 96%] Building compilation database compile_commands.json
[100%] progress_finish(["progress_finish"], [])
```

it hangs like this for a really long time and i end up stopping it.
I want to build the web release template by tripping some parts of the engine that i don't need and using encription.
Without lto the template compiles but even with all the engine part stripped it still a little bigger than the default Godot 4.2 stable web template.

Here is the configuration i used:

`scons platform=web target=template_release profile=custom.py`

With custom.py containing the following:
```python
production = "yes"
lto = "full"
optimize = "size"
deprecated = "no"
minizip = "no"
vulkan = "no"
module_bmp_enabled = "no"
module_camera_enabled = "no"
module_csg_enabled = "no"
module_enet_enabled = "no"
module_hdr_enabled = "no"
module_jsonrpc_enabled = "no"
module_mbedtls_enabled = "no"
module_minimp3_enabled = "no"
module_mobile_vr_enabled = "no"
module_multiplayer_enabled = "no"
module_openxr_enabled = "no"
module_theora_enabled = "no"
module_upnp_enabled = "no"
module_vhacd_enabled = "no"
module_webrtc_enabled = "no"
module_websocket_enabled = "no"
module_webxr_enabled = "no"
module_zip_enabled = "no"
module_text_server_fb_enabled = "yes"
module_text_server_adv_enabled = "no"
module_mono_enabled = "no"
```

`emcc --version` is 3.1.61

I'm new to compiling Godot and it take a long time to compile on my pc, i'm not sure if this is a bug or that it just take too long to compile. 




### Steps to reproduce

`scons platform=web target=template_release profile=custom.py`

### Minimal reproduction project (MRP)

[custom.zip](https://github.com/user-attachments/files/16090847/custom.zip)
Repository: tauri
Issue: [bug] When building on Windows Tauri modifies embedded resources, driver installation files .inf, making them fail
Labels: type: bug,platform: Windows,status: needs triage

### Describe the bug

I am trying to install OpenVPN Tap driver on Windows. Required driver files are embedded as additional files https://v2.tauri.app/develop/resources/.

Interestingly when built on on Mac/Linux everything is fine. When built on Windows .inf file for some reason is different and driver installation fails. You can reproduces this yourself by building application on Windows and then trying to run driver install command.

### Reproduction

Reproduction https://github.com/minht11/tauri-inf-issue

When application is installed, go to install directory -> resources/tap-unzipped/amd64 and run "./devcon.exe" install ./OemVista.inf tap0901 command.

When application is installed, go to install directory -> `resources/tap-unzipped/amd64`  and run
`"./devcon.exe" install ./OemVista.inf tap0901` command.
- If built on Mac/Linux it will succeed.
- If built on Windows it will fail.

Now unzip `resources/tap.zip` and try running the same command, it should succeed.

Tauri does something to files on Windows when embedding resource files, the `OemVista.inf` file size is slightly different as well. The workaround I found was to use zip file.

> When testing this it is STRONGLY recommended to run installer inside Windows Sandbox because this installs a driver.

### Expected behavior

No modification to .inf files

### Full `tauri info` output

```text
[✔] Environment
    - OS: Mac OS 14.5.0 X64
    ✔ Xcode Command Line Tools: installed
    ✔ rustc: 1.79.0 (129f3b996 2024-06-10)
    ✔ cargo: 1.79.0 (ffa9cf99a 2024-06-03)
    ✔ rustup: 1.27.1 (54dd3d00f 2024-04-24)
    ✔ Rust toolchain: 1.79.0-aarch64-apple-darwin (environment override by RUSTUP_TOOLCHAIN)
    - node: 20.11.1
    - pnpm: 9.1.3
    - npm: 10.2.4

[-] Packages
    - tauri [RUST]: 2.0.0-beta.22
    - tauri-build [RUST]: 2.0.0-beta.17
    - wry [RUST]: 0.40.1
    - tao [RUST]: 0.28.1
    - tauri-cli [RUST]: 2.0.0-beta.20
    - @tauri-apps/api [NPM]: 2.0.0-beta.13
    - @tauri-apps/cli [NPM]: 2.0.0-beta.20

[-] App
    - build-type: bundle
    - CSP: unset
    - frontendDist: ../frontend/dist
    - devUrl: http://localhost:1420/
```


### Stack trace

_No response_

### Additional context

I discovered this as part of original issue I had with https://github.com/tauri-apps/tauri/issues/10164
Repository: TypeScript
Issue: switch-true case-true narrowing not equivalent to default case.
Labels: Help Wanted,Possible Improvement

### 🔎 Search Terms

`"switch true"` `"switch-true"` `switch true narrowing`.  Most issues that turned up were from 2023 which I think precedes the release of the switch-true type narrowing feature?

### 🕗 Version & Regression Information

- This is a gap

### ⏯ Playground Link

https://www.typescriptlang.org/play/?ts=5.6.0-dev.20240703&ssl=22&ssc=1&pln=12&pc=1#code/GYVwdgxgLglg9mABHA1gQwJ4AoZgA4hQBciAzlAE64DmAlIiQEQCCjAPowELuMDCjiAN4AoRGLIB3GFAgALRFkogApvRHiNiCGlLLEAejT6AdFGXkc+QrSKjN9isqggKSFowDcd+9t0GARiZmFrgEUDbe9uKOzq6IXJ6RGgAmysBoIAA2xElRMS5u-F4aAL7CZcKgkLAIiCCycLKWYSTkVGB0DPGsHNwc-EKRpFIy8ooUKmq5Yr56hkHmUM3WtlGa+XHuxVGzAQshVuGra9FOBfHc2z46ekrKxyeIG4WJpeXCQA

### 💻 Code

```ts
function uhoh(input: string) : "A"|"B"|"C" {
    switch (true) {
        case /a/.test(input):
            return "A";
        case /b/.test(input):
            return "B";
        case true: // <--- default: works fine here
            return "C";
    }
}
```

### 🙁 Actual behavior

Complains that the result of `uhoh` could be undefined.

### 🙂 Expected behavior

`switch(true) { case true: }` should behave like `switch(true) { default: }`, probably?

### Additional information about the issue

<img width="810" alt="image" src="https://github.com/microsoft/TypeScript/assets/719818/79d73ec3-0967-4448-a69c-6f845081bd0e">
Repository: vscode
Issue: Allowing resolving ChatResponseAnchorPart async
Labels: feature-request,api,chat

Related to #217907

We need to create links for symbols in chat responses. However knowing if text is a valid link or not may be expensive since it requires resolving the symbol

I'd like to be able to fill in / change `ChatResponseAnchorPart` after creating it. This currently doesn't appear to be possible

Possible flow could be something like:

1. Chat response stream creates an `ChatResponseAnchorPart` for a potential link. This is not yet rendered as a link
2. Extension kicks off a task to try seeing if it's a valid link
3. If the link is valid, we change the properties on the existing `ChatResponseAnchorPart` (specifically the title and uri). This causes it to now be rendered as a link in the response
Repository: ollama
Issue: Available memory calculation on AMD APU no longer takes GTT into account
Labels: bug,amd,gpu

### What is the issue?

First I have to acknowledge that I understand that officially running on 780m GPU is not supported. However for some scenarios it performs better than pure CPU and in others it's perhaps more power efficient to run on the GPU.
Perhaps this could also be relevant for bigger GPUs that are supported as the patch states:
```
The solution is MI300A approach, i.e., let VRAM allocations go to GTT.
Then device and host can flexibly and effectively share memory resource.
```
However I have to admit that the last part is just my speculation.

In any case `6.10` kernel release candidates have an improved GPU memory allocation which now allows computational workloads to utilize `GTT` in addition to `VRAM` as opposed to just `VRAM` before. More details [here](https://www.phoronix.com/news/Linux-6.10-AMDKFD-Small-APUs). I believe [this](https://gitlab.freedesktop.org/drm/kernel/-/commit/89773b85599affe89dfc030aa1cb70d6ca7de4d3) to be the relevant commit.

In practice what it means is that on my laptop with 64 GB of memory I can play around with bigger models. Prior to `0.1.45` I see the following in the logs:
```
level=INFO source=types.go:71 msg="inference compute" id=0 library=rocm compute=gfx1103 driver=0.0 name=1002:15bf total="27.3 GiB" available="27.3 GiB"
```
While this is perhaps still less than what is actually available:
```
kernel: [drm] amdgpu: 8192M of VRAM memory ready
kernel: [drm] amdgpu: 27940M of GTT memory ready.
```
it still allows to work with models that are bigger than 8 GBs that still offer reasonable performance on the 780m GPU.

It would be nice to be able to continue to be able to use that extra memory in the future. Ideally being able to access `VRAM`+`GTT`, e.g. 36 GBs would be even better.

I suspect that [this commit](https://github.com/ollama/ollama/commit/b32ebb4f2990817403484d50974077a5c52a4677) introduced some changes to how available memory is calculated. Starting from `0.1.45` I see the following in the logs:
```
level=INFO source=types.go:98 msg="inference compute" id=0 library=rocm compute=gfx1103 driver=0.0 name=1002:15bf total="8.0 GiB" available="6.4 GiB"
```
The new way of calculating the available memory does a better job of determining the actual  available free memory but ideally it would be nice if would run this calculation against `VRAM`+`GTT`.

### OS

Arch (6.10.0-rc6-1-mainline) + docker container

### GPU

AMD

### CPU

AMD

### Ollama version

0.1.48-rocm
Repository: next.js
Issue: Weird Server Actions bug when naming a path for a file
Labels: bug,Script (next/script),Runtime

### Link to the code that reproduces this issue

https://codesandbox.io/p/sandbox/nextjs-error-code-fccprj

### To Reproduce

In my project, when some server action is called it calls the function saveFile, which looks like this:

```ts
async function saveFile(
  file: File,
  documentHash: string
) {
  const data = await file.arrayBuffer();
  await fs.appendFile(`./public/${documentHash}.pdf`, Buffer.from(data));
  return;
}
```
this goes well without any errors, however, when just changing the code to:

```ts
async function saveFile(
  file: File,
  documentHash: string
) {
  const data = await file.arrayBuffer();
  const path = `./public/assets/materials/${documentHash}.${file.name.split(".").pop()}`;
  await fs.appendFile(path, Buffer.from(data));
  return;
}
```

I tried many ways to add the file extension to the file path, but all of them caused the same error:

```
Error: Only plain objects, and a few built-ins, can be passed to Client Components from Server Components. Classes or null prototypes are not supported.
    at stringify (<anonymous>)
```


### Current vs. Expected behavior

It is expected to have the file name with the proper extension, but this not happening

### Provide environment information

```bash
Operating System:
  Platform: win32
  Arch: x64
  Version: Windows 10 Pro
  Available memory (MB): 16126
  Available CPU cores: 20
Binaries:
  Node: 21.5.0
  npm: N/A
  Yarn: N/A
  pnpm: N/A
Relevant Packages:
  next: 14.2.4 // Latest available version is detected (14.2.4).
  eslint-config-next: 14.2.4
  react: 18.3.1
  react-dom: 18.3.1
  typescript: 5.5.2
Next.js Config:
  output: N/A
```


### Which area(s) are affected? (Select all that apply)

Runtime, Script (next/script)

### Which stage(s) are affected? (Select all that apply)

next dev (local)

### Additional context

_No response_
Repository: pytorch
Issue: Meta device not supported with autocast
Labels: triaged,module: amp (automated mixed precision)

### 🐛 Describe the bug

While looking at https://github.com/pytorch/pytorch/issues/128394, we ran into the error that autocast does not support meta device being passed in.

This shows up in transformers's [modeling_llama.py](https://github.com/huggingface/transformers/blob/048f599f3506e57e0a595b455d9d2834c8d45023/src/transformers/models/llama/modeling_llama.py#L115)

A small repro is:
```
    def test_autocast(self):
        if not torch.cuda.is_bf16_supported():
            raise unittest.SkipTest("requires bf16")

        class MyModule(torch.nn.Module):
            def __init__(self):
                super().__init__()
                self.a_float32 = torch.rand((8, 8), device="cuda")
                self.b_float32 = torch.rand((8, 8), device="cuda")
                self.d_float32 = torch.rand((8, 8), device="cuda")

            def forward(self, x):
                device_type = x.device.type
                device_type = device_type if isinstance(device_type, str) else "cpu"
                with torch.autocast(device_type, enabled=False):
                    e_float16 = torch.mm(self.a_float32, self.b_float32)
                    f_float16 = torch.mm(self.d_float32, e_float16)
                return f_float16

        module = MyModule().to("meta")
        inp = (torch.tensor([0.5], device="meta"),)
        real = module(*inp)
```
With the error being:
```
Traceback (most recent call last):
  File "/data/users/angelayi/pytorch/torch/testing/_internal/common_utils.py", line 2739, in wrapper
    method(*args, **kwargs)
  File "/data/users/angelayi/pytorch/test/export/test_export.py", line 5433, in test_autocast
    real = module(*inp)
  File "/data/users/angelayi/pytorch/torch/nn/modules/module.py", line 1714, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)
  File "/data/users/angelayi/pytorch/torch/nn/modules/module.py", line 1725, in _call_impl
    return forward_call(*args, **kwargs)
  File "/data/users/angelayi/pytorch/test/export/test_export.py", line 5426, in forward
    with torch.autocast(device_type, enabled=False):
  File "/data/users/angelayi/pytorch/torch/amp/autocast_mode.py", line 230, in __init__
    dtype = torch.get_autocast_dtype(device_type)
RuntimeError: unsupported scalarType
```

### Versions

main

cc @mcarilli @ptrblck @leslie-fang-intel @jgong5