sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: tensorflow
Issue: Tensorflow cpu memory profiling
Labels: comp:tensorboard,stat:awaiting tensorflower,type:feature,TF 2.3,type:docs-feature


**System information**
- TensorFlow version (you are using): 2.3.1
- Are you willing to contribute it (**Yes**/No):

**Describe the feature and the current behavior/state.**

Tensorflow cpu memory profiling: we want to get detailed profiling as in GPU memory profiling.
(Beginning with a single thread.)
Currently: when running the memory profiler in CPU mode we do not see any memory profile data captured.

**Will this change the current api? How?**
no

**Who will benefit with this feature?**
Anyone profiling memory on CPU and trying to understand the memory behavior of operators.


**Any Other info.**
Repository: pytorch
Issue: Valgrind Shows Potential Memory Leaks
Labels: oncall: jit,module: autograd

## 🐛 Bug

<!-- A clear and concise description of what the bug is. -->

## To Reproduce
Hi, recently l noticed some potential memory leak in libtorch_cpu.
I am using Libtorch_cpu 1.8.1 in linux (~~Ubuntu 20.04~~ OS CentOS 8.2). Here is the c++ code that I used for testing.

```
#include <iostream>

#include <torch/torch.h>
#include <torch/script.h>

bool f()
{
    torch::NoGradGuard no_grad;
    std::cout << "--------------------------------------------------------------------" << std::endl;
    bool det = true;
    try {
        std::cout << "Engine test" << std::endl;
        torch::jit::script::Module model = torch::jit::load("/home/ion3/Downloads/retinaface-mnet-complete.pt");
        model.eval();
        model.to(torch::kCPU);

        for (int i = 0; i < 100; ++i) {
            std::cout << i << std::endl;
            torch::Tensor input_tensor = torch::rand({ 1, 3, 480, 640}, torch::kFloat32).to(torch::Device(torch::kCPU));
            auto outputs = model.forward({ input_tensor }).toTuple();
        }
    }
    catch (std::exception& e) {
        std::cout << e.what() << std::endl;
        std::cout << "--------------------------------------------------------------------\n";
        return false;
    }
    std::cout << "--------------------------------------------------------------------\n";
    return det;
}


int main(int, char**) {
    bool res = f();
    return res;
}
```
ValGrind shows 
```
==71193== LEAK SUMMARY:
==71193== definitely lost: 0 bytes in 0 blocks
==71193== indirectly lost: 0 bytes in 0 blocks
==71193== possibly lost: 4,956,000 bytes in 6 blocks
==71193== still reachable: 776,523 bytes in 12,086 blocks
==71193== suppressed: 0 bytes in 0 blocks
```
<!-- If you have a code sample, error messages, stack traces, please provide it here as well -->

## Expected behavior

No memory leaks at all.

## Environment

 - LibTorch 1.8.1 cpu:
 - OS CentOS 8.2:
 - download libtorch-cpu  from PyTorch.org

