sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: tensorflow
Issue: GlobalAveragePooling1D fails with empty inputs and a mask
Labels: stat:awaiting tensorflower,type:bug,comp:keras,TF 2.15

### Issue type

Bug

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

No

### Source

source

### TensorFlow version

2.15.0

### Custom code

No

### OS platform and distribution

_No response_

### Mobile device

_No response_

### Python version

3.10.12

### Bazel version

_No response_

### GCC/compiler version

_No response_

### CUDA/cuDNN version

_No response_

### GPU model and memory

_No response_

### Current behavior?

`tf.keras.layers.GlobalAveragePooling1D` cannot be called on an empty tensor with an empty mask. This can cause issue when using a model that uses this layer under a distributed strategy, e.g. `MirroredStrategy`, which will distribute the data over multiple GPUs. For instance, for a dataset with 3 samples, a batch_size of 2 and 3 GPUs, one of the GPUs will have empty batches which will cause the error.

This is due to the casting `math_ops.cast(mask, inputs[0].dtype)` in `GlobalAveragePooling1D::call()` which implies a non-empty inputs tensor, while `math_ops.cast(mask, inputs.dtype`) should do the trick without causing the error.

### Standalone code to reproduce the issue

```shell
import tensorflow as tf
import numpy as np

x = np.random.rand(0, 3, 4)
mask = np.random.rand(0, 3)
print(x, mask)

y = tf.keras.layers.GlobalAveragePooling1D()(x, mask=mask)
print(y)
```


### Relevant log output

```shell
[] []
---------------------------------------------------------------------------
InvalidArgumentError                      Traceback (most recent call last)
<ipython-input-20-0f7c323aaaab> in <cell line: 7>()
      5 print(x, mask)
      6 
----> 7 y = tf.keras.layers.GlobalAveragePooling1D()(x, mask=mask)
      8 print(y)

1 frames
/usr/local/lib/python3.10/dist-packages/keras/src/utils/traceback_utils.py in error_handler(*args, **kwargs)
     68             # To get the full stack trace, call:
     69             # `tf.debugging.disable_traceback_filtering()`
---> 70             raise e.with_traceback(filtered_tb) from None
     71         finally:
     72             del filtered_tb

/usr/local/lib/python3.10/dist-packages/tensorflow/python/framework/ops.py in raise_from_not_ok_status(e, name)
   5881 def raise_from_not_ok_status(e, name) -> NoReturn:
   5882   e.message += (" name: " + str(name if name is not None else ""))
-> 5883   raise core._status_to_exception(e) from None  # pylint: disable=protected-access
   5884 
   5885 

InvalidArgumentError: Exception encountered when calling layer 'global_average_pooling1d_8' (type GlobalAveragePooling1D).

{{function_node __wrapped__StridedSlice_device_/job:localhost/replica:0/task:0/device:CPU:0}} slice index 0 of dimension 0 out of bounds. [Op:StridedSlice] name: global_average_pooling1d_8/strided_slice/

Call arguments received by layer 'global_average_pooling1d_8' (type GlobalAveragePooling1D):
  • inputs=tf.Tensor(shape=(0, 3, 4), dtype=float32)
  • mask=array([], shape=(0, 3), dtype=float64)
```
Repository: rust
Issue: In presence of `impl <T: Trait1> Trait2 for T`, when `X: Trait2` fails, Rust guides you towards satisfying `X: Trait1` instead of `X: Trait2`
Labels: A-diagnostics,T-compiler,E-needs-mcve

### Code

```Rust
use rayon::iter::{IntoParallelIterator, ParallelIterator};

pub fn parallelize<T>(v: Vec<T>) -> impl ParallelIterator<Item = T>
where
    // T: Send,
{
    v.into_par_iter()
}
```


### Current output

```Shell
error[E0599]: the method `into_par_iter` exists for struct `Vec<T>`, but its trait bounds were not satisfied
 --> src/lib.rs:7:7
  |
7 |     v.into_par_iter()
  |       ^^^^^^^^^^^^^
  |
  = note: the following trait bounds were not satisfied:
          `[T]: Sized`
          which is required by `[T]: IntoParallelIterator`
          `[T]: ParallelIterator`
          which is required by `[T]: IntoParallelIterator`

warning: unused import: `IntoParallelIterator`
 --> src/lib.rs:1:19
  |
1 | use rayon::iter::{IntoParallelIterator, ParallelIterator};
  |                   ^^^^^^^^^^^^^^^^^^^^
  |
  = note: `#[warn(unused_imports)]` on by default

