sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: pytorch
Issue: Addition of batch CSR tensors produces incorrect and invalid CSR tensor
Labels: module: sparse,triaged,module: correctness (silent),bug

## Issue description

As in the title.

## Code example

```python
>>> x=torch.ones((2, 2, 3)).to_sparse_csr()
>>> x
tensor(crow_indices=tensor([[0, 3, 6],
                            [0, 3, 6]]),
       col_indices=tensor([[0, 1, 2, 0, 1, 2],
                           [0, 1, 2, 0, 1, 2]]),
       values=tensor([[1., 1., 1., 1., 1., 1.],
                      [1., 1., 1., 1., 1., 1.]]), size=(2, 2, 3), nnz=6,
       layout=torch.sparse_csr)
>>> y=x.add(x)  # or x + x
>>> y
tensor(crow_indices=tensor([[0, 3, 6],
                            [0, 3, 6]]),
       col_indices=tensor([0, 1, 2, 0, 1, 2]),
       values=tensor([2., 2., 2., 2., 2., 2.]), size=(2, 2, 3), nnz=6,
       layout=torch.sparse_csr)
>>> torch._validate_sparse_csr_tensor_args(y.crow_indices(), y.col_indices(), y.values(), y.shape)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
RuntimeError: crow_indices and col_indices dimensionalities must be equal but got 2 and 1, respectively
```

The expected result is
```python
>>> y
tensor(crow_indices=tensor([[0, 3, 6],
                            [0, 3, 6]]),
       col_indices=tensor([[0, 1, 2, 0, 1, 2],
                           [0, 1, 2, 0, 1, 2]]),
       values=tensor([[2., 2., 2., 2., 2., 2.],
                      [2., 2., 2., 2., 2., 2.]]), size=(2, 2, 3), nnz=6,
       layout=torch.sparse_csr)
```

In place addition produces garbage as well:
```python
>>> x.add_(x)
tensor(crow_indices=tensor([[0, 3, 6],
                            [0, 3, 6]]),
       col_indices=tensor([0, 1, 2, 0, 1, 2]),
       values=tensor([2., 2., 2., 2., 2., 2.]), size=(2, 2, 3), nnz=6,
       layout=torch.sparse_csr)
```

## System Info

- PyTorch: master


cc @alexsamardzic @nikitaved @cpuhrsch @amjames @bhosmer
Repository: pytorch
Issue: Addition of CSC/BSR/BSC tensors raises RuntimeError exceptions
Labels: module: sparse,triaged

## Issue description

As in the title.

## Code example

```python
>>> x=torch.ones((2, 2)).to_sparse_csc()
>>> x + x
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
RuntimeError: col_indices expected sparse row compressed tensor layout but got SparseCsc
>>> x=torch.ones((2, 2)).to_sparse_bsr((1, 1))
>>> x + x
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
RuntimeError: empty_sparse_compressed expected sparse compressed (non-block) tensor layout but got SparseBsr
>>> x=torch.ones((2, 2)).to_sparse_bsc((1, 1))
>>> x + x
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
RuntimeError: empty_sparse_compressed expected sparse compressed (non-block) tensor layout but got SparseBsc
```

The addition of CSR tensors works as expected:
```python
>>> x=torch.ones((2, 2)).to_sparse_csr()
>>> x + x
tensor(crow_indices=tensor([0, 2, 4]),
       col_indices=tensor([0, 1, 0, 1]),
       values=tensor([2., 2., 2., 2.]), size=(2, 2), nnz=4,
       layout=torch.sparse_csr)
```

## System Info

- PyTorch: master

cc @alexsamardzic @nikitaved @cpuhrsch @amjames @bhosmer
Repository: pytorch
Issue: Addition of hybrid CSR tensors produces incorrect and invalid CSR tensor
Labels: module: sparse,triaged,module: correctness (silent),bug


## Issue description

As in the title

## Code example

```python
>>> x=torch.ones((2, 2, 2)).to_sparse(layout=torch.sparse_csr, dense_dim=1)
>>> x
tensor(crow_indices=tensor([0, 2, 4]),
       col_indices=tensor([0, 1, 0, 1]),
       values=tensor([[1., 1.],
                      [1., 1.],
                      [1., 1.],
                      [1., 1.]]), size=(2, 2, 2), nnz=4,
       layout=torch.sparse_csr)
>>> x + x
tensor(crow_indices=tensor([0, 2, 4]),
       col_indices=tensor([0, 1, 0, 1]),
       values=tensor([2., 2., 2., 2.]), size=(2, 2, 2), nnz=4,
       layout=torch.sparse_csr)
```

