WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
System Info

transformers version: 4.15.0

Platform: Windows-10-10.0.19041-SP0

Python version: 3.8.5

PyTorch version (GPU?): 1.11.0+cu113 (True)

Tensorflow version (GPU?): 2.5.1 (True)

Flax version (CPU?/GPU?/TPU?): not installed (NA)

Jax version: not installed

JaxLib version: not installed

Using GPU in script?: yes

Using distributed or parallel set-up in script?: no

Who can help?

@patrickvonplaten, @Narsil

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 transformers import GPTNeoForCausalLM, GPT2Tokenizer

model_name = "EleutherAI/gpt-neo-125M"

model = GPTNeoForCausalLM.from_pretrained(model_name, low_cpu_mem_usage=True, cache_dir='gpt_cache_dir', resume_download=True).half().to("cuda:0")
tokenizer = GPT2Tokenizer.from_pretrained(model_name, low_cpu_mem_usage=True, cache_dir='gpt_cache_dir', resume_download=True)

input_ids = tokenizer("This is a line 1\n\nThis is a line 2\n\nThis is a line 3\n\n", return_tensors="pt").input_ids.cuda()
gen_tokens = model.generate(input_ids, do_sample=True, temperature=0.01, max_length=40, min_length=1, repetition_penalty=1.0)

gen_text = "Output: \"" + tokenizer.batch_decode(gen_tokens[:, input_ids.shape[1]:])[0] + "\""

print(gen_text)

Actual behavior:

-If the input ends with 1 newline, generating multiple tokens works as expected, but generating just 1 token says the next token should be a newline by itself.

-If the input ends with 2 newlines, generate multiple tokens doesn't work as expected, and printing the next top score reveals the next token is some unexpected thing such as another newline or a token beginning with a space.

Expected behavior

Expected behavior: If prompt ends in \n\n, generated text shouldn't start with \n.

Duplicate of #17860 but it won't let me re-open

Issue 2:
Hi

I am using transformer 4.1.1 on multiple gpus with distributed launch script below, the n_gpu set in this case is 1 instead of actual n_gpus, could you tell me how I can access to the total number of ranks calling the launcher with? Is there any variable in huggingface library which could show the number of gpus the script is called with? Here is the command I run:

export BS=4; CUDA_VISIBLE_DEVICES=0,1 USE_TF=0 python -m torch.distributed.launch --nproc_per_node=2 --master_port=9915 finetune_trainer.py --model_name_or_path t5-small --output_dir output_dir --adam_eps 1e-06 --data_dir wmt_en_ro --do_train --freeze_embeds --label_smoothing 0.1 --learning_rate 3e-5 --logging_first_step --logging_steps 1000 --max_source_length 128 --max_target_length 128 --num_train_epochs 1 --overwrite_output_dir --per_device_train_batch_size $BS --sortish_sampler --task translation --val_max_target_length 128 --warmup_steps 500 --n_train 500

thanks
Issue 1:
Environment

Tech
Version

Material-UI
1.0.0-beta.30

React
16.2.0

browser
chrome

Current Bug

In production mode i have this error happening because of the ripple effect on the Buttons. In development mode it's working perfectly.

I thought it was a minifying problem but i checked my webpack configuration for Uglify and it seems to be good:

new webpack.optimize.UglifyJsPlugin({
sourceMap: process.env.NODE_ENV === 'production',
parallel: process.env.NODE_ENV === 'production',
compress: {
warnings: false,
drop_console: false,
}
}),

When i click on a Button with the effect i got this error in the console :

Error: Minified React error #44; visit http://facebook.github.io/react/docs/error-decoder.html?invariant=44 for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
at r (reactProdInvariant.js:29)
at Object.r [as findDOMNode] (findDOMNode.js:51)
at t.updateStatus (Transition.js:212)
at t.componentDidMount (Transition.js:157)
at commitLifeCycles (react-dom.production.min.js:149)
at t (react-dom.production.min.js:158)
at M (react-dom.production.min.js:169)
at b (react-dom.production.min.js:168)
at batchedUpdates (react-dom.production.min.js:171)
at Q (react-dom.production.min.js:54)

I found that Transition.js is the problem and it happens only when i click on a Button, so i deduce that it should be the ripple effect.

If you have questions ?

Issue 2:
When trying to add the Select component on beta.10, I see the following error:

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

Expected Behavior

I tried to add the stepped with the example from the docs.

Current Behavior

I get an error: "utils.js:215 uncaught at TypeError: (0 , _reactHelpers.isMuiElement) is not a function"

Context

