sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: go
Issue: x/build/internal/workflow: TaskContext.ResetWatchdog is willing to reset expired timer
Labels: Builders,NeedsInvestigation

`watchdogTimer` is currently initialized to a timer that cancels the TaskContext's context when it times out:

```Go
func runTask(ctx context.Context, workflowID uuid.UUID, listener Listener, state taskState, args []reflect.Value) taskState {
	ctx, cancel := context.WithCancel(ctx)
	defer cancel()

	tctx := &TaskContext{
		Context:       ctx,
		Logger:        listener.Logger(workflowID, state.def.name),
		TaskName:      state.def.name,
		WorkflowID:    workflowID,
		watchdogTimer: time.AfterFunc(WatchdogDelay, cancel),
	}

	// ...
```

`ResetWatchdog` exists to extend the lifetime of the timer to prevent it from ticking and doing the task's context cancellation. It's currently willing to reset the timer even after the timer has expired and the task's context got cancelled. This alone is odd but fine, but it can affect other places in unexpected ways.

There's at least one place that determines whether the task hasn't yet hung by checking if the timer is still running:

```Go
if !tctx.watchdogTimer.Stop() {
	state.err = fmt.Errorf("task did not log for %v, assumed hung", WatchdogDelay)
```

Logging via `TaskContext.Printf` calls `ResetWatchdog`.