The expected result is
```python
>>> x + x
tensor(crow_indices=tensor([0, 2, 4]),
       col_indices=tensor([0, 1, 0, 1]),
       values=tensor([[2., 2.],
                      [2., 2.],
                      [2., 2.],
                      [2., 2.]]), size=(2, 2, 2), nnz=4,
       layout=torch.sparse_csr)
```

## System Info

- PyTorch: master


cc @alexsamardzic @nikitaved @cpuhrsch @amjames @bhosmer
Repository: next.js
Issue: Add `app/` directory support for custom title in Error page
Labels: linear: next

### Describe the feature you'd like to request

I would like to have the possibility to control the page title, description etc. in the error and not-found page.

currently Its possible to get around not-found page by creating a conditional in metadata function for the not-found page but is still not nice.

### Describe the solution you'd like

I would like not-found.js and error.js accept `metadata` and `generateMetadata()` similar to `page.js` and `layout.js` 


```jsx
// app/entity/[entityId]/not-found.js

export async function generateMetadata(props) {
  return {
      title: `entity ${props.params.entityId} not found`,
      description: `There is no entity with id: ${props.params.entityId}`
    }
}

export default function EntityNotFound() {
  return <div>Sorry this Entity was not found</div>;
}
```

```jsx
// app/error.js

export const metadata = {
      title: "Error",
      description: "ups something went wrong"
    }

export default function Error() {
  return <div>Sorry this Entity was not found</div>;
}
```

### Describe alternatives you've considered

for not-found, maybe allow to pass the metadata object as an argument for the function

```jsx
export default async function AnimalPage(props) {
  const singleEntity = await getAnimalById(props.params.entityId);

  if (!singleEntity) {
    
    const metadata = {
      title: `entity ${props.params.entityId} not found`,
      description: `There is no entity with id: ${props.params.entityId}`
    }
    notFound(metadata);
  }

return <>
... rest of the component

}
```
Repository: flutter
Issue: How to localize `PlatformProvidedMenuItem`?
Labels: framework,platform-mac,a: internationalization,a: desktop,P2,team-macos,triaged-macos

The constructor of `PlatformProvidedMenuItem` doesn't expose the `label` property, which is declared as `final`.
```dart
// The only constructor of `PlatformProvidedMenuItem`.
  const PlatformProvidedMenuItem({
    required this.type,
    this.enabled = true,
  }) : super(label: ''); 
```

I have a "View" menu in macOS defined like this:
```dart
      PlatformMenu(
        // Localized menu name "View"
        label: ls.viewMenu,
        menus: [
          PlatformMenuItemGroup(
            members: [
              if (PlatformProvidedMenuItem.hasMenu(
                  PlatformProvidedMenuItemType.toggleFullScreen))
                // Again, no way to localized this.
                const PlatformProvidedMenuItem(
                    type: PlatformProvidedMenuItemType.toggleFullScreen),
            ],
          ),
        ],
      )
```

Here's the screenshot in Chinese:

<img width="311" alt="image" src="https://user-images.githubusercontent.com/11565096/217031393-92c43c5c-fb54-461e-af8b-5cea2319c4d5.png">

Flutter doctor:

```
[✓] Flutter (Channel stable, 3.7.1, on macOS 13.2 22D49 darwin-arm64, locale
    zh-Hans-CN)
[✗] Android toolchain - develop for Android devices
    ✗ Unable to locate Android SDK.
      Install Android Studio from:
      https://developer.android.com/studio/index.html
      On first launch it will assist you in installing the Android SDK
      components.
      (or visit https://flutter.dev/docs/get-started/install/macos#android-setup
      for detailed instructions).
      If the Android SDK has been installed to a custom location, please use
      `flutter config --android-sdk` to update to that location.

[✓] Xcode - develop for iOS and macOS (Xcode 14.2)
[✓] Chrome - develop for the web
[!] Android Studio (not installed)
[✓] VS Code (version 1.75.0)
[✓] Connected device (2 available)
[✓] HTTP Host Availability
```
Repository: stable-diffusion-webui
Issue: [Feature Request]: Enable direct-ml for this stable-diffusion-webui.
Labels: enhancement,platform:mac

### Is there an existing issue for this?

- [x] I have searched the existing issues and checked the recent builds/commits

### What would your feature do ?

Enable direct-ml for stable-diffusion-webui, enabling usage of intel/amd GPU in windows system.
This protocol is already tested, a pull request will be submit soon.

### Proposed workflow

