sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: opencv
Issue: How to get layer attribute in DNN Module in Python 
Labels: priority: low,category: dnn

##### System information (version)
<!-- Example
- OpenCV => 4.2
- Operating System / Platform => Windows 64 Bit
- Compiler => Visual Studio 2017
-->

- OpenCV => :grey_question:
- Operating System / Platform => :grey_question:
- Compiler => :grey_question:

##### Detailed description

How to get layer attribute  such as Conv kernel size , step size..
`
net = cv2.dnn.readNetFromONNX("ir.onnx")
`
`
layer = net.getLayer("conv1")
`

the layer object doesn't have the layer attribute.
##### Steps to reproduce

<!-- to add code example fence it with triple backticks and optional file extension
    ```.cpp
    // C++ code example
    ```
 or attach as .txt or .zip file
-->
Repository: flutter
Issue: Autofocus not granted in bottomsheet
Labels: a: text input,framework,f: material design,a: quality,f: focus,has reproducible steps,found in release: 2.2,team-design,triaged-design

When a textfield with autofocus is used in a bottomSheet, the autofocus is not granted to the input and stays on the page in the back. It works for a modalBottomSheet though.

Reproduction:

```
import 'package:flutter/material.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: Page1(),
    );
  }
}

class Page1 extends StatelessWidget {
  const Page1({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('page1'),
      ),
      body: SingleChildScrollView(
        child: Page1Content(),
      ),
    );
  }
}

class Page1Content extends StatelessWidget {
  const Page1Content({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Column(
      children: [
        TextFormField(
          autofocus: true,
        ),
        ElevatedButton(
          onPressed: () {
            showBottomSheet(
              context: context,
              builder: (_) => Container(
                padding: const EdgeInsets.all(20),
                color: Colors.blueGrey[100],
                child: Column(
                  children: [
                    TextFormField(
                      autofocus: true,
                    ),
                  ],
                ),
              ),
            );
          },
          child: Text('Bottom sheet'),
        ),
        ElevatedButton(
            onPressed: () {
              Navigator.of(context)
                  .push(MaterialPageRoute(builder: (ctx) => Page2()));
            },
            child: Text('go to next')),
      ],
    );
  }
}

class Page2 extends StatelessWidget {
  const Page2({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('page2'),
      ),
      body: Container(
        child: TextFormField(
          autofocus: true,
        ),
      ),
    );
  }
}

```
Repository: godot
Issue: Graphical glitch when zooming in a big sprite in the editor
Labels: bug,topic:rendering,topic:2d

### Godot version

3.3.2

### System information

Linux Mint 20.1 Ulyssa

### Issue description

when zooming into a sprite in the editor the sprite deforms


https://user-images.githubusercontent.com/58333865/121510280-c1252f00-c9e7-11eb-836b-eda11aeabff6.mp4

> 

### Steps to reproduce

open scene and zoom into the sprite

### Minimal reproduction project

