WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
Is there an existing issue for this?

I have searched the existing issues

This issue exists in the latest npm version

I am using the latest npm

Current Behavior

every call that I make with npm ... e.g. calling a script npm run connect, there is this weird looking log that makes no sense in this context:

(⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂) ⠇ : timing config:load:flatten Completed in 2ms

E.g. I have npm run connect setup where it connects to a preconfigured server, but this annoying log doesn't allow me to read the buffer.

This happens across different workspaces with different npm package.json files too!

Expected Behavior

log should not appear

Steps To Reproduce

I'm not sure how this came to be...

Environment

npm: 8.11.0

Node.js: 16.15.1

OS Name: mac os 12.2.1

System Model Name:

npm config:

npm config ls
npm WARN config init.author.name Use `--init-author-name` instead.
npm WARN config init.author.email Use `--init-author-email` instead.
npm WARN config init.author.url Use `--init-author-url` instead.
; "user" config from /Users/timdaub/.npmrc

//registry.npmjs.org/:_authToken = (protected)
email = "myemail"
init.author.email = "="
init.author.name = "Tim Daubenschütz <myemail>"
init.author.url = "https://timdaub.github.io/"
prefix = "/usr/local"
save-exact = true
save-prefix = ""

Issue 2:
Is there an existing issue for this?

I have searched the existing issues

This issue exists in the latest npm version

I am using the latest npm

Current Behavior

' npm start ' produces the following timing output which sticks always to the last line:

the "normal" output from the started app is always scrolling above this last line.

Expected Behavior

no timing output.

Digging deeper I noticed that with --loglevel silentor error there is no sticky output.

BUT for warn , notice and http there is timing output which in my opinion should not happen, since these levels are before timing log level ....

Steps To Reproduce

npm start

See error...

Environment

npm: 8.5.3

Node.js: 17.6.0

OS Name: macOS 12.2.1

System Model Name: Macbook Pro

npm config:

npm config ls
npm WARN ignoring workspace config at /Users/ogi/Repositories/IMS/IMS_v2/packages/mims-test/.npmrc
npm WARN config This command does not support workspaces.
; "user" config from /Users/ogi/.npmrc

; @ogi-it:registry = "http://localhost:4873/" ; overridden by project
//localhost:4873/:_authToken = (protected)
//registry.npmjs.org/:_authToken = (protected)
scripts-prepend-node-path = true

; "project" config from /Users/ogi/Repositories/IMS/IMS_v2/.npmrc

@ogi-it:registry = "http://localhost:4873"

; node bin location = /usr/local/bin/node
; cwd = /Users/ogi/Repositories/IMS/IMS_v2/packages/mims-test
; HOME = /Users/ogi
; Run `npm config ls -l` to show all defaults.
ogi@ogi-it-mac mims-test %
Issue 1:
Celery version 4.2.0

I want to get results of tasks in group.

In development i'm using a CELERY_ALWAYS_EAGER=True.

If i run code below:

@shared_task
def task_in_group():
return "something"

@shared_task
def task_finishing_chain(results):
return results

@shared_task
def task_launcher():
chain_tasks = chain(
group(
task_in_group.si(),
task_in_group.si()
),
task_finishing_chain.s())
chain_tasks.apply_async()

def run_tasks():
task_launcher.apply_async()

then i'm getting the following exception:

Task my_app.tasks.task_in_group[36c33a48-3047-4be8-82f1-70b985e87980] succeeded in 0.00011961600012000417s: 'something'
Task my_app.tasks.task_in_group[1e3a13c3-fbb7-4535-bf68-3f988a331a42] succeeded in 3.561300013643631e-05s: 'something'
Task my_app.tasks.task_launcher[0fbbae47-f3fc-4a2d-b2ce-b10c8e91182c] raised unexpected: RuntimeError('Never call result.get() within a task!\nSee http://docs.celeryq.org/en/latest/userguide/tasks.html#task-synchronous-subtasks\n',)
Traceback (most recent call last):
File "/home/vagrant/python35/lib/python3.5/site-packages/celery/app/trace.py", line 382, in trace_task
R = retval = fun(*args, **kwargs)
File "/vagrant/my_app/tasks.py", line 268, in task_launcher
chain_tasks.apply_async()
File "/home/vagrant/python35/lib/python3.5/site-packages/celery/canvas.py", line 1230, in apply_async
body=body, task_id=task_id, **options)
File "/home/vagrant/python35/lib/python3.5/site-packages/celery/canvas.py", line 1239, in apply
args=(tasks.apply(args, kwargs).get(propagate=propagate),),
File "/home/vagrant/python35/lib/python3.5/site-packages/celery/result.py", line 671, in get
on_interval=on_interval,
File "/home/vagrant/python35/lib/python3.5/site-packages/celery/result.py", line 722, in join
assert_will_not_block()
File "/home/vagrant/python35/lib/python3.5/site-packages/celery/result.py", line 41, in assert_will_not_block
raise RuntimeError(E_WOULDBLOCK)
RuntimeError: Never call result.get() within a task!

