sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: pytorch
Issue: CosineAnnealingLR giving unexpected learning rates on PyTorch 1.1.
Labels: module: optimizer,triaged

## 🐛 Bug

`CosineAnnealingLR` (and probably others) are giving unexpected learning rates.

## To Reproduce

Code:
```
import torch
model = torch.nn.Linear(1, 1)
optim = torch.optim.SGD(model.parameters(), lr=1.)
l = torch.optim.lr_scheduler.CosineAnnealingLR(optim, 3)

for _ in range(10):
    print(l.last_epoch, l.get_lr()[0])
    l.step()
```

Output of PyTorch 1.0.1:
```
-1 0.75
0 1.0
1 0.75
2 0.2500000000000001
3 0.0
4 0.24999999999999978
5 0.75
6 1.0
7 0.7500000000000002
8 0.2500000000000004
```

Output of PyTorch 1.1:
```
0 1.0
1 0.5625
2 0.08333333333333341
3 0.0
4 0.4999999999999999
5 2.2500000000000036
6 1.333333333333334
7 0.5625000000000006
8 0.0833333333333336
9 0.0
```

## Expected behavior

I was expecting almost the exact same output as PyTorch 1.0.1. The only difference would be that PyTorch 1.1 should start with `last_epoch = 0`.

## Environment

 - PyTorch Version (e.g., 1.0): 1.1 and 1.0.1
 - OS (e.g., Linux): Linux
 - How you installed PyTorch (`conda`, `pip`, source): pip
 - Build command you used (if compiling from source): -
 - Python version: 3.6
 - CUDA/cuDNN version: 10
 - GPU models and configuration: Titan Xp
 - Any other relevant information:
Repository: flutter
Issue: Better error response from Flutter testing/driver APIs
Labels: a: tests,c: new feature,tool,framework,t: flutter driver,customer: espresso,P3,team-framework,triaged-framework

Currently when the error occurs when talking to the Flutter testing/driver APIs, the API returns a text containing error message and traces. It would be brittle if Espresso/EarlGrey relies on passing the error text to interpret the error.

Two examples:
1) When no matching UI element is found:
JSON-RPC Request sent to uri ws://127.0.0.1:45257/Q-Bxibr0quE=/ws: 
```json
{
  "id": "message-2",
  "method": "ext.flutter.driver",
  "params": {
    "isolateId": "isolates/root",
    "text": "Increment2",
    "finderType": "ByTooltipMessage",
    "command": "tap",
    "timeout": 10000
  },
  "jsonrpc": "2.0"
}
```

JSON-RPC response received:
```json
 {
  "jsonrpc": "2.0",
  "result": {
    "isError": true,
    "response": "Timeout while executing tap: TimeoutException after 0:00:10.000000: Future not completed\n#0      FlutterDriverExtension.call (package:flutter_driver/src/extension/extension.dart:184:31)\n<asynchronous suspension>\n#1      BindingBase.registerServiceExtension.<anonymous closure> (package:flutter/src/foundation/binding.dart:512:32)\n<asynchronous suspension>\n#2      _runExtension (dart:developer-patch/developer.dart:84:23)\n",
    "type": "_extensionType",
    "method": "ext.flutter.driver"
  },
  "id": "message-2"
}
```

2) When there are multiple UI element matches:
JSON-RPC Request sent to uri ws://127.0.0.1:38582/Bc3XMX9_8wk=/ws:
```json
{
  "id": "message-2",
  "method": "ext.flutter.driver",
  "params": {
    "isolateId": "isolates/root",
    "text": "Increment",
    "finderType": "ByTooltipMessage",
    "command": "tap",
    "timeout": 10000
  },
  "jsonrpc": "2.0"
}
```

