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

RuntimeError: Exporting the operator triu to ONNX opset version 12 is not supported. Please open a bug to request ONNX export support for the missing operator.

To Reproduce

Steps to reproduce the behavior:

highly depended on my code, so difficult to show reproduce

Expected behavior

Environment

Please copy and paste the output from our

environment collection script

(or fill out the checklist below manually).

You can get the script and run it with:

wget https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py
# For security purposes, please check the contents of collect_env.py before running it.
python collect_env.py

PyTorch Version (e.g., 1.6):

OS (e.g., Linux ubuntu.18.0.4):

How you installed PyTorch (pip):

Build command you used (if compiling from source):

Python version:3.7.8

CUDA/cuDNN version: cuda-10.1 cudnn-7

GPU models and configuration: GTX1050

Any other relevant information:

Additional context

Issue 2:
Models that contain torch.triu can not be converted to ONNX.

Error message:

UserWarning: ONNX export failed on ATen operator triu because torch.onnx.symbolic_opset9.triu does not exist

Simple reproducer is here.

import torch
import torch.nn as nn

class SimpleModel(nn.Module):
def __init__(self):
super().__init__()
self.conv = nn.Conv2d(10, 10, 3, padding=1, bias=False)

def forward(self, x):
x = self.conv(x)
mask = torch.triu(torch.ones_like(x))
x = x * mask
return x

model = SimpleModel()
var = torch.ones(1, 10, 120, 120)

torch.onnx.export(
model,
(var,),
"simple_model.onnx",
input_names=["x"],
output_names=["out"]
)

cc @houseroad @spandantiwari @lara-hdr @BowenBao @neginraoof
Issue 1:
The server response doesn't set charset in content-type header. This might be a limitation that some website needs some some special encoding.

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

Expected Behavior

By default content-type response header should be text/html; charset=utf-8

Also there should also be an option to override the default charset in next.config.js

// next.config.js
module.exports = {
encoding: 'iso-8859-1'
}

Current Behavior

The content-type is hard-coded as text/html

Issue 2:
Bug report

Note there are 4 similar issues but I think none of them is duplicate.

Describe the bug

I think it's not possible to create a Link for dynamic route with query params in a way which would work both server-side & client-side.

To Reproduce

create /pages/[id].js

const { query: { id, foo } } = useRouter()

console.log(id, foo)

create /pages/index.js

<Link href="/[id]" as={{ pathname: '/123', query: { foo: 'bar' } }}><a>...

this way, it doesn't propagate to client-side (only id is available, foo is undefined)

<Link href={{ pathname: '/123', query: { foo: 'bar' } }}>...

this seems to work but it also does request to /pages/123.js and that throws 404 which in turn does full-page reload which actually shows what's expected (but it's super-ugly and much slower as it's just SSR result and not regular client-side route transition)

Expected behavior

I'd expect href="/[id]" as={{ pathname: '/123', query: { foo: 'bar' } }} to work with both client-side routing and prefetching (if I understand correctly what that 123.js request is)

System information

OS: macOS

Browser: latest Chrome

Next.js: 9.2.2-canary.15
Issue 1:
Issue originally made by @leebyron

Bug information

Babel version: 6.x

npm version: 3.x

Description

Given that babel-runtime is now on v6.x, it was surprising that all the plugins still rely on babel-runtime "^5.0.0".

Since my projects now use babel v6, and usually also use babel-runtime, I now encounter duplicate installations of babel-runtime in node_modules since the v6 and v5 conflict.

Issue 2:
Bug Report

Current Behavior

const a = [1, 2, 3].contact(new Set([1, 2, 3]))

// [1, 2, 3, [Set Object]]

Input Code

const a = [1, 2, 3, ...new Set([1, 2, 3])]

Expected behavior/code

[1, 2, 3, 1, 2, 3]

Babel Configuration (.babelrc, package.json, cli command)

{
"presets": [[
"@babel/env", {
"targets": {
"browsers": ["> 1%", "ios >= 8", "android >= 4.4", "not ie < 99", "not edge < 99"]
},
"useBuiltIns": "usage",
"loose": true,
"modules": false,
}
],
"@babel/preset-react"
],
"plugins": [
["@babel/plugin-proposal-decorators", { "legacy": true }],
[
"@babel/plugin-proposal-class-properties",
{
"noMangle": true
}
],
"@babel/plugin-transform-modules-commonjs"
],
"ignore": [
"node_modules/**/*.js"
],
"env": {
"test": {
"sourceMaps": "inline"
}
}
}

