sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: transformers
Issue: callback to implement how the predictions should be stored.
Labels: Feature request

I am exploring distributed inference capabilities with the Hugging Face Trainer for transformers. I need to do distributed inference across multiple devices or nodes and save the predictions to a file. However, after reviewing the available callbacks, I did not find any that facilitate this specific task. Furthermore, when using the trainer.predict method, I noticed that it returns only the labels and predictions, without including the original input batches used for inference.

PyTorch Lightning offers a flexible mechanism for handling prediction outputs using custom callbacks. For example, the following PyTorch Lightning code snippet demonstrates how a custom **BasePredictionWriter** callback can be implemented to save predictions to files:

```import torch
import os
from lightning.pytorch.callbacks import BasePredictionWriter

class CustomWriter(BasePredictionWriter):

    def __init__(self, output_dir, write_interval):
        super().__init__(write_interval)
        self.output_dir = output_dir

    def write_on_batch_end(
        self, trainer, pl_module, prediction, batch_indices, batch, batch_idx, dataloader_idx
    ):
        torch.save(prediction, os.path.join(self.output_dir, str(dataloader_idx), f"{batch_idx}.pt"))

    def write_on_epoch_end(self, trainer, pl_module, predictions, batch_indices):
        torch.save(predictions, os.path.join(self.output_dir, "predictions.pt"))

pred_writer = CustomWriter(output_dir="pred_path", write_interval="epoch")
trainer = Trainer(callbacks=[pred_writer])
model = BoringModel()
trainer.predict(model, return_predictions=False)
```
Repository: PowerToys
Issue: Can't undefine false pen key sequence
Labels: Issue-Bug,Product-Keyboard Shortcut Manager,Needs-Triage

### Microsoft PowerToys version

0.82.1

### Installation method

WinGet

### Running as admin

Yes

### Area(s) with issue?

Keyboard Manager

### Steps to reproduce

When I remove put the pen in the dock of my Surface Pro 11, there is a bug that causes the screen ship interface to pop up.  

According to Keyboard manager, the key sequence emitted when I pull the pen out is `Win (left) Ctrl (left), F20` . This is what I see when I set up Keyboard Manager to capture the keys that are emitted by the action.  I do this by:

1. click "Remap a shortcut"
2. click "add key remapping" 
3. click "select"
4. and then remove the pen from the dock.

Having done that, I map that sequence to `Undefined`, as shown in the screenshot.

Unfortunately, when I then put the pen back into he dock and pull it out again, the key has not been remapped, and the screen snip appears.

In addition to the screen snip popup, storing the pen turns on capslock. 

On a pen based computer, this is very bad.