JSON-RPC response received: 
```json
{
  "jsonrpc": "2.0",
  "result": {
    "isError": true,
    "response": "Uncaught extension error while executing tap: Bad state: Too many elements\n#0      Iterable.single (dart:core/iterable.dart:554:24)\n#1      WidgetController._getElementPoint (package:flutter_test/src/controller.dart:612:47)\n#2      WidgetController.getCenter (package:flutter_test/src/controller.dart:584:12)\n#3      WidgetController.tap (package:flutter_test/src/controller.dart:256:18)\n#4      FlutterDriverExtension._tap (package:flutter_driver/src/extension/extension.dart:324:19)\n<asynchronous suspension>\n#5      FlutterDriverExtension.call (package:flutter_driver/src/extension/extension.dart:181:53)\n<asynchronous suspension>\n#6      BindingBase.registerServiceExtension.<anonymous closure> (package:flutter/src/foundation/binding.dart:512:32)\n<asynchronous suspension>\n#7      _runExtension (dart:developer-patch/developer.dart:84:23)\n",
    "type": "_extensionType",
    "method": "ext.flutter.driver"
  },
  "id": "message-2"
}
```

Proposal:
1) Using error codes in the responses to better present the errors;
2) Possibly clean up the error messages to make it more user-readable.
Repository: rust
Issue: Inconsistent literal escaping in proc macros
Labels: A-frontend,A-macros,T-compiler,C-bug,A-proc-macros

Proc macros operate on tokens, including string/character/byte-string/byte literal tokens, which they can get from various sources.

- Source 1: Lexer.
This is the most reliable source, the token is passed to a macro *precisely* like it was written in source code.
`"C"` will be passed as `"C"`, but the same C in escaped form `"\x43"` will be passed as `"\x43"`.
Proc macros can observe the difference because `ToString` (the only way to get the literal contents in proc macro API) also prints the literal precisely.
- Source 2: Proc macro API.
`Literal::string(s: &str)` will make you a string literal containing data `s`, approximately.
The precise token (returned by `ToString`) will contain:
    - `escape_debug(s)` for string literals (`Literal::string`)
    - `escape_unicode(s)` for character literals (`Literal::character`)
    - `escape_default(s)` for byte string literals (`Literal::byte_string`)
- Source 3: Recovered from non-attribute AST
AST goes through pretty-printing first, then re-tokenized.
The precise token (returned by `ToString`) will contain:
    - precise `s` for raw AST strings
    - `escape_debug(s)` for non-raw AST strings
    - `escape_default(s)` for AST characters, bytes and byte strings (both raw and non-raw)
- Source 4: Recovered from attribute AST
Just an ad-hoc recovery without pretty-printing.
The precise token (returned by `ToString`) will contain:
    - precise `s` for raw AST strings
    - `escape_default(s)` for non-raw AST strings, AST characters, bytes and byte strings (both raw and non-raw)

EDIT: Also doc comments go through `escape_debug` when converted to `#[doc = "content"]` tokens for proc macros.

It would be nice to
- Figure out what escaping we actually want (perhaps none?) and document the motivation behind the escaping choices.
- Get rid of the escaping differences between token sources, so that at least literals of the same kind are escaped identically.
Repository: flutter
Issue: Support selectableTimePredicate in TimePicker
Labels: c: new feature,framework,f: material design,P3,team-design,triaged-design

An optional selectableTimePredicate function can be passed in to customize the times to enable for selection. If provided, only the times that selectableTimePredicate returned true for will be selectable.

This can be the same idea as datePicker. As for a use case. I'm selecting a range of time with a **from:** and a **to:** and I need to make sure the **to** time comes after the from.
Repository: flutter
Issue: switch macOS dark mode KVO to effectiveAppearance/NSAppearance
Labels: engine,platform-mac,c: proposal,a: desktop,P2,team-macos,triaged-macos

Currently these are using the String APIs
Repository: rust
Issue: Values created by const fns aren't rvalue static promoted
Labels: C-enhancement,A-diagnostics,A-lifetimes,T-compiler,A-const-eval