Environment

@babel/core: "7.2.2"

Node 8/npm 6

macOS 10.14.1

no

babel-loader: 8.0.4
Issue 1:
NOTE: Issues that are not bugs or feature requests will be closed. Please ask usage questions on StackOverflow.

You must complete this information or else your issue will be closed

Have I written custom code (as opposed to using a stock example script provided in TensorFlow)?: No

TensorFlow installed from (source or binary)?: binary

TensorFlow version:1.0

Bazel version (if compiling from source):

CUDA/cuDNN version:NA

GPU Model and Memory:HD5500 / intrel core i5-5200

Exact command to reproduce: NA

Describe the problem clearly

I try to install tensorflow with Anaconda in my win10 following the instructions on [install_windows]https://www.tensorflow.org/install/install_windows). When i move to step4:

I type the code

pip install --ignore-installed --upgrade https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow-1.0.1-cp35-cp35m-win_amd64.whl

it fails and shows

tensorflow_gpu-1.0.1-cp35-cp35m-win_amd64.whl is not a supported wheel on this platform.

How can I fix it?

Source Code / Logs

Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full-traceback. Large logs and files should be attached. Try to reproducible test-case code the bare-minimum necessary to generate the problem

Issue 2:
The current .whl does not support python 3.6. Please update to support the latest version of python. Thanks!

C:\WINDOWS\system32>python --version

Python 3.6.0

C:\WINDOWS\system32>pip install --upgrade https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow-0.12.1-cp35-cp35m-win_amd64.whl

tensorflow-0.12.1-cp35-cp35m-win_amd64.whl is not a supported wheel on this platform.
Issue 1:
If you click one of the carousel indicators, and quickly click another indicator before the "sliding" animation is completed, the class="active" is applied to the wrong li item. This bug occurs in chrome, ff, safari and likely all other browsers.

Here is an example of the issue:

http://jsfiddle.net/silencecm/HQQRx/2/

I used jQuery to block the click event while the "sliding" animation is happening:

var sliding = false;
$('#myCarousel').bind('slide', function(e) {
sliding = true;
$('.carousel-indicators > li').on('click', function(e) {
if (sliding) {
e.stopPropagation();
}
})
}).bind('slid', function(e) {
sliding = false;
});

Here is an example of the solution I used:

http://jsfiddle.net/silencecm/HQQRx/3/

Issue 2:
The Carousel is great ~ we love it.

But we found an issue with the indicator. It is like when you click on the indicators, if you do it fast enough, you will find that the indicator doesn't match the image showed on the page. This issue could be replicated on the example here: http://twitter.github.com/bootstrap/javascript.html#carousel

Here is a screenshot about this issue:
Issue 1:
Here’s an illustration of the issue:

Basically, the text you’re typing becomes invisible until you type a space. This is particularly problematic if the mini TextEditor is being used for something like a long URL, which you wouldn’t expect to have spaces.

Using Atom v0.208.0 on Mac OS 10.10.3

Issue 2:
I am sure you have picked this up by now, but I am experiencing crashes when I copy/paste.

Initially I suspected that it was theme-related, but I have disabled all the themes I installed and still getting the same problem.
Issue 1:
I have this error while building pytorch from source with gtx1060, cuda9.2, and cudnn7.1.4 on ubuntu 16.04

-- Caffe2: Found protobuf with new-style protobuf targets.

-- Caffe2: Protobuf version 3.5.0

-- Caffe2: CUDA detected: 9.2

-- Caffe2: CUDA nvcc is: /usr/local/cuda/bin/nvcc

-- Caffe2: CUDA toolkit directory: /usr/local/cuda

-- Caffe2: Header version is: 9.2

-- Found cuDNN: v7.1.4 (include: /usr/local/cuda/include, library: /usr/local/cuda/lib64/libcudnn.so.7)