**With pytorch-directml 1.13, we could add this feature with minimal code change.**
All we need is to modify get_optimal_device_name (in devices.py), and add 
```python
if has_dml():
    return "dml"
```
dml could not be refrenced by name, so you should also modify get_optimal_device (also in devices.py), adding
```python
if get_optimal_device_name() == "dml"
    import torch_directml
    return torch_directml.device()
```
and modify sd_models.py to avoid using "dml" as string, change line from
```python
device = map_location or shared.weight_load_location or devices.get_optimal_device_name()
```
to
```python
device = map_location or shared.weight_load_location or devices.get_optimal_device()
```
finally, add a dml workaround to devices.py:
```python
# DML workaround
if has_dml():
    orig_cumsum = torch.cumsum
    orig_Tensor_cumsum = torch.Tensor.cumsum
    torch.cumsum = lambda input, *args, **kwargs: ( orig_cumsum(input.to("cpu"), *args, **kwargs).to(input.device) )
    torch.Tensor.cumsum = lambda self, *args, **kwargs: ( orig_cumsum(self.to("cpu"), *args, **kwargs).to(self.device) )
```
you could define has_dml() wherever suits your need.

To install enviorment:
```bash
conda create -n stable_diffusion_directml python=3.10
conda activate stable_diffusion_directml
conda install pytorch=1.13.1 cpuonly -c pytorch
pip install torch-directml==0.1.13.1.dev230119 gfpgan clip
pip install git+https://github.com/mlfoundations/open_clip.git@bb6e834e9c70d9c27d0dc3ecedeebeaeb1ffad6b
# Launch to clone packages including requirements
python .\launch.py --skip-torch-cuda-test --lowvram --precision full --no-half
# Install requirements
pip install -r repositories\CodeFormer\requirements.txt
pip install -r requirements.txt
# Start
python .\launch.py --skip-torch-cuda-test --lowvram --precision full --no-half
```
Here are examples
![Sample1](https://user-images.githubusercontent.com/23612863/217033089-82a27c09-8903-4b28-b843-b6b924f7eaab.png)
![Sample2](https://user-images.githubusercontent.com/23612863/217033286-2281533a-b5ce-43a4-907f-7a23ebbe2aab.png)


### Additional information

_No response_
Repository: ant-design
Issue: Form validation with Zod
Labels: 💡 Feature Request,Inactive

### What problem does this feature solve?

Allow using Zod (https://github.com/colinhacks/zod) schemas for Form validation. 

### What does the proposed API look like?

```
rules={z.object(...)}
```

<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->
Repository: PowerToys
Issue: Enable FancyZone Window Snapping for Virtual Applications
Labels: Needs-Triage

### Description of the new feature / enhancement

Published/Seamless applications from Citrix should resize/snap into FancyZone windows similar to any other Windows application.

### Scenario when this would be used?

I manage Citrix XenApp (Citrix Cloud) for my company and we have 1500 employees who use several dozen applications virtually.  When dragging a virtual application, published as a seamless application from Citrix, the applications do not snap/resize as expected.  They DO resize successfully when using the native Windows 11 window management in the top menu but DO NOT resize when using FancyZones.

### Supporting information

_No response_
Repository: stable-diffusion-webui
Issue: [Feature Request]: Persist the png info when sending an image from txt2img to extras/img2img/inpaint
Labels: enhancement

### Is there an existing issue for this?

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

### What would your feature do ?

If you generate an image in txt2img and send it to extras to upscale it, the upscaled image only has the upscaler information in the PNG info. If you input the generated PNG (with the generation info already in it) from txt2img by hand, it persists that.

For img2img and inpaint, the PNG info is just overwritten with the new one.

It would be great if the image persists its full history of what was done to it when sending it around in the webui.

### Proposed workflow

1. Generate an image in txt2img.
2. Send it to extras/img2img/inpaint.
3. Use it, optionally repeat step 2.
4. The final PNG should contain the full history of steps of what was done.


### Additional information

_No response_
Repository: flutter
Issue: Language fallback for i18n tools
Labels: framework,a: internationalization,P2,customer: chalk (g3),team-framework,triaged-framework

Internal bug: b/256596915

Currently, there isn't any way to use the system's fallback locales (for example, iPhones provide the ability to specify multiple preferred languages), nor is there a way to set a default fallback locale when using flutter's `gen-l10n` tool. 

I'll be using this issue to keep track of this while I come up with a proposal.
Repository: TypeScript
Issue: Module resolution should not look for node_modules outside project roots
Labels: Suggestion,Awaiting More Feedback

Currently, module resolution looks for node_modules all the way to the root of the filesystem. However, this is slow for certain virtual filesystems, like the one used in vscode-web, which maps only a part of the file system to in-memory files and the rest to web requests. https://github.com/microsoft/vscode/pull/173591 shows the workaround needed to stop tsserver from reading these parts of the filesystem.

Instead, module resolution should not look for node_modules directories outside project roots -- at least as specified in updateOpen messages, but I think there are other ways too.
Repository: angular
Issue: Please report about circular dependencies of standalone components on "build" step
Labels: feature,area: core,area: compiler,cross-cutting: standalone

### Which @angular/* package(s) are relevant/related to the feature request?

compiler

### Description

If standalone component A imports standalone component B, and B imports A, then `ReferenceError: Cannot access 'A' before initialization` will be raised. 
But it will be only raised in runtime 🤷‍♂️


### Proposed solution

Please do not allow to compile components with circular dependencies.

### Alternatives considered

Or, allow circular dependencies 😜
Repository: flutter
Issue: async CustomPainter.paint implementation leads to unclear error
Labels: framework,dependency: dart,P2,team-framework,triaged-framework,dependency:dart-triaged

## Reproduction code
```dart
class _ImageDrawer extends CustomPainter {
  ui.Image? _image;

  @override
  Future<void> paint(Canvas canvas, Size size) async {
    if (_image == null) {
      final ui.ImmutableBuffer buffer =
          await ui.ImmutableBuffer.fromUint8List(base64Decode(_displayP3Logo));
      final ui.ImageDescriptor descriptor =
          await ui.ImageDescriptor.encoded(buffer);
      final ui.Codec codec = await descriptor.instantiateCodec();
      _image = (await codec.getNextFrame()).image;
    }
    canvas.drawImage(_image!, const Offset(0.0, 0.0), Paint());
  }
  
  @override
  bool shouldRepaint(covariant CustomPainter oldDelegate) => true;
}
```

## observed result

This code compiles fine.  The fact that `paint` has become asynchronous doesn't cause any warning or error.  There is a runtime error generated:
```
[VERBOSE-2:dart_vm_initializer.cc(41)] Unhandled Exception: Bad state: A Dart object attempted to access a native peer, but the native peer has been collected (nullptr). This is usually the result of calling methods on a native-backed object when the native resources have already been disposed.
#0      StateError._throwNew (dart:core-patch/errors_patch.dart:135:5)
dart-lang/sdk#57147      Canvas._drawImage (dart:ui/painting.dart)
dart-lang/sdk#57148      Canvas.drawImage (dart:ui/painting.dart:5289:27)
```

## expected result

I'd expect one of the following, in order of preference:
1) A compilation error that changing the sync function to an async isn't allowed
1) A linter warning
1) A runtime error that specifically notes the cause of the problem, instead of the result of the problem
Repository: vscode
Issue: Graceful disconnect to remote Management Host
Labels: under-discussion,remote-connection