This function compiles due to rvalue static promotion:

```rust
fn bar() -> &'static i32 {
    &1
}
```

This, however, does not:

```rust
struct Foo(i32);

impl Foo {
    const fn new(n: i32) -> Foo {
        Foo(n)
    }
}

fn foo() -> &'static Foo {
    &Foo::new(1)
}
```

```
error[E0515]: cannot return reference to temporary value
  --> src/lib.rs:10:5
   |
10 |     &Foo::new(1)
   |     ^-----------
   |     ||
   |     |temporary value created here
   |     returns a reference to data owned by the current function

error: aborting due to previous error
```

Explicitly creating a static does work, however:

```rust
struct Foo(i32);

impl Foo {
    const fn new(n: i32) -> Foo {
        Foo(n)
    }
}

fn foo() -> &'static Foo {
    static FOO: Foo = Foo::new(1);
    &FOO
}
```
Repository: go
Issue: cmd/link: support internal linking for Android and iOS
Labels: NeedsInvestigation,mobile,compiler/runtime

We're about to run self-hosted Android and iOS builders (#31722). It would be nice if Go could produce internally linked binaries for those platforms, for a less hacky bootstrapping and for being able to build x/build/cmd/buildlet and stage0 everywhere. Depends on #31343 Android.
Repository: flutter
Issue: [video_player] [iOS] Add possibility to specify mime type for player
Labels: c: new feature,platform-ios,p: video_player,package,c: proposal,P2,team-ios,triaged-ios

Hello, there's a bug in AVKit, where it cannot play videos from url which does not specify the extension. As a workaround for the plugin, it is possible to specify the mime type directly for it.
https://stackoverflow.com/questions/5501670/how-to-play-movie-files-with-no-file-extension-on-ios-with-mpmovieplayercontroll

```
NSString * mimeType = @"video/mp4";

// or even with codecs
mimeType = @"video/mp4; codecs=\"avc1.42E01E, mp4a.40.2\"";

// create asset
AVURLAsset * asset = [[AVURLAsset alloc] initWithURL:url options:@{@"AVURLAssetOutOfBandMIMETypeKey": mimeType}];

// create AVPlayer with AVURLAsset
AVPlayer * player = [AVPlayer playerWithPlayerItem:[AVPlayerItem playerItemWithAsset:asset]];
```
Repository: pytorch
Issue: LSTM forget bias must be initialized properly
Labels: module: bc-breaking,module: nn,module: rnn,triaged,module: initialization

## 🚀 Feature
LSTM forget bias must be initialized to 1 or 2 for better training.

## Motivation

Please see:
https://pdfs.semanticscholar.org/1154/0131eae85b2e11d53df7f1360eeb6476e7f4.pdf
http://proceedings.mlr.press/v37/jozefowicz15.pdf

"This problem is addressed by simply initializing the forget
gates bf to a large value such as 1 or 2. By doing so, the
forget gate will be initialized to a value that is close to 1,
enabling gradient flow. This idea was present in Gers et al.
(2000), but we reemphasize it since we found many practitioners to not be familiar with it."
Repository: TypeScript
Issue: TSServer should expose tsconfig
Labels: Suggestion,Needs Proposal,API

## Search Terms

TSServer TSconfig ProjectInfo

## Suggestion

```
export interface ProjectInfo {
  configFileName: string;
  fileNames?: string[];
  languageServiceDisabled?: boolean;
 }
```

TSServer should also include the project config (the final form of tsconfig.json with all the extends resolved) in the ProjectInfo response

## Use Cases

Currently, the editor is expected to send `compileOnSaveEmitFile` command on each save if `compileOnSave` flag is set. To figure that out, the editor has to parse the tsconfig.json file and check if the flag is set. The initial version of `extend` was relatively easy to implement. But now with the support for package name, it's complex to implement correctly.

Why can't you use `tsc --showConfig`?