On production everything works normally with CELERY_ALWAYS_EAGER=False.

Issue 2:
Task.retry() always raises a RuntimeError if task_always_eager and task_eager_propagates are set to True. This is counterintuitive. I would expect this example to work:

from celery import Celery

app = Celery(__name__,
config_source=dict(task_always_eager=True,
task_eager_propagates=True))

@app.task(bind=True, default_retry_delay=1, max_retries=None, shared=False)
def foo(self, i):
if i <= 0:
return 'Task succeeded!'
else:
self.retry((i - 1,))

foo.delay(3)

But instead it raises this error:

Traceback (most recent call last):
...
raise RuntimeError(E_WOULDBLOCK)
RuntimeError: Never call result.get() within a task!
See http://docs.celeryq.org/en/latest/userguide/tasks.html#task-synchronous-subtasks

This can be reproduced on master and with 4.2.0rc2.
Issue 1:
Hello All,

In a project that I am working on, we are using Symfony as a middleware between the Java WebService and the browser.

Strangely Symfony converts a 201 response received from the WebService to a 302 Redirect.

I am not sure if this is the reason why this is happening.

https://github.com/symfony/symfony/blob/master/src/Symfony/Component/HttpFoundation/Response.php#L1129

https://tools.ietf.org/html/rfc7231#section-7.1.2

Any suggestions would be of great help.

Thanks in advance.

Issue 2:
Context

I have a listener on KernelEvents::REQUEST doing some checks related to the current request (to be precise I am validating its format against a swagger spec file).

Issue

When an exception occurred, the HttpKernel's ExceptionListener duplicates the request (without the query and request arguments), changes the method to GET and then call $kernel->handle().

This request will be handled by my KernelEvents::REQUEST listener which will throw an exception because the Request is not valid from a domain point of view.

Solution

Do not use a sub-request or forge a brand new request against a reserved endpoint.

What do you think?
Issue 1:
Describe what you were doing when the bug occurred:

Loaded page.

Fast Refreshed.

Started profiler.

Stopped profiler. Crash.

Please do not remove the text below this line

DevTools version: 4.6.0-6cceaeb67

Call stack: at j (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:162638)

at N (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:161628)

at e.getCommitTree (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:164582)

at ec (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:339280)

at ci (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:59620)

at nl (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:69923)

at Ll (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:110996)

at qc (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:102381)

at Hc (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:102306)

at Vc (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:102171)

Component stack: in ec

in div

in div

in div

in So

in Unknown

in n

in Unknown

in div

in div

in rl

in Ze

in fn

in Ga

in _s

Issue 2:
Describe what you were doing when the bug occurred:

I was using the devtools to investigate some performance issues w/ an app I help maintain

I had just turned on the "Record why each component rendered while profiling" checkbox

I ran a profile while navigating on the underlying page

The react profiler tab in the devtools gave this error, I think as I clicked the record icon to stop recording the profile.

Please do not remove the text below this line

DevTools version: 4.5.0-355970aa4

Call stack: at N (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:160881)

at j (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:160015)

at j (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:159939)

at j (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:159939)

at j (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:159939)

at j (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:159939)

at j (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:159939)

at j (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:159939)

at j (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:159939)

at j (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:159939)

Component stack: in ec

in div

in div

in div

in So

in Unknown

in n

in Unknown

in div

in div

in rl

in Ze

in fn

in Ga

in _s
Issue 1:
Checklist

I have included the output of celery -A proj report in the issue.

(if you are not able to do this, then at least specify the Celery

version affected).

