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

PyTorch programs that use autograd crash on exit with Python 3.9.0a6. The underlying cause is the same as #38228, but changes to the implementation of PyEval_RestoreThread means this happens much more frequently in Python 3.9.0a6 than with previous Python versions.

In previous Python releases, threads that called PyEval_RestoreThread after the interpreter shutdown would deadlock. Now they call pthread_exit(0), which triggers the issue in #38228.

The implementation of PyEval_RestoreThread has changed between alpha releases of 3.9.0 and may change in the future, so we might not want to rush any fixes.

The crash happens on exit with a message like:

terminate called without an active exception
Aborted

Example:

import torch
torch.set_num_threads(1) # optional
x = torch.randn(10, requires_grad=True)
x.sum().backward()

Tested on PyTorch master (324dc16) and Python 3.9.0a6.

cc @ezyang @gchanan @zou3519 @bdhirsh @jbschlosser @albanD @gqchen @pearu @nikitaved @soulitzer @ssnl

Issue 2:
🐛 Bug

A simple code segfaults in nightly builds with python 3.9 but works with python 3.8

To Reproduce

Content of Dockerfile:

FROM python:3.9-slim-buster
# works with 3.8
USER root
WORKDIR /root
RUN apt-get update && apt-get install git build-essential --yes
RUN python3 -m pip install --upgrade pip
RUN python3 -m pip install --pre torch==1.8.0.dev20210102+cpu -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html
RUN python3 -m pip install Pillow
RUN git clone https://github.com/pytorch/vision/
ENV PYTHONPATH=./vision
COPY test-backbone.py /
RUN python /test-backbone.py

Content of test-backbone.py:

from torchvision.models import resnet50
import torch

if __name__ == "__main__":
backbone = resnet50(pretrained=True)

img = torch.randn((2, 3, 256, 288))
features = backbone(img)
loss = features.sum()
loss.backward()
print("exiting")

Run docker build -t py39:v0 .

Logs:

Step 11/11 : RUN python /test-backbone.py
---> Running in 31a88ed05b3d
Downloading: "https://download.pytorch.org/models/resnet50-19c8e357.pth" to /root/.cache/torch/hub/checkpoints/resnet50-19c8e357.pth
100.0%
exiting
Segmentation fault (core dumped)
The command '/bin/sh -c python /test-backbone.py' returned a non-zero code: 139

cc @ezyang @gchanan @zou3519 @bdhirsh @jbschlosser
Issue 1:
I am not sure if it's a bug or I am doing something wrong (prob the latter).

I am trying to manually instantiate a component named TodoService.

everything is great on the first 2 steps

var myProvider = new Provider(TodosService, {
useFactory: (todoAction, http, todoStatsModel, appStore) => {
return new todoAction(TodoAction, http, todoStatsModel, appStore)
},
deps: [TodoAction, Http, TodoStatsModel, AppStore]
});
var injector = Injector.resolveAndCreate([myProvider]);

but blows up when I try to get it so I can use it

var myTodoService = injector.get(TodosService)

am I doing something wrong (possible on the get)?

tx

Sean.

Issue 2:
In the task 'modules/build.dart/pubspec' we do copy the pubspec to the build folder and launch pub get when the pubspec is modified.

It might happen that a pubspec depends on a pubspec that has not been copied yet, see https://travis-ci.org/angular/angular/builds/39469889#L227. Here, benchmark depends on facade but the pubspec of facade is not yet copied in the build folder which make the build fail.
Issue 1:
Description

Host the helm chart in /chart directory on artifacthub or any helm registry.

Use case / motivation

I want to be able to install this helm chart from a helm repository instead of having to maintain a private repo that I manually sync with the upstream.

Are you willing to submit a PR?

I can create a PR to generate a helm chart repo using Github Pages, but this is not ideal for something as mature as Airflow.

Issue 2:
Description

@mik-laj Hi 👋 I was just coming to this repo to see if you're interested in help getting the Helm chart repo set up to replace the chart in stable.

Stable repo is nearing the end of it's deprecation period, and I'm glad to see a version of the Airflow chart is already here. See https://github.com/helm/charts/issues/21103 for the meta issue tracking moving all the stable repo charts to new homes.

To-do

Decide on hosting options below (self-host/leverage Bitnami)

If self-host, set up CI/CD for chart-testing and chart-releasing