As a result some tasks end up having [logging statements that are slightly load-bearing](https://go-review.googlesource.com/c/build/+/464299/comment/61315d01_09d9448c/). If a `Printf` happens after a task has timed out and started to abort (via context cancellation), it'll at minimum cause the `state.err = fmt.Errorf("task did not log for ..., assumed hung", ...)` branch not to trigger. (Maybe that's the entire extent of the side-effects, I hadn't looked further.)

All this is to say the logic here can be reworked to be slightly less fragile, and this intersects a bit with #60443.

I spotted this while looking at the code some time ago. Filing a tracking issue so I can close some open windows, but it's low priority. CC @golang/release.
Repository: stable-diffusion-webui
Issue: [Feature Request]: allow to preview already generated images while running a batch
Labels: enhancement

### Is there an existing issue for this?

- [X] I have searched the existing issues and checked the recent builds/commits

### What would your feature do ?

When you are running a batch let's say of 9 images it might take several minutes. And you cannot see any images until everything is done. Would it be possible to make finished images available for preview / download?

### Proposed workflow

1. Start batch
2. When first image is ready it should appear somewhere in UI so you can see it and download it without having to wait till the last image is generated


### Additional information

_No response_
Repository: next.js
Issue: [NEXT-1266] App router doesn't allow to export a reusable server function 
Labels: linear: next

### Verify canary release

- [x] I verified that the issue exists in the latest Next.js canary release

### Provide environment information

```bash
Operating System:
      Platform: win32
      Arch: x64
      Version: Windows 10 Pro
    Binaries:
      Node: 16.14.2
      npm: N/A
      Yarn: N/A
      pnpm: N/A
    Relevant packages:
      next: 13.4.4-canary.13
      eslint-config-next: 13.4.1
      react: 18.2.0
      react-dom: 18.2.0
      typescript: 5.0.4
```


### Which area(s) of Next.js are affected? (leave empty if unsure)

App directory (appDir: true)

### Link to the code that reproduces this issue or a replay of the bug

https://codesandbox.io/p/sandbox/aged-cache-l9xyus

### To Reproduce

I'm trying to export a function from my ```photos/[id]/page.tsx```  page which allow me to fetch a photo from unsplash by ```id```. 

```photos/[id]/page.tsx:```
```javascript
// This is the function I'm trying to export and use in another page
export async function getPhoto(id: string): Promise<PhotoType> {
  const res = await fetch(
    `https://api.unsplash.com/photos/${id}/?client_id=${process.env.UNSPLASH_API_KEY}`
  );
  const photos = await res.json();
  return photos;
}
// page export
export default async function PhotoPage({
  params,
}: {
  params: { id: string };
}) {
  const photo = await getPhoto(params.id);
  return (
    <div>
      <h1>Photo Page</h1>
      <Image
        src={photo.urls.regular}
        alt={photo.alt_description}
        width={photo.width}
        height={photo.height}
      />
    </div>
  );
}
```

### Describe the Bug

The development server is working fine but the build command throwing an error into the CLI.

![image](https://github.com/vercel/next.js/assets/39343312/d0e5c857-8488-4364-a5ea-25ace6081427)

It looks like the app router is only allowing me to export function with name ```"metadata" | "default" | "config" | "generateStaticParams" | "revalidate" | "dynamic" | "dynamicParams" | "fetchCache" | "preferredRegion" | "runtime" | "generateMetadata"```.

And throwing the error ```Type '(id: string) => Promise<PhotoType>' is not assignable to type 'never'```.

### Expected Behavior

The build process should be successful without any problem. 

I know I could move the ```export async function getPhoto(id:string)``` function to an ```utils/lib``` file but exporting a reusable async function from the ```page.tsx``` should be also fine.

If it is the way of NextJs at least we may add the error at the ```dev server``` too so we could know what's going wrong with our `page.tsx`. Or an `eslint` role or `typescript` error so we are concerned about the export function name at development time.

### Which browser are you using? (if relevant)

Chrome

### How are you deploying your application? (if relevant)

_No response_

<sub>[NEXT-1266](https://linear.app/vercel/issue/NEXT-1266/app-router-doesnt-allow-to-export-a-reusable-server-function)</sub>
Repository: pytorch
Issue: Re-enable Low Memory Dropout
Labels: feature,triaged,oncall: pt2,module: inductor

### 🐛 Describe the bug

https://github.com/pytorch/pytorch/pull/100064 caused 3% perf drop and 4% memory drop in HF training because of disabled low memory dropout

### Versions

master

cc @ezyang @msaroufim @wconstab @bdhirsh @anijain2305 @zou3519 @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @peterbell10 @ipiszy @yf225 @chenyang78 @kadeng @muchulee8 @aakhundov @ColinPeppler @ngimel @Xia-Weiwen
Repository: go
Issue: x/crypto/acme: GetAuthorization will panic in some cases
Labels: NeedsInvestigation

<!--
Please answer these questions before submitting your issue. Thanks!
-->

### What version of Go are you using (`go version`)?

<pre>
$ go version 1.20.3

</pre>

### Does this issue reproduce with the latest release?

When using method client.GetAuthorization , it will panic ```unmarshal field authorization: json: cannot unmarshal object into Go struct field Challenge.Challenges.Error of type error```

response data
```
{
    "identifier": {
        "type": "dns",
        "value": "example.com"
    },
    "status": "invalid",
    "expires": "2023-06-01T01:13:43Z",
    "challenges": [
        {
            "type": "dns-01",
            "status": "invalid",
            "error": {
                "type": "urn:ietf:params:acme:error:unauthorized",
                "detail": "No TXT record found at _acme-challenge.example.com",
                "status": 403
            },
            "url": "-",
            "token": "-",
            "validated": "2023-05-25T05:30:57Z"
        }
    ]
}
```


### What operating system and processor architecture are you using (`go env`)?

<details><summary><code>go env</code> Output</summary><br><pre>
$ go env

</pre></details>

### What did you do?

<!--
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on go.dev/play is best.
-->
should fix it, this shouldn't panic.
Repository: create-react-app
Issue: Instructions to add flow result in non-functional outcome
Labels: needs triage,issue: bug report

### Describe the bug

When creating a new react app, exactly following the directions ([1](https://create-react-app.dev/docs/getting-started/), [2](https://create-react-app.dev/docs/adding-flow)) on the website does not work as expected. Running `yarn flow` produces an error.

### Did you try recovering your dependencies?

I started from scratch.

### Which terms did you search for in User Guide?

N/A

### Environment

```
Environment Info:

  current version of create-react-app: 5.0.1
  running from /home/sam/.config/yarn/global/node_modules/create-react-app

  System:
    OS: Linux 5.15 Ubuntu 22.04.2 LTS 22.04.2 LTS (Jammy Jellyfish)
    CPU: (8) x64 Intel(R) Xeon(R) CPU E5-1620 v4 @ 3.50GHz
  Binaries:
    Node: 16.13.2 - /tmp/yarn--1685069571431-0.9181355925999266/node
    Yarn: 1.22.17 - /tmp/yarn--1685069571431-0.9181355925999266/yarn
    npm: 8.1.2 - /nix/store/nwf4llpwqwmxbx38nwa1zvlhpnd956fg-nodejs-16.13.2/bin/npm
  Browsers:
    Chrome: Not Found
    Firefox: Not Found
  npmPackages:
    react: ^18.2.0 => 18.2.0 
    react-dom: ^18.2.0 => 18.2.0 
    react-scripts: 5.0.1 => 5.0.1 
  npmGlobalPackages:
    create-react-app: Not Found
