sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: pytorch
Issue: TORCH_LIBRARIES variable leads to undefined reference function error in compiling while using libtorch in c++
Labels: module: cpp,triaged

### 🐛 Describe the bug

I'm using cmake to build my c++ project. When i add ${TORCH_LIBRARIES} into target_link_libraries's parameters, the compiling fails.

Here's some of my cmake codes:

> set(CMAKE_CXX_STANDARD 14)
> set(THIRD_PARTY_PATH "${PROJECT_SOURCE_DIR}/third_party")
> set(Torch_DIR /opt/libtorch_1.13/share/cmake/Torch)
> find_package(Torch REQUIRED)
> include_directories(${PROJECT_SOURCE_DIR}/third_party/include)
> 
> add_executable(torch_test main.cpp)
> target_link_libraries(torch_test ${PROJECT_SOURCE_DIR}/third_party/lib/libjsoncpp.so)
> target_link_libraries(torch_test -Wl,--no-as-needed /opt/torch_tensorrt/lib/libtorchtrt.so)
> 
> target_link_libraries(torch_test ${TORCH_LIBRARIES}
>         /opt/TensorRT-8.5.3.1/lib/libnvinfer.so
>         /opt/TensorRT-8.5.3.1/lib/libnvinfer_plugin.so
>         /opt/libtorch_1.13/lib/libtorch_global_deps.so
>         /opt/libtorch_1.13/lib/libc10_cuda.so
> )

### Versions

system: ubuntu2204
libtorch version: 1.13
cuda version: 11.7

cc @jbschlosser
Repository: flutter
Issue: [infra] sub-build LUCI UI can be much more useful
Labels: team-infra,P3,triaged-infra

When a build is sharded into multiple sub-builds, the UI looks like this:

<img width="365" alt="Screenshot 2023-03-28 at 8 45 55 PM" src="https://user-images.githubusercontent.com/211513/228421645-6e20d796-254f-4ca7-8fcc-f48ea9ef7d89.png">

This doesn't provide any useful information other than the boolean "I have sub-builds", and, if you count carefully, the number of them.

Useful information would be for each sub-build:

- The name of the task
- Current status (waiting, running, deflaking, succeeded, failed)
- Duration
Repository: pytorch
Issue: make tensor data const correct
Labels: module: internals,triaged,module: copy on write

### 🚀 The feature, motivation and pitch

The layers of tensor data throughout our stack have historically been lax about const correctness. We don't, for example, consistently distinguish between a data accessor granting mutable vs const access. This makes it challenging to add instrumentation that can distinguish data reads from data writes.

Furthermore, we mark methods const that give out mutable handles to class internals.

We should be strict on our tensor class and its internals about these accesses.

There is a straightforward migration path that forces us to make a decision at each callsite: change the existing method to return a const pointer and introduce an equivalent variant named `mutable_<original_method_name>` that gives a non-const pointer. Then we just fix what breaks.

While doing this, we need to be careful about not just blindly changing to the mutable variant: we should only do so when we must.

Challenges:
Some of our libraries were designed without considering this and will require some redesign to accommodate this distinction. For example, TensorIterator levels all of its arguments to non-const. JIT function calls do the same.

### Alternatives

_No response_

### Additional context

We want this right now to instrument reads/writes with high fidelity to accurately simulate and also implement copy-on-write tensors.

cc @ezyang @bhosmer @smessmer @ljk53 @bdhirsh @kurtamohler
Repository: rust
Issue: C/C++ code linked to Rust code can't use some clang builtins
Labels: A-linkage,E-hard,O-android,A-FFI,E-mentor,T-compiler,C-bug

This is theoretically a problem that applies to all platforms, but in practice, at least on Linux, the rust compiler is saved by the forced linkage of libgcc_s (which, incidentally, is not really desirable when using clang's `--rtlib` argument, but that's another story). It is a problem on x86_64 Android.

Here are steps to reproduce the problem:

Download and unpack Android NDK r25c:
```
$ wget https://dl.google.com/android/repository/android-ndk-r25c-linux.zip
$ unzip android-ndk-r25c-linux.zip
```
Create a test crate:
```
$ cargo new --bin testcase
$ cd testcase
$ cat <<EOF >> Cargo.toml
[build-dependencies]
cc = "1.0"
EOF
$ cat <<EOF > build.rs
fn main() {
    cc::Build::new().file("foo.cpp").compile("foo");
}
EOF
$ cat <<EOF > src/main.rs
#[link(name="foo")]
extern {
    fn foo(d: f64);
}

fn main() {
    unsafe {
        foo(42.0);
    }
}
EOF
$ cat <<EOF > foo.cpp
extern "C" __float128 foo(double d) {
    return d;
}
EOF
```
Compile the crate (with some manual work that presumable cargo-apk would do):
```
$ export RUSTFLAGS="-Clinker=$PWD/../android-ndk-r25c/toolchains/llvm/prebuilt/linux-x86_64/bin/clang -Clink-arg=--target=x86_64-linux-android31 -Clink-arg=--sysroot=/tmp/android-ndk-r25c/toolchains/llvm/prebuilt/linux-x86_64/sysroot"
$ export CC=$PWD/../android-ndk-r25c/toolchains/llvm/prebuilt/linux-x86_64/bin/clang
$ export AR=$PWD/../android-ndk-r25c/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar
$ cargo build --target=x86_64-linux-android
```

This fails to link with, eventually:
```
  = note: ld: error: undefined symbol: __extenddftf2
          >>> referenced by foo.cpp:2
          >>>               foo.o:(foo) in archive /tmp/testcase/target/x86_64-linux-android/debug/build/testcase-7b8046ba34d79ef2/out/libfoo.a
          clang-14: error: linker command failed with exit code 1 (use -v to see invocation)
```

The `__extenddftft2` symbol comes from the compilation of the function `foo`, for the extension of the 64-bits double to a 128-bits double. It is part of libclang_rt that comes with clang. But because rustc calls the linker (clang) with `-nodefaultlibs`, the clang runtime is not compiled in. And because the equivalent compiler-builtins from rustc doesn't contain all the clang builtins, this fails to link.

