WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
Love the library btw. This seems to be an issue with pydot from what I can tell.

from keras.utils.visualize_util import plot

AttributeError Traceback (most recent call last)

in ()

17 from PIL import Image

18 import matplotlib.pyplot as plt

---> 19 from keras.utils.visualize_util import plot

20 get_ipython().magic(u'matplotlib inline')

21

/Users/fonz/anaconda/lib/python2.7/site-packages/keras/utils/visualize_util.py in ()

5 # fall back on pydot if necessary

6 import pydot

----> 7 if not pydot.find_graphviz():

8 raise RuntimeError('Failed to import pydot. You must install pydot'

9 ' and graphviz for pydotprint to work.')

AttributeError: 'module' object has no attribute 'find_graphviz'

Issue 2:
Hello!

I am using latest tensorflow with GPU support and latest Keras.

I am trying to write parallel data augmentation using keras.utils.Sequence, but have two problems:

fit_generator creates too many workers (I have parameter workers=2, but it generates 4 additional workers);

Using Sequence is extremely slow (with generator and a lot of augmentations I spend two minutes on epoch, with multiprocessing and Sequence - more than 10 minutes.

Here is my Sequence and fit_generator:

`class ParallelDataGenerator(Sequence):

"""Generate images for training/validation/testing (parallel version)."""

def __init__(self, dname: str, start: int, stop: int, batch_size: int, augmentate: bool):
self.batch_size = batch_size
self.augmentate = augmentate
self.idxs = [i for i in range(start, stop)]
self.imgs_in = [cv2.imread(os.path.join(dname, 'in', str(i) + '_in.png'),
cv2.IMREAD_GRAYSCALE).astype(np.float32) for i in range(start, stop)]
self.imgs_gt = [cv2.imread(os.path.join(dname, 'gt', str(i) + '_in.png'),
cv2.IMREAD_GRAYSCALE).astype(np.float32) for i in range(start, stop)]
self.idxs = [i for i in range(0, stop - start)]

def __len__(self):
return int(np.ceil(float(len(self.idxs)) / float(self.batch_size)))

def on_epoch_end(self):
shuffle(self.idxs)

def __getitem__(self, idx):
print(idx, os.getpid())
start = idx * self.batch_size
stop = start + self.batch_size
if stop >= len(self.idxs):
stop = len(self.idxs)

imgs_in = []
imgs_gt = []
for i in range(start, stop):
img_in = np.copy(self.imgs_in[self.idxs[i]])
img_gt = np.copy(self.imgs_gt[self.idxs[i]])
if self.augmentate:
img_in, img_gt = random_effect_img(img_in, img_gt)
imgs_in.append(normalize_in(img_in))
imgs_gt.append(normalize_gt(img_gt))
imgs_in = np.array(imgs_in)
imgs_in.shape = (imgs_in.shape[0], imgs_in.shape[1], imgs_in.shape[2], 1)
imgs_gt = np.array(imgs_gt)
imgs_gt.shape = imgs_in.shape
return imgs_in, imgs_gt`

model.fit_generator( train_generator, steps_per_epoch=(train_stop - train_start) / args.batchsize, epochs=args.epochs, validation_data=validation_generator, validation_steps=(validation_stop - validation_start) / args.batchsize, callbacks=callbacks, use_multiprocessing=True, workers=2, max_queue_size=10 )
Issue 1:
I'm just a naive beginning Julia user, not a developer of the Julia language. When trying to update Julia packages with Julia 1.6.3 under macOS 12.0.1 (Monterey), I'm getting error:

(@v1.6) pkg> up
Updating registry at `~/.julia/registries/JuliaComputingRegistry`
┌ Error: curl_easy_setopt: 48
└ @ Downloads.Curl /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.6/Downloads/src/Curl/utils.jl:36
┌ Error: curl_easy_setopt: 48
└ @ Downloads.Curl /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.6/Downloads/src/Curl/utils.jl:36
┌ Error: curl_easy_setopt: 48
└ @ Downloads.Curl /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.6/Downloads/src/Curl/utils.jl:36
No Changes to `~/.julia/environments/v1.6/Project.toml`
No Changes to `~/.julia/environments/v1.6/Manifest.toml`

What should I do to fix this?

Issue 2:
After upgrading to macOS 12 Monterey, when I run Julia (1.7 or 1.6) and do Pkg.update(), I get the following error:

julia> Pkg.update()
Updating registry at `~/.julia/registries/General.toml`
┌ Error: curl_easy_setopt: 48
└ @ Downloads.Curl /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.7/Downloads/src/Curl/utils.jl:36
┌ Error: curl_easy_setopt: 48
└ @ Downloads.Curl /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.7/Downloads/src/Curl/utils.jl:36
┌ Error: curl_easy_setopt: 48
└ @ Downloads.Curl /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.7/Downloads/src/Curl/utils.jl:36
No Changes to `~/.julia/environments/v1.7/Project.toml`
No Changes to `~/.julia/environments/v1.7/Manifest.toml`

versioninfo():

julia> versioninfo()
Julia Version 1.7.0-rc2
Commit f23fc0d27a (2021-10-20 12:45 UTC)
Platform Info:
OS: macOS (x86_64-apple-darwin19.5.0)
CPU: Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-12.0.1 (ORCJIT, skylake)
Environment:
JULIA_NUM_THREADS = 4
Issue 1:
i find someone else have mentioned the issue previously, but the feature couldn't be realized because of Chromium, now it might be realized probably, and i find that nw.js has supported this, therefore, is my profound hope that the feature will be supported in the future~ 🙏 🙏 🙏

Issue 2:
I found it will be nice to have a dockable developer toolbar when using the webview. Here is the issue raised in browser-plus(atom package)

skandasoft/browser-plus#40
Issue 1:
Error on windows. @pv Probably need to disable test on windows until randint gets fixed for bigger integers (#6824).

======================================================================
ERROR: test_mem_overlap.test_diophantine_fuzz
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Py\lib\site-packages\nose\case.py", line 197, in runTest
self.test(*self.arg)
File "C:\Py\lib\site-packages\numpy\core\tests\test_mem_overlap.py", line 123, in test_diophantine_fuzz
b = rng.randint(-1, b_ub+2)
File "mtrand.pyx", line 951, in mtrand.RandomState.randint (numpy\random\mtrand\mtrand.c:10704)
OverflowError: Python int too large to convert to C long

Issue 2:
clearly using platform ints internally. But I think this should upcast in the case of overflow?

In [21]: np.random.randint(np.iinfo(np.int32).min,np.iinfo(np.int32).max,10)
Out[21]:
array([ -397752718, -1983241147, -920985850, -2131569981, -769723972,
-499680303, 1808795318, -636996393, -1437760815, 1771191619])

In [22]: np.random.randint(np.iinfo(np.int64).min,np.iinfo(np.int64).max,10)
---------------------------------------------------------------------------
OverflowError Traceback (most recent call last)
<ipython-input-22-3cceca91fd37> in <module>()
----> 1 np.random.randint(np.iinfo(np.int64).min,np.iinfo(np.int64).max,10)

mtrand.pyx in mtrand.RandomState.randint (numpy\random\mtrand\mtrand.c:10694)()

OverflowError: Python int too large to convert to C long

In [23]: np.__version__
Out[23]: '1.10.1'
Issue 1:
Migrated issue, originally created by Lukas Siemon (@lukas-gitl)

I have an issue with column_property and using database specific functions. It seems like the alias is not created correctly in the query.

I'm obtaining data from a model and an alias of the model. When I use "func.hex" (or any "func" function), the column alias is named "hex" (or what the function is called) for both models and this causes a collision:

InvalidRequestError: Ambiguous column name 'hex(CAST(label.id AS VARCHAR) || :param_1)' in result set! try 'use_labels' option on select statement.

However, when I cast the column_property as a string (see commented section in test case) this works as expected. Is this a bug or a limitation? What would be the best way to work around this?

The test case and generated query below. I would have expected the returned columns to be named "hex_1" and "hex_2".

SELECT
hex(CAST(label.id AS VARCHAR) || :param_1) AS hex,
hex(CAST(label_1.id AS VARCHAR) || :param_2) AS hex
FROM
label
JOIN
link
ON link.id = label.link_id
JOIN
label AS label_1
ON label_1.id = link.label_id

Test case:

import unittest
from sqlalchemy import (Column, Integer, String, func, ForeignKey, cast)
from sqlalchemy.orm import (column_property, relationship, aliased)
from flask import Flask
from flask.ext.sqlalchemy import SQLAlchemy

class TestColumnPropertyStaticName(unittest.TestCase):

def setUp(self):
app = Flask(__name__)
app.config['SQLALCHEMY_DATABASE_URI'] = ("sqlite://")
db = SQLAlchemy(app)

class Label(db.Model):
__tablename__ = 'label'
id = Column(Integer, primary_key=True)
hex = column_property(func.hex(func.cast(id, String) + 'data'))
# =============================
# ====== this would work ======
# hex = column_property(
# cast(func.hex(func.cast(id, String) + 'data'), String))
# =============================
link_id = Column(Integer, ForeignKey('link.id'))
link = relationship("Link", foreign_keys=link_id)

class Link(db.Model):
__tablename__ = 'link'
id = Column(Integer, primary_key=True)
label_id = Column(Integer, ForeignKey('label.id'))
label = relationship("Label", foreign_keys=label_id)

db.drop_all()
db.create_all()

self.Label = Label
self.Link = Link
self.db = db

def test_dynamic_bindparam(self):
# saving the mirrored linkage
label = self.Label()
link = self.Link()
label.link = link
self.db.session.add(label)
self.db.session.commit()
link.label_id = label.id
self.db.session.commit()

# generate the query
query = self.Label.query
query = query.join(self.Link, self.Link.id == self.Label.link_id)
alias = aliased(self.Label)
query = query.join(alias, alias.id == self.Link.label_id)
query = query.with_entities(self.Label.hex, alias.hex)
print query

data = query.one()
print data

Issue 2:
Migrated issue, originally created by Anonymous

A new mysql driver approaches!

I wrote oursql to be a better mysql driver for python, and now I've created this sqlalchemy layer for it. It seems to pass all of the unit tests when running against a mysql 5.1 server.

Attachments: oursql2.patch | oursql.patch
Issue 1:
Hi,

with Atom Version 0.184.0, Windows 8.1 x64, no custom keymap, only the default keybindings and all community packages disabled:

I'm not able to write an "@"-Symbol in the editor using a German keyboard and Alt-Gr + q.

Issue 2:
Original issue: atom/atom#1625

Use https://atom.io/packages/keyboard-localization until this issue gets fixed (should be in the Blink upstream).
Issue 1:
Build Error'ing on Windows

I'm facing the following build error on Windows 10.

"E:\Projects\code-dnn\pytorch\build\INSTALL.vcxproj" (default target) (1) ->
"E:\Projects\code-dnn\pytorch\build\ALL_BUILD.vcxproj" (default target) (3) ->
"E:\Projects\code-dnn\pytorch\build\caffe2\AlgorithmsTest.vcxproj" (default target) (4) ->
"E:\Projects\code-dnn\pytorch\build\caffe2\caffe2_gpu.vcxproj" (default target) (22) ->
(CustomBuild target) ->
Error : Internal Compiler error (codegen): "there was an error in verifying the lgenfe output!" [E:\Projects\code-dnn\pytorch\build\caffe2\caffe2_gpu.vcxp
roj]

13025 Warning(s)
1 Error(s)

There are no prior errors in the output of cmake.

To Reproduce

Using Visual Studio 2017, Cuda 10, in a Native Tools Command Prompt:

python setup.py build develop

Issue 2:
Bug

Internal compiler error on Windows with CUDA build.

Error: Internal Compiler Error (codegen): "there was an error in verifying the lgenfe output!"

cross_entropy_op.cu
CMake Error at caffe2_gpu_generated_cross_entropy_op.cu.obj.RelWithDebInfo.cmake:279 (message):
Error generating file
C:/Users/tolia/AppData/Local/Temp/pytorch/build/caffe2/CMakeFiles/caffe2_gpu.dir/operators/./caffe2_gpu_generated_cross_entropy_op.cu.obj

Environment

PyTorch Version (e.g., 1.0): master

OS (e.g., Linux): Win10

How you installed PyTorch (conda, pip, source): source

Build command you used (if compiling from source): cmake + VS2017 (15.9.4) + Ninja

Python version: 3.7

CUDA/cuDNN version: 10.0/7

GPU models and configuration: Kepler + Pascal (build for Kepler+Maxwell+Pascal+Volta)

Additional context

Noticed several similar reports: #12117 #14872 #13808 #11203
Issue 1:
I build some simple dashboard layout with nextjs and material ui next, but I face with strange problem that only happened in production.

The problem is regarding miss class name placement to the component wherever I click some link that navigate to the current route. I'm not quite sure if it nextjs problem or material ui problem.

live example: https://vanilla-nextjs-dashboard.herokuapp.com/

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

Expected Behavior

All style and class name placed at the right component

Current Behavior

Normal scenario the component will get this classname

<div class="c280 c281" aria-hidden="true" style="opacity: 1; transition: opacity 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;"></div>

After I click navigation to the current route (current route dashboard, I click dashboard). The class name will change to the wrong one.

<div class="c1 c2" aria-hidden="true" style="opacity: 1; transition: opacity 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;"></div>

Steps to Reproduce (for bugs)

Clone https://github.com/tenosiswono/vanilla-nextjs-dashboard

Run production

Login, Navigate to current route

Click on the notification button

Context

Your Environment

Tech
Version

next
latest

node
6.11.2

OS
heroku

browser
chorme

etc
-

Issue 2:
Bug report

Describe the bug

.babelrc.js file compilation failed with next.prepare() and custom . Working with configuration inside of package.json and .babelrc file without .js extension.

To Reproduce

Use Custom Server next.js - https://github.com/zeit/next.js/tree/canary/examples/custom-server

npm install babel-plugin-transform-define --save

create .babelrc.js with this content:

module.export = {
"presets": [
"next/babel"
],
"plugins": [
[
"transform-define",
{
"process.env.REACT_APP_SENTRY_DSN_ADDR": "TEST_URL"
}
]
]
};

Override global component by creating _app.js page inside of pages directory with basic config:

import React from 'react'
import App, { Container } from 'next/app'

export default class MyApp extends App {
static async getInitialProps({ Component, router, ctx }) {
let pageProps = {};

if (Component.getInitialProps) {
pageProps = await Component.getInitialProps(ctx)
}

return { pageProps }
}

render () {
const { Component, pageProps } = this.props;

return (
<Container>
<Component {...pageProps} />
</Container>
)
}
}

Project structure looks like:

npm run dev - shows errors with _app.js file compilation.

Expected behavior

Compile _app.js file with .babelrc.js configuration

System information

OS: Windows

"babel-plugin-transform-define": "^1.3.0",
"next": "^7.0.2",
"react": "^16.5.2",
"react-dom": "^16.5.2"

Additionally

Fun fact is everything works correctly when I change .babelrc.js file to .babelrc without js inside, with pure json. Imposibru!
Issue 1:
For .NET debugging, we currently need to have the user manually create a tasks.json in order to support build. We would like to find some solution to avoid the user needing to do this manually.

A few options:

Support simple shell commands directly inside of launch.json. So if all the user wants to do is execute a command with a default error syntax they don't need this extra file. Example:

"preLaunchCommand": "dotnet compile"

Which would execute 'dotnet compile' in the workspace directory.

-or-

Support auto-generating a tasks.json when creating launch.json. This way we can give them a good default value of it and the user doesn't need to manually enter it.

-or-

Support defining tasks in an extension's package.json. So the user only needs to create a launch.json if they want to do something weird.

Issue 2:
Invoking the command ext install repeatedly is really slow.

When you invoke the command, a little blue line scrolls horizontally to show it's doing something (fetching the extension database?), and eventually displays a list of extensions you can install. Repeatedly invoking the command should cache this work from last time, but it seems to re-fetch (or whatever it's doing) every time, which is fairly annoying when I want to install a few extensions at once.
Issue 1:
Right now the cassandra docs use a ReplicationController. I think it would be good to update the doc to mention using daemon sets as a valid way to place a single cassandra node on each of the kubernetes nodes, a more realistic deployment method.

See #15324

Issue 2:
Is this a request for help? (If yes, you should use our troubleshooting guide and community support channels, see http://kubernetes.io/docs/troubleshooting/.):

What keywords did you search in Kubernetes issues before filing this one? (If you have found any duplicates, you should instead reply there.):

Is this a BUG REPORT or FEATURE REQUEST? (choose one):

Kubernetes version (use kubectl version):

$ kubectl version
Client Version: version.Info{Major:"1", Minor:"3", GitVersion:"v1.3.6", GitCommit:"ae4550cc9c89a593bcda6678df201db1b208133b", GitTreeState:"clean", BuildDate:"2016-08-26T18:13:23Z", GoVersion:"go1.6.2", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"4", GitVersion:"v1.4.6", GitCommit:"e569a27d02001e343cb68086bc06d47804f62af6", GitTreeState:"clean", BuildDate:"2016-11-12T05:16:27Z", GoVersion:"go1.6.3", Compiler:"gc", Platform:"linux/amd64"}

Environment:

Cloud provider or hardware configuration: GKE

OS (e.g. from /etc/os-release): default

Kernel (e.g. uname -a):

Install tools:

Others:

What happened:

I was trying to reproduce #34772 using these instructions. Due to bug in scheduler we were assigning too many pods per node. In most cases kubelet was correctly discarding them by marking them as OutOfcpu. However two strange things happened:

upon kubelet restart, it tried to re-add all such OutOfcpu pods, run predicate check for them etc.

for two pods that were incorrectly assigned (due to scheduler bug) during kubelet restart kubelet completely ignored them - they are still pending, with node assigned for 12h.

I have a cluster that I can add someone to investigate.

What you expected to happen:

OutOfcpu pods should not be retried after restart

new pods, assigned during kubelet restart, should be discarded with OutOfcpu error.

How to reproduce it (as minimally and precisely as possible):

Run these instructions.

Anything else do we need to know:

Marking as release-blocker until it's triaged by node team.
Issue 1:
Hi, I ran into this non-intuitive behavior:

test = torch.Tensor([1, 2, 3, 4, 5])
test[1:] -= test[:-1]

results in test = [1, 1, 1, 1, 4] for me, while the non in-place version test[1:] = test[1:] - test[:-1] returns the correct result [1, 1, 1, 1, 1]. If I put the tensor to cuda() first the output seems correct...

(pytorch compiled from master '0.1.9+aaf41c6')

Issue 2:
t = torch.range(1,10)
t[1:] = t[:-1] # wrong result
print(t)
t = torch.range(1,10)
t[1:] = t[:-1].clone() # right result
print(t)
t = torch.range(1, 10).numpy()
t[1:] = t[:-1] # right result
print(t)

Note that the same (wrong?) behaviour is present in lua torch.
Issue 1:
I'm submitting a ... (check one with "x")

[x] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question

Current behavior

In our project we use system js in order to create our application bundles. Because we split our project into several applications, we build one bundle for all common services and components (lib.bundle.js) and one bundle per app (app.bundle.js) which does not include what is already available in lib.bundle.js. We are using https://github.com/systemjs/builder (Version 0.15.35) to build the bundles.

Further we are using baseUrl and paths in tsconfig in order to be able to import our core files with an absolute import path. Example:

tsconfig:

"baseUrl": "./",
"paths": {
"@our-lib/*": [
"src/our-lib/*"
]

When transpiling without AoT, the import statements remain absolute and we are able to configure SystemJS (0.19.42) in order to load the file from the lib.bundle.js

Now we want to use AoT. ngc runs successfully and we can bundle the files by using index-aot.ts (bootstraps the module factory) instead of index.ts.

We can't find a way to configure SystemJS in order to locate the modules in our lib.bundle.js. We see that ngc replaces the absolute import by a relative import although it uses the same baseUrl/paths configuration.

Expected behavior

ngc should produce absolute imports if there is a path mapping in tsconfig or we need a way to map relative imports to absolute imports in system js config.

Minimal reproduction of the problem with instructions

What is the motivation / use case for changing the behavior?

Use AoT in a complex project which uses system js / system js builder and later on lazy loading.

Please tell us about your environment:

Angular version: 4.0.0-rc.3

Browser: Chrome

Language: TypeScript 2.1.6

Node (for AoT issues): node --version = v6.10.0

Issue 2:
I'm submitting a strange behavior for ViewContainerRef.createComponent.

[x ] bug report

feature request

support request => Please do not submit support request here, see note at the top of this template.

Current behavior

When want to create component in current component container like this component is rendered outside container of current component: this.componentResolver.resolveComponent(SampleComponent).then((factory) => {

console.log(this.viewContainerRef);

this.viewContainerRef.createComponent(factory);

});

Result:

Expected/desired behavior

Expect to load new component inside container of current component example in body-bar component

Please tell us about your environment:

Project generated with angular cli

Angular version: 2.0.0-rc1

Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]

Language: [TypeScript]
Issue 1:
Version

2.5.21

Reproduction link

https://jsfiddle.net/365deb40/

Steps to reproduce

Click the app container to toggle whether the two colored containers are shown or not

What is expected?

Transitions for both elements (rotating and fading)

What is actually happening?

Only the parent (primary / fade) transition is showing

Try removing the first transition and the v-if attribute of the parent element, to see that the second transition is working fine on its own.

<section>
<div class="primary" key="primary">
<transition name="rotate" mode="out-in">
<div class="secondary" v-if="show" key="secondary"></div>
</transition>
</div>
</section>

Issue 2:
Version

2.5.13

Reproduction link

https://jsfiddle.net/4kf9egr3/

Steps to reproduce

Create a transition inside a transition with different effects.

What is expected?

Two different effects should be shown.

What is actually happening?

Only the effect of the root transition is shown.