WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
I want to implement a transformer toolkit(a set of modules that will compose some kind of DL model with attention ).I have said a toolkit because the today's landscape of the transformer research is very diverse and I think that it will be better to have the separate modules ( attention layer , concat layer ,add& norm layer etc) and mix and match them rather to have one or two ready layer that will be very general and not good for any specific task

Issue 2:
I'm trying to use a tf op inside a Lambda layer. The goal is to basically wrap tf layers such that model.compile etc. still work. As I understood it I can just incorporate tf ops inside Lambda layers. If I do this however, serialization seems to be broken because it fails to pickle:

TypeError: can't pickle _thread.lock objects

The weird thing is that if I create a model in the main method, it seems to work fine. If I create the model inside a separate method, it fails to serialize. I'm guessing this is due to some scoping problem, but it could also be a Keras issue. A minimum example where this occurs is shown below, where I replaced a Conv2D with a tf conv2d op to demonstrate the issue.

import tensorflow as tf

from keras.models import Model
from keras.layers import Input, Lambda

def weight_variable(shape):
initial = tf.truncated_normal(shape, stddev=0.1)
return tf.Variable(initial)

def conv2d(x, W):
return tf.nn.conv2d(x, W, strides=[1, 1, 1, 1], padding='SAME')

def create_model(num_classes):
inputs = Input(shape=(28, 28, 1))
W_conv1 = weight_variable([3, 3, 1, 32])
x = Lambda(lambda x: conv2d(x, W_conv1))(inputs)
model = Model(inputs=inputs, outputs=x)
return model

if __name__=='__main__':
inputs = Input(shape=(28, 28, 1))
W_conv1 = weight_variable([3, 3, 1, 32])
x = Lambda(lambda x: conv2d(x, W_conv1))(inputs)

# This works
model_working = Model(inputs=inputs, outputs=x)
print(model_working.to_json())

# This gives "TypeError: can't pickle _thread.lock objects"
model_broken = create_model(10)
print(model_broken.to_json())

edit: to_json, to_yaml and save are at least broken with this code. I'm guessing its all methods that require the serialization of the network architecture that are broken with this model.
Issue 1:
On documentation page, when clicking on HEAD in sidebar, there's a 404 error.

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

Expected Behavior

Getting the HEAD Github documentation.

Current Behavior

Get a 404 error

Steps to Reproduce (for bugs)

Go on documentation website, open sidebar menu, and try to change version. All versions are working except HEAD (which should be 0.20.0).

Context

No need

Your Environment

No need

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

Thanks for the awesome library guys! I'm really pleased with it so far, other than the bug I've described below.

Expected Behavior

When I create an IconButton with a menu that activates on mouse click, the Menu should open on top of the IconButton because the Iconbutton has been set as the anchor element.

Current Behavior

Instead, the Menuopens in the far left corner of the page. See the screenshot below to see what I mean:

Steps to Reproduce (for bugs)

I can't include the steps to reproduce since I'm copy-pasting the code which isn't working directly from the MUI docs about menus. Below is all my relevant code though:

handleClick = event => {
this.setState({ open: true, anchorEl: event.currentTarget });
};

handleRequestClose = () => {
this.setState({ open: false });
};

render() {
return (
<div>
<IconButton
aria-label="More"
aria-owns={this.state.open ? 'simple-menu' : null}
aria-haspopup="true"
onClick={this.handleClick}
>
<Icon>more_vert</Icon>
</IconButton>
<Menu
id="simple-menu"
anchorEl={this.state.anchorEl}
open={this.state.open}
onRequestClose={this.handleRequestClose}
>
<MenuItem onClick={this.handleRequestClose}>Rename</MenuItem>
<MenuItem onClick={this.handleRequestClose}>Merge and Delete</MenuItem>
</Menu>
</div>
)
}

Note that this button is nested (a few components down) inside a Grid component so that may potentially be an issue. I did test the menu outside of the Grid component however and I still encountered this problem. Please help as soon as you can. Thanks!