software -> celery:4.2.1 (windowlicker) kombu:4.2.1 py:3.6.5
billiard:3.5.0.4 py-amqp:2.3.2
platform -> system:Linux arch:64bit, ELF imp:CPython
loader -> celery.loaders.app.AppLoader
settings -> transport:amqp results:disabled

I have verified that the issue exists against the master branch of Celery.

Steps to reproduce

Run a Celery worker with --pool=solo option and send it a SIGTERM while executing a task. By running this script for example.

Expected behavior

The task should complete before the process stops, like when running without --pool=solo.

Actual behavior

The worker prints "worker: Warm shutdown (MainProcess)" and immediatly stops.

Maybe related to #3430

Issue 2:
Checklist

I have checked the issues list

for similar or identical bug reports.

I have checked the pull requests list

for existing proposed fixes.

I have checked the commit log

to find out if the bug was already fixed in the master branch.

I have included all related issues and possible duplicate issues in this issue

(If there are none, check this box anyway).

Related Issues and Possible Duplicates

None

Related Issues

None

Possible Duplicates

None

Description

I had a deployed dev django application on AWS cloud with SQS setup via url format sqs://aws_access_key_id:aws_secret_access_key@. This was the first thing I saw to make it running with SQS.

Since it was development server I had DEBUG=True for the django. Django itself in debug mode shows environment variables when it hits 500 error.

The problem is that in this case sqs url setup becomes dangerous. It's exposed to the page while other type of environment variables like token, password, etc are hidden.

I know this might sound like it's not related to celery, but since celery is mostly used with django in many projects I consider the SQS setup documentation dangerous to newcomers and to the people who didn't notice that.

Actually someone from the internet really got access to the key and we lost some money..

Suggestions

Either add a warning that this is dangerous to use access and secret key with turned on debug mode on django or completely delete this sqs url format with access and secret keys.
Issue 1:
React version: 16.13.1

Steps To Reproduce

I used the following code in Jest

it("should not rerender when setting state to the same value via click", async () => {
const callback = jest.fn();
function MyComponent() {
const [foo, setFoo] = useState("bir");
callback();
return (<div data-testid="test" onClick={() => setFoo("bar")}>{foo}</div>);
}

const { getByTestId } = render(<MyComponent />)
const testElement = getByTestId("test");
expect(testElement.textContent).toEqual("bir");
expect(callback).toBeCalledTimes(1);

act(() => { fireEvent.click(testElement); });
expect(testElement.textContent).toEqual("bar");
expect(callback).toBeCalledTimes(2);

act(() => { fireEvent.click(testElement); });
expect(testElement.textContent).toEqual("bar");
expect(callback).toBeCalledTimes(2); // gets 3 here

/*
assuming we update the last line as follows
expect(callback).toBeCalledTimes(3); // really should be 2
act(() => { fireEvent.click(testElement); });
expect(testElement.textContent).toEqual("bar");
expect(callback).toBeCalledTimes(3); // does not re-render
*/

})

Link to code example:

Similar code in codesandbox

Simlar AND working code in an Expo Snack

The current behavior

On initial render OK

On first click, rerender due to value change OK

On second click, rerender even with the same value NOT OK

The expected behavior

On initial render OK

On first click, rerender due to value change OK

On second click, no rerender because useState dispatch with the same value

Note this works correctly on React-Native as shown by Expo

Issue 2:
React version:

Steps To Reproduce

import { useState, useEffect, useRef } from "react";
function App() {
const [count, setCount] = useState(0);
const countLast = useRef(0);

function handleClick() {
const num = 1;
setCount(num);
console.log(num == countLast.current, "set num", num, "last count:", countLast.current);
}
useEffect(() => {
countLast.current = count;
console.log("effect");
});
console.log("Render");
return (
<div>
<button onClick={handleClick}>Next</button>
{count}
</div>
);
}

export default App;

Link to code example:

https://codesandbox.io/s/confident-satoshi-3othy?file=/src/App.js

The current behavior

The expected behavior

When I clicked the button for the second time, The "Render" string is printed, But the third and after clicks are not printed.

The second click should be consistent with the follow-up, it is not printing "Render" strings, beacuse num == countLast.current is True.

This inconsistency of behavior can cause a lot of confusion.
Issue 1:
Q
A

Bug report?
no

Feature request?
yes

BC Break report?
yes/no

RFC?
yes/no

Symfony version
4.*

Debug code leftover in production is smelly, but there are cases where this occurs (for example you are debugging somethin in production and you run the same codebase in development and production mode on different ports or domains).