On beta.10, trying to use Select in a grid without a root <form> element

Other material-ui components all seem to work fine when used like this.

Your Environment

Tech
Version

Material-UI
1.0.0-beta.10

React
15.6.1

browser
Chrome - Version 60.0.3112.113 (Official Build) (64-bit)
Issue 1:
Ben Rowlands opened SPR-5126 and commented

The Spring DAO exception hierarchy is not fine grained enough to isolate duplicate key errors. A duplicate key error is an example of where an application may catch the exception and invoke alternative logic instead of just letting it fall down the stack.

For example, we read messages from a queue and insert the data into a database. We explicitly catch a duplicate key insert exception as this indicates we've processed the same message earlier. This is more efficient than a guarding the update with a check-then-act (which also introduces a race condition that may lead to dup-key exception anyway).

Additionally, if we use single-phase commit for our JMS and DB transactions (commit DB first then JMS) a failure scenario is that the DB transaction commits but the JMS transaction rollsback. In this case the message is delivered again and we get a dup-key exception. We can then safely ignore such duplicate messages.

A dup-key error is currently classified as a DataIntegrityViolationException along with other errors such as a data bounds error so we can't simply catch this exception type. We could work around this be checking the vendor error-code/state however this is not portable and cumbersome.

Ideally an exception like:

public class DuplicateKeyException extends DataIntegrityViolationException { }

Spring already provides mappings from vendor specific codes so it would be very powerful if it could provide a fine grained exception to allow this common duplicate-key handling pattern to be detected just using exception type.

We currently use the following SQLExceptions to detect a dup-key:

Sybase: error-state=23000

DB2: error-state=23505

Issue Links:

#9798 Add DuplicateKeyException to DAO exception hierachy ("duplicates")

Issue 2:
Kenny MacLeod opened SPR-6750 and commented

The mvc:annotation-driven schema permits the specification of messageConverters, which are passed on to the generated AnnotationMethodHandlerAdapter. I'd like to see the ability to specify the customArgumentResolvers also.

I suppose there's a fine line between making mvc:annotation-driven minimalist and supporting common use cases only, and simply duplicating every property from AnnotationMethodHandlerAdapter and DefaultAnnotationHandlerMapping.

Affects: 3.0 GA
Issue 1:
Environment

[Version 10.0.18362.175]

Steps to reproduce

Install from store

Open program

Hover with mouse on red section, try to drag and move

Fail.

Expected behavior

Dragging window with mouse works in the red section and green section

Actual behavior

Dragging window with mouse does not work in the red section, can be dragged only by hover and mouse press on the green section.

Issue 2:
I think its really nice that you can put the terminal-tabs in your titlebar but I got an issue there.

You can't move the window around klicking on the blank space in the the-bar to move the window around (highlighted in the screenshot).

Since people are moving their terminal quite often it would be nice to offer this space, so you can drag your terminal around.
Issue 1:
Describe the bug

When the deno extension is enabled, typed imports via /** @type {import("... stop working.

To Reproduce

Create Bar.js:

export class Bar {}

Create Foo.js:

/** @type {import("./Bar.js").Bar} */
const foo = null;

Hover over foo and note it's type is set to Bar.

Enable deno with Deno: Initialize Workspace Configuration

Hover over foo again.

Expected behavior

The type remains set to Bar, rather than any.

Screenshots

If applicable, add screenshots to help explain your problem.

Versions

vscode: 1.62.3 deno: 1.16.3 extension: 3.9.2

Issue 2:
JS bundlers have a lot of complexity and we do not want to take on all that complexity in Deno. We believe this can be done effectively in "user space" - that is, it doesn't need to be built into the Deno executable. Packup is an example of a Deno program which utilizes esbuild-wasm to provide complex bundling abilities.

Ultimately we'd like to remove swc_bundler dependency completely completely from Deno.
Issue 1:
It seems that rustc does not check if the type paramater satisfy the declared type bounds in trait and impl function definitions, but only for bare functions. Rustc fails on the following code with the following, rather confusing, error message: type &mut std::collections::hash::set::HashSet<[u8]> does not implement any method in scope named insert

But I think that rustc should fail at an earlier stage, because [u8] does not implement core::marker::Sized.

use std::collections::HashSet;

struct Bar;

impl Bar {
fn test(bar: &mut HashSet<[u8]>) {
let x: [u8; 3] = [1, 2, 3];
bar.insert(x);
}
}

trait Foo {
fn test(&self, _: &mut HashSet<[u8]>);
}

The following code is a more general example and does not depend on any library.

trait Cons {
fn myFn(&self);
}

