sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: TypeScript
Issue: Intersection with object with property names colliding with that of `Object` results in unintended types of those properties.
Labels: Bug

# Bug Report

<!--
  Please fill in each section completely. Thank you!
-->

### 🔎 Search Terms

intersect object property name

<!--
  What search terms did you use when trying to find an existing bug report?
  List them here so people in the future can find this one more easily.
-->

### 🕗 Version & Regression Information

<!-- When did you start seeing this bug occur?

"Bugs" that have existed in TS for a long time are very likely to be FAQs; refer to
  https://github.com/Microsoft/TypeScript/wiki/FAQ#common-bugs-that-arent-bugs

If possible, please try testing the nightly version of TS to see if it's already been fixed.
For npm: `typescript@next`
This is also the 'Nightly' version in the playground: http://www.typescriptlang.org/play/?ts=Nightly

Note: The TypeScript Playground can be used to try older versions of TypeScript.

Please keep and fill in the line that best applies:
-->
- This is the behavior in every version I tried, and I reviewed the FAQ for entries about (non apply).

### ⏯ Playground Link

<!--
  A link to a TypeScript Playground "Share" link which shows this behavior

  The TypeScript Workbench can be used for more complex setups, try
  https://www.typescriptlang.org/dev/bug-workbench/

  As a last resort, you can link to a repo, but these will be slower for us to investigate.
-->