My Environment

Tech
Version

Material-UI
v1.0.0-beta.8

React
15.6.1

browser
Google Chrome
Issue 1:
It works all fine but I get the exit code 3221225477every time which causes npm to display an error if ran with a npm-script.

OS: Windows 10 Version 1511

Electron: 0.35.1

Issue 2:
In VS Code when I call process.exit() from the main side I get the following trace. I have not been able to reproduce on a bare Electron 0.34.1 though. Any ideas what I could look for to nail this down?

C:\GitDevelopment\monaco> (No symbol) [0x0046D436](No symbol) [0x0036B0FF](No symbol) [0x0036AC8A]

uv_async_send [0x6403A4FD+1003]

_get_flsindex [0x63A3C01D+111]

_get_flsindex [0x63A3C001+83]

BaseThreadInitThunk [0x756E7C04+36]

RtlInitializeExceptionChain [0x7706AD1F+143]

RtlInitializeExceptionChain [0x7706ACEA+90]
Issue 1:
Xarx opened SPR-8343 and commented

What happens:

I have a field denoted by @Autowire. There is one @Primary bean candidate for the field, the other candidates are marked as @Lazy. However, even in this case, when a primary candidate is available, all lazy candidates are instantiated during the candidate lookup process.

What should happen:

When a primary candidate exists, it should be chosen without instantiation of other lazy-init candidates.

I tried to use the @Lazy annotation to mark beans that are not to be instantiated unless realy used by the application. But this doesn't work currently.

More details:

Spring's (org.springframework.beans.factory.support) DefaultListBeanFactory.doResolveDependency() internally calls findAutowireCandidates(). findAutowireCandidates() instantiates all candidate beans, but the determination whether there exists a primary candidate is done only later in doResolveDependency() - which is too late. This determination should be done earlier in findAutowireCandidates(), before the other candidates are instantiated.

Affects: 3.0.5

Issue Links:

#12992 Lazy-init beans are unnecessarily created during the candidate determination process ("duplicates")

4 votes, 4 watchers

Issue 2:
Nazin Alexander opened SPR-5254 and commented

public abstract class A {

private Object service;

public void setService(Object service) {

this.service = service;

}

public Object getService() {

return service;

}

}

public class B extends A{

@Override

public MyService getService() {

return (MyService) super.getService();

}

}

<bean id="myService" class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean" scope="singleton" lazy-init="true">

<property name="serviceUrl" value="${protocol_type}://${server_ip}:${server_port}/application/javaservice/service"/>

<property name="serviceInterface" value="com.xxx.yyy.ServiceInt"/>

<property name="httpInvokerRequestExecutor" ref="commonsHttpInvokerRequestExecutor"/>

</bean>

<!--****************************************************************************************************-->

<bean id="dao" class="org.springframework.aop.framework.ProxyFactoryBean" scope="singleton" lazy-init="true">

<property name="target">

<bean class="com.xxxyyy.zzz.B">

<property name="service" ref="myService"/>

</bean>

</property>

<property name="interceptorNames">

<list>

<value>exceptionIntercepter</value>

</list>

</property>

</bean>

</beans>

When load application error: Bean property 'service' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?

Affects: 2.5.5

Issue Links:

#7415 Dealing with covariant properties in CachedIntrospectionResults ("duplicates")
Issue 1:
Hi,

Running opencv installed via OpenVINO on Windows and it cannot read video. Tried several formats (MP4, AVI, etc), but still getting:

MFX: Unsupported extension [ WARN:0] global opencv\modules\videoio\src\cap_msmf.cpp (680) CvCapture_MSMF::initStream Failed to set mediaType (stream 0, (352x288 @ 25) MFVideoFormat_RGB32(unsupported media type)

I tried installing various codecs but I still have the issue.

Platform info:

4.3.0-14-g9a54a3273 (OpenVINO/2020.3)
releases/openvino/2020.3
9a54a3273da58e5992a7cf4bed1e30277f26dd22

General configuration for OpenCV 4.3.0-openvino-2020.3.0 =====================================
Version control: 9a54a3273da58e5992a7cf4bed1e30277f26dd22

Platform:
Host: Windows 10.0.18363 AMD64
CMake: 3.14.5
CMake generator: Visual Studio 14 2015 Win64
MSVC: 1900

Any help?

Regards,

Nedim

Issue 2:
System information (version)

OpenCV => 4.3.0

Operating System / Platform => Windows 64 Bit

Compiler => Visual Studio 2019

Detailed description

if I use mp4 which has no audio stream (audio stream was removed with ffmpeg), no problem.

I used opencv of release windows module(4.3.0).

result of code is as follows.

sample files are attached.

[ INFO:0] global C:\build\master_winpack-build-win64-vc15\opencv\modules\videoio\src\videoio_registry.cpp (187) cv::`anonymous-namespace'::VideoBackendRegistry::VideoBackendRegistry VIDEOIO: Enabled backends(7, sorted by priority): FFMPEG(1000); GSTREAMER(990); INTEL_MFX(980); MSMF(970); DSHOW(960); CV_IMAGES(950); CV_MJPEG(940)
[ WARN:0] global C:\build\master_winpack-build-win64-vc15\opencv\modules\videoio\src\cap_msmf.cpp (681) CvCapture_MSMF::initStream Failed to set mediaType (stream 0, (0x0 @ 1) MFVideoFormat_RGB32(unsupported media type)
ng
ok

Steps to reproduce

#include <stdio.h>
#include <iostream>
#include <opencv2/opencv.hpp>
int main()
{
cv::VideoCapture cap("sample-has-sound.mp4", cv::CAP_MSMF);
cv::Mat image;
if (cap.isOpened())
{
bool ret = cap.read(image);
if (ret)
{
std::cout << "ok" << std::endl;
}
else
{
std::cout << "ng" << std::endl;
}
}
cv::VideoCapture cap2("sample-no-sound.mp4", cv::CAP_MSMF);
if (cap2.isOpened())
{
bool ret = cap2.read(image);
if (ret)
{
std::cout << "ok" << std::endl;
}
else
{
std::cout << "ng" << std::endl;
}
}
}

and I modified the code "cap_msmf.cpp" to pass only video types , it fixed;

// class FormatStorage

void read(IMFSourceReader* source)
{
HRESULT hr = S_OK;
MediaID cur;
GUID majorType;
while (SUCCEEDED(hr))
{
_ComPtr<IMFMediaType> raw_type;
hr = source->GetNativeMediaType(cur.stream, cur.media, &raw_type);
if (hr == MF_E_NO_MORE_TYPES)
{
hr = S_OK;
cur.nextStream();
}
else if (SUCCEEDED(hr))
{
raw_type.Get()->GetMajorType(&majorType);
if (majorType == MFMediaType_Video) // add this condition
{
formats[cur] = MediaType(raw_type.Get());
}
cur.nextMedia();
}
}
}

samples.zip
Issue 1:
Example

In [1]: a = np.ones(10)[::2] # flat iter will use updateifcopy for non-contiguous array

In [2]: a.flags
Out[2]:
C_CONTIGUOUS : False
F_CONTIGUOUS : False
OWNDATA : False
WRITEABLE : True
ALIGNED : True
UPDATEIFCOPY : False

In [3]: a.flat.__array__().flags
Out[3]:
C_CONTIGUOUS : True
F_CONTIGUOUS : True
OWNDATA : True
WRITEABLE : True
ALIGNED : True
UPDATEIFCOPY : True

In [4]: a.flags
Out[4]:
C_CONTIGUOUS : False
F_CONTIGUOUS : False
OWNDATA : False
WRITEABLE : False
ALIGNED : True
UPDATEIFCOPY : False

Issue 2:
What's going on here?

>>> x = np.broadcast_to(1, (2,2))
>>> x.flags.writeable = True # ok, this is a little sketchy
>>> x.flags.writeable
True
>>> x.flat.__array__()
>>> x.flags.writeable
False
Issue 1:
Description

The ROC functionality reduces its workload by first extracting forward differences between scores and then discarding potential thresholds that are too close together by calling utils.isclose.fixes. The problem is that this happens without notification of the user (or any chance to intervene, setting drop_intermediate argument to False does not change anything) and, moreover, without scaling the tolerance w.r.t. to the variance of the score vector.

Steps/Code to Reproduce

This is the (slightly simplified) example given in the documentation of metrics.roc_curve

import numpy as np
from sklearn import metrics
y = np.array([False, False, True, True])
original_scores = np.array([0.1, 0.4, 0.35, 0.8])

scores = original_scores
fpr, tpr, thresholds = metrics.roc_curve(y, scores)
print fpr, tpr, thresholds, metrics.roc_auc_score(y, scores)

scores = 1e-6*original_scores
fpr, tpr, thresholds = metrics.roc_curve(y, scores)
print fpr, tpr, thresholds, metrics.roc_auc_score(y, scores)

scores = 1e-7*original_scores
fpr, tpr, thresholds = metrics.roc_curve(y, scores)
print fpr, tpr, thresholds, metrics.roc_auc_score(y, scores)

scores = 1e-8*original_scores
fpr, tpr, thresholds = metrics.roc_curve(y, scores)
print fpr, tpr, thresholds, metrics.roc_auc_score(y, scores)

Expected Results

All printed lines should yield the same output.

Versions

Windows-10-10.0.10586

('Python', '2.7.11 |Anaconda 2.5.0 (64-bit)| (default, Jan 29 2016, 14:26:21) [MSC v.1500 64 bit (AMD64)]')

('NumPy', '1.10.4')

('SciPy', '0.17.0')

('Scikit-Learn', '0.17')

Issue 2:
pred=[1e-10, 0, 0]

sol=[1, 0, 0]

metrics.roc_auc_score(sol, pred) # 0.5, wrong, 1 is correct

pred=[1, 0, 0]

sol=[1, 0, 0]

metrics.roc_auc_score(sol, pred) # 1 correct
Issue 1:
Hi,

I'm pretty new at working with bootstrap, just switched to it so sorry if this is a dumb question:

I have a button that triggers a modal dialog and I want to make that button also call a different function when it's clicked, so I decided to go with the following code:

$(function () {

$("#mycontainer").on('click.product-row.deleteproductbtn', function ( e ) {

alert('button clicked!');

})

});

Since the above code displays 3 alerts every time I click the button, I went with the following:

$(function () {

$(""#mycontainer").off('click').on('click.product-row.deleteproductbtn', function ( e ) {

var $e = $(e.target);

e.preventDefault();

alert('button clicked!');

})

});

The second bit of code gets the job done, but I keep wondering if I'm damaging the rest of the events that come with bootstrap... How would you associate a button click (already activated through bootstrap) with a custom-made function ?

Issue 2:
Is it possible to add the ability to combine multiple hidden-x and/or visible-x?

For example:

I'm creating a list of things and would like to insert a "< br/ >" in the middle that only appears on xs and sm media queries, and not be present for the md and lg media queries. Idea below

<span class="visible-sm visible-xs"><br/></span>

OR

<span class="hidden-mg hidden-lg"><br/></span>

This would mean that it would be visible only for sm and xs views.

Alternatively, I suppose another route would be to add onto the existing classes like this

<span class="hidden-md hidden-down"><br/></span>

or

<span class="hidden-md hidden-up"><br/></span>

where hidden-down would hide all media queries starting with md and down (s and xs) and hidden-up would hide all media queries starting with md and up (lg).

Just food for thought, thanks!
Issue 1:
io::Error can't implement Clone right now because it uses a trait object internally for custom errors. With #24133 adding the Sync bound, it becomes possible to put io::Error in Arc. But it would still be nice to be able to Clone it again, which could be accomplished by changing the private Box<Custom> field to Arc<Custom> instead.

Issue 2:
The Cell::as_unsafe_cell and RefCell::as_unsafe_cell methods return a reference to the underlying UnsafeCell in both cases.

It's not clear what the use cases are for these methods and whether they can be achieved in some alternative way. If you are using these methods, please leave a comment with your use case.
Issue 1:
I cannot install jaxlib on Windows PC (CPU only).

> pip install --upgrade jaxlib
Collecting jaxlib
Could not find a version that satisfies the requirement jaxlib (from versions: )
No matching distribution found for jaxlib
> pip search jaxlib
jaxlib (0.1.11) - XLA library for JAX
> python
Python 3.6.8 |Anaconda, Inc.| (default, Feb 21 2019, 18:30:04) [MSC v.1916 64 bit (AMD64)] on win32

How can I install it?

Issue 2:
I failed to build jax from source with(similar with #253, but my system is win):

Traceback (most recent call last):

File "build/build.py", line 308, in

main()

File "build/build.py", line 304, in main

[":install_xla_in_source_tree", os.getcwd()])

File "build/build.py", line 50, in shell

output = subprocess.check_output(cmd)

File "C:\Users\wangd\AppData\Local\Programs\Python\Python36\lib\subprocess.py", line 336, in check_output

**kwargs).stdout

File "C:\Users\wangd\AppData\Local\Programs\Python\Python36\lib\subprocess.py", line 418, in run

output=stdout, stderr=stderr)

subprocess.CalledProcessError: Command '['C:\bazel\bazel.EXE', 'run', '--verbose_failures=true', '--config=mkl_open_source_only', ':install_xla_in_source_tree', 'C:\Users\wangd\jax\build']' returned non-zero exit status 2.
Issue 1:
🚀 Feature request

Thanks a lot for releasing LXMERT model. In the LXMERT model code samples, the visual feature extraction code (using generalized faster-rcnn: modeling_frcnn) only in the inference step is given. However, the visual feature extraction during the training phase is not given. For this reason if we use the same code for fine-tuning, it raises NotImplementedError as the visual feature extraction during training is not implemented. Is it possible to share the visual feature extraction during training?

Issue 2:
Right now the Trainer uses IterableDatasetShard to skip examples on each node and avoid ending up with duplicate data.

This is not efficient for vision or audio tasks since we waste I/O and CPU time reading and decoding files that are not used.

We consider implementing an optimized sharding for distributed training directly in datasets. Right now a datasets.IterableDataset is already a torch.utils.data.IterableDataset that automatically takes care of distributing the necessary input shards to subprocesses in single node (since datasets 2.3.0).

The idea would be to also take into account the rank and world size to distribute the input shards. Maybe distributing the. datasets.IterableDataset across nodes should be asked explicitly by the user.

cc @sgugger WDYT ? Do you have other ideas in mind to optimize the use of datasets.IterableDataset for distributed training in pytorch ?
Issue 1:
Instead of having a toggle button that reveal the filter widget we should just move into the panel header. That would make it not take extra space and still be easily discoverable.

Issue 2:
VSCode Version: Latest alpha

OS Version: WIndows10

Steps to Reproduce:

Launch VSCode and update setting in settings.json to some random text or just "powershell" (no extension) or "cms"

Reload window to get reflection of the new setting.

Now try to launch terminal window with CTRL+` and verify app behavior.

Actual:

Most of the time Application is not responsive.

Restart app didn't solve the issue.

user is not able to modify settings as user not able to set mouse point on editor window.

In taskmanager you see VSCode is consuming lots of memory

I could see Error: write EPIPE in developer tool.

index.html?config={"pathArguments"%3A[]%2C"programStart"%3A0%2C"enablePerformance"%3Afalse%2C"verbo…:31 Error: write EPIPE

at exports._errnoException (util.js:890:11)

at ChildProcess.target._send (internal/child_process.js:634:20)

at ChildProcess.target.send (internal/child_process.js:521:19)

at Terminal. (file:///C:/Program Files (x86)/Microsoft VS Code Alpha/resources/app/out/vs/workbench/parts/terminal/electron-browser/terminalPanel.js:4:2809)

at Terminal.EventEmitter.emit (C:\Program Files (x86)\Microsoft VS Code Alpha\resources\app\node_modules\term.js\src\term.js:109:12)

at Terminal.handler (C:\Program Files (x86)\Microsoft VS Code Alpha\resources\app\node_modules\term.js\src\term.js:3493:8)

at Terminal.keyDown (C:\Program Files (x86)\Microsoft VS Code Alpha\resources\app\node_modules\term.js\src\term.js:3196:8)

at HTMLDocument. (C:\Program Files (x86)\Microsoft VS Code Alpha\resources\app\node_modules\term.js\src\term.js:594:29)
Issue 1:
If possible, provide a minimal reproducible example (We usually don't have time to read hundreds of lines of your code)

from tensorflow.examples.tutorials.mnist import input_data
mnist = input_data.read_data_sets("/tmp/data/", one_hot=True)

raises http.client.RemoteDisconnected: Remote end closed connection without response, if you don't already have the data cached. I believe this is because the underlying data SOURCE_URL is currently down.

Issue 2:
The website of Yann LeCun is down at the moment.

Therefore the MNIST-Script for downloading the files doesn't work either. (-> learn/python/learn/datasets/mnist.py won't work)

Are there any mirrors?
Issue 1:
An HPA request is submitted against namespaceA, but contains a reference to namespaceB (https://github.com/kubernetes/kubernetes/blob/master/pkg/apis/extensions/types.go#L75). The request is accepted because I have rights to create on in namespaceA, but no checking is done to see if I can scale what I'm asking.

The HPA request has a namespace, but it also duplicated a namespace field instead of using a LocalObjectReference extended with kind and subresource field. The HPA controller then blindly uses the second namespace field: https://github.com/kubernetes/kubernetes/blob/master/pkg/controller/podautoscaler/horizontal.go#L99.

This allowed someone in the dev namespace to accidentally (or intentionally) scale down resources in the production namespace.

@ncdc Can you help me find the right groups to call out?

Issue 2:
Vagrant getting started guide: kubernetes/docs/getting-started-guides/vagrant.md is an empty shell pointing to its new location on the web at http://releases.k8s.io/release-1.2/docs/getting-started-guides/vagrant.md with the source for said web page being located at kubernetes.github.io/docs/getting-started-guides/vagrant.md. However, http://releases.k8s.io/release-1.2/docs/getting-started-guides/vagrant.md has been deleted. See kubernetes/website#294. 1) Thus, the file kubernetes/docs/getting-started-guides/vagrant.md, the empty shell, is now pointing to a file that no longer exists. This file should be deleted.

There was a similar almost duplicate version of the file that was deleted that is in the devel/ tree:

https://github.com/kubernetes/kubernetes/blob/release-1.2/docs/devel/developer-guides/vagrant.md. This version of the vagrant guide as with the other documents in the devel/ tree have not been moved to the web site docs in the releases.k8s.io fork. However the file docs/devel/running-locally.md has a link in it that is pointing to the now deleted version of the vagrant guide. Not running Linux? Consider running Linux in a local virtual machine with [Vagrant](../getting-started-guides/vagrant.md), or on a cloud provider like [Google Compute Engine](../getting-started-guides/gce.md). 2) This link needs to be updated to point to the remaining version of the vagrant guide instead of pointing to the deleted version.

I have a PR that addresses these two issues: #24495