sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: ant-design
Issue: Form表单，FormItem 与 fieldEntities 对用不一致，导致validateRules校验时候，被抛出的errorInfo有问题
Labels: 🐛 Bug,Inactive

- [ ] I have searched the [issues](https://github.com/ant-design/ant-design/issues) of this repository and believe that this is not a duplicate.

### Reproduction link
[![Edit on CodeSandbox](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/antd-reproduction-template-forked-bk0nb?file=/index.js)

### Steps to reproduce
1、list数组 map 初始化Form.Item
2、setList => 在任意位置添加一个新的item，和删除一个旧的item，保持数组长度不变
3、fieldEntities 会把item添加到末尾，导致里面的field与Form.Item顺序不一致

### What is expected?
无论怎么修改list，Form.Item 与fieldEntities 顺序一直。scrollToFirstError就可以正确运行

### What is actually happening?
errorInfo 数组的顺序与fieldEntities 的校验属性一致，但是与页面实际的Form.Item 位置不一致，导致scrollToFirstError定位错误

| Environment | Info |
|---|---|
| antd | 4.14.1 |
| React | ^17.0.2 |
| System | macos 10.14.6 |
| Browser | Chrome/89.0.4389.82 |


<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->
Repository: pytorch
Issue: [amp scaler] unable to prevent "scheduler before optimizer step" warning
Labels: module: optimizer,triaged,module: amp (automated mixed precision)

## 🐛 Bug

We get:

```
torch/optim/lr_scheduler.py:132: UserWarning: Detected call of lr_scheduler.step() before optimizer.step(). In PyTorch 1.1.0 and 
later, you should call them in the opposite order: optimizer.step() before lr_scheduler.step(). Failure to do this will result in PyTorch 
skipping the first value of the learning rate schedule. See more details at https://pytorch.org/docs/stable/optim.html#how-to-adjust-learning-rate
warnings.warn("Detected call of lr_scheduler.step() before optimizer.step().
```

because AMP scaler skips `optimizer.step` on overflow.

## To Reproduce

```
        scaler = torch.cuda.amp.GradScaler()
        with torch.cuda.amp.autocast():
            output = net(input)
            loss = loss_fn(output, target)
            scaler.scale(loss).backward()
            scaler.unscale_(optimizer)
            scaler.step(optimizer)
            scaler.update()    
            scheduler.step()
```

Under AMP if scaler sees an overflow the first time `scaler.step(optimizer)` is called, it won't call `optimizer.step`, so as you can see we have a problem here, ` scaler.step(optimizer)` doesn't return a status of whether it was run or not and therefore it's impossible to know whether to run `scheduler.step()` or not. 

So the warning is correct, but there is no programmatic way to fix it.
It'd be nice to be able to get rid of this warning by solving this situation with design.

Original report/discussion: https://github.com/huggingface/transformers/issues/11106

Thank you!


cc @mcarilli @ptrblck @vincentqb
Repository: ant-design
Issue: Table - rowSelection - selectAllCheckboxState
Labels: Inactive

- [ x ] I have searched the [issues](https://github.com/ant-design/ant-design/issues) of this repository and believe that this is not a duplicate.

### What problem does this feature solve?
Help to override the default behaviour of Select All checkbox.
The easiest use case I can think of is:
- I override selectAll to select all items on all pages (instead of select all items on the current page)
- I click select all
- Then I deselect some item on page 2. Then switch to another page 1, that have all items selected.

Now the checkbox is in state 'checked' (because I didn't deselect anything on page 1)
But what I really want now is the checkbox to be in 'indeterminate' state. Because some items on page 2 are deselected - so it matches my overridden SelectAll behaviour

### What does the proposed API look like?
Maybe 
 - selectAllCheckboxState: 'indeterminate' - 'checked' - 'unchecked'

Or
 - selectAllCheckbox: ReactNode  - Rendering a checkbox


<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->
Repository: godot
Issue: ERROR: Updating textures forbidden during creation of a draw list (ResourceLoader.LoadThreadedRequest)
Labels: bug,topic:rendering

**Godot version:**
Godot Engine v4.0.dev.mono.custom_build.f7ae5442a


**OS/device including version:**
Windows 10


**Issue description:**
Loading a scene with images using ResourceLoader.LoadThreadedRequest triggers the following error (and textures do not appear when loaded):
```
ERROR: Updating textures in is forbidden during creation of a draw or compute list
   at: (drivers/vulkan/rendering_device_vulkan.cpp:2281)
```


**Steps to reproduce:**
Run test project; Console shows output with error.


**Minimal reproduction project:**
[New Game Project.zip](https://github.com/godotengine/godot/files/6276212/New.Game.Project.zip)
Repository: godot
Issue: All C# Scripts are cleared upon build(VS Build Tools)
Labels: bug,needs testing,topic:dotnet

**Godot version:**
Godot 3.2.3.stable.mono.official


**OS/device including version:**
Windows 10


Steps to reproduce:

1. Create a C# script that inherits Resource
2. Save the script (using Visual Studio) and then close Visual Studio
3. Build the solution using MSBuild(VS Build Tools)
4. Get an error in Debug saying that the C# script has nothing in _ready() method.
5. Open said C# script to see that all my codes are gone and the script is now the blank C# template.

Fortunately I had a copy of the codes in another repo so I just copied it over, but I can't imagine I'd be very happy after coding multiple C# scripts (I'm trying to utilize C#  scripts more for performance intensive operations such as procedural generation) and when I close out Visual Studio EVEN THOUGH I saved my codes and run the build solution it clears everything, and when I open the script again from Godot for Visual Studio everything is still gone ( despite saving).
Repository: flutter
Issue: Prevent to call onChange of TextField when Keyboard hide (Back Press)
Labels: a: text input,framework,f: material design,has reproducible steps,found in release: 2.1,team-design,triaged-design

I am working on a Sample Application in which I am searching using **TextField** and displaying data in **ListView**. 

I found some issue in this scenario that **when I press the back button to hide the keyboard, it calling onChange() callbacks again.** It's happening on the **back press** button only, working perfectly on the **Done** button of **Keyboard**.

You can try the [sample gist ](https://gist.github.com/pratikbutani/b5654c6a8924ba6c8eb208e6592522f4)(without API Calling and printing simple logs). _Kindly run on the device to hide the keyboard by pressing the back button._

Here is the video to clear more about it:

https://user-images.githubusercontent.com/3306366/113987983-99d9a680-986c-11eb-8c1a-7f37e92f9737.mp4

I have tried to run it on both **stable** and **master** branches of flutter.

**MASTER : flutter --version:**
> Flutter 2.1.0-13.0.pre.524 • channel master • https://github.com/flutter/flutter.git
> Framework • revision 98a9618993 (2 hours ago) • 2021-04-07 22:34:03 -0700
> Engine • revision cf86823971
> Tools • Dart 2.13.0 (build 2.13.0-213.0.dev)
> 

**STABLE : flutter --version:**
> Flutter 2.0.4 • channel stable • https://github.com/flutter/flutter.git
> Framework • revision b1395592de (6 days ago) • 2021-04-01 14:25:01 -0700
> Engine • revision 2dce47073a
> Tools • Dart 2.12.2
> 

I got a temporary answer on [Stackoverflow](https://stackoverflow.com/questions/66929727/flutter-prevent-to-call-onchange-of-textfield-when-keyboard-hide-back-press) but its a hack only not a solution. 

I think many developers are not aware of it and don't know even they are calling their APIs +1 time. Hope it will be solved soon.
Repository: flutter
Issue: [proposal]: Make PaginatedDataTable's column and footer floating or sticky
Labels: c: new feature,framework,f: material design,c: proposal,team-design,triaged-design

## Use case

 I am using PaginatedDataTable for data presenting. I have to warp it with ListView to make it scrollable, but when I scroll the table up and down, the column and footer rows are not always visible, which is quite inconvenient for the data cell recognition.

So, my requests are:

1:  Make the column and footer (page navigation control) sticky, so they are always visible in the current viewport.
2:  Make the position of the page navigation control customizable. For instance, in the middle of the row, or on the left of the row, not always on the right of the footer row.

## Proposal

As shown in the attached.
![Capture](https://user-images.githubusercontent.com/17311548/114003342-3fead800-9890-11eb-9413-286cea31de64.PNG)
Repository: create-react-app
Issue: CRA does not check for presence of emitDeclarationOnly in tsconfig
Labels: needs triage,issue: bug report

See https://github.com/facebook/create-react-app/issues/9373

CRA adds `noEmit: true` which conflicts with `emitDeclarationOnly: true` as a tsconfig setting but this would be a fine setting for CRA so CRA should check if `emitDeclarationOnly: true` and in that case not add `noEmit: true`
Repository: electron
Issue: [Feature Request]: WebContents "will-navigate" event add postData for form-post case
Labels: enhancement :sparkles:

### Preflight Checklist

I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/master/CONTRIBUTING.md) for this project.
I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/master/CODE_OF_CONDUCT.md) that this project adheres to.
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

In my project, will prevent all "will-navigate" in Main Process, and use `browserWindow.loadURL` to custom jump.
The problem is, when prevent this event, i can't get postData to send `loadURL` second param.

### Proposed Solution

event data has postData property expose to me, like this:
```js
browserWinow.webContents.on('will-navigate', (e, u) => {
    signinSnsWindow.loadURL(u, { postData: e.postData });
})
```

### Alternatives Considered

None.

### Additional Information

Electron/11.4.1
Repository: pytorch
Issue: pytorch inference lead to memory leak in cpu
Labels: module: memory usage,triaged

## 🐛 Bug

I inference using pytorch model, I got memory leak problem, my code as follow:

```
import torch
import torch.nn as nn
from memory_profiler import profile
from memory_profiler import memory_usage


@profile(func=None, stream=open('./resnet.log', 'w'))
def run(net, x):
    net(x)


class ConvVerify(nn.Module):

    def init(self):
        for name, m in self.named_modules():
            # print(name, m)
            if isinstance(m, nn.Conv2d):
                nn.init.kaiming_normal_(m.weight, mode='fan_out')
                if m.bias is not None:
                    nn.init.constant_(m.bias, 0)
            elif isinstance(m, nn.BatchNorm2d):
                nn.init.constant_(m.running_mean, 0)
                nn.init.constant_(m.running_var, 1)
                if m.weight is not None:
                    nn.init.constant_(m.weight, 1)
                if m.bias is not None:
                    nn.init.constant_(m.bias, 0)

    def __init__(self):
        super(ConvVerify, self).__init__()

        stride = 1
        self.model = nn.Sequential(
            nn.Conv2d(288, 64, (2, 2), stride),
            nn.BatchNorm2d(64),
            nn.ReLU(),
        )
        self.init()

    def forward(self, x):
        return self.model(x)


def begin():
    conv_verify_inst = ConvVerify()
    x = torch.autograd.Variable(torch.rand(1, 288, 7, 7))
    for i in range(3000):
        run(conv_verify_inst, x)


if __name__ == "__main__":
    begin()
```

When run some iterator, the memory will increate 0.1M or 0.2M. For exmple, base memory is 71.8 MiB, finally, the memory increated to 72 MiB

## Environment

 - PyTorch Version (e.g., 1.0): 1.4.0 or 1.8.0 
 - OS (e.g., Linux):  windows10 and mac10.13
 - How you installed PyTorch (`conda`, `pip`, source): pip
 - Build command you used (if compiling from source):
 - Python version: 3.6.2 on windows10 and 3.6.13
 - CUDA/cuDNN version: just cpu
 - GPU models and configuration: just cpu
Repository: vscode
Issue: extensions view: Wrap stars instead of clipping them
Labels: help wanted,feature-request,good first issue

<!-- ⚠️⚠️ 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. -->
This is not a duplicate of #9644 -- but it's perhaps tangentially related

<!-- Describe the feature you'd like. -->

I'm using multiple boxes side by side in VSCode, so my individual editors are moderately narrow. And I turn on word wrap for my editors...

When I searched for an HTML Preview editor, in extensions, I saw this:
![stars clipped](https://user-images.githubusercontent.com/2119212/114026076-d2b15580-9843-11eb-9fa3-407889330f26.png)

2 stars doesn't seem like a good rating. But I installed it anyway. (Yes, it has 3+ stars, but ...)

Keep in mind that a user, like me, won't necessarily know how non present stars work. Sure, it's possible that they're painted as hollow (as VSCode does), but it's also possible that they're painted as invisible, and if a user doesn't see them, and hasn't looked for extensions in general / recently, there's no way for them to know.

stars aren't shown in this view, so there's no hint about how to expect them above:
![extensions list](https://user-images.githubusercontent.com/2119212/114026574-6551f480-9844-11eb-8095-4ccbd8a24242.png)

Some parts of the top grow ellipses, and the descriptive content wraps:
![ellipsis for short desc and wrapping in README](https://user-images.githubusercontent.com/2119212/114026755-9c280a80-9844-11eb-8f8c-6108e8c8f364.png)

---
In short, I'd like the stars to wrap as an integral unit. arguably whatever `tht13.html-preview-vscode` is and the non selectable text _This extension is enabled globally._  should as well. Or, if not, at least use ellipses instead of simply clipping them.
Repository: godot
Issue: Godot console is using unbuffered I/O and generally slow on windows
Labels: bug,platform:windows,topic:core,topic:editor,topic:porting,performance

**Godot version:**
4.0 dev f7ae544
3.x also

**OS/device including version:**
Windows 10.0.19041.867

**Issue description:**
Debug logs on Godot are horrendously slow when the windows console is enabled,

This happens especially when a script error causes 10 files to fail to load and 1000's of errors due to dependency; or when a shader fails to compile and the entire source is printed out. On a normal execution of Godot, if one of my scripts has an error, it will often take as much as 30 seconds for all the logspam to stop printing.

With the below workaround, Godot will print logspam almost immediately and be responsive within 3 seconds, even after a critical script error that affects all other scripts.

We all thought Windows console was crappy, so nobody bothered to report this bug.
I'm pretty sure this is a bug with Godot, because other applications are able to print way more to the console without any hitches.

**Steps to reproduce:**
1. Run Godot with a large project or shader that has a compile error.
2. The editor freezes for non-zero time.
3. Close Godot.
4. Now run Godot from Cygwin or GIT Bash with this command:
```
bin/godot.windows.opt.tools.64.exe > output.txt 2>&1 &
tail -f output.txt
```
5. Not only does Godot start much faster, but it actually prints the output way faster (subject to tail's buffering delay).

**Minimal reproduction project:**
Any project which prints errors or logspam
Repository: rust
Issue: Documentation of `mem::uninitialized` potentially confusing for ZSTs
Labels: C-enhancement,T-libs-api,A-docs,A-layout,A-zst

I recently wanted to create a value of a zero-sized type. (Making sure that the type is `'static` and `Copy` and my API already got passed an instance of it at some point earlier.) After some thinking, I’ve ended up using `MaybeUninit::uninit().assume_init()` to create a value of the type. But I don’t feel 100% satisfied with this choice. The reason is the following: The [`mem::unitialized`](https://doc.rust-lang.org/std/mem/fn.uninitialized.html) docs tell me that
* >it has the same effect as [`MaybeUninit::uninit().assume_init()`](https://doc.rust-lang.org/std/mem/union.MaybeUninit.html#method.uninit)

  and
* >the function basically cannot be used correctly


Now from my use case, I would argue that for the case of zero-sized types, `mem::unitialized` _can_ indeed be used correctly.

Is this correct? If it is, then maybe adjusting the documentation would help avoid confusion.

@rustbot modify labels: T-doc, T-libs, C-enhancement, A-layout
Repository: rust
Issue: Slices that cover the last byte of the address space are invalid
Labels: A-docs,A-iterators,T-libs

The current implementation uses `pointer::add` to compute the end pointer for the bounds check:
https://github.com/rust-lang/rust/blob/69e1d22ddbc67b25141a735a22a8895a678b32ca/library/core/src/slice/iter.rs#L88-L102
The method requires that the calculation will not overflow a `usize`, however that is not always the case. For instance, an allocator might return the last available page (`0xfffff000` on x86) and correctly return a slice of `u8` (with size 4096 on x86). If a program now iterates over the slice, the end pointer will overflow, wrapping around the address space and thus creating UB. 

This behaviour is extremely unlikely and only occurs with `no_std` as most kernels reserve the higher half of the address space anyway. 

# Solutions
* Use wrapping_add instead, which avoids the UB, but might disable some optimizations
* Update the requirements for allocators so they aren't allowed to return the last bit of memory
* …
Repository: rust
Issue: Documentation: inline code with links split into multiple blocks
Labels: C-enhancement,T-libs-api,A-docs

**EDIT(camelid): ⚠️ Please do not open a PR for this! It is still under discussion.**

-----

Right now in the standard library documentation, when a piece of inline code has part of it linked, the code is split into multiple `<code>` blocks, which renders poorly. For example the [`Arc` thread safety section](https://doc.rust-lang.org/nightly/std/sync/struct.Arc.html#thread-safety) contains

![image](https://user-images.githubusercontent.com/18604588/114037935-b6340e00-9881-11eb-9739-0b5b62b03158.png)

Here, between `Arc<` and `RefCell`, and between `<T>` and `>`, there is extra spacing. This is because the doc comment contains
```rust
/// `Arc<`[`RefCell<T>`]`>`
```
which is rendered using three `<code>` blocks as
```html
<code>Arc&lt;</code><a href="../../std/cell/struct.RefCell.html"><code>RefCell&lt;T&gt;</code></a><code>&gt;</code>
```

I think better would be
```rust
/// <code>Arc&lt;[RefCell&lt;T&gt;][RefCell]&gt;</code>
```
which presumably is rendered in one block as
```html
<code>Arc&lt;<a href="../../std/cell/struct.RefCell.html">RefCell&lt;T&gt;</a>&gt;</code>
```
(I'm not sure if the link to `RefCell` gets a `title` attribute as well).

The downside is that now the doc comment markdown is a bit hairy with explicit `<code>`, `&lt;` and `&gt;` spread throughout.

Is this substitution considered an improvement? If so I can grep through the code, make some substitutions, and open a PR.

An alternative solution would be to change rustdoc itself to combine consecutive code blocks, some of which could be wrapped inside `<a>`/`</a>`, into a single block, though I do not have the know-how to open such a PR. I don't even know if there is some downside to this that I am missing, where `<code>` blocks are meant to be separate, maybe for some markdown compliance or something.
Repository: pytorch
Issue: ATen/native/sparse headers not in LibTorch or pypi package
Labels: module: binaries,triaged

## 🐛 Bug

LibTorch and the PyPi package do not include the headers for sparse operations, located [here](https://github.com/pytorch/pytorch/tree/master/aten/src/ATen/native/sparse)

## Expected behavior

I would expect the headers to be present.

## Environment

torch1.8.0+cu111 Linux

cc @ezyang @seemethere @malfet @walterddr
Repository: flutter
Issue: Proposal: Make ScrollPhysics reactive
Labels: framework,f: scrolling,c: proposal,P3,team-framework,triaged-framework

Hello there!
Right now a ScrollPhysics is only updated if you change the class type.

https://github.com/flutter/flutter/blob/f82046b150ad9d54962ad8098df2babdad34c596/packages/flutter/lib/src/widgets/scrollable.dart#L458-L463

I think it would be great to follow some other patterns inside the flutter framework to allow this class to be reactive. This would be to add a new method inside the ScrollPhysics like 

```dart
bool shouldReload (covariant ScrollPhysics old) => false;
```
Notice by default would return false, so the behaviour for all the current ScrollPhysics would be the same as now.

Then when the Scrollable widget updates we would add 
```dart
  if (newPhysics?.runtimeType != oldPhysics?.runtimeType || 
      newPhysics?.shouldUpdate(oldPhysics!))
        return true;
```

This pattern can be seen in [LocalizationsDelegate](https://api.flutter.dev/flutter/widgets/LocalizationsDelegate/shouldReload.html), [SliverPersistentHeaderDelegate](https://api.flutter.dev/flutter/widgets/SliverPersistentHeaderDelegate/shouldReload.html),  [SliverChildDelegate](https://api.flutter.dev/flutter/widgets/SliverChildDelegate/shouldReload.html),  [ScrollBehavior](https://api.flutter.dev/flutter/widgets/ScrollBehavior/shouldNotify.html), and many more. (In the search box from the [api website](https://api.flutter.dev/flutter/) write **should** to see the rest)



## Use case
I am building a ScrollPhysics that allows snapping to different positions if the scrollOffset is too close (Similiar to PageScrollPhysics). This would be very useful for SliverAppBars to accomplish this behaviour, where it only snaps to a expanded/collapsed state, but the scroll can not stop in the middle.

https://user-images.githubusercontent.com/19904063/114042305-99013e80-9885-11eb-876e-1e2966379539.MP4

 It works, but right now it is not reactive. People need to do a hot-restart to see the changes made to it.

```dart
CustomScrollView(
   physics: SnapScrollView(offset: 64, range: 20),
   slivers: [
      ....
   ]
);
```


It is important to consider this comment from the Scrollable doc though. 
https://github.com/flutter/flutter/blob/f82046b150ad9d54962ad8098df2babdad34c596/packages/flutter/lib/src/widgets/scrollable.dart#L142-L155

I don't understand why it would be needed to create this object for each frame to see if has changed its configuration. Right now the type runtime is compared only when the widget or its dependencies are updated. So I think it would be the same to also check it through a shouldUpdate method if the configuration has changed.

Notice the ScrollPhysics class is immutable so it should not change its configuration after created. And when it changes didDependenciesUpdate or didWidgetUpdate should be triggered if is used in that scrollable.

cc: @Piinks