sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: pytorch
Issue: nn.Transformer has dropout layers that BERT / GPT-2 do not have
Labels: module: docs,module: nn,triaged

### 📚 The doc issue

The [docstring of nn.TransformerEncoder](https://github.com/pytorch/pytorch/blob/51c2e22/torch/nn/modules/transformer.py#L233) reads: "Users can build the BERT(https://arxiv.org/abs/1810.04805) model with corresponding parameters."
However, `TransformerEncoderLayer` (and `TransformerDecoderLayer`) has a dropout layer in between the two linear layers that come after the attention layers:
* https://github.com/pytorch/pytorch/blob/51c2e22/torch/nn/modules/transformer.py#L723
* https://github.com/pytorch/pytorch/blob/51c2e22/torch/nn/modules/transformer.py#L874

BERT does not have this:
* https://github.com/google-research/bert/blob/master/modeling.py#L872
So the docstring is subtly wrong, at least when planning to use the model for training.

For more context, also GPT-2 does not have this:
* https://github.com/openai/gpt-2/blob/master/src/model.py#L118

The original "Attention is all you need" has it in Transformer Base v2 and v3, but not v1:
* https://github.com/tensorflow/tensor2tensor/blob/master/tensor2tensor/models/transformer.py#L1850

The official TensorFlow tutorial does not have it:
* https://www.tensorflow.org/text/tutorials/transformer#the_feed_forward_network

But the Annotated Transformer has it:
* http://nlp.seas.harvard.edu/annotated-transformer/

An alternative to changing the docstring would be extending the `TransformerEncoderLayer` implementation to optionally accept a dictionary for `dropout` with entries "residual", "mlp", "attention" for the three types of dropout that are employed in the model. But I don't know how much `nn.Transformer` is used as compared to custom implementations.

### Suggest a potential alternative/fix

A correct version would be:
"Users can build the BERT (...) model with corresponding parameters, except that BERT does not employ dropout between the feed-forward layers."
This would draw some attention to the fact that the implementation is slightly different from other transformers. Ideally, there would be a similar note for Transformer, TransformerDecoder, TransformerEncoderLayer, TransformerDecoderLayer.

cc @svekars @brycebortree @sekyondaMeta @AlannaBurke @albanD @mruberry @jbschlosser @walterddr @mikaylagawarecki @carljparker @bhosmer @cpuhrsch @erichan1 @drisspg
Repository: PowerToys
Issue: [Crop and Lock]: Does not inherit default windows 11 theme background in new window titlebar
Labels: Issue-Bug,Priority-2,Status-Reproducible,Product-CropAndLock

### Microsoft PowerToys version

0.73.0

### Installation method

GitHub

### Running as admin

Yes

### Area(s) with issue?

Crop and Lock

### Steps to reproduce

1. Create a crop window with Win+Ctrl+Shift+R.
2. Observe the new windows  titlebar is that of a light theme despite windows setting being set to a dark theme in both WIndows 11 theme and PowerToys theme itself.
This makes the Crop and Lock windows titlebar look out of place in background colour compared to all other windows.

### ✔️ Expected Behavior

Crop and Lock Reparent Window titlebar background should be the same as the windows theme/ powertoys theme.
If not possible then have an option to set it to dark mode titlebar

### ❌ Actual Behavior

Window titlebar is always light theme background even though Powertoys theme is dark and Windows 11 theme is dark.

### Other Software

_No response_
Repository: deno
Issue: Consider supporting importing files as `jsonc` / `json5`
Labels: cli,suggestion

`import data from "./data.jsonc" with { type: "jsonc" };`
`import data from "./data.json5" with { type: "json5" };`

I'm not to sure about this myself yet, but it may be interesting. What are peoples' thoughts?
Repository: stable-diffusion-webui
Issue: Use refiner with SD1.5 models
Labels: enhancement,sdxl

### Is there an existing issue for this?

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

### What happened?

Set VAE to Auto and sometimes it would work correctly but on a 2nd try after it would generate fried images similar to incorrect VAE selection which I think is what's happening. Was testing it while using Ultimate upscale and sometimes 1 tile would be fried while others were good. Subsequent tries led to all tiles being scrambled and continues to get worse.

May be related to [this issue](https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/12937) which is something to do with XL models somehow polluting the memory even after unloading and loading new checkpoints.

Settings: no caching of VAE, 2 checkpoints cached with 1 one on device selected

### Steps to reproduce the problem

1. Select SD1.5 model, enable refiner in tab and select XL base refiner 
2. Set to Auto VAE option
3. Generate normally or with Ultimate upscale

### What should have happened?

Uncorrupted images

### Sysinfo

Linux Ubuntu 22.04 6800XT 32GB ram

### What browsers do you use to access the UI ?

_No response_

### Console logs

```Shell
No errors
```


### Additional information

_No response_
Repository: opencv
Issue: "ImportError: DLL load failed while importing cv2: The specified module could not be found" when install fiftyone
Labels: bug,category: python bindings,category: build/install,platform: win32

### System Information

OpenCV version: 4.8.0
Python version: 3.11.4
Operating System / Platform: PyCharm
Windows 10

### Detailed description

I was trying to "import fifytyone as fo" on pycharm and it showed this error message:
```
  "Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
   File "C:\Program Files\Python311\Lib\site-packages\cv2\__init__.py", line 181, in <module>
     bootstrap()
   File "C:\Program Files\Python311\Lib\site-packages\cv2\__init__.py", line 153, print bootstrap
     native_module = importlib.import_module("cv2")
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   File "C:\Program Files\Python311\Lib\importlib\__init__.py", line 126, print import_module
     return _bootstrap._gcd_import(name[level:], package, level)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^
ImportError: DLL load failed while importing cv2: The specified module could not be found."
```
I have tried everything including: downloading opencv from an external source and putting it in the path environment variable but it still doesn't work
When I import cv2 I get the same error as above
Please help me and help me to get over this error, i have been fighting with it for 2 weeks now :( i am really helpless 🥺🙏😢

### Steps to reproduce

import fiftyone as fo

### Issue submission checklist

- [X] I report the issue, it's not a question
- [X] I checked the problem with documentation, FAQ, open issues, forum.opencv.org, Stack Overflow, etc and have not found any solution
- [X] I updated to the latest OpenCV version and the issue is still there
- [X] There is reproducer code and related data files (videos, images, onnx, etc)
Repository: next.js
Issue: `export const revalidate` not working with route handlers that are using `searchParams`
Labels: bug

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

https://github.com/rgembalik/next-js-revalidate-route-handler

### To Reproduce

1. Build and start the app with `yarn && yarn build && yarn start`
2. visit these urls: 
   - http://localhost:3000/api/todoOne
   - http://localhost:3000/api/todoTwo?id=2
   - http://localhost:3000/api/todoThree?id=3

### Current vs. Expected behavior

I'd expect that either second or third link performs fetch request that is cached for 3600 seconds. Instead, the second url does not produce fetch-cache entry at all, and the third URL produces an entry with one year of lifetime (and not the provided value of 3600 seconds).

### 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: 18.16.0
      npm: N/A
      Yarn: N/A
      pnpm: N/A
    Relevant Packages:
      next: 13.4.19
      eslint-config-next: 13.4.19
      react: 18.2.0
      react-dom: 18.2.0
      typescript: 5.2.2
    Next.js Config:
      output: N/A
```


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

App Router

### Additional context

I'd like to be able to cache fetch requests that are using `searchParams` to generate `fetch` request. With `export const fetchCache = 'force-cache';` it can be done, but the produced cache has one year of ttl instead of the provided 3600 seconds. 

Unfortunately, in the final project, I am using an API client library that is effectively disabling me from using `next` fetch option, as it's wrapped in a handler that doesn't understand next.
Repository: material-ui
Issue: [material-next] Improve typography handling
Labels: design: material you

Implement improvements on how we deal with typography in material next:

- [ ] Rename [`family`](https://github.com/mui/material-ui/blob/104b3c03303aaba809042ef0f1193f5764d14f3d/packages/mui-material-next/src/Button/Button.tsx#L273) to `font` in typescales for consistency with [Material You specification](https://m3.material.io/styles/typography/type-scale-tokens)
- [ ] Move [`pxToRem`](https://github.com/mui/material-ui/blob/104b3c03303aaba809042ef0f1193f5764d14f3d/packages/mui-material-next/src/Button/Button.tsx#L275) to typescale
- [ ] Create utilities for [`line-height`](https://github.com/mui/material-ui/blob/104b3c03303aaba809042ef0f1193f5764d14f3d/packages/mui-material-next/src/Button/Button.tsx#L276) calculation and [`letter-spacing`](https://github.com/mui/material-ui/blob/104b3c03303aaba809042ef0f1193f5764d14f3d/packages/mui-material-next/src/Button/Button.tsx#L248-L250) calculation, maybe adapt [`createTypography`](https://github.com/mui/material-ui/blob/104b3c03303aaba809042ef0f1193f5764d14f3d/packages/mui-material/src/styles/createTypography.js)
- [ ] Round `letter-spacing` calculation (point 1. in https://github.com/mui/material-ui/pull/38584#event-10248596056)
- [ ] Use `em` instead of `rem` when applicable (`letter-spacing`, `line-height`, point 2. in https://github.com/mui/material-ui/pull/38584#event-10248596056)
- [ ] Rename `lineHeight` to `lineHeightPx` in `typescale`, add a calculated unitless `lineHeight` (Suggested [here](https://github.com/mui/material-ui/pull/39514/files#r1365501317))
Repository: deno
Issue: An issue with Pinia on Deno
Labels: bug,node compat

Hi,

1- After following the example of Deno with Vue, I attempted to place every dependency in `deps.ts` as per conventional practice. Initially, the `defineConfig` function from `vite` was added, and everything seemed to be working fine at this stage.

File: `deps.ts`:
```js
export { defineConfig } from 'npm:vite@^4.3.9'
```
File: `vite.config.mts`:
```js
import { defineConfig } from './deps.ts'
import vue from 'npm:@vitejs/plugin-vue@^4.2.3'
import 'npm:vue@^3.3.4'
import 'npm:vue-router@4'

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [vue()],
})
```
At this point, the app runs fine. However, when attempting to use the `vue` function from the `vite-vue` plugin in the second step, it doesn't seem to be possible to do it the same way.

File: `deps.ts`:
```js
export { vue } from 'npm:@vitejs/plugin-vue@^4.2.3'
// or
// export * from 'npm:@vitejs/plugin-vue@^4.2.3'
```
File: `vite.config.mts`:
```js
import { defineConfig } from './deps.ts'
import { vue } from './deps.ts' // is not recognized