CMake Error at /home/dat/.py/pytorch/torch/lib/tmp_install/share/cmake/Caffe2/public/cuda.cmake:338 (cuda_select_nvcc_arch_flags):

Unknown CMake command "cuda_select_nvcc_arch_flags".

Call Stack (most recent call first):

/home/dat/.py/pytorch/torch/lib/tmp_install/share/cmake/Caffe2/Caffe2Config.cmake:79 (include)

CMakeLists.txt:7 (FIND_PACKAGE)

-- Configuring incomplete, errors occurred!

See also "/home/dat/.py/pytorch/torch/lib/build/libshm/CMakeFiles/CMakeOutput.log".

See also "/home/dat/.py/pytorch/torch/lib/build/libshm/CMakeFiles/CMakeError.log".

Failed to run 'bash tools/build_pytorch_libs.sh --with-cuda --with-nnpack nccl caffe2 nanopb libshm gloo THD'

Issue 2:
pytorch/cmake/public/cuda.cmake

Line 343
in
346568d

cuda_select_nvcc_arch_flags(NVCC_FLAGS_EXTRA ${TORCH_CUDA_ARCH_LIST})

and neither requires cmake 3.9 nor adds Modules_CUDA_fix to cmake modules. This is breaking ubuntu 16.04 builds, and getting cmake 3.9 on ubuntu 16.04 is a pain.

cc @Yangqing
Issue 1:
Is your feature request related to a problem

I'd like to be able inject a response header from inside a dependency, as we can from path operation functions. The dependency injection system should operate the same for dependency functions as for path operation functions.

Example code:

from datetime import datetime

from fastapi import FastAPI, Depends
from starlette.responses import Response
from starlette.testclient import TestClient

app = FastAPI()

def cache_control(response: Response):
response.headers.setdefault('last-modified', datetime.now().isoformat())

def other_dependency():
return {'foo': 'bar'}

@app.get('/doc', dependencies=[Depends(cache_control)])
def get_doc(other: dict = Depends(other_dependency)):
document = {'other': other}
return document

if __name__ == '__main__':
client = TestClient(app=app)
print(client.get('/doc').headers)

The result of the above code is that the last-modified header is duplicated because the dependency resolver expects that only the path operation function will try to add headers, and only once. Adding additional dependencies causes exponential duplication.

Headers get merged here:

https://github.com/tiangolo/fastapi/blob/master/fastapi/dependencies/utils.py#L489

At that point in the above scenario, response is sub_response is True -- they are the same object.

Issue 2:
Description

This is similar to the question #724 (comment) but instead of extra parameters, how do I raise an error if multiple of the same valid parameters are provided.

Example:

from fastapi import FastAPI
from pydantic import BaseModel

app = FastAPI()

class UpdateModel(BaseModel):
name: str
class Config:
extra = "forbid"

@app.post("/items/")
async def update(item: UpdateModel):
# do smth with item.name

If I send {"name": "FOO", "name": "BAR"} the second "name" is used for item (i.e. item.name = "BAR")

How can I raise an error with my pydantic model so this is rejected? The extra = "forbid" does not work for duplicates.

Thanks

Operating System

Windows

Operating System Details

No response

FastAPI Version

0.66.0

Python Version

3.9.1

Additional Context

No response
Issue 1:
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):

Environment:

Cloud provider or hardware configuration:

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

Kernel (e.g. uname -a):

Install tools:

Others:

What happened:

What you expected to happen:

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

Anything else do we need to know:

Issue 2:
We should separate the pod template from replicationController, to make it possible to create pods from template without replicationController (e.g., for cron jobs, for deferred execution using hooks). This would also make updates cleaner.
Issue 1:
4.13.2:

Running ./gradlew lint is failing due to missing permission in Glide. By the way why do Glide need to use Notification?

Glide load line / GlideModule (if any) / list Adapter code (if any):

Fetching images

Layout XML:

N/A

Stack trace / LogCat:

> Task :app:libs:AndroidFirebase:lintDebug FAILED
C:\Users\jense\.gradle\caches\transforms-3\72c1d08f8d878ae1ba2736907b26e15a\transformed\jetified-glide-4.13.2\jars\classes.jar: Error: When targeting Android 13 or higher, posting a pe
rmission requires holding the POST_NOTIFICATIONS permission (usage from com.bumptech.glide.request.target.NotificationTarget) [NotificationPermission]

