WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
I am a beginner of pyTorch. I installed a non-cuda pyTorch on my machine, which clearly has no gpu installed, and run the simplest backward() function. But it didn't work out with the following exception:

THCudaCheck FAIL file=torch/csrc/autograd/engine.cpp line=353 error=35 : CUDA driver version is insufficient for CUDA runtime version

Traceback (most recent call last):

File "", line 1, in

File "/u/.local/lib/python2.7/site-packages/torch/autograd/variable.py", line 146, in backward

self._execution_engine.run_backward((self,), (gradient,), retain_variables)

RuntimeError: cuda runtime error (35) : CUDA driver version is insufficient for CUDA runtime version at torch/csrc/autograd/engine.cpp:353

How can I fix it? Thanks!

Issue 2:
Hi,

I did the following :

Install PyTorch in Ubuntu 16.04 via :

conda install pytorch torchvision -c soumith

http://pytorch.org/

using Anaconda2-4.3.1

Installed CUDA Linux Ubuntu 16.04 x86_64 via :

https://developer.nvidia.com/cuda-downloads

There is no CUDA GPU installed on the machine (it is Virtualbox virtual machine)

Ran autograd_tutorial.py in :

http://pytorch.org/tutorials/beginner/blitz/autograd_tutorial.html

and I got the following error (using pytorch-0.1.11-py27_2) :

Variable containing:
1 1
1 1
[torch.FloatTensor of size 2x2]

Variable containing:
3 3
3 3
[torch.FloatTensor of size 2x2]

<torch.autograd._functions.basic_ops.AddConstant object at 0x7feddc620220>
(Variable containing:
27 27
27 27
[torch.FloatTensor of size 2x2]
, Variable containing:
27
[torch.FloatTensor of size 1]
)
NVIDIA: no NVIDIA devices found
THCudaCheck FAIL file=torch/csrc/autograd/engine.cpp line=352 error=30 : unknown error
Traceback (most recent call last):
File "autograd_tutorial.py", line 81, in <module>
out.backward()
File "/home/testuser/Anaconda2-4.3.1/lib/python2.7/site-packages/torch/autograd/variable.py", line 146, in backward
self._execution_engine.run_backward((self,), (gradient,), retain_variables)
RuntimeError: cuda runtime error (30) : unknown error at torch/csrc/autograd/engine.cpp:352

How do I get around not having a CUDA GPU card? Thanks
Issue 1:
Hello All,

I am trying to load a big text file for pertaining a BERT model from scratch the size of the txt file is about 11GB and trying to load the model for pertaining is exhausting all the RAM on the system.

Is it possible to load all the data in batches and then perform training.

I am a bit new to hugging face ecosystem so I would request you all to help me around if you have any clue about this.

I am using Google Colab for the purpose.

Please share code snippets, If possible.

Cheers !

`#construct dataset

from transformers import LineByLineTextDataset

file_path="/content/drive/MyDrive/full_text_data.txt"

dataset = LineByLineTextDataset(

tokenizer=tokenizer,

file_path=file_path,

block_size=32)`

Issue 2:
System Info

MacBook Pro (13-inch, M1, 2020)

Chip Apple M1

Memory 16 GB

(Also tried with Google Colab)

Who can help?

copy of #19161

Hello All,

A bit new to HuggingFace environment.

I am trying to load a big text file for pertaining a BERT model from scratch the size of the txt file is about 11GB and trying to load the model for pertaining is exhausting all the RAM on the system.

Is it possible to load all the data in batches and then perform training.

I am a bit new to hugging face ecosystem so I would request you all to help me around if you have any clue about this.

I am using Google Colab for the purpose.

Please share code snippets, If possible.

Cheers !

`#construct dataset

from transformers import LineByLineTextDataset

file_path="/content/drive/MyDrive/full_text_data.txt"

dataset = LineByLineTextDataset(

tokenizer=tokenizer,

file_path=file_path,

block_size=32)`

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

try to load the data with a big text file

Expected behavior

The data should be read in the batches to combat OOM.
Issue 1:
Q
A

Bug report?
yes

Feature request?
no

BC Break report?
yes

RFC?
no

Symfony version
^3.4.3