When linking dynamic libraries, the link actually goes through without an error, but yields an error when the library is loaded at runtime because of the missing `__extenddftft2` symbol. You'll find multiple people running into this problem over the years, but somehow I didn't find it reported against the rust compiler (example: https://github.com/mozilla/application-services/issues/5436).

Because the `__extenddftft2` symbol exists in rustc's compiler-builtins for aarch64 android, it's not a problem on that platform.
Repository: vscode
Issue: `e` key mapped to Backspace in X11 forwarded window
Labels: bug,keybindings

Only seeing this when using X11 forwarding for the window. VS Code runs in a Linux container, the window is displayed on a Mac.

```
2023-03-29 06:22:14.209 [info] [KeybindingService]: / Received  keydown event - modifiers: [], code: Backspace, keyCode: 69, key: e
2023-03-29 06:22:14.271 [info] [KeybindingService]: | Converted keydown event - modifiers: [], code: Backspace, keyCode: 35 ('E')
2023-03-29 06:22:14.272 [info] [KeybindingService]: | Resolving [Backspace]
2023-03-29 06:22:14.273 [info] [KeybindingService]: \ From 1 keybinding entries, matched deleteLeft, when: textInputFocus, source: built-in.
2023-03-29 06:22:14.273 [info] [KeybindingService]: + Invoking command deleteLeft.
```

Version: 1.77.0-insider
Commit: 10295b5bae81a83b7d940f9d64756c115af662c8
Date: 2023-03-28T20:37:46.504Z
Electron: 19.1.11
Chromium: 102.0.5005.196
Node.js: 16.14.2
V8: 10.2.154.26-electron.0
OS: Linux arm64 5.15.49-linuxkit
Sandboxed: Yes
Repository: pytorch
Issue: Unable to install torch on python 3.8.16
Labels: needs reproduction,module: binaries,triaged

### 🐛 Describe the bug

We have the ci pipeline which will install python 3.8.16 and on top of that we install torch package.
python -m pip  install -r requirements.txt
requirements.txt contains
torch==2.0.0

Error we getting is 
ERROR: Ignored the following versions that require a different python version: 1.9.5 Requires-Python >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, <3.7
ERROR: Could not find a version that satisfies the requirement torch==2.0.0 (from versions: none)
ERROR: No matching distribution found for torch==2.0.0

### Versions

3.8.16

cc @seemethere @malfet
Repository: stable-diffusion-webui
Issue: [Bug]: "Expecting value: line 1 column 1 (char 0)" thrown, when I added "--listen" to my "COMMANDLINE_ARGS"
Labels: asking-for-help-with-local-system-issues

### Is there an existing issue for this?

- [X] I have searched the existing issues and checked the recent builds/commits

### What happened?

Hello,  developers

I added --listen arg to my COMMANDLINE_ARGS, like "set COMMANDLINE_ARGS= --listen".  which located at "webui-user.bat" file.

Then the error throw out. "Expecting value: line 1 column 1 (char 0)", here is the screenshot for this error:
![image](https://user-images.githubusercontent.com/123862858/228448734-3f2a0fb1-560b-4559-a71c-4eeda026a5a0.png)
 
BTW, I created a new instance, and repeat the steps above, the error still reproduced.

[System]: windows 10

Please someone help.

Thank you for your patient reading.



### Steps to reproduce the problem

1. git clone the repo
2. run 
4. set COMMANDLINE_ARGS= --listen at  `webui-user.bat`
5. rerun

### What should have happened?

Can run normally and access the instance locally 

### Commit where the problem happens

3856ada5cc9ac4124e20ff311ce7aa77330845d9

### What platforms do you use to access the UI ?

Windows

### What browsers do you use to access the UI ?

Google Chrome

### Command Line Arguments

```Shell
COMMANDLINE_ARGS= --listen
```


### List of extensions

No

### Console logs

```Shell
venv "H:\test\stable-diffusion-webui\venv\Scripts\Python.exe"
Python 3.10.10 (tags/v3.10.10:aad5f6a, Feb  7 2023, 17:20:36) [MSC v.1929 64 bit (AMD64)]
Commit hash: 3856ada5cc9ac4124e20ff311ce7aa77330845d9
Installing requirements for Web UI
Launching Web UI with arguments: --api --listen
No module 'xformers'. Proceeding without it.
Loading weights [6ce0161689] from H:\test\stable-diffusion-webui\models\Stable-diffusion\v1-5-pruned-emaonly.safetensors
Creating model from config: H:\test\stable-diffusion-webui\configs\v1-inference.yaml
LatentDiffusion: Running in eps-prediction mode
DiffusionWrapper has 859.52 M params.
Applying cross attention optimization (Doggettx).
Textual inversion embeddings loaded(0):
Model loaded in 3.7s (load weights from disk: 0.2s, create model: 0.4s, apply weights to model: 0.9s, apply half(): 0.8s, move model to device: 0.7s, load textual inversion embeddings: 0.8s).
Running on local URL:  http://0.0.0.0:7860

To create a public link, set `share=True` in `launch()`.
Startup time: 12.0s (import torch: 1.1s, import gradio: 0.8s, import ldm: 0.4s, other imports: 0.7s, setup codeformer: 0.2s, load scripts: 0.6s, load SD checkpoint: 3.8s, create ui: 0.2s, gradio launch: 4.2s, scripts app_started_callback: 0.1s).
```


### Additional information

_No response_
Repository: stable-diffusion-webui
Issue: MPS backend out of memory
Labels: bug-report,platform:mac

### Is there an existing issue for this?

- [X] I have searched the existing issues and checked the recent builds/commits

### What happened?

MacOS，已经顺利进入http://127.0.0.1:7860/网站，但是生成图片出现这个错误
RuntimeError: MPS backend out of memory (MPS allocated: 5.05 GB, other allocations: 2.29 GB, max allowed: 6.77 GB). Tried to allocate 1024.00 MB on private pool. Use PYTORCH_MPS_HIGH_WATERMARK_RATIO=0.0 to disable upper limit for memory allocations (may cause system failure)

### Steps to reproduce the problem

安装MPS

### What should have happened?

RuntimeError: MPS backend out of memory (MPS allocated: 5.05 GB, other allocations: 2.29 GB, max allowed: 6.77 GB). Tried to allocate 1024.00 MB on private pool. Use PYTORCH_MPS_HIGH_WATERMARK_RATIO=0.0 to disable upper limit for memory allocations (may cause system failure)

### Commit where the problem happens

A python: 3.10.10  •  torch: 1.12.1  •  xformers: N/A  •  gradio: 3.16.2  •  commit: 0cc0ee1b  •  checkpoint: bf864f41d5

### What platforms do you use to access the UI ?

MacOS

### What browsers do you use to access the UI ?

Apple Safari

### Command Line Arguments

```Shell
NO
```


### List of extensions

NO

### Console logs

```Shell
RuntimeError: MPS backend out of memory (MPS allocated: 5.05 GB, other allocations: 2.29 GB, max allowed: 6.77 GB). Tried to allocate 1024.00 MB on private pool. Use PYTORCH_MPS_HIGH_WATERMARK_RATIO=0.0 to disable upper limit for memory allocations (may cause system failure)
```


### Additional information

_No response_
Repository: kubernetes
Issue: Improve observability for Pods that specify a `schedulerName` the cluster doesn't have
Labels: sig/scheduling,kind/feature,needs-triage

### What happened?

Use case: apply a deployment with `schedulerName` specified:
```
apiVersion: apps/v1
kind: Deployment
metadata:
  name: nginx-deployment
spec:
  selector:
    matchLabels:
      app: nginx
  replicas: 3
  template:
    metadata:
      labels:
        app: nginx
    spec:
      schedulerName: test  # test not exist
      containers:
      - name: nginx
        image: nginx:1.7.9
        ports:
        - containerPort: 80
```

When the specified `schedulerName` not exist in the cluster, the pod stuck in pending, with no event or log info to debug.

### What did you expect to happen?

To add event or log info when `schedulerName` not exist, to figure out the pod pending reason quickly.

### How can we reproduce it (as minimally and precisely as possible)?

See above.

### Kubernetes version

<details>

```console
$ kubectl version

Client Version: version.Info{Major:"1", Minor:"21", GitVersion:"v1.21.0", GitCommit:"cb303e613a121a29364f75cc67d3d580833a7479", GitTreeState:"clean", BuildDate:"2021-04-08T16:31:21Z", GoVersion:"go1.16.1", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"21", GitVersion:"v1.21.0", GitCommit:"cb303e613a121a29364f75cc67d3d580833a7479", GitTreeState:"clean", BuildDate:"2021-04-08T16:25:06Z", GoVersion:"go1.16.1", Compiler:"gc", Platform:"linux/amd64"}
```

</details>
Repository: opencv
Issue: Windows10 OpenCV4.7 WITH_CUDA=ON BuildError opencv_core
Labels: bug

### System Information

OpenCV => 4.7
Operating System / Platform => Windows 64 Bit
Compiler => Visual Studio 2022
CMAKE => 3.25.3
NVIDIA DRIVER => 451
CUDA => 12.1
CUDNN => 8.8.1
GPU => GTX1660

### Detailed description

```
  zlib.vcxproj -> D:\github\opencv_build\3rdparty\lib\Debug\zlibd.lib
  Processing OpenCL kernels (core)
  Building NVCC (Device) object modules/core/CMakeFiles/cuda_compile_1.dir/src/cuda/Debug/cuda_compile_1_generated_gpu_mat.cu.obj
  CMake Error at cuda_compile_1_generated_gpu_mat.cu.obj.Debug.cmake:220 (message):
    Error generating
    D:/github/opencv_build/modules/core/CMakeFiles/cuda_compile_1.dir/src/cuda/Debug/cuda_compile_1_generated_gpu_mat.cu.obj


C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(247,5): error MSB8066: 'D:\github\opencv
_build\CMakeFiles\e57f30be6bd7b8ee23272bbc8e3399bd\opencl_kernels_core.cpp.rule;D:\github\opencv\modules\core\src\cuda\gpu_mat.cu;D:\github\opencv\mod
ules\core\src\cuda\gpu_mat_nd.cu' のカスタム ビルドがコード 1 で終了しました。 [D:\github\opencv_build\modules\core\opencv_core.vcxproj]

```

### Steps to reproduce

reference: https://github.com/opencv/opencv/issues/23280
The version for GTX1660 is actually 7.5 not 8.9, but I'm going with 8.9 to test the build
```
cd D:/github
git clone [opencv](https://github.com/opencv/opencv)
git clone [opencv_contrib](https://github.com/opencv/opencv_contrib)

cmake.exe -B"D:/github/opencv_build" -H"D:/github/opencv" -G"Visual Studio 17 2022" -DOPENCV_EXTRA_MODULES_PATH="D:/github/opencv_contrib/modules" -DWITH_CUDA=ON -DCUDA_ARCH_BIN=8.9 -DCUDA_ARCH_PTX=8.9
```

### Issue submission checklist

- [X] I report the issue, it's not a question
- [X] I checked the problem with documentation, FAQ, open issues, forum.opencv.org, Stack Overflow, etc and have not found any solution
- [X] I updated to the latest OpenCV version and the issue is still there
- [X] There is reproducer code and related data files (videos, images, onnx, etc)
Repository: angular
Issue: formBuilder.group controls with property of array type, not work. 
Labels: area: forms

### Which @angular/* package(s) are the source of the bug?

forms

### Is this a regression?

Yes

### Description

When trying to declare a form with array property, using form builder -
It doesn't work, it recognizes it as null instead of Array<null>.

![image](https://user-images.githubusercontent.com/15003252/228466605-b09b6bd5-753e-419a-9f2b-5afccd8f0128.png)


If this is desired behavior - it should be added in the documentation.
So that we don't waste a lot of time to understand what the problem is and why the code is broken.

Thanks!


### Please provide a link to a minimal reproduction of the bug

https://stackblitz.com/edit/angular-m2rwrv?file=src/main.ts

### Please provide the exception or error you saw

```true
Error in src/main.ts (38:19)
Object is possibly 'null'.
```


### Please provide the environment you discovered this bug in (run `ng version`)

```true
Angular CLI: 15.2.4
Node: 14.21.1
Package Manager: npm 6.14.17
OS: win32 x64

Angular: 15.2.4
... animations, cli, common, compiler, compiler-cli, core, forms
... localize, platform-browser, platform-browser-dynamic, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1502.4
@angular-devkit/build-angular   15.2.4
@angular-devkit/core            15.2.4
@angular-devkit/schematics      15.2.4
@angular/cdk                    15.2.3
@angular/material               15.2.3
@schematics/angular             15.2.4
rxjs                            7.8.0
typescript                      4.9.5
```


### Anything else?

_No response_
Repository: kubernetes
Issue: Allow custom tolerance levels for horizontal pod autoscalers
Labels: sig/autoscaling,kind/feature,needs-triage

### What would you like to be added?

We have a configuration for HPA called `horizontal-pod-autoscaler-tolerance` in [Kube Controller Manager](https://kubernetes.io/docs/reference/command-line-tools-reference/kube-controller-manager/), defaulted to `0.1`.

An individual HPA should be allowed to set a custom value for this, overriding the default value. Sample yaml:
```yaml
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
  name: sample-hpa
  namespace: holmes-seldon
spec:
  scaleTargetRef:
    apiVersion: apps/v1
    kind: Deployment
    name: sample-deployment
  minReplicas: 20
  maxReplicas: 450
  metrics:
  - resource:
      name: cpu
      target:
        averageUtilization: 60
        type: Utilization
    type: Resource
  behavior:
    scaleDown:
        tolerance: 0.05  # Custom tolerance value for scaledown
    scaleUp:
        tolerance: 0.02 # Custom tolerance value for scaleUp
```

### Why is this needed?

K8 Clusters in organizations are often used by multiple applications with different needs. Allowing individual HPA to set their own tolerance limits (and possibly other HPA related config) can help in handling different usecases smoothly.
Repository: opencv
Issue: I can't set the buffersize in opencv 
Labels: bug,feature,category: videoio

### System Information

ubuntu : 22.04
opencv = 4.7.0
gcc version 10.4.0



### Detailed description

I can't set 
vid.set(cv2.CAP_PROP_BUFFERSIZE, 1)
it returns False 
and when print(vid.get(cv2.CAP_PROP_BUFFERSIZE))

### Steps to reproduce
```python
# import the opencv library
import cv2
import time


# define a video capture object
myrtmp_addr = "rtmp://172.20.10.5:1935/live"
vid = cv2.VideoCapture(myrtmp_addr)
succ = vid.set(cv2.CAP_PROP_BUFFERSIZE, 1)
print(succ)
print(vid.get(cv2.CAP_PROP_BUFFERSIZE))

while(True):
	if not vid.isOpened():
		print("can't open the camera")
		continue
	ret, frame = vid.read()
	if ret is False:
		print("can't capture the frame")
		continue

	cv2.imshow('frame', frame)
	if cv2.waitKey(1) & 0xFF == ord('q'):
		break

vid.release()
# Destroy all the windows
cv2.destroyAllWindows()
```

### Issue submission checklist

- [X] I report the issue, it's not a question
- [X] I checked the problem with documentation, FAQ, open issues, forum.opencv.org, Stack Overflow, etc and have not found any solution
- [X] I updated to the latest OpenCV version and the issue is still there
- [ ] There is reproducer code and related data files (videos, images, onnx, etc)
Repository: next.js
Issue: Next.js `[...slug]` is not correctly parsed when using `experimental-edge` runtime on Vercel, it's always `undefined`
Labels: bug,Runtime

### Verify canary release

- [X] I verified that the issue exists in the latest Next.js canary release

### Provide environment information

```bash
Operating System:
      Platform: darwin
      Arch: arm64
      Version: Darwin Kernel Version 22.3.0: Mon Jan 30 20:39:46 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T6020
    Binaries:
      Node: 18.14.2
      npm: 9.5.0
      Yarn: 1.22.19
      pnpm: 7.29.1
    Relevant packages:
      next: 13.2.4
      eslint-config-next: 12.3.1
      react: 18.2.0
      react-dom: 18.2.0
```


### Which area(s) of Next.js are affected? (leave empty if unsure)

Middleware / Edge (API routes, runtime)

### Link to the code that reproduces this issue

https://github.com/remorses/vercel-next-bug-dynamic-param

### To Reproduce


1. deploy on vercel
2. open deployed site on a path with 2 parts (like x/x) (https://vercel-next-bug-dynamic-param-fy6g23d6i-xmorse.vercel.app/x/x as an example)
3. the slug param will be ['x/x'] instead of ['x', 'x']

I also opened an issue on the vercel repo given that this issue only happens on Vercel, the problem must be in the Vercel Next deployer

https://github.com/vercel/vercel/issues/9723

### Describe the Bug

On a page `[...slug]`, the slug param will be ['x/x'] instead of ['x', 'x'] when visiting the `x/x` path


### Expected Behavior

Should be `['x', 'x']`

### Which browser are you using? (if relevant)

_No response_

### How are you deploying your application? (if relevant)

_No response_
Repository: go
Issue: net/http/httptest: deadlock in Server.Close on plan9
Labels: OS-Plan9,NeedsInvestigation

```
#!watchflakes
post <- builder ~ `^plan9` && pkg == "net/http" && `test timed out` && `blocked in Close`
```
This is a peculiar one. So far just one occurrence at https://build.golang.org/log/042a896ae485c11f420d43237a20b30bf7aa54f9 running `TestResponseControllerSetFutureWriteDeadline`.

It appears the server is waiting for the listener goroutine, which is blocked in a syscall opening a tcp connection's `listen` file. No other significant goroutines are running. If the test has actually ended, the open should have been cancelled. Not clear why this didn't happen.