[Zoom Bug.zip](https://github.com/godotengine/godot/files/6630608/Zoom.Bug.zip)
Repository: pytorch
Issue: [Feature Request] Deterministic implementation for AdaptiveMaxpool1d.
Labels: module: nn,triaged,enhancement,module: determinism,module: pooling

## 🚀 Feature
Provide a deterministic implementation for `AdaptiveMaxpool1d`.

## Motivation
We want to do experiments on XML-CNN that need to ensure the reproducibility of the results. But when we use `nn.AdaptiveMaxPool1d`,  it comes to an error saying that we can open an issue here to prioritize this operation. 
```
RuntimeError: adaptive_max_pool2d_backward_cuda does not have a deterministic implementation, but you set 'torch.use_deterministic_algorithms(True)'.
You can turn off determinism just for this operation if that's acceptable for your application.
You can also file an issue at https://github.com/pytorch/pytorch/issues to help us prioritize adding deterministic support for this operation.
```

cc @mruberry @kurtamohler @albanD @jbschlosser @heitorschueroff
Repository: pytorch
Issue: Support negative step sizes for slicing
Labels: triaged,module: python array api

The [array API specification stipulates](https://data-apis.org/array-api/latest/API_specification/indexing.html#slice-syntax) that the slicing syntax needs to be equivalent to Pythons [`slice()`](https://docs.python.org/3/library/functions.html#slice) syntax. That includes negative step sizes that PyTorch does not support:

```python
import torch

t = torch.rand((3,))
t[::-1]
```

```
ValueError: step must be greater than zero
```

## Additional context

This was already proposed in #229, but finally dismissed in https://github.com/pytorch/pytorch/issues/229#issuecomment-548092342 in favor of `torch.flip()`. Note that this is only a substitution for a negative step size of 1 (`::-1`) rather than negative step sizes in general.


cc @mruberry @rgommers @pmeier
Repository: pytorch
Issue: Remove support for multiple ellipses in slicing
Labels: triaged,module: advanced indexing,module: deprecation,needs design,module: python array api

The [array API specification stipulates](https://data-apis.org/array-api/latest/API_specification/indexing.html#multi-axis-indexing) that the slice for nd tensors shall contain at most one [ellipsis](https://docs.python.org/3/library/constants.html#Ellipsis) (`...`). PyTorch allows an arbitrary number:

```python
import torch

a = torch.rand((1, 2, 3, 4, 5))
a[..., 0, ..., ...]
```

Not only is this behavior undocumented, it also makes no sense: what dimension would the `0` applied to in the above example?

cc @mruberry @rgommers @pmeier @asmeurer @leofang
Repository: TypeScript
Issue: Extract to constant in enclosing scope should optionally also replace later usage
Labels: Suggestion,Awaiting More Feedback

Given this code:
```ts
	public setParts(lineNumber: number, parts: GhostTextPart[]): void {
		const foreground = this.themeService.getColorTheme().getColor(ghostTextForeground);
		let opacity: string | undefined = undefined;
		let color: string | undefined = undefined;
		if (foreground) {


			opacity = String(foreground.rgba.a);
			color = Color.Format.CSS.format(opaque(foreground))!;
		}

		const borderColor = this.themeService.getColorTheme().getColor(ghostTextBorder);
		let border: string | undefined = undefined;
		if (borderColor) {
			border = `2px dashed ${borderColor}`;
		}
```

I would like to factor our `this.themeService.getColorTheme()` and extract it into its own constant. This should include all later usages.
Since there could be side effects in between, I suggest to do it only if later occurences are also selected.

This is my current workflow and I don't feel smart doing it like that. Multicursors don't really help here.

![recording](https://user-images.githubusercontent.com/2931520/121521118-f8014200-c9f3-11eb-9a10-fca0f8635033.gif)

Also, it would be nice if the name of the new local is heuristically derived from the expression (`(...).getFooBar(...) -> `fooBar`).

I'm willing to do a PR if I get some pointers.

Let's make the editing experience in VS Code even more amazing 😉
Repository: rust
Issue: generic const exprs in diagnostics aren't printed with substs applied
Labels: A-diagnostics,T-compiler,A-const-generics,F-generic_const_exprs

Given the following code: [link](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=f262555bd938b68a2191975eeff11d6b)

```rust
#![feature(const_generics, const_evaluatable_checked)]
#![allow(incomplete_features)]

trait Trait {}
struct HasCastInTraitImpl<const N: usize, const M: usize>;
impl<const M: usize> Trait for HasCastInTraitImpl<M, { M + 1 }> {}
pub struct HasTrait<T: Trait>(T);
fn foo<const N: usize>() -> HasTrait<HasCastInTraitImpl<{ N + 1 }, { N + 1}>> { loop {} }

fn main() {}
```

The current output is:

```
error: unconstrained generic constant
 --> src/main.rs:8:29
  |
7 | pub struct HasTrait<T: Trait>(T);
  |                        ----- required by this bound in `HasTrait`
8 | fn foo<const N: usize>() -> HasTrait<HasCastInTraitImpl<{ N + 1 }, { N + 1}>> { loop {} }
  |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = help: try adding a `where` bound using this expression: `where [(); { M + 1 }]:`
note: required because of the requirements on the impl of `Trait` for `HasCastInTraitImpl<{ N + 1 }, { N + 1}>`
 --> src/main.rs:6:22
  |
6 | impl<const M: usize> Trait for HasCastInTraitImpl<M, { M + 1 }> {}
  |                      ^^^^^     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0308]: mismatched types
 --> src/main.rs:8:29
  |
8 | fn foo<const N: usize>() -> HasTrait<HasCastInTraitImpl<{ N + 1 }, { N + 1}>> { loop {} }
  |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `{ N + 1}`, found `{ M + 1 }`
  |
  = note: expected type `{ N + 1}`
             found type `{ M + 1 }`

error: aborting due to 2 previous errors
```

Ideally the output should look like:

```
error[E0308]: mismatched types
 --> src/main.rs:8:29
  |
8 | fn foo<const N: usize>() -> HasTrait<HasCastInTraitImpl<{ N + 1 }, { N + 1}>> { loop {} }
  |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `{ N + 1}`, found `{ (N + 1) + 1 }`
  |
  = note: expected type `{ N + 1}`
             found type `{ (N + 1) + 1 }`
```

@rustbot label: +A-const-generics +F-const_generics +F-const_evaluatable_checked
Repository: transformers
Issue: ViT tensorflow Implementation
Labels: Feature request

# 🚀 Feature request

<!-- A clear and concise description of the feature proposal.
     Please provide a link to the paper and code in case they exist. -->

I was reading about ViT in the HuggingFace document and noticed there is no TF implementation of it. It would be great to have it in HuggingFace repo.

## Motivation

I have seen [this](https://keras.io/examples/vision/image_classification_with_vision_transformer/) and think it wouldn't be so hard. We can convert pytorch pretrain weights and use it for tensroflow model. 
 
<!-- Please outline the motivation for the proposal. Is your feature request
     related to a problem? e.g., I'm always frustrated when [...]. If this is related
     to another GitHub issue, please link here too. -->
Repository: flutter
Issue: [proposla] Add TextThemeData 
Labels: framework,f: material design,c: proposal,team-design,triaged-design

We have IconTheme and IconThemeData or ButtonTheme and ButtonThemeData. Is there any reason why when we define themes for a flutter app there is no TextThemeData type?
Repository: TypeScript
Issue: Project references: error when importing `tsx` file in referenced project
Labels: Bug,Rescheduled

# Bug Report

<!--
  Please fill in each section completely. Thank you!
-->

### 🔎 Search Terms

<!--
  What search terms did you use when trying to find an existing bug report?
  List them here so people in the future can find this one more easily.
-->

project references jsx tsx typescriptreact javascriptreact compiler options composite

### 🕗 Version & Regression Information

<!-- When did you start seeing this bug occur?

"Bugs" that have existed in TS for a long time are very likely to be FAQs; refer to
  https://github.com/Microsoft/TypeScript/wiki/FAQ#common-bugs-that-arent-bugs

If possible, please try testing the nightly version of TS to see if it's already been fixed.
For npm: `typescript@next`
This is also the 'Nightly' version in the playground: http://www.typescriptlang.org/play/?ts=Nightly

Note: The TypeScript Playground can be used to try older versions of TypeScript.

Please keep and fill in the line that best applies:
-->
- This is the behavior in every version I tried, and I reviewed the FAQ for entries about project references

### ⏯ Playground Link

N/A

### 💻 Code

Reduced test case: https://github.com/OliverJAsh/ts-project-references-jsx-bug

`shared/tsconfig.json`:
```json
{
    "compilerOptions": {
        "composite": true,
        "jsx": "react",
    }
}
```

`shared/foo-jsx.tsx`:
```tsx
export const foo = 1;
```

`app/tsconfig.json`:
```json
{
  "compilerOptions": {
    "composite": true
  },
  "references": [
    {
      "path": "../shared/tsconfig.json"
    }
  ]
}

```

`app/main.ts`:
```ts
import * as fooJsx from "../shared/foo-jsx";

fooJsx;
```

1. Run `tsc --build app/tsconfig.json --verbose`

### 🙁 Actual behavior


```
[18:36:23] Projects in this build:
    * shared/tsconfig.json
    * app/tsconfig.json

[18:36:23] Project 'shared/tsconfig.json' is out of date because output file 'shared/foo-jsx.js' does not exist

[18:36:23] Building project '/Users/oliverash/Development/ts-project-references-jsx-bug/shared/tsconfig.json'...

[18:36:24] Project 'app/tsconfig.json' is out of date because output file 'app/main.js' does not exist

[18:36:24] Building project '/Users/oliverash/Development/ts-project-references-jsx-bug/app/tsconfig.json'...

app/main.ts:1:25 - error TS6305: Output file '/Users/oliverash/Development/ts-project-references-jsx-bug/shared/foo-jsx.d.ts' has not been built from source file '/Users/oliverash/Development/ts-project-references-jsx-bug/shared/foo-jsx.tsx'.

1 import * as fooJsx from "../shared/foo-jsx";
                          ~~~~~~~~~~~~~~~~~~~


Found 1 error.
```

### 🙂 Expected behavior

No errors.

---

I am able to workaround the error by adding `"jsx": "react"` to `app/tsconfig.json`, but this feels redundant. The file I am importing is from a referenced project so I shouldn't need to set compiler options for this.
Repository: pytorch
Issue: Context manager for torch.jit.ignore is not covered by test coverage 
Labels: oncall: jit

## 🐛 Bug

Due to current implementation of torch.jit.ignore context manager, test coverage tests skip the coverage for torch.jit.ignore. We should fix this in the future. 



cc @gmagogsfm
Repository: opencv
Issue: readNetFromONNX - (-215:Assertion failed) inputs.size() == 1 in function 'getMemoryShapes'
Labels: category: dnn,category: dnn (onnx)

Hi, 

Hi get the following error when loading my ONNX model:
```
net = cv2.dnn.readNetFromONNX('/content/model/mrcnn.onnx')
```
Error:
```
---------------------------------------------------------------------------
error                                     Traceback (most recent call last)
<ipython-input-18-60eb738b451d> in <module>()
     29 print("[INFO] loading Mask R-CNN from the disk...")
---> 30 net = cv2.dnn.readNetFromONNX('/content/model/mrcnn.onnx')

error: OpenCV(4.5.3-pre) /content/opencv/modules/dnn/src/onnx/onnx_importer.cpp:2129: error: (-2:Unspecified error) in function 'handleNode'
> Node [Split]:(ROI_3/split:0) parse error: OpenCV(4.5.3-pre) /content/opencv/modules/dnn/src/layers/slice_layer.cpp:164: error: (-215:Assertion failed) inputs.size() == 1 in function 'getMemoryShapes'
```

I don't understand why, does anyone have a clue?
The model can be downloaded from the following link: https://drive.google.com/file/d/1o_o17Nrpi4Daw-Dxaxif1LKT5yzZ1WJ6/view?usp=sharing

Best Regards,
Luis
Repository: godot
Issue: KinematicBody2D doesnt move with platform if it has another KinematicBody2D on top of it.
Labels: bug,confirmed,topic:physics,topic:2d

### Godot version

3.3.x (018ca6b)

### System information

Ubuntu 20.10, GeForce GTX 1650

### Issue description

When One KinematicBody2D stands on another KinematicBody2D, on a side moving platform, they slide instead of moving with the platform. See the gif below:
![Peek 10-06-2021 16-28](https://user-images.githubusercontent.com/46932830/121589916-065c5780-ca0e-11eb-8aab-9680a3537880.gif)
Sometimes it seems to work for a little time, and then they slide.

The expected result would be that both bodies move with the platform.
In Godot 3.2.3, the behaviour is the expected one.

### Steps to reproduce

1. Make a side way moving platform with a KinematicBody2D.
2. Put two KinematicBodies2D, one on top of the other, on the platform.

### Minimal reproduction project


[KB2D_Platforms_Test.zip](https://github.com/godotengine/godot/files/6634104/KB2D_Platforms_Test.zip)
Repository: go
Issue: x/pkgsite: examples don't properly run for preview release modules
Labels: NeedsInvestigation,pkgsite

### What did you do?

Went to run the [WithLabels](https://pkg.go.dev/cloud.google.com/go/logging@v1.5.0-jsonlog-preview/jsonlog#example-Logger.WithLabels) example.

### What did you expect to see?

A runnable example.

### What did you see instead?

The following error in output:

```bash
go: finding module for package cloud.google.com/go/logging/jsonlog
go: downloading cloud.google.com/go/logging v1.4.2
go: downloading cloud.google.com/go v0.84.0
prog.go:4:2: module cloud.google.com/go/logging@latest found (v1.4.2), but does not contain package cloud.google.com/go/logging/jsonlog
```

### Additional Context

- This is likely to to this being based off a pre-release tag: cloud.google.com/go/logging@v1.5.0-jsonlog-preview.
- This example does not actually produce any meaningful output, just noticed the error when I had click on it.
Repository: pytorch
Issue: TransformedDistribution's log_prob gradient is inconsistent w.r.t. cache_size
Labels: module: distributions,triaged

## 🐛 Bug

Currently, when we draw a non-reparameterized sample from TransformedDistribution and evaluate its log probability, we get different results when changing the cache_size of the transform.

## To Reproduce

```python
import torch
import torch.distributions as dist
torch.manual_seed(0)
power = torch.tensor(2., requires_grad=True)
d = dist.TransformedDistribution(
    dist.LogNormal(0., 1.), dist.transforms.PowerTransform(power, cache_size=1))
z = d.sample()
d.log_prob(z).backward()
print(power.grad)  # return -0.500
torch.manual_seed(0)
power = torch.tensor(2., requires_grad=True)
d = dist.TransformedDistribution(
    dist.LogNormal(0., 1.), dist.transforms.PowerTransform(power, cache_size=0))
z = d.sample()
d.log_prob(z).backward()
print(power.grad)  # return 0.6873
```

## Expected behavior

The result should be agnostic w.r.t. cache_size. It seems to me that the result with `cache_size=0` is correct.

## Environment

 - PyTorch Version: 1.8.1
 - OS: Linux
 - How you installed PyTorch: conda
 - Python version: 3.8

## Additional context

The discussion here is relevant: https://github.com/pyro-ppl/numpyro/pull/1044#discussion_r642103731

cc @fritzo @neerajprad @alicanb @nikitaved @martinjankowiak
Repository: godot
Issue: Method info not disappear
Labels: bug,topic:editor

### Godot version

3.3.2 stable official

### System information

win10 64

### Issue description

when I write a method the information appears
then I remove the method call but the information remains visible

### Steps to reproduce

![gif gif](https://user-images.githubusercontent.com/19652075/121592503-10487f80-ca3b-11eb-9a58-2a8d364ae439.gif)


### Minimal reproduction project

_No response_
Repository: electron
Issue: Encourage apps to support "Use Selection for Find"
Labels: enhancement :sparkles:,documentation :notebook:,beginner friendly

### Preflight Checklist

- [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/master/CONTRIBUTING.md) for this project.
- [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/master/CODE_OF_CONDUCT.md) that this project adheres to.
- [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a feature request that matches the one I want to file, without success.

### Problem Description

A very commonly-available feature across macOS apps is "Use Selection for Find," a menu item with Command-E as the standard keyboard shortcut. Its behavior is that it takes the currently-selected text, and enters it into the application's text search target (field, or whatever). Command-G can then be quickly used to find the next instance of that text.

But more importantly, a well-behaved macOS app also pastes that text to the `NSPasteboard` with name `NSPasteboardNameFind`. In Swift, you'd get it like this: `let findPBoard = NSPasteboard(name: .find)`. Apps should also grab any text on that pasteboard when activating, and enter them into their text search targets.

Given how many third-party developer-focused apps I use are Electron apps, I think there'd be a big benefit to helping those app developers include this functionality in their apps.

I don't know if non-macOS platforms have similar functionality, but it's very handy.

### Proposed Solution

Use the `NSPasteboard` with name `NSPasteboardNameFind`. In Swift, you'd get it like this: `let findPBoard = NSPasteboard(name: .find)`. Apps should also grab any text on that pasteboard when activating, and enter them into their text search targets.

### Alternatives Considered

The alternative is copy and paste, which requires several extra steps. The problem is that the feature is so ubiquitous across macOS apps, one often forgets that it doesn't work in a particular Electron app. Leading to a moment of confusion and cognitive disconnect when it doesn't work.

### Additional Information

n/a
Repository: pytorch
Issue: print_regression should handle sharded test properly
Labels: oncall: distributed,better-engineering

Currently https://github.com/pytorch/pytorch/blob/167477329d3aa035b54642d4a0f6b32af4b6384a/tools/print_test_stats.py#L798 doesnt play well with shard test1/2 because the current logic shifts test cases between the 2 shards to make sure test time for each shard is balanced.

For example: https://app.circleci.com/pipelines/github/pytorch/pytorch/334115/workflows/73a5a3b1-a045-41ca-b5aa-dea195383383/jobs/14045452
This reports a change of ~4k test cases were add/remove which can only be the result of some tests being routed towards the other shard.

it would be nice if the function could download both shards and then generate the report based on what actually ran 

cc @pietern @mrshenli @pritamdamania87 @zhaojuanmao @satgera @rohan-varma @gqchen @aazzolini @osalpekar @jiayisuse @agolynski @SciPioneer @H-Huang @mrzzd @cbalioglu @gcramer23
Repository: flutter
Issue: Switch all native callbacks in Engine test harnesses to dart:ffi
Labels: engine,P3,team-engine,triaged-engine

Right now the test harnesses use TestDartNativeResolver to setup native callbacks for our unit tests. We should switch these to using dart:ffi instead.

cc @chinmaygarde @cbracken