Currently we bundle the `tsserver.js` file along the plugin. So the only dependency is nodejs. This also makes it easier to use it in js projects which don't have typescript dependency. If we depend on `tsc`, we would also have to bundle tsc file etc.

see https://github.com/ananthakumaran/tide/issues/310
Repository: flutter
Issue: Access to flavors on pubspec.yaml to gain more granular control over my artifacts
Labels: c: new feature,framework,c: proposal,P3,team-framework,triaged-framework

## Use case

As a developer, I'd like to have access to my Android/iOS flavors in my pubspec.yaml, so I can have more control over what's included in the final artifacts.

For example:
In an application that relies on using maps, I might want to use Google Maps everywhere except for China, where I would want to use a different provider, such as Autonavi. With the existing setup, I would end up including both Google Maps and Autonavi in my final apk/ipa. However, if I was able to access the flavors at the pubspec level, I could define a common API as a common module, and include Autonavi only on the chinese flavor, and GMaps on the other ones.

## Proposal

### Ideal solution:
I would have one `pubspec.yaml` that would look like this:

```yaml
name: flavors
description: flavors
version: 1.0.0

environment:
  sdk: ">=2.0.0 <3.0.0"

dependencies:
  common:
    flutter:
      sdk: flutter
    common_map_api: 1.0.0
  china:
    autonavi_map: 1.0.0
  rest_of_the_wrold:
    google_maps: 1.0.0

flutter:
  uses-material-design: true
```

where `china` and `rest_of_the_world` would be my build flavors.

### Alternative solution:
As a transition plan, we could have a "pubspec generator". This generator would receive a different yaml with a format like this:

```yaml
common:
    flutter:
      sdk: flutter
    common_map_api: 1.0.0
  china:
    autonavi_map: 1.0.0
  rest_of_the_wrold:
    google_maps: 1.0.0
```

and when running the flutter application, it would generate a pubspec.yaml with only the necessary content depending on which flavor you are running.

This solution is far from ideal, though, since your pubspec would change its content depending on which flavor you run, creating, IMO, a lot of confusion for developers.
Repository: flutter
Issue: Assets are not found during test runs on Windows when using path.join() due to slash direction
Labels: a: tests,framework,d: api docs,a: assets,P2,team-framework,triaged-framework

When running tests on Windows, if I have code that reads assets like:

```dart
final foo = await rootBundle.loadString(path.join('assets', mapName));
```

It works fine when I run my app on Android or in the Android emulator, but when I run using `flutter test` I get an error like this:

```
FlutterError (Unable to load asset: assets\beach_tileset.json)
```

If I add `.replaceAll(r'\', '/')` to the end of the path, it works fine in tests.
Repository: flutter
Issue: Flutter clipboard should support images
Labels: c: new feature,framework,customer: crowd,a: images,c: proposal,P3,team-framework,triaged-framework

## Use case

It would be nice to also support videos and binary data in general. But having images would already be a big help.

## Proposal

I can write a plugin but such basic behavior should be part of the Flutter framework. Having it in the framework also allows integrating it with Flutter widgets like TextField.

## Related issues
https://github.com/flutter/flutter/issues/30719
Repository: rust
Issue: macro_rules gives up early when parsing keywords in `expr` contexts
Labels: A-parser,A-macros,T-lang,T-compiler

I'm sorry for the vague title; I'm not sure how to summarize this issue, or pin down it's root cause.
I'm also sorry if this is intended behavior, i just find it very confusing.

I found this while playing around with the limits of the macro_rules parser, trying to narrow down an edge case i noticed while working on adding flexibility to the `py-comp` crate.
Given the definition:

```rust
macro_rules! m {
    ($e:expr) => {"expr"};
    ($t:tt) => {"tt"};
}
```
we get the following behaviours:
```rust
m!(1+1)  // expr
m!(foo)  // expr
m!(=)  // tt
```
which is reasonable, but writing:
```rust
m!(for)
```
(or any keyword like `while`, `if`, `match`, `box` and probably others)
we get:
```
error: expected pattern, found `<eof>`
 --> src/main.rs:7:23
  |
7 |     println!("{}", m!(for));
  |                       ^^^ expected pattern

error: aborting due to previous error
```
Importantly, removing the first case (`($e:expr) => {"expr"};`) allows that last example to be translated to `"tt"`

This is confusing to me: I though that the parser tries each option until it finds one that matches, or fails the macro if none did, but in this case it obviously bails the macro parsing early without exhausting all options.

You can play around with it here:
https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=374709ef7516dfee7b5df2bca278764b
Repository: flutter
Issue: Potential Matrix4Tween.lerp performance improvement
Labels: framework,c: performance,c: proposal,perf: speed,P2,team-framework,triaged-framework

The third benchmark here demonstrates how to modify `Matrix4.lerp` to run about 25% faster by reusing objects rather than allocating new ones. 
https://github.com/google/vector_math.dart/commit/4e83308a916339fa2f404945ca4efd994e1c5830#diff-1465efa00171ab51942972af0e358965R92
This works because of Dart's microtask execution model - the reuse all happens during the same microtask.

You could do better than this by lazy pre-decomposition if the begin and end are stationary, but that would require each Tween to hold the decomposition.
Repository: flutter
Issue: Tab _warpToCurrentIndex causing pages to build and dispose immediately
Labels: framework,f: material design,c: performance,a: quality,P2,c: tech-debt,team-design,triaged-design

When warping in `TabBarView`, pages that are not shown on the Viewport can improperly be built and immediately disposed. This behavior is undesired, as it may have performance implications from attempting to build and dispose of a widget unnecessarily. To reproduce: 

1. Tap on a tab that is adjacent to a tab containing a nested TabBarView
2. The nested tab has to be in between the initial tab and the tab that was tapped on
(ie. current index = 0, tap on tab at index 3 when tab at index 2 has nested TabBarView)

See https://github.com/flutter/flutter/pull/31581 for context
Repository: pytorch
Issue: Split libtorch binary build CI job into separate variants
Labels: module: ci,triaged

We should move this loop https://github.com/pytorch/builder/blob/master/manywheel/build_common.sh#L120 into separate jobs.

Right now the libtorch job can take a ridiculous amount of time. This should help greatly.
Repository: flutter
Issue: Accessibility guideline tests do not work with `flutter run test`
Labels: a: tests,framework,a: accessibility,P2,team-framework,triaged-framework

Initially because the elements we are looking for are not hitTestable, and then because we seemingly do not find the correct Rect. 

cc @HansMuller
Repository: youtube-dl
Issue: Add uscreen.tv support
Labels: site-support-request

<!--

######################################################################
  WARNING!
  IGNORING THE FOLLOWING TEMPLATE WILL RESULT IN ISSUE CLOSED AS INCOMPLETE
######################################################################

-->


## Checklist

<!--
Carefully read and work through this check list in order to prevent the most common mistakes and misuse of youtube-dl:
- First of, make sure you are using the latest version of youtube-dl. Run `youtube-dl --version` and ensure your version is 2019.04.30. If it's not, see https://yt-dl.org/update on how to update. Issues with outdated version will be REJECTED.
- Make sure that all provided video/audio/playlist URLs (if any) are alive and playable in a browser.
- Make sure that site you are requesting is not dedicated to copyright infringement, see https://yt-dl.org/copyright-infringement. youtube-dl does not support such sites. In order for site support request to be accepted all provided example URLs should not violate any copyrights.
- Search the bugtracker for similar site support requests: http://yt-dl.org/search-issues. DO NOT post duplicates.
- Finally, put x into all relevant boxes (like this [x])
-->