![image](https://github.com/user-attachments/assets/cc61751e-91bb-44fb-9aec-7ce8941b563c)


### ✔️ Expected Behavior

No screen snip action or capslock when I put the pen into the dock.

### ❌ Actual Behavior

screen snip AND capslock

### Other Software

_No response_
Repository: vscode
Issue: lessen extension activation from debugging
Labels: tasks,debt

> I think that's good behavior. We might still be able to add some optimization for the case of extension-provided configurations. Maybe in workspace storage we keep a small LRU (say ~5 entries) to associate labels of tasks with the extensions that provide them, to avoid having to activate all extensions all the time if I run some `npm: scriptThatIDontHaveATaskFor`? 

 _Originally posted by @connor4312 in [#192043](https://github.com/microsoft/vscode/issues/192043#issuecomment-2243874354)_
Repository: svelte
Issue: import "with" attribute crashs
Labels: compiler

### Describe the bug

using `with` or `assert` in import attributes (import statement or dynamic import) crashs 

### Reproduction

```svelte
<script lang="ts">
 import Miaou from "./cat.svelte" with { type: "animal" };
</script>
```

### Logs

```shell
Unexpected token
import Miaou from "./cat.svelte" with { type: "json" };
                                    ^
```


### System Info

```shell
svelte@4.2.18
```


### Severity

annoyance
Repository: storybook
Issue: [Bug]: Upgrade still prompts for all automigrations
Labels: bug,automigrations,sev:S2

### Describe the bug

The CLI should filter out unnecessary automigrations based on the before/after versions of Storybook. However it appears that it can't find versions in some cases.

### Reproduction link

https://github.com/storybookjs/storybook-rsc-demo

### Reproduction steps

1. Install the demo linked above
2. Run `npx storybook@latest upgrade`

### System

```bash
System:
    OS: macOS 14.5
    CPU: (10) arm64 Apple M1 Pro
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.20.3 - /usr/local/bin/node
    npm: 10.7.0 - /usr/local/bin/npm
    pnpm: 9.6.0 - ~/Library/pnpm/pnpm <----- active
  Browsers:
    Chrome: 126.0.6478.183
    Safari: 17.5
  npmPackages:
    @storybook/addon-actions: ^8.2.5 => 8.2.5 
    @storybook/addon-coverage: ^1.0.3 => 1.0.3 
    @storybook/addon-essentials: ^8.2.5 => 8.2.5 
    @storybook/addon-interactions: ^8.2.5 => 8.2.5 
    @storybook/addon-viewport: ^8.2.5 => 8.2.5 
    @storybook/blocks: ^8.2.5 => 8.2.5 
    @storybook/nextjs: ^8.2.5 => 8.2.5 
    @storybook/react: ^8.2.5 => 8.2.5 
    @storybook/test: ^8.2.5 => 8.2.5 
    @storybook/test-runner: ^0.17.0 => 0.17.0 
    chromatic: ^11.3.0 => 11.3.2 
    eslint-plugin-storybook: ^0.8.0 => 0.8.0 
    msw-storybook-addon: ^2.0.0 => 2.0.0 
    storybook: ^8.2.5 => 8.2.5
```


### Additional context

_No response_
Repository: godot
Issue: Signal using Anonymous Lambda function will keep gaining connections on scene reload, doesn't happen with Callable 
Labels: discussion,topic:gdscript,documentation

### Tested versions

Reproducible in Godot v4.3.beta3

### System information

Godot v4.3.beta3 - Windows 10.0.22631 - Vulkan (Forward+) - dedicated AMD Radeon RX 7900 XTX (Advanced Micro Devices, Inc.; 32.0.11021.1011) - AMD Ryzen 9 7950X 16-Core Processor (32 Threads)

### Issue description

https://github.com/user-attachments/assets/9b4e25ba-0516-494a-ae06-7b5816c22f1e

Not sure if these specific details matter, but... when using a project with a Singleton Event Bus, and connecting to a signal in a scene's ready function with a lambda callable, the issue occurs where when the scene reloads (```get_tree().reload_current_scene()```), the signals connections will keep growing and not be disconnected.

This will cause the signal to fire for each connection it has when emitted.



### Steps to reproduce

1. Create a signal and connect using a Lambda Callable.
2. Reload the current scene that belongs to the signal connection.
3. Observe the signal will keep gaining connections.
4. If using the MRP, load the project and click the "Restart Game" button, and observe the console.

### Minimal reproduction project (MRP)

[signalbugmrp.zip](https://github.com/user-attachments/files/16340346/signalbugmrp.zip)
Repository: go
Issue: x/tools/gopls: evaluation of build tags used in imported packages must be optional
Labels: gopls,Tools,gopls/metadata

### Go version

go1.22.3 windows/amd64
gopls v0.16.1

### Output of `go env` in your module/workspace:

```shell
set GO111MODULE=
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\Zyl\AppData\Local\go-build
set GOENV=C:\Users\Zyl\AppData\Roaming\go\env
set GOEXE=.exe
set GOEXPERIMENT=
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GOMODCACHE=D:\Projects\Code\Go\pkg\mod
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=D:\Projects\Code\Go
set GOPRIVATE=
set GOPROXY=https://proxy.golang.org,direct
set GOROOT=C:\Program Files\Go
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLCHAIN=auto
set GOTOOLDIR=C:\Program Files\Go\pkg\tool\windows_amd64
set GOVCS=
set GOVERSION=go1.22.3
set GCCGO=gccgo
set GOAMD64=v1
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=D:\Projects\MyProject\src\client\go.mod
set GOWORK=D:\Projects\MyProject\src\go.work
set CGO_CFLAGS=-O2 -g
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-O2 -g
set CGO_FFLAGS=-O2 -g
set CGO_LDFLAGS=-O2 -g
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=C:\Users\Zyl\AppData\Local\Temp\go-build383807685=/tmp/go-build -gno-record-gcc-switches
```


### What did you do?

While dealing with endianness, I introduced build tags to a package which has its own `go.mod`. After the change, one file would contain
```go
//go:build 386 || amd64 || amd64p32 || alpha || arm || arm64 || loong64 || mipsle || mips64le || mips64p32le || nios2 || ppc64le || riscv || riscv64 || sh || wasm
```
and another would contain
```go
//go:build armbe || arm64be || m68k || mips || mips64 || mips64p32 || ppc || ppc64 || s390 || s390x || shbe || sparc || sparc64
```
As a consequence, all code importing this package is now evaluated for GOOS=aix with GOARCH=ppc64, causing a large amount of problems to be marked, making me lose of track of actual problems.

Additionally, type redeclarations are detected in spite of the build tags being disjoint. (?)

To fix it, I specified `"go.buildTags": "amd64"` in `.vscode/settings.json`.

### What did you see happen?

Compilation errors for architectures other than `amd64` are still being reported.

### What did you expect to see?

That gopls would no longer report compilation errors for architectures other than amd64.
Repository: flutter
Issue: Failing engine tests should not block engine artifacts from being uploaded
Labels: a: tests,team-infra,P1

Today, engine tests are embedded within the same CI builds that compile the artifacts that test them. It is organized roughly:

1. compile the artifacts for the current configuration
2. test the artifacts
3. bundle and upload the artifacts to cloud storage

If the second step fails, the CI build will early exit, and we never upload the artifacts. However, when tests fail for infrastructure reasons on release builds, this means that tests that could otherwise be skipped must be fixed (or manually deleted in the branch) in order to unblock the release.
Repository: godot
Issue: C# [Export] Arrays not working on IOS builds 4.3 Beta
Labels: bug,platform:ios,needs testing,topic:dotnet

### Tested versions

Reproducible on 4.3 Beta 2 and 4.3 Beta 3
Not tested on other versions yet
NOTE **THIS IS C# SPECIFIC** - GDSCRIPT seems to be fine.

### System information

Godot v4.3.beta3.mono - Windows 10.0.19045 - GLES3 (Compatibility) - NVIDIA GeForce RTX 3080 (NVIDIA; 32.0.15.6070) - AMD Ryzen 9 5950X 16-Core Processor (32 Threads)

### Issue description

Tracked this down by use of GD.Prints.  

This is in C#.  I have Arrays which are marked as "Export" which are filled in with the editor.  These work fine in windows and android Builds.

On IOS build, if I build it the built code says the array is of size 0.

### Steps to reproduce

In C#.  Have an array of any type, which is exported and filled in the editor.  For example, the way I found this bug was as follows.
```
    [Export]
    public Array<TouchScreenButton> buttons = new Array<TouchScreenButton>();
```

In the editor, add a couple of buttons to this array.

Then in the C# code, have something like :

GD.Print("Number of Buttons : " + buttons.Count);


When you run the code on Windows/Mac/Android - you'll get a debug log saying "Number of Buttons : 2" (or however many you added).  

**HOWEVER..** On IOS, you'll get 0.

This will happen with ANY godot type added to array in the editor.  

Also happens the exact same with the following code:

[Export]`public DrawNode2D[] subDrawNodes2 = null;`


### Minimal reproduction project (MRP)

EDIT: Added a small repro below.

[iosbug.zip](https://github.com/user-attachments/files/16355079/iosbug.zip)
Repository: tensorflow
Issue: tf.strided_slice new_axis_mask inconsistency
Labels: stat:awaiting tensorflower,type:bug,comp:ops,2.17

### Issue type

Bug

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

Yes

### Source

binary

### TensorFlow version

tf-nightly, 2.17.0, 2.16.2, 2.16.1

### Custom code

No

### OS platform and distribution

macOS, Linux

### Mobile device

_No response_

### Python version

3.10.12, 3.12.4

### Bazel version

_No response_

### GCC/compiler version

_No response_

### CUDA/cuDNN version

_No response_

### GPU model and memory

_No response_

### Current behavior?

I'm seeing that when `spec_size` (as described in the docs as the length of the `begin`, `end`, `strides` arrays) is less than the rank of the `input` tensor, the behavior of `strided_slice` differs when `new_axis_mask` for the bits between `len(begin)` and `tf.rank(input)` is specified.

Is this the expected behavior, and if so, is there anything else like this that differs when `spec_size != tf.rank(input)`? 

I'm noting that it's currently permitted for `spec_size > tf.rank(input)`, which yields the same result in this case as when `spec_size == tf.rank(input)`.

### Standalone code to reproduce the issue

```shell
Notebook:
https://colab.research.google.com/drive/1-LCENzCjorhzyDCqq5qfB4IFoxLbHjGI?usp=sharing
Code:

import numpy as np
import tensorflow as tf

@tf.function
def test(t, begin, end, mask):
    return tf.strided_slice(t, begin, end, new_axis_mask=mask)

t = tf.constant(np.arange(0,27).reshape((3,3,3)))
mask = 0b111

# Noting as comments the shape of the result

# shape = (1, 3, 3, 3)
print(test(t, [0], [3], mask))
# shape = (1, 1, 3, 3, 3)
print(test(t, [0, 0], [3, 3], mask))
# shape = (1, 1, 1, 3, 3, 3)
print(test(t, [0, 0, 0], [3, 3, 3], mask))
# shape = (1, 1, 1, 3, 3, 3)
print(test(t, [0, 0, 0, 0], [3, 3, 3, 3], mask))
```
```


### Relevant log output

_No response_
Repository: pytorch
Issue: Enable mypy's disallow_untyped_decorators
Labels: module: typing,triaged,better-engineering

### 🐛 Describe the bug

We should enable mypy's disallow_untyped_decorators mode.  Untyped decorators strip the types from their decorated functions.

### Notes re: fixup PRs
In the PRs to remove the "# mypy: allow-untyped-decorators" I focused more on making sure the decorators had proper type annotations.  This caused a bunch of "fallout" since now decorated functions were typed - so callers which pass bad types will now have type errors.  Mostly I just marked the newly offending lines as "type: ignore".

Enable:
#131428

Fixups:
#131590
#131589
#131588
#131587
#131586
#131585
#131584
#131583
#131582
#131581
#131580
#131579
#131578
#131577
#131576
#131575
#131574
#131573
#131572
#131571
#131570
#131569
#131568
#131567
#131566
#131565
#131564

### Versions

main

cc @ezyang @malfet @xuzhao9 @gramster
Repository: ant-design
Issue: Form rules warningOnly 切换报错
Labels: Inactive,improvement,🧶 Low Priority

### Reproduction link

[![Edit on StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/edit/react-v71emu?file=demo.tsx)

### Steps to reproduce

点击2次切换，控制台报错
```
Warning: Encountered two children with the same key, `xxx`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted — the behavior is unsupported and could change in a future version.
```

### What is expected?

不报错

### What is actually happening?

报错

| Environment | Info |
| --- | --- |
| antd | 5.19.3 |
| React | latest |
| System | mac |
| Browser | chrome |

<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->
Repository: pytorch
Issue: Remove all # mypy: ignore-errors
Labels: module: typing,triaged,better-engineering

### 🚀 The feature, motivation and pitch

There are 183 files with `# mypy: ignore-errors`

we should remove them all

### Alternatives

_No response_

### Additional context

_No response_

cc @ezyang @malfet @xuzhao9 @gramster
Repository: flutter
Issue: [web] explore options for disposing of <img> image data
Labels: platform-web,a: images,perf: memory,e: web_canvaskit,P2,team-web,triaged-web

See https://github.com/flutter/engine/blob/84a46c370c3088518112ef643aee059bf565286c/lib/web_ui/lib/src/engine/canvaskit/image.dart#L682

However, there may be options. For example, the [src](https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/src) is mutable, and setting it to something else would dispose of the previous image data (at least, that's how I'd try to implement it in the browser for better memory management).
Repository: rustdesk
Issue: Mouse hover issue on menu bar when remotely controlling Mac (ipad->mac)
Labels: bug

### Discussed in https://github.com/rustdesk/rustdesk/discussions/8788

<div type='discussions-op-text'>

<sup>Originally posted by **ZhuJiaxin2** July 23, 2024</sup>
### Bug Description

When controlling Mac through my iPad, i use apple magic mouse to click on iPad. 
However, when my mouse hover over the menu bar area, the hover function could not work (e.g. my mouse clicks on the apple icon in the menu bar, and several selections were listed under, when my mouse hover downward to reach for the selections, the selections disapears), this issue does not appear in the middle of the screen, when my mouse right clicks and hovers for paste or copy selections.
Also, this has caused great inconvenience, for i could not remotely close my full screen window in Mac! (because of the hovering issue, when my mouse is up there, the close tab button does not appear!)
So grateful for your effort!

### How to Reproduce

I dunno

### Expected Behavior

in Mac, when my mouse click on a menu bar button, and then hover downward for option selection, the selections stay there instead of disappearing under the mouse.

### Operating system(s) on local side and remote side

iPad->Mac

### RustDesk Version(s) on local side and remote side

1.2.6->1.2.6

### Screenshots

Click on menu bar, selections came out:
<img width="1440" alt="截屏2024-07-23 上午11 30 16" src="https://github.com/user-attachments/assets/1a85f5a5-dbdc-46c2-b12e-cbab2dafdf31">
Expectation when mouse hover downward:
<img width="1440" alt="截屏2024-07-23 上午11 30 38" src="https://github.com/user-attachments/assets/cbba4ded-7d2b-4ee5-9a1d-31df0978936e">
What actually happens:
<img width="1440" alt="截屏2024-07-23 上午11 30 28" src="https://github.com/user-attachments/assets/dde962aa-66e2-4c69-ba51-6e2e90bd5c70">

The hidden close tab button:
<img width="1440" alt="截屏2024-07-23 上午11 40 00" src="https://github.com/user-attachments/assets/916c2cc2-f194-4141-b685-0ea86c0f0e74">
The close tab button only appears when mouse hovers there, but this doesnt work on this case, for the hovering function in that area is disabled
<img width="1440" alt="截屏2024-07-23 上午11 40 05" src="https://github.com/user-attachments/assets/4509ccc4-ff34-4926-bec4-c35a1ed2b894">






### Additional Context

_No response_</div>
Repository: material-ui
Issue: [material-ui] Add Bento Grid component
Labels: new feature,waiting for 👍,component: Grid

### Summary

I suggest you make a bento ui component with MUI.

I just started using MUI several days ago and I'm not good at using it. So, the code below is mainly written by ChatGPT-4o (I rewrote a few lines). There might be some mistakes....

```TypeScript
import { FC, ReactNode } from 'react';
import {
  Grid,
  Box,
  type SxProps,
  type Theme,
} from '@mui/material';

export type BentoItemProps = {
  gridArea: string;
  children: ReactNode;
  sx?: SxProps<Theme>;
}

export const BentoItem: FC<BentoItemProps> = ({ children, gridArea, sx }) => (
  <Box sx={{ ...sx, gridArea }}>
    {children}
  </Box>
);

export type BentoGridProps = {
  layout: string;
  children: ReactNode;
  sx?: SxProps<Theme>;
}

export const BentoGrid: FC<BentoGridProps> = ({ layout, children, sx }) => (
  <Box sx={{
    ...sx,
    display: 'grid',
    gridTemplateAreas: layout,
  }}>
    {children}
  </Box>
);
```

If the bento ui doesn't match the Material Design Systems, you can ignore this suggestion.

### Examples

Sorry, no example.

### Motivation

[Tailwind Grid Generator](https://www.tailwindgen.com/)

I want the UI layout above with MUI.

**Search keywords**: bento
Repository: next.js
Issue: scroll restauration not working in 14.2.5 router.push
Labels: bug,Navigation

### Link to the code that reproduces this issue

https://codesandbox.io/p/devbox/confident-pateu-go8s7s?file=%2Fapp%2Fpage.tsx%3A3%2C13

### To Reproduce

create 2 more pages 
link between using router.push(href)
site will stay at scroll position of previous page

### Current vs. Expected behavior

scroll to top like when used with Link directly

### Provide environment information

```bash
happens in prod website
```


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

Navigation

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

next start (local), Vercel (Deployed), Other (Deployed)

### Additional context

_No response_
Repository: ollama
Issue: Nvidia Minitron Please!
Labels: model request

https://huggingface.co/collections/nvidia/minitron-669ac727dc9c86e6ab7f0f3e
Repository: godot
Issue: Make Unique (Recursive) Doesn't Work For AnimationTree BlendTree Resources
Labels: bug,topic:core

### Tested versions

v4.2.2.stable.official [15073afe3]

### System information

Godot v4.2.2.stable - Windows 10.0.22631 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 4070 SUPER (NVIDIA; 32.0.15.5612) - Intel(R) Core(TM) i7-14700KF (28 Threads)

### Issue description

When using the "Make Unique (Recursive)" option on AnimationTree Tree Root resource as AnimationNodeBlendTree, subresources (i.e., the nodes currently in the tree) are not made unique, even though they show up in the recursive option popup window (and are checked).

### Steps to reproduce

1. Add AnimationTree to scene
2. Add AnimationNodeBlendTree as Tree Root resource
3. Add a node (i.e., animation) and set a parameter
4. Duplicate the AnimationTree
5. Click the drop down on the Tree Root resource and click "Make Unique (Recursive)"
6. Ensure all items are checked and hit okay
7. Change the parameter in the added node
8. Go back to the first AnimationTree and see that it changed as well

### Minimal reproduction project (MRP)

[New Game Project.zip](https://github.com/user-attachments/files/16344108/New.Game.Project.zip)