sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: pytorch
Issue: [jit] cannot compile staticmethod of classes when they have a unscriptable __init__
Labels: oncall: jit

## 🐛 Bug

Calling a staticmethod of a class has nothing to do with the class's `__init__`. However, it seems torchscript requires `__init__` to be scriptable in order to script the staticmethod.

## To Reproduce

```python
import torch

class A:
    pass

class B(A):
    def __init__(self):
        super().__init__()

    @staticmethod
    def test(x):
        return x + 1


def f(image):
    return B.test(image)

script_f = torch.jit.script(f)
```
```
Traceback (most recent call last):
  File "/test/a.py", line 19, in <module>
    script_f = torch.jit.script(f)
  File "/home/test/.local/lib/python3.9/site-packages/torch/jit/_script.py", line 1143, in script
    fn = torch._C._jit_script_compile(
  File "/home/test/.local/lib/python3.9/site-packages/torch/jit/annotations.py", line 364, in try_ann_to_type
    return torch.jit._script._recursive_compile_class(ann, loc)
  File "/home/test/.local/lib/python3.9/site-packages/torch/jit/_script.py", line 1260, in _recursive_compile_class
    return _compile_and_register_class(obj, rcb, _qual_name)
  File "/home/test/.local/lib/python3.9/site-packages/torch/jit/_script.py", line 138, in _compile_and_register_class
    script_class = torch._C._jit_script_class_compile(qualified_name, ast, defaults, rcb)
RuntimeError: 
'Tensor' object has no attribute or method '__init__'.:
  File "/test/a.py", line 9
    def __init__(self):
        super().__init__()
        ~~~~~~~~~~~~~~ <--- HERE
'B.__init__' is being compiled since it was called from '__torch__.B'
  File "/test/a.py", line 17
def f(image):
    return B.test(image)
           ~ <--- HERE
'__torch__.B' is being compiled since it was called from 'f'
  File "/test/a.py", line 17
def f(image):
    return B.test(image)
           ~~~~~~~~~~~~ <--- HERE


```

## Expected behavior

I expect `B.test` to be jit-scriptable. This should have nothing to do with `__init__`.
Removing `__init__` or adding `torch.jit.unused` to `B.__init__` can make it scriptable. But since the code is only calling a staticmethod, ideally we shouldn't have to bypass the `__init__` method that we can't even refer to.

## Environment


 - PyTorch Version (e.g., 1.0): 1.9
 - OS (e.g., Linux): linux
 - How you installed PyTorch (`conda`, `pip`, source): pip
 - Python version: 3.9
Repository: pytorch
Issue: [docs or feature request] torchelastic: OOM recovery / skipping batches (e.g. if inf loss or nan gradients)
Labels: module: docs,triaged,module: ddp,oncall: r2p

This is a very frequent request for DDP. It should be good that docs mention clearly if this is possible or not. https://pytorch.org/docs/stable/elastic/errors.html (and if it's possible to do on replicas without sync)

For DDP a workaround for OOM recovery was to somehow forward a dummy batch in order to still get some zero gradients.

cc @pietern @mrshenli @pritamdamania87 @zhaojuanmao @satgera @rohan-varma @gqchen @aazzolini @osalpekar @jiayisuse @SciPioneer @H-Huang @gcramer23 @brianjo @mruberry
Repository: flutter
Issue: Allow disabling replacing CupertinoNavigationBar previousPageTitle text with "Back"
Labels: c: new feature,framework,f: cupertino,a: quality,c: proposal,team-design,triaged-design

<!-- Thank you for using Flutter!

     If you are looking for support, please check out our documentation
     or consider asking a question on Stack Overflow:
      * https://flutter.dev/
      * https://api.flutter.dev/
      * https://stackoverflow.com/questions/tagged/flutter?sort=frequent

     If you have found a bug or if our documentation doesn't have an answer
     to what you're looking for, then fill out the template below. Please read
     our guide to filing a bug first: https://flutter.dev/docs/resources/bug-reports
