sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: rust
Issue: auto_traits + negative_impls not working as expected with associated types
Labels: C-bug,F-negative_impls,F-auto_traits

It's possible that this is working as designed or that I'm taking the wrong approach here, so apologies up front if that's the case. 

I seem to be able to use the combination of `auto_traits` and `negative_impls` to implement traits in a way that is generic but polymorphic for generic types on concrete types, but not for associated types on traits. 

```rust
#![feature(auto_traits, negative_impls)]

use std::future::Future;

trait MyTrait {}

struct MyStruct {}

struct GenericStruct<T> {
    value: T,
}

auto trait NotString {}
impl !NotString for String {}

// Generics on a concrete type work as expected
// I can specify T: NotString and there is no conflict
impl MyTrait for GenericStruct<String> {}
impl<T: NotString> MyTrait for GenericStruct<T> {}

// Associated Types don't work as I'd expect
impl<S> MyTrait for S where S: Future<Output = String> {}

// Even though T is NotString there's a conflict between Future<Output = String> and Future<Output = T>
impl<S, T: NotString> MyTrait for S where S: Future<Output = T> {}
```
I would've expected that the compiler could tell that `Future<Output = String>` and `Future<Output = T>` were mutually exclusive, given that `T: NotString`. 

### Meta

`rustc --version --verbose`:
```
rustc 1.50.0-nightly (7efc097c4 2020-12-12)
binary: rustc
commit-hash: 7efc097c4fe6e97f54a44cee91c56189e9ddb41c
commit-date: 2020-12-12
host: x86_64-apple-darwin
release: 1.50.0-nightly
```
</p>
</details>
Repository: pytorch
Issue: Checkpointing without re-entrant autograd
Labels: module: autograd,triaged

## 🚀 Feature
Checkpointing using saved tensors default hooks (no re-entrant autograd!)

## Motivation

