sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: pytorch
Issue: torch.dtype is int in JIT instead of torch.dtype
Labels: oncall: jit

## 🐛 Bug

torch.dtype is int in JIT instead of torch.dtype. So, you loss to [properties: `is_floating_point` and `is_complex`](https://pytorch.org/docs/stable/tensor_attributes.html?highlight=dtype#torch.torch.dtype).

## To Reproduce

```python
import torch

@torch.jit.script
def is_floating_point(dtype: torch.dtype):
     return dtype.is_floating_point
``` 

Error (from similar methods
```
'int' object has no attribute or method 'is_floating_point'.:
  File "/home/victor/PycharmProjects/kornia/kornia/geometry/bbox_v2.py", line 615
        """Similar to `torch.nn.Module.to()` method"""
        # In torchscript, dtype is a int and not a class. https://github.com/pytorch/pytorch/issues/51941
        if dtype is not None and not dtype.is_floating_point:# _is_floating_point_dtype(dtype):
                                     ~~~~~~~~~~~~~~~~~~~~~~~ <--- HERE
            raise ValueError("Boxes must be in floating point")
        self._boxes = self._boxes.to(device=device, dtype=dtype)
```

## Expected behavior

JIT should keep torch.dtype methods so you avoid to implement a workaround to support JIT. If not, it should be clearly documented in docs. For example, in [TorchScript Unsupported Pytorch Constructs](https://pytorch.org/docs/stable/jit_unsupported.html#jit-unsupported)

## Environment
 Pytorch 1.9
Repository: PowerToys
Issue: Add preview for EPS files
Labels: Idea-New PowerToy,Product-File Explorer

### Description of the new feature / enhancement

Add preview for EPS files.

### Scenario when this would be used?

In Windows Explorer there should be a thumbnail.
There should also be a way to preview the EPS in its own window.


### Supporting information

_No response_
Repository: godot
Issue: [3.4 beta 5] usability issues w/ rooms&portals and occlusion
Labels: enhancement,topic:rendering,topic:editor,usability,topic:3d

### Godot version

3.4 beta 5

### System information

Linux Manjaro, GLES 3, Intel Kaby Lake

### Issue description

1) If you somehow get out of the [Perspective] (portals enabled) mode in editor, the only way back seems to be to click 'convert rooms' again - this is a bit odd, not to mention wasteful
2) No message printed to output log if the portals feature is deactivated/unloaded at runtime due to eg. removing a node in rooms list. This is crucial, as I just spent half an hour wondering why it works in editor and not at runtime
3) A QoL wishlist thing - to check in editor if occlusion shapes work, the only way currently seems to be to carefully watch stuff in Overdraw or Wireframe node. It would be much easier for the user if we could toggle an 'occlusion debug view' that works similarly to the "portals enabled" mode, in which what is seen is normal and what is not is wireframe (Note, this applies only to 3.x, as my understanding is that 4.0 has a separate occlusion buffer that is white and black)

EDIT 4) I think merge meshes isn't disappearing the old meshes? Some meshes are renamed to DeleteMe, others that I later see in "mergedmesh xxx" aren't... I get a million vertices with portals active on a single road, which is ... ummm...

### Steps to reproduce

Trying to use portals and rooms with an existing project

For 1), it exited portals enabled when I clicked "flip portals" while well, having NO portals set up yet :P

### Minimal reproduction project

Don't anything to show yet as converting to rooms&portals broke my mapgen quite spectacularly
Repository: vscode
Issue: Git - extension API shows incorrect remote when there's an extra push url
Labels: bug,git

Found while trying to fix https://github.com/microsoft/vscode-pull-request-github/issues/2891

The setup:
1. Have a folder with a basic git setup with github remotes, like this:
```
PS D:\repos\alexr00\playground> git remote -v
origin  https://github.com/alexr00/playground.git (fetch)
origin  https://github.com/alexr00/playground.git (push)
```
2. Add another push remote:
```
PS D:\repos\alexr00\playground> git remote set-url --add origin "file:///C:\Users\alros\extraRemote"
PS D:\repos\alexr00\playground> git remote -v
origin  https://github.com/alexr00/playground.git (fetch)
origin  https://github.com/alexr00/playground.git (push)
origin  file:///C:\Users\alros\extraRemote (push)
```
3. Now, use the git extension API to get the remotes for this repository. 
4. The git extension API specifically has a separate fetch and push url:
https://github.com/microsoft/vscode/blob/e3829dc2477186593fe79d649f909119f5dc5913/extensions/git/src/api/git.d.ts#L64-L65
So I would expect those to reflect the results of `git remote -v`: the fetch url should be the github url, and the push url should be one of the push urls. 
In practice, both `fetchUrl` and `pushUrl` are the file url.
Repository: PowerToys
Issue: Fancy Zone with Mica theme for W11 and Aero for W10 (including rounded edges)
Labels: Idea-Enhancement,Product-FancyZones,Area-User Interface,External Dependency-WinUI 3