- [x] I'm reporting a new site support request
- [x] I've verified that I'm running youtube-dl version **2019.04.30**
- [x] I've checked that all provided URLs are alive and playable in a browser
- [x] I've checked that none of provided URLs violate any copyrights
- [x] I've searched the bugtracker for similar site support requests including closed ones


## Example URLs

<!--
Provide all kinds of example URLs support for which should be included. Replace following example URLs by yours.
-->

This URL is the container where the video player sits:
https://www.unauthorized.tv/programs/live-on-stage?cid=201227

When the user clicks play a POST is sent to this URL with JSON payload (plus various session headers):
https://www.unauthorized.tv/stats/play

`{"video_id":"211831","chapter_id":"201227","started":true}`

## Description

<!--
Provide any additional information.
If work on your issue requires account credentials please provide them or explain how one can obtain them.
-->

Uscreen.tv is a video hosting platform where the content owner can skin the interface and use their own domain name. Videos can be protected by login (the URL supplied above is not) in which case the user must first sign in at: `https://<custom domain>/sign_in`
Repository: pytorch
Issue: [FR] [RFC] add Sequential.append & .extend
Labels: feature,module: nn,triaged

A common pattern people use in `__init__` of a `nn.Module` is to build a `list` first and then feed it into `nn.Sequential` because `Sequential` doesn't support many handy methods existing on `list`. E.g., 

```py
def __init__(self, logres):
    super().__init__():
    layers = [
          nn.Conv2d(3, 64, kernel_size=11, stride=4, padding=2),
          nn.ReLU(inplace=True),
          nn.MaxPool2d(kernel_size=3, stride=2),
    ]

    for _ in range(logres):
         layers.extend([
              nn.Conv2d(3, 64, kernel_size=11, stride=4, padding=2),
              nn.ReLU(inplace=True),
              nn.MaxPool2d(kernel_size=3, stride=2),
        ])
    self.layers = nn.Sequential(*layers)
```

This is totally unnecessary if we can just provide `.append` and `.extend` on `Sequential`.
Repository: godot
Issue: Export issue using different renderers per platform via feature tags
Labels: enhancement,platform:ios,platform:android,topic:editor

<!-- Please search existing issues for potential duplicates before filing yours:
https://github.com/godotengine/godot/issues?q=is%3Aissue
-->

**Godot version:**
<!-- Specify commit hash if non-official. -->
Godot 3.1.2-devel

**OS/device including version:**
<!-- Specify GPU model and drivers if graphics-related. -->
MacOSX 10.13.6
iOS 12.1.2

**Issue description:**
<!-- What happened, and what was expected. -->
As I described in #28621, I many times changed export compression mode for my graphics files. One time I disabled S3TC compression format and when I try to reimport files I get a lot of errors about loading images on PC (I don't export for PC/Mac so I tried to ignore this error).
Finally I enabled S3TC compression because it bloated me by error messages.
So I reimport my images again (as vram compression) and now them can not be loaded on my iOS device. It doesn't show any error when reimport images or when making export package. But in runtime game crashed and showed in logs messages about that problem files:

```
2019-05-04 01:10:25.474821+0300 galactic-adventure-2[7799:5271607] **ERROR**: res://GUI/Presenting/Presenting.tscn:3 - Parse Error: [ext_resource] referenced nonexistent resource at: res://LevelScreen/backgrounds/paralax-1.png
```

I tried to reimport that images in Lossy compression mode - it works!
I changed compression format to video ram - it doesn't work.
I closed godot, removed *.import files and all related files in my .import folder. Then I started godot again, it imported my images. While them in lossless/lossy format - they works. As I change them to video ram format - the game can not find them in runtime.

What should I clean in order to restore the original state? These files worked yesterday and iOS build worked flawlessly. 

**Steps to reproduce:**


**Minimal reproduction project:**
<!-- Recommended as it greatly speeds up debugging. Drag and drop a zip archive to upload it. -->