In such a case it would help alot if the dump function would be replaced with an empty stub (or something that sends warning messages to the logger that there is a forgotten dump function in the code) to not exit at this position with an "call to undefined function".

Issue 2:
Q
A

Bug report?
no

Feature request?
yes

BC Break report?
no

RFC?
no

Symfony version
3.2

I'm very addicted to dump() to debug my code and i find it a invaluable tool, so thank you very much!

Unfortunately some time i forget to rid off of a dump or two in the code and if the code bump into production i got an exception because dump() does not exists.

I understand this should not happen and i should get more controls in place, but it happens; so my proposal: why not create a fake dump() function for production environment that does absolutely nothing?

Regards,

Matteo
Issue 1:
Maxim Naumov @mnaumovfb sends in the following feedback:

I thought I would share some feedback from my recent work with register_backward_hook function. I will describe some some inconsistencies in it that may be worth addressing in the future.

Background

PyTorch supports different hook functions, including register_hook, register_forward_hook and register_backward_hook. The former is applied to a tensor variable, while the latter two are applied to a layer module. I will discuss the latest form here. It has the following signature https://pytorch.org/docs/stable/nn.html func(layer, grad_input, grad_output)

Details

It is extremely important to understand the meaning of gradients to register_backwards_hook. Let a layer be defined as

output z (grad_output)
____|____
|__layer__|
|
input x (grad_input)

with overall loss E, error gradient dE/dz^(k) and weight gradient dE/dw^(k).

First, let us assume the simplest case: a layer with no bias. Then,

grad_output= [dE/dz^(k)]
grad_input = [dE/dz^(k-1), dE/dw^(k)]

Inconsistencies

It seems that there are some inconsistencies in how gradients for different layers are handled by this function.

Shape

in convolution layers the weight gradient has the same shape as the weights

in fully connected layers the weight gradient is transpose of the weights

Bias

in convolution layers bias gradient are appended: grad_input = [dE/dz^(k-1), dE/dw^(k), dE/db^(k)]

in fully connected layers bias gradient are prepended: grad_input = [dE/db^(k), dE/dz^(k-1), dE/dw^(k)]

Batch size > 1

in convolution layers bias gradient corresponds to the gradient over the entire batch: grad_input = [dE/dz^(k-1), dE/dw^(k), dE/db^(k)]

in fully connected layers bias gradient corresponds to the gradient per data point j=1,...,r in the batch (therefore it needs to be added to get the gradient over the entire batch): grad_input = [[dE/db^(k,1),...,dE/db^(k,r)], dE/dz^(k-1), dE/dw^(k)]

These discrepancies can make handling of different layers, bias and batch sizes quite cumbersome in the code. It would help if they were done more consistently in the future.

Issue 2:
Hi,