I have a controller that responds with a photo, the photo is private and the user needs to be authenticated and authorized to access it. The photo is encrypted and needs to be decrypted on each request. This is why I like the browser to cache the photo.

Using the following this used to work pre 3.4.3

$response->setMaxAge(604800 /* 1 week */);
$response->setPrivate();

In #25583 this behaviour has changed that if a session is started nothing can be cached.

I do understand that if the user logs out that the photo would still be in the browser cache but that is a risk I am willing to accept in turn for the huge performance boost.

How would I go about and implement this now?

Issue 2:
Q
A

Bug report?
yes

Feature request?
no

BC Break report?
no

RFC?
no

Symfony version
3.4

This issue is a follow-up to #25902. @leofeyer, @Toflar and me re-analyzed the problem: The ResponseCacheStrategy sets the response to no-cache, must-revalidate if any of the responses is set to private. This is incorrect, as private means it should be cacheable by the browser, just not by any shared cache.

Because the Response::isCacheable method returns false if a response is private, the ResponseCacheStrategy replaces the private header with a no-cache, must-revalidate.

RFC 7234 says:

The "private" response directive indicates that the response message is intended for a single user and MUST NOT be stored by a shared cache. A private cache MAY store the response and reuse it for later requests, even if the response would normally be non-cacheable.

/cc @nicolas-grekas
Issue 1:
Hi!

Short description:

If components are loaded into parent component by router ContentChildren doesn't track them.

Here is plunker

Preconditions:

There are container component and panel component (container component queries panel component)

App has one one container component and 3 panel components:

a) panel1 present statically from the scratch

b) panel2 is showed conditionally inside "div"

c) panel3 is loaded via router outlet

STR:

Open plunker and console

There will be the log in console like '>>>>>>>> ngAfterContentInit ...' with array with one panel component of panel1

Click button to show panel2. Chages are detected and there will record like '>>>>>>>> panels changed ...' in console with array of two panels

Finally click link to load panel3 via router => panel appears in DOM, but changes are not detected and we still have two panels in "panels" property

If this is an expected behaviour of ContentChildren with dynamic component loading then maybe there is some workaround to achieve my goal?

Issue 2:
#3922 contains the sentence Both query mechanisms do not go into further into component subviews., but I would like that to be available.

I have grouped a couple of [router-link] and want to decide in a parent element if any of those links isRouteActive. However, not all those links are built directly within the component, but some are built up dynamically by separate components (after doing a HTTP request). Right now, the QueryList remains empty and doesn't have any observable changes in those cases.

Here is what I'm doing now

@Directive({
selector: '[parent-is-route-active]',
host: {'[class.router-link-active]': 'isRouteActive'}
})
export class ParentIsRouteActive implements AfterContentChecked {
public isRouteActive: boolean;

@ContentChildren(RouterLink, { descendants: true }) routerLinks: QueryList<RouterLink>;

constructor(router: Router) {
router.subscribe((x) => this.routeChanged(x));
}

public afterContentChecked() {
ObservableWrapper.subscribe(this.routerLinks.changes, (_) => {
console.log("change detected");
});
}

private routeChanged(x: string) {
var activeRoutes = this.routerLinks.filter(x=> x.isRouteActive);
this.isRouteActive = activeRoutes.length > 0;
}
}
Issue 1:
Hi,

There was a hot discussion in the Gitter chat and there is a nice post on the forum about people missing the filter feature in 2.0 and it actually being a no-go to upgrading for some. This isn't a positive direction for the community it seems.

So, I'd like to put up this suggestion to bring back filters in 2.0, because they are so loved and, I would agree, smart. Here are some of the arguments for filters (gathered from the different discussions and no guarantee for correctness):

They are easier to read in the templates

thing in things | filterBy 'foo' | orderBy 'bar' | limitBy 5

is simply easy to read. In other words, chaining filters helps make sense of what should actually be expected.

Filters are global, which is great in a templating/ view system. Currency is a simple example of a great filter that can be used everywhere, just by calling it.

Without filters, there will be a ton of boilerplate.

Filters allow noobs to learn faster and get a quick and nice winning experience with Vue.

Using a mixin for every component to include a self-made "filter" isn't really feasible.