import 'npm:vue@^3.3.4'
import 'npm:vue-router@4'

export default defineConfig({
  plugins: [vue()],
})
```
How can I export all npm packages to `deps.ts`? What about `npm:vue@^3.3.4` and `npm:vue-router@4`?

2- Keeping the dependencies in the `vite.config.mts` file, I wanted to add `pinia`. Here is what I added to `deps.ts`:
```js
export { createPinia, defineStore } from 'npm:pinia@2.1.6'
```
File: `main.ts`:
```js
import { createPinia } from '../deps.ts'
// other imports

const app = createApp(App)
app.use(createPinia())
app.mount('#app')
```
The syntax seems to be fine according to vscode's inspection, but now I'm getting a weird error:
```
[plugin:vite:import-analysis] Failed to resolve import "npm:vite@^4.3.9" from "deps.ts". Does the file exist?
/path/to/deps.ts:2:29
1  |  export { defineConfig } from "npm:vite@^4.3.9";
   |                                ^
2  |  export { createPinia, defineStore } from "npm:pinia@2.1.6";
3 
```
Is this error related to how Deno resolves dependencies? Can we just import the full direct link without using npm?
Repository: godot
Issue: calling assembly errors on godot 3.5.1
Labels: bug,topic:dotnet

### Godot version

v3.5.2.stable.mono.official [170ba337a]

### System information

Windows 10 Pro

### Issue description

I got these errors:
```
E 0:00:00.875   _real_load_assembly_from: Failed to open assembly image from memory: 'res://.mono/temp/bin/Debug/MultiTouchMobile.dll'.
  <C++ Error>   Condition "status != MONO_IMAGE_OK || !image" is true. Returned: __null
  <C++ Source>  modules/mono/mono_gd/gd_mono_assembly.cpp:247 @ _real_load_assembly_from()
