WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
I want to have 2 parallel VGG models that share an input. I can do this with:

modelA = vgg16.VGG16(include_top=True,weights='imagenet')
modelB = vgg16.VGG16(include_top=True,weights='imagenet')
y = modelB(modelA.input)
modelC = Model(inputs=modelA.input,outputs=[modelA.output,y])

The top of the plotted model looks like:

The layers in the left-hand side behave as normal and can be accessed with modelC.layers[1] through modelC.layers[22].

The right-hand side treats the entire 2nd VGG model as being compressed into one layer, accessed in modelC.layers[23]. This seems okay because this layer 23 has its own array of layers, which seem accessible as normal, e.g. modelC.layers[23].layers[2].name will give 'block1_conv2'.

... eventually, I am using the mean output of a layer to compute a gradient. This works fine with the left VGG model:

loss = K.mean(modelC.layers[2].output[:,:,:,:])

but if I try to access a layer in the right VGG model:

loss = K.mean(modelC.layers[23].layers[2].output[:,:,:,:])

I get a 'Disconnected Input' error:

File "C:\Users\Sam\Anaconda2\lib\site-packages\theano\gradient.py", line 526, in handle_disconnected
raise DisconnectedInputError(message)
DisconnectedInputError:

I don't know if this is a bug because it seems like it should work. An alternative solution would be to be able to incorporate the 2nd VGG model without it being compressed, but I cannot find a way to do that with the functional API.

Issue 2:
I run into the above warning when saving sub-classed models with model.save().

After some investigation, the error seems to occur when using sub-classed layers in combination with sub-classed models.

See the code below for a minimal example:

import tensorflow as tf

class CustomLayer(tf.keras.layers.Layer):
def __init__(self, units=2):
super(CustomLayer, self).__init__()

self.units = units

self.layer = tf.keras.layers.Dense(units)

def get_config(self):
config = super(CustomLayer, self).get_config()
config['units'] = self.units

return config

def call(self, x, **kwargs):
x = self.layer(x)
return x

class CustomModel(tf.keras.Model):
def __init__(self, hidden_units):
super(CustomModel, self).__init__()
self.hidden_units = hidden_units
self.dense_layers = [CustomLayer(u) for u in hidden_units]

def call(self, inputs):
x = inputs
for layer in self.dense_layers:
x = layer(x)
return x

def get_config(self):
return {"hidden_units": self.hidden_units}

@classmethod
def from_config(cls, config):
return cls(**config)

model = CustomModel([16, 16, 10])
print(model(tf.random.uniform((1, 5))).shape)
model.compile()
model.save("my_model", )
print('---')
loaded_model = tf.keras.models.load_model('my_model')

Or check out this gist.

My TF version is 2.8.0.
Issue 1:
While 7494 and 906 both describe behaviors that might surprise, it seems to be the ones expected.

However this really looks like a bug to me, if not, I'm really curious of an explanation:

>>> import torch
>>> a = torch.arange(20)
>>> a[1:].sub(a[:-1]) # Achieve the same thing as numpy.diff
tensor([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1])
>>> a[1:].sub_(a[:-1])
tensor([ 1, 1, 1, 1, 1, 1, 1, 1, 8, 1, 1, 1, 1, 1, 1, 1, 16, 2, 17])

Issue 2:
Sometimes an in-place division where the denominator comes from the same tensor will yield unpredictable results. For example, if you want an array that counts from 0 to 100 in each of 50 rows, but actually you want to normalize to the range [0..1], it seems natural to write:

import torch
c = torch.arange(101)[None,:].repeat(50, 1)
c /= c[:,100:]
print(c.max())

However, running this on CPU repeatedly will produce an unpredictable max, e.g., 82, 95, 87, etc, rather than the expected 1.0.

This operation appears to be reliable on numpy, and for many array shapes it also works fine in pytorch. But it fails on certain sizes, leading to oddly rare and difficult-to-find bugs.

Should c /= c[:,-1:] be reliable? If not, would it be reasonable to warn on such operations?
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 a feature request that matches the one I want to file, without success.

Electron Version

12.0.5

What operating system are you using?

Ubuntu

Operating System Version

Ubuntu 21.04 x86_64 5.11.0-16-generic

What arch are you using?

x64

Last Known Working Electron version

No response

Expected Behavior

Having a transparency background.

Actual Behavior

Black background instead.

Testcase Gist URL

No response

Additional Information