```


### Desired output

What's really missing is a `T: Send` bound.

### Rationale and extra context

_No response_

### Other cases

_No response_

### Rust Version

```Shell
rustc 1.79.0-beta.3 (f5d04caa7 2024-05-03)
binary: rustc
commit-hash: f5d04caa74a1dfa5ffc4082c2c8f621f25336bbc
commit-date: 2024-05-03
host: x86_64-unknown-linux-gnu
release: 1.79.0-beta.3
LLVM version: 18.1.4
```


### Anything else?

I will try to provide a MCVE. In the meantime, @rustbot label +E-needs-mcve


<!-- TRIAGEBOT_START -->

<!-- TRIAGEBOT_ASSIGN_START -->

<!-- TRIAGEBOT_ASSIGN_DATA_START$${"user":"dianne"}$$TRIAGEBOT_ASSIGN_DATA_END -->

<!-- TRIAGEBOT_ASSIGN_END -->
<!-- TRIAGEBOT_END -->
Repository: PowerToys
Issue: Always on Top window frame covers the taskbar and the side of a 2nd monitor.
Labels: Issue-Bug,Needs-Triage

### Microsoft PowerToys version

0.80.1

### Installation method

Microsoft Store

### Running as admin

No

### Area(s) with issue?

Always on Top

### Steps to reproduce

![image](https://github.com/microsoft/PowerToys/assets/168993001/494b7f99-ff1f-4800-a53c-343761040767)
![image](https://github.com/microsoft/PowerToys/assets/168993001/e11b8b4c-a25c-4996-9058-d658254d1e0e)
After putting an Always-on-top window on fullscreen it covers the taskbar and the side of the 2nd monitor.
[PowerToysReport_2024-05-05-21-22-31.zip](https://github.com/microsoft/PowerToys/files/15222538/PowerToysReport_2024-05-05-21-22-31.zip)

### ✔️ Expected Behavior

Always on top frame should be behind the taskbar and the 2nd monitor's desktop.

### ❌ Actual Behavior

Always on top window frame covers the taskbar and the side of the 2nd monitor when on full screen.

### Other Software

_No response_
Repository: puppeteer
Issue: Test "[click.spec] Page.click should click the button with fixed position inside an iframe" is flaky
Labels: bug,upstream,confirmed,flaky test,P3

Seems to be only in Chrome WebDriverBiDi.

See https://github.com/puppeteer/puppeteer/actions/runs/8970308723/job/24633565648#step:12:1381

cc @sadym-chromium @Lightning00Blade
Repository: ollama
Issue: Support pull from habor registry in proxy mode an push to harbor
Labels: feature request

Not sure why its not working, maybe i do something bad.
From other ticket i understand it supposed to work with OCI registry.

What i tried  :

ollama pull habor-server//ollama.com/library/llama3:text
Error: pull model manifest: 400

ollama pull habor-server/ollama.com/llama3:text
Error: pull model manifest: 400

ollama cp llama2:7b habor-server/aistuff/llama2:7b
ollama push habor-server/aistuff/llama2:7b
retrieving manifest 
Error: Get "harbor?nonce=zzzz&scope=&service=&ts=xxxx": unsupported protocol scheme ""
Repository: go
Issue: encoding/json: no field information is shown when decoding a map fails
Labels: NeedsInvestigation

### Go version

go version go1.22.0 darwin/amd64

### Output of `go env` in your module/workspace:

```shell
GO111MODULE=''
GOARCH='amd64'
GOBIN=''
GOCACHE='/Users/alanxu/Library/Caches/go-build'
GOENV='/Users/alanxu/Library/Application Support/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='amd64'
GOHOSTOS='darwin'
GOINSECURE=''
GOMODCACHE='/Users/alanxu/go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='darwin'
GOPATH='/Users/alanxu/go'
GOPRIVATE=''
GOPROXY='https://goproxy.cn'
GOROOT='/usr/local/go'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/usr/local/go/pkg/tool/darwin_amd64'
GOVCS=''
GOVERSION='go1.22.0'
GCCGO='gccgo'
GOAMD64='v1'
AR='ar'
CC='clang'
CXX='clang++'
CGO_ENABLED='1'
GOMOD='/Users/alanxu/Desktop/github/optimism/go.mod'
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -arch x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -ffile-prefix-map=/var/folders/bd/h02c_p7d6zq0t4tsxr3lkrt00000gn/T/go-build3885504692=/tmp/go-build -gno-record-gcc-switches -fno-common'
```


### What did you do?

I'm decoding a `map` with **many** fields, but the error I got is:

```
json: cannot unmarshal hex string without 0x prefix into Go value of type common.Address
```

There's no information about which field is causing the error.

### What did you see happen?

The error information when decoding `map` is vague, it doesn't indicate which field is causing the error.

### What did you expect to see?

I expect to see which field(the specific `key` or `value`) is causing the error.
Repository: ollama
Issue: Llama3 generating Incorrect and repeated response for my custom modelfile (finetuned llama3 8b)
Labels: bug

### What is the issue?

Fine-tuned the Llama3 8b model for my custom dataset following the llama3 template, used the unsloth library for fine-tuning, and generated the GGUF file. 
Got relevant results when using this model for inference, but when I created the Modelfile and ran it as an Ollama process, the responses were irrelevant and repetitive.

Below is the prompt I used during the inference in the jupyter notebook (It generated the expected response):
`prompt = """
system
You are `Dbot,`
Respond to user questions naturally.


user

{}


Dbot

{}
"""`

Below is my Modelfile 
`FROM llama3_merged.gguf