```

### Steps to reproduce

```bash
nix-shell -p nodejs yarn
yarn create react-app test-react-app
cd test-react-app
yarn add flow-bin

# here, edit the package.json to include "flow": "flow"

yarn flow init
yarn flow
```

### Expected behavior

Flow runs, and no problems are reported, since no files are tagged with `// @flow` and CRA claims to support flow out of the box.

### Actual behavior:

#### Result

```
$ flow
Launching Flow server for /home/sam/tmp/test-react-app
Spawned flow server (pid=2092985)
Logs will go to /tmp/flow/zShomezSsamzStmpzStest-react-app.log
Monitor logs will go to /tmp/flow/zShomezSsamzStmpzStest-react-app.monitor_log
Error ┈┈┈┈┈┈ node_modules/eslint-plugin-react/node_modules/resolve/test/resolver/malformed_package_json/package.json:2:1

Unexpected end of input, expected the token }

     1│ {
     2│


Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ node_modules/resolve/test/resolver/malformed_package_json/package.json:2:1

Unexpected end of input, expected the token }

     1│ {
     2│



Found 2 errors
error Command failed with exit code 2.
```

### Reproducible demo

See steps.
Repository: PowerToys
Issue: Better QOL use for One hand
Labels: Needs-Triage

### Description of the new feature / enhancement

Currently to apply a window's size to multiple zones. Upon moving a window and activating zones, either with shift or non-primary mouse button, if we hold CTRL we can select multiple zones the size the that window will match the size of those zones. 

Under "Zones" in settings, for "Zone Behavior", if we enable ONLY  "Show zones on all monitors while dragging a window", any time we start to move a window, our zones appear without having having to hold shift or our non-primary mouse. Which is nice for one hand use! However let's make it even better!! :) 

I would love to add the option to use our "non-primary" mouse as the "ctrl" explained in the scenario. Where we could leave "Show zones on all monitors while dragging a window" ENABLED and have a NEW toggle "Convert Non-Primary mouse button to act as CTRL" ENABLED so we can adjust, span, and manage the size of our zones to whatever we'd like all with the ease of one hand :) 

### Scenario when this would be used?

This would be useful in all scenarios, being able to adjust and size our windows even faster and more fluidly with just one hand. The amount of times I accidently let go of CTRL when trying to size things, or forget altogether, this would just be a wonderful upgrade to the feature of Fancy zones. 

### Supporting information

_No response_
Repository: flutter
Issue: Style: "text-align: center" breaks Flutter embedding
Labels: engine,platform-web,customer: google,P2,team-web,triaged-web

Based on Google bug b/284379634 which has more context.

When you embed Flutter in a position in the DOM with `text-align: center` (and probably any alignment other than left), it makes the Flutter canvas get positioned with the leftmost edge in the center of the wrapper. The flutter-view is positioned correctly, but not the canvas.

The fix is to change the style back to `text-align: left` around the actual Flutter embedding e.g. with a div like:
```
<div style="text-align: center;">
  Some centered text here potentially.

  <div id="flutter-target" style="text-align: left;"></div>
  </div>
</div>
```