<!-- ⚠️⚠️ 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. -->

<!-- Describe the feature you'd like. -->

During a remote connection, if the client closes gracefully, the closing message doesn't necessarily reach the Management host since the message is sent async.  So the Management host sticks around expecting the possibility of a reconnection that isn't going to happen, because if the client window is fully closed then they'll do a full connection flow the next time they connect instead of a reconnect.  If the disconnect message is not received by the Management host in vscode-server, then it hangs around for a long time and consumes remote resources.

During the window close / disconnect we want to ensure the message is sent immediately to the Management host before shutdown so that the Management host can fully close properly.
Repository: go
Issue: x/build/cmd/runqemubuildlet: qemu failed to find an available port: address already in use
Labels: OS-Darwin,Builders,NeedsInvestigation

Occasionally the Darwin builders get stuck in a loop unable to start guests due to an "address already in use" error (for the VNC server port, presumably).

The immediate cause is that there is another instance of QEMU still running which is using that port. Manually killing that QEMU instance gets things unstuck.

My best guess is that this extra instance of QEMU was hung and runqemubuildlet's heartbeat timed out, but something is wrong with the heartbeat cancellation, which thus didn't actually fully kill the stuck QEMU.
Repository: go
Issue: net/http: TestResponseControllerSetPastWriteDeadline failures
Labels: NeedsInvestigation

```
#!watchflakes
post <- pkg == "net/http" && test == "TestResponseControllerSetPastWriteDeadline"
```

Issue created automatically to collect these failures.

