sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: pytorch
Issue: [RFC] Add `torch.distributed.run` as a console script in pytorch's setup.py
Labels: oncall: distributed,module: elastic

## 🚀 Feature
`torch.distributed.run` is a CLI that lets users run pytorch training scripts with torchelastic. The proposal is to make this CLI available from the $torch_package_install_dir/bin directory just like any other CLI that is included with a python package. This is as simple as adding:

```
      entry_points={
            "console_scripts": [
                "torchrun=torch.distributed.run:main",
            ],
        },
```

in the `setup.py#setup` (https://github.com/pytorch/pytorch/blob/master/setup.py#L905). Then once the user installs torch, (e.g. with `pip install torch`), they can invoke `torch.distributed.run` as:

```
$ torchrun
```

Just like an mpi user uses `mpirun`.

## Motivation
Despite `torch.distributed.run` being a CLI, currently users have to invoke this script as a module:

```
$ python -m torch.distributed.run <arguments...>
```
or have to provide the full path

```
$ <torch_install_dir>/torch.distributed/run.py <arguments...>
```

## Pitch
Once torch is installed, users should be able to run ddp training scripts as:

```
$ torchrun --nproc_per_node 4 --nnodes 2 --master_addr $(hostname) --master_port 6000 ~/my_training_script.py
```

which is much simpler than the more verbose current way (as described above)

```
$ python -m torch.distributed.run --nproc_per_node 4 --nnodes 2 --master_addr $(hostname) --master_port 6000 ~/my_training_script.py
```

## Alternatives

N/A

## Additional context

This is a common practice for python packages that include a CLI with the install. For example TorchX comes with a CLI (called torchx) and is installed as such: https://github.com/pytorch/torchx/blob/main/setup.py#L58-L62.


cc @pietern @mrshenli @pritamdamania87 @zhaojuanmao @satgera @rohan-varma @gqchen @aazzolini @osalpekar @jiayisuse @agolynski @SciPioneer @H-Huang @mrzzd @cbalioglu @gcramer23
Repository: pytorch
Issue: [torch.distributed] Make dynamic_rendezvous log handler configurable
Labels: feature,triaged,module: elastic,oncall: r2p

## 🚀 Feature

Make dynamic_rendezvous log handler configurable

## Motivation

It is hard to debug the program. We need to update the code manually.

## Pitch

Users can configure if the dynamic_rendezvous log should be written to STDOUT.

 Now dynamic_rendezvous log handler is hard-coded to nullhandler.

```python
def construct_and_record_rdzv_event(
    run_id: str,
    message: str,
    node_state: NodeState,
    name: str = "",
    hostname: str = "",
    pid: Optional[int] = None,
    master_endpoint: str = "",
    local_id: Optional[int] = None,
    rank: Optional[int] = None,
) -> None:
    # We don't want to perform an extra computation if not needed.
    if isinstance(get_logging_handler("dynamic_rendezvous"), logging.NullHandler):
        return

_log_handlers: Dict[str, logging.Handler] = {
    "console": logging.StreamHandler(),
    "dynamic_rendezvous": logging.NullHandler(),
    "null": logging.NullHandler(),
}

def get_logging_handler(destination: str = "null") -> logging.Handler:
    global _log_handlers
    return _log_handlers[destination]

```

## Additional context

<!-- Add any other context or screenshots about the feature request here. -->


cc @pietern @mrshenli @pritamdamania87 @zhaojuanmao @satgera @rohan-varma @gqchen @aazzolini @osalpekar @jiayisuse @agolynski @SciPioneer @H-Huang @mrzzd @cbalioglu @gcramer23
Repository: pytorch
Issue: RuntimError:CUDA error: an illegal memory access was encountered when copying data to CUDA
Labels: needs reproduction,module: cuda,triaged

## RuntimError:CUDA error: an illegal memory access was encountered when copying data to CUDA

Hello, everyone!

I wrote a fully-connected NN model and wanted to train it. In the train function, I wanted to copy the input and target data to `DEVICE=cuda`. But it returned an error like below:

    File "Generator.py", line 165, in train
    inputs, targets = data[0].to(DEVICE).float(), data[1].to(DEVICE).float()
    RuntimeError: CUDA error: an illegal memory access was encountered
    CUDA kernel errors might be asynchronously reported at some other API call,so the stacktrace below might be incorrect.
    For debugging consider passing CUDA_LAUNCH_BLOCKING=1.

This problem only sometimes happened.
And before, this problem can be solved by decreasing batch size, but actually it also happened when batch size is already small.

So I don't think decreasing batch size is the true solution for this problem and I have no idea why this problem happens.

I hope there is someone who has experience in dealing with this problem and can teach me about this.
Your help will be sincerely appreciated.


cc @ezyang @gchanan @zou3519 @bdhirsh @jbschlosser @anjali411 @ngimel
Repository: angular
Issue: ZoneAwareError reads original stack despite setting __Zone_Error_ZoneJsInternalStackFrames_policy
Labels: area: zones,P3

### Which @angular/* package(s) are relevant/releated to the feature request?

_No response_

### Description

Zone.js's ZoneAwareError always stores the original error's stack in the constructor by accessing error.stack no matter what the __Zone_Error_ZoneJsInternalStackFrames_policy is.

https://github.com/angular/angular/blob/a92a89b0eb127a59d7e071502b5850e57618ec2d/packages/zone.js/lib/common/error-rewrite.ts#L123

This can lead to performance overhead in V8 when using [custom stack traces](https://v8.dev/docs/stack-trace-api#customizing-stack-traces) because the prepareStackTrace method runs uneccesarily when constructing errors even if the error's stack will never be accessed.

In our project we use the [source-map-support](https://www.npmjs.com/package/source-map-support) package that provides source map support for stack traces. This can be a costy operation first time (seconds), which we want to avoid when the error's stack is never accessed.

### Proposed solution

If possible only access the original error's stack if it is necessary regarding the __Zone_Error_ZoneJsInternalStackFrames_policy.

### Alternatives considered

.
Repository: vscode
Issue: [Bug] "Toggle Search Details" doesn't show keybinding when hovering over
Labels: bug,search,polish,confirmed

<!-- ⚠️⚠️ 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. -->

- VS Code Version: v1.60.0-insider
- OS Version: Windows 10

Steps to Reproduce:

Although `workbench.action.search.toggleQueryDetails` has a <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>J</kbd> keybinding, it doesn't show up when hovering over, which is inconsistent with other buttons:

![37](https://user-images.githubusercontent.com/28700378/130591900-cdc528bb-633a-4e12-9110-bb0432b2b01d.png)
Repository: vscode
Issue: [scss] Hover hint doesn't support SCSS Interpolation syntax
Labels: feature-request,css-less-scss

Issue Type: <b>Bug</b>

When editing scss files I like to hover over the various nested elements to see how they would look in css.

For example when hovering over: 
```
.main {
}
```
I see a hover hint of:
<element class="main>

However, when I use Sass Interplation (https://sass-lang.com/documentation/interpolation) syntax the hint isn't very helpful.

For example, when hovering over:
```
.main {
  #{&}__paragraph{

  }
}
```
I see the hint as:
```
<element class="main">
 ...
    <#{&}__paragraph>
```
Instead it should be:
```
<element class="main">
...
   <element class="main__paragraph">
```
When I see the css generated by the Sass compiler I can see that the resulting css should be:
```
.main {
}

.main .main__paragraph {
}
```
And when I hover over these elements in the css file the hint is correct.

So this means there is a bug in the hover hint for scss files when it comes to showing the hint correctly for elements using the interpolation syntax.

VS Code version: Code 1.59.1 (3866c3553be8b268c8a7f8c0482c0c0177aa8bfa, 2021-08-19T11:56:46.957Z)
OS version: Windows_NT x64 10.0.19043
Restricted Mode: No

<details>
<summary>System Info</summary>

|Item|Value|
|---|---|
|CPUs|Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz (8 x 3392)|
|GPU Status|2d_canvas: enabled<br>gpu_compositing: enabled<br>multiple_raster_threads: enabled_on<br>oop_rasterization: enabled<br>opengl: enabled_on<br>rasterization: enabled<br>skia_renderer: enabled_on<br>video_decode: enabled<br>vulkan: disabled_off<br>webgl: enabled<br>webgl2: enabled|
|Load (avg)|undefined|
|Memory (System)|15.90GB (4.00GB free)|
|Process Argv|--folder-uri file:///c%3A/Users/Joshua/repos/SassLearning --crash-reporter-id c0dca655-d1df-45ff-ae92-5840c829bb11|
|Screen Reader|no|
|VM|0%|
</details><details><summary>Extensions (3)</summary>

Extension|Author (truncated)|Version
---|---|---
powershell|ms-|2021.8.0
live-sass|rit|3.0.0
LiveServer|rit|5.6.1


</details><details>
<summary>A/B Experiments</summary>

```
vsliv368cf:30146710
vsreu685:30147344
python383cf:30185419
pythonvspyt602:30300191
vspor879:30202332
vspor708:30202333
vspor363:30204092
vswsl492:30256859
pythonvspyt639:30300192
pythontb:30283811
pythonvspyt551cf:30345471
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
pythondataviewer:30285071
pythonvsuse255:30340121
vscod805:30301674
pythonvspyt200:30340761
vscextlangct:30333562
binariesv615:30325510
vsccppwt:30329788
pythonvssor306:30344512
bridge0708:30335490
pygetstartedt2:30351387
vstre464cf:30350173
bridge0723:30353136
vsdyn478:30356813

```

</details>

<!-- generated by issue reporter -->
Repository: pytorch
Issue: Include tensor shape in its default print formatting
Labels: module: printing,triaged,enhancement

Very often one would print a tensor during debugging instead of checking its shape. It would be useful to have shape information in default tensor print formatting, e.g. at the end after grad_fn or just before grad_fn (so that shape is on the screen if a huge tensor was printed)
Repository: godot
Issue: [3.x] Artifacts in HDRI when texture_array_reflections disabled (GLES3)
Labels: bug,topic:rendering,confirmed,topic:3d

### Godot version

3.3.3.stable, 3.3.2.stable

### System information

Linux Manjaro 21.1.0, Android 10(Xiaomi Redmi 8, arm64-v8a, OpenGL 3.0.2, confirmed to occur on other phones as well), using GLES3

### Issue description

PBR render works somehow different on android and produces different(incorrect) result comparing to Linux.  

<details>
  <summary>First example</summary>

PC:  
![pc](https://user-images.githubusercontent.com/26604491/130610873-809f4525-1134-4635-9c1d-7ecca42bb286.png)  

Andorid:  
![photo_2021-08-24_14-45-31](https://user-images.githubusercontent.com/26604491/130610911-1909202a-dfd4-4a7b-ad38-60e2b9209542.jpg)
</details>  

<details>
  <summary>Second example</summary>

PC:  
![photo_2021-08-24_14-47-35](https://user-images.githubusercontent.com/26604491/130611077-e3ad21e3-dacb-49c9-bfff-b7c4a0e64dfc.jpg)  

Andorid:  
![photo_2021-08-24_14-47-56](https://user-images.githubusercontent.com/26604491/130611124-dea6e2c9-2def-4970-834b-d9ac2233758a.jpg)


</details>



### Steps to reproduce

1. Create new GLES3 project
2. Import 3D model
3. Create new spatial material with following textures(maps): albedo, metallic, rougness, normal.
4. Apply material to the model and save it as a scene.
5. Instantiate child node in main scene using result of previous step(model with the material).
6. Load any HDRI background(create new WorldEnvironment node, create new enviroment, in Background category select mode "Sky", create new PanoramaSky and load hdr file).
7. Create 3D camera in main scene.
8. Install android build template
9. Setup export to android.
10. Export to android and compare result from phone with the result when running F5 or using editor.

### Minimal reproduction project

[reproduce.zip](https://github.com/godotengine/godot/files/7038864/reproduce.zip)
Repository: PowerToys
Issue: [PT run] Make "selection history" stronger in scoring system then applications
Labels: Idea-Enhancement,Product-PowerToys Run

### Description of the new feature / enhancement

ATM it seems as if applications are always preferred over file search results when ordering the results list no matter how often I already selected the file search result.

E.g.:

![image](https://user-images.githubusercontent.com/30658772/130613103-7465316f-1b35-4abf-ab78-2428b245de8a.png)

Whilst I literally never opened the `Groove Music` app, I'm regularly selecting the second entry `Show Music Tab.exe` from file search. Nonetheless `Groove Music` is still shown on top when searching for `music`.

I already tried disabling the program search plugin as I find the current behavior really disturbing, however that resulted in other issues (like #12853).

IMHO "selection history" should be one of the (if not the) strongest factors in the scoring system. Not being able to "teach" PT run myself really degrades UX a lot for me.

----------------

Ps.: I can imagine that this has already been discussed before but didn't find any corresponding issue. Sorry if I missed an existing one...

----------------

If you'd like to see this feature implemented, add a 👍 reaction to this post.
Repository: vscode
Issue: Source code downloaded via the debuggers sourceRequest creates lots of duplicate open files across debug sessions
Labels: bug,debug

If I debug into a source file that is downloaded from the debugger (via `sourceRequest`) and then stop the debug session and repeat the same thing again, VS Code opens a second copy of the source (even though the name/contents are identical).

After a few debug sessions, I end up with this:

![image](https://user-images.githubusercontent.com/1078012/130614707-a049febe-1d06-4be4-a8e4-826148708ba2.png)

As far as I can tell, nothing is different about these files (besides the `sourceReference`) so I would expect VS Code to reuse the same existing file the next time they're required (I actually thought this is what it did in the past, though I'm not certain).
Repository: material-ui
Issue: [TextField] Implement variant without shrinking label
Labels: new feature,component: text field

This isn't standard Material UI, but the spec's handling of input labels is perhaps one of its most loved and hated bits.  Labels outside is a pretty common pattern, so would be nice to just have a **variant** for it, to avoid losing the convenience of the high-level TextField, etc abstraction


- [x] I have searched the [issues](https://github.com/mui-org/material-ui/issues) of this repository and believe that this is not a duplicate.

## Summary 💡

Basically something like `<TextField variant="normal"/>` would render 
```jsx
<FormControl ..>
   <InputLabel> ...  // perhaps a bit larger/bolder than the MUI default, no shrink
   <OutlinedInput> ..
   <FormHelperText>..
   ...   
```
Basically something sort of like the bootstrap input styling example

## Motivation 🔦

Ease of use for a non-spec, but common pattern for fields and their input labels
Repository: storybook
Issue: Disable or Filter a Group/Category of controls
Labels: feature request,addon: controls,needs triage

In the Doc Page generated by `Angular`, all [categories/groups](https://storybook.js.org/docs/react/essentials/controls#disable-controls-for-specific-properties) generated by `compodoc` are specified:

![image](https://user-images.githubusercontent.com/954509/130624460-3888c7ec-0534-44a8-be79-1935295f7f51.png)

**Describe alternatives you've considered**
- Using the JS doc tag `@ignore` on top of each property in my component: not maintainable and I don't want to impact my `compodoc` generation because of the storybook doc template
- [Using disabled on the control](https://storybook.js.org/docs/react/essentials/controls#disable-controls-for-specific-properties): not maintainable, I have to list all properties in my stories and I want my stories to stay clean
- [Using the filter of controls](https://storybook.js.org/docs/react/essentials/controls#filtering-controls): not maintainable, I still have to work on the control level, not on the category

**Describe the solution you'd like**
I would like to be able to filter/disable an entire category/group. 

I think just having the possibility to [provide a function to the `include` or `exclude` property](https://github.com/storybookjs/storybook/blob/main/lib/client-api/src/filterArgTypes.ts) that is receiving the full control object would be enough to check the category then.

Something like this (didn't test this):
```javascript
import type { ArgTypes } from '@storybook/addons';
import pickBy from 'lodash/pickBy';

export type PropDescriptor = string[] | RegExp | () => boolean;

const matches = (argType: ArgType, descriptor: PropDescriptor):boolean => {
   if(descriptor instanceof Function) {
       return descriptor(argType);
   }

   if(Array.isArray(descriptor)){
       return descriptor.includes(argType.name);
   }

   return argType.name.match(descriptor);
}
  

export const filterArgTypes = (argTypes: ArgTypes, include?: PropDescriptor, exclude?: PropDescriptor) => {
  if (!include && !exclude) {
    return argTypes;
  }
  return (
    argTypes &&
    pickBy(argTypes, (argType, key) => {
      const name = argType.name || key;
      return (!include || matches(argType, include)) && (!exclude || !matches(argType, exclude));
    })
  );
};
```

**Are you able to assist to bring the feature to reality?**
I would say yes but my children said no for the moment ;)
Repository: rust
Issue: Transmute special-case doesn't take into consideration alignment or enum repr.
Labels: T-compiler,C-bug,A-layout

I was looking back on https://github.com/rust-lang/rust/issues/61956#issuecomment-505436119 and since the current implementation hasn't changed since, I decided to try to and see if I can create an example.

And yes, [here is a playground example](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=c73b8ce9f0bebd62b63082f97289aaea) showing *three* invalid `transmute`s, all stemming from different points in the code (two alignment-based and one regarding treating "non-null-optimized" `enum`s as newtypes).

<hr/>

What we special-case is a `transmute` from `Outer1(Pointer1(Inner1(T)))` to `Outer2(Pointer2(Inner2(T)))`, where:
* `T` is a generic param (or an associated type of one)
  * presumably `T: ?Sized`, because `T: Sized` would result in `Pointer(Inner(T))` having a known layout, even when the exact choice of `T` isn't known
* `Inner{1,2}(T)` wrap `T` in any number of `struct`s, with any choice of prefix fields
  * only the effect on `Pointer(Inner(T))` containing `T::Metadata` matters
* `Outer{1,2}(X)` are newtypes
  * that is, they only have an `X` field and optionally some ZST fields
  * we also allow `Option`-like `enum`s here, if the `Pointer` type they wrap is non-null, but that shouldn't matter - it's effectively "desugaring" the `enum` optimization to a newtype
    * however, it does matter whether the `enum` opted out of the optimization, which turns out we're not checking

Now, I confused myself with alignment originally, but what's important to note is that even if a newtype of `X` contains higher alignment ZSTs *around* `X`, the only difference that will make is on the alignment (and size, through additional padding) of the *whole* newtype, *not* on the *position of `X` in the newtype*.

Because of that, `Outer1` and `Outer2` could have different alignments and that wouldn't change the fact that reading the pointer from one of them and writing it into the other would work, it's still at offset `0` and has the same size.

But that's not what we do, since `transmute` is not field-based, and if we copy the larger size, we're reading or writing more bytes than would be legal.

<hr/>

Looking at the LLVM IR of my example, `test_align` does look like it's copying `64` bytes, which should definitely be UB (but it might take some effort to cause a LLVM optimization to trigger).

OTOH, `test_option_like` is even worse, since the pointer goes in the `#[repr(C)] enum` tag, and the value inside the `Some` is garbage, so [running it in release mode](https://play.rust-lang.org/?version=stable&mode=release&edition=2018&gist=5af1c5b27aacf2b1650022f23b6df0ee) crashes trying to print the resulting value.

<hr/>

What's a bit sad is I feel like I remember seeing an `assert!` for equal `transmute` sizes in codegen, which would catch such a situation and turn it into an ICE, but I'm guessing it got removed?

cc @nagisa