struct Foo<T: Cons> {
field: T
}

trait Kaboom {
fn foo(&self, x: Foo<u8>) {}
// this does NOT fail, but Foo<u8> is no valid type
}

struct KaboomStruct;

impl KaboomStruct {
fn bar(&self, x: Foo<u8>) {}
// this does NOT fail, but Foo<u8> is no valid type
}

fn foo(x: Foo<u8>) {}
// this fails, beacuse u8 does not implement Cons

Issue 2:
Now that IO reform is complete, we have a large number of "primitive" IO APIs -- functions in Rust that roughly correspond to a single system API, like opening a file or extracting its metadata.

We need to go through all of these APIs and add a section like # Platform notes which details which system API(s) are being used for each platform (usually, a Unix/Windows division suffices).

This documentation is very important for understanding the interaction of the std IO APIs with the underlying system, which is relevant when using lowering APIs, when sandboxing and application, and likely for other scenarios as well.
Issue 1:
I noticed after connecting my computer up to a Log Analytics account in Azure that I started getting alerts from Azure Security Center about Windows Terminal launching conhost. This might be a duplicate of #2568 but might just be related.

I am running version 0.6.2951.0 downloaded and installed from the Microsoft Store.

Alert Details

DESCRIPTION The system process c:\program files\windowsapps\microsoft.windowsterminal_0.6.2951.0_x64__8wekyb3d8bbwe\conhost.exe was observed running in an abnormal context. Malware often use this process name to masquerade its malicious activity.

ACTIVITY TIME Thursday, October 31, 2019, 9:36:12 AM

SEVERITY Medium

STATE Active

DETECTED BY Microsoft

ENVIRONMENT Non-Azure

RESOURCE TYPE Non-Azure Resource

COMMAND LINE conhost.exe --headless --width 120 --height 27 --signal 0x7b8 -- pwsh.exe

PARENT PROCESS windowsterminal.exe

PROCESS ID 0x54b4

PARENT PROCESS ID 0x9dd4

SYSTEM PROCESS CONHOST.EXE

Issue 2:
Environment

windows 1909 build 18363

Windows build number: [run `[Environment]::OSVersion` for powershell, or `ver` for cmd]
Windows Terminal version (if applicable):

Any other software?

no

Steps to reproduce

I've added this to my profiles.json

{

"guid": "{00000000-0000-0000-ba54-000000000002}",

"acrylicOpacity" : 0.75,

"closeOnExit" : true,

"colorScheme" : "Campbell",

"commandline" : ""%PROGRAMFILES%\git\usr\bin\bash.exe" -i -l",

"cursorColor" : "#FFFFFF",

"cursorShape" : "bar",

"fontFace" : "Consolas",

"fontSize" : 10,

"historySize" : 9001,

"icon" : "ms-appx:///ProfileIcons/{0caa0dad-35be-5f56-a8ff-afceeeaa6101}.png",

"name" : "Bash",

"padding" : "0, 0, 0, 0",

"snapOnInput" : true,

"startingDirectory" : "%USERPROFILE%",

"useAcrylic" : true

}

launch git bash with login option

Expected behavior

Be able to see my normal stuff from my ~/.bash_profile. In my case aliases.

Actual behavior

I dont see any of my aliases. It almost feels like the command line args are not being passed to bash. Or, the starting directory is not being passed. If there is a work around, i will do that. i tried creating a .bashrc but this didn't do anything either.
Issue 1:
Feature request

Is your feature request related to a problem?

Currently it's not possible to make async operations before exporting the handler from a API route.

Describe the solution you'd like

I'd like to be able to use the same mecanism from micro to be able to do async work before returning a handler.

Additional context

I opened a discussion about it on spectrum : https://spectrum.chat/next-js/general/async-api-route~b1d7dddd-50fc-4f6f-a565-63fa68a725be

Issue 2:
Hi,

Currently, we can pass the through the renderPage through the _document.js for decorating our components. This seems a bit restrictive, since I want to decorate one of my pages on the server side.

I've looked into it, there seems no straightforward way of accomplishing this. Correct me if I'm wrong. If there isn't, then I'll start making a pull request.

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

I have read the Contributing Guidelines for this project.

I agree to follow the Code of Conduct that this project adheres to.

I have searched the issue tracker for an issue that matches the one I want to file, without success.

Issue Details

Electron Version:

5.0.0

Operating System:

Manjaro 18.0.2 (also tested on 18.0.4)

Last Known Working Electron version::

4.1.4

Expected Behavior

Create a new Window and start the app.

Actual Behavior