## Additional context
Since I have disable the grad, using this code,
```
torch::NoGradGuard no_grad;
```
It should be no memory leak, but I don't quite understand why my program have memory leak.
[Here is the full valgrind report](https://drive.google.com/file/d/1qHvIgSFTMzPLZH9Zxbyi4PpIAS57mDWw/view)


cc @ezyang @albanD @zou3519 @gqchen @pearu @nikitaved @soulitzer @Lezcano @gmagogsfm
Repository: flutter
Issue: Ability to control start and end points of a border
Labels: c: new feature,framework,c: proposal,P3,team-framework,triaged-framework

<!-- 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 making a border around a container for example or other Widgets with a container.
<!--
     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
To be able to control the start and points of the border. This would be similar to the Trim Paths in after effects. Here is a quick example I made in after effects of what I wanted to do to which led me to suggest this feature.


https://user-images.githubusercontent.com/63734405/116857312-a227c600-ac0d-11eb-9051-6652a81f5cc6.mp4


<!--
     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: rust
Issue: `x.py install` does not support Windows MSVC.
Labels: O-windows-msvc,T-bootstrap,C-bug

Running `x.py install` currently attempts to run `sh` shell scripts on Windows platforms, which isn't available in the prerequisite  tools for MSVC. `x.py install` should be able to be run on Windows without `sh`. 


### Error

```
Install std stage2 (Some(TargetSelection { triple: "x86_64-pc-windows-msvc", file: None }))


failed to execute command: "sh" "/E/rust/build/tmp/tarball/rust-std/x86_64-pc-windows-msvc/rust-std-1.54.0-dev-x86_64-pc-windows-msvc/install.sh" "--prefix=/E/usr/local" "--sysconfdir=/E/etc" "--datadir=/E/usr/local/share" "--docdir=/E/usr/local/share/doc/rust" "--bindir=/E/usr/local/bin" "--libdir=/E/usr/local/lib" "--mandir=/E/usr/local/share/man" "--disable-ldconfig"
error: The system cannot find the file specified. (os error 2)
```
Repository: rust
Issue: error[E0117] provides misleading explanation.
Labels: A-diagnostics,T-compiler

Given the following code: [rust playground](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&code=impl%20Drop%20for%20u32%7B%7D%0A%0Afn%20main()%7B%0A%20%20%20%20println!(%22Hey!%22)%0A%7D)
(This is straight-up copypasted from the error docs for E0117)

```rust
impl Drop for u32{}

fn main(){
    println!("Hey!")
}
```

The current output is, amongst other things:

```
error[E0117]: only traits defined in the current crate can be implemented for arbitrary types
 --> src/main.rs:1:1
  |
1 | impl Drop for u32{}
  | ^^^^^^^^^^^^^^---
  | |             |
  | |             `u32` is not defined in the current crate
  | impl doesn't use only types from inside the current crate
  |
  = note: define and implement a trait or new type instead
```

The sentence "impl doesn't use only types from inside the current crate" isn't clear to me.
I'm not completely sure on how to change it, maybe you could repeat the error description.

My rationale is that in this case, given the arbitrary type, the presence or absence of it in the crate isn't relevant, since you can't redefine u32.
In my opinion the message should instead be focused on the location of the trait.
Repository: godot
Issue: BitMap class limited to XY size 46340x46340
Labels: bug,topic:core,confirmed

<!-- Please search existing issues for potential duplicates before filing yours:
https://github.com/godotengine/godot/issues?q=is%3Aissue
-->

**Godot version:**
3.3.stable


**OS/device including version:**
Linux Ubuntu 20.04.2, NUC7PY, 16 gigs ram.


**Issue description:**
Cannot create a BitMap larger than 46340 x 46340.  Attempting to create a BitMap of (46341, 46341) crashes.

I wanted to use BitMap to create a 3D maze map index of blocks, so that I could build it fast logically before creating the mesh blocks.  Since BitMap is 2D, I extended it to stack XY "frames" vertically, representing the Z dimension.  e.g a 3D bitmap size of 2,3,4 would create a 2D BitMap of dimensions 2,12 with Y representing the four Z slots. Reading and writing gets translated from the 3D coords to the 2D bitmap coords.  See below (in this example, the very first bit at 0,0 shown set to true):

```
2:-- 
1:-- 
0:-- Frame 3
2:-- 
1:-- 
0:-- Frame 2
2:-- 
1:-- 
0:-- Frame 1
2:-- 
1:-- 
0:X- Frame 0

```
This works well, except I quickly hit the dimension limit for BitMaps, which I was not expecting.  I'm guessing the BitMap class is intended mainly for handling bitmap textures/images and therefore was never designed to handle anything larger than the typical 1K, 2K, 4K, 8K standards -- or in this case, 46K.

I'm mainly interested in understanding why the XY size limit is exactly 46340, which is a bit of a strange number in a world where we expect limits to be near power of twos.  Thanks!


**Steps to reproduce:**
Attach below script to a node and run.

**Minimal reproduction project:**
```

extends Node


func _ready():
	test(46340)
	print("Repeating with dimension of 46341 (will crash in 3 seconds)...")
	yield(get_tree().create_timer(3),"timeout")
	test(46341)
	print("You'll never see this!")


func test(size: int) -> void:
	var bm: BitMap = BitMap.new()
	print("using max xy dimensions of %s..." % size)
	bm.create(Vector2(size, size))
	print(bm.get_size())
	bm.set_bit(Vector2(0, size - 1), true)
	print(bm.get_bit(Vector2(0, size - 1)))
	bm.set_bit(Vector2(size - 1, size - 1), true)
	print(bm.get_bit(Vector2(size - 1, size - 1)))
	
	
```
Repository: go
Issue: cmd/compile: investigate maintaining TOC register r2 for ppc64x by default.
Labels: NeedsInvestigation,arch-ppc64x,compiler/runtime

On ppc64le we have had issues over the years due to the inconsistent setting of the TOC register r2 in Go code. In the C/C++ code that is compiled to be used with cgo, r2 is initialized and expected to be valid, but with the default build mode mode for Go programs it is not.

Due to recent issues #45564 and #45850 another variation of this problem appeared again. Discussions in #45850 lead us to the topic of whether we should be maintaining r2 by default.

This can wait until Go 1.18 but wanted to be sure it didn't get forgotten. We need also need to consider linux-ppc64 (no cgo support) and aix-ppc64 (not sure how that is affected.)

@cherrymui @pmur @Helflym FYI
Repository: fastapi
Issue: OpenAPI deepObject serialization for query parameters
Labels: feature,reviewed

### First check

* [x] I added a very descriptive title to this issue.
* [x] I used the GitHub search to find a similar issue and didn't find it.
* [x] I searched the FastAPI documentation, with the integrated search.
* [x] I already searched in Google "How to X in FastAPI" and didn't find any information.
* [x] I already read and followed all the tutorial in the docs and didn't find an answer.
* [x] I already checked if it is not related to FastAPI but to [Pydantic](https://github.com/samuelcolvin/pydantic).
* [x] I already checked if it is not related to FastAPI but to [Swagger UI](https://github.com/swagger-api/swagger-ui).
* [x] I already checked if it is not related to FastAPI but to [ReDoc](https://github.com/Redocly/redoc).
* [x] After submitting this, I commit to:
    * Implement a Pull Request for a confirmed bug - or implement the feature described in this issue :)

### Description

Allow usage of `deepObject` [serialization from OpenAPI 3](https://swagger.io/docs/specification/serialization/).

### What it could look like


```Python
from fastapi import FastAPI

app = FastAPI()

class UserQuery(BaseModel):
    role: str
    firstName: str

@app.get("/")
def read_root(id: Optional[UserQuery]):
    return {"Hello": "World"}
```

Query:
```
/users?id[role]=admin&id[firstName]=Alex
```

### Related

 * https://github.com/tiangolo/fastapi/issues/245#issuecomment-762729917
   * Links to a good example: https://stackoverflow.com/questions/48491688/how-to-define-parameters-with-square-brackets-in-openapi-swagger
 * https://github.com/tiangolo/fastapi/issues/203
Repository: godot
Issue: get_wordwrap_string_size reports wrong height with stretch_mode=2d and test_width and test_height set
Labels: bug,confirmed,topic:gui

**Godot version:**
3.3.0

**OS/device including version:**
MacOS 10.15.5

**Issue description:**
With stretch_mode=2d and test_width/height set, get_wordwrap_string_size thinks my line of text has 2 lines when it actually has 3 when rendered.

**Steps to reproduce:**
1. Made a new project
2. Set width=1280, height=1280, test_width=800, test_height=800, stretch/mode="2d"
3. Use the font I'm using (BalsamiqSans-Regular 28) and try to render the string I'm trying to render ("If there's anything scary out there, we'll handle it for sure!")
4. Get a height of 70, but expect something >= 105 (each line is 35 high)

Note it works fine if I turn off either stretch_mode=2d or set test_width and test_height back to 0.

**Minimal reproduction project:**

[Repro.zip](https://github.com/godotengine/godot/files/6416382/Repro.zip)
Repository: pytorch
Issue: CUDA RPC stream synchronization does not work with @rpc.functions.async_execution
Labels: oncall: distributed,triaged,module: rpc

Luca hit CUDA stream sync error when combining CUDA RPC with `@rpc.functions.async_execution`. See #56863

This is likely because `@rpc.functions.async_execution` will switch threads when executing user-functions. As a result, the current stream guard applied to request processing is not sufficient. 

cc @pietern @mrshenli @pritamdamania87 @zhaojuanmao @satgera @gqchen @aazzolini @rohan-varma @jjlilley @osalpekar @jiayisuse @mrzzd @agolynski @SciPioneer @H-Huang @cbalioglu
Repository: flutter
Issue: Crash reporting infrastructure for host unit-tests.
Labels: team,engine,P3,c: tech-debt,team-engine,triaged-engine

We've gotten away so far with having very rudimentary crash reporting built into the host unit-testing infrastructure. This is typically the collection of logs and backtraces on failed runs. But, while [debugging particularly hard to reproduce failures](https://github.com/flutter/flutter/issues/80964), the lack of core dumps, registers, and symbolicated backtraces gets in the way of making progress on flakes. Also, some flakes are never reported so data on failures is incomplete.

I think it's time to invest in crash reporting infrastructure for the host-unit tests that run on CI.  To be clear, **this won't be enabled into any of the the binaries distributed to the end user**. Crash reporting in Flutter applications remains a user concern. This is only for unit-tests and benchmarks that run on CI.

Some options:
* All host unit-test and benchmarks binaries embed a bespoke crash reporting mechanism like [Breakpad](https://chromium.googlesource.com/breakpad/breakpad/+/master/docs/getting_started_with_breakpad.md). All crash reports are gathered and reported in a single dashboard. This should catch issues where crashes are un-reported because tests are re-run. It is also cross-platform and will give us more information for each crash.
* @zanderso mentioned that the Dart VM team has a mechanism for gathering core-dumps after each crash. Perhaps this can be adapted for Flutter as well.
Repository: flutter
Issue: Autosubmit bot should refuse to land code without tests or test exemption
Labels: team,team-infra,P2,triaged-infra

The autosubmit bot currently posts a message if a PR doesn't involve tests.

The bot should go further and refuse to land the PR if it doesn't involve tests or have a comment from me or another admin that starts with the string '`test-exempt: `'.

In addition, we should adjust the heuristic as follows:

- [x] A PR that only removes code (no modified or added lines) is exempt from the need to add tests.
- [x] A PR that only affects comments (including documentation) is exempt from the need to add tests.
- [ ] A PR that only affect code inside the .github directory is exempt from the need to add tests.
- [ ] A PR that only affects .md files is exempt from the need to add tests.

See https://github.com/flutter/flutter/wiki/Tree-hygiene#tests
Repository: flutter
Issue: Bug: multiple asterisks are not properly parsed
Labels: package,team-ecosystem,has reproducible steps,P3,found in release: 2.2,p: flutter_markdown,found in release: 2.6,triaged-ecosystem

**Describe the bug**
Some asteriks are inadvertently emitted and not converted to bold. 

**How to reproduce**
Steps to reproduce the behavior:
1. `<b>Ajamila das</b><strong>:</strong> I remember one time watching Srila Prabhupada while all the people from the villages were out taking prasadam. He would go to the little window in the hut and then look out and watch them. Then I would remember the verse <em>catur-vidha-sri-bhagavat-prasada</em>, that the spiritual master is very satisfied if he sees the devotees taking prasadam. And he looked very happy, he looked very satisfied.`

`**Ajamila das****:** I remember one time watching Srila Prabhupada while all the people from the villages were out taking prasadam. He would go to the little window in the hut and then look out and watch them. Then I would remember the verse _catur-vidha-sri-bhagavat-prasada_, that the spiritual master is very satisfied if he sees the devotees taking prasadam. And he looked very happy, he looked very satisfied.`
For this scenario Ajamila das is emitted in bold followed by **:**. 
Ideally the : also must be emitted as bold.  

**Expected behavior**
For this scenario Ajamila das is emitted in bold followed by **:**. 
Ideally the : also must be emitted as bold.  

<details>
<summary>Screenshots</summary>

![image](https://user-images.githubusercontent.com/67467611/116085392-65fbdf00-a6bc-11eb-806e-361ace890330.png)
</details>




**Additional context**
Add any other context about the problem here.
Repository: flutter
Issue: Let MarkdownWidget implement Text
Labels: c: new feature,package,c: proposal,team-ecosystem,P3,p: flutter_markdown,triaged-ecosystem

**Is your feature request related to a problem? Please describe.**
When I use `expect(find.text('hello'), findsOneWidget);` it currently returns false when hello is in a MarkdownWidget. This means that texts that look for text being on the screen fail when exchange Text() with MarkdownBody() despite the text still being displayed on the screen

**Describe a possible solution.**
Let MarkdownWidget implement Text, so that the function that looks for a text finds it.
Repository: flutter
Issue: Bug: MarkdownBody ignores textAligment property
Labels: package,team-ecosystem,has reproducible steps,P3,found in release: 2.2,p: flutter_markdown,found in release: 2.6,triaged-ecosystem

flutter/flutter_markdown#205 is here again in current version. Probably it's related to flutter/flutter_markdown#358
Repository: flutter
Issue: Bug: `blockquote` property not being applied in `MarkdownBody`  widget
Labels: package,team-ecosystem,has reproducible steps,P3,found in release: 2.2,p: flutter_markdown,found in release: 2.6,triaged-ecosystem

**Describe the bug**
The `blockquote` property is not being applied in the `MarkdownBody` widget. All other `TextStyle` properties appear to be working, and so are the `blockquotePadding` and `blockQuoteDecoration`.

**How to reproduce**
Steps to reproduce the behavior:
1. Build a `MarkdownBody` widget
2. Specify the `blockquote` property to something like `TextTheme.of(context).bodyText2.copyWith(color: Colors.red)`
3. Note that the text does not, in fact, become red.

**Expected behavior**
Text should become red in the above example.

**Additional context**
Only tested on flutter web
Repository: flutter
Issue: Bug: Library doesn't allow text as root element
Labels: package,team-ecosystem,has reproducible steps,P3,found in release: 2.2,p: flutter_markdown,found in release: 2.6,triaged-ecosystem

**How to reproduce**
Steps to reproduce the behavior:
`MarkdownBody(data: "full description <b> bold2</b> Next1 next line2 \n\n<p> center</p>test full")`

**Actual behavior**
The following code renders as:
![image](https://user-images.githubusercontent.com/31158740/114851393-1545d580-9de2-11eb-8042-cbddb178b050.png)


**Expected behavior**
I would expect to also see part with p tag as well (as plain text).



I have found out that the code that erases it is:
![image](https://user-images.githubusercontent.com/31158740/114851546-3e666600-9de2-11eb-911a-ab61ebc3d2f7.png)

I don't understand why we cannot have text as child of the root element?

**Aditional information**
I am using version 0.5.0, however I can see the problematic code in the newest version as well.
Repository: flutter
Issue: [fllutter_markdown] `TextWidthBasis` support
Labels: c: new feature,package,c: proposal,team-ecosystem,P3,p: flutter_markdown,triaged-ecosystem

Hi

I currently try to achieve a behavior like _TextWidthBasis.longestLine_ of a _Text_ widget, but for the _MarkdownBody_ widget.

For me, it looks like the basic behavior for calculating the width of the widget is based on the parent (_TextWidthBasis.parent_).

https://api.flutter.dev/flutter/painting/TextWidthBasis-class.html

Is there a way of achieving this behavior?
I highly appreciate any suggestions!
Repository: flutter
Issue: Bug: "Markdown did not handle li for alignment" pollutes log
Labels: package,team-ecosystem,has reproducible steps,P3,found in release: 2.2,p: flutter_markdown,found in release: 2.6,triaged-ecosystem

**Describe the bug**
Indented bullet points with links, usually used in tables of contents, is polluting the log and making it hard to see other prints.
Present on v0.6.1.

**How to reproduce**
For this snippet:
- [Link 1](some-link)
  - [Link 2](some-link)
- [Link 3](some-link)

The following messages are logged:
```
flutter: Markdown did not handle li for alignment (repeat three times)
```

**Expected behavior**
No prints (the output document looks fine)
Repository: flutter
Issue: [flutter_markdown] block quote arrow not showing in markdown style property.
Labels: package,team-ecosystem,has reproducible steps,P3,found in release: 2.2,p: flutter_markdown,found in release: 2.6,triaged-ecosystem
Repository: flutter
Issue: Bug: Strikethrough Tags Not Correctly Rendered When Mixed with Emphasis and Order Changes
Labels: package,team-ecosystem,has reproducible steps,P3,found in release: 2.2,p: flutter_markdown,found in release: 2.6,triaged-ecosystem

**Describe the bug**
**NOTE:** This is a bug in the parsing of the Markdown tags by the `markdown package`. See dart-lang/tools#1279.

The markdown package incorrectly parses Markdown strikethrough tags that are combined with other emphasis tags and the order of the tags changes. This seems to only happen when the inline Markdown tags are in the same text block.

**How to reproduce**
The following Markdown text:

`**~~first~~** ~~**second**~~`

Should produce:

**~~first~~** ~~**second**~~

But the actual output is:

**~~first~~** \~\~**second**\~\~

**Additional context**
This behavior happens with both bold and italic emphasis.
Repository: flutter
Issue: [flutter_markdown] Remove padding/blockspacing under headings
Labels: c: new feature,package,c: proposal,team-ecosystem,P3,p: flutter_markdown,triaged-ecosystem

Is there a way to remove the spacing underneath a heading so that the text that follows it is underneath it directly? 

Thanks
Repository: flutter
Issue: [flutter_markdown] Support `maxLines` and `overflow`
Labels: c: new feature,package,c: proposal,team-ecosystem,P3,p: flutter_markdown,triaged-ecosystem

`Text` allows you to limit the number of lines the text may take up after wrapping and determine how the text should be truncated if it overflows the specified limit.

`MarkDownBody` should add these two arguments so that developers using the platform can still use `flutter_markdown` in contexts where they need to truncate text.