WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
Some operations on recarray views of structured arrays leak memory.

Reproducing code example:

import numpy as np
import resource

# make a random structured array/recarray
arr = np.array(np.vstack(np.random.normal(size=10000000)), dtype=[("x", float), ("y", float)])
rarr = arr.view(np.recarray)

# selection on structured array (works as expected, no memory leak)
def select_arr(rarr):
arr_selection = arr[arr["x"]>0.0]
return

# selection on recarray (leaks memory)
def select_rarr(rarr):
rarr_selection = rarr[rarr.x>0.0]
return

while True:
#select_arr(rarr) # memory stays constant
select_rarr(rarr) # memory continuously increases
print resource.getrusage(resource.RUSAGE_SELF).ru_maxrss

Error message:

Memory usage increases until either the process is killed by OS or the system crashes.

Numpy/Python version information:

This behaviour was observed in:

numpy.version = 1.15.2

sys.version = 2.7.5 (default, Jul 13 2018, 13:06:57) [GCC 4.8.5 20150623 (Red Hat 4.8.5-28)]

I tested with an older version of numpy that is also installed on my system and did not see a memory leak:

numpy version = 1.7.1 sys.version = 2.7.5 (default, Jul 13 2018, 13:06:57) [GCC 4.8.5 20150623 (Red Hat 4.8.5-28)]

Issue 2:
Original ticket http://projects.scipy.org/numpy/ticket/1133 on 2009-06-08 by @rc, assigned to unknown.

This ticket sumarizes the discussion in the numpy mailing list [1], concerning allowing non-unique arrays as function arguments, better naming conventions and documentation.

the functions with _nu suffix should be merged with the versions expecting unique arrays as input, example:

def intersect1d(ar1, ar2, assume_unique=False):

if not assume_unique:

return intersect1d_nu(ar1, ar2)

else:

... # the current code

The name of the keyword argument is yet to be resolved, other proposition so far were:

isunique=False or just unique=False (Josef)

ar1_unique=False, ar2_unique=False (rc)

deprecate the *_nu functions

alias setmember1d_nu as in1d or isin1d, because the function is a "in" and not a set operation

guarantee that setdiff1d works for non-unique arrays (even when

implementation changes), and change documentation

union1d, ediff1d and unique1d are defined for non-unique arrays - document it properly

define np.setxor1d(np.unique(a), np.unique(b)) to become

np.setxor1d(a, b, assume_unique=False)

module name

rename arraysetops to something easier to read like setfun. I think it

would only affect internal changes since all functions are exported to

the main numpy name space

+1e-4 (I got used to arrayse_tops)

+0 (internal change only). Other numpy/scipy submodules containing a bunch of functions are called *pack (fftpack, arpack, lapack), *alg (linalg), *utils. *fun is used comonly in the matlab world.

keep docs in sync with correct usage

[1] numpy-discussion@scipy.org, thread "extract elements of an array that are contained in another array?"
Issue 1:
TypeScript Version:

actual version on http://www.typescriptlang.org/Playground

Code

// A self-contained demonstration of the problem follows...
interface Props {
options: {
name: string | boolean
}
}

let v: Props

if (typeof v.options.name === "string") {
v.options.name.indexOf("123")
}

Expected behavior:

No error

Actual behavior:

Error: Property "indexOf" does not exist on type "string | boolean"

Issue 2:
I just found out that property access expressions doesn't work on type predicate functions and instanceof type guards.

class A {
propA: number;
}

class B {
propB: number;
}
class C {
propC: A;
}

declare function isA(p1: any): p1 is D;

interface D {
a: A | B
b: A | C;
}

let d: D;
if (isA(d.b)) {
d.b.propA; //error
}

function foo(d: D) {
if (d.b instanceof A) {
d.b.propA // error
}
}

I'm not sure if there is an easy fix on this problem. We are provided just a symbol when narrowing. That symbol represent the left most expression and then we walk up the if statement. There is no easy way of controlling symbol by symbol on each namespace in a property access expression in the if-statement-body. Because there is no info about the property access expression provided in getTypeOfSymbolAtLocation(symbol: Symbol, node: Node).

I also found that type assertion expressions are also not working in type predicate functions. But I will land a fix on that.

if (isA(<A>union)) {
a = union;
}
if (isA(union as A)) {
a = union;
}
Issue 1:
I have 8 gpu's in this machine.

I think its not taking all 8 gpu's. Already tried changing batch_sizes and with multiple of 8

Originally posted by @namanpundir in #21407 (comment)

Issue 2:
System Info

