sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: pytorch
Issue: Feature Request: Bayesian Personalized Ranking Loss
Labels: feature,module: nn,module: loss,triaged,actionable

### 🚀 The feature, motivation and pitch

I am currently working on graph neural network applications to recommender systems. A common loss function that keeps coming is the Bayesian Personalized Ranking loss as described in the 2012 paper by Rendle et al. titled [BPR: Bayesian Personalized Ranking from Implicit Feedback](https://arxiv.org/abs/1205.2618). 

Given that the BPR loss function is a useful contrastive loss to train recommender systems, I implemented it in PyTorch and would now love to submit it for review.

### Alternatives

While there are other ranking loss functions, the BPR loss would be a valuable addition to the PyTorch library.

### Additional context

One example of a domain and model for which the BPR loss would be helpful is music playlist continuation. I recently implemented the LightGCN graph neural network from the paper [LightGCN: Simplifying and Powering Graph Convolution Network for Recommendation](https://arxiv.org/abs/2002.02126) to recommend new songs for playlists which uses the BPR loss function to learn embeddings for nodes in a graph.

I have working code for the BPR loss ready to be submitted.

cc @albanD @mruberry @jbschlosser @walterddr @mikaylagawarecki @kshitij12345
Repository: bitcoin
Issue: add ability to remove imported public keys/addresses (or even privkeys)
Labels: Feature

### add ability to remove imported public keys/addresses (or even privkeys) without the need of (hex) editing wallet.dat

**Is your feature request related to a problem? Please describe.**
<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->
I have an address in my wallet imported with `bitcoin-cli importaddress` that is read-only and shows up between my spendable UTXOs

**Describe the solution you'd like**
<!-- A clear and concise description of what you want to happen. -->
`bitcoin-cli removepubkey`, `bitcoin-cli removeaddress`

**Describe alternatives you've considered**
<!-- A clear and concise description of any alternative solutions or features you've considered. -->

**Additional context**
<!-- Add any other context or screenshots about the feature request here. -->
Repository: go
Issue: cmd/compile/internal/logopt: occasional timeouts on netbsd-amd64-9_0 builders
Labels: OS-NetBSD,NeedsInvestigation

`greplogs --dashboard -md -l -e 'panic: test timed out.*\n(?:\ngoroutine .*:\n(?:.+\n\t.+\n)+)*FAIL\s+cmd/compile/internal/logopt'`

[2021-12-10T19:26:50-766f89b/netbsd-amd64-9_0-n2](https://build.golang.org/log/0c4a1b7dc8c0c4c227613afc90e09d4017aceb07)
[2021-04-15T00:40:43-566a87c/netbsd-amd64-9_0](https://build.golang.org/log/bfb07e10ef26032af9063d9e8724bf3626f02b5e)

Note that `netbsd-amd64-9_0-n2` is one of the builders <strong>not</strong> believed to be affected by #49209.

(CC @bsiegert, @coypoop)
Repository: go
Issue: cmd/go: import of vendored package error "cannot find package" from testdata package
Labels: NeedsInvestigation,GoCommand

<!--
Please answer these questions before submitting your issue. Thanks!
-->

### What version of Go are you using (`go version`)?

<pre>
$ go version
go version devel go1.18-f6d4b9ad5c Mon Dec 13 16:39:15 2021 -0500 linux/amd64
</pre>

### Does this issue reproduce with the latest release?

Yes.

### What operating system and processor architecture are you using (`go env`)?

<details><summary><code>go env</code> Output</summary><br><pre>
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/usr/local/google/home/mpratt/.cache/go-build"
GOENV="/usr/local/google/home/mpratt/.config/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/usr/local/google/home/mpratt/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/usr/local/google/home/mpratt/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/google/home/mpratt/src/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/google/home/mpratt/src/go/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="devel go1.18-f6d4b9ad5c Mon Dec 13 16:39:15 2021 -0500"
GCCGO="gccgo"
GOAMD64="v1"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/usr/local/google/home/mpratt/src/go/src/go.mod"
GOWORK=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build1377042719=/tmp/go-build -gno-record-gcc-switches"
</pre></details>

### What did you do?

<!--
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on go.dev/play is best.
-->

1. Checkout https://golang.org/cl/371298
2. Build: `./bin/go build cmd/testdata/foo`

### What did you expect to see?

Successful build

### What did you see instead?

`cmd/testdata/foo/main.go:4:2: cannot find package`

Note that the binary in `cmd/foo` builds just fine. The only difference is that the former is in a `testdata/` directory. `golang.org/x/sys/unix` is vendored in `cmd/vendor/...`.

cc @bcmills
Repository: material-ui
Issue: [Avatar] Show tips or implement contain CSS property
Labels: new feature,component: avatar

### Duplicates

- [X] I have searched the existing issues

### Latest version

- [X] I have tested the latest version

### Summary 💡

Well, I wrote  big react JS module will exploit CSS performance to the fullest, after having had some headaches I figured out that when the image load inside MUI avatar root, well,my module freezed for a few seconds, it is not just poor code my side, or maybe event not at all, but it has enabled me to discover that `contain: "strict",` property and value make it being not impacting style and layout of completely not-so-random other items on the page, way faster and it avoid confusion (of course not for programmer but for the browser!)

### Examples 🌈

https://wallet.crypto.red/gallery/newest/search/halo/@primerz/20211109t171813474z-crypto-red

(Code may be patched soon, so it will not have this issue, but the same context)

### Motivation 🔦

`".MuiAvatar-root": {
      contain: "strict",
  },`
  
  Is infinity percent faster (compared to a few ms freezed css)
Repository: flutter
Issue: [Mac] Downloaded executables cannot execute on host, refers to closed issue
Labels: tool,t: flutter doctor,a: error message,P2,team-tool,triaged-tool

My Flutter seems fudged. I have not been able to resolve an error in flutter doctor.
The error message itself refers to a closed issue - https://github.com/flutter/flutter/issues/6207 but that is specific to Linux and I am using a Mac machine.
That issue [has a comment directing folks on Mac](https://github.com/flutter/flutter/issues/6207#issuecomment-498976571) running into the same issue to see https://github.com/flutter/flutter/issues/22598, which is also a closed issue.

This may just be an error message that needs updating. Not sure. 🙃 

**flutter doctor -v**

```
[!] Flutter (Channel master, 2.6.0-12.0.pre.1017, on macOS 12.0.1 21A559 darwin-x64,
    locale en)
    • Flutter version 2.6.0-12.0.pre.1017 at /Users/katelovett/_github/flutter
    • Upstream repository git@github.com:flutter/flutter.git
    • Framework revision babfcb99d1 (30 minutes ago), 2021-12-13 14:44:10 -0800
    • Engine revision c0ca56ca31
    • Dart version 2.16.0 (build 2.16.0-85.0.dev)
    • DevTools version 2.9.1
    ✗ Downloaded executables cannot execute on host.
      See https://github.com/flutter/flutter/issues/6207 for more information


[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0-rc2)
    • Android SDK at /Users/katelovett/Library/Android/sdk
    • Platform android-31, build-tools 31.0.0-rc2
    • Java binary at: /Applications/Android Studio with
      Blaze.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7281165)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 13.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • CocoaPods version 1.10.1

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2020.3)
    • Android Studio at /Applications/Android Studio with Blaze.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7281165)

[✓] IntelliJ IDEA Ultimate Edition (version 2021.2.3)
    • IntelliJ at /Applications/IntelliJ UE (stable).app
    • Flutter plugin version 62.0.3
    • Dart plugin version 212.5632

[✓] VS Code (version 1.62.3)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.29.0

[✓] Connected device (2 available)
    • macOS (desktop) • macos  • darwin-x64     • macOS 12.0.1 21A559 darwin-x64
    • Chrome (web)    • chrome • web-javascript • Google Chrome 96.0.4664.93

! Doctor found issues in 1 category.
```
Repository: node
Issue: stack size exceeded on M1/arm64 but not on x86
Labels: v8 engine,arm

### Version

v16.13.1

### Platform

Darwin USAGPM.local 21.2.0 Darwin Kernel Version 21.2.0: Sun Nov 28 20:28:41 PST 2021; root:xnu-8019.61.5~1/RELEASE_ARM64_T6000 arm64

### Subsystem

_No response_

### What steps will reproduce the bug?

I have a project with about 1000 typescript files (it's private so I can't point you at it, sorry).  It's a react project that uses create-react app.

The arm version of v16 gives:

```
Failed to compile.

undefined
fork-ts-checker-webpack-plugin error in undefined(undefined,undefined):
Maximum call stack size exceeded  TSINTERNAL
```

The x86 version works fine.  I've tried every arm version of v16 that I can find, all have the same issue, every x86 version works with no problem. Running `yarn tsc` explicitly works fine with both the arm and the x86 version.



### How often does it reproduce? Is there a required condition?

With the affected project it happens 100% of the time, with other projects I can't reproduce this.

### What is the expected behavior?

x86 and arm behavior should be identical.

### What do you see instead?

_No response_

### Additional information

_No response_
Repository: flutter
Issue: Wrap (via the linker) the exit, abort, and other functions that are unsafe from the Flutter Engine dylib.
Labels: engine,P3,team-engine,triaged-engine

We run into issues in the wild where applications calling `exit` without gracefully terminating the engine will cause crashes being reported to crash reporting mechanisms. These crashes are hard to reproduce because they happen on their way to a process termination. Even engine components like Tonic have caused these issues.

Linkers support the `--wrap` flag that replaces undefined references to a specified symbol with a custom wrapper.  I propose wrapping these calls that are unsafe and violate platform guidelines with replacements that insert a clearly named stack frame in the trace before terminating the process. Something like:


```
void APPLICATION_CALLED_UNSAFE_EXIT() {
  std::abort();
}

__wrap_exit(int retcode) {
  APPLICATION_CALLED_UNSAFE_EXIT();
}
```

Per @rmacnak-google, a mechanism was also introduced for Fuchsia (where restrictions similar to iOS/Android exist) that forced calls to exit throw an exception.

The following embedder config may be used to enforce that policy on other embedders and must be done on all isolate launches (cc @zanderso). This will only work for calls from Dart and only for `exit`:

```
Dart_Handle embedder_config_type =
    Dart_GetNonNullableType(io_lib, ToDart("_EmbedderConfig"), 0, nullptr);
FML_CHECK(!LogIfError(embedder_config_type));
Dart_Handle may_exit_result = Dart_SetField(
    embedder_config_type, ToDart("_mayExit"),
    ToDart(false));
FML_CHECK(!LogIfError(may_exit_result));
```

I propose setting the embedder config in Dart for all embedders as well wrapping the unsafe calls so crashes reported due to this are easily identifiable.

This will still not handle plugins and the application process calling `exit` however as the linker wrap will only affect references from the engine and its dependencies.
Repository: godot
Issue: Add a Viewport method to set the tooltip delay at run-time
Labels: enhancement,topic:gui

### Godot version

v3.4.1.rc2.official [d5aa00c2c]

### System information

Ubuntu

### Issue description

Tried to **change** **tooltip_timer_delay** in **ProjectSettings** **through code**, but looks like timer takes the value, but doesn't applies it to timeout.

```gdscript
# main.gd
extends Node


func _ready():
	ProjectSettings.set_setting("gui/timers/tooltip_delay_sec", 0.1)
	print(ProjectSettings.get_setting("gui/timers/tooltip_delay_sec"))  # 0.1
```

```gdscript
# button.gd
extends Button


func _ready():
	hint_tooltip = "Lasciate ogni speranza, voi ch'entrate"

```
noticed that **If you change value within editor, timeout works correctly**


### Steps to reproduce

1. run attachment
or
1. attach code below to node
2. add some nodes with tooltips to the scene

### Minimal reproduction project

[New Game Project.zip](https://github.com/godotengine/godot/files/7707837/New.Game.Project.zip)
Repository: realworld
Issue: [Bug]: Regex in Postman collection rejects valid ISO-8601 timestamps
Labels: bug

### Relevant scope

Other: describe below

### Description


I'm working on a Rust implementation of the backend spec, and I'm using [`time 0.2`](https://crates.io/crates/time/0.2.27) for timestamps such as the `createdAt` timestamps of Articles.

The RFC 3339 (subset of ISO 8601) formatter included with `time 0.2` produces timestamps like this: `2021-12-14T03:09:36+00:00`

This is a valid ISO 8601 timestamp and can be parsed using, e.g. Javascript's `Date.parse()` just fine, but it gets rejected by the regex used in the Postman collection here:

```
↳ Create Article
  POST http://localhost:8080/api/articles [200 OK, 450B, 15ms]
  ✓  Response contains "article" property
  ✓  Article has "title" property
  ✓  Article has "slug" property
  ✓  Article has "body" property
  ✓  Article has "createdAt" property
  7. Article's "createdAt" property is an ISO 8601 timestamp
  ✓  Article has "updatedAt" property
  8. Article's "updatedAt" property is an ISO 8601 timestamp
  ✓  Article has "description" property
  ✓  Article has "tagList" property
  ✓  Article's "tagList" property is an Array
  ✓  Article has "author" property
  ✓  Article has "favorited" property
  ✓  Article has "favoritesCount" property
  ✓  favoritesCount is an integer
```

I'm not sure the regex being used is entirely correct here: https://github.com/gothinkster/realworld/blob/6e73f5ee714ae502f5f6ef4aa95bd10fec4ae59b/api/Conduit.postman_collection.json#L332

Unescaped version:
```
^\d{4,}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d.\d+(?:[+-][0-2]\d:[0-5]\d|Z)$
```

It appears to require a decimal subsecond segment but matches on the decimal separator using an unescaped `.` which matches any single character instead of an escaped `\.` matching a literal dot. If I tweak the regex to fix this and make the subsecond fragment optional, my timestamp passes:

```
^\d{4,}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d(\.\d+)?(?:[+-][0-2]\d:[0-5]\d|Z)$
```
Repository: flutter
Issue: [google_maps] Pixel 6 map goes blank on device orientation change
Labels: platform-android,p: maps,package,e: OS-version specific,P2,team-android,triaged-android

## Steps to Reproduce

1. create an app with a full screen google maps
2. run it on android phone (pixel 6)
3. switch the phone orientation multiple time
4. sometime the map disappears

**Expected results:** 
map not disappearing

```
[✓] Flutter (Channel stable, 2.8.0, on elementary OS 5.1.7 Hera 5.4.0-91-generic, locale en_US.UTF-8)
    • Flutter version 2.8.0 at /home/renan/code/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision cf44000065 (5 days ago), 2021-12-08 14:06:50 -0800
    • Engine revision 40a99c5951
    • Dart version 2.15.0

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
    • Android SDK at /home/renan/Android/Sdk
    • Platform android-31, build-tools 29.0.3
    • Java binary at: /home/renan/code/android-studio/jre/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
    • All Android licenses accepted.

[✓] Chrome - develop for the web
    • Chrome at google-chrome

[✓] Linux toolchain - develop for Linux desktop
    • clang version 6.0.0-1ubuntu2 (tags/RELEASE_600/final)
    • cmake version 3.10.2
    • ninja version 1.8.2
    • pkg-config version 0.29.1

[✓] Android Studio (version 4.1)
    • Android Studio at /home/renan/code/android-studio
    • Flutter plugin version 59.0.2
    • Dart plugin version 203.8292
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)

[✓] VS Code (version 1.63.0)
    • VS Code at /usr/share/code
    • Flutter extension version 3.29.0

[✓] Connected device (3 available)
    • Pixel 6 (mobile) • 19291FDF60092F • android-arm64  • Android 12 (API 31)
    • Linux (desktop)  • linux          • linux-x64      • elementary OS 5.1.7 Hera 5.4.0-91-generic
    • Chrome (web)     • chrome         • web-javascript • Google Chrome 96.0.4664.93

• No issues found!
```
Repository: pytorch
Issue: [FSDP] Enable tests for Gloo backend
Labels: oncall: distributed,better-engineering,Stale,module: fsdp

### 🚀 The feature, motivation and pitch

FSDP tests are enabled for NCCL backend and NCCL backend is the primarily used in production for performance, but for backend parity we should ensure FSDP is well-supported for Gloo backend as well. 

### Alternatives

_No response_

### Additional context

_No response_

cc @pietern @mrshenli @pritamdamania87 @zhaojuanmao @satgera @rohan-varma @gqchen @aazzolini @osalpekar @jiayisuse @SciPioneer @H-Huang
Repository: pytorch
Issue: [feature request] Support `like=` argument in tensor factory methods
Labels: feature,triaged,module: numpy,module: tensor creation

### 🚀 The feature, motivation and pitch

This argument is supported by NumPy. Introducing it will make for more concise / clear / less error-prone (as there're increasingly many tensor creation options) `torch.tensor(...)` calls, and enable more practical `like=` for `torch.arange` and `torch.randperm`.

We had discussed it some long time ago, it wasn't supported back then, but now NumPy also supports it :) So maybe it's a stronger argument now.

Most recently proposed in: https://github.com/pytorch/pytorch/issues/69822#issuecomment-992311142

### Alternatives

_No response_

### Additional context

_No response_

cc @mruberry @rgommers @gchanan
Repository: pytorch
Issue: subclassing torch.Tensor
Labels: triaged,enhancement,tensor subclass

### 🚀 The feature, motivation and pitch

according to the docs:
https://pytorch.org/docs/stable/notes/extending.html

```
Subclassing torch.Tensor

As of version 1.7.0, methods on torch.Tensor and functions in public torch.* namespaces applied on torch.Tensor subclasses will return subclass instances instead of torch.Tensor instances:
```

can you please add the option to decide what is the return type of these operations (and slicing)?
i.e: when subclassing `torch.Tensor`, and slicing from it - the result will be either the subclass or `torch.Tensor` according to some class variable user defines? 

Example:
```
class MyTensor(torch.Tensor):

    operate_as_subclass = False  # suggestion

    @staticmethod
    def __new__(cls, data, **kwargs):
        tensor = torch.tensor(data, **kwargs)

        return super().__new__(cls, data, **kwargs)
```
so modifying `operate_as_subclass` will control the returning type of operations and slicing,
Repository: go
Issue: x/mobile: build doesn't include libc++_shared.so to produced .aar file and app  crashes 
Labels: NeedsInvestigation,mobile

<!--
Please answer these questions before submitting your issue. Thanks!
-->

### What version of Go are you using (`go version`)?

```
go version go1.17.5 linux/amd64
```

### Does this issue reproduce with the latest release?

yes

### What operating system and processor architecture are you using (`go env`)?

```
GO111MODULE="on"
GOARCH="amd64"
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOVERSION="go1.17.4"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
...
```

### What did you do?
I use the open source project `github.com/anacrolix`, and want to build an Android aar for my project.
After `gomobile bind -v  -target=android ./android/   `, successfully exported an .aar file for me. Then i import the aar to my project use
`implementation files('libs/bt.aar')` . The apk build successfully too. But when i launch the apk and cal the method in aar,like ` SDK.Start`, my app crashed. Here is the error log

```
    java.lang.UnsatisfiedLinkError: dlopen failed: library "libc++_shared.so" not found
        at java.lang.Runtime.loadLibrary0(Runtime.java:1071)
        at java.lang.Runtime.loadLibrary0(Runtime.java:1007)
        at java.lang.System.loadLibrary(System.java:1667)
        at go.Seq.<clinit>(Seq.java:37)
        at go.Seq.touch(Seq.java:50)
```


### What did you expect to see?
apk run successful


### What did you see instead?

crashed
Repository: vscode
Issue: Notebook showNotebookDocument / Active/Visible Editor tests failures
Labels: debt,integration-test-failure,web,notebook

https://dev.azure.com/monacotools/Monaco/_build/results?buildId=146750&view=logs&j=672276a2-8d3a-5fab-615d-090c51352f92&t=c55167a9-8752-5898-67fa-9d7c918c61b3&l=412

```
1) Notebook Editor
       showNotebookDocment:
     Error: Timeout of 60000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (D:\a\1\s\extensions\vscode-api-tests\out\singlefolder-tests\notebook.editor.test.js)
      at listOnTimeout (internal/timers.js:554:17)
      at processTimers (internal/timers.js:497:7)

  2) Notebook Editor
       Active/Visible Editor:
     Error: Timeout of 60000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (D:\a\1\s\extensions\vscode-api-tests\out\singlefolder-tests\notebook.editor.test.js)
      at listOnTimeout (internal/timers.js:554:17)
      at processTimers (internal/timers.js:497:7)

```