[Checkpointing](https://pytorch.org/docs/stable/checkpoint.html?highlight=checkpoint#torch.utils.checkpoint.checkpoint) allows users to trade compute for memory by not saving the intermediate results during the forward pass and by recomputing the forward during the backward pass.

However, the current implementation uses re-entrant autograd (it calls backward from inside the backward).

I'd like to explore an alternative to implement checkpointing using the [newly introduced saved tensors default hooks](https://github.com/pytorch/pytorch/pull/62563).

## POC

```python
class Checkpoint():
    def __init__(self, function):
        self.function = function
        
    def __call__(self, *args):
        storage = []
        counter = 0
        
        def pack(x):
            nonlocal counter, storage
            # we could store something else than an int here, but not None because that's a valid saved tensor value
            storage.append(counter) 
            counter += 1
            return counter - 1
        
        def unpack(x):
            nonlocal counter, storage
            if isinstance(storage[x], int):
                counter_inner = 0
                def inner_pack(inner):
                    nonlocal counter, storage, counter_inner
                    storage[counter_inner] = inner
                    counter_inner += 1
                    return None
                
                torch.autograd.graph.set_saved_tensors_default_hooks(inner_pack, lambda x: None)
                with torch.set_grad_enabled(True):
                    y = self.function(*args)
                torch.autograd.graph.reset_saved_tensors_default_hooks()
                
            assert not isinstance(storage[x], int)
            return storage[x]
        
        torch.autograd.graph.set_saved_tensors_default_hooks(pack, unpack)
        y = self.function(*args)
        torch.autograd.graph.reset_saved_tensors_default_hooks()
        return y


model = Checkpoint(ModelBase())
head = ModelHead()
head(model(x)).backward()
```

## Alternatives

The current Checkpointing implementation, which uses re-entrant autograd.

## Additional context

Limitations with the code in POC:
* Does not handle storing/restoring RNG state
* Assumes that intermediate values will be saved in the same order during both calls to `self.function`
* Conflicts with other usages of saved tensors default hooks
* Not thread-safe (for now)


cc @ezyang @albanD @zou3519 @gqchen @pearu @nikitaved @soulitzer @Lezcano @Varal7
Repository: pytorch
Issue: Make KernelFunction::makeFromUnboxedFunctor infer KernelFunctor from input argument
Labels: module: bootcamp,triaged,module: dispatch

In aten/src/ATen/core/boxing/KernelFunction.h this function is currently defined as:

```
   template<bool AllowLegacyTypes = false, class KernelFunctor>
   static KernelFunction makeFromUnboxedFunctor(std::unique_ptr<OperatorKernel> kernelFunctor);
```

however, it turns out in all uses of this function kernelFunctor is actually an instance of KernelFunctor. So there is no need to force these to vary: we can just force these to be the same and infer the KernelFunctor template argument from the argument.

Modify the signature to

```
   template<bool AllowLegacyTypes = false, class KernelFunctor>
   static KernelFunction makeFromUnboxedFunctor(std::unique_ptr<KernelFunctor> kernelFunctor);
```

and then deal with the implications.
Repository: pytorch
Issue: Building pytorch from source results in "an object with that name is already defined" error on import
Labels: module: build,triaged,module: pybind

## 🐛 Bug

After building from tag v1.9.0-rc4, I see an error that appears to be pybind11-related when I try to import torch.

## To Reproduce

Steps to reproduce the behavior:

1. git checkout v1.9.0-rc4 in the repository
2. git submodule update --recursive
3. Have gcc 7.3.0, cuda 10.1, and pybind11 2.6.1 in the environment
4. build via python3 setup.py install

<!-- If you have a code sample, error messages, stack traces, please provide it here as well -->
On attempting to `import torch` in python:
```
terminate called after throwing an instance of 'std::runtime_error'
  what():  generic_type: cannot initialize type "Options": an object with that name is already defined
Aborted
```

## Expected behavior

I expected import torch to work cleanly.

## Environment

```
Collecting environment information...
PyTorch version: N/A
Is debug build: N/A
CUDA used to build PyTorch: N/A
ROCM used to build PyTorch: N/A

OS: CentOS Linux release 7.7.1908 (Core) (x86_64)
GCC version: (GCC) 7.3.0
Clang version: 5.0.0 (tags/RELEASE_500/final)
CMake version: version 3.16.2
Libc version: glibc-2.2.5

Python version: 3.7 (64-bit runtime)
Python platform: Linux-3.10.0-1062.18.1.el7.x86_64-x86_64-with-centos-7.7.1908-Core
Is CUDA available: N/A
CUDA runtime version: 10.1.243
GPU models and configuration: GPU 0: TITAN X (Pascal)
Nvidia driver version: 440.59
cuDNN version: Could not collect
HIP runtime version: N/A
MIOpen runtime version: N/A

Versions of relevant libraries:
[pip3] numpy==1.19.3
[pip3] numpydoc==1.1.0
[conda] Could not collect
```

 - PyTorch Version (e.g., 1.0):
 - OS (e.g., Linux):
 - How you installed PyTorch (`conda`, `pip`, source):
 - Build command you used (if compiling from source): python3 setup.py install
 - Python version:
 - CUDA/cuDNN version:
 - GPU models and configuration:
 - Any other relevant information:

## Additional context

<!-- Add any other context about the problem here. -->


cc @malfet @seemethere @walterddr
Repository: youtube-dl
Issue: Site Support Request: www.independent.co.uk
Labels: site-support-request

<!--

######################################################################
  WARNING!
  IGNORING THE FOLLOWING TEMPLATE WILL RESULT IN ISSUE CLOSED AS INCOMPLETE
######################################################################

-->


## Checklist

<!--
Carefully read and work through this check list in order to prevent the most common mistakes and misuse of youtube-dl:
- First of, make sure you are using the latest version of youtube-dl. Run `youtube-dl --version` and ensure your version is 2021.06.06. If it's not, see https://yt-dl.org/update on how to update. Issues with outdated version will be REJECTED.
- Make sure that all provided video/audio/playlist URLs (if any) are alive and playable in a browser.
- Make sure that site you are requesting is not dedicated to copyright infringement, see https://yt-dl.org/copyright-infringement. youtube-dl does not support such sites. In order for site support request to be accepted all provided example URLs should not violate any copyrights.
- Search the bugtracker for similar site support requests: http://yt-dl.org/search-issues. DO NOT post duplicates.
- Finally, put x into all relevant boxes (like this [x])
-->

- [x] I'm reporting a new site support request
- [x] I've verified that I'm running youtube-dl version **2021.06.06**
- [x] I've checked that all provided URLs are alive and playable in a browser
- [x] I've checked that none of provided URLs violate any copyrights
- [x] I've searched the bugtracker for similar site support requests including closed ones


## Example URLs

https://www.independent.co.uk/arts-entertainment/music/news/snoop-dogg-olympics-kevin-hart-b1894970.html

https://www.independent.co.uk/tv/editors-picks/netflix-dating-show-sexy-beasts-has-nothing-below-the-surface-v0b982027


## Description

Uses JWPlayer

OTHER PUBLICATIONS:
https://www.independentespanol.com/
https://www.independentarabia.com/
https://www.indyturk.com/
https://www.independentpersian.com/
https://www.independenturdu.com/
Repository: pytorch
Issue: Rewrite PyTorch CUDA backend in Triton
Labels: module: cuda,triaged

@chsasank opened this issue in https://github.com/openai/triton/issues/150 and I thought this was pretty interesting. It's true that to actually ship this in PyTorch mainline, we would indeed want an offline Triton compiler, and we'd also need to work out all of the distribution shenanigans that a project as big as PyTorch would have to do.

However, I think it is feasible to experimentally prototype Triton versions of PyTorch kernels out of tree, with only a few extra hooks in PyTorch core. In https://github.com/pytorch/pytorch/pull/62660 I give a prototype for how to directly register Python implementations of kernels, allowing us to *override* preexisting CUDA implementations. So here's how it would work:

1. You write a Triton kernel to replace some kernel in PyTorch
2. You call the Python operator registration API, and override the existing CUDA kernel with your new Triton kernel
3. Profit!

There's a little example of how to override existing kernels in https://github.com/pytorch/pytorch/pull/62660/files#diff-415017bcad4fa6cd6d3dfe5f6ea1caffcd7122b46b8c1e4825f7d889efc80a62 (the API needs improvement). To make it work with Triton, you would just call into Triton in the same way as the tutorial. I could probably produce a working end to end example, but I'll let whatever intrepid soul who wants to embark on this project have the fun of figuring that out.

If someone is actually interested in setting up the repo to do this and charging ahead, I'll prioritize getting #62660 into PyTorch proper.

cc @ngimel @ptillet
Repository: yt-dlp
Issue: [ytmusic] Parse metadata from music.youtube.com
Labels: site-enhancement,site:youtube

<!--

######################################################################
  WARNING!
  IGNORING THE FOLLOWING TEMPLATE WILL RESULT IN ISSUE CLOSED AS INCOMPLETE
######################################################################

-->


## Checklist

<!--
Carefully read and work through this check list in order to prevent the most common mistakes and misuse of yt-dlp:
- First of, make sure you are using the latest version of yt-dlp. Run `yt-dlp --version` and ensure your version is 2021.08.02. If it's not, see https://github.com/yt-dlp/yt-dlp on how to update. Issues with outdated version will be REJECTED.
- Search the bugtracker for similar site feature requests: https://github.com/yt-dlp/yt-dlp. DO NOT post duplicates.
- Finally, put x into all relevant boxes like this [x] (Dont forget to delete the empty space)
-->

- [x] I'm reporting a site feature request
- [x] I've verified that I'm running yt-dlp version **2021.08.02**
- [x] I've searched the bugtracker for similar site feature requests including closed ones


## Description

<!--
Provide an explanation of your site feature request in an arbitrary form. Please make sure the description is worded well enough to be understood, see https://github.com/ytdl-org/youtube-dl#is-the-description-of-the-issue-itself-sufficient. Provide any additional information, suggested solution and as much context and examples as possible.
-->

Hello, I'd like to ask for help another time. Would someone be able to implement the following feature:
If using following syntax:
`--output "x:/muzik/%%(artist)s %%(album)s %%(release_year)s`
It will work as expected, extract the song artists album name and song release year. But in most cases, there are many artist on a song and the song's were released in different year which produces multiple folders instead of ARTIST-ALBUM-RELEASE_YEAR it creates multiple folders: ARTIST1_ARTIST2_ALBUM_RELEASE_YEAR1 and ARTIST1_ARTIST2_ARTIST3_ALBUM_RELEASEYEAR2 which becomes confusing.

In my opinion the best solution would be able to to parse the album main artist and album release year (pic related) with a tag like %%(main_artist)s and %%(album_release_year).  Maybe there is such a option, I tried various tags like 'creator' or 'uploader' or 'album_artist' but none of them work!
![image](https://user-images.githubusercontent.com/74107254/128067324-80a7e783-ec15-4f9c-bac5-337c1c4e164f.png)

Thanks for reading and any input is appreciated!
Repository: create-react-app
Issue: [v5] Configure stricter eslint rules and auto fixers
Labels: issue: proposal,needs triage

### Is your proposal related to a problem?

Now days there are eslint rules out there helping developers move to modern api's and write better code - some with autofixers.

This issue was sparked by input from [this comment](https://github.com/facebook/create-react-app/pull/11201#discussion_r681822022) good input - but also requires CRA to have more oppinions on things like best practice and good code conventions. (so potentially a discussion for a smaller forum as it will be oppinionated discussions - exercise will be to try to stay objectively on the pros/cons on different code styles eg. to prevent "footguns"/improve readability/improve git diffs etc....)

### Describe the solution you'd like

The CRA project will have to figure out if we want to move towards being more oppinionated / strict about these things.

### Describe alternatives you've considered


### Additional context
Repository: pytorch
Issue: Add Convolution support for lazy tensor
Labels: module: convolution,triaged,module: lazy

conv_overrideable/_backward were introduced by XLA integration, and (probably) aren't supported by any other backends.  It encompasses all the various forms of convolution.  

For the torchscript backend, the only lowering we have is to call into 'slow_conv'2d/3d in eager.  To properly lower it, we have to ...?

One option is to avoid using convolution_overrideable in the aten side, 

note: forward might be easier, make sure to account for _backward handling in the design.

- which cudnn convs and how to form their args (nvfuser team help us, or follow how 'eager' calls these)
- autograd may itself pick specific backward kernels, we need to lower these appropriately to TS even if we lower a generic one for fwd
Repository: pytorch
Issue: Make printing to stdout / stderr in tests in CI an error
Labels: triaged,better-engineering

A bunch of our tests write to stdout / stderr, either by `print()` calls that were left in from development or from warnings incurred. This makes the test reporting harder to read and follow, we could make this an error (guarded by an env variable so you can still print in tests locally with no changes). We aren't good about this right now so we'd need an allowlist for all the current offenders

#62637 implements this in the test runner, but we have to go through and add a big allowlist for everything
Repository: flutter
Issue: `animation.LiveBinding.press.animation` golden file test is flaky
Labels: a: tests,team,framework,a: animation,P2,c: tech-debt,c: flake,team-framework,triaged-framework

Related to this change: https://github.com/flutter/flutter/pull/86912 and subsequent reverts/relands

The golden file test `animation.LiveBinding.press.animation` appears to be producing a new image almost every day.
See image results for the last week in gold: 
- https://flutter-gold.skia.org/search?corpus=flutter&include_ignored=false&left_filter=name%3Danimation.LiveBinding.press.animation&max_rgba=0&min_rgba=0&negative=true&not_at_head=false&positive=true&reference_image_required=false&right_filter=&sort=descending&untriaged=true

 Each dot along the line is a commit in flutter/flutter, they are interactive and link to pull requests. Each color dot represents a different image. Clicking on the hash in the color key will show you the image.

Since the above change, the test has reported a new image almost every day across multiple machines.

The other related test appears to be stable that can be viewed here:
- https://flutter-gold.skia.org/search?corpus=flutter&include_ignored=false&left_filter=name%3Danimation.LiveBinding.press.animation.2&max_rgba=0&min_rgba=0&negative=true&not_at_head=false&positive=true&reference_image_required=false&right_filter=&sort=descending&untriaged=true
I came across this while running tests locally on my machine, I am using a Mac at TOT and continually failing this golden file test.

Will file a PR to skip the test until the flake is resolved.

FYI @dkwingsmt
Repository: pytorch
Issue: dynamic shapes
Labels: triaged,module: lazy

A toy example with varying shape:

```
import torch
import lazy_tensor_core
import lazy_tensor_core.debug.metrics as metrics
import lazy_tensor_core.core.lazy_model as ltm
lazy_tensor_core._LAZYC._ltc_init_ts_backend()
device = 'xla'
dtype = torch.float32
x1 = torch.randn(2, 4, device=device, dtype=dtype)
x2 = torch.randn(2, 8, 8, device=device, dtype=dtype)
def f(x):
  o = x + 1.0
  o = torch.nn.functional.gelu(o)
  return o
for i in range(2):
  o = f(x1)
  ltm.mark_step()
o = f(x2)
ltm.mark_step()
print(metrics.metrics_report())
```
The second run with o = f(x2) should be reusing computation graph (GraphExecutor).

--
approach (1): we want to lower ops which do expands/broadcasts in their lowerings to 'opaque' ones that don't require explicit expands - such as all binary ops, BMM, some others.  There is already such an 'opaque' op in aten and TS IR, we just need to not explicitly call the expands and instead pass the opaque ops through.

@asuhan to describe another approach (querying dynamically)
Repository: pytorch
Issue: [FX] Support pytree `concrete_args` for *args
Labels: triaged,module: fx

Referenced in this issue: https://github.com/pytorch/pytorch/issues/60069

```
import torch
from torch import Tensor
import torch.nn as nn
import torch.fx as fx

class Module(nn.Module):
    def forward(self, x):
        return x

class Container(nn.Module):
    def __init__(self):
        super().__init__()
        self._module = Module()

    def forward(self, *args):
        return self._module(*args)

model = Container()
model(Tensor())

concrete_args = ((torch.fx.PH,),)
trace = fx.symbolic_trace(model, concrete_args=concrete_args)
"""
Traceback (most recent call last):
  File "/home/jamesreed/kwargs.py", line 22, in <module>
    trace = fx.symbolic_trace(model, concrete_args=concrete_args)
  File "/data/users/jamesreed/pytorch/torch/fx/_symbolic_trace.py", line 875, in symbolic_trace
    graph = tracer.trace(root, concrete_args)
  File "/data/users/jamesreed/pytorch/torch/fx/_symbolic_trace.py", line 556, in trace
    fn, args = self.create_args_for_root(fn, isinstance(root, torch.nn.Module), concrete_args)
  File "/data/users/jamesreed/pytorch/torch/fx/_symbolic_trace.py", line 460, in create_args_for_root
    assert(len(arg_names) == len(concrete_args))
AssertionError

"""
```

It would be nice if we had some way of informing the system of the arity of `args` such that we can make it into a tuple of `Proxy` and further calls with the exploded form will work.

cc @ezyang
Repository: go
Issue: cmd/compile: escape analysis reports that make() is using a non-constant size after inlining with a constant size
Labels: Performance,NeedsInvestigation,compiler/runtime

<!--
Please answer these questions before submitting your issue. Thanks!
For questions please use one of our forums: https://github.com/golang/go/wiki/Questions
-->

### What version of Go are you using (`go version`)?

<pre>
$ go version
go version go1.16.6 linux/amd64
</pre>

### Does this issue reproduce with the latest release?



### What operating system and processor architecture are you using (`go env`)?

<details><summary><code>go env</code> Output</summary><br><pre>
$ go env

</pre></details>

### What did you do?

```
package main

// translate translates any byte in s between (lower, upper) to (newLower, newLower + upper - lower)
func translate(s string, cap int, lower, upper, newLower byte) string {
	// code removed
	b := append(make([]byte, 0, cap), s...)
	// code removed
	return string(b)
}

// toLower returns s with all upper case characters replaced with their lower case counterparts.
func toLower(s string, cap int) string {
	return translate(s, cap, 'A', 'Z', 'a')
}

// lookup ASCII case insensitive map lookup.
func lookup(m map[string]string, key string) (string, bool) {
	if len(key) > 32 {
		return "", false
	}
	r, ok := m[toLower(key, 32)]
	return r, ok
}

```


### What did you expect to see?

translate() inlines into toLower() and resulting toLower() will also inline into it's caller. So in lookup() when toLower() is inlined would expect the capacity of slice created in translate() to be constant and therefore able to be reserved on the stack.

### What did you see instead?

```make([]byte, 0, cap)``` escapes to heap (non-constant size), when it is inlined into lookup().
If use a fixed capacity like ```make([]byte, 0, 32)``` in translate() the slice is always reserved on the stack.
Repository: youtube-dl
Issue: AES encryption.
Labels: question

QUESTION: if you do not use the "--prefer-insecure" command, can the downloaded data packets be read without decryption? 

CONTEXT: if i download a YouTube video with the title of "youtube title", would the ISP be able to know the title and the content of the video or would it be AES encrypted?

COMMENT: i asked this because the python files mention "AES" multiple times.