```
and 
```
E 0:00:00.939   can_instance: Cannot instance script because the project assembly is not loaded. Script: 'res://MultiTouch.cs'.
  <C++ Error>   Method failed. Returning: __null
  <C++ Source>  modules/mono/csharp_script.cpp:2894 @ can_instance()
```

### Steps to reproduce

I cannot reproduce this , because I don't know from where this came

### Minimal reproduction project

[GodotMultiTouch-main.zip](https://github.com/godotengine/godot/files/12515921/GodotMultiTouch-main.zip)
I uploaded the Godot project that gave me these errors uploaded
Repository: godot
Issue: Long editor freeze after editing script in C# and building it
Labels: needs testing,topic:dotnet

### Godot version

4.1 - 4.1.1 Mono (C#)

### System information

Windows 11, Fedora 38 (XFCE, Gnome, KDE) - Godot 4.1 - 4.1.1, Dotnet 7, Ryzen 5950, Geforce 3080, 128gb DDR4 RAM

### Issue description

I've experienced this issue all the way from 4.1 to 4.1.1 on windows 11 and on linux fedora 38 (XFCE, Gnome, KDE) - **C#**. If you change something in a script and click build, the project gets built fast, but the editor becomes unresponsive for 30-60 seconds on Linux and for significantly less time unresponsive on Windows 11.

I've downgraded my project to 4.0.4 and this issue does not exist anymore, I regain the control in 1-2 seconds.

### Steps to reproduce

Install and run on Windows 11, Fedora 38.

### Minimal reproduction project

/
Repository: go
Issue: proposal: runtime: optionally dump PGO profile at the program exit
Labels: Proposal

According to the official Go [documentation](https://go.dev/doc/pgo) about PGO, the only described way to collect a PGO profile is via https://pkg.go.dev/net/http/pprof and collect the profile from a dedicated HTTP handler.

This way has a major drawback - it's not convenient to collect profiles from non-service-like workloads. E.g. if I have a one-shot system - it is almost not possible to collect a good profile from the application.

As far as I understand, in such cases could be applied tricks from https://pkg.go.dev/runtime/pprof documentation with 
manual CPU dumping. This way also has some drawbacks:
* Right now it's not clear - what kind of profile should be collected for the PGO build. `CpuProfile`, `Memprofile`? I guess CpuProfile should be used
* A user needs to manually integrate profile collection at exit - it could be an error-prone activity

I suggest an additional way to collect PGO profiles - add a specific "Instrumentation" build for the Go application. This would be very similar to Instrumentation PGO in other languages/compilers like Clang, GCC, Rustc. In the Go application, this specific kind of build will simply insert a code by dumping a PGO profile to a disk at the program exit (like it's done in Clang). This makes it much easier to collect PGO profiles for programs like https://github.com/dominikh/go-tools .

Also, an additional way with auto-dumping makes using PGO in Go easier for people who have PGO experience from other languages like C++ and Rust.
Repository: pytorch
Issue: Breaking incompatibility with Cuda 12.2, pytorch stable, torchvision
Labels: module: binaries,module: crash,module: cuda,triaged

### 🐛 Describe the bug

With latest Cuda 12.2 and ubuntu 20.04 driver, pytorch stable and torchvision installed as on web site, there is a weird segfault occurring whenever a model runs on Cuda.
When it crashes with a message, it's always about python multiprocessing code with buffers too big. Sorry I didn't capture as it seems random with most of the time a segfault without a message. Reinstall from scratch didn't solve the issue. 

Note that DDP works but segfault happens with simple single threaded inference. 

Solution is to use pytorch-nightly and to force it to install gpu version for pytorch and torchvisio, as by default it installs cpu version! This works very well and even faster. We can't wait to see this nightly becomes the new stable. 

Another solution could be to downgrade as we didn't see issue with Cuda 12.1 and pytorch stable for the last 6 months. Maybe that's what we'd be forced to do if nightly breaks... 

### Versions

Ubuntu 20.04
Python 3.11 or 3.10 in conda environment 
Cuda 12.2, cudnn 8 for Cuda 12, on A100 server. 
Pytorch stable and torchvision latest in a fresh conda environment. 


cc @seemethere @malfet @ptrblck
Repository: rust
Issue: Cannot round trip parsing `-1` as non-decimal
Labels: T-libs-api,C-feature-request,C-bug,A-fmt

I tried this code:

```rust
let value: i32 = -1;
let s = format!("{value:b}");
let parsed = i32::from_str_radix(&s, 2).unwrap();
assert_eq!(parsed, value);
```

[Playground Link](https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=8366c7214eda6a198f50f8805b9edb5b)

I expected to see this happen: I should be able to parse the `i32` from its base-2 string representation. (Edit: this seems to happen with any non-base-10 base).

Instead, this happened: A positive overflow occurs.

```
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: ParseIntError { kind: PosOverflow }', src/main.rs:4:45
```

### Meta
<!--
If you're using the stable version of the compiler, you should also check if the
bug also exists in the beta or nightly versions.
-->

`rustc --version --verbose`:
```
1.72.0
```

This also occurs with `1.74.0-nightly (2023-09-03 58e967a9cc3bd39122e8)`.

<!--
Include a backtrace in the code block by setting `RUST_BACKTRACE=1` in your
environment. E.g. `RUST_BACKTRACE=1 cargo build`.
-->
<details><summary>Backtrace</summary>
<p>

```
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: ParseIntError { kind: PosOverflow }', src/main.rs:4:45
stack backtrace:
   0: rust_begin_unwind
             at /rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/std/src/panicking.rs:593:5
   1: core::panicking::panic_fmt
             at /rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/core/src/panicking.rs:67:14
   2: core::result::unwrap_failed
             at /rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/core/src/result.rs:1651:5
   3: core::result::Result<T,E>::unwrap
             at /rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/core/src/result.rs:1076:23
   4: playground::main
             at ./[src/main.rs:4](https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=8366c7214eda6a198f50f8805b9edb5b#):18
   5: core::ops::function::FnOnce::call_once
             at /rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/core/src/ops/function.rs:250:5
```

</p>
</details>
Repository: material-ui
Issue: [theme] TypeError: `theme.spacing` is not a function when using Chakra UI theme with Material UI theme & MUI X DataGrid
Labels: bug 🐛,package: system,component: data grid,customization: theme,MUI X

### Duplicates

- [X] I have searched the existing issues

### Latest version

- [x] I have tested the latest version

### Steps to reproduce 🕹

Link to live example: https://codesandbox.io/p/sandbox/create-next-app-example-forked-ktl63y?file=/pages/index.js:1,1

Steps:

1. follow this guide: https://mui.com/material-ui/guides/styled-engine/#using-with-chakra-ui to be able to use chakraui theme with mui theme. 
2. Render <DataGrid /> component from  '@mui/x-data-grid'; with `checkboxSelection=true` prop
3. Select one of the checkboxes


### Current behavior 😯

I am getting 'typeError: theme.spacing is not a function'

![typerror: theme spacing is not a fn](https://github.com/mui/material-ui/assets/6736418/4044ed66-7bed-4f97-931d-b5ee071d6be4)


### Expected behavior 🤔

I should be able to select/unselect rows through the checkboxes normally

### Context 🔦

I have an app where the main theme used is chakraui. On one page I want to use the material ui data grid component. & I tried theme scoping and it didn't show any errors or strange ui when the table was rendered however when I tried selecting a row using the check boxes I got the error "theme.spacing is not a fn".
I have seen that theme scoping was tacked in this issue: https://github.com/mui/material-ui/issues/25852 & I have implemented the solution stated in the docs but it is not working for my case.

### Your environment 🌎

<details>
  <summary><code>npx @mui/envinfo</code></summary>
```

-   System:
-     OS: Linux 5.15 Ubuntu 20.04.6 LTS (Focal Fossa)
-   Binaries:
-     Node: 18.14.2 - ~/.nvm/versions/node/v18.14.2/bin/node
-     Yarn: 1.22.19 - /usr/local/bin/yarn
-     npm: 9.5.0 - ~/.nvm/versions/node/v18.14.2/bin/npm
-   Browsers:
-     Chrome: 113.0.5672.126
-   npmPackages:
-     @emotion/react: ^11.11.1 => 11.11.1 
-     @emotion/styled: ^11.11.0 => 11.11.0 
-     @mui/base:  5.0.0-beta.13 
-     @mui/core-downloads-tracker:  5.14.7 
-     @mui/material: ^5.14.0 => 5.14.7 
-     @mui/private-theming:  5.14.7 
-     @mui/styled-engine:  5.14.7 
-     @mui/system:  5.14.7 
-     @mui/types:  7.2.4 
-     @mui/utils:  5.14.7 
-     @mui/x-data-grid: ^6.12.0 => 6.12.1 
-     @mui/x-date-pickers: ^6.10.0 => 6.12.1 
-     @types/react:  18.2.21 
-     react: ^18.2.0 => 18.2.0 
-     react-dom: ^18.2.0 => 18.2.0 
-     typescript:  5.2.2 

```
</details>