TEMPLATE """
system
You are Dbot,
Respond to user questions naturally. >


user

{{ .Prompt }}


Dbot

{{ .Response }}
"""

PARAMETER stop "
"
PARAMETER stop "
"
PARAMETER stop "
"
PARAMETER stop "<|reserved_special_token"
`
I used below command to run the Modelfile and infer the model which gave me irrelevant responses and did not stop.


`ollama run llama3:v1 "What is EoC"


EoC: Ecosystems and EoL: Ecosystems, EoP: Ecosystems, and EoT: Ecosystems.
The EoC: Ecosystems and EoL: Ecosystems, EoP: Ecosystems, and EoT: Ecosystems. 
Ecosystems have a significant impact on the EoC: Ecosystems, EoL: Ecosystems, EoP: Ecosystems, and EoT: Ecosystems.
The EoL: Ecosystems, EoP: Ecosystems, and EoT: Ecosystems. 
Ecosystems have a significant impact on the EoC: Ecosystems, EoL: Ecosystems, EoP: Ecosystems, and EoT: Ecosystems.
The EoL: Ecosystems, EoP: Ecosystems, and EoT: Ecosystems. 
Ecosystems have a significant impact on the EoC: Ecosystems, EoL: Ecosystems, EoP: Ecosystems, and EoT: Ecosystems.
The EoP: Ecosystems, EoT: Ecosystems, and EoL: Ecosystems. 
Ecosystems have a significant impact on the EoC: Ecosystems, EoL: Ecosystems, EoP: Ecosystems, and EoT: Ecosystems.
The EoT: Ecosystems, EoL: Ecosystems, EoP: Ecosystems, and EoE: Ecosystems. 
Ecosystems have a significant impact on the EoC: Ecosystems, EoL: Ecosystems, EoP: Ecosystems, and EoT: Ecosystems.
The EoE: Ecosystems, EoL: Ecosystems, EoP: Ecosystems, and EoT: Ecosystems. 
Ecosystems have a significant impact on the EoC: Ecosystems, EoL: Ecosystems, EoP: Ecosystems, and EoT: Ecosystems.
The EoT: Ecosystems, EoE: Ecosystems, and EoL: Ecosystems. 
Ecosystems have a significant impact on the EoC: Ecos`


### OS

Linux

### GPU

Nvidia

### CPU

Intel

### Ollama version

0.1.32
Repository: TypeScript
Issue: JS object destructuring: allow to shorten expression when assignment is renamed back to original property value
Labels: Suggestion,Experience Enhancement

<!-- ⚠️⚠️ 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. -->
**Current behavior**
In a restructuring assignment expression, when alias is renamed back to original property's name, it has the full form (`const { property: property } = testObject;` in the following example):
![vscode-destructuring](https://github.com/microsoft/vscode/assets/6094468/0a6c023d-f66d-41e4-9b4c-d527cc41120f)

**Proposed behavior**
Shorten form of assignment (`const { property } = testObject;` in this example) - either automatically, or enabled with configuration.
Repository: tauri
Issue: [bug] [v2] Issue with Decorations floating above the window on MacOS
Labels: type: bug,platform: macOS,status: needs triage

### Describe the bug

**Background:** I am building a multi-page application on Tauri v2 

**My goal:** On some, but not all, pages have the decorations on overlay on the window, no title bar (+ transparency)

**Issue:**  Decorations were floating above the window, out of reach of css

See how the decorations are above the window
![image](https://github.com/tauri-apps/tauri/assets/3227869/e5bbedfe-9563-4dc3-b248-ef8d7fb7897c)

This seems to happen whenever decorations were set to false initially (for example in the tauri config) and later set to true

This is how decorations look normally when set to true in tauri config
![image](https://github.com/tauri-apps/tauri/assets/3227869/80dfea07-2193-4b98-96e9-1de1e02c4d85)

The problem is that I am trying to set decorations selectively on pages. Some pages will have them and some won't.

### Reproduction

Set `"decorations": false` in the tauri config json and later in JS (for example onMount) call `getCurrent().setDecorations(true)`


I have also noticed it happen when:
1. Set `"decorations": true` in the tauri config json 
2. Set `getCurrent().setDecorations(false)` on mount
3. Later in program set `getCurrent().setDecorations(true)`

### Expected behavior

The expected behavior is that the decorations always show up inside the window and never above, regardless of the previous state of the decorations or how often it was toggled true and false.
![image](https://github.com/tauri-apps/tauri/assets/3227869/c6f79cac-0cad-41bd-9842-3d07610f602f)


### Full `tauri info` output

```text
[✔] Environment
    - OS: Mac OS 14.4.1 X64
    ✔ Xcode Command Line Tools: installed
    ✔ rustc: 1.76.0 (07dca489a 2024-02-04)
    ✔ cargo: 1.76.0 (c84b36747 2024-01-18)
    ✔ rustup: 1.27.0 (bbb9276d2 2024-03-08)
    ✔ Rust toolchain: stable-x86_64-apple-darwin (default)
    - node: 20.6.1
    - pnpm: 7.25.1
    - yarn: 1.22.19
    - npm: 10.2.0