- OS Platform and Distribution: Amazon Linux 2
- ONNX version 1.11.0
- Python version: 3.8
- Transformers 4.17

Who can help?

@LysandreJik, @patil-suraj

Describe the bug

When I try and convert microsoft/deberta-v3-large to onnx format, the file size doubles to 1.8Gb while the pytorch file size is 800Mb.

There was an issue here that was resolved by removing the duplication of weights. However, trying this code snippet in the deberta case only reduced the file size from 1.8Gb to 1.6Gb.

Information

The official example scripts

My own modified scripts

Tasks

An officially supported task in the examples folder (such as GLUE/SQuAD, ...)

My own task or dataset (give details below)

Reproduction

from collections import OrderedDict
from typing import Mapping
from pathlib import Path
from transformers.onnx import export
from transformers.onnx import OnnxConfig
from transformers import AutoTokenizer, AutoModel, AutoConfig

onnx_path = Path("deberta.onnx")

class DebertaConfig(OnnxConfig):
@property
def inputs(self) -> Mapping[str, Mapping[int, str]]:
return OrderedDict(
[
("input_ids", {0: "batch", 1: "sequence"}),
("attention_mask", {0: "batch", 1: "sequence"}),
("token_type_ids", {0: "batch", 1: "sequence"}),
]
)

config = AutoConfig.from_pretrained("microsoft/deberta-v3-large")

base_model = AutoModel.from_pretrained("microsoft/deberta-v3-large")
tokenizer = AutoTokenizer.from_pretrained("microsoft/deberta-v3-large")
onnx_config = DebertaConfig(config)
onnx_inputs, onnx_outputs = export(tokenizer, base_model, onnx_config, 15, onnx_path)

Expected behavior

Expect the model.onnx file to be ~800Mb like the pytorch file.
Issue 1:
As it uses the request attributes it still detects it as the controller set by the router, if you forward to another controller it only detected as a sub request and not visible at first glance on the web dev toolbar. It could/should show any forwarded controllers/sub requests or at least the final controller that renders a response in the expanded information (on the web developer toolbar).

Issue 2:
i keep stumbling over this use case:

https://github.com/liip/LiipFunctionalTestBundle/pull/70/files#L7R25

https://github.com/liip/LiipFunctionalTestBundle/pull/70/files#L1R13

what is the best practice here? is there one? is there something that we could change to make this easier? specifically i would love to avoid duplicating the definition. guess we could clone the original test.client definition in the extension?
Issue 1:
In our reference documentation, we currently specify what JVM versions are supported on the setup page:

https://www.elastic.co/guide/en/elasticsearch/reference/current/setup.html

This is just duplicating the information in our support matrix here:

https://www.elastic.co/subscriptions/matrix

Are we worried about the reference and support matrix getting out of sync? Shouldn't we just refer users to the support matrix?

Issue 2:
In /etc/default/elasticsearch we have MAX_OPEN_FILES=65535. If you uncomment that, but don't edit it, and start ES you get this in the logs;

[2016-04-01 05:02:50,128][WARN ][env ] [Achebe] max file descriptors [65535] for elasticsearch process likely too low, consider increasing to at least [65536]

Can we just increase the default by one to ensure our checks align with our default settings?
Issue 1:
Currently there is no hook that would allow us to set attributes on the node before it's injected into a document. Which is unfortunate as there are some attributes in the wild that take effect only before element is injected into a document.

To workaround this I'm forced to replacing react injected nodes with clones on componentDidMount

https://github.com/Gozala/firefox.html/blob/react/js/element.js#L57-L61

It would be great if react could expose node that will be inserted during componentWillMount or added another hook where node will be provided.

Issue 2:
Is there reason why React restricts you to just a subset of DOM elements and attributes ? Unfortunately it makes it really hard to use it with new HTML or non standard features unless support for that is added.

I noticed I could create custom elements via React.createFactory("custom")

https://github.com/facebook/react/blob/master/src/browser/ReactDOM.js#L30

https://github.com/facebook/react/blob/master/src/classic/element/ReactElement.js#L201-L209

But it's not documented & not sure if supported in long term. And even if it was supported that still does not solve problem of attributes as ones not listed in the docs seem to be ignored.

I think it would be good idea to allow defining custom virtual DOM Elements with a custom list of attributes so that users could implement them even if support for new element isn't in the core yet.

Finally support for namespaces would be super useful for using react even in more environments & should not be too hard either. I have successfully used vtree / vdom to do that.
Issue 1:
Hello

I want to know if is there a way to disable auto close notification in windows

after generating the notification it will close automatically I can't even set any timeout for this function

