sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: pytorch
Issue: InfoNCE loss for contrastive learning
Labels: module: loss,triaged,enhancement

### 🚀 The feature, motivation and pitch

In the last couple of years contrastive self-supervised learning has been gaining popularity, as it allows one to use large amounts of unlabeled data to (pre) train a model. A loss function which is commonly used is the [InfoNCE](https://arxiv.org/abs/1807.03748) loss, having 4620 citations according to scholar. The loss is also used by [MoCo](https://arxiv.org/abs/1911.05722), which has 6416 citations, and [SimCLR](https://arxiv.org/abs/2002.05709), which has 8988 citations. I think this loss would be a good addition to PyTorch considering the popularity and the fact that a similar loss is not yet in PyTorch. 

### Alternatives

There are slight variations in the literature. MoCo added the temperature, which wasn't present in the original definition. SimCLR uses more negative examples from both 'views'. But at it's core there is little difference between these, as the loss is still about applying softmax on the similarity of embeddings. 

Other large papers in this field are [BYOL](https://arxiv.org/pdf/2006.07733.pdf) and [SimSiam](https://arxiv.org/abs/2011.10566), which calculate a mean squared error of embeddings, and [SwAV](https://arxiv.org/abs/2006.09882), which at a glance seems to use a similar loss although I haven't read the paper in detail yet.

### Additional context

For context: I have a repository with an implementation of this loss. Someone opened an issue there asking me to try to contribute it to PyTorch, hence this feature request. The goal of this feature request is to get the InfoNCE loss into PyTorch and not to get my implementation of it in particular in PyTorch. Although, I have no objection to that of course. I genuinely think that this loss, or a variant thereof, will make a valuable contribution.
Repository: go
Issue: log/syslog: local messages (syslog.New()) do not work on macOS Monterey/Ventura
Labels: help wanted,OS-Darwin,NeedsDecision

### What version of Go are you using (`go version`)?

<pre>
$ go version
1.18.10
</pre>

### Does this issue reproduce with the latest release?
Yes

### What operating system and processor architecture are you using (`go env`)?

darwin/arm64

<pre>
$ sw_vers
ProductName:            macOS
ProductVersion:         13.2.1
BuildVersion:           22D68
</pre>

### What did you do?

```go
package main

import (
	"log/syslog"
)

func main() {
	msgStr := `hello`
	w, err := syslog.New(syslog.LOG_WARNING|syslog.LOG_DAEMON, ``)
	if err != nil {
		panic(err)
	}
	w.Err(msgStr)
	w.Close()
}
```

### What did you expect to see?
`hello` logged to the macOS Console.app

### What did you see instead?
Nothing is logged.

I noticed that I can get this working with cgo -

```go
package main

// #include <syslog.h>
// void doLog(int facility, const char *msg) {
//	syslog(facility, "%s", msg);
//}
import "C"

func main() {
	msgStr := `hello`
	C.doLog(C.LOG_ERR|C.LOG_DAEMON, C.CString(msgStr))
}
```

So syslog is working and this is not a configuration issue. I think the problem is that macOS's `logd` no longer accepts syslog messages on `/var/run/syslog`, or perhaps the expected format has changed.

I can see that it's listening:
```
$ sudo lsof|grep var/run/syslog
launchd       1                  root    3u     unix 0x3a45c3be17aa6ff3          0t0                     /private//var/run/syslog
logd        313                  root    7u     unix 0x3a45c3be17aa6ff3          0t0                     /private//var/run/syslog
```

But I'm not sure if calling syslog(3) is using some other mechanism to reach `logd`.
Repository: PowerToys
Issue: [Resolution-External] Quick Accent malfunctioning in Chrome
Labels: Issue-Bug,Needs-Repro,Needs-Triage,Product-Quick Accent

### Microsoft PowerToys version

0.68.1; 0.68

### Installation method

GitHub, Microsoft Store

### Running as admin

Yes

### Area(s) with issue?

Quick Accent

### Steps to reproduce

1. Open Google Chrome
2. Press any key that Quick Accent uses + Quick Accent activation key (arrows, space). This should work as expected.
3. Repeat step 2. This brings up the Quick Accent bar, but with characters that are supposed to show up when pressing the key on the right of the key that you pressed in step 2.
4. No matter what key you activate Quick Accent in Chrome with, it will just cycle through the entire keyboard (including keys that don't activate Quick Accent e.g. Enter)

**Notes:** You can use Quick Accent in other apps without any problems, and the keyboard cycle in Chrome doesn't reset until you restart Chrome. This also effects Edge, but I can not reproduce this bug in Brave.

### ✔️ Expected Behavior

Pressing a Quick Accent supported key + the Quick Accent activation key should bring up the Quick Accent bar with characters related to the key pressed.

### ❌ Actual Behavior

In Chrome (and Edge) it works the first time, but after that it cycles through the keyboard, without the user being able to choose which characters they want to display.

### Other Software

**ESET NOD32**, Google Chrome Canary 113.0.5672.0; Google Chrome 111.0.5563.111; Microsoft Edge
Repository: PowerToys
Issue: PowerRename Task List
Labels: Idea-Enhancement,Product-PowerRename,Needs-Triage

### Description of the new feature / enhancement

The possibility to put in a task list multiple changes to be able to see the result before applying the changes

### Scenario when this would be used?

Sometimes I need to make multiple minor changes to multiple batches of files and it's annoying having to constantly tweak each change

### Supporting information

_No response_
Repository: youtube-dl
Issue: https://olympus.mygreatlearning.com/courses/10977/pages/working-on-hdfs?module_item_id=449013
Labels: site-support-request,incomplete

<!--

######################################################################
  WARNING!
  IGNORING THE FOLLOWING TEMPLATE WILL RESULT IN ISSUE CLOSED AS INCOMPLETE
######################################################################

-->


## Checklist

<!--
Carefully read and work through this check list in order to prevent the most common mistakes and misuse of youtube-dl:
- First of, make sure you are using the latest version of youtube-dl. Run `youtube-dl --version` and ensure your version is 2021.12.17. If it's not, see https://yt-dl.org/update on how to update. Issues with outdated version will be REJECTED.
- Make sure that all provided video/audio/playlist URLs (if any) are alive and playable in a browser.
- Make sure that site you are requesting is not dedicated to copyright infringement, see https://yt-dl.org/copyright-infringement. youtube-dl does not support such sites. In order for site support request to be accepted all provided example URLs should not violate any copyrights.
- Search the bugtracker for similar site support requests: http://yt-dl.org/search-issues. DO NOT post duplicates.
- Finally, put x into all relevant boxes (like this [x])
-->

- [x] I'm reporting a new site support request
- [ ] I've verified that I'm running youtube-dl version **2021.12.17**
- [ ] I've checked that all provided URLs are alive and playable in a browser
- [ ] I've checked that none of provided URLs violate any copyrights
- [ ] I've searched the bugtracker for similar site support requests including closed ones


## Example URLs

<!--
Provide all kinds of example URLs support for which should be included. Replace following example URLs by yours.
-->

- Single video: https://www.youtube.com/watch?v=BaW_jenozKc
- Single video: https://youtu.be/BaW_jenozKc
- Playlist: https://www.youtube.com/playlist?list=PL4lCao7KL_QFVb7Iudeipvc2BCavECqzc


## Description

<!--
Provide any additional information.
If work on your issue requires account credentials please provide them or explain how one can obtain them.
-->

WRITE DESCRIPTION HERE
Repository: vscode
Issue: Merge Editor not selecting the next unhandled conflict when using merge.toggleActiveConflictInput1/2
Labels: bug,merge-editor

<!-- ⚠️⚠️ Do Not Delete This! bug_report_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- 🕮 Read our guide about submitting issues: https://github.com/microsoft/vscode/wiki/Submitting-Bugs-and-Suggestions -->
<!-- 🔎 Search existing issues to avoid creating duplicates. -->
<!-- 🧪 Test using the latest Insiders build to see if your issue has already been fixed: https://code.visualstudio.com/insiders/ -->
<!-- 💡 Instead of creating your report here, use 'Report Issue' from the 'Help' menu in VS Code to pre-fill useful information. -->
<!-- 🔧 Launch with `code --disable-extensions` to check. -->
Does this issue occur when all extensions are disabled?: Yes

<!-- 🪓 If you answered No above, use 'Help: Start Extension Bisect' from Command Palette to try to identify the cause. -->
<!-- 📣 Issues caused by an extension need to be reported directly to the extension publisher. The 'Help > Report Issue' dialog can assist with this. -->
Version: 1.76.2
Commit: ee2b180d582a7f601fa6ecfdad8d9fd269ab1884
Date: 2023-03-14T17:57:21.103Z
Electron: 19.1.11
Chromium: 102.0.5005.196
Node.js: 16.14.2
V8: 10.2.154.26-electron.0
OS: Linux x64 5.15.0-67-generic snap
Sandboxed: No

Steps to Reproduce:

1. Start in a merge conflict state and select a conflicted file to open the merge editor
2. Use `merge.goToNextUnhandledConflict` or `merge.goToPreviousUnhandledConflict` to select a conflict
  a. I made keybinds for all of these commands
3. Use `merge.toggleActiveConflictInput1` or `merge.toggleActiveConflictInput2` to resolve the selected conflict
4. Use `merge.goToNextUnhandledConflict` or `merge.goToPreviousUnhandledConflict` to move to the next conflict
5. The conflict under the cursor is not selected, and the commands (in step 3 here) won't do anything because nothing is selected.  

It seems like `merge.toggleActiveConflictInput1`/`merge.toggleActiveConflictInput2` might be unfocusing the merge editor. It breaks the keyboard flow to have to grab the mouse just to select the conflict at the cursor.

Note: I tried using the GUI up/down arrows in the toolbar at the top of the merge editor instead of using `merge.goToNextUnhandledConflict` or `merge.goToPreviousUnhandledConflict`, but it had the same result.
Repository: transformers
Issue: Add Restormer
Labels: New model

### Model description

**Restormer: Efficient Transformer for High-Resolution Image Restoration** was published in CVPR 2022, which introduced a new Vision Transformer based architecture for Image Restoration tasks like Deraining, Motion Deblurring, Defocus Deblurring and Denoising. It reduced the time complexity of Self Attention in Vision Transformers from O(n<sup>2</sup>) to O(n) by introducing **Multi-Dconv Head Transposed Attention**.  It also introduced **Gated-Dconv Feed-Forward Network**. 

@manyana72 and I would like to add this model to Huggingface. 

cc: @NielsRogge 

### Open source status

- [X] The model implementation is available
- [X] The model weights are available

### Provide useful links for the implementation

[Paper](https://arxiv.org/pdf/2111.09881.pdf), [Code Implementation](https://github.com/swz30/Restormer) and [pretrained model weights](https://github.com/swz30/Restormer/releases/tag/v1.0)
Repository: stable-diffusion-webui
Issue: SSL Cert Expired, can't load available extensions list
Labels: bug-report

### Is there an existing issue for this?

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

### What happened?

The cert for the extensions list here has expired.

https://raw.githubusercontent.com/AUTOMATIC1111/stable-diffusion-webui-extensions/master/index.json

I'm getting this error in the UI

URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:997)>
[object Object]

### Steps to reproduce the problem

1. Go to Available Extensions
2. Press Load From



### What should have happened?

List loads

### Commit where the problem happens

Not a code issue. Just had this happen to me for the first time.

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

Windows

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

Mozilla Firefox

### Command Line Arguments

```Shell
N/A
```


### List of extensions

N/A

### Console logs

```Shell
N/A
```


### Additional information

_No response_
Repository: tauri
Issue: (MacOS) tabbingIdentifier does not work if system tabbing is set to fullscreen only [bug] 
Labels: type: bug,platform: macOS,status: needs triage

### Describe the bug

Using tauri 1.2.0 and attempting to use the tabbingIdentifier on MacOS. The tabbing only works if I set the system tabbing configuration to always. I would like to enforce the tabbing behavior despite the system preference.

Issues encountered:
1. With the system preference set to fullscreen, when the app isn't fullscreen, new app windows are not tabbed
2. With the system preference set to fullscreen, if I attempt to fullscreen the app to try the tabbing, it causes the app to freeze with the spinning beach ball.

Change introduced in:
https://github.com/tauri-apps/tauri/pull/5399

### Reproduction

1. Set the tabbingIdentifier for the first app window
```tauri.conf.js
 "windows": [
      {
        "fullscreen": false,
        "resizable": true,
        "title": "Tab Test",
        "width": 1024,
        "height": 768,
        "tabbingIdentifier": "mainApp"
      }
    ]
```
2. Include some app JavaScript to open some new windows:
```app.js
// from somewhere launch windows
import { WebviewWindow } from '@tauri-apps/api/window'
for (let i = 0; i < 2; i++) {
  const webview = new WebviewWindow(`webviewWindow-${Date.now()}`, {
    url: 'http://www.github.com',
    tabbingIdentifier: 'mainApp',
  });
}
```
4. Run app and try spawning new windows

### Expected behavior

If I set a `tabbingIdentifier`, I want the windows to tab regardless of the system preference.

### Platform and versions

```text
Environment
  › OS: Mac OS 13.0.1 X64
  › Node.js: 17.5.0
  › npm: 8.4.1
  › pnpm: Not installed!
  › yarn: Not installed!
  › rustup: 1.25.2
  › rustc: 1.68.0
  › cargo: 1.68.0
  › Rust toolchain: stable-aarch64-apple-darwin 

Packages
  › @tauri-apps/cli [NPM]: 1.2.3
  › @tauri-apps/api [NPM]: 1.2.0
  › tauri [RUST]: 1.2.4,
  › tauri-build [RUST]: 1.2.1,
  › tao [RUST]: 0.15.8,
  › wry [RUST]: 0.23.4,

App
  › build-type: bundle
  › CSP: unset
  › distDir: ../dist
  › devPath: http://localhost:1420/
  › framework: React
  › bundler: Vite

App directory structure
  ├─ dist
  ├─ node_modules
  ├─ public
  ├─ src-tauri
  ├─ .vscode
  └─ src
```


### Stack trace

_No response_

### Additional context

_No response_
Repository: node
Issue: http.ServerResponse.writable always true
Labels: http

### Version

v18.12.1

### Platform

Microsoft Windows NT 10.0.19044.0 x64

### Subsystem

_No response_

### What steps will reproduce the bug?

This is the code from inside http.Server **request** callback. `response` is an http.ServerResponse
```js
console.log("- sending response");
response.writeHead(statusCode, statusMessage, headers);
response.end();

console.log("writable  "+ response.writable)
console.log("socket writable  "+ response.socket.writable)

console.log("ended  "+ response.writableEnded)
console.log("socket ended  "+ response.socket.writableEnded)

console.log("closed  "+ response.closed)        
console.log("socket closed  "+ response.socket.closed)
```
I'm saving `response` to a variable so to send the response in a later moment. Before I'm ready to send the data I wanna know if I can still write, or if I have already sent the data, or if there was some error.... so I implemented http.ServerResponse.writable which turned out to be always true, causing `Error [ERR_STREAM_WRITE_AFTER_END]: write after end` (when the response had already been sent).
So I tested the other options too... and it doesn't seem to make much sense to me.
```
//output
- sending response
writable  true
socket writable  true
ended  true
socket ended  false
closed  undefined
socket closed  false
```
Soo... after ending the response is still "writable"... but if I write I get an error (ofc); it's ended... but the socket is not; we don't know if it's closed, but the socket is...

I apologise if this is not a bug but just me not knowing much about it. if it is a bug I'd also like to know what is the right way around the problem (how to check for sure that I can still send data), should I do some custom property listening to all possible events (error, closed, ended...)?

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

every time the server receives a request. 

Ofc it wouldn't come out often for simple cases, as usually a request is received, analised, and answered (no really big worries about answering twice, or answering much later). But I'm implementing long-polling for a service that doesn't support websockets... so it's kinda important.

### What is the expected behavior? Why is that the expected behavior?

```
//output
- sending response
writable  false //instead of "true"
socket writable  false //instead of "true"
ended  true
socket ended  false //instead of "false"
closed  true // or something else, instead of undefinied
socket closed  true //not sure abt this one
```

### What do you see instead?

```
//output
- sending response
writable  true
socket writable  true
ended  true
socket ended  false
closed  undefined
socket closed  false
```

### Additional information

_No response_
Repository: material-ui
Issue: [docs-infra] Website doesn't build when the parent directory contains a space
Labels: bug 🐛,scope: docs-infra

### Duplicates

- [X] I have searched the existing issues

### Latest version

- [X] I have tested the latest version

### Steps to reproduce 🕹

Link to live example:

Steps: Please follow the contribution.md to reproduce this issue.

1. Fork the repository
2. Clone the project and synchronize with the MUI repo
3. build the website with yarn start and open localhost


### Current behavior 😯

![image](https://user-images.githubusercontent.com/94703888/227660377-f718d138-7607-4327-9452-977c202cb186.png)


### Expected behavior 🤔

The build should run normally without errors !

### Context 🔦

_No response_

### Your environment 🌎

<details>
  <summary><code>npx @mui/envinfo</code></summary>

```
  Don't forget to mention which browser you used.
  Output from `npx @mui/envinfo` goes here.
```
</details>
Repository: godot
Issue: Virtual methods not invoked on generic superclass of Node
Labels: topic:dotnet

### Godot version

4.0

### System information

Windows 10

### Issue description

When class A derives from a generic superclass, B the virtual methods such as `_Ready` that were overriden on B are not being invoked.

I noticed this when writing said superclass on a library project, and trying to use it on my godot project.

### Steps to reproduce

First, define the superclass like so in an external project (outside `res`):

```cs
namespace MyLibrary
{
	public partial class Cursor2D : Node2D
	{
		public override void _Ready()
		{ 
		    <Some log message here>
		}
	}
```

Second, define the subclass like so:

```cs
	public partial class MyCursor2D : MyLibrary.Cursor2D
	{
	}
```

Now if you were to run the project, you would not see the log message printed.

### Minimal reproduction project

N/A
Repository: pytorch
Issue: Multi-output derivative formulas can save unnecessary tensors
Labels: module: autograd,triaged,module: nestedtensor,actionable

Usually when you have a derivative formula, e.g. `mm`:
```
- name: mm(Tensor self, Tensor mat2) -> Tensor
  self: mm_mat1_backward(grad, mat2, self.sym_sizes(), self.sym_strides(), self.layout(), 1)
  mat2: mm_mat2_backward(grad, self, mat2.sym_sizes(), mat2.sym_strides(), mat2.layout(), 1)
  result: at::mm(self_t, mat2_p) + at::mm(self_p, mat2_t)
```
The structure informs autograd codegen what tensors need to be saved to compute which gradients, i.e. if only `self` requires grad, I only need to save `mat2`, and if only `mat2` requires grad, I only need to save `self`. 

In VariableType, the following logic is generated for `mm`:
```cpp
if (_any_requires_grad) {
    grad_fn = std::shared_ptr<MmBackward0>(new MmBackward0(), deleteNode);
    grad_fn->set_next_edges(collect_next_edges( self, mat2 ));
    if (grad_fn->should_compute_output(1)) {
      grad_fn->self_ = SavedVariable(self, false);
    }
  ...
    if (grad_fn->should_compute_output(0)) {
      grad_fn->mat2_ = SavedVariable(mat2, false);
    }
}
```

However, when you have a single derivative formula that produces multiple outputs, autograd codegen no longer has visibility into what tensors need to be saved in order to compute which gradients. 

```
- name: matmul(Tensor self, Tensor other) -> Tensor
  self, other: matmul_backward(grad, self, other, grad_input_mask)
```
This yields the following unoptimized logic in autograd kernel:
```
 if (_any_requires_grad) {
    grad_fn = std::shared_ptr<MatmulBackward0>(new MatmulBackward0(), deleteNode);
    grad_fn->set_next_edges(collect_next_edges( self, other ));
    grad_fn->self_ = SavedVariable(self, false);
    grad_fn->other_ = SavedVariable(other, false);
  }
```
One common case where this can matter is if I'm doing some fine-tuning, e.g. I want to requires_grad=False for the parameters of a bunch of layers in the middle of a network.

cc @ezyang @albanD @zou3519 @gqchen @pearu @nikitaved @Lezcano @Varal7 @cpuhrsch @jbschlosser @bhosmer @drisspg @gchanan
Repository: tensorflow
Issue: Importing TF 2.12, then torch, hangs, but not the other way around
Labels: stat:awaiting tensorflower,type:bug,type:build/install,subtype: ubuntu/linux,TF 2.12

<details><summary>Click to expand!</summary> 
 
 ### Issue Type

Bug

### Have you reproduced the bug with TF nightly?

Yes

### Source

binary

### Tensorflow Version

2.12.0

### Custom Code

No

### OS Platform and Distribution

Linux Ubuntu 20.04.5

### Mobile device

_No response_

### Python version

3.8.10

### Bazel version

_No response_

### GCC/Compiler version

_No response_

### CUDA/cuDNN version

11.8

### GPU model and memory

_No response_

### Current Behaviour?

```shell
If I import tensorflow and then import torch, the torch import line hangs forever without completing. On the other hand, if I import torch first and then import tensorflow there is no problem.

The hang is so severe that no amount of ctr-c can kill it. You have to kill the python process from a separate terminal to free the hung terminal. 

This issue does not exist in tensorflow 2.11.1 or earlier. It also doesn't happen when using older versions of torch like 1.13.1. Since torch followed by tf works but tf followed by torch doesn't, this seems like an issue tf is causing.
```


### Standalone code to reproduce the issue

```shell
docker pull tensorflow/tensorflow:2.12.0-gpu
docker run -it tensorflow/tensorflow:2.12.0-gpu

pip install torch==2.0.0+cu118 torchvision==0.15.1+cu118 torchaudio==2.0.1+cu118 -f https://download.pytorch.org/whl/cu118/torch_stable.html

python

import tensorflow as tf
import torch
```


### Relevant log output

_No response_</details>
Repository: deno
Issue: Unable to vendor puppeteer
Labels: vendor

Since 1.31.0 vendoring puppeteer by running `deno vendor https://deno.land/x/puppeteer@16.2.0/mod.ts` started giving the following error:
```
error: Relative import path "fs" not prefixed with / or ./ or ../ and not in import map from "https://deno.land/x/puppeteer@16.2.0/vendor/puppeteer-core/puppeteer/common/IsolatedWorld.js"
```

Seems like the issue is a dynamic "fs" import [on line 393](https://deno.land/x/puppeteer@16.2.0/vendor/puppeteer-core/puppeteer/common/IsolatedWorld.js?source#L393).