[-] Packages
    - tauri [RUST]: 2.0.0-beta.17
    - tauri-build [RUST]: 2.0.0-beta.13
    - wry [RUST]: 0.39.3
    - tao [RUST]: 0.27.1
    - tauri-cli [RUST]: 1.5.11
    - @tauri-apps/api : not installed!
    - @tauri-apps/cli [NPM]: 2.0.0-beta.15

[-] App
    - build-type: bundle
    - CSP: default-src blob: data: filesystem: ws: wss: http: https: tauri: 'unsafe-eval' 'unsafe-inline' 'self' img-src: 'self'; connect-src ipc: http://ipc.localhost
    - frontendDist: ../dist
    - devUrl: http://localhost:1420/
    - framework: SolidJS
    - bundler: Vite
```


### Stack trace

_No response_

### Additional context

_No response_
Repository: electron
Issue: [Feature Request]: Allow handler in app.on("open-url", handler) to choose whether to activate the app or not
Labels: enhancement :sparkles:

### Preflight Checklist

- [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project.
- [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to.
- [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a feature request that matches the one I want to file, without success.

### Problem Description

Consider a Notification with an action such as "Delete", to indicate to the app that the subject message of the Notification should be deleted.

With an implementation that uses registered protocols, the "Delete" action is delivered to Electron via the app.on("open-url", handler) listener.

When Electron receives an "open-url" event, it is automatically activated (i.e. gets focus, and is made frontmost), which is not necessarily desired (such as when the user wishes to "Delete" and thus ignore the message).

### Proposed Solution

When Electron receives an "open-url" event, _do not_ automatically activate the app (i.e. focusing it and making it frontmost).

To activate the app, `app.focus({ steal: true })` can be called manually.

Since this would be a breaking change of the behavior of the "open-url" event handler, I propose implementation of a new method on `app` to "switch on or off" this new behavior. As in, something akin:
```javascript
app.dontAutoFocusAppOnOpenUrl(true);
```

### Alternatives Considered

The problem can be abstracted as follows: "How can Electron receive a message from another application or the OS, and handle that message without automatically being activated?"

Listening for second instance invocations of the app from the OS with `app.on("second-instance", handler)` provides a solution to this problem. However, this approach would require the invoker to construct a CLI-based command to spawn a new shell, in which a new instance of the app is spawned, only to deliver a message payload to the running instance's `app.on("second-instance", handler)` handler.

Another solution is via an embedded web server running as a utility process. This approach, however, is not feasible due a couple edge cases, one of which is: the need to register a listening port that does not persist upon app restart.

### Additional Information

_No response_
Repository: vscode
Issue: Parentheses `()` and square brackets `[]` in file names can break terminal links (eg. next.js dynamic file paths)
Labels: bug,help wanted,terminal-links

<!-- ⚠️⚠️ 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.89.0
- OS Version: macOS Sonoma 14.4.1

This issue was supposedly fixed in #169774, but it still doesn't seem to be working for me. Maybe a regression?

When the terminals logs file names that include characters `()[]` (Used by NextJS routing segments for example), it splits the file name into multiple parts and is not properly clickable to open that file.

Steps to Reproduce:

In the integrated terminal, run `echo "./src/(hello)/[world]/file.tsx"` and hover over the output while holding cmd to see the different file segments determined by VSCode. Should look something like:

```
./src/(hello)/[world]/file.tsx
------ ----- - ----- ---------
```
Repository: deno
Issue: `npm:@grpc/grpc-js` support for server-side
Labels: feat,node compat

EDIT 3.06.2024 by @bartlomieju:

@satyarohith has done an amazing job of getting `@grpc/grpc-js` working for the client side. While there are still a few minor bugs to iron out, we now consider it good enough to use for production workloads. If you encounter any problems we appreciate a report.

The next major step is to get the server-side examples working as well. 

---


We're actively working to support https://www.npmjs.com/package/@grpc/grpc-js in Deno. This issue tracks the progress.

The following client examples work with deno canary:

- helloworld
- cancellation
- interceptors        
- deadline        
- metadata
- keepalive

You can test them by cloning https://github.com/satyarohith/grpc-node/tree/es_examples and running the server using node and  client using deno. We will focus on server examples once we have all the client examples working.

TODO:

- [x] error_handling client example
- [x] google-cloud/vision works
- [ ] server examples 




Related issues:
- https://github.com/denoland/deno/issues/3326
- https://github.com/denoland/deno/issues/23246
Repository: PowerToys
Issue: Mouse without Borders - Not Working at all
Labels: Issue-Bug,Needs-Triage

### Microsoft PowerToys version

0.80.1

### Installation method

Other (please specify in "Steps to Reproduce")

### Running as admin

No

### Area(s) with issue?

Mouse Without Borders

### Steps to reproduce

[PowerToysReport_2024-05-06-13-09-03.zip](https://github.com/microsoft/PowerToys/files/15224043/PowerToysReport_2024-05-06-13-09-03.zip) Machine 1 
[PowerToysReport_2024-05-06-13-08-58.zip](https://github.com/microsoft/PowerToys/files/15224045/PowerToysReport_2024-05-06-13-08-58.zip) Machine 2 

Machine 1 is Win10 and Machine 2 is Win11 - this worked fine yesterday. Since then all I changed is the boot drive to a SATA SSD on Machine 1. 
Both machines have the name of the other machine show up in the list but there's no colored box beside the other machine in either of them. Also Machine 2 has Machine 1's name show up capitalized and I am not sure how to change that.
The new key generation is also stuck - both of them are showing the same key in that field, and clicking new key does nothing. 
They are both on the same network, ping requests go through.

![image](https://github.com/microsoft/PowerToys/assets/87427856/3db6f723-8224-43a8-97da-e78c90563556) Machine 1 
![image](https://github.com/microsoft/PowerToys/assets/87427856/0c60279a-becf-46cc-8bc5-012c8f38240c) Machine 2





### ✔️ Expected Behavior

1. Machines connect and Mouse and Keyboard are shared seamlessly
2. New Key is generated when clicking on 'New Key' button

### ❌ Actual Behavior

1. Machines show each other's names, machine shows it as capitalized but they are not connected
2. New key is not being generated when clicking on 'New Key' button

### Other Software

_No response_