This might be a duplicate of #15947, but the issue is closed by the bot saying the version reported is not longer supported. I use the latest version, 12.0.5 and this issue still exists tho...

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: 7.1.1

Operating System: Win 10

Last Known Working Electron version: Dunno

Expected Behavior

The current detected width should be consistent.

Actual Behavior

It isn't.

To Reproduce

I don't have reproducible steps, but just fidgeting with setMinimumSize and resizing the window may work.

Screenshots

This is what I'm seeing:

You can see how the current width is lower than the current minimum width, I can resize the window to that dimension manually.

Also, crucially, when resizing the window manually the top-right corner thing that tells you the size of the window thinks that it's only 694px wide, so it seems like different parts of the app compute different dimensions for the same window.

Ps. I don't know what's about that transparent rectangle there, I think it's just Windows being Windows.
Issue 1:
Alexander Derenbach opened SPR-8873 and commented

I want to have a cache class which clears itself. Since the both annotations are not working together I have to create a special task class.

The problem is that the cache class is a proxy and then the scheduler runs into a ClassCastException.

Perhaps it is no real bug. For me it is.

It is also possible that is already a known issue without any possible solution.

Desired syntax would be something like that:

@Scheduled(fixedDelay=50000)

@CacheEvict(value = "country", allEntries=true)

public void clearCache() {

//only clear cache;

}

greets Alex

Affects: 3.1 RC1

Issue Links:

#13293 @Scheduled doesn't work with well with proxies ("duplicates")

Issue 2:
Paul Middelkoop opened SPR-8651 and commented

Tested on nightly build of August 29th 2011:

public interface MyRepository {

}

@Component

public class MyRepositoryImpl implements MyRepository {

@Scheduled(fixedDelay = 5)

public void initCache() {}

}

This works. But when I change from @Component to @Repository I get this exception:

java.lang.IllegalArgumentException: object is not an instance of declaring class

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:597)

at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:64)

at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:53)

at org.springframework.scheduling.concurrent.ReschedulingRunnable.run(ReschedulingRunnable.java:81)

at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)

at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)

at java.util.concurrent.FutureTask.run(FutureTask.java:138)

at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)

at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:206)

at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

at java.lang.Thread.run(Thread.java:662)

Adding the @Scheduled method to the interface doesn't help also.

Affects: 3.1 M2

Issue Links:

#13514 @Scheduled does not work in classes annotated with @Cacheable ("is duplicated by")

Referenced from: commits d4123d0

2 votes, 3 watchers
Issue 1:
function isOkOf<a>(anything: { isOk: a }) : a {
return anything.isOk;
}
function notOver<a>(is: (value: a) => boolean) : (value: a) => boolean {
return function not(value: a) : boolean {
return !is(value);
};
}
interface A {
isOk: boolean;
}
var values : A[] = [{ isOk: true }];

values.map(notOver(isOkOf)); // <-- expected: compilation error, actual: `a` inferred to {} without a warning

Issue 2:
Motivating example (one of many):

function compare<T>(lhs: T, rhs: T): boolean {
return lhs === rhs;
}

if(compare('1', 1)) { // Expected: Error -- I made 'compare' generic for a reason!
/* ... */
}

Proposal

When generic type inference performs its Best Common Type operation (4.12.2), it should be an error if this returns {} when {} was not one of the input types.

This is entirely consistent with other behavior already in the compiler:

var foo = bar ? '1' : 1; // Error, no BCT between '1' and 1
function fn() { // Error, no BCT between '1' and 1
if(foo) {
return '1';
} else {
return 1;
}
}

Open Questions

From @KamyarNazeri -- should this apply when there are zero input types? e.g.:

class List<T> {
items: T[];
}

var x = new List(); // Probably want an error here

That seems desirable, but has some collateral damage:

function foo<T>(x: number, a?: T, b?: T) { }
foo(0); // Error, zero input types provided for inference

This would come up slightly more often than naively expected because many .d.ts authors (mistakenly) create generic types which don't actually consume their type parameters. Perhaps this warning would effectively discourage them from doing so?
Issue 1:
Hi,

the following example reproducibly crashes the kernel after printing the topics. I do not get any error message.

Example in question:

http://scikit-learn.org/stable/auto_examples/applications/topics_extraction_with_nmf_lda.html#example-applications-topics-extraction-with-nmf-lda-py

My input and output:

http://pastebin.com/UPEfbynB

