sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: pytorch
Issue: Add an LRScheduler interface for torch schedulers.
Labels: module: optimizer,triaged,enhancement,module: LrScheduler

## 🚀 Feature
Add an `LRScheduler` interface to all schedulers featuring, at a minimum, an abstract property `optimizer` and an abstract method `step`.

## Motivation

I have three reasons for opening this issue:

1. The type system is not clear -- it would be much easier to do static type checking and work with torch if we can abstract away the details of scheduler implementation when we don't need them.
2. When working on fixing #67696 I found that the testing logic is tricky to implement in a clean an reusable way as one must can't verify that the optimizer you think a scheduler is using is actualyl being used. This feature would improve the quality of the tests that we can write.
2. When using the OneCycle and CyclicLR schedulers at work, I ran into linting and typing issues with mypy (unfortunately I don't have a reproducible example at hand) as we could not specify that we wanted to use anything other than an`_LRScheduler` which is a private class.

## Pitch

Add an interface with some basic methods and properties we expect to have in a scheduler.

e.g.
```
import abc

class LRScheduler(abc.ABC):
    @abc.abstractmethod
    @property
    def optimizer(self):
        pass


    @abc.abstractmethod
    def step(self, *args, **kwargs):
        pass
```

one example where this could not be implemented in `_LRScheduler` is in `ChainedScheduler` -- this could be implemented as follows:
```
@property
def optimizer(self):
    # the validity check that is in __init__ can be moved here instead
    return self._schedulers[0].optimizer
```
[source](https://pytorch.org/docs/stable/_modules/torch/optim/lr_scheduler.html#ChainedScheduler)


Doing this ought to make working with torch easier -- when docs talk about using a scheduler, they have a clear interface to point to. This will make type checking easier too!

## Alternatives

The only alternative I have considered is making a different typing hierarchy.
It is not clear, to me at least, what the scope of the optimizer interface should be, but I think the proposal covers a good minimum.

## Additional context

I would be happy to implement this feature, if it is approved.


cc @vincentqb @jbschlosser @albanD @janeyx99 @crcrpar
Repository: godot
Issue: AudioEffectRecord has more latency when using an USB microphone compared to an analog microphone
Labels: bug,needs testing,topic:audio

### Godot version

3.3 Stable

### System information

Solus OS 4.3

### Issue description

I make a software that capture a voice input using a microphone. I realize that analog microphone with audio jack works perfectly fine but usb mic will have a latency issue. It takes time bofore showing an output that "audio is captured"

### Steps to reproduce

this line of code:
var power = AudioServer.get_bus_peak_volume_left_db(AudioServer.get_bus_index("Record"), 0)

with the attached bus and audiostreamplayer setups
![image](https://user-images.githubusercontent.com/50040102/140043718-75395627-1c0f-4a18-b28b-8ec8d38cfd91.png)
![image](https://user-images.githubusercontent.com/50040102/140043748-125d61a3-548d-4f6f-a15a-37e16e7c2a26.png)

For some reason, usb mic user will get a delay for the output.


### Minimal reproduction project

_No response_
Repository: opencv
Issue: PyCharm cannot find cv2 references with the most recent version
Labels: category: python bindings,category: 3rdparty

- OpenCV => 4.5.4.58
- Operating System / Platform => Ubuntu 18.04.5 LTS
- Compiler => opencv-python package installed via pip

##### Detailed description

PyCharm gives the following warning everywhere where cv2.* is used:

`cannot find reference <function name> in __init__.py | __init__.py`

I'm importing cv2 as:

`import cv2`

the issue arose with the update to the 4.5.4.58 vesion

##### Issue submission checklist

 - [ x] I report the issue, it's not a question
   <!--
   OpenCV team works with forum.opencv.org, Stack Overflow and other communities
   to discuss problems. Tickets with question without real issue statement will be
   closed.
   -->
 - [ x] I checked the problem with documentation, FAQ, open issues,
       forum.opencv.org, Stack Overflow, etc and have not found solution
   <!--
   Places to check:
   * OpenCV documentation: https://docs.opencv.org
   * FAQ page: https://github.com/opencv/opencv/wiki/FAQ
   * OpenCV forum: https://forum.opencv.org
   * OpenCV issue tracker: https://github.com/opencv/opencv/issues?q=is%3Aissue
   * Stack Overflow branch: https://stackoverflow.com/questions/tagged/opencv
   -->
 - [ x] I updated to latest OpenCV version and the issue is still there
   <!--
   master branch for OpenCV 4.x and 3.4 branch for OpenCV 3.x releases.
   OpenCV team supports only latest release for each branch.
   The ticket is closed, if the problem is not reproduced with modern version.
   -->
 - [ ] There is reproducer code and related data files: videos, images, onnx, etc
   <!--
   The best reproducer -- test case for OpenCV that we can add to the library.
   Recommendations for media files and binary files:
   * Try to reproduce the issue with images and videos in opencv_extra repository
     to reduce attachment size
   * Use PNG for images, if you report some CV related bug, but not image reader
     issue
   * Attach the image as archive to the ticket, if you report some reader issue.
     Image hosting services compress images and it breaks the repro code.
   * Provide ONNX file for some public model or ONNX file with with random weights,
     if you report ONNX parsing or handling issue. Architecture details diagram
     from netron tool can be very useful too. See https://lutzroeder.github.io/netron/
   -->

any ideas how to overcome this? Thanks!

Best,
Alexey
Repository: react-native
Issue: iOS scroll overshoot animation is glitchy/jumpy if the list is scrolled while it's updating
Labels: Platform: iOS,Needs: Triage :mag:

### Description

Scroll position jumps if the list is updated during the overshoot animation/gesture, as seen in the video below.

I have an app where a list receives frequent real-time updates, and this problem leads to poor UX. I couldn't find a workaround so far.

https://user-images.githubusercontent.com/12449725/140049176-c2237ad1-bccc-4122-90cf-339a52ab160d.mov


### Version

0.66.1

### Output of `react-native info`

System:
    OS: macOS 11.6
    CPU: (8) x64 Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz
    Memory: 300.87 MB / 16.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 16.6.1 - /usr/local/bin/node
    Yarn: Not Found
    npm: 7.20.3 - /usr/local/bin/npm
    Watchman: 2021.08.30.00 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.11.2 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: iOS 15.0, DriverKit 20.4, macOS 11.3, tvOS 15.0, watchOS 8.0
    Android SDK: Not Found
  IDEs:
    Android Studio: Not Found
    Xcode: 13.0/13A233 - /usr/bin/xcodebuild
  Languages:
    Java: Not Found
  npmPackages:
    @react-native-community/cli: Not Found
    react: 17.0.2 => 17.0.2 
    react-native: 0.66.1 => 0.66.1 
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

### Steps to reproduce

1. Have a `FlatList` or a `SectionList`.
2. Attempt to overscroll the list and make sure an item is added/removed during the scrolling gesture/animation.

### Snack, code example, screenshot, or link to a repository

Below is the code I used. Could not reproduce this issue in Expo.

```javascript
import React, {useCallback, useEffect, useState} from 'react';
import {
  Button,
  FlatList,
  StyleSheet,
  Text,
} from 'react-native';

const App = () => {

  const [data, setData] = useState([]);
  const [updating, setUpdating] = useState(false);

  useEffect(() => {
    if (updating) {
      const intervalId = setInterval(() => {
        setData(data => [...data, Date.now() + ""]);
      }, 500);
      return () => clearInterval(intervalId);
    }
    return undefined;
  }, [updating]);

  const renderItem = useCallback(({item}) => (
      <Text>{item}</Text>
  ), []);

  const ListHeader = useCallback(() => (
      <Button
          title={!updating ? "Start adding items" : "Stop adding items"}
          onPress={() => setUpdating(updating => !updating)} />
  ), [updating]);

  return (
    <FlatList
      style={styles.list}
      data={data}
      renderItem={renderItem}
      ListHeaderComponent={ListHeader}
      contentInsetAdjustmentBehavior="automatic" />
  );

};

const styles = StyleSheet.create({
  list: {
    flex: 1
  }
});

export default App;
```
Repository: pytorch
Issue: Allow LRScheduler to take in param_groups directly without an optimizer
Labels: module: optimizer,triaged,enhancement,module: LrScheduler

Necessity to have a separate optimizer for different param groups just to pass them to scheduler defeats the idea of having a single optimizer with multiple param groups

From what I can see, schedulers only use `optimizer.param_groups` except for controlling for back-compat things (via monkey-patching `optimizer.step`)

The usecase is to apply different warmup to different param groups, without having to carry on several optimizer and scheduler instances (which makes code more brittle and nastier than needed)

cc @vincentqb @jbschlosser @albanD

My current workaround: as usual, ditch the PyTorch schedulers and just roll my own ones
Repository: node
Issue: ./configure --enable-static --without-v8-platform doesn't build
Labels: build

### Version

main@2e2a6fecd9, v17.0.1

### Platform

linux

### Subsystem

build

### What steps will reproduce the bug?

```
$ ./configure --enable-static --without-v8-platform && make -j12
<snip>
#
# Fatal error in , line 0
# Check failed: platform_.
#
#
#
#FailureMessage Object: 0x7ffee986b890Aborted (core dumped)
make[1]: *** [node.target.mk:26: /home/bnoordhuis/src/master/out/Release/obj/gen/node_snapshot.cc] Error 134
make[1]: *** Waiting for unfinished jobs....
rm e8badf193098330016de6c23fb5b92035cb9ff3f.intermediate 53881cdc4bd80dbc229d02dc159bf32f2995b3b5.intermediate cbe709ba790d650414243e1de62ac416dcbeaed4.intermediate e6e67b4d095cec0ffbeee27145d3d2a024288bf5.intermediate
make: *** [Makefile:110: node] Error 2
```

### How often does it reproduce? Is there a required condition?

always

### What is the expected behavior?

_No response_

### What do you see instead?

_No response_

### Additional information

_No response_
Repository: godot
Issue: Graphics driver crash when loading specific scene in a project
Labels: bug,platform:linuxbsd,topic:rendering,confirmed,topic:thirdparty,crash

### Godot version

3.3.4

### System information

Arch Linux x86_64, GLES3, Intel HD Graphics 520

### Issue description

Nothing goes wrong when I load the project and the primary scene, but then when i load the scene "Level.tscn" , the program crashes. Here is the error on console:

```
handle_crash: Program crashed with signal 11
Dumping the backtrace. Please include this when reporting the bug on https://github.com/godotengine/godot/issues
[1] /usr/lib/libc.so.6(+0x3cda0) [0x7efecce3fda0] (??:0)
[2] /usr/lib/dri/iris_dri.so(+0x6cced8) [0x7efec9feaed8] (??:0)
[3] /usr/lib/dri/iris_dri.so(+0x2969fa) [0x7efec9bb49fa] (??:0)
[4] /usr/lib/dri/iris_dri.so(+0x2538ff) [0x7efec9b718ff] (??:0)
[5] /usr/lib/dri/iris_dri.so(+0x22e8da) [0x7efec9b4c8da] (??:0)
[6] /usr/lib/dri/iris_dri.so(+0x300a8a) [0x7efec9c1ea8a] (??:0)
[7] godot(+0xfe27a6) [0x560aafcb07a6] (??:0)
[8] godot(+0xfef9c8) [0x560aafcbd9c8] (??:0)
[9] godot(+0xff39ec) [0x560aafcc19ec] (??:0)
[10] godot(+0xfe7998) [0x560aafcb5998] (??:0)
[11] godot(+0xfea456) [0x560aafcb8456] (??:0)
[12] godot(+0xfea50c) [0x560aafcb850c] (??:0)
[13] godot(+0x26e1e65) [0x560ab13afe65] (??:0)
[14] godot(+0x2726264) [0x560ab13f4264] (??:0)
[15] godot(+0x2726f7d) [0x560ab13f4f7d] (??:0)
[16] godot(+0x26ecae2) [0x560ab13baae2] (??:0)
[17] godot(+0x69a9aa) [0x560aaf3689aa] (??:0)
[18] godot(+0x67d724) [0x560aaf34b724] (??:0)
[19] godot(+0x66862f) [0x560aaf33662f] (??:0)
[20] /usr/lib/libc.so.6(__libc_start_main+0xd5) [0x7efecce2ab25] (??:0)
[21] godot(+0x66c83e) [0x560aaf33a83e] (??:0)
-- END OF BACKTRACE --
[1]    14117 abort (core dumped)  godot project.godot
```

### Steps to reproduce

1- Open the project
2- Open the scene Level.tscn
3- The program crashes

### Minimal reproduction project

Link to the imported project: [https://github.com/Thoughtquake/TenThousandSubs](https://github.com/Thoughtquake/TenThousandSubs)
Repository: kubernetes
Issue: node_e2e: Cleanup configuration and rename jenkins/ directory
Labels: area/test,kind/cleanup,sig/node,priority/important-longterm,lifecycle/frozen,triage/accepted

/kind cleanup
/sig node
/area test
/priority important-longterm
/assign

Currently, node_e2e configuration exists in the `jenkins/` directory underneath node_e2e. This directory is a hangover from the time before Kubernetes migrated to Prow. This directory is regularly a point of contention when adding new features to tests, and causes confusion to people trying to make changes to them.

We should remove the unused portions of this directory and rename it to something more useful (`e2e_node/configuration`?) to simplify future changes while maintaining the current developer workflow.

This is going to involve coordinating a couple of things between k/k and k/test-infra to ensure that we do not cause a break in tests during the migration process and to not break running tests against older release branches.

My naive suggestion for handling this would be:

- [ ] Remove unused code from jenkins/
- [ ] Create a copy of the jenkins/ directory with the new name
- [ ] Update test-infra to reference the new paths, duplicating configurations where necessary to preserve jobs for older branches
- [ ] Remove the jenkins/ directory

(@spiffxp / @dims might have better suggestions for how to handle this?)
Repository: flutter
Issue: Is the second half of the animation  curve fastLinearToSlowEaseIn too slow
Labels: framework,a: animation,f: cupertino,f: routes,c: proposal,has partial patch,team-design,triaged-design

fastLinearToSlowEaseIn animation  curve.
This curve is used in CupertinoPageRoute as a sliding exit animation.
When this animation is used to slide back, it will make people think that the page has been exited, but in fact there is no.

This animation is used on the page returned by swiping, and it often fails to respond to a subsequent click, 
because the page will disappear from the view, but it won’t actually disappear

In this issue: [https://github.com/flutter/flutter/issues/73026](https://github.com/flutter/flutter/issues/73026)
After the page returned, it did not respond to a subsequent click

fastLinearToSlowEaseIn curve:
<img width="430" alt="Snipaste_2021-11-03_21-28-51" src="https://user-images.githubusercontent.com/11540647/140070581-59d52355-0273-4725-9ab2-4787c571c101.png">

Can the official adjust this animation curve in future versions of Flutter?
Repository: rust
Issue: unconditional_panic lint getting recognized in code that actually panics condtionally
Labels: A-lints,T-compiler,C-bug,A-control-flow,A-const-prop

<!--
Thank you for filing a bug report! 🐛 Please provide a short summary of the bug,
along with any information you feel relevant to replicating the bug.
-->

I tried this code:

```rust
fn main() {
    let v: [i32; 0] = [];
    let _ = v.len() > 0 && v[0] == 0;
}
```

I expected to see this happen: *code compiles and runs fine, without any error or panic*

Instead, this happened: 
```
error: this operation will panic at runtime
 --> t.rs:3:28
  |
3 |     let _ = v.len() > 0 && v[0] == 0;
  |                            ^^^^ index out of bounds: the length is 0 but the index is 0
  |
  = note: `#[deny(unconditional_panic)]` on by default
```

### 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`:
```
rustc 1.56.0
binary: rustc
commit-hash: unknown
commit-date: unknown
host: armv7-linux-androideabi
release: 1.56.0
LLVM version: 13.0.0
```
Repository: go
Issue: cmd/link: failure with SIGPIPE on freebsd-amd64-12_2 builder
Labels: NeedsInvestigation,compiler/runtime

From a `freebsd-amd64-12_2` TryBot for [CL 361095](https://golang.org/cl/361095) (https://storage.googleapis.com/go-build-log/ca2a905d/freebsd-amd64-12_2_3e16b82d.log):

```
go tool link: signal: broken pipe
go tool dist: Failed: exit status 1


Error: tests failed: dist test failed: go_test:net/http/httptrace: exit status 1
```

There are no other signs of errors on the TryBot; I'm not sure what would have caused this failure mode.
Repository: scrcpy
Issue: Minimal quick-view messagebox for defined shortcut-mod keys
Labels: feature request

 - [X] I have checked that a similar [feature request](https://github.com/Genymobile/scrcpy/issues?q=is%3Aopen+is%3Aissue+label%3A%22feature+request%22) does not already exist.

**Is your feature request related to a problem? Please describe.**
Somtimes I need to use some shortcut-mod key and in order to recall keys' i have to open CMD, the run scrcpy --help and search for required key in shortcut-mod.

**Describe the solution you'd like**
Add entry to window-system-menu (e.g. right click window title) which pops-up message-box with the list of keys and their description in short.

**Describe alternatives you've considered**
Same concept but with tray icon (per example with right click menu).

**Additional context**
![Simulated Appearance](https://user-images.githubusercontent.com/1897534/140095943-81ea16f7-618a-44d9-96b1-8ea4775506a5.png)
Repository: material-ui
Issue: [DatePicker][a11y][iOS] VoiceOver in Safari doesn't read date properly
Labels: bug 🐛,accessibility,component: date picker,browser: Safari

- [x] The issue is present in the latest release.
- [x] I have searched the [issues](https://github.com/mui-org/material-ui/issues) of this repository and believe that this is not a duplicate.

## Current Behavior 😯

VoiceOver reads only first or last part of the date in date picker when you navigate to the input field using VO's control+option+right/left buttons. It works fine if you tab into it. Issue happens only in Safari (Chrome works fine).

## Expected Behavior 🤔

VO should read entire text.

## Steps to Reproduce 🕹

This is reproducible in basic example on demo page https://mui.com/components/date-picker/#basic-usage

Steps:

1. Enable VoiceOver
2. Navigate to date picker input
3. Try using VO's control+option+right/left to navigate from and to this input
4. VO would read only first or last part of the input's value

## Context 🔦

This may sound like a Safari/Mac issue, but I replicated similar HTML markup in this basic example https://jsfiddle.net/tqwauo5r/1/ and it works fine there. And many companies to be certified for accessibility compliance are required to use VO with Safari, not Chrome since it's the default browser on Mac.
Repository: electron
Issue: refactor: investigate possibility of reusing `//components/autofill` instead of maintaining a copy
Labels: enhancement :sparkles:,upgrade-follow-up

suggested by @deepak1556 in https://github.com/electron/electron/pull/31676#pullrequestreview-796005562.
Repository: material-ui
Issue: when TextField is used as a select, it isn't using error to mark the select element with aria-invalid 
Labels: bug 🐛,support: question,component: select

<!-- Provide a general summary of the issue in the Title above -->
When using the `TextField` as a select with `error={true}`, the field is not found to be invalid. This is because `aria-invalid` isn't set on the labeled field.

<!--
  Thank you very much for contributing to MUI by creating an issue! ❤️
  To avoid duplicate issues we ask you to check off the following list.
-->

<!-- Checked checkbox should look like this: [x] -->

- [x] The issue is present in the latest release.
- [x] I have searched the [issues](https://github.com/mui-org/material-ui/issues) of this repository and believe that this is not a duplicate.

## Current Behavior 😯

<!-- Describe what happens instead of the expected behavior. -->
aria-invalid isn't set on the select element

## Expected Behavior 🤔

<!-- Describe what should happen. -->
aria-invalid should be set to the value of `error` passed to `TextField`

## Steps to Reproduce 🕹

<!--
  You should use the official codesandbox template as a starting point: https://mui.com/r/issue-template-next

  If that's not sufficient, please create a cloneable repository.

  Pieces of code will result in a slower response time since a maintainer has to do additional work to reproduce the problem.

  If you have an issue concerning TypeScript please start from this TypeScript playground: https://mui.com/r/ts-issue-template

  Issues without some form of live example have a longer response time.
-->

[codesandbox example with tests](https://codesandbox.io/s/mui-aria-invalid-755jv?file=/src/App.test.tsx)

The codesandbox shows:

- TextField is invalid when error is true
- TextField is not invalid when used as a select and error is true
- TextField is invalid when used as a select when aria-invalid is passed through the `SelectProps`'s `SelectDisplayProps`

## Context 🔦

<!--
  What are you trying to accomplish? How has this issue affected you?
  Providing context helps us come up with a solution that is most useful in the real world.
-->
This makes it require extra steps to mark the select as invalid.

## Your Environment 🌎

<!--
  Run `npx @mui/envinfo` and post the results.
  If you encounter issues with TypeScript please include the used tsconfig.
-->
<details>
  <summary>`npx @mui/envinfo`</summary>
  
using the codesandbox environment
Google Chrome Version 95.0.4638.54 (Official Build) (x86_64)
</details>
Repository: pytorch
Issue: Functions are rendered incorrectly
Labels: module: docs,module: autograd,triaged

## 📚 Documentation

Per title in
https://pytorch.org/tutorials/beginner/examples_autograd/polynomial_custom_function.html

cc @brianjo @mruberry @ezyang @albanD @zou3519 @gqchen @pearu @nikitaved @soulitzer @Lezcano @Varal7
Repository: godot
Issue: Random errors and crashes when constructing ConcavePolygonShapes in threads
Labels: bug,topic:core,topic:3d

### Godot version

3.3.4stable

### System information

Xubuntu 21.04, Intel UHD Graphics 620

### Issue description

I'm trying to generate terrain geometry in multiple threads and noticed that creating `ConcavePolygonShape` instances in multiple threads results in random errors. Documentation is not clear if this is something that should work. It does say that resources could be loaded/modified in threads.

Is this a bug or am I not supposed to be able to construct shapes in threads?

Here's a sample of the errors:

```
E 0:00:00.402   free: Invalid ID.
  <C++ Error>   Method failed.
  <C++ Source>  modules/bullet/bullet_physics_server.cpp:1535 @ free()
E 0:00:00.403   _set_color: Condition "p_node == _data._nil && p_color == RED" is true.
  <C++ Source>  ./core/set.h:141 @ _set_color()

```


### Steps to reproduce

Launch multiple threads, create `ConcavePolygonShape` instances in them.

In the minimal project I get random errors and crashes even if I only create a shape in the thread. If I call set_faces() on them, more errors will appear.

### Minimal reproduction project

[CollisionShapeTest.zip](https://github.com/godotengine/godot/files/7469512/CollisionShapeTest.zip)