there is something strange in the backward step (or maybe something I don't understand). If I define a Module that takes 3 inputs, the grad_input has to be of size 3, right ? But this is not the case here (from the backward_hook point of view):

from torch.autograd import Variable
import torch.nn as nn
import torch.nn.functional as F

def bh(m,go,gi):
print("Grad Input")
print(go)
print("Grad Output")
print(gi)

class M(nn.Module):
def __init__(self):
super(M,self).__init__()
self.register_backward_hook(bh)

def forward(self,x,y,z):
return (x+y+z)

x=Variable(torch.randn(1,5),requires_grad=True)
y=Variable(torch.randn(1,5),requires_grad=True)
z=Variable(torch.randn(1,5),requires_grad=True)

criterion=nn.MSELoss()
mod=M()
out=mod(x,y,z)
loss=criterion(out,Variable(torch.randn(1,5)))
loss.backward()```

In that case, when I print grad_input throught the hook function, it is just composed of two elements... Could you tell me where am I wrong ? But `x.grad, y.grad and z.grad` seem correctly computed

cc @ezyang @gchanan @zou3519 @SsnL @albanD @gqchen
Issue 1:
🐛 Bug

import torch fails to command prompt without an error for recent nightly builds on Windows.

To Reproduce

C:\> pip install future protobuf scipy
C:\> pip install --pre torch torchvision -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html

Looking in links: https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html
Collecting torch
Using cached https://download.pytorch.org/whl/nightly/cpu/torch-1.4.0.dev20191216%2Bcpu-cp36-cp36m-win_amd64.whl
Collecting torchvision
Using cached https://download.pytorch.org/whl/nightly/cpu/torchvision-0.5.0.dev20191215%2Bcpu-cp36-cp36m-win_amd64.whl
Requirement already satisfied: numpy in c:\python36\lib\site-packages (from torchvision) (1.17.4)
Requirement already satisfied: six in c:\python36\lib\site-packages (from torchvision) (1.13.0)
Requirement already satisfied: pillow>=4.1.1 in c:\python36\lib\site-packages (from torchvision) (6.2.1)
Installing collected packages: torch, torchvision
Successfully installed torch-1.4.0.dev20191216+cpu torchvision-0.5.0.dev20191215+cpu

C:\>python
Python 3.6.7 (v3.6.7:6ec5cf24b7, Oct 20 2018, 13:35:33) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch

C:\>

Expected behavior

Import completes waiting for next Python command.

Environment

collect_env.py does not complete as import torch fails.

PyTorch Version (e.g., 1.0):

OS (e.g., Linux): Windows 10 (1909 18363)

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

Python version: 3.6.7

Issue 2:
🐛 Bug

'import torch' starts to fail in the nightly jobs beginning from Dec. 15.

https://dev.azure.com/pytorch/PyTorch/_build/results?buildId=18361&view=results

https://dev.azure.com/pytorch/PyTorch/_build/results?buildId=18363&view=results

To Reproduce

Steps to reproduce the behavior:

import torch

Expected behavior

Import success.

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.0): master

OS (e.g., Linux): Windows

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

Build command you used (if compiling from source): python setup.py install

Python version: 3.5/3.6/3.7

CUDA/cuDNN version: None / 9.2 / 10.1

GPU models and configuration: None

Any other relevant information:

Additional context

Looks like some of the errors are intermittent.

cc @ezyang @gchanan @zou3519 @peterjc123
Issue 1:
tensorflow currently handles duplicates in SparseTensor by keeping the value for the last index of a repeated coordinate. However, some operations for this would come in quite handy, namely non-max or non-min suppression (keeping the maximum or minimum values for repeated coordinates), sum (summing the values for repeated coordinates) or mean (averaging the values for repeated coordinates).

There is currently a solution for this in https://stackoverflow.com/questions/38233821/merge-duplicate-indices-in-a-sparse-tensor. It works great, but to be honest it feels a bit clunky to use.

Issue 2:
System information

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

OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Ubuntu 14.04

TensorFlow installed from (source or binary): Binary (pip install)

TensorFlow version (use command below): ('v1.2.0-rc2-21-g12f033d', '1.2.0')

Bazel version (if compiling from source): N/A

CUDA/cuDNN version: 8.0

GPU model and memory: Tesla P100-SXM2 16MB

Exact command to reproduce: python caffe_to_tf_test.py

Describe the problem

Caffe convolution produce different results then tensorflow with the same parameters. This has something to do with striding - the attached test fails with striding equal to 2, and succeeds with striding equal to 1.

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 provide a reproducible test case that is the bare minimum necessary to generate the problem.

x.zip
Issue 1:
Joern Barthel opened SPR-6440 and commented

Now that RowMapper offers parameterized types can we please abandon SimpleJdbcTemplate? It still lacks some functionality (e.g. fetch size) over JdbcTemplate so sometimes both are used.

Affects: 3.0 RC2

Issue Links:

#11587 Deprecate SimpleJdbcTemplate in favor of JdbcTemplate ("duplicates")

Issue 2:
kang woonduk opened SPR-7764 and commented

memory leak occurs in SpringMVC(DefaultListableBeanFactory.dependentBeanMap, DefaultListableBeanFactory.dependenciesForBeanMap)

error condition

use SpringMVC

use default-autowire="byType"

Scope of Controller is prototype

ServletHttpRequest(or HttpSession, WebRequest) setter is exist in Controller

Too Many dependency info(String:Proxy0$xxxxx) is created in DefaultListableBeanFactory(dependentBeanMap, dependenciesForBeanMap)

Affects: 3.0.5

Attachments:

memory_leak_ProxyString.JPG (269.31 kB)

memory_leak.JPG (171.88 kB)

MemoryLeak-sample-webproject.zip (2.92 MB)

Issue Links:

#13814 Scoped-proxy memory leak w/ @Resource injection ("duplicates")

1 votes, 2 watchers