### Description of the new feature / enhancement

Fancy Zone should have same theme as windows theme. IE, Aero for windows 10 and Mica for W11

### Scenario when this would be used?

Since windows 11 focus on UI upgrade having its own tool with theme consistency should be the way to go.

### Supporting information

_No response_
Repository: go
Issue: x/pkgsite: Remove hardcoded references to pkg.go.dev
Labels: NeedsInvestigation,pkgsite

### Bug

There are quite a few places where the strings “pkg.go.dev” and “beta.pkg.go.dev” are hardcoded into pkgsite.

When self-hosting, this causes a few bugs, especially where pkgsite redirects the user to https://pkg.go.dev instead of the current host.

### Proposal 

I suggest we add a [Config.SiteName](https://pkg.go.dev/golang.org/x/pkgsite/internal/config) field that defaults to “https://pkg.go.dev” which should be overridden by a GO_DISCOVERY_SITE_NAME environment variable.

It would probably be useful in templates if a Config.SitePath(string) helper method could append an arbitrary path to the site name.

### Links

**Search:** “pkg.go.dev” literal, excluding tests: [`pkg.go.dev repo:^github\.com/golang/pkgsite$ -file:\.md$ -file:_test\.go$ -file:^tests/ -file:testdata/`](https://sourcegraph.com/search?q=context:global+pkg.go.dev+repo:%5Egithub%5C.com/golang/pkgsite%24+-file:%5C.md%24+-file:_test%5C.go%24+-file:%5Etests/+-file:testdata/&patternType=regexp)

**Related:** #39827
Repository: go
Issue: x/pkgsite: Dockerfile.frontend should use a scratch base image
Labels: NeedsDecision,pkgsite

### Problem

Currently, [devtools/docker/Dockerfile.frontend](https://cs.opensource.google/go/x/pkgsite/+/d47c5d0f5b5e00204b44312664fff5bc10961143:devtools/docker/Dockerfile.frontend) uses the [golang](https://hub.docker.com/_/golang) image as its base image.

This is inconsistent with modern best practices, where services are typically hosted on the minimal scratch image. The current image has an entire operating system and the Go toolchain included, which is unnecessary because only the frontend and its data are copied in. The frontend doesn’t need an entire OS to run.

### Suggested solution

1. Build cmd/frontend with `CGO_ENABLED=0` to produce a statically linked binary.
2. Use `FROM scratch` to build the final Docker image.

### Links

**Related:** #39827
Repository: godot
Issue: Problem with selection dock (two monitors)
Labels: bug,topic:editor,needs testing

### Godot version

3.4 beta 5 mono

### System information

w10 64

### Issue description

Look at the gif.
1 - I select the white object in the editor and its properties appear in the "Inspector" dock
2 - Then I select a script and the "Inspector" dock changes state but the object in the editor is still selected.
3 - I try to select the object again to see its properties but I can't do anything, the object appears selected but its properties are not visible in the "Inspector" dock.
Possible solution:
When the script is selected the node should be deselected automatically.
![GIF](https://user-images.githubusercontent.com/19652075/134677518-f8c39f38-375a-442e-aba7-66f6941d600c.gif)



### Steps to reproduce
This only happens with two monitors.
Place on one monitor VSCode and on the other monitor, Godot.
Then do the test viewed In the gif

### Minimal reproduction project
[testDock.zip](https://github.com/godotengine/godot/files/7227020/testDock.zip)
Repository: vscode
Issue: Extend `vscode.extensions.getExtension` to return extensions from other extension host
Labels: feature-request,api,extension-host

Today, `getExtension` only returns extensions that are registered in the same extension host. This can be problematic when extensions enable/disable feature in the presence of other extensions. 

slightly related: https://github.com/microsoft/vscode/issues/84997
Repository: PowerToys
Issue: Want to be able to change a default Fancy Zone
Labels: Idea-Enhancement,FancyZones-Layouts,Product-FancyZones

### Description of the new feature / enhancement

When I carry my laptop to a different screen, it by default switches priority zones to new monitor.

However, I always use 2 column zone, and I would prefer it would be possible to set as a default for any new monitor.

If I need to get a different layout later, I can always change, however it would be easier to have a default layout the one I want, and change it only on exceptional cases when I want different.

The setting should be saved after computer restart or PowerToys restart.

### Scenario when this would be used?

Carrying laptop to different monitors, I prefer 2 columns zones on all my screens, but it always resets to default.

The need to maintain the layout I prefer is extremely useful when working between home and office, or traveling to other locations and getting a separate screen - I wouldn't have to change it every time, only in cases when I absolutely want a layout that I do not use by default.

### Supporting information

_No response_
Repository: material-ui
Issue: [system] Improve error message on dynamic theme values?
Labels: new feature,waiting for 👍,package: system

https://github.com/mui-org/material-ui/issues/28482 surfaced a pain with the v5-migration: the error message when using `<Button color="default">` is unclear. This prop was supported in v4 and no longer in v5.

Going forward, it seems that developers will have the same pain when using custom themes. Consider the following case:

```jsx
import * as React from "react";
import Button from "@mui/material/Button";

export default function BasicButtons() {
  return (
    <Button color="my-custom-value" variant="text">
      Text
    </Button>
  );
}
```

https://codesandbox.io/s/basicbuttons-material-demo-forked-qe7te?file=/demo.js:0-212

It fails with `TypeError: Cannot read properties of undefined (reading 'main')`. The why it fails, nor how to solve it requires developers to research, it's not the best DX.
Some might argue that. TypeScript is enough for this problem, however, it depends on the parent theme context the component is mounted in.

### One possible solution

One idea:

```diff
diff --git a/packages/mui-material/src/Button/Button.js b/packages/mui-material/src/Button/Button.js
index 4393cb5d6a..ad54c68178 100644
--- a/packages/mui-material/src/Button/Button.js
+++ b/packages/mui-material/src/Button/Button.js
@@ -73,7 +73,7 @@ const ButtonRoot = styled(ButtonBase, {
     ];
   },
 })(
-  ({ theme, ownerState }) => ({
+  ({ theme, themeGetter, ownerState }) => ({
     ...theme.typography.button,
     minWidth: 64,
     padding: '6px 16px',
@@ -173,7 +173,7 @@ const ButtonRoot = styled(ButtonBase, {
     ...(ownerState.variant === 'outlined' &&
       ownerState.color !== 'inherit' && {
         color: theme.palette[ownerState.color].main,
-        border: `1px solid ${alpha(theme.palette[ownerState.color].main, 0.5)}`,
+        border: `1px solid ${alpha(themeGetter(`theme.palette.${ownerState.color}.main`), 0.5)}`,
       }),
     ...(ownerState.variant === 'contained' && {
       color: theme.palette.getContrastText(theme.palette.grey[300]),
```

that would return a clear error message?

> Error: MUI: The MuiButton's Root component tries to access `theme.palette.my-custom-value.main` but the value is missing. Update your theme to include it.

### Alternatives

?

### Benchmark

- https://github.com/system-ui/theme-ui/blob/5a378bd6a478949778095cdf3e29b8d9293f2076/packages/css/src/index.ts#L39
Repository: pytorch
Issue: `torch.jit.trace` fails claiming "forward method already defined"
Labels: oncall: jit

## 🐛 Bug

`torch.jit.trace` fails tracking a normal module with error "RuntimeError: method '__torch__.dl_research.pytorch.projects.guidance.full_model.___torch_mangle_56.FullGuidanceModel.forward' already defined."

## To Reproduce

Steps to reproduce the behavior:

Simplified version of model which reproduces behavior:

```
import torch

class SampleModel(torch.nn.Module):
    def __init__(self):
        """Generates a Guidance Model suitable for inference.
        """
        super().__init__()

    @torch.jit.export
    def forward(self, images):
        images = images.to(torch.float32) / 255.0

        predictions = torch.mean(images, dim=(1, 2, 3))

        return predictions

    
model = SampleModel()
sample_input = (torch.rand((10,1,128,128))*255).to(torch.uint8)

# Runs fine
model(sample_input)

# Fails!
torch.jit.trace(model, example_inputs=sample_input)


# Error message and stack trace
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
/tmp/ipykernel_2908/862869542.py in <module>
----> 1 torch.jit.trace(model, example_inputs=torch.tensor(images[:10]))

~/.pyenv/versions/3.8.7/envs/dl-research-pytorch/lib/python3.8/site-packages/torch/jit/_trace.py in trace(func, example_inputs, optimize, check_trace, check_inputs, check_tolerance, strict, _force_outplace, _module_class, _compilation_unit)
    733 
    734     if isinstance(func, torch.nn.Module):
--> 735         return trace_module(
    736             func,
    737             {"forward": example_inputs},

~/.pyenv/versions/3.8.7/envs/dl-research-pytorch/lib/python3.8/site-packages/torch/jit/_trace.py in trace_module(mod, inputs, optimize, check_trace, check_inputs, check_tolerance, strict, _force_outplace, _module_class, _compilation_unit)
    950             example_inputs = make_tuple(example_inputs)
    951 
--> 952             module._c._create_method_from_trace(
    953                 method_name,
    954                 func,

RuntimeError: method '__torch__.___torch_mangle_96.SampleModel.forward' already defined.
```

## Expected behavior

`trace` should produce a scripted module without error.

## Environment

 - PyTorch Version (e.g., 1.0): 1.9.1
 - OS (e.g., Linux): Ubuntu 20.04 (WSL)
 - How you installed PyTorch (`conda`, `pip`, source): pip
 - Build command you used (if compiling from source):
 - Python version: 3.8.7
 - CUDA/cuDNN version: n/a
 - GPU models and configuration: n/a
 - Any other relevant information: reproduced on macOS

## Additional context
Repository: terminal
Issue: Followups to Parent Pane Focusing
Labels: Help Wanted,Area-UserInterface,Product-Terminal,Issue-Scenario

# Description of the new feature/enhancement
https://github.com/microsoft/terminal/pull/11153 adds the ability to focus multiple panes at the same time. While it implements many actions for parent panes, there are still some things that can be improved
- [ ] When multiple panes are selected, the tab icon could be the "split pane" icon.
- [ ] Searching currently only works on one pane at a time.
- [ ] Broadcasting input to multiple panes? The `scroll*`/`send-input`/`copy`/`paste` actions and general key presses could possibly have a well-defined interaction with multiple panes, but that will probably be an implementation detail for https://github.com/microsoft/terminal/issues/2634
- [ ] [Explore Idea] When zooming a parent pane, it might be nice to move around within the zoomed parent pane without it changing the zoomed pane. 
- [ ] [Explore Idea] `moveFocus`: if we have a subtree of panes selected, maybe we should maintain the size of the subtree and focus another group of panes?
- [ ] Check everything else that still uses `GetActiveControl` to see if it could/should be updated to updating all controls.
- [ ] The duplicate pane option could duplicate all selected panes instead of just the one that has focus. Similarly once this is implemented it should be trivial to make duplicate tab create an entire copy of the tab instead of just the terminal with focus.
- [ ] #11359
Repository: rust
Issue: Can't automatically convert references to trait objects if target type is behind a generic parameter
Labels: A-trait-system,T-compiler,A-coercions,T-types,A-trait-objects

Considering the following code

```rust
fn func_1<'a>(x: impl IntoIterator<Item = &'a dyn std::fmt::Display>) {
}

fn func_2<const N: usize>(x: [&dyn std::fmt::Display; N]) {
}

fn main() {
    func_1([&1i32, &1i64]);
    func_2([&1i32, &1i64]);
}
```

The first function call fails compiling because the compiler can't figure out that this needs to become a `[&dyn Display]`:

```
error[E0308]: mismatched types
 --> src/main.rs:8:20
  |
8 |     func_1([&1i32, &1i64]);
  |                    ^^^^^ expected `i32`, found `i64`
  |
  = note:   expected type `&i32`
          found reference `&i64`
```

This can be worked around by doing `func_1([&1i32 as &dyn std::fmt::Display, &1i64])` but that doesn't seem ideal.
Repository: flutter
Issue: [macos] Provide public API to enable accessibility for a Flutter view
Labels: engine,platform-mac,a: desktop,P2,team-macos,triaged-macos

Currently the accessibility system is only enabled for macOS if VoiceOver is enabled. XCUITests are based on the accessibility tree, however, which means that there are use cases for explicitly enabling it.

Example STR:
- Make a macOS plugin that uses some native UI (e.g., file_selector)
- Try to write XCUITests for its example app, since Flutter integration tests won't work (due to modal native UI, which Flutter tests can't drive)
- Neither recording nor running the test works, unless VoiceOver is on.

What I'd like to do is just force-enable accessibility in the example app. I don't care if performance suffers slightly in that case, since it's just for testing. (Alternately, if there's a way that we can detect that it's running in this case and enable it automatically, like we do for VO, that would work.)

/cc @chunhtai This is follow-up from recent Discord discussion; I've now verified that just running an XCUITest doesn't trigger the necessary system calls to enable it.
Repository: go
Issue: x/net/http2: client stream left unclosed after response status >=300
Labels: NeedsInvestigation

On receiving a 3xx, 4xx, 5xx, etc. response while writing a request body, the HTTP/2 RoundTrip cancels the body write and returns:
https://go.googlesource.com/net/+/3ad01bbaa167859dcfbcce635f3c43f6e900be62/http2/transport.go#1171

In this case, the client does nothing to terminate its side of the stream--it doesn't send END_STREAM or RST_STREAM. The stream will remain open or in a half-closed state until the server resets it.

In addition, we remove the stream from `ClientConn.streams` in this case, which means we no longer count it against the stream concurrency limit.

We should either send a RST_STREAM when we've given up writing, or write the request body even on a 3xx etc response. (The server can still reset the stream if it doesn't care about the body.)
Repository: godot
Issue: Scrolling behaves strangely in the script editor when using code folding
Labels: bug,topic:editor,needs testing

### Godot version

3.4 beta 5

### System information

w10 64

### Issue description

The problem:
You must activate the distraction-free mode

![Captura3](https://user-images.githubusercontent.com/19652075/134709680-d971c051-b3b0-430c-bc23-c871dd64f1d6.PNG)

If you reach the scroll limit in the script editor and collapse and expand the functions, the scroll moves in a very annoying way.
This sometimes leaves the user confused without knowing where it is located right now
You can test it with any project, no test project is needed.

https://user-images.githubusercontent.com/19652075/134705954-7c013fee-81d9-41fe-8cc5-982ef4b6cf42.mp4

### Steps to reproduce
You must activate the distraction-free mode
Reach the bottom end of the scroll in the script editor.
Collapse and expand some function.

### Minimal reproduction project

...
Repository: pytorch
Issue: Derivative not implemented for narrow_copy
Labels: module: autograd,triaged,actionable

```
>>> torch.narrow_copy(torch.zeros(2, requires_grad=True), 0, 0, 1)
tensor([0.], grad_fn=<NotImplemented>)
```

cc @ezyang @albanD @zou3519 @gqchen @pearu @nikitaved @soulitzer @Lezcano @Varal7 @bdhirsh
Repository: vscode
Issue: Improve action button text on Extension Bisect notification 
Labels: under-discussion,bisect-ext

<!-- ⚠️⚠️ Do Not Delete This! feature_request_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- Please search existing issues to avoid creating duplicates. -->

When using extension bisect for the first time, I was caught off guard by the "This is bad" action. Instead I wonder if something more like "That didn't work" would be more appropriate. We could also modify the other items to be more consistent in phrasing and casing e.g.

- Good now -> That worked
- This is bad -> That didn't work
- Stop Bisect -> Stop bisect 

<img width="489" alt="CleanShot 2021-09-24 at 10 02 22@2x" src="https://user-images.githubusercontent.com/25163139/134714171-9b26fea4-3ded-4a05-9cd1-66698cad6dfd.png">
Repository: godot
Issue: mesh object will not affected by the Light with specific values Material settings
Labels: bug,topic:rendering,topic:3d

### Godot version

3.3.3 and 3.4 beta5

### System information

macOS 10.14.6 intelGPU GLES3 and GLES2

### Issue description

When setting Spatial Material with value 1 Metallic and value 0 Roughness, Mesh Object will not affected by the Light. both in GLES3 and GLES2

**in blender with value 1 Metallic and value 0 Roughness**

https://user-images.githubusercontent.com/64188282/134715134-447a709a-87eb-40b9-b400-cec9f956b4ad.mov

**in Godot with value 1 Metallic and value 0 Roughness**

https://user-images.githubusercontent.com/64188282/134715183-0425b64b-5e63-4d97-aebb-c14374ccdeff.mov





### Steps to reproduce

see Minimal reproduction project

### Minimal reproduction project

[bug report.zip](https://github.com/godotengine/godot/files/7227473/bug.report.zip)
Repository: rust
Issue: Test `src\test\rustdoc\macro-document-private-duplicate.rs` fails spuriously
Labels: T-rustdoc,A-macros,C-bug

It was a source of failure on CI in PRs like https://github.com/rust-lang/rust/pull/89144, https://github.com/rust-lang/rust/pull/88872, https://github.com/rust-lang/rust/pull/88418, https://github.com/rust-lang/rust/pull/88530, https://github.com/rust-lang/rust/pull/88339, https://github.com/rust-lang/rust/pull/88804 and https://github.com/rust-lang/rust/pull/82183.
All the failures are on Windows targets, usually MSVC but one is on MinGW as well.

The test was introduced in https://github.com/rust-lang/rust/pull/88019.