This occurs using python 2.7.10 64bit and scikit-learn 0.17 (fully updated anaconda) running on linux.

Best regards

Matthias

Issue 2:
There is a call to exit in the topic extraction example. I didn't have time to blame but that seems odd.
Issue 1:
Description

The reflectable package does not work with flutter v0.6.0, while it does work with v0.5.1.

Minimal Example

Given the following minimal example: https://github.com/s-bauer/flutter_reflectable_minimal

Working with v0.5.1

With v0.5.1 it works like expected. I execute the tools/builder.dart script using the following command

flutter packages pub run tools/builder.dart lib/main.dart

It produces the expected main.reflectable.dart output producing the following OUTPUT

Failing with v0.6.0+

With version v0.6.0 I execute the same command, but this time it fails with the following OUTPUT.

I tested it with version v0.6.0 and 0.6.2-pre.15, maybe the bug even occurred in earlier versions of flutter. I haven't checked that!

I have no idea how to further investigate this issue. Can you please look into it and find out what is going wrong here?

Issue 2:
Running the built_value generator on flutter code currently spits out a severe error:

[SEVERE] Instance of 'PartBuilder' on dartsugar|lib/models/module_data.dart: Unable to resolve asset ID for "dart:ui"

It still works, but I wonder if 1) there is potential for things to break down the line, in which case we should make sure this doesn't happen; and 2) there's a way to do it without getting the warning. Any ideas please?

See: google/built_value.dart#282
Issue 1:
Cudnn8.0 remove function "cudnnGetConvolutionForwardAlgorithm", but OpenCV still use it. So how to resolve it?

Issue 2:
New CuDNN release introduced new libraries and headers layout and excluded some functions. See initial discussion and found issues in #17238. The PR is closed a s abandoned.

Found changes:

introduced cudnn_version.h header with version information

libcudnn is split on several libraries

cudnnGetConvolutionForwardAlgorithm function removed, but it's used in OpenCV:

opencv/modules/dnn/src/cuda4dnn/csl/cudnn/convolution.hpp

Lines 262 to 270
in
434014b

CUDA4DNN_CHECK_CUDNN(

cudnnGetConvolutionForwardAlgorithm(

handle.get(),

input.get(), filter.get(), conv.get(), output.get(),

CUDNN_CONVOLUTION_FWD_PREFER_FASTEST,

0, /* no memory limit */

&algo

)

);
Issue 1:
Environment

Windows build number: Microsoft Windows [Version 10.0.18362.239]
Windows Terminal version (if applicable): 0.2.1831.0

Steps to reproduce

Open a session to one of the WSL containers. Open midnight commander and start scrolling with the arrows and tab between panes.

Expected behavior

No additional characters appearing and disappearing. No changes to the borders.

Actual behavior

Visual artifcats that don't seem to depend on the selected font. Both screensohts use different fonts - one is Inconsolata LGC, the other is Consolas. What seem to suffer the most are the borders.

This is a screenshot from the current cmd connecting to the same container for reference:

Issue 2:
Environment

Windows build number: [Version 10.0.18362.239]
Windows Terminal version (if applicable): 0.2.1831.0

Any other software?

- WSL Ubuntu: [1804.2019.521.0]
- Midnight Commander (standard WSL Ubuntu repository).

Steps to reproduce

Install Pragmata Pro Mono Liga 0.827 font (any other Unicode font should work as well).

Install Midnight Commander under WSL Ubuntu.

$ sudo apt install mc

Run Midnight Commander.

$ TERM=xterm-256color mc -d -S modarin256-defbg

If the issue is not there, try to resize the Terminal window or make it full screen. Press CTRL-O several times.

Expected behavior

All box drawing characters rendered correctly.

Actual behavior

Various characters rendering issues (see the red marks on the picture):
Issue 1:
Environment

Win32NT 10.0.18362.0 Microsoft Windows NT 10.0.18362.0

No other software?

Steps to reproduce

Just open Windows Terminal and launch ssh command : ssh login@ipadress

Expected behavior

expected to connect to ssh on remote computer

Actual behavior

having an error 3 times :

Exception non gérée : System.IndexOutOfRangeException: L'index se trouve en dehors des limites du tableau. à askpass.Program.Main(String[] args) Permission denied, please try again.

Exception non gérée : System.IndexOutOfRangeException: L'index se trouve en dehors des limites du tableau. à askpass.Program.Main(String[] args) Permission denied, please try again.