Exit with an error:

[2543:0428/133247.138100:FATAL:setuid_sandbox_host.cc(157)] The SUID sandbox helper binary was found, but is not configured correctly. Rather than run without sandboxing I'm aborting now. You need to make sure that /home/user/myApp/node_modules/electron/dist/chrome-sandbox is owned by root and has mode 4755.

To Reproduce

Just change the electron version in package.json to "5.0.0" and run npm install electron@5.0.0 && npm start

Screenshots

N/A

Additional Information

The app runs perfectly on Ubuntu based distros.

Issue 2:
Preflight Checklist

I have read the Contributing Guidelines for this project.

I agree to follow the Code of Conduct that this project adheres to.

I have searched the issue tracker for an issue that matches the one I want to file, without success.

Issue Details

Electron Version:

5.0.0

Operating System:

Arch Linux x64

Last Known Working Electron version::

4.1.5

Expected Behavior

Running node_modules/.bin/electron --version should output v5.0.0.

To be clear, all commands create this error, but I'm using the --version flag for simplicity.

Actual Behavior

$ node_modules/.bin/electron --version
[2720:0425/142001.775056:FATAL:setuid_sandbox_host.cc(157)] The SUID sandbox helper binary was found, but is not configured correctly. Rather than run without sandboxing I'm aborting now. You need to make sure that /home/christianbundy/src/ssbc/patchwork/node_modules/electron/dist/chrome-sandbox is owned by root and has mode 4755.

Additional Information

$ stat /home/christianbundy/src/ssbc/patchwork/node_modules/electron/dist/chrome-sandbox
Size: 5185424	Blocks: 10128 IO Block: 4096 regular file
Device: 802h/2050d	Inode: 1465270 Links: 1
Access: (0755/-rwxr-xr-x) Uid: ( 1000/christianbundy) Gid: ( 1000/christianbundy)
Access: 2019-04-25 14:15:10.609279524 -0700
Modify: 2019-04-25 14:15:10.659278929 -0700
Change: 2019-04-25 14:15:10.659278929 -0700
Birth: 2019-04-25 14:15:10.609279524 -0700

If I chown and chmod the file then it works fine, but my intuition is that npm install electron@latest should work without those commands. Is this expected behavior?
Issue 1:
In current master:

np.array(1, dtype=int) ** -2
Out[5]: 0

In 1.11 and earlier:

In [3]: np.array(1, dtype=int) ** -2
Out[3]: 1