Example of problem:
![Screenshot 2023-05-26 at 1 09 18 pm](https://github.com/flutter/flutter/assets/6869388/9589ec8b-a0be-47ce-99f4-400ee8481c24)

Example of fix:
![Screenshot 2023-05-26 at 1 10 11 pm](https://github.com/flutter/flutter/assets/6869388/a7879ee3-3945-4cc9-be07-a36c15b05616)

Maybe we can consider resetting styles like this that break Flutter rendering inside the Flutter-owned DOM? Though I know David mentioned it might be too hard to commit to resetting everything that could possibly matter.
Repository: stable-diffusion-webui
Issue: [Feature Request]: Improve save presets / prompts feature
Labels: enhancement

### Is there an existing issue for this?

- [X] I have searched the existing issues and checked the recent builds/commits

### What would your feature do ?

Hi, I am using the function to save the presets with the most used prompts a lot, however, I noticed that the styles that are saved, end up without the Seed, CFG Scale, Sampling Steps, Sampling Method, Width and Height, Override Settings and Etc.....

So, when I reuse the saved styles, it ends up generating differently because it doesn't contain the main style information, as mentioned before.

So the idea of ​​improvement would be to include these options when we use the option to save styles / prompts.

### Proposed workflow

1. Go to Save Style
2. Save everything in the prompt and settings


### Additional information

_No response_
Repository: transformers
Issue: BART-fusion
Labels: New model

### Model description

BART- fusion, a novel model for generating lyric interpretations from lyrics and music audio that combines a large-scale pre-trained language model with an audio encoder. It uses a cross-modal attention module to incorporate the audio representation into the lyrics representation to help the pre-trained language model understand the song from an audio perspective, while preserving the language model’s original generative performance.  Please see the paper here: https://arxiv.org/abs/2208.11671 

### Open source status

- [X] The model implementation is available
- [x] The model weights are available

### Provide useful links for the implementation

Here is the code repository for the paper: https://github.com/ldzhangyx/BART-fusion/tree/main.  The weights should be available in the checkpoints: https://drive.google.com/drive/folders/18EUUx-KT9xGJ1uq2UoOgj0X9BpngNn_T
Repository: pytorch
Issue: There is a memory leak in torch.load
Labels: module: memory usage,module: serialization,triaged

### 🐛 Describe the bug

test code:
```python
import torch
import gc

@profile
def my_func():
    ckpt = torch.load("best.ckpt", map_location=torch.device('cpu'))
    del ckpt
    gc.collect()
    gc.collect()


if __name__ == '__main__':
    my_func()
```
![image](https://github.com/pytorch/pytorch/assets/43675899/0c4a45d9-3085-4717-8991-72a478d3d8fc)

There is a memory leak in torch.load and cannot be freed


### Versions

Collecting environment information...
PyTorch version: 2.0.1
Is debug build: False
CUDA used to build PyTorch: None
ROCM used to build PyTorch: N/A

OS: macOS 12.6 (x86_64)
GCC version: Could not collect
Clang version: 14.0.0 (clang-1400.0.29.102)
CMake version: Could not collect
Libc version: N/A

Python version: 3.9.6 (default, Aug  5 2022, 15:21:02)  [Clang 14.0.0 (clang-1400.0.29.102)] (64-bit runtime)
Python platform: macOS-12.6-x86_64-i386-64bit
Is CUDA available: False
CUDA runtime version: No CUDA
CUDA_MODULE_LOADING set to: N/A
GPU models and configuration: No CUDA
Nvidia driver version: No CUDA
cuDNN version: No CUDA
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

CPU:
Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz

Versions of relevant libraries:
[pip3] mypy-extensions==0.4.3
[pip3] numpy==1.23.3
[pip3] torch==2.0.1
[pip3] torchaudio==2.0.2
[pip3] torchmetrics==0.9.2
[conda] Could not collect


cc @mruberry @mikaylagawarecki
Repository: go
Issue: runtime: memory corruption on darwin/amd64
Labels: OS-Darwin,NeedsInvestigation,compiler/runtime

```
#!watchflakes
post <- goos == "darwin" && goarch == "amd64" && (
	log ~ `fatal error: found pointer to free object` ||
	log ~ `fatal error: found bad pointer in Go heap` ||
	log ~ `fatal error: workbuf is not empty` ||
	log ~ `fatal error: workbuf is empty` ||
	log ~ `schedule: holding locks` ||
	log ~ `fatal error: bad summary data` ||
	log ~ `fatal: morestack on gsignal` ||
	log ~ `runtime\.\(\*mheap\)\.allocNeedsZero` ||
	(log ~ `panic: runtime error: invalid memory address or nil pointer dereference` && log ~ `^\s*runtime\.sigpanic.*\n\s+.*\n\s*runtime\.sweepone`) ||
	(log ~ `panic: runtime error: invalid memory address or nil pointer dereference` && pkg == "cmd/compile/internal/ssa") ||
	(log ~ `SIGSEGV: segmentation violation` && log ~ `^\s*runtime\.spanOfUnchecked\(`))
```

Issue created automatically to collect these failures.

Example ([log](https://build.golang.org/log/4de4fa5f664ac17ee1eb7d357f8bc02ed9dee09e)):



— [watchflakes](https://go.dev/wiki/Watchflakes)
Repository: TypeScript
Issue: Narrowed generic type is ignored in return type of callback passed to generic function
Labels: Bug,Help Wanted

# Bug Report
See the code below.  When returning a value with a narrowed generic type, the callback can't be assigned to a parameter whose return type is the same as the narrowed type. The error only happens when the callback is passed to a generic function (even when the generic isn't used for anything).

### 🔎 Search Terms
generic narrow callback return type

### 🕗 Version & Regression Information
I tried a bunch of versions in the playground, they all have the bug

### ⏯ Playground Link

[Playground link with relevant code](https://www.typescriptlang.org/play?ts=5.0.4#code/C4TwDgpgBAqgdgSwPZygXinArgWwEYQBOUAPlAM7CEJwDmA3ALABQokUASkksOpxAGMkhACYAeStToAaWIhQA+JsxYAzLHAHBkqOEgBCWWgAoBeAFxRjASnQLMuAoVsBvAL5qNWnVDxGxACoKphZWtmj22PhErh4qzOqa2ihQqtyBUBAAHsAQcCLknNzAwYTFlgGyANYQIJY1IEiqUAGuLFBQQnCUUBo+GGU8ANoNALrKHQD0kx0dAHoA-CztmAZGxjZ2UC4rUzOzUIu7UAjNxmwQTb3yqGh3UABEkjS0D7bAABZlAO6YEL8AUUIZUINgms0IEGAWEIqD6KHBewOhyWzA6bms4L8Jk2EW2x2msyOaNmpysFyu8Nu9yeVBebygnx+f0BwOEYOOkOhsOuOkRUEJB2J6MxLDiQA)

### 💻 Code

```ts
type Union = number | string;
type Root = Record<string, Union>;

function noBug(cb: () => number) {}
function bug<T>(cb: () => number) {}

function foo<T extends Root>(root: T, key: keyof T) {
  const union = root[key];
  //    ^?

  noBug(() => {
    //     ^?
    if (typeof union === "string") throw new Error();
    return union;
    //     ^?
  });
  bug(() => {
    //   ^?
    if (typeof union === "string") throw new Error();
    return union;
    //     ^?
  });
}
```

### 🙁 Actual behavior
The call to `bug` results in this error: `Argument of type '() => T[keyof T]' is not assignable to parameter of type '() => number'.`

### 🙂 Expected behavior
The call to `bug` should have no errors, like the call to `noBug`.
Repository: ant-design
Issue: Dark mode placeholder text unreadable, too low contrast
Labels: 💄 Design,Inactive

### Reproduction link

[https://ant.design/theme-editor](https://ant.design/theme-editor)

### Steps to reproduce

Enable dark mode, and look at the placeholder text in the right preview

### What is expected?

More readable contrast passing at least AA test

### What is actually happening?

Contrast fails AA test

![image](https://github.com/ant-design/ant-design/assets/7129/9d701e76-a6c5-4bb5-9779-8176e73574ae)

![image](https://github.com/ant-design/ant-design/assets/7129/c49fd884-9dc8-433f-9c0f-fdf823bc8eee)

| Environment | Info |
| --- | --- |
| antd | 5.5.1 |
| React | any |
| System | any |
| Browser | any |

<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->
Repository: pytorch
Issue: "Examples" in "batch_isend_irecv" should be modified to get the correct results
Labels: oncall: distributed

https://github.com/pytorch/pytorch/blob/6c9b94dcda696984552769da6cf578ccca0cfbdd/torch/distributed/distributed_c10d.py#LL1709C13-L1709C13

    Examples:
        >>> # xdoctest: +SKIP("no rank")
        >>> send_tensor = torch.arange(2) + 2 * rank
        >>> recv_tensor = torch.randn(2)
        >>> send_op = dist.P2POp(dist.isend, send_tensor, (rank + 1)%world_size)
        >>> recv_op = dist.P2POp(dist.irecv, recv_tensor, (rank - 1 + world_size)%world_size)
        >>> reqs = batch_isend_irecv([send_op, recv_op])
        >>> for req in reqs:
        >>>     req.wait()
        >>> recv_tensor
Here "send_tensor" and "recv_tensor" are in different dtypes, which would make it fail to get the correct results on gpus.
For example, one might need to add explict dtype declaration
        >>> send_tensor = torch.arange(2, dtype=torch.float) + 2 * rank
        >>> recv_tensor = torch.randn(2, dytpe=torch.float)

cc @mrshenli @pritamdamania87 @zhaojuanmao @satgera @rohan-varma @gqchen @aazzolini @osalpekar @jiayisuse @H-Huang @kwen2501 @awgu
Repository: vscode
Issue: Remove polyfill for nested worker
Labels: debt,web,safari

              I believe this all works in Safari 16.4 which added nested worker support. Not sure what the issue was with our nested worker polyfill (note that #183482 needs to be merged too to see this working end to end)

_Originally posted by @mjbvz in https://github.com/microsoft/vscode/issues/175229#issuecomment-1563669553_