should I use native windows notification?

thanks

Issue 2:
OS: Windows 8.1 x64

Atom-Shell: 0.19

Sorry for all the editing and deleting of my previous reports but the issue is morphing and I've narrowed it down. Apparently the webview is garbage collected when you set it's CSS display property to none. If you do this then you cannot use the webview again and if you try to set it's src it will crash Atom-Shell.

<!DOCTYPE html>
<html>
<head>
<title>webview crash test</title>
</head>
<body>
<webview id="web" style="width:100%;height:100%;position:absolute;"></webview>
<script>
window.onload = function() {
var web = document.getElementById("web");
web.src = "http://msn.com";
};
</script>
</body>
</html>

Reproduce the crash:

In your main.js make sure you have it open the dev tools once it creates a new browser window. Use the dev tools to set the CSS display property for the webview to none. Set the src of the webview using the console. Observe Atom-Shell crash.

Now a point of clarification: This sounds convoluted but I was using display:none to hide the webview, set the source and then show it in my app. I should have been using visibility:hidden instead. My UI is just set up to show the webview in the entire width/height of the window but underneath of it there is a list of links to choose from. This is the reasoning I found this issue. Using visibility:hidden makes the crashing go away.

Question, does calling display:none on the webview cause the webview to be garbage collected?
Issue 1:
I'm not 100% sure this is by ES6 spec but the following code errors on Edge and Firefox Nightly:

new (class extends Promise {
constructor() {
let newThis = this; // Edge: Use before declaration, Firefox: |this| used uninitialized in anonymous class constructor
super((resolve, reject) => resolve());
}
})()

Issue 2:
ES6 disallow to use this before super call.

class Aaa {
constructor(v: () => number) {
}
}
class Bbb extends Aaa {
vv: number;
constructor() {
this.vv = 111;
super(this.vvv);
}
vvv(): number { return 0; }
}

The line "this.vv = 111;" must be after super statement.

The super statement also cannot contain this usage.

Compilation to ES6 gives:

class Aaa {
constructor(v) {
}
}
class Bbb extends Aaa {
constructor() {
this.vv = 111;
super(this.vvv);
}
vvv() { return 0; }
}