(Found in astropy testing; astropy/astropy#4950)

Issue 2:
>>> np.int64(2) ** -2
0.25
>>> np.int32(2) ** -2
0

Tested on OSX 10.8.5 w/ numpy 1.10 on both Python 2.7 and 3.5.
Issue 1:
Navbar child items work fine in desktop view, but in mobile/tablet devices, collapsed child items does not link to what is defined in href and will remain on the same page.

Use any mobile devices to open below jsFiddle, and click on any link under dropdown menu.

http://jsfiddle.net/wXuqU/5/

Issue 2:
I had a project using more or less the same menu and it worked. Found out it was using Bootstrap version 2.3.1. Compared version 2.3.2 and 2.3.1 and found that in version 2.3.2 there's this snippet of CSS that reads:

.dropdown-backdrop {
position: fixed;
left: 0;
right: 0;
bottom: 0;
top: 0;
z-index: 990;
}

and the rule: position: fixed; seems to cause all the problems.

I still don't undertand the point of the markup that is added by the bootstrap dropdown plugin:

<div class="dropdown-backdrop"></div>

So I've temporarily fixed the bug on my end by adding a style to override the style causing the problem:

.dropdown-backdrop {
position: static;
}

To me this looks like a bug introduced from version 2.3.1 to 2.3.2. Maybe I'm wrong. If someone could explain the purpose of the empty div, it would be helpful.
Issue 1:
We currently only check for object safety when coercing a concrete object to a trait object. We should prevent the programmer writing object types which are not object safe.

Issue 2:
The following definition compiles fine:

fn two<V>(f: &mut FnMut(V) -> V, v: V) -> V {
let temp = f(v);
f(temp)
}

whereas the more direct version does not:

fn two<V>(f: &mut FnMut(V) -> V, v: V) -> V {
f(f(v))
}

The error we get here is:

error: cannot borrow `*f` as mutable more than once at a time
f(f(v))
^
note: previous borrow of `*f` occurs here; the mutable borrow prevents subsequent moves, borrows, or modification of `*f` until the borrow ends
f(f(v))
^
note: previous borrow ends here
f(f(v))
^
error: cannot borrow `*f` as mutable more than once at a time
f(f(v))
^
note: previous borrow of `*f` occurs here; the mutable borrow prevents subsequent moves, borrows, or modification of `*f` until the borrow ends
f(f(v))
^
note: previous borrow ends here
f(f(v))
^

(The repetition is in the original.)

If I'm reading the notes here correctly, it seems that a call like closure(args...) borrows closure before evaluating args..., so that args... itself is not allowed to refer to closure. Is it really necessary to borrow closure so early? Can't we give the borrow a scope that starts after the arguments have been evaluated?

Using: rustc 1.2.0-nightly (d6c8028 2015-06-09)
Issue 1:
For example,

--- PASS: TestConnectionlessWriteTooLongError (0.00 seconds)
write_test.go:89: 65536 bytes write udp4: message too long
write_test.go:110: 65536 bytes write udp4: message too long
write_test.go:89: 65536 bytes write udp6: message too long
write_test.go:110: 65536 bytes write udp6: message too long
write_test.go:89: 1048576 bytes write unixgram: message too long
write_test.go:110: 1048576 bytes write unixgram: message too long

instead of

--- PASS: TestConnectionlessWriteTooLongError (0.00 seconds)
write_test.go:89: 65536 bytes write udp4 127.0.0.1:33494: message too long
write_test.go:110: 65536 bytes write udp4 127.0.0.1:33494: message too long
write_test.go:89: 65536 bytes write udp6 [::1]:42353: message too long
write_test.go:110: 65536 bytes write udp6 [::1]:42353: message too long
write_test.go:89: 1048576 bytes write unixgram /tmp/nettest925274809:: message too long
write_test.go:110: 1048576 bytes write unixgram /tmp/nettest925274809:: message too long

The root cause is issue #4856.

Issue 2:
by dean.w.schulze:

1. Create a package and a test for the package in a deep directory structure (for me
this happens with 127 character path)
2. Run "go test" in that directory from the DOS prompt

What is the expected output?
Success or failure from the go test

What do you see instead?
An error from DOS indicating that the temporary directory structure is too deep.

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

Which operating system are you using?
Windows 7 Pro 64-bit

Which version are you using? (run 'go version')
go version go1.1.2 windows/amd64

Please provide any additional information below.

Here is my command line and the output:

c:\dean\courses\algorithms-stanford\design.and.analysis.of.algorithms.1\programm
ing-questions\common\code\golang\src\algoutils>go test
# _/c_/dean/courses/algorithms-stanford/design.and.analysis.of.algorithms.1/prog
ramming-questions/common/code/golang/src/algoutils
mkdir C:\Users\dean\AppData\Local\Temp\go-build651070751\_\c_\dean\courses\algor
ithms-stanford\design.and.analysis.of.algorithms.1\programming-questions\common\
code\golang\src\algoutils\_test\_\c_\dean\courses\algorithms-stanford\design.and
.analysis.of.algorithms.1: The filename or extension is too long.

The Windows API has a problem with path names longer than 255 characters, unless the
path starts with "\\?\"

http://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx#maxpath
Issue 1:
Hi,

is it possible to have a filterbox with mutiple filters whose filter options are dependant on the already selected entries?

Let's say we have the following table "sold_products":

customer | product | product_category | revenue
----------+---------+------------------+-----------
alice | teddy | toys | 20
alice | doll | toys | 10
alice | skirt | clothes | 25
bob | car | toys | 15
bob | holmes | books | 10

Then I create a Filter Box with

customer

product

product_category

I would like to achieve the following:

When I select "customer" filter = "alice" products filter just shows ["teddy", "doll", "skirt"]

When I select "product_category" filter ="toys" products filter just shows ["teddy", "doll", "car"]

When I select "cutomser" filter ="alice" AND "product_category" filter ="toys" products filter just shows ["teddy", "doll"]

Currently all values are always shown. Is there a way to achieve the behaviour described?

I know this will cause some DB stress, which is acceptable. Thanks!

Issue 2:
When you are filtering by more than one element, the values chosen in previous filters should limit the choices in subsequent drop downs

Consider the Country - State - City example....or any hierarchy of values really.

I would like to have filters applied in sequence, so that if I choose 'USA' from my country filter, I only get options relevant within USA. Then if I choose 'Ohio' from my state drop down, I would only get cities in OH from my 'City' drop down.

We can create multiple filters that apply to each other but the visual is bad...the filters take up way too much room on the screen.

I know this has been proposed before ( 5664 ) but seems like it was shelved dues to some other filtering changes coming, what happened to that?