-->

## Use case

When text is too long in `CupertinoNavigationBar`'s `previousPageTitle`, the text is replaced with "Back". That seems to be happening [here](https://github.com/flutter/flutter/blob/bd8ee41f016e171a893ce93fb8639b6bbaf2c9a1/packages/flutter/lib/src/cupertino/nav_bar.dart#L1454).

This is not great, especially when the rest of the app is not in English.

<!--
     Please tell us the problem you are running into that led to you wanting
     a new feature.

     Is your feature request related to a problem? Please give a clear and
     concise description of what the problem is.

     Describe the alternative solutions you've considered. Is there a package
     on pub.dev/flutter that already solves this?
-->

## Proposal

Add a way to disable the replacement.

<!--
     Briefly but precisely describe what you would like Flutter to be able to do.

     Consider attaching images showing what you are imagining.

     Does this have to be provided by Flutter directly, or can it be provided
     by a package on pub.dev/flutter? If so, maybe consider implementing and
     publishing such a package rather than filing a bug.
-->
Repository: go
Issue: cmd/compile: avoid repeated write barrier checks
Labels: Performance,NeedsInvestigation,compiler/runtime

(I quickly went through the open write barrier issues and couldn't find something covering this, so here goes. Sorry if I missed it.)

While investigating something completely unrelated (I'm on 1.17 on darwin/amd64), I noticed that we coalesce writes behind a single write barrier check, but we don't do so consistently:

![image](https://user-images.githubusercontent.com/408018/132493680-3cb71155-5cc1-4f8f-a6e1-f57617222d58.png)

In the loop on the left, we check whether the write barrier is enabled 4 times, even though once would suffice. I could understand redoing the check if there were function calls or otherwise a significant amount of code between two wb checks, but that's not the case in this specific instance.

In this instance, I would have expected instead at most one write barrier check per loop iteration and the whole jump-threaded wb-enabled version pushed away to a cold section of the function. Given the tiny amount of code in the common parts, and the elimination of the compare and jumps due to jump-threading, it is even possible that total code size would decrease.

Just for completeness, the go code goes something like this:

```golang
	// var wg1, wg2 sync.WaitGroup
	// var p = runtime.GOMAXPROCS(0)
	for i := 0; i < p; i++ {
		wg1.Add(1)
		wg2.Add(1)
		t := time.NewTicker(d)
		go func() {
            // lots of stuff
        }()
    }
```

(Another thing that is visible in that graph is that sometimes both predecessors of a basic block end with an unconditional jump: with better ordering one of the two jumps should not be required)
Repository: node
Issue: doc: Different information about when functions have been "Added" are confusing
Labels: doc

# 📗 API Reference Docs Problem

<!--

Thank you for wanting to make nodejs.org better!

This template is for issues with the Node.js API
reference documentation.

For problems with nodejs.org beyond the API
reference documentation, please open an issue
using the issue tracker for our site repository.

  https://github.com/nodejs/nodejs.org

For more general support, please open an issue
using the issue tracker for our help repository.

  https://github.com/nodejs/help

---

For the issue title, please enter a one-line
summary after “doc: ” (preferably 50 characters
or less and no more than 72).

The “✍️” are placeholders signifying requests for
input. Replace them with your responses.

If you are unsure of something, do your best.

-->

<!-- The output of “node --version”. -->

- **Version**: -

<!-- The output of “uname -a” (UNIX) or version
and 32-bit or 64-bit (Windows). -->

- **Platform**: -

<!-- The name of affected core module. -->

- **Subsystem**: crypto

## Location

_Section of the site where the content exists_

Affected URL(s):
- https://nodejs.org/docs/latest-v16.x/api/crypto.html#crypto_crypto_randomuuid_options: `Added in: v15.6.0`
- https://nodejs.org/docs/latest-v14.x/api/crypto.html#crypto_crypto_randomuuid_options: `Added in: v14.17.0`

## Description

_Concise explanation of the problem_

<!-- If applicable, include any screenshots that
may help solve the problem. -->

The node version a function has been added to changes according to what release API docs you are looking at. I observed this with `crypto.randomUUID()`.

I understand that this may be due to branching. I guess `v15.6.0` had it first, and `v14.17.0` became it as an LTS update. But when I look up a function and see in the current docs (which are often the first hit in search engines) that it is available since `v15.6.0` and I know my code is using  `v14.x` I automatically assume I am not able to use this feature. Which is wrong in this case because it has already been added in `v14.17.0` ("already" not necessarily as in "earlier in time" but as in "a lower version number").

This may be a conceptual decision and as soon as I know it, I am aware of it. But maybe it happened by accident and this issue might help improving the docs.


---

<!-- Use “[x]” to check the box below if you are
interested in contributing. -->

- [ ] I would like to work on this issue and
      submit a pull request.
Repository: create-react-app
Issue: Mismatch between rendered state and logged state
Labels: stale,needs triage,issue: bug report

### Describe the bug

👋🏼 

I noted today that I was getting mismatches between the logged state and the rendered state in a very simple `react` application. I'm probably missing something but I'm at my wits end.

This is only an issue when running the development server. Running the built application does not have this issue.

### Did you try recovering your dependencies?

```text
1.22.11
```

### Environment

<!--
  To help identify if a problem is specific to a platform, browser, or module version, information about your environment is required.
  This enables the maintainers quickly reproduce the issue and give feedback.

  Run the following command in your React app's folder in terminal.
  Note: The result is copied to your clipboard directly.

  `npx create-react-app --info`

  Paste the output of the command in the section below.
-->

```text
Environment Info:

  current version of create-react-app: 4.0.3
  running from /home/sqve/.npm/_npx/c67e74de0542c87c/node_modules/create-react-app

  System:
    OS: Linux 5.13 Arch Linux
    CPU: (8) x64 Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz
  Binaries:
    Node: 14.17.6 - ~/.local/share/nvm/versions/node/v14.17.6/bin/node
    Yarn: 1.22.11 - ~/.local/share/nvm/versions/node/v14.17.6/bin/yarn
    npm: 7.22.0 - ~/.local/share/nvm/versions/node/v14.17.6/bin/npm
  Browsers:
    Chrome: Not Found
    Firefox: Not Found
  npmPackages:
    react: ^17.0.2 => 17.0.2
    react-dom: ^17.0.2 => 17.0.2
    react-scripts: 4.0.3 => 4.0.3
  npmGlobalPackages:
    create-react-app: Not Found
```

### Steps to reproduce

1. Run `npx create-react-app state-mismatch`.
2. Change the default `App` into:
```typescript
import { useState } from "react";
​
const getRandomString = () => Math.round(Math.random()).toString();
​
export  function App() {
  const [state, setState] = useState([getRandomString()]);
​
  console.log(state);
​
  return <div className="App">{state.map((x) => x)}</div>;
}
​
export default App
```
3. Run `yarn run start` and refresh until there is a mismatch.

### Expected behavior

The state should always be the same.

### Actual behavior

<!--
  Did something go wrong?
  Is something broken, or not behaving as you expected?
  Please attach screenshots if possible! They are extremely helpful for diagnosing issues.
-->

There's a mismatch between what the console outputs and what is rendered.
![image](https://user-images.githubusercontent.com/2284724/132513565-42f2b63d-270f-4726-966d-d7b690f4854a.png)
Repository: rust
Issue: `#[doc(cfg(…))]` doesn’t work properly with cross-crate re-exports.
Labels: T-rustdoc,C-bug,requires-nightly,A-cross-crate-reexports,A-rustdoc-ui,F-doc_cfg

Hard to put in words the kind of mess that the situation currently seems to be…

### Let’s just look at an example:
```rs
#![feature(doc_cfg)]

/// A module called `local_io`
pub mod local_io {}

#[doc(cfg(feature = "foo"))]
/// A module called `local_cfg_io`
pub mod local_cfg_io {}

pub mod m {
    #[doc(inline)]
    pub use std::io as io1;
    #[doc(no_inline)]
    pub use std::io as io2;
    #[doc(cfg(feature = "foo"), inline)]
    pub use std::io as io3;
    #[doc(cfg(feature = "foo"), no_inline)]
    pub use std::io as io4;

    #[doc(inline)]
    pub use crate::local_io as local_io1;
    #[doc(no_inline)]
    pub use crate::local_io as local_io2;
    #[doc(cfg(feature = "foo"), inline)]
    pub use crate::local_io as local_io3;
    #[doc(cfg(feature = "foo"), no_inline)]
    pub use crate::local_io as local_io4;

    #[doc(inline)]
    pub use crate::local_cfg_io as local_cfg_io1;
    #[doc(no_inline)]
    pub use crate::local_cfg_io as local_cfg_io2;
    #[doc(cfg(feature = "foo"), inline)]
    pub use crate::local_cfg_io as local_cfg_io3;
    #[doc(cfg(feature = "foo"), no_inline)]
    pub use crate::local_cfg_io as local_cfg_io4;
}
```
### Resulting docs of module `m`:
![Screenshot_20210908_152342](https://user-images.githubusercontent.com/3986214/132517676-dcdfeeb4-ec70-4a3a-bb6f-5c7eec6fc15e.png)


### Bug description
As you can see above, the `cfg(feature = "foo")` is mostly ignored on the `pub use` items. _**Only** external items with `inline`_ take that attribute into account. 

### Expected behavior
I would probably expect that the rendered `cfg` label on a re-export _only_ depends on `cfg(doc(…))` attributes on the `pub use` itself. For a `no_inline` item, this would mean that the label in the “Re-exports” list might differ from the label you see on the item itself once you click on it; maybe we want a more clear way to distinguish the `cfg` of the `pub use` from the `cfg` of the used item.

<hr>

@rustbot label A-rustdoc-ui, F-doc_cfg, requires-nightly
Repository: TypeScript
Issue: Disable inlay hints for tests (or allow conditional overrides)
Labels: Suggestion,In Discussion

# Suggestion

Originally opened at https://github.com/microsoft/vscode/issues/132304 - they asked me to file upstream.

## 🔍 Search Terms

inlay hints

## ✅ Viability Checklist

<!--
   Suggestions that don't meet all these criteria are very, very unlikely to be accepted.
   We always recommend reviewing the TypeScript design goals before investing time writing
   a proposal for ideas outside the scope of the project.
-->
My suggestion meets these guidelines:

* [x] This wouldn't be a breaking change in existing TypeScript/JavaScript code
* [x] This wouldn't change the runtime behavior of existing JavaScript code
* [x] This could be implemented without emitting different JS based on the types of the expressions
* [x] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, new syntax sugar for JS, etc.)
* [x] This feature would agree with the rest of [TypeScript's Design Goals](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals).


## ⭐ Suggestion

I ❤️ the new [inlay hints](https://code.visualstudio.com/updates/v1_60#_inlay-hints-for-javascript-and-typescript) feature. One area where it's a bit noisy is in tests, though. Even with the `literals` setting, it shows up for Jest (and similar) test blocks (`describe`, `it`, `test`). Please consider adding a way to override this for certain cases. Thank you!

![image](https://user-images.githubusercontent.com/1709726/132072476-c73a7b13-a4b8-48d4-ad55-304baf80220d.png)

## 📃 Motivating Example

As a developer, I want to maximize readability while minimizing noise.

## 💻 Use Cases

- VSCode
Repository: godot
Issue: Godot + windows ink = crash
Labels: bug,platform:windows,topic:editor,needs testing

### Godot version

3.3.3 stable mono

### System information

w10 64

### Issue description

The Godot editor and apps cannot handle windows ink events such as pressure.
Pressure is not used in the editor but I do use the pencil to create the tilemaps because it is much easier for me than using the mouse.
Sooner or later the application ends up crashing, for example, you will not be able to close the application by clicking on the X in the window with the pencil and neither with the mouse.
To use the pencil with godot, you must deactivate windows ink and even so, you could receive some crashes or strange behavior in Godot.

### Steps to reproduce

Use a pen and a tablet, such as "Intuos S" from 2018, and activate windows ink, then use the Godot editor.

### Minimal reproduction project

...
Repository: flutter
Issue: RouterDelegate calls build() twice when the app launches
Labels: framework,f: routes,has reproducible steps,P3,found in release: 2.5,found in release: 2.6,team-framework,triaged-framework

## Steps to Reproduce

1. Open the [navigation_and_routing](https://github.com/flutter/samples/tree/master/navigation_and_routing) sample
2. Set a print statement in `lib/src/routing/delegate.dart` line 31 (inside the build() method)
3. Run the app
4. Observe that build() is called twice when the app launches.

**Expected results:** one call to build()

**Actual results:** two calls to build()

What seems to be happening is build() is called when the app launches, followed by a call to `setInitialRoutePath()` / `setNewRoutePath()` (`setInitialRoutePath` forwards to `setNewRoutePath` by default). When the Future returned by `setInitialRoutePath` / `setInitialRoutePath` completes, another call to `build()` happens, even though the app state / routeState hasn't changed.

cc: @chunhtai @kevmoo
Repository: PowerToys
Issue: PowerRename - Add Modified Timestamp to Variable Replacement
Labels: Idea-Enhancement,Product-PowerRename

### Description of the new feature / enhancement

Allow Modified Date to be also accessible by variables in the "Replace with" field.

### Scenario when this would be used?

All of my pictures are transferred from one computer to the next with Onedrive. This causes the Creation Date to become the download date which renders it useless. The Modified Date retains the original picture date.


### Supporting information

![image](https://user-images.githubusercontent.com/35517036/132541697-f09b082c-193c-4cf8-9e79-8216bcd0a5a8.png)
Repository: storybook
Issue: 'argType.defaultValue' deprecation warning on initial angular setup
Labels: bug,angular,block: argstable

**Describe the bug**
After creating a new angular project, running `npx sb init`, and then starting storybook the following deprecation message appears in the browser console:

```
`argType.defaultValue` is deprecated and will be removed in Storybook 7.0.
```

**To Reproduce**
1. I created a reproduction by running `npx sb@next repro` and selecting framework angular/angular ([repository](https://github.com/swolflcs/default-value-repro))
2. Run storybook with `npm run storybook` without making changes
3. Open console to view error

https://github.com/swolflcs/default-value-repro

**System**

```
  System:
    OS: Windows 10 10.0.19042
    CPU: (16) x64 Intel(R) Core(TM) i7-10700 CPU @ 2.90GHz
  Binaries:
    Node: 14.17.5 - C:\Program Files\nodejs\node.EXE
    Yarn: 3.0.2 - ~\AppData\Roaming\npm\yarn.CMD
    npm: 6.14.14 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: Spartan (44.19041.1023.0), Chromium (93.0.961.38)
  npmPackages:
    @storybook/addon-actions: ^6.4.0-alpha.34 => 6.4.0-alpha.34
    @storybook/addon-docs: ^6.4.0-alpha.34 => 6.4.0-alpha.34
    @storybook/addon-essentials: ^6.4.0-alpha.34 => 6.4.0-alpha.34
    @storybook/addon-links: ^6.4.0-alpha.34 => 6.4.0-alpha.34
    @storybook/angular: ^6.4.0-alpha.34 => 6.4.0-alpha.34
    @storybook/builder-webpack5: ^6.4.0-alpha.34 => 6.4.0-alpha.34
    @storybook/manager-webpack5: ^6.4.0-alpha.34 => 6.4.0-alpha.34
```

**Additional context**

- This issue was discovered as a part of a large storybook project I was working on. I removed all of the uses of argType.defaultValue in the project and was still getting this deprecation error.
- For some reason in my reproduction repository I am unable to get the project to load in chrome. If this happens to you, I was able to load the project in Firefox. I made no changes in my reproduction so it is either my machine or another bug. I don't have the time to investigate that right now though.
Repository: pytorch
Issue: [Beta] FSDP initialization redesign
Labels: oncall: distributed,triaged,module: fsdp

Right now, users are required to initialize the entire model using the same seed among ranks before wrapping the model as FSDP instance. This impacts usability and also initialization performance. 

Once https://github.com/pytorch/pytorch/issues/64394 new API is done, FSDP initialization can be done inside FSDP constructor and can be done on the device directly. 

There are a few approaches to improve FSDP initialization. 
1.  Rank0 initializes the layers, and then scatter the shards to other ranks. In this way, the same seed is not required, but it requires scatter communication
2. Every rank only initializes its own shard once the shard is materialized, this requires module to support initializing partial tensor of a parameter, also the same seed is required
3. Every rank initializes some layers in parallel, and then scatter shards to other layers. In this way, the same seed is not required, it also requires scatter communication, but initialization is parallelized and performance could be improved as well

cc @pietern @mrshenli @pritamdamania87 @zhaojuanmao @satgera @rohan-varma @gqchen @aazzolini @osalpekar @jiayisuse @agolynski @SciPioneer @H-Huang @mrzzd @cbalioglu @gcramer23
Repository: pytorch
Issue: [Efficiency] Support optimizer overlap with backward pass in FSDP
Labels: oncall: distributed,triaged,module: fsdp

Similar to DDP and ZeroRedundancyOptimizer, FSDP can support optimizer overlap with backward pass by calling functional optimizers

cc @pietern @mrshenli @pritamdamania87 @zhaojuanmao @satgera @rohan-varma @gqchen @aazzolini @osalpekar @jiayisuse @agolynski @SciPioneer @H-Huang @mrzzd @cbalioglu @gcramer23
Repository: pytorch
Issue: [Tools] Improve FSDP debuggability
Labels: oncall: distributed,triaged,module: fsdp

Similar to DDP, we can improve FSDP debug ability by providing more verbose debug levels

cc @pietern @mrshenli @pritamdamania87 @zhaojuanmao @satgera @rohan-varma @gqchen @aazzolini @osalpekar @jiayisuse @agolynski @SciPioneer @H-Huang @mrzzd @cbalioglu @gcramer23
Repository: flutter
Issue: [pigeon] document all the lint ignores for Dart generated code
Labels: d: examples,package,team-ecosystem,p: pigeon,P3,triaged-ecosystem

Right now there are a handful of linter ignores in generated Dart code.  We should add documentation why each one is present which will help people understand why it's there and make it easier to potentially remove them in the future if we want.

example:
```dart
// ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name
```
Repository: flutter
Issue: [flutter_conductor] Support engine-only cherrypicks on existing candidate branches
Labels: team,P3,team-release

For the benefit of internal customers who require cherrypicked pre-builts.
Repository: pytorch
Issue: [Tools] Extend generic join to support FSDP
Labels: oncall: distributed,triaged,module: fsdp

refer to join() API used in DDP

cc @pietern @mrshenli @pritamdamania87 @zhaojuanmao @satgera @rohan-varma @gqchen @aazzolini @osalpekar @jiayisuse @agolynski @SciPioneer @H-Huang @mrzzd @cbalioglu @gcramer23