Explanation for issues of type "NotificationPermission":
When targeting Android 13 and higher, posting permissions requires holding
the runtime permission android.permission.POST_NOTIFICATIONS.

1 errors, 0 warnings

Issue 2:
@sjudd Ok so there's one last side effect remaining after #2245

Opening a new issue as it's a special case, that will maybe needs something on my side to workaround.

As explained on previous issues, I do have a special model that handles some connexion states internaly.

And those states as they do not change the actual picture data, are not handled in the model hashcode/equals so that memory cache can properly be used.

The problem is that the restart of the query after your patch still use the previous model and not the new one with the updated internal flags so does not work.

The restart can maybe be updated to use the new model, even if for Glide it's the same as model could have internal states.

Adding a way to indicate a cacheKey for the model. To allow different hashcode/equals to indicate when the model is actually different, but still allow memory cache to use the same data as the picture is the same

Something else?
Issue 1:
I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

When using just a couple TextFields and a Button (ie. a login page) and using the babel-plugin-direct-import module, I would expect that only the TextField and Button components should be bundled in the ouput.

Current Behavior

Many other components including List, Menu, and Popover get included in the bundle.

Steps to Reproduce (for bugs)

I have created a sample project that just uses a TextField.

git clone https://github.com/Graham42/bug-babel-direct-import-material-ui-next

npm install

You can see the module bundle stats by running

npm run build
npm run stats

Context

I'm trying to minimize the bundle size of what needs to be delivered for my login page.

Your Environment

Tech
Version

Material-UI
1.0.0-beta.21

React
16.1.1

babel-plugin-direct-import
0.4.0

Issue 2:
Most components aren't semantic html. Also inline elements wrap block elements. There are empty divs that seem redundant, and too much duplicated inline styling. There appears to be no effort made for accessibility, and at the very least would be good to provide a means for micro-formats for SEO of child elements.

Steps to reproduce

Versions

Material-UI:
Issue 1:
Q
A

Bug report?
yes

Feature request?
no

BC Break report?
no

RFC?
no

Symfony version
3.2?

Steps to repeat:

git clone git@github.com:weaverryan/flex-redis-bug.git

composer install

It will explode with:

The project is a standard Flex app, but with the following changes:

A) Doctrine ORM is installed

B) The app cache uses redis (see framework.yaml)

C) We're in the prod environment

The error happens on cache:clear. This comes from the result cache configured by default in prod for Doctrine: https://github.com/symfony/recipes/blob/93d80647f510e00a52db869251136593a2dc2182/doctrine/doctrine-bundle/1.6/config/packages/prod/doctrine.yaml#L28

This is caused by a lack of laziness... somewhere. It could be in Doctrine - this whole thing starts when we try to warmup the proxies... which instantiates the entity managers (which instantiates result caches and also connection objects). Or, it could be in the Cache component, where (at least with Redis) a connection to the Redis server is established in order to create the RedisAdapter object (even if you never make any connections to it).

Thanks!

Issue 2:
There is a bug at the moment, where: you cannot spool an email and authenticate the user in the same response.

The authentication works, but the session disappears for One request, before appearing again. This only happens when the email is actually sent.

This causes the user to appear 'Anonymous' for the next response, which is causing problems, as the application could be expecting the user to be logged in.

This currently prevents spooling emails on any events where the user may also get logged in,

password change success

email confirmation

account created

etc

I have created a test bundle using symfony standard and the demo login setup.

https://github.com/carlcraig/symfony-standard/tree/spool-auth

I have also tested this with FOSUserBundle

https://github.com/carlcraig/symfony-standard/tree/fos-userbundle-spool-auth

Has anyone else encountered this problem?

Is there any way to get round this?
Issue 1:
The css- and html-loader are currently creating a string like this:

"module.exports = '<html><body><img src=\"' + require(\"./some/img.jpg\") + '\"></body></html>";

I think this behavior violates the rule that a loader should do only one thing because it turns an html-string into a javascript-module. That's exactly what the raw-loader does.

Wouldn't it be better if the html- and css-loader just replaced all referenced urls (without wrapping them in a require() statement) and then pass the string to the next loader?

