WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
🐛 Bug

Adding epoch argument to step() function of MultiStepLR lead to false learning rate.

To Reproduce

from torch import nn
import torch
net = nn.Linear(30, 10)
optimizer = torch.optim.Adam(net.parameters(), lr=0.001)
s = torch.optim.lr_scheduler.MultiStepLR(optimizer, [10, 20, 30], gamma=0.1)
print(s.get_lr())
s.step(1)
print(s.get_lr())

Output

[0.001]
[1.0000000000000002e-06]

Expected behavior

[0.001]
[0.001]

Environment

PyTorch version: 1.4.0a0+d5bf51b

Is debug build: No

CUDA used to build PyTorch: 9.0

OS: Ubuntu 16.04.6 LTS

GCC version: (Ubuntu 5.4.0-6ubuntu1~16.04.11) 5.4.0 20160609

CMake version: version 3.14.0

Python version: 3.6

Is CUDA available: Yes

CUDA runtime version: 9.0.176

GPU models and configuration:

GPU 0: TITAN Xp

GPU 1: TITAN Xp

GPU 2: TITAN Xp

GPU 3: TITAN Xp

Nvidia driver version: 430.26

cuDNN version: Could not collect

Versions of relevant libraries:

[pip] numpy==1.17.3

[pip] torch==1.4.0a0+d5bf51b

[conda] blas 1.0 mkl

[conda] magma-cuda90 2.5.0 1 pytorch

[conda] mkl 2019.4 243

[conda] mkl-include 2019.4 243

[conda] mkl-service 2.3.0 py36he904b0f_0

[conda] mkl_fft 1.0.15 py36ha843d7b_0

[conda] mkl_random 1.1.0 py36hd6b4f25_0

[conda] torch 1.4.0a0+d5bf51b pypi_0 pypi

Additional context

Possible cause might be that the milestones of MultiStepLR is a counter rather then a list, which leads to false action of bisect in get_lr function.

cc @vincentqb

Issue 2:
🐛 Bug

MultiStepLR is broken with .step(epoch=xyz):

import torch
t = torch.tensor(1.0, requires_grad=True)
opt = torch.optim.SGD([t], lr=0.01)
s = torch.optim.lr_scheduler.MultiStepLR(opt, milestones=[19])
print('lr', opt.param_groups[0]['lr'])

opt.step()
s.step(0)
print('lr', opt.param_groups[0]['lr'])

Outputs:

lr 0.01
lr 0.001

I'm aware that .step(epoch=xyz) is deprecated, but it's used by third-party libraries, like https://github.com/PyTorchLightning/pytorch-lightning/blob/master/pytorch_lightning/trainer/training_loop.py#L341.

cc @vincentqb @williamFalcon ^

I've debugged the issue and it seems to be caused by bisect_right() not playing well with Counter: https://github.com/pytorch/pytorch/blob/master/torch/optim/lr_scheduler.py#L399

This can be fixed by casting self.milestones to list before bisection. If that's an acceptable fix, I'm happy to send a PR.

Environment

Collecting environment information...
PyTorch version: 1.4.0
Is debug build: No
CUDA used to build PyTorch: 10.1

OS: Ubuntu 18.04.3 LTS
GCC version: (Ubuntu 4.8.5-4ubuntu8) 4.8.5
CMake version: version 3.12.1

Python version: 3.6
Is CUDA available: Yes
CUDA runtime version: 10.1.243
GPU models and configuration:
GPU 0: GeForce RTX 2080 Ti
GPU 1: GeForce RTX 2080 Ti

Nvidia driver version: 440.33.01
cuDNN version: /usr/lib/x86_64-linux-gnu/libcudnn.so.7.6.3

Versions of relevant libraries:
[pip3] numpy==1.17.2
[pip3] pytorch-lightning==0.5.3.2
[pip3] torch==1.4.0
[pip3] torch2trt==0.0.3
[pip3] torchvision==0.6.0a0
[conda] Could not collect
Issue 1:
What steps will reproduce the problem?
1. Make a package X.
2. Write another package Y that (perhaps transitively) depends on X.
3. Write a test for package X that depends on Y, and have that test be in package X
(i.e. not in package X_test).
4. Build and run the test.