Example ([log](https://build.golang.org/log/48a676b7801bfc0a7c9bece4263f4f16c66d4eda)):

    --- FAIL: TestResponseControllerSetPastWriteDeadline (0.00s)
        --- FAIL: TestResponseControllerSetPastWriteDeadline/h1 (21.24s)
            responsecontroller_test.go:109: unexpected connection error: Get "https://127.0.0.1:50493": unexpected EOF


— [watchflakes](https://go.dev/wiki/Watchflakes)
Repository: flutter
Issue: Android engine test flaking on failure to fetch dependencies 
Labels: c: new feature,platform-android,engine,P2,c: flake,team-android,triaged-android

Feature: Migrate gradle to use --offline mode to not download dependencies dynamically during CI. 

In https://ci.chromium.org/ui/p/flutter/builders/prod/Linux%20Android%20Debug%20Engine/20211/overview

```
ERROR: Failed to fetch maven artifact org.robolectric:android-all-instrumented:4.2.2_r1.2-robolectric-r1-i3
```

This flake is causing Android build/test times on CI to increase by several minutes due to automatic re-tries.
Repository: flutter
Issue: [Tool] Improve `flutter build` output
Labels: tool,platform-windows,platform-web,a: build,P3,team-web,triaged-web

## Work

* [x] Make the Windows build print the build duration in seconds
* [x] Make Windows builds print the build output path & size
* [ ] Make web builds print the build output path & size

## Use case

Building a Flutter app creates a bunch of files and directories in the `build` directory. Currently, it is difficult to find the build output on web and Windows.

The console output for building an APK contains the APK path:


```
> flutter build apk

💪 Building with sound null safety 💪

Running Gradle task 'assembleRelease'...                           74.0s
✓  Built build\app\outputs\flutter-apk\app-release.apk (19.8MB).
```

However, the console output for building a Windows or web app does not:

```
> flutter build windows

💪 Building with sound null safety 💪

Building Windows application...
```

```
> flutter build web

💪 Building with sound null safety 💪

Compiling lib\main.dart for the Web...                             25.1s
```

## Proposal

1. Make the Windows build print the build duration in seconds
2. Make the Windows and web builds print the build output path & size

Example:

```
> flutter build windows

💪 Building with sound null safety 💪

Building Windows application...                             99.9s
✓  Built build\windows\runner\Release\app.exe (19.8MB).
```

```
> flutter build web

💪 Building with sound null safety 💪

Compiling lib\main.dart for the Web...                             25.1s
✓  Built build\web\main.dart.js (19.8MB).
```

/cc @christopherfujino
Repository: rust
Issue: Unactionable error on type alias impl trait in trait with type parameters
Labels: A-diagnostics,T-compiler,F-type_alias_impl_trait

### Code

```Rust
#![feature(type_alias_impl_trait)]
trait T1<O> {
    type Fut<'a, I>: std::future::Future<Output = ()> + 'a
    where 
        Self: 'a, 
        I: 'a; // should have `+ Into<O>` here

    fn fun<'a, I: Into<O> + 'a>(&'a mut self, input: I) -> Self::Fut<'a, I>;
}

struct Impl<O>(O);
impl<O> T1<O> for Impl<O> {
    type Fut<'a, I> = impl std::future::Future<Output = ()> + 'a
    where
        Self: 'a,
        I: 'a;
    fn fun<'a, I: Into<O> + 'a>(&'a mut self, input: I) -> Self::Fut<'a, I> {
        let o = input.into();
        async move{
            self.0 = o;
        }
    }
}
```


### Current output

```Shell
error[E0277]: the trait bound `O: From<I>` is not satisfied
  --> src/lib.rs:19:9
   |
19 | /         async move{
20 | |             self.0 = o;
21 | |         }
   | |_________^ the trait `From<I>` is not implemented for `O`
   |
   = note: required for `I` to implement `Into<O>`
note: required by a bound in `<Impl<O> as T1<O>>::fun`
  --> src/lib.rs:17:19
   |
17 |     fn fun<'a, I: Into<O> + 'a>(&'a mut self, input: I) -> Self::Fut<'a, I> {
   |                   ^^^^^^^ required by this bound in `<Impl<O> as T1<O>>::fun`
help: consider restricting type parameter `O`
   |
12 | impl<O: std::convert::From<I>> T1<O> for Impl<O> {
   |       +++++++++++++++++++++++

For more information about this error, try `rustc --explain E0277`.
error: could not compile `playground` due to previous error
```


### Desired output

Should guide user to add `+ Into<O>` on the type alias definition in the trait.

### Rationale and extra context

The complaint about `O` not being `From<I>` is unclear and seemingly nonsensical, because the function signature requires `I: Into<O>`. And the suggested fix is wrong as well.

### Other cases

_No response_

### Anything else?

_No response_