webpack could then also be used as a bundler for static webpages that don't want to render themselves via JavaScript.

Issue 2:
Is it possible to just generate a CSS file from web pack? I'd love to have styles in the head and then a framework script and app script in the footer. Is this possible?
Issue 1:
Bug report

Describe the bug

The Component prop provided in _app.tsx is not properly rendered upon page change.

In details

I'm creating a React application and I'm using next to do some SSR. I'm also using redux and redux-saga, and I have asynchronous logics that update the status of the application. To ease things down, let's say I have a status field in my redux store that is initialized when the app starts.

I have a component I call StatusGate, that takes the main page component as children and renders it if the status field in the redux store is good. I had to disable ssr for this component as the status was different on client and server side, giving me a render error.

This is basically what I do in the _app.tsx render:

// Load the redux store, extract Component and pageProps from props

return <Container>
<Provider store={store}>
<NavBar>
<StatusGate>
<Component {...pageProps}/>
</StatusGate>
</NavBar>
</Provider>
</Container>;

And in the NavBar I have a Link imported from next, that brings me to the /account page. When the link is clicked, the url is properly updated, but the content rendered by Component is not.

What I found very weird is the following scenario

// Load the redux store, extract Component and pageProps from props

return <Container>
<Provider store={store}>
<NavBar>
<Component {...pageProps}/>
<StatusGate>
<Component {...pageProps}/>
</StatusGate>
</NavBar>
</Provider>
</Container>;

Here I render this Component twice, once just before the gate, and the second one just like before. Now the content of the first one is properly updated when I follow a Link, and the second is still not updated.

This is the Gate component: https://github.com/ticket721/web-app/blob/feature/ENV-3.event-admin/components/gate/Gate.tsx

And this is one usage example: https://github.com/ticket721/web-app/blob/feature%2FENV-3.event-admin/web_components/appgate/AppGate.tsx

In my case I have more than one Gate, and I also noticed that only the first one of the tree of Gates has its render method called, and I'm 100% sure its children are getting returned properly by the render.

I'm using next with Typescript, Css and Less.

Expected behavior

Wherever the position of Component, it should properly get rerendered.

System information

OS: macOs

Browser (if applies): Chrome

Version of Next.js: 8.0.4

Issue 2:
I'm trying move .jsx components looks like:

class Header extends React.Component {
constructor(props) {
............................................
}
render() {
return
(
<div className="nav-container">
<a id="top"></a>
<nav>
<div className="nav-utility">
<div className="module left">
..........................)

from production ready CreateReactApp to new next.js project and once faced with module parse fail:

Module parse failed: /home/orloff/projects/dst-next/src/app/components/layout/header.jsx Unexpected token (40:6)
You may need an appropriate loader to handle this file type.
| render() {
| return
| ( <div>Header</div>
| // <div className="nav-container">
| // <a id="top"></a>

@ ./components/App.js 11:14-44
@ ./pages?entry
@ multi ./pages?entry

what is correct way solve it?
Issue 1:
Missing functionality. Required for clients that store packages outside the implied file system structure.

Issue 2:
by pierre.louis.roman:

syslog.NewLogger() allow me to specify flags but not a tag; if I want one, I have to
copy/paste the code of this function and replace the "" with my tag.
Code: http://golang.org/src/pkg/log/syslog/syslog.go#L271

How about a third argument for this function in order to allow the user to specify a tag?
The (very small) patch can be found in the attached files. Maybe the format of the diff
isn't the expected one, but the patch is easily reproductible.

go test works fine with it.

Which operating system are you using?
linux/amd64

Which version are you using? (run 'go version')
1.1

Attachments:

diff_syslog.go (501 bytes)

diff_syslog_test.go (337 bytes)
Issue 1:
If a modal window is created without a backdrop when you try to close it it tries to remove backdrop which was never created.

Issue 2:
With options { backdrop: false }, this.$backdrop.remove() is still being called which results in an exception as this.$backdrop is null.

hideModal: function () {
var that = this
this.$element.hide()
this.backdrop(function () {
that.removeBackdrop()
that.$element.trigger('hidden')
})
}

removeBackdrop: function () {
this.$backdrop.remove()
this.$backdrop = null
}