What is the expected output?
6l should refuse to link the test due to the cycle.

What do you see instead?
One of two things:
- 6l refuses to link the test due to "linker skew", or
- 6l links the test, and the resultant test binary ends up initialising package X twice.

Which compiler are you using (5g, 6g, 8g, gccgo)?
6g/6l.

Which operating system are you using?
Linux.

Which revision are you using? (hg identify)
weekly.2011-06-16
(but it's been around since March)

Issue 2:
this code fails with the following error messages:
under revision d5e8f3fa95c4 tip.

/tmp/go-build221965265/local/test/_obj/_cgo_gotypes.go:14: invalid recursive type
_Ctype_U
/tmp/go-build221965265/local/test/_obj/_cgo_gotypes.go:14: invalid recursive type
_Ctype_union___0

this might easily be the same as issue #3082.

package foo

/*
typedef union
{
int a;
} U;

U* mkT() {
return 0;
}
*/
import "C"

func Foo() {
C.mkT()
}
Issue 1:
Regular expressions that include a Unicode category matcher throw an error, while they work fine in Node and in Chrome.

Example:

"0a".match(/\p{L}/u);

Expected output:

[ 'a', index: 1, input: '0a', groups: undefined ]

Actual output:

<unknown>:1:5
"0a".match(/\p{L}/u)
^
Uncaught SyntaxError: Invalid regular expression: /\p{L}/: Invalid property name
at <unknown>:1:6
at evaluate (js/repl.ts:87:34)
at replLoop (js/repl.ts:145:13)

I brought this up on Gitter and it was suspected to be due to the lack of ICU.

Issue 2:
As seen in #1952 / #1636 ICU needs to be added in Deno build.

Switching this flag to true maybe: https://github.com/denoland/deno/blob/master/.gn#L50 ?

ref: https://v8.dev/docs/i18n
Issue 1:
"Glide" network load library how to configure the combination of "android-gif-drawable" library.

"android-gif-drawable":https://github.com/koral--/android-gif-drawable.

Now I use the "Glide" network to load the library, and then pass Gifdrawable the gifImageView, but the two fragment switch, at the same time, each fragment which has a list of loading gif picture, switch, the list of gif graphics display animation card pause.

Issue 2:
Gif animation in recyclerview stop playing after scrolling and if i scroll again two or three times animation automatically starts again. This problem doesn't occur always. I am using glide 3.7.0-SNAPSHOT. I am using glide in code like this:

Glide.with(context)
.load(MyApp.INSTANCE.getUser().getUserAvatar())
.fitCenter()
.centerCrop()
.thumbnail(0.1f)
.diskCacheStrategy(DiskCacheStrategy.SOURCE)
.placeholder(R.drawable.ic_profile_picture)
.into(holder.imageView);

Am I doing something wrong ?
Issue 1:
Hi all,

first and foremost, thanks very much for Next.js. It's great.

I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

In versions prior to 5, our ssr was functioning as expected for every page.

Current Behavior

Since we upgraded to 5, the page mapped as in

https://github.com/em-casa/frontend/blob/master/server.js#L39

started flashing 404 and displaying if rendered server-side (losing the context).

I ended up making a bare-bones page just to make sure, see

https://github.com/em-casa/frontend/blob/fix-filtered-calls-to-url/pages/listings/index.js

and it still happens.

Steps to Reproduce (for bugs)

In production: https://emcasa.com/imoveis

A branch that if cloned will reproduce the issue without needing the backend:

https://github.com/em-casa/frontend/tree/fix-filtered-calls-to-url

If testing locally, the page in question is localhost:3000/imoveis

Context

I tried to make sure this isn't an Express issue or anything of the sort. Wonder if anyone has been experiencing something similar. Any help will be greatly appreciated.

Your Environment

Tech
Version

next
5.0.0

node
9.5.0

OS
macOS highSierra

browser
Chrome

Issue 2:
I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

The page loads on IE 11.

Current Behavior

An error is thrown.

Steps to Reproduce (for bugs)

mui/material-ui#10237

Context

startsWith() isn't supported by IE 11.

https://github.com/zeit/next.js/blob/85f341c9d834114be1127cf73a04bc3517cc2f67/lib/head.js#L63

Your Environment

Tech
Version

next
5.0.0

node
9.4.0

OS

browser

etc
Issue 1:
Environment

Windows build number: Microsoft Windows [Version 10.0.18363.836]
PowerToys version: v0.18.2
PowerToy module for which you are reporting the bug (if applicable): PowerToys Run

Steps to reproduce

Run PowerToys as Admin

Attempt to launch PT Run via Alt+Space shortcut

Expected behavior

PowerToys Run should trigger, displaying UI

Actual behavior

PowerToys Run does not trigger

Screenshots

Issue 2:
Summary of the new feature/enhancement

Right now, it seems like only Shortcuts in the format of "Alt + KEY" or "Ctrl + KEY" are supported. Some people have special keys or remapped keys (my Capslock is F15 for example) and would like to use these as shortcut. Right now, it's not transparent what would be an accepted shortcut and what wouldn't. Right now the best workaround is to remap not accepted key combinations to combinations that would be accepted. This is awkward.

I propose that users should have more freedom in setting their shortcuts.
Issue 1:
This Stackoverflow question brings the confusing matrix dimensions used in the imshow documentation to our attention.

According to the docstring one may use arrays of shapes (n, m) etc. which are then named MxN.

However, according to wikipedia

A matrix with m rows and n columns is called an m × n matrix or m-by-n matrix.

This is also the convention used by numpy, e.g. the arrays.ndarray.html speaks about

A 2-dimensional array of size 2 x 3, composed of 4-byte integer elements:

x = np.array([[1, 2, 3], [4, 5, 6]], np.int32)

The documentation should therefore either speak of

shape (n, m), or n x m array (nxm looks strange)

shape (N, M) or NxM array

shape (m, n) or m x n array

shape (M, N) or M x N array

Now, which is better? All capitalized or not, n or m being rows?

Issue 2:
Bug report

Bug summary

Using savefig to pdf and png, outputs are different.

Code for reproduction

import numpy as np
import matplotlib.pyplot as plt
from matplotlib.offsetbox import AnchoredText

fig, ax = plt.subplots(1, 1, figsize=(3.2, 3.2))

ax.imshow(np.random.rand(100 ,100), cmap='Blues', vmin=-0.1, vmax=0.8)
at = AnchoredText("texts",
prop=dict(size=12), frameon=True,
loc='upper left',borderpad=0.05,
)
#at.patch.set_boxstyle("round, pad=0.,rounding_size=0.2")
at.patch.set_alpha(0.5)
at.patch.set_edgecolor([1, 1, 1, 0.5])
at.patch.set_linewidth(1)
ax.add_artist(at)

fig.savefig('test.pdf', dpi=300)
fig.savefig('test.png', dpi=300, transparent=False)

Actual outcome

pdf:

png:

PNG output has extra lines around the text, which is undesired.

Expected outcome

Matplotlib version

Operating system: Windows 10

Matplotlib version (import matplotlib; print(matplotlib.__version__)): 3.3.4

Matplotlib backend (print(matplotlib.get_backend())): Qt5Agg

Python version: 3.7

Jupyter version (if applicable):

Other libraries:
Issue 1:
The strconv package's ParseFloat / ParseInt only take string.

To reduce allocations, I need to parse an int from a []byte.

I attempted to convert strconv's Parse internals to use []byte instead, and then make
the existing string versions make an unsafe []byte of the string's memory using
reflect.SliceHeader / reflect.StringHeader, but the reflect package already depends on
strconv, so there's an import loop.

Issue 2:
From golang-dev:

"""
Matthew Endsley:

I was testing the go1.3rc1 release on our codebase and found it failed one of our test
cases involving http responses.

It appears that in some cases, http.Response.Write will emit 2 Content-Length headers. A
short example the reproduces the behavior can be found here:
http://play.golang.org/p/qsH1MeVSHu

In go 1.2 this generated the following output:
HTTP/1.1 200 OK
Content-Length: 0

In go1.3rc1 I'm getting the following:
HTTP/1.1 200 OK
Content-Length: 0
Content-Length: 0

For reference, on current tip (087e446f2c41) I see the same output as go1.3rc1

As a side note, this issue only occurs if response.Request.Method is "POST".
If the request method is "GET" the duplicate Content-Length is not emitted.
"""

The problem was introduced in revision b2ebbbcfc615 for fixing issue #5381. The net/http
Server doesn't use this code, but it is a regression from 1.2. In the earlier fix, I
didn't take care of the case where PUT/POST were special-cased in transfer.go ages ago
in revision 4d792b5bea35 for HTTP Requests, but the transfer code deals with both
Requests and Responses, so a Content-Length of length 0 was always being sent for
Responses too. That code deserves a second look in Go 1.4, but will fix minimally for
now.
Issue 1:
Geometries having Face4's with MeshFaceMaterial assigned will throw a "map error" after merging vertices with Geometry.mergeVertices.

Reason is obvious: mergeVertices triangulates the Face4 to two Face3's but doesn't copy over Face4.materialIndex.

So after mergeVertices the geometry contains Face3's without Face3.materialIndex set.

Then of course MeshFaceMaterial can't find its material.

Issue 2:
Describe the bug

TypeScript projects that import the typings from examples/jsm/modifiers/CurveModifier.d.ts, or TessellateModifier.d.ts fail to compile due to some type errors.

In CurveModifier.d.ts

Material is imported several times at the start resulting in duplicate identifiers:

import { Geometry, Material, Mesh } from '../../../build/three.module';
import {
DataTexture,
Curve,
Uniform,
Material,
InstancedMesh
} from '../../../src/Three';

I believe the solution to this is to remove that first import line, moving Geomery and Mesh into the import line below it.

This line looks to refer to the accompanying js file, and introduces a duplicate identifier:

import { Flow } from './CurveModifier';

I believe the solution is to remove the line.

The use of Curve in this file is missing a type argument. I'm not sure what Flow does so I'm not sure what value that argument should be, but perhaps it should be THREE.Vector3?

In TessellateModifier.d.ts

There are some initializers despite this being an ambient context:

maxEdgeLength: number = 0.1;
maxIterations: number = 6;
maxFaces: number = Infinity;

I believe these should not provide values.

Let me know if I've messed something up in my TypeScript settings though 😂 . I can probably provide a PR with these fixes if it's helpful!
Issue 1:
Steps to reproduce

Run FancyZones from the second monitor (on my machine it's monitor one, but monitor two is the primary monitor).

Expected behavior

The Choose Your Layout shows an overlay which should cover the monitor.

Actual behavior

It's offset to the left by half the monitor width.. So all I see is the right half of the overlay, overlaying the left half of the monitor. Other than that it works, for example I can edit the layout (the right half of it), and when I apply it it applies correctly over the whole monitor. Same if I select an existing template. It's just the overlay experience that's offset.

Screenshots

Issue 2:
Originally reported by @brenca

Steps to reproduce

Primary monitor at 125% or any other scaling that is not 100%

Second monitor on the left of the primary monitor.

Open FZ editor on second monitor and select the Columns layout.

Expected behavior

The three columns should fit the monitor.

Actual behavior

The columns are shifted to the right and cover part of the primary monitor.

If the second monitor is also scaling at 125% the layout is shifted to the left.

Screenshots

More details here: #520
Issue 1:
After updating to 126+ fonts look terrible.

Windows 7 x64 with cleartype.

Atom settings:

font size: 12

"use hardware acceleration" unchecked.

Screens:

125

126

127

Issue 2:
I'm on Ubuntu 14.04 and every time I alt+tab or make Atom lose focus in any way, the cursor position disappears. I have to click on the window to make it reappear.
Issue 1:
Your Windows build number: (Type ver at a Windows Command Prompt)

Microsoft Windows [Version 10.0.18362.53]

Windows Terminal: 0.1.1211.0 (this was a signed daily build of the appx)

What you're doing and what's happening: (Copy & paste specific commands and their output, or include screen shots)

Running this .NET Core app causes the Terminal to hang. This app uses Unicode.NET to generate emoji string encodings.

using NeoSmart.Unicode;
using System;
using System.Text;

namespace HangWindowsTerminal
{
class Program
{
static void Main(string[] args)
{
Console.OutputEncoding = Encoding.UTF8;

foreach (var emoji in Emoji.All)
{
try
{
Console.Write(emoji.ToString());
}
catch (Exception e)
{
Console.Write($"[FAILED: {emoji.Name} - {e.Message}]");
}
}
}
}
}

<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.2</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Unicode.net" Version="0.1.2" />
</ItemGroup>
</Project>

What's wrong / what should be happening instead:

Once the loop gets to certain characters (with modifers?) the terminal hangs. Not always the same character. I'd expect problematic chars to be skipped or replaced with '??':

No repro in classic cmd.exe

Issue 2:
For example, the ‘defaultProfile’ in the settings is 'wsl‘, but I want to fill in the parameter 'defaultProfile = cmd ‘ when filling in the address bar, so I can open cmd directly instead of wsl
Issue 1:
Successfully installed torch-0.4.0 (cu90/torch-0.4.0-cp36-cp36m-win_amd64.whl )

when run a test.py , got an errors like this:

File "E:/baidu/DuReader-master/DuReader-master/PyTorch/Test.py", line 1, in

import torch

File "F:\Program Files\python3.6.1\lib\site-packages\torch_init_.py", line 78, in

from torch._C import *

ImportError: DLL load failed: 找不到指定的模块。

My environment is python3.6.1+cuda9.0. the same environment run tensorflow is ok!

Issue 2:
File "", line 4, in

import torch

File "C:\Users\hp i3\Anaconda3\lib\site-packages\torch_init_.py", line 76, in

from torch._C import *

ImportError: DLL load failed: The specified module could not be found.
Issue 1:
Bug Report

I would like to work on a fix!

Current behavior

TypeError: Cannot redefine property: c

Namespace reexports are transpiled like this:

for(key ...){
Object.defineProperty(exports, key, {
enumerable: true,
get: function () {
return imported[key];
}
});
}

But the spec allows for reexporting a symbol twice in the same file if it is actually the same binding (see example code below).

This means that Object.defineProperty(exports, "c", ...) is called twice, causing the error.

One of the packages that do this is @fluentui/react (this came up in parcel-bundler/parcel#4399)

Input Code

https://github.com/mischnic/parcel-issue-4399 (lib/ already contains the Babel output of src-valid)

export * from "./a.js";
export * from "./b.js";

// ---- everything below is just for context ---

// a.js
export { c } from './c.js'; // <--
export const a = "a";
// b.js
export { c } from './c.js'; // <--
export const b = "b";

// c.js
export function c() {
return false;
}

Expected behavior

The first file should export a, b, c (and not throw).

Babel Configuration (babel.config.js, .babelrc, package.json#babel, cli command, .eslintrc)

babel --plugins @babel/plugin-transform-modules-commonjs --delete-dir-on-start src-valid -d lib

Environment

System:
OS: macOS 10.15.4
Binaries:
Node: 14.4.0 - /usr/local/bin/node
Yarn: 1.22.4 - /usr/local/bin/yarn
npm: 6.14.4 - /usr/local/bin/npm
npmPackages:
@babel/cli: ^7.10.1 => 7.10.1
@babel/core: ^7.10.2 => 7.10.2
@babel/plugin-transform-modules-commonjs: ^7.10.1 => 7.10.1

Possible Solution

Not use Object.defineProperty? configurable: true ? But all of these have other sideffects

Additional context

Technically, f there are conflicting reexports (see src-invalid), there should be a SyntaxError (!).

But even Rollup doesn't handle this correctly (and Babel cannot work across multiple files anyway). rollup/rollup#3629

Issue 2:
having the same problem here but in Safari

#1574
Issue 1:
Add support of partial classes. Mixins is not the same, because it's run-time realization. Need compile realization, where partial classes will be combine into one before converting typescript to javascript.

//FileA.ts
partial class ClassA
{
constructor(public name: string) {}
public sayHello(): string { return "hi!"; }
}

//FileB.ts
partial class ClassA
{
public sayBye(): string { return "by!"; }
}

will be:

partial class ClassA
{
constructor(public name: string) {}
public sayHello(): string { return "hi!"; }
public sayBye(): string { return "by!"; }
}

Issue 2:
Please enable "line numbers" as a default for the code editor.

This is a duplicate of dotnet/fsharp#304 and dotnet/roslyn#1222, but we think it should be done for all languages (see dotnet/fsharp#304 (comment))
Issue 1:
For the code below, the tabs are not responding...

import React from 'react';
import mui from 'material-ui';
import {Tabs, Tab} from 'material-ui';
const ThemeManager = new mui.Styles.ThemeManager();

class JSTabs extends React.Component {
getChildContext() {
return {
muiTheme: ThemeManager.getCurrentTheme()
};
}
render() {
return <Tabs>
<Tab label="Item One" >
<div>
<h2>Tab One Template Example</h2>
<p>
This is an example of a tab template!
</p>
<p>
You can put any sort of HTML or react component in here.
</p>
</div>
</Tab>
<Tab label="Item Two" >
<div>
<h2>Tab Two Template Example</h2>
<p>
This is another example of a tab template!
</p>
<p>
Fair warning - the next tab routes to home!
</p>
</div>
</Tab>
<Tab
label="Item Three"
route="home"
onActive={this._onActive} />
</Tabs>
}

_onActive(tab){
this.context.router.transitionTo(tab.props.route);
}

}

JSTabs.childContextTypes = {muiTheme: React.PropTypes.object};

React.render(<JSTabs />,document.querySelector('body'));

Issue 2:
I inserted Tabs code into my component. OK, Tabs displayed on page but second tab remains inactive and I can't set it active.

Where I'm not right?

Tabs code:

<div className="authorization">

<Tabs>

<Tab label="Авторизация">

{login}

</Tab>

<Tab label="Регистрация">

{register}

</Tab>

</Tabs>

</div>
Issue 1:
I installed babel and run babel-node which version is 5.8.21.

> const b = 1
'use strict'
> b =2
2
> b
2
> const b = 3
'use strict'
> b
3

Obviously the ES6 code result is not correct. I compile the code with io.js, it throw the erro message:

TypeError: Identifier 'b' has already been declared

Why babel-node let constant variable changed？

Issue 2:
$ babel-node
> const PI = 3.14
'use strict'
> PI = 0 // Try to change a constant value
0
> PI
0
>

This problem only happens inside the REPL, it should throw an error since babel and babel-node -e can produce the error correctly.

Babel version: v5.6.14
Issue 1:
Hi,

I've run into a problem while running my next.js app in production. I use next.js with URQL and the ZEIT SASS package for next.js. When i run the app in dev mode it runs fine while navigating the routes. After i build the app and start it in production i run into a problem though.

If i go to my second route directly (localhost:3000/test, without a graphql query) and try navigating to a route with a query (localhost:3000/) it won't execute the query and stays on the initial route (localhost:300/test). I first reported a bug with the guys from URQL (urql-graphql/urql#411) but they couldn't help me.

To reproduce my issue i created a repo to check out: https://github.com/erickm/next-urql-sass/tree/master/examples/3-ssr-with-nextjs.

It looks like the error occurs while passing the data props to a custom component (only when using the sass function, without the sass pacakge it works fine).

To reproduce:

checkout the repo & install

yarn build && yarn start

navigate to localhost:3000/test

try to go to the home page (here is where i get stuck)

When i remove withSass in the next.config.js and remove the sass imports and sytles, build it and start it again it works fine.

For reference i created a gif:

Issue 2:
Bug report

Describe the bug

When I'm running my next.js website on my local environment (only on local), and I try to access a page other than the homepage on an Apple device (Safari for desktop or anything on iOS), I get this error:

undefined is not an object (evaluating 'modules[moduleId].call')

This is very very very specific as you can see.

Actually it doesn't really bother me as it's only hapenning in dev mode.

And I don't develop on Apple devices.

Screenshots

System information

OS: iOS 11.4.1

Browser: Chrome, Safari

Version of Next.js: 6.1.2