[Playground link with relevant code](https://www.typescriptlang.org/play?ts=4.5.3#code/C4TwDgpgBAkgdsCAnAzhAxsA6gS2ACwHkAjAKw2z3wAUkB7SJUAOQEMBbCFQgMxPMxQAvFADeUAG6sANgFcIvAFxQ4s9sWRQAvlABkYyTPnLV65FoDcAKCvo6cFMCh1l8RKgq4C-T1VoNkFg4uXh9BEXEpOQUeZQBWABpDaPjtIA)

### 💻 Code

<!-- Please post the relevant code sample here as well-->
```ts
// `valueOf` is one of the properties of `Object`.
// Use of any other property such as `constructor` fails the same.
type IntersectWithObjectWithPropertyNamesOfObject = { valueOf: number } & { value: number };

const o: IntersectWithObjectWithPropertyNamesOfObject = { valueOf: 5, value: 5 }
```

### 🙁 Actual behavior

<!-- What happened, and why it was wrong -->
Compiler error:
```ts
/*
 *  Type 'number' is not assignable to type 'number & (() => Object)'.
 *    Type 'number' is not assignable to type '() => Object'.
 */
```

### 🙂 Expected behavior

<!-- What you expected to happen instead, and why -->

Should not error. Why is it resolving `valueOf` to the type `number & typeof Object.valueOf`?
Repository: rust
Issue: Instrumentation (-Zinstrument-mcount) broken due to missing LLVM-pass since LLVM13 update
Labels: A-LLVM,P-medium,T-compiler,C-bug,regression-untriaged

<!--
Thank you for filing a regression report! 🐛 A regression is something that changed between versions of Rust but was not supposed to.

Please provide a short summary of the regression, along with any information you feel is relevant to replicate it.
-->

### Issue

I tried to compile a generic hello-world binary with the `-Zinstrument-mcount` compiler option.

I expected every function-entry to have a call to `mcount()`.
Instead, there are no such calls inserted.


### Triage

I have triaged the bug, and it first occurred in `nightly-2021-08-22`, the first version with LLVM13.

The LLVM-IR still contains the `"instrument-function-entry-inlined"="mcount"` attributes, but the corrosponding llvm-pass is not run anymore.

```rust
rustc +nightly-2021-08-21 -O -Zinstrument-mcount main.rs --emit asm -Z print-llvm-passes -Z no-parallel-llvm 2>&1 | grep mcount
    Instrument function entry/exit with calls to e.g. mcount() (pre inlining)
      Instrument function entry/exit with calls to e.g. mcount() (post inlining)
rustc +nightly-2021-08-22 -O -Zinstrument-mcount main.rs --emit asm -Z print-llvm-passes -Z no-parallel-llvm 2>&1 | grep mcount
[empty]
```

Verbose Versions:
```
❯ rustc +nightly-2021-08-21 --version --verbose
rustc 1.56.0-nightly (a0035916e 2021-08-20)
binary: rustc
commit-hash: a0035916e01d8e644ccd44554c57f0874cef8c8c
commit-date: 2021-08-20
host: x86_64-unknown-linux-gnu
release: 1.56.0-nightly
LLVM version: 12.0.1
❯ rustc +nightly-2021-08-22 --version --verbose
rustc 1.56.0-nightly (d3e2578c3 2021-08-21)
binary: rustc
commit-hash: d3e2578c31688619ddc0a10ddf8543bf4ebcba5b
commit-date: 2021-08-21
host: x86_64-unknown-linux-gnu
release: 1.56.0-nightly
LLVM version: 13.0.0
```
Repository: pytorch
Issue: [feature request] Autocast module and function wrappers
Labels: feature,triaged,module: amp (automated mixed precision)

### 🚀 The feature, motivation and pitch

From what I understand from https://pytorch.org/docs/stable/amp.html, decorators are currently only supported on forward method. For composability, it's sometimes useful to have an autocast decorator called on module object, similar to https://github.com/pytorch/pytorch/pull/70164 (instead of using autocast with blocks). When this happens, original module code doesn't need to be modified and it's useful while researching feasibility of autocast of various model components without having to spill around with autocast blocks or running the full model in autocast mode (and just replacing some modules inside the model with manually wrapped autocast versions). These wrappers makes sense to have both at module object level and module class level.

Some more context: https://discuss.pytorch.org/t/can-autocast-context-manager-be-used-around-all-of-training-loop/136771/7?u=vadimkantorov

### Alternatives

_No response_

### Additional context

_No response_

cc @mcarilli @ptrblck
Repository: transformers
Issue: Fine-tuning GPT-J-6B in colab: 8-bit weights with low-rank adaptors
Labels: New model,Quantization

# 🌟 New model addition

## Model description

This is a version of EleutherAI's GPT-J with 6 billion parameters that is modified so you can generate and fine-tune the model in colab or equivalent desktop GPU (e.g. single 1080Ti).

The original GPT-J takes 22+ GB memory for float32 parameters. Even if you cast everything to 16-bit, it will still not fit onto most single-GPU setups short of A6000 and A100. You can inference it on TPU or CPUs, but fine-tuning is way more expensive.

## Implementation
Proof-of-concept notebook is available here: [![colab](https://camo.githubusercontent.com/84f0493939e0c4de4e6dbe113251b4bfb5353e57134ffd9fcab6b8714514d4d1/68747470733a2f2f636f6c61622e72657365617263682e676f6f676c652e636f6d2f6173736574732f636f6c61622d62616467652e737667)](https://colab.research.google.com/drive/1ft6wQU0BhqG5PRlwgaZJv2VukKKjU4Es?usp=sharing#scrollTo=P8Y75B6WDIN-)

[Model card](https://huggingface.co/hivemind/gpt-j-6B-8bit) has more detailed explanations and auxiliary notebooks (e.g. model conversion and perplexity check).

The current implementation is somewhat hacky, but it can be integrated easily with modelling_gptj.py if you like the idea.

## Open source status

* the model implementation is available [here](https://colab.research.google.com/drive/1ft6wQU0BhqG5PRlwgaZJv2VukKKjU4Es)
* the model weights are available [here](https://huggingface.co/hivemind/gpt-j-6B-8bit)
* who are the authors:
   - the [original GPT-J-6B](https://huggingface.co/EleutherAI/gpt-j-6B) was trained by [Eleuther AI](https://www.eleuther.ai/) (citation: Ben Wang and Aran Komatsuzaki)
   - fast quantization from [bitsandbytes](https://github.com/facebookresearch/bitsandbytes) by [Tim Dettmers](https://github.com/TimDettmers)
   - low-rank adapters were proposed for GPT-like models by [Hu et al (2021)](https://arxiv.org/abs/2106.09685)
   - this notebook was created by me ( @deniskamazur ) with some help from Yozh ( @justheuristic)
Repository: godot
Issue: [TRACKER] BakedLightmap (CPU lightmapper) issues
Labels: bug,enhancement,topic:rendering,tracker,topic:3d

This is a tracker issue for the CPU-based lightmapper in the `3.x` branch. See https://github.com/godotengine/godot/issues/56033 for issues specific to the GPU-based LightmapGI in `master`.

**This tracker only tracks issues in the `3.x` branch**, not `master`.

```[tasklist]
### Bugs
- [x] https://github.com/godotengine/godot/issues/23948
- [ ] https://github.com/godotengine/godot/issues/28350
- [ ] https://github.com/godotengine/godot/issues/45296
- [ ] https://github.com/godotengine/godot/issues/46442
- [ ] https://github.com/godotengine/godot/issues/47209
- [x] https://github.com/godotengine/godot/issues/56078
- [ ] https://github.com/godotengine/godot/issues/56610
- [ ] https://github.com/godotengine/godot/issues/69098
```

```[tasklist]
### Enhancements
- [ ] https://github.com/godotengine/godot/issues/55681
- [ ] https://github.com/godotengine/godot-proposals/issues/2029
- [x] https://github.com/godotengine/godot-proposals/issues/2147
- [ ] https://github.com/godotengine/godot-proposals/issues/2354
- [ ] https://github.com/godotengine/godot-proposals/issues/3078
- [ ] https://github.com/godotengine/godot-proposals/issues/3233
- [ ] https://github.com/godotengine/godot-proposals/issues/3335
```
Repository: godot
Issue: Spinbox is missing Font Theme Override
Labels: documentation,topic:gui

### Godot version

3.4 stable

### System information

Windows 10, Ryzen i5, GLES3

### Issue description

Spinbox does not have a theme override for the font. It feels really out of place that every other form of text node has a font override except for Spinbox.

### Steps to reproduce

Just, add a spinbox to your project and look under Theme Overrides. The only Override that exists is Icons.

### Minimal reproduction project

_No response_
Repository: godot
Issue: Not power-of-two ImageTexture set as custom cursor causes garbled image in HTML5.
Labels: bug,platform:linuxbsd,platform:web,topic:rendering

### Godot version

3.4.1.stable

### System information

Ubuntu 20.04, GLES2, RTX 2070 Super, Chrome/Firefox

### Issue description

When setting a custom mouse cursor to a (programatically created) ImageTexture with a non-power-of-two size, the cursor image appears garbled in the browser with HTML5 export.

I couldn't take a screenshot of the situation, because none of my screenshot software managed to capture the custom cursor in the browser (recording a normal cursor instead).

Non-HTML5 build works fine, and so does the original 43x43 texture when directly used as custom cursor. I've tried this in both Google Chrome and Firefox.

### Steps to reproduce

1. Create a new project.
2. Add a non-power-of-two image to the project named `cursor.png`.
2. Create a scene and attach a script.
3. Add the following code to the script.

```gdscript
   func _ready():
	var tex: Texture = preload("res://cursor.png") # size: 43x43
	var img: Image = tex.get_data()
	var itex := ImageTexture.new()
	itex.create_from_image(img)
	Input.set_custom_mouse_cursor(itex)
```

4. Add an HTML5 export and run in the browser.

### Minimal reproduction project

[TestCustomCursor.zip](https://github.com/godotengine/godot/files/7742000/TestCustomCursor.zip)
Repository: vscode
Issue: Cannot show full file path for long symbol signature in Go To Symbol
Labels: bug,quick-pick

<!-- ⚠️⚠️ 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/No

<!-- 🪓 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. -->
- VS Code Version: **_1.63.2_**
- OS Version: **_Windows 10 Enterprise, Version 2019, OS Build 18363.1801_**

Steps to Reproduce:

1. Press <kbd>Ctrl</kbd>+<kbd>T</kbd>, type something to find symbols, it triggers a drop-down list. Each entry on the list has two parts, left is a matched symbol, right is the file path.
2. If the symbol part on the left is short enough,  there will be some room on the right to show the file path (usually just incomplete file path). We hover the mouse over the file path, it'll display a pop up to show the full file path as below
![image](https://user-images.githubusercontent.com/19678455/146704371-6407044b-ad76-4ee2-9728-e986ef715e48.png)
3. If the symbol's signature is **too long**, there won't be room on the right to show the file path at all. So cannot hover the mouse over the file path, thus no way to tell **which one is which** as seen below
![image](https://user-images.githubusercontent.com/19678455/146704159-8b01ae60-e1f3-4075-8ae6-078ad8f9b60e.png)
4. There should be a way to show  the full file path, for example, change to be able to hover the mouse over **anywhere** of the entry to trigger the pop up to show the full file path
Repository: TypeScript
Issue: Support `~` namespace qualifier in JS Doc type positions
Labels: Suggestion,Awaiting More Feedback

# Bug Report

I'm using `tsc` to create a `.d.ts` file from jsdoc comments in my JavaScript source files. When I scope a custom type definition using the "~" character, if the parameter is optional, it will not be in the outputted `.d.ts`. 

According to [jsdoc documentation](https://jsdoc.app/tags-callback.html), this is the correct way to scope a callback to a specific class.

### 💻 Code

JavaScript source:

```js
class Test {

  /**
   * @callback Test~myCallback
   * @param {string} [name] Event name
   */

  /**
   * @method
   * @param {string} [event] Event name.
   * @param {Test~myCallback} [callback] The callback
   */
  removeListener(event, callback) {
  
  }

}
```

Outputted `.d.ts` file:

```ts
declare class Test {
  removeListener(event?: string, callback: any): void;
}
```

### 🙁 Actual behaviour

The output renders "callback" as if mandatory. This is invalid as a mandatory parameter cannot follow an optional one. Also, the type is "any", event though I defined a custom type.

### 🙂 Expected behaviour

The "callback" parameter should be optional as specified in the source JavaScript. The type should be "Test~myCallback" (or however TypeScript deals with these).
Repository: opencv
Issue: Request for addition of Python wrapper for function cv2::evaluateFeatureDetector() and cv2::computeRecallPrecisionCurve() in the evaluate.cpp script
Labels: feature,category: python bindings,category: features2d

##### Detailed description

Dear to whom it may concern,

[Feature Request]

Firstly, I would like to request for the addition of a Python wrapper for the cv2::evaluateFeatureDetector() function that exists in the evaluation.cpp file in the modules/features2d/src folder. This is because there currently only exists two places where I can ultilise the function: (1) https://www.robots.ox.ac.uk/~vgg/research/affine/evaluation.html#eval_soft, which is a Matlab implementation, and (2) OpenCV, which only has a C++ implementation as of now. On the other hand, cv2::computeRecallPrecisionCurve() is the only implementation I have found for evaluating descriptors.

I am currently evaluating the performance of detectors and descriptors on 2D LIDAR robot maps, and data collected will be presented in my Final Year Project at my university.

I tried the Matlab implementation using matlab.engine, but it was messy and caused my laptop to run out of space (I had to install Matlab for it)

From what I understand from this post on stackexchange [https://dsp.stackexchange.com/questions/6306/qualitative-evaluation-of-interest-point-detectors-and-descriptors-in-computer-v], repeatability and matching scores are concerned with the feature detection part, while recall-precision is concerned with the feature-description part.

In my honest opinion, I believe it will be great for the CV enthusiasts that mainly code in Python! I know we should not marry the language, but it presents to us more options for utility. 

I appreciate any help and your time in this request :) 

**_If a Python wrapper could be made for the whole evaluation.cpp file, that would be awesome too, but my main focus will be on these two functions!_**

This are the lines I am concerned with in the features2d.hpp file:
```
CV_EXPORTS void evaluateFeatureDetector( const Mat& img1, const Mat& img2, const Mat& H1to2,
                                         std::vector<KeyPoint>* keypoints1, std::vector<KeyPoint>* keypoints2,
                                         float& repeatability, int& correspCount,
                                         const Ptr<FeatureDetector>& fdetector=Ptr<FeatureDetector>() );

CV_EXPORTS void computeRecallPrecisionCurve( const std::vector<std::vector<DMatch> >& matches1to2,
                                             const std::vector<std::vector<uchar> >& correctMatches1to2Mask,
                                             std::vector<Point2f>& recallPrecisionCurve );

CV_EXPORTS float getRecall( const std::vector<Point2f>& recallPrecisionCurve, float l_precision );
CV_EXPORTS int getNearestPoint( const std::vector<Point2f>& recallPrecisionCurve, float l_precision );
```
Repository: pytorch
Issue: EmbeddingBag allows out of index ranges.!
Labels: module: dependency bug,triaged

### 🐛 Describe the bug

under torch's version 1.5 embeddingbag doesn't allow pass through over index when i set 'n'
however, Over 1.6 version of torch, embeddingbag allows 'out of range indices' without any alert or informations..!
plus. it can call forward api, but when i call backward api , raise 'Segmentaion fault' without any other logs.

is it intended result? 

here is my code.

```
import torch
print(torch.__version__)

n = 100
m = 4

# ----- 
eb1 = torch.nn.EmbeddingBag(n, m)
eb2 = torch.nn.EmbeddingBag(n, m)
dense_layer = torch.nn.Linear(m,1)
loss = torch.nn.MSELoss()
optimizer = torch.optim.SGD

# -----
input_index_1 = torch.Tensor([0,2,100,2]).long()
input_index_2 = torch.Tensor([0,2,100,2]).long()
input_offset = torch.Tensor([0]).long()
y = torch.Tensor([1])

# -----
try:
    x1 = eb1(input_index_1, input_offset)
    x2 = eb2(input_index_2, input_offset)
    print("Pass over-embedding indices")
except Exception as e:
    print(e)
x = dense_layer(x1+x2)
loss = loss(x.view(-1),y.view(-1))

debug_backward = True

if debug_backward:
    try:
        loss.backward()
        print(loss)
    except Exception as e:
        print(e)
else:
    print("JUST FORWARD : ", loss)        
```

```
torch.__version__ >= 1.6.0
# printed error
Pass over-embedding indices
[1]    95791 segmentation fault  python3 embedding_error.py

torch.__version__ <= 1.5.0
# printed error
1.5.0
[enforce fail at embedding_lookup_idx.cc:211] 0 <= idx && idx < data_size. Index 2 is out of bounds: 100, range 0 to 100
```

### Versions

pip install 'torch>=1.6'
pip install 'torch<=1.5'
Repository: flutter
Issue: [Web][Mobile iOS][Safari]: Unable to delete text from textfields and scrolling is slow on ios 12 and ios 13
Labels: a: text input,platform-ios,framework,platform-web,e: OS-version specific,P2,browser: safari-ios,team-framework,triaged-framework

The deployed flutter web is working properly on all android/ windows version in chrome and Firefox also in mobile browsers in android and iOS 14 and 15  flutter web app is only not working in iOS 12 and 13 version. Sometimes it is not loading web page its completely blank white sometimes it is showing data then back space is not working in textfield. Sometimes scroll is not working. Also, web view scroll is also not working properly

I also added suggested workaround in index.html files

`<script src="https://unpkg.com/platform@1.3.5/platform.js"></script>  <script>  <script type="text/javascript">    let isSafari = /^((?!chrome|android).)*safari/i.test(platform.ua);    if (isSafari) {       HTMLCanvasElement.prototype.getContext = function (orig) {          return function (type) {             return type !== "webgl2" ? orig.apply(this, arguments) : null          }       }(HTMLCanvasElement.prototype.getContext)    } </script>
`

And 

```
<script src="https://unpkg.com/platform@1.3.5/platform.js"></script>
<script type="text/javascript">
    function isIOS() {
      return [
        'iPad Simulator',
        'iPhone Simulator',
        'iPod Simulator',
        'iPad',
        'iPhone',
        'iPod'
      ].includes(navigator.platform)
      // iPad on iOS 13+ detection
      || (navigator.userAgent.includes("Mac") && "ontouchend" in document)
    }

    if (isIOS() && parseInt(platform.os.version.split(".")[0]) >= 15) {
      // iOS/iPadOS 15+
      HTMLCanvasElement.prototype.getContext = function (orig) {
        return function(type) {
          return type !== "webgl2" ? orig.apply(this, arguments) : null
        }
      }(HTMLCanvasElement.prototype.getContext)
    }
</script>
```


Still it is not working properly.

I also tried to upgrade latest flutter version 2.8.1 in stable channel still is showing same issues.

This is my flutter doctor log

```
[✓] Flutter (Channel stable, 2.8.1, on macOS 12.0.1 21A559 darwin-arm, locale en-IN)
[!] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    ✗ cmdline-tools component is missing
      Run `path/to/sdkmanager --install "cmdline-tools;latest"`
      See https://developer.android.com/studio/command-line for more details.
    ✗ Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/macos#android-setup for more details.
[✓] Xcode - develop for iOS and macOS (Xcode 13.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2020.3)
[✓] IntelliJ IDEA Community Edition (version 2021.3)
[✓] VS Code (version 1.62.3)
[✓] Connected device (3 available)
```

Any help will be appreciated because we have deployed this version to our thousands of customer and we are stuck in this issue.
Repository: pytorch
Issue: Dynamic Tensor Rematerialization (DTR)
Labels: feature,module: memory usage,triaged

### 🚀 The feature, motivation and pitch

#42056 , but seems that this request has not been followed up for a long time.
[https://arxiv.org/pdf/2006.09616.pdf](https://arxiv.org/pdf/2006.09616.pdf)
I think this is a exciting job, but most current frameworks do not support it. [MegEngine](https://github.com/MegEngine/MegEngine) is the only framework I have found that supports this feature.

At present, GPUs high-capacity memory are still very expensive, and RMM / LSTM / Transformer / SNN(Rate Coding) models need multiple memory due to special mechanisms.
I think it will be easier to train these models after adding DTR

### Alternatives

Fine grained release a tensor, 

or flag some operations or layers so that they do not save the compute graph node output and force them to recalculate during the return process.

### Additional context

_No response_