Exception non gérée : System.IndexOutOfRangeException: L'index se trouve en dehors des limites du tableau. à askpass.Program.Main(String[] args) eolementhe@10.0.0.125: Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).

Issue 2:
Environment

Windows build number: 10.0.18363.0
Windows Terminal version: 0.6.2951.0

Steps to reproduce

Setwindow width to its minimum size.

Tabs are not visible now.

Restore window to its previous size .

Expected behavior

Actual behavior

Tabs are now only partialy visible or not visible at all.

Also terminal content is gone (when I change booth width and height), but that could be related to #3446.
Issue 1:
I'm on webgl_postprocessing_outline.html line 241 added

const parameters = {

format: THREE.RGBFormat

};

const size = renderer.getDrawingBufferSize( new THREE.Vector2() );

const renderTarget = new THREE.WebGLMultisampleRenderTarget( size.width, size.height, parameters );

composer = new EffectComposer( renderer,renderTarget );

code

It will cause problems similar to delay effect.

R134 does not have this problem

A clear and concise description of what you expected to happen.

Screenshots

If applicable, add screenshots to help explain your problem (drag and drop the image).

Platform:

Device: [Desktop, Mobile]

OS: [Windows, MacOS, Linux, Android, iOS]

Browser: [Chrome, Firefox, Safari, Edge]

Three.js version: [dev, r135]

Issue 2:
Because GLTFParser.prototype.loadTexture passes an Object URL to loader.load, the image is added to THREE.Cache with an Object URL (a random UUID string each time) as the key.

After loading the same .glb file three times, THREE.Cache.files will look like:

blob://96EC1B8D-B513-4858-A051-EDE713598B4C
blob://FCDAAA03-9C00-467C-B3FF-C230551A8C92
blob://ABDE21C5-F197-4108-B1CA-CF874BEC125A

Each time, the data is converted from an ArrayBuffer again, e.g.:

source.bufferView -> Blob -> URL.createObjectURL -> loader.load

What if the image could instead be cached with a key representing the source .glb file + a "fragment" if the image filename is known? e.g.:

path/to/scene.glb#embedded-texture-image.jpg

Then there would not be duplicate cache entries for the same image.

Demo:

https://codepen.io/audionerd/pen/bZodea

A similar issue happens with embedded data uris in GLTF files where cache key is the full data URI (e.g.: data:image/png;base64,iVBORw0KGg....). Cache works, but the key is very long.

Three.js version

Dev

r102

Browser

All of them

Chrome

Firefox

Internet Explorer

OS

All of them

Windows

macOS

Linux

Android

iOS
Issue 1:
It would be useful to be able to declare optional properties on a class, similar to how it works for interfaces. This would allow more expressive structural subtyping with plain classes:

class Name {
first: string;
middle?: string;
last: string;
}

function printName(name: Name) {
//...
}

printName({first: "First", last: "Last" });

Technically, this is already possible with the recent change to allow merging interfaces and non-ambient classes:

interface Name {
middle?: string;
}

class Name {
first: string;
last: string
}

However, it's not very DRY for this use case. Now, you might ask, why not just use an interface and not a class when dealing with plain objects with optional properties? Because interfaces are not real values, which means that they cannot be passed around or be decorated, both of which are often useful.

My motivation for requesting this comes from writing a wrapper library for Immutable.js. I'm trying to create a nice way for library users to declare data items and update them. Here's an abbreviated example of how I would like it to look:

class TodoData {
@prop text?: string;
@prop completed?: boolean;
}

class Todo extends TypedMap(TodoData) { }

// todoMap is a typed map representing a Todo
var todo = Todo.create();

// The optional properties allow a nice typed syntax for updating the map
todoMap = todoMap.set({text: "Hello"});

// The @prop decorator was used to run Object.defineProperty on each declared property
console.log(todoMap.text);

Issue 2:
I have problem of a non-DRY situation. I have View class that set a bunch of labels through a method. It must be a method because I need to give it some context.

interface Labels {
label1: string;
label2: string;
label3: string;
label4: string;
label5: string;
label6: string;
label7: string;
label8: string;
label9: string;
label10: string;
}
class FormView extends View {
label: Labels;
labels(l: (key: string) => string): Labels { // Some abstraction take the return of this and set it to 'this.label'.
return {
label1: l('hello_world_1'),
label2: l('hello_world_2'),
label3: l('hello_world_3'),
label4: l('hello_world_4'),
label5: l('hello_world_5'),
label6: l('hello_world_6'),
label7: l('hello_world_7'),
label8: l('hello_world_8'),
label9: l('hello_world_9'),
label10: l('hello_world_10'),
}
}

view() {
return <div>this.label.label1</div>;
}
}