So even if TS wants to relax "this usage before super" (which i doubt), then it must fix in generated ES6 code.
Issue 1:
Is this a request for help? (If yes, you should use our troubleshooting guide and community support channels, see http://kubernetes.io/docs/troubleshooting/.): No

What keywords did you search in Kubernetes issues before filing this one? (If you have found any duplicates, you should instead reply there.): NA

Is this a BUG REPORT or FEATURE REQUEST? (choose one): bug

Kubernetes version (use kubectl version): HEAD/1.4.0.beta

Environment:

Cloud provider or hardware configuration:

OS (e.g. from /etc/os-release):

Kernel (e.g. uname -a):

Install tools:

Others:

What happened:

kube-dns spec here doesn't specify any resource limits for dnsmasq container. With kubelet eviction turned on, this might put the container under best effort class and could get evicted?

What you expected to happen:

resource limits for dnsmasq container defined.

How to reproduce it (as minimally and precisely as possible):

Anything else do we need to know:

Issue 2:
kubedns has resource/limits but not the dnsmasq cache.
Issue 1:
Is Electron capable of hosting a socket IO web server? I am currently trying to connect to my local systems internal IP over my local network (using a port specified by the Socket.IO server javascript) and my connection is timing out.

Issue 2:
I've been tracking down a bug in a program that works in OSX but fails mysteriously in Windows. I've pared down a minimal repro case to the net.createConnection / net.createServer APIs w/ a named pipe failing when run in the main atom process.

If you specify ATOM_SHELL_INTERNAL_RUN_AS_NODE=1 for both ends of the test it will function as you'd expect. If either one (or both) are ATOM_SHELL_INTERNAL_RUN_AS_NODE=0, the repro will hang in the middle of the test and fail to continue the ping/pong cycle.

Reproduction steps (tested on Win7/32 w/electron-v0.28.0-win32-ia32):

Save the snippet below as repro.js

Open two Windows command consoles

In the first one, run electron.exe repro.js

In the second one, run electron.exe repro.js client

What happens:

The ping/pong only runs a few cycles back and forth, then stops. It may occasionally continue after a pause of 30-60s.

What I expect to happen:

The ping/pong continues indefinitely

var net = require('net');

var addr = '\\\\?\\pipe\\testpipe';

var counter = 0;

if (process.argv[2] == 'client') {
var client = net.createConnection({ path: addr }, function() {
console.log("Connected to named pipe as client");
client.on('data', function(data) {
console.log("rec'd: " + data);
setTimeout(function() {
client.write("ping " + counter++);
}, 500);
});

client.write('ping!');
}.bind(this));
} else {
net.createServer(function(client) {
console.log("Connected to named pipe as server");
client.on('data', function(data) {
console.log("rec'd: " + data);
setTimeout(function() {
client.write("pong " + counter++);
}, 500);
});
}.bind(this)).listen(addr);
}
Issue 1:
Issue Type: Bug Report

Ansible Version: 1.5.5, 1.6.10, 1.7.1

Environment: Ubuntu 12.04 -> Ubuntu 12.04

Summary:

The ansible_ssh_user setting does not appear to be applied to a host when using the delegate_to feature.

Steps To Reproduce:

test inventory:

[lb]
lb ansible_ssh_user=ubuntu

[web]
web ansible_ssh_user=ubuntu

test.yml playbook:

---

- hosts: web
serial: 1
sudo: yes

tasks:
- name: this is a test
shell: echo test
delegate_to: lb

run ansible:

ansible-playbook -i test test.yml -vvvv

Expected Results:

I expect that it would use the ssh user defined by the ansible_ssh_user setting when attempting to log into the lb node.

Actual Results:

TASK: [this is a test] ********************************************************
<lb> ESTABLISH CONNECTION FOR USER: user
<lb> REMOTE_MODULE command echo test #USE_SHELL
<lb> EXEC ['ssh', '-C', '-tt', '-vvv', '-o', 'ControlMaster=auto', '-o', 'ControlPersist=60s', '-o', 'ControlPath=/home/user/.ansible/cp/ansible-ssh-%h-%p-%r', '-o', 'Port=22', '-o', 'KbdInteractiveAuthentication=no', '-o', 'PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey', '-o', 'PasswordAuthentication=no', '-o', 'ConnectTimeout=10', 'lb', "/bin/sh -c 'mkdir -p $HOME/.ansible/tmp/ansible-tmp-1410482613.68-50435724199494 && chmod a+rx $HOME/.ansible/tmp/ansible-tmp-1410482613.68-50435724199494 && echo $HOME/.ansible/tmp/ansible-tmp-1410482613.68-50435724199494'"]

Comparing this to the ssh command used on tasks that aren't delegated, it's missing the -o User=ubuntu section of the command.

Issue 2:
Issue Type:

Bug Report

Ansible Version:

1.6.6

ansible-playbook 1.7 (devel 8e94000) last updated 2014/07/21 13:14:41 (GMT -400)

Environment:

OSX Mavericks

Summary:

Delegating a task should accept that delegated host's ansible_ssh_user variable. Instead it returns the currently logged in user.

Steps To Reproduce:

inventory:

[host1]
127.0.0.1 ansible_ssh_user=foo

[host2]
127.0.0.2 ansible_ssh_user=bar

playbook:

- hosts: host1
connection: local
tasks:
- debug: var=ansible_ssh_user
delegate_to: host2

Expected Results:

PLAY [host1] ******************************************************************

GATHERING FACTS ***************************************************************
ok: [127.0.0.1]

TASK: [debug var=ansible_ssh_user] ********************************************
ok: [127.0.0.1] => {
"ansible_ssh_user": "bar"
}

PLAY RECAP ********************************************************************
127.0.0.1 : ok=2 changed=0 unreachable=0 failed=0

Actual Results:

PLAY [host1] ******************************************************************

GATHERING FACTS ***************************************************************
ok: [127.0.0.1]

TASK: [debug var=ansible_ssh_user] ********************************************
ok: [127.0.0.1] => {
"ansible_ssh_user": "jmartin"
}

PLAY RECAP ********************************************************************
127.0.0.1 : ok=2 changed=0 unreachable=0 failed=0
Issue 1:
The usual keystroke pattern on a Mac for referencing one of several windows (as might be open on the left Explorer/Working Files area) is cmd-1, cmd-2, etc, either from top to bottom or left to right. What would be the proper way to adjust my settings so that I accomplish this way of selecting windows in the Working Files area?

Besides that, I'm not sure why choosing cmd-2 would open a second/duplicate window for the one I'm already on...

Issue 2:
One of the many hundreds of awesome features of vi(m) is the ability to jump between several lines and do all sorts of things very quickly. However, that's very difficult to accomplish with the traditional editors.

And this is something I constantly end up missing in VSCode. While there exists a vim emulation, its far from properly usable - At this moment, the idiomatic VSCode way seems a lot more productive.

Meanwhile, the Goto feature is often underlooked. Currently the Goto command pops up the command manager prompting for the line number/col number.

However, it'd be a relatively easy tweak to this to allow jumping between lines in a relative way. So, the proposal is:

For the most part the Goto behavior is unchanged.

Prefix a number with +, say +20 - now Goto uses the relative information instead of directly going to line 20. So, if the cursor was already at line 20, this ends ups moving to line 40.

Prefix with -, and do just the opposite. Move backward.

Column interactions should remain the same.

Press and Hold "Shift" while hitting "Enter" to finalize the "Goto" command (Shift+Enter, instead of just typing the number and pressing Enter): This ends up selecting the entire block of text inbetween.

All the above should be relatively simple implementation. However, the next one is quite different, but will be extremely productive. When the Goto command is open - Start highlighting brackets, parenthesis, and significant codepoint like class names. And the highlight should be accompanied by quick text hints to jump to them straight away. Somewhat like how "Vimium" (https://vimium.github.io/) does it on Chrome for links.

I was looking for a starting point for an extension for the last feature. However, since VSCode provides no way for custom UI interfaces, of overlay, it seems impossible to do it using the currently exposed extensions points. So, I guess its completely upto the team to implement something like these, or if someone can provide suggestions on how to proceed with the hightlights like Vimium does, I'd be happy to prototype an extension. :)
Issue 1:
I get the following problem in a Travis build with Typescript 2.2 using @types/lodash^4.14.45.

node_modules/@types/lodash/index.d.ts(19449,15): error TS2428: All declarations of 'WeakMap' must have identical type parameters.

Issue 2:
I tried using the @types/lodash package and had problems.

I tried using the latest stable version of tsc. https://www.npmjs.com/package/typescript

I have a question that is inappropriate for StackOverflow. (Please ask any appropriate questions there).

Mention the authors (see Definitions by: in index.d.ts) so they can respond.

Authors: @....

I found this problem compiling a project using Typescript version 2.2.0-dev.20170128 and @types/lodash version 4.14.51. In my case the tsconfig use es6 target. The error message is:

node_modules/@types/lodash/index.d.ts(19421,15): error TS2428: All declarations of 'WeakMap' must have identical type parameters.

If I browse the file to the line indicated in the error message I can see the following comment:

// Backward compatibility with --target es5

Maybe this is the cause of the issue?

Best regards to all
Issue 1:
Hello everyone,

I have a problem with Chrome extension - React Developer Tools, if I change component's state it's not changing in the dev tools window (as in the screenshot below) I am only able to see arrows with title "Reset value".

Does somebody know how it could be fixed?

Thanks a lot for help!

Issue 2:
Followup from #10385, it looks like the CommonJS build is saving short variable name references to long property names, however it does this in a bunch of places. The net output is a larger build because the referenced names (like IndeterminateComponent) are duplicated quite a bit:

For example:

D = {
IndeterminateComponent: 0,
FunctionalComponent: 1,
ClassComponent: 2,
HostRoot: 3,
HostPortal: 4,
HostComponent: 5,
HostText: 6,
CoroutineComponent: 7,
CoroutineHandlerPhase: 8,
YieldComponent: 9,
Fragment: 10
},
F = {
ELEMENT_NODE: 1,
TEXT_NODE: 3,
COMMENT_NODE: 8,
DOCUMENT_NODE: 9,
DOCUMENT_FRAGMENT_NODE: 11
},
xa = D.HostComponent,
ya = D.HostText,
za = F.ELEMENT_NODE,
Aa = F.COMMENT_NODE,
Ba = z.ID_ATTRIBUTE_NAME,

The UMD build does not have any of these tokens. The CJS build doesn't crush the names either. Later in the build there are things like this:

var Mf = Qe.reconcileChildFibers,
Nf = S.popContextProvider,
Of = D.IndeterminateComponent,
Pf = D.FunctionalComponent,
Qf = D.ClassComponent,
Rf = D.HostRoot,
Sf = D.HostComponent,
Tf = D.HostText,
Uf = D.HostPortal,
Vf = D.CoroutineComponent,
Wf = D.CoroutineHandlerPhase,
Xf = D.YieldComponent,
Yf = D.Fragment,
Zf = L.Placement,
$f = L.Ref,
ag = L.Update,
bg = R.OffscreenPriority;

This duplicates a lot: If you look in the CJS build, something along the lines of a = d.HostNode shows up in like 10 places. This is true of all of these tokens.

Here's a beautified version for reference:

https://gist.github.com/nhunzaker/69ede0d4014d9c590908398ac6bc6c13