if self-host, list in Helm Hub (http://hub.helm.sh/) and Artifact Hub (https://artifacthub.io/)

Use case / motivation

Set up Helm repo hosting for your chart

Set up a Helm repo, either as a separate git repo in your org, or keeping the same setup you have now. We have created Helm chart repo actions for chart testing (CI) and releasing chart packages as your own GitHub-hosted Helm repo (CD).

Self-hosted options:

If we either move the chart to a separate git repo in the artifacthub gh org, or even move the hub github pages setting to a branch other than the main one, we can use the @helm/chart-releaser-action GitHub Action to automate the helm repo.

If we keep structure as-is, we can still use the helm/chart-releaser project, just with a custom script.

For either option we can also use the @helm/chart-testing-action to wrap the chart-testing project @mattfarina mentioned above. Here's an demo repo to see how they work together: https://github.com/helm/charts-repo-actions-demo

Whichever option you decide I'm make a PR if it helps.

If you do decide to host your own Helm repo, you will also want to list it in

Alternatively leverage existing Bitnami Helm repo

There is also a version of the chart maintained by Bitnami, who have been very involved in the stable repo for years, but : https://github.com/bitnami/charts/tree/master/bitnami/airflow. You could instead decide to leverage that chart as the canonical source, and not host your own. It is also fine to have multiple instances of a chart to install the same app.

Related Issues

https://github.com/helm/charts/issues/21103

#10486

#10379
Issue 1:
Challenge http://beta.freecodecamp.com/challenges/bonfire-sorted-union has an issue. Please describe how to reproduce it, and include links to screenshots if possible.

After solving Sorted Union, I clicked the option to go to the next challenge from the green success pop-up. This error was displayed.

Issue 2:
It won't go to the next excercise after you done It right. It gives You a 404: We couldn't find a challenge with the name undefined Please double check the name.message
Issue 1:
The following:

`${foo}`

transpiles to:

"" + foo;

However, concatenating to an empty string actually calls valueOf, not toString, and as such is not correct. See the following JS:

var x = { toString: function () { return NaN; }, valueOf: function () { return Infinity; }};
[x.toString(), x + '', String(x)]
/* note that only the third item is both a string, and the toString value */

It should transpile to:

String(foo)

Issue 2:
Say I have the object,

let x = {
toString() { return 'String' },
valueOf() { return 4; }
};
`${x}`;

Expected result:

'String'

Actual result:

'4'

We should be calling String(x) for all the variables.
Issue 1:
I tried to load RAG according to the documentation.

retriever = RagRetriever.from_pretrained("facebook/rag-token-base", index_name="exact", use_dummy_dataset=True)

The above line gave the following error.

/python3.6/site-packages/transformers/retrieval_rag.py", line 220, in init

self.dataset = load_dataset(

NameError: name 'load_dataset' is not defined

Issue 2:
Environment info

transformers version: 3.3.1

Platform: Linux-4.19.112+-x86_64-with-Ubuntu-18.04-bionic

Python version: 3.6.9

PyTorch version (GPU?): 1.6.0+cu101 (True)

Tensorflow version (GPU?): 2.3.0 (True)

Using GPU in script?: Yes

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

Who can help

@julien-c @VictorSanh

Information

Model I am using RAG

The problem arises when using:

the official example scripts: (give details below)

To reproduce

Steps to reproduce the behavior:

Open a new colab notebook

!pip install transformers

execute the RAG model example code

tokenizer = RagTokenizer.from_pretrained("facebook/rag-token-nq")
retriever = RagRetriever.from_pretrained("facebook/rag-token-nq", index_name="exact", use_dummy_dataset=True)
model = RagTokenForGeneration.from_pretrained("facebook/rag-token-nq", retriever=retriever)

input_dict = tokenizer.prepare_seq2seq_batch("who holds the record in 100m freestyle", return_tensors="pt")

generated = model.generate(input_ids=input_dict["input_ids"])
print(tokenizer.batch_decode(generated, skip_special_tokens=True)[0])

error traceback

NameError Traceback (most recent call last)

<ipython-input-5-fcc46db034ee> in <module>()
2
3 tokenizer = RagTokenizer.from_pretrained("facebook/rag-token-nq")
----> 4 retriever = RagRetriever.from_pretrained("facebook/rag-token-nq", index_name="exact", use_dummy_dataset=True)
5 model = RagTokenForGeneration.from_pretrained("facebook/rag-token-nq", retriever=retriever)
6

2 frames

/usr/local/lib/python3.6/dist-packages/transformers/retrieval_rag.py in __init__(self, dataset_name, dataset_split, index_name, vector_size, index_path, use_dummy_dataset)
218
219 logger.info("Loading passages from {}".format(self.dataset_name))
--> 220 self.dataset = load_dataset(
221 self.dataset_name, with_index=False, split=self.dataset_split, dummy=self.use_dummy_dataset
222 )

NameError: name 'load_dataset' is not defined

Expected behavior

I would expect the model card example to be output:

should give michael phelps => sounds reasonable

or something to this effect.
Issue 1:
I just found window's size will be wrong when setup use-content-size with x and y together.

When I write:

var mainWindow = new BrowserWindow( {
title: "Fireball-x",
width: 800,
height: 600,
'use-content-size': true,
// x: 10,
// y: 10,
} );

Things are correct, the page-content size will be 600 height and window size will be a little larger than it. But once I put x, y in the options above, use-content-size will loose its effect.

I guess this is a bug in atom-shell. I test this in v0.22.2, in Mac OSX. I haven't test this in Windows yet.

Issue 2:
Not critical since one can set 'show: false' in the constructor and set the position later on before showing the BrowserWindow, but a bug nonetheless.
Issue 1:
When trying to spawn several thousand tasks on OS X 10.9.4 I get this error (duplicate a few dozen times at once):

task '<unnamed>' failed at 'could not initialize task_rng: couldn't open file (Too many open files; path=/dev/urandom; mode=open; access=read)', /opt/local/var/macports/build/_opt_mports_dports_lang_rust/rust/work/rust/src/libstd/rand/mod.rs:342

Reproducible for me with this code:

fn process_errors() {
let path = "file.log";
let mut file = BufferedReader::new(File::open(&Path::new(path)));
let lines: Vec<String> = file.lines().map(|x| x.unwrap()).collect();
let len = lines.len();
let sharedLines = Arc::new(lines);
let (tx, rx) = channel();

for i in range(0, len) {
let share = sharedLines.clone();
let tx = tx.clone();

spawn(proc() {
let s = (*share)[i].as_slice();
let decoded: ErrorJson = json::decode(s).ok().expect(format!("failed to parse line {}", s).as_slice());
let re = regex!(r"needed string (.+) other string");
for caps in re.captures_iter(decoded.message.as_slice()) {
tx.send(caps.at(1).to_string());
return;
}

tx.send("".to_string());
});
}
}

file.log contains a few thousand lines of "\n"-separated JSON objects.

Output of rustc --version:

rustc 0.12.0-pre (5fb2dfaa2 2014-08-25 12:10:56 +0000)

Issue 2:
This is an unnecessary corner of the language, the only remaining use of the check keyword. I know I have misexplained the difference between alt and alt check before.

alt check is a bit of an anti-pattern because it:

Indicates that enums aren't factored correctly. With case classes we should have more control to prevent this kind of problem.

Encourages non-exhaustive matches which are only discovered at runtime.

Doesn't provide any documentation about why other cases don't matter.

Which is clearer?

alt check foo {
bar => baz
}

alt foo {
bar => baz,
_ => fail "this shouldn't happen because ..."
}

The first requires explaination. The second says exactly what the fallthrough behavior is, occurs syntactically where the fallthrough behavior occurs, and is more natural to write (once you've written all the cases you intend to cover you then write the fallthrough case instead of going back to the top of the structure and changing it).
Issue 1:
I have following structure

└───src
├───external
│ └───lib
└───App
├───Class

src/external/lib/ contains 2 files, lib.js and lib.d.ts.

In src/App/Class/Class.ts I am importing ../../external/lib/lib and it works fine, but generates following structure:

└───dist
└───App
├───Class

With JS files in dist/App/Class. My config is:

{
"compilerOptions": {
"module": "commonjs",
"sourceMap": false,
"target": "ES5",
"noImplicitAny": true,
"outDir": "./dist",
"rootDir": "./src"
},
"files": [
"src/main.ts"
]
}

So I thought what rootDir property should solve this problem and transfer entire structure to dist folder. Am I doing something wrong?

Issue 2:
Copied from CodePlex#1369

The current ES6 and TypeScript syntax for classes makes it difficult to perform any meaningful modifications to a function that is a member of a class without extreme effort. Libraries such as ember.js added additional properties to the Function prototype to augment the function with additional capabilities, but this is not feasible in the class syntax.

Something like Python decorators provide a possible mechanism to solve this problem. As per PEP-318, decorators allow you to define a function that can be applied to another function in place. For example, a naïve logging decorator might look like this:

// decorator
function log(fn: Function, metadata: DecoratorMetadata) {
return function(...args: any[]) {
console.log(metadata.name);
return fn.apply(this, args);
}
}

class A {
// decorator application
@log foo() {
}
}

// execution
var a = new A();
a.foo(); // LOG: foo

This provides a capability that allows for very expressive development against the class syntax that is far beyond C#-style attributes and allows for a number of uses including (but not limited to): logging, binding, composition, testing, control over ES5 property descriptors, AOP-like join-points, etc.

In addition to the general syntax borrowed from Python, a TypeScript decorator would accept an additional piece of metadata in the form of a DecoratorMetadata object, which contains contextual information about the target that is being decorated (such as a function, class, method, getter, setter, or even fields and parameters).
Issue 1:
http://play.golang.org/p/kSqOMI9a_6

Expected output:

prog.go:4: s declared and not used

But the compiler is silent.

This is an implementation restriction, and a compiler may be free to restrict or not.
That said, given the specification of the restriction, this is not consistent with the
usage checks that gc already does.

We may not be able to fix this since it may invalidate code that is now compiling.

Issue 2:
by vincent@callanan.ie:

This is a feature request to pre-empt a common programming bug.

It is quite easy to inadvertently use the shorthand assignment operator (:=) inside a
function to assign to a global variable. This creates a separate local variable with the
same name and, in certain scenarios, the effects of this bug can be quite subtle.

In the interests of code quality -- and given the general aversion to compiler warnings
-- perhaps explicit var declarations should be required for a local variable that shares
the same name as a global variables.
Issue 1:
Bug report

Bug summary

Code that used to work flawlessly for replacing tick locations and labels on a log axis now seems to merely add to the default labels, so both now appear in the plot.

Code for reproduction

from matplotlib import pyplot as plt

# set the axis limits
xmin = -100 # min temperature to plot
xmax = 40 # max temperature
ymin = 100 # min pressure
ymax = 1000 # max pressure
plt.axis([xmin, xmax, ymax, ymin])

plt.semilogy()

# make lists of tick values and tick labels
plist = range(ymin,ymax,100)
plabels = []
for p in plist:
plabels.append(str(p))

plt.yticks(plist,plabels)

x = [xmin, xmax]
y = [ymin, ymax]
plt.plot(x, y)
plt.show()

Actual outcome

# If applicable, paste the console output here
#
#

Expected outcome

There should be no overwriting of custom labels with the default scientific notation labels. It did work correctly about a year ago, but I cannot say what version of Matplotlib was being used at that time.

Matplotlib version

Operating System: Mac osx-64

Matplotlib Version: 2.0.2

Python Version: 2.7.12

Jupyter Version (if applicable): 4.3.0

Other Libraries:

conda install matplotlib

Issue 2:
Bug report

When setting a scatter plot's y axis to log-scale in matplotlib 2.0.0, it is data dependent as to whether y tick labels can be removed or not.

Code for reproduction

import matplotlib as mpl
import matplotlib.pyplot as plt
import numpy as np

# create fake data
MIN, MAX = 13, 100
y = np.linspace(MIN, MAX, num=50)
x = np.arange(len(y))

# plot it
fig = plt.figure()
fig.suptitle('matplotlib %s (range %d - %d)' % (mpl.__version__, MIN, MAX))
plot = fig.add_subplot(111)
plot.scatter(x, y)
plot.set_yscale('log') # set log-scale y axis
plot.set_yticks([]) # disable y ticklabels (FIXME: silent failure on mpl 2.0.0)
plt.show()

Actual outcome

This animation illustrates driving the above code, starting with values 1-100, up to values 20-100. Note that y ticklabels are successfully removed for lower values, then the ticklabels appear for minimum y values of 13 and above.

Note that I've tried several different approaches to remove the y ticklabels, but the labels always reappear given certain input data. Even when I set my own ScalarFormatter() for custom labeling (which is my real goal), the default scientific notation labels are still rendered "on top of" my own labels.

Expected outcome

Expected outcome is that y ticklabels would never appear, regardless of the values being plotted.

Matplotlib version

matplotlib 2.0.0 (bug is not present in 1.5.3)

Mac OS X 10.9.5

python.org Python 2.7.13

all dependencies installed using pip
Issue 1:
This may only end up applying on Android, since iOS doesn't really have dropdown pickers:

https://developer.apple.com/ios/human-interface-guidelines/ui-controls/pickers/

Issue 2:
Steps to Reproduce

Have a column, fill it with some form fields, in the bottom put a textfield and after that a dropdown.

Tap on textfield comes before dropdown and then keyboard shows up, scroll below and tap on dropdown and see the menu items floating up in the air.

Expected results:

I would like to see the menu items follow their dropdown button after keyboard's gone.

Actual results:

I see dropdown menu items are floating up in the air when keyboard was closed.

[✓] Flutter (Channel stable, v1.17.5, on Mac OS X 10.15.4 19E287, locale en-TR)
• Flutter version 1.17.5 at /Users/figengungor/Documents/development/flutter
• Framework revision 8af6b2f038 (2 days ago), 2020-06-30 12:53:55 -0700
• Engine revision ee76268252
• Dart version 2.8.4

[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
• Android SDK at /Users/figengungor/Library/Android/sdk
• Platform android-29, build-tools 28.0.3
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)
• All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 11.5)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 11.5, Build version 11E608c
• CocoaPods version 1.8.4

[✓] Android Studio (version 3.6)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 45.1.1
• Dart plugin version 192.7761
• Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)

[!] Connected device
! No devices available
Issue 1:
I used material-ui@next as server side render and do all things as the documents. But my console says

Warning: Failed child context type: Invalid child context `64a55d578f856d258dc345b094a2a2b3` of type `Jss` supplied to `JssProvider`, expected instance of `Jss`.
in JssProvider (at server.js:274)

Here are the code around line 274

const jss = create(preset());
jss.options.createGenerateClassName = createGenerateClassName;

const rootComponent = (
<JssProvider registry={sheetsRegistry} jss={jss}>
<MuiThemeProvider theme={theme} sheetsManager={new Map()}>
<App context={context} store={store}>
{route.component}
</App>
</MuiThemeProvider>
</JssProvider>
);

Is there some things wrong? Thanks for help.

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

Expected Behavior

The Popover doesn't overflow the anchorEl parent window when being positioned.

Current Behavior

Popover.getPositioningStyle contains logic to position the popover relative to the anchorEl prop. It currently uses the global window object to get the innerHeight and innerWidth when calculating if the Popover is overflowing the window:

https://github.com/mui-org/material-ui/blob/c3afd7bb33fa26e465dc333449e9449a4bb9e7bd/src/Popover/Popover.js#L123-L125

The problem above is that it is referencing the global window object when performing its position calculations, instead of the parent window of the anchorEl prop. A quick fix for this could be to use Node.ownerDocument.defaultView if an anchorEl was provided, which returns the Window object.

Steps to Reproduce (for bugs)

See https://codesandbox.io/s/6lqo45vzvk. You can see that the menu is positioned correctly within the main window relative to the button, however in the popout window the menu overflows the parent window.

Context

After testing the rewrite of the Portal component following my previous issue #9207, I noticed the Popover positioning issue within the second window.

Your Environment

Tech
Version

Material-UI
1.0.0-beta.30

React
16

browser
all

etc
Issue 1:
The compiler API does compile the source code and emits a sourcemap, but the filenames in the emit map are not correct.

This example shows a basic discrepancy:

const [diag, emit] = await Deno.compile("https://deno.land/std@0.64.0/examples/welcome.ts");
console.log(Object.keys(emit));
/*
[
"https://deno.land/std@0.64.0/examples/welcome.js.map",
"https://deno.land/std@0.64.0/examples/welcome.js"
]
*/
const [diagHash, emitHash] = await Deno.compile(
"https://deno.land/std@0.64.0/examples/welcome.ts#1"
);
console.log(Object.keys(emitHash));
/*
[
"https://deno.land/std@0.64.0/examples/welcome.ts#1.js.map",
"https://deno.land/std@0.64.0/examples/welcome.ts#1.js"
]
*/

Using something with a circular dependency like https://deno.land/std@0.64.0/http/server.ts obviously renders both because the hash or search is only in the root module:

const [diag, emit] = await Deno.compile("https://deno.land/std@0.64.0/http/server.ts?abc=def");
console.log(Object.keys(emit));
/*
[
...
"https://deno.land/std@0.64.0/http/server.js.map",
"https://deno.land/std@0.64.0/http/server.js",
...
"https://deno.land/std@0.64.0/http/server.ts?abc=def.js.map",
"https://deno.land/std@0.64.0/http/server.ts?abc=def.js"
]
*/

Issue 2:
Chrome devtools

Reproduction

const response = await fetch('https://deno.land/x/dax@0.31.1/src/lib/rs_lib_bg.wasm')
const instance = WebAssembly.instantiateStreaming(response)