As you can see above there is a heavy repeating of properties one as an interface and one as a returning data structure. And I need to do this on every view class. And there is a bunch of them.

Solution

Contextually type type argument.

abstract class A<T> {
label: T;
public labels(): T;
}

class B extends A {
labels() {
return {
label1: l('hello_world_1'),
label2: l('hello_world_2'),
label3: l('hello_world_3'),
label4: l('hello_world_4'),
label5: l('hello_world_5'),
label6: l('hello_world_6'),
label7: l('hello_world_7'),
label8: l('hello_world_8'),
label9: l('hello_world_9'),
label10: l('hello_world_10'),
}
}

view() {
return <div>this.label.label1</div>;
}
}

There is no repetition of label1, label2... etc above.
Issue 1:
[ * ] bug report

[ ] feature request

[ ] support request

When I try to add to many cases info [ngClass] directive appear an error:

[ngClass]="{
'COAAccount': node.data.type == 1,
'COACounter': node.data.type == 3,
'COAMirrorAccountMinus': node.data.type == 4,
'COAAccountCopy': node.data.type == 5,
'COAResult': node.data.type == 6,
'COAComment': node.data.type == 7,
'margin-left-level-0': level == 0,
'margin-left-level-1': level == 1,
'margin-left-level-2': level == 2,
'margin-left-level-3': level == 3
'margin-left-level-4': level == 4
}"

EXCEPTION: Uncaught (in promise): Error: Unsupported number of argument for pure functions: 11

Error: Unsupported number of argument for pure functions: 11

When remove last case 'margin-left-level-4': level == 4 all working fine. I assume there is some limitation for how many cases you can add into [ngClass] directive.

Issue 2:
**I'm submitting a bug.

[x ] bug report
[ ] feature request
[ ] support request

Current behavior

I wanted to repeat particular element several amount of time, so I'm using *ngFor directive with hard-coded array like [1,2,3,4,5,6,7,8,9,10] and that got worked awesome. I achieved what I wanted to do.

Code

@Component({
selector: 'my-app',
template: `<h1>My First Angular App</h1>
<div *ngFor="let item of [1,2,3,4,5,6,7,8,9,10]">
{{item}}: My Element
</div>`
})

[Demo Plunkr][1]

But as soon as I increased the array size more than 10, I start getting below error. Which is really annoying.

zone.js@0.6.25?main=browser:355 Unhandled Promise rejection:

Unsupported number of argument for pure functions: 11 ; Zone: ;

Task: Promise.then ; Value: Error: Unsupported number of argument for

pure functions: 11(…) Error: Unsupported number of argument for pure

functions: 11

Template

<div *ngFor="let item of [1,2,3,4,5,6,7,8,9,10,11]">
{{item}}
</div>`

Expected behavior

I'm curious to know why that error is happening as soon as array size increase more than 10? But another interesting thing is when I put the same array in component inside variable items= [1,2,3,4,5,6,7,8,9,10,11] and used items in *ngFor and it got worked.

Angular version: 2.0.1

Browser: all

Language: TypeScript
Issue 1:
Migrated issue, originally created by Maik Riechert (@letmaik)

mybool = Column(Boolean, nullable=False, default=False)

I use PostgreSQL which has a native boolean type. If I then also use naming convention:

"ck": "ck_%(table_name)s_%(constraint_name)s",

Then sqlalchemy complains:

sqlalchemy.exc.InvalidRequestError: Naming convention including %(constraint_name)s token requires that constraint is explicitly named.

If I define the column as

isPublic = Column(Boolean(create_constraint=False), nullable=False, default=False)

it works, so I think this is a bug in which sqlalchemy doesn't connect the fact that there is a native Boolean and no constraint exists actually.

Attachments: 3067.1.patch | 3067.patch | 3067.2.patch

Issue 2:
When performing a deepcopy on some serialized data, I found that anything that's of the type MutableList gets its elements duplicated. I'm using 1.3.2

>>> foo = MutableList(['bar'])
>>> print(foo)
['bar']
>>> print(deepcopy(foo))
['bar', 'bar']