Needless to say, there are probably strong arguments for removing filter from an engineering perspective and why I would suggest this thread be a pros and cons and voting for or against the return of filters.

Scott

Issue 2:
Version

2.5.17

Reproduction link

https://jsfiddle.net/4n9jcgxL/

Steps to reproduce

Change the text in the "normal" input. value bindings update as expected.

Change the text in the "component" input. value bindings still update as expected.

Change the text in the "normal" input again. The "component" input does not update. However, its value="..." attribute appears to be correct.

What is expected?

The <component is="input" :value="value"> should update when value changes.

What is actually happening?

It looks like after editing a <component is="input"> the value property and the value attribute get out of sync, which stops the UI from updating.

(My use case actually looks something like <component :is="multiline ? 'textarea' : 'input'"></component>, for what it's worth.)
Issue 1:
Comment placement not preserved in the following:

source

// no args
function foo(/* some comment */) {
}

6to5 v2.12.0

"use strict";

function foo() {}
/* some comment */

This works though:

// have args
function foo( arg /* some comment */) {
}
function foo( /* some comment */ arg) {
}

Issue 2:
The following example gulpfile runs at ~5.5 seconds on my machine when processing an empty file.

var gulp = require('gulp');
var babel = require('gulp-babel');

var ENTRY_FILE = './test.js';
var BUILD_PATH = './build';

var build = function() {
return gulp.src(ENTRY_FILE)
.pipe(babel({ presets: ['es2015']}))
.pipe(gulp.dest(BUILD_PATH));
};

gulp.task('build', build);

gulp.task('default', ['build']);

Package versions:

gulp@3.9.0

gulp-babel@6.1.0

babel-preset-es2015@6.1.18

Is this a known issue, or is it just a problem with my environment/machine?
Issue 1:
Here is an issue that I came across with Count Vectorizer and its use with Column Transformer and Pipelines

https://stackoverflow.com/questions/54541490/sklearn-text-and-numeric-features-with-columntransformer-has-value-error/57970935#57970935

I found a work around using by removing the column name to be processed directly instead of just a list.

This may be the way that it is intended to function, but if not, a simple bug fix would be just to add a simple line of code to change the list of column names to the content of the list if the length of the list is one.

Description

Steps/Code to Reproduce

Expected Results

Actual Results

Versions

Issue 2:
Describe the workflow you want to enable

Let's take a probability-based regression model like sklearn.linear_model.LogisticRegression.

We have two methods to get the predictions:

predict_proba() outputs a probability for each class

predict() outputs a class (the one with the most important probability)

I would like to activate the threshold specification scenario so the user can decide the threshold. This scenario is of course not the default one when using LogisticRegression, but may be useful for anomaly/opportunity detection.

Real life example:

A user created a LogisticRegression model in order to detect trading opportunities that highly lead to benefits.

There are two possible class: 1 for "opportunity", 0 for "no opportunity".

The user would like to get only best probabilities predictions (> 90%) to create a position on the market.

Describe your proposed solution

My proposed solution is to add an optionnal parameter threshold (default: 1/NB_CLASSES) to the predict() method.

We could also edit other probability regression models if needed.

Additional context

I would like to work on this feature if possible.

I know this is possible to do this kind of things as a post-processing step on the user side.

However, if we provide a predict() method that choose a class, I think we should provide a way to define the threshold to the user.
Issue 1:
As far as I understand, for the time being STFT isn't natively supported by ONNX

STFT can be exported as a Conv1d op with precomputed (windowed) Fourier basis: https://github.com/NVIDIA/mellotron/blob/master/stft.py

This is useful for tracking/exporting speech recongition models.

I've done a pure PyTorch version in https://github.com/vadimkantorov/convasr/blob/master/models.py#L315-L334 and it seems to work

cc @houseroad @spandantiwari @lara-hdr @BowenBao @neginraoof

Issue 2:
how can i put “torch.stft“ and” torch.istft” function into onnx？

cc @BowenBao @neginraoof
Issue 1:
Using the type ahead, I had a client asking me why sometimes the drop-down list did not select their choice and after testing we found out why. If you look at the online example of the type ahead and bring up some items in the list and then click, and hold down the mouse button over an option, the list clears and the original text box has your query in it but not the clicked answer.

Tracing, I can see that a long mouse click is being handled in typeaheads "blur" function, not click. This user has physical issues requiring this mouse that does these long (1-1.5sec) clicks when selecting an item.

Any way to resolve this or is this simply an aspect of the browser? It happens in chrome/ff.

Issue 2:
If you reload a url with a #currentPage anchor, or come from a differentPage#scrollSpyPage, it misses the correct active scrollspy nav by the height distance the #currentPage element is at. For example, if you follow this link to the Scrollspy documentation:

http://twitter.github.com/bootstrap/javascript.html#scrollspy

and scroll down, the issue should be pretty clear... Tested this behavior on Chrome (v23 win and mac), Safari (5.1.7), and IE (9.0.8). It seemed to work correctly in Firefox (17), although it weirdly breaks the same way in Firefox (17) in some code I'm writing, but then I updated to Firefox 18 and it broke as well.
Issue 1:
Original ticket http://projects.scipy.org/scipy/ticket/567 on 2007-12-18 by trac user cems, assigned to unknown.

Reproducible bug.

version 0.5.2.1-2 from fink

running in ipython, mac ppc G4, 10.4.11

description: at many special input values stats.norm.cdf() returns a nan.

Example:

In [308]: stats.norm.cdf(-1.7624320981)

Out[308]: array(0.03899815972020125)

In [309]: stats.norm.cdf(-1.7624320982)

Out[309]: array(nan)

In [310]: stats.norm.cdf(-1.7624320983)

Out[310]: array(nan)

In [311]: stats.norm.cdf(-1.7624320984)

Out[311]: array(0.038998159694008439)

Issue 2:
Original ticket http://projects.scipy.org/scipy/ticket/540 on 2007-11-17 by trac user emv, assigned to unknown.

Very strange: norm.cdf returns nan for no particular reason, and with no visible pattern. Some particular combinations of parameters cause this to happen. These combinations are also rare. Example:

In [3]: x, l, s = (1.38629436112, 0.950273420309, 0.204423758009)

In [4]: from scipy.stats.distributions import *

In [5]: norm.cdf(x, loc=l, scale=s)

Out[5]: array(nan)

BUT changing the values even slightly causes the problem to disappear.

In [6]: norm.cdf(x, loc=l, scale=s-.01)

Out[6]: array(0.98753972245290123)

In [7]: norm.cdf(x, loc=l, scale=s+.01)

Out[7]: array(0.97899668351739855)

In [10]: norm.cdf(x-.5, loc=l, scale=s)

Out[10]: array(0.3771506947259281)
Issue 1:
Challenge Waypoint: Make Dead Links using the Hash Symbol has an issue.

User Agent is: Mozilla/5.0 (Windows NT 5.1; rv:30.0) Gecko/20100101 Firefox/30.0.

Please describe how to reproduce this issue, and include links to screenshots if possible.

My code:

<link href=# rel="stylesheet" type="text/css">
<style>
.red-text {
color: red;
}

h2 {
font-family: Lobster, Monospace;
}

p {
font-size: 16px;
font-family: Monospace;
}

.thick-green-border {
border-color: green;
border-width: 10px;
border-style: solid;
border-radius: 50%;
}

.smaller-image {
width: 100px;
}
</style>

<h2 class="red-text">CatPhotoApp</h2>

<p>Click here for <a href="http://www.freecatphotoapp.com">cat photos</a>.</p>

<img class="smaller-image thick-green-border" src="https://bit.ly/fcc-relaxing-cat">

<p class="red-text">Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>
<p class="red-text">Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>

Issue 2:
Challenge Waypoint: Link to External Pages with Anchor Elements has an issue.

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.86 Safari/537.36.

Please describe how to reproduce this issue, and include links to screenshots if possible.

To reproduce this bug on this waypoint, do the following:

Copy code below and paste in workspace.

Result: Code is populated in workspace.

Hover over the newly created anchor link "cat photos" on the right side of page (inside the fake iPhone screen).

Result: cursor changes in order to show a link.

Click the "cat photos" anchor text.

Result: After clicking the link, nothing happens.

Click the green "Run Tests" button.

Result: The list of tests will disappear and the page seemingly does nothing. No matter how many times you click the "Run Tests" button you cannot proceed.

Workaround: Refresh the page (your tests will be validated), and then click "Run Tests" to continue.

My code:

<link href="http://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">
<style>
.red-text {
color: red;
}

h2 {
font-family: Lobster, Monospace;
}

p {
font-size: 16px;
font-family: Monospace;
}

.thick-green-border {
border-color: green;
border-width: 10px;
border-style: solid;
border-radius: 50%;
}

.smaller-image {
width: 100px;
}
</style>

<h2 class="red-text">CatPhotoApp</h2>

<img class="smaller-image thick-green-border" src="https://bit.ly/fcc-relaxing-cat">

<p class="red-text">Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>
<p class="red-text">Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>
We love free <a href="http://freecatphotoapp.com"> cat photos</a>.
Issue 1:
Only one legend entry is rendered for items with the same label and color

In Matplotlib 2.1.1, items that have the same label and color result in a single legend entry. This happens even if some other properties of the items are different (eg. marker or linewidth).

This behaviour is surprising because the style of the first item is used for the handle, regardless of the style of the following items.

I would expect either the behaviour from Matplotlib 2.1.0, or the labels being merged only if the label and all style properties are equal.

Code for reproduction

import matplotlib as mpl
mpl.use('Agg')
import matplotlib.pyplot as plt
plt.plot([0, 1], [0, 1], label='foo', color='k', marker='o', linewidth=1)
plt.plot([0, 1], [1, 2], label='foo', color='k', marker='.', linewidth=2)
plt.plot([0, 1], [2, 3], label='bar', color='k', marker='s', linewidth=3)
plt.legend()
plt.savefig('foobar.png')

Actual outcome (Matplotlib 2.1.1)

Expected outcome (Matplotlib 2.1.0)

Matplotlib version

Operating system: Arch Linux

Matplotlib version: 2.1.1

Matplotlib backend: agg

Python version: 3.6.3

Matplotlib installed from Arch Linux repository community/python-matplotlib.

Issue 2:
When using %matplotlib notebook with the procedural interface, figures are not closed when the red 'x' button is pressed (the figure becomes static, but the figure object is not closed).

After closing the figure by clicking on the red 'x' button, no other plot is displayed until close() is called. Is this a deliberate choice? I think it may be confusing for newbies.

DISCLAIMER: I know that the OO interface is preferred. However, the procedural interface has its use-case for a first-time users (plus allows saving some typing).
Issue 1:
Description:

There are two examples for "tflite image classification on android" on the Tensorflow repo which achieve the same thing. They both have almost identical code but slight differences(In UI and in code).

Example A: https://github.com/tensorflow/examples/tree/master/lite/examples/image_classification/android

Example B: https://github.com/tensorflow/tensorflow/tree/master/tensorflow/lite/java

I would like to know which one is supposed to be used, and whether they can be merged so that this confusion is avoided?

Example of a difference:

In example A we do not create a NNAPI Delegate

https://github.com/tensorflow/examples/blob/156a12782a06f085adeb6b352c2763648cece066/lite/examples/image_classification/android/app/src/main/java/org/tensorflow/lite/examples/classification/tflite/Classifier.java#L179

But in example B we do create an NNAPI Delegate

tensorflow/tensorflow/lite/java/demo/app/src/main/java/com/example/android/tflitecamerademo/ImageClassifier.java

Line 186
in
e8ad5b0

nnapiDelegate = new NnApiDelegate();

Issue 2:
zero_debias for moving average was introduced recently on master branches. (tensorflow/tensorflow/python/training/moving_averages.py)

Variables in func “_zero_debias” is created by "variable_scope.get_variable", while slot_creator creates moving variable with "variables.Variable". This causes some problem when outer scope set “reuse=True”, if we only want to reuse variables of the network but not the moving averages.

At least, the new feature introduces inconsistency on how to maintain moving variables.
Issue 1:
In Glide , I am want to download image from url, and save it to SDCard. Then, I can use this image next time .How can I do this ?

Issue 2:
There are some changes in 3.8.0 which are not yet available in 4.0.

This ticket is here to remind that 3.8.0 milestone need to revised for commits that should be forward ported into the new version, see also commits: v3.7.0..v3.8.0.

If anyone wants to do it, it's up for grabs!