sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: yt-dlp
Issue: Oracle University support request
Labels: site-request,account-needed

### Checklist

- [X] I'm reporting a new site support request
- [X] I've verified that I'm running yt-dlp version **2021.12.27**. ([update instructions](https://github.com/yt-dlp/yt-dlp#update))
- [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](https://github.com/ytdl-org/youtube-dl#can-you-add-support-for-this-anime-video-site-or-site-which-shows-current-movies-for-free) or contain any [DRM](https://en.wikipedia.org/wiki/Digital_rights_management) to the best of my knowledge
- [X] I've searched the [bugtracker](https://github.com/yt-dlp/yt-dlp/issues?q=) for similar issues including closed ones. DO NOT post duplicates
- [X] I've read the [guidelines for opening an issue](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#opening-an-issue)
- [ ] I've read about [sharing account credentials](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#are-you-willing-to-share-account-details-if-needed) and am willing to share it if required

### Region

USA

### Example URLs

https://learn.oracle.com/ols/course/csv-import-series/85174/99279/113721

### Description

Could you please add Oracle University support?

### Verbose log

```shell
[debug] Command-line config: ['-Uv', 'https://learn.oracle.com/ols/course/csv-import-series/85174/99279/113721']
[debug] Encodings: locale cp1252, fs utf-8, out utf-8, err utf-8, pref cp1252
[debug] yt-dlp version 2021.12.27 [6223f67] (win_exe)
[debug] Python version 3.8.10 (CPython 64bit) - Windows-10-10.0.19044-SP0
[debug] exe versions: none
[debug] Optional libraries: Cryptodome, mutagen, sqlite, websockets
[debug] Proxy map: {}
Latest version: 2021.12.27, Current version: 2021.12.27
yt-dlp is up to date (2021.12.27)
[debug] [generic] Extracting URL: https://learn.oracle.com/ols/course/csv-import-series/85174/99279/113721
[generic] 113721: Requesting header
WARNING: [generic] Falling back on generic information extractor.
[generic] 113721: Downloading webpage
[generic] 113721: Extracting information
[debug] Looking for video embeds
ERROR: Unsupported URL: https://learn.oracle.com/ols/course/csv-import-series/85174/99279/113721
Traceback (most recent call last):
  File "yt_dlp\YoutubeDL.py", line 1353, in wrapper
  File "yt_dlp\YoutubeDL.py", line 1423, in __extract_info
  File "yt_dlp\extractor\common.py", line 599, in extract
  File "yt_dlp\extractor\generic.py", line 3829, in _real_extract
yt_dlp.utils.UnsupportedError: Unsupported URL: https://learn.oracle.com/ols/course/csv-import-series/85174/99279/113721
```
Repository: vscode
Issue: `SnapUpdateService` should use file service for watching
Labels: debt,under-discussion,snap

Noticed how the snap update service seems to use `fs.watch` directly:

https://github.com/microsoft/vscode/blob/ee1655a82ebdfd38bf8792088a6602c69f7bbd94/src/vs/platform/update/electron-main/updateService.snap.ts#L147

Suggest to use `IFileService.watch` instead with the non-recursive option to have consistent file change event handling.
Repository: storybook
Issue: Easy way to update args from actions
Labels: feature request,has workaround,args

I'd really like a way to update args declared in either `argTypes` or `Template.args` via actions without manually wiring up the code. 
Currently, the suggested solution looks like so:

```tsx
import { useArgs } from '@storybook/client-api';
import React from 'react';

const Template = (args) => {
    const [{ value, onChange }, updateArgs] = useArgs();

    return (
        <Input
            {...args}
            value={value}
            onChange={(e) => {
                updateArgs({ value: e.target.value });
                onChange(e);
            }}
        />
    );
};

export const Primary = Template.bind({});

export default {
    title: 'Input',
    component: Input,
    argTypes: {
        onChange: {
            action: 'changed',
        },
        value: {
            type: 'string',
        },
    },
}
```
This forces me to manually call `updateArgs` and `onChange` (so the `value` is updated and I get feedback in the `actions` tab).

I'd like to propose a solution that looks like so:

```tsx
const Template = (args) => {
  return <Input {...args} />;
};

export const Primary = Template.bind({});

export default {
  title: "Input",
  component: Input,
  argTypes: {
    onChange: {
      action: "changed",
      onEmit: (e) => ({value: e.target.value}),
    },
    value: {
      type: "string",
    },
  },
};
```

The output of `onEmit` should be used much like the param passed to `updateArgs`, and update the relevant args.
This way I can define the action once, and all my templates inherit it.
Repository: godot
Issue: V Scroll Speed does not work
Labels: bug,topic:editor,confirmed,topic:gui

### Godot version

3.4.2 stable

### System information

w10 64

### Issue description

I want a faster vertical scroll when I use the mouse wheel but "V Scroll speed" has no effect on that.
Nothing just happens even if you put a value of 240.
![Captura](https://user-images.githubusercontent.com/19652075/147661129-56b6fd73-c15c-44c2-b657-2a801e1002a6.PNG)



### Steps to reproduce

just set a value in the option and navigate vertically through the code using the middle wheel of the mouse (turning the wheel) to check if it works or not.
It will not work

### Minimal reproduction project

...
Repository: excalidraw
Issue: library item drag-n-drop doesn't work on Android
Labels: mobile

Touch-and-hold doesn't do anything on Android (chrome).
Repository: flutter
Issue: Provide more details on the usage of SkSL warmup
Labels: engine,d: api docs,a: quality,perf: speed,P3,perf: startup,team-engine,triaged-engine

Details of use SkSL warmup

 I read the document, but some details are not explained in the document

 https://docs.flutter.dev/perf/rendering/shader#how-to-use-sksl-warmup

 1. If the app has animation drop frames caused by SKSL, do both Android and iOS require SkSL warmup before publishing to the store?

 2. Does this provide a better experience on older devices,  such as iPhone6s?

 3. On which version of the Flutter stable channel was SkSL warmup support for iOS Metal added?

 4. Does a mobile platform, such as the iOS platform, only use one mobile device for SkSL warmup, or does it require multiple devices and multiple .sksl.json files?

 5. How do we use SkSL warmup to get the maximum performance improvement?


 Thank you for your reply
Repository: pytorch
Issue: Cuda sync mode input checking is wrong for non-string/int inputs.
Labels: module: cuda,triaged,Stale

### 🐛 Describe the bug

Setting the sync debug mode to a bool gives a very unhelpful error message:
```python
import torch
torch.cuda.set_sync_debug_mode(True)
```

Gives
```
/usr/local/lib/python3.7/dist-packages/torch/cuda/__init__.py:565: UserWarning: Synchronization debug mode is a prototype feature and does not yet detect all synchronizing operations (Triggered internally at  ../torch/csrc/cuda/Module.cpp:445.)
  torch._C._cuda_set_sync_debug_mode(debug_mode)
---------------------------------------------------------------------------
SystemError                               Traceback (most recent call last)
<ipython-input-7-fc930b886662> in <module>()
      1 import torch
----> 2 torch.cuda.set_sync_debug_mode(True)
      3 
      4 N = 100000
      5 a = torch.ones(N, device="cuda") * 42

/usr/local/lib/python3.7/dist-packages/torch/cuda/__init__.py in set_sync_debug_mode(debug_mode)
    563             raise RuntimeError("invalid value of debug_mode, expected one of `default`, `warn`, `error`")
    564 
--> 565     torch._C._cuda_set_sync_debug_mode(debug_mode)
    566 
    567 def get_sync_debug_mode() -> int:

SystemError: <built-in function _cuda_set_sync_debug_mode> returned NULL without setting an error
```

### Versions

Version 1.10.0+cu111 (current version on colab)

cc @ngimel
Repository: go
Issue: x/tools/gopls: processes /tmp/output as a go file because vscode says it is a go file
Labels: NeedsDecision,gopls,Tools

<!--
Please answer these questions before submitting your issue. Thanks!
-->

### gopls version
at tip:

Build info
----------
golang.org/x/tools/gopls master
    golang.org/x/tools/gopls@(devel)
    github.com/BurntSushi/toml@v0.4.1 h1:GaI7EiDXDRfa8VshkTj7Fym7ha+y8/XxIgD2okUIjLw=
    github.com/google/go-cmp@v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ=
    github.com/sergi/go-diff@v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0=
    golang.org/x/mod@v0.5.1 h1:OJxoQ/rynoF0dcCdI7cLPktw/hR2cueqYfjm43oqK38=
    golang.org/x/sync@v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ=
    golang.org/x/sys@v0.0.0-20211019181941-9d821ace8654 h1:id054HUawV2/6IGm2IV8KZQjqtwAOo2CYlOToYqa0d0=
    golang.org/x/text@v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk=
    golang.org/x/tools@v0.1.7 => ../
    golang.org/x/xerrors@v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
    honnef.co/go/tools@v0.2.1 h1:/EPr//+UMMXwMTkXvCCoaJDq8cpjMO80Ou+L4PDo2mY=
    mvdan.cc/gofumpt@v0.1.1 h1:bi/1aS/5W00E2ny5q65w9SnKpWEF/UIOqDYBILpo9rA=
    mvdan.cc/xurls/v2@v2.3.0 h1:59Olnbt67UKpxF1EwVBopJvkSUBmgtb468E4GVWIZ1I=

I  opened a text file /tmp/output, vscode thinks it is a Go file (in the status line at the bottom)
gopls then tries to process it as a go file, getting errors for imports, code_actions, semantic tokens, etc.

Perhaps gopls should not trust the client's decisions on file types.
Repository: pytorch
Issue: Multiple invalid summaries in torch.nn documentation page
Labels: module: docs,module: nn,triaged

### 🐛 Describe the bug

Many summaries (descriptions) for [Non-linear Activation](https://pytorch.org/docs/stable/nn.html#non-linear-activations-weighted-sum-nonlinearity) section of torch.nn [documentation page](https://pytorch.org/docs/stable/nn.html) are invalid.

For instance, the total summary for `nn.ELU` is "Applies the element-wise function:" missing the exact function it refers to, although the full version of the description on [`nn.ELU`'s page](https://pytorch.org/docs/stable/generated/torch.nn.ELU.html#torch.nn.ELU) contains the correct description.

The problem is due to both the way Sphinx' `autosummary` extension extracts the summary from a docstring (only the first line/paragraph gets through) and to the style of docstrings for Non-linear Activation entries which doesn't take this behavior into account.

It's not clear which way would be the best to take here: either to tinker with Sphinx to make it render more than one paragraph of a docstring (not an immediately easy task!) or to rewrite the docstrings with respect to this. Or a combination of both: 

For instance, the `nn.RReLU` summary that says: "Applies the randomized leaky rectified liner unit function, element-wise, as described in the paper:" can be fixed by just correcting the URL of the mentioned paper to be included in the first line of the docstring, as it is done correctly e.g. for `nn.BatchNorm1d`.

But for `nn.ELU` it could be better to render an exact function in question.

### Versions

not relevant

cc @brianjo @mruberry @albanD @jbschlosser @walterddr @kshitij12345
Repository: godot
Issue: CollisionShape2D debug drawing exhibits unstable graphical glitches
Labels: bug,topic:rendering,topic:editor,confirmed,topic:physics,regression,topic:2d

### Godot version

4.0.dev (9f05867)

### System information

Windows 10, NVIDIA GeForce GTX 960

### Issue description

CollisionShape2D does not visually represent the shape as intended. Visual glitches compound when resizing or toggling "snap 2d transforms to pixel" or "snap 2d Vertices To Pixel". Present in all shapes.

https://user-images.githubusercontent.com/21325943/147687051-eda526e8-dcaa-40ae-a230-53ac05934657.mp4

### Steps to reproduce

Create new project.
Add CollisionShape2D Node to CollisionObject2D derived Node
Add any shape.

### Minimal reproduction project

_No response_
Repository: PowerToys
Issue: [AlwaysOnTop][FancyZones] Move common code 
Labels: Product-FancyZones,Area-Quality,Product-Always On Top

Copy-pasted code marked with TODO in AOT
Repository: pytorch
Issue: Adding the new Phish activation function
Labels: module: nn,triaged,function request,Stale

### 🚀 The feature, motivation and pitch

Phish is a new activation function defined as f(x) = xTanH(GELU(x)) that shows similar performance to Swish in shallow models and similar performance to Mish in deeper ones. I would like to add Phish into PyTorch to offer an alternate activation function for deep neural-networks. Currently the paper is in TechArxiv, and has been submitted to and is under review by the Journal of Machine Learning Research.

I firmly believe that adding Phish as an alternate activation function could help improve deep learning technology. 

### Alternatives

_No response_

### Additional context

_No response_

cc @albanD @mruberry @jbschlosser @walterddr @kshitij12345
Repository: youtube-dl
Issue: Redtube Grabber not working anymore
Labels: duplicate

- [x ] I'm reporting a broken site support
- [x ] I've verified that I'm running youtube-dl version **2021.12.17**
- [x ] I've checked that all provided URLs are alive and playable in a browser
- [x ] I've checked that all URLs and arguments with special characters are properly quoted or escaped
- [x ] I've searched the bugtracker for similar issues including closed ones


## Verbose log

/usr/bin/python3 /usr/local/bin/youtube-dl https://www.redtube.com/40022171
[RedTube] 40022171: Downloading webpage
[RedTube] 40022171: Downloading m3u8 information
[download] Destination: Kennedy Kressler Tends to Her Garden and Her Shaved Pussy-40022171.unknown_video
[download] 100% of 1.39KiB in 00:00

## Description

Hello,

When I download a Redtube video with youtube-dl it doesn't download the video correctly anymore: It downloads "Kennedy Kressler Tends to Her Garden and Her Shaved Pussy-40022171.unknown_video". When I edit this file, I get this code:

[{"defaultQuality":false,"format":"","quality":"1080","videoUrl":"https:\/\/cv-ph.rdtcdn.com\/videos\/202107\/21\/391630841\/1080P_4000K_391630841.mp4?bxcaNsIgFqplDNHIJSOGUwzDsDOv3Kk9ViYLgHvMe4juZ1T-nv-2l9OjmhnzfOXhnNQiKM4AP2GbfRRS8gIvczS019wjWfOSsx6XY9JxN3bBBnZnENjNgCECrl1ysOs96E1pwwif_PWvmQFDL-4RvSN0eJyfY4ackQzNKvUv4p7wSKdTt_aR6jm_p096_nyyZ4OJl5cRmPLTo6jtEg"},{"defaultQuality":false,"format":"","quality":"720","videoUrl":"https:\/\/cv-ph.rdtcdn.com\/videos\/202107\/21\/391630841\/720P_4000K_391630841.mp4?mGHf4vJR0BJJ7nhulmq5ppAQSVzJwlO2a8DdAhAa2GYcG4h1ApU7eOCsPUQibror31gEHt_lwOxeCL4LXzHPRyhYwwPFzO3ptuQK1BSfi9CxIYm2lYIN8es9nDq6auRl4rMy8kTPuRoVu85rJmSzWssBIa_I9HCfq_C22iQ8KPchSTogOeUGpBihRN3CtlJH0RJ4eRBdqcU"},{"defaultQuality":false,"format":"","quality":"480","videoUrl":"https:\/\/cv-ph.rdtcdn.com\/videos\/202107\/21\/391630841\/480P_2000K_391630841.mp4?lVKYR5BAzZkoAlkqsapqlY8MQgsniWAX6S7_5_4tag85L4Bjxf5a0IGMtVfFHvNlM1k3sgKw3vMX7YWRXV_NIPA5MxknWNJ00vde9vCI34RmICJJq0KnnnlCTtZ1SnOtNtCQGkifeS3bu9d1Gm29Pyu4Hvu830JlpWcHZqCvp0pwrpUWOoEg3ibO2E80Gebk2NdinxPc3oc"},{"defaultQuality":false,"format":"","quality":"240","videoUrl":"https:\/\/cv-ph.rdtcdn.com\/videos\/202107\/21\/391630841\/240P_1000K_391630841.mp4?ym_-VKKaVR8lBWZexuYrVdCG0tWmFnG7Nh5YKQDVQ59umCxfXQkBLHsBS3EfcQNSIc2UrI-Oyn4UqGQwzumRZYjAxKoKbl9AG4Ji4BS4HXt2_T1pnVsOhXfW2ve6AoX6tq8LiT2npQYW0Y-z6BgGQ3qr-lS0wogZ4DlLKrVYMi01muiO4DYv7y_1RlLxIOKrb4BThtdKqA"}]

Thank you.
Repository: storybook
Issue: Custom elements in story template are instantiated twice
Labels: bug,web-components,canvas

**Describe the bug**

When inserting any custom element in a story template with Lit `html`, that custom element is instantiated twice. 

```typescript

const Template: Story<Partial<any>> = (args) => html`
  <a-tablecard></a-tablecard>
`;
```

TableCard constructor is called twice.

**To Reproduce**

A clear reproduction is found on the issue/constructor branch of this repository: 

https://github.com/steveblue/web-component-storybook-issues

The console.log placed in the constructor of a custom element in the story template is called twice.

<img width="1139" alt="Screen Shot 2021-12-29 at 9 52 47 AM" src="https://user-images.githubusercontent.com/1171943/147691201-b60e5dc1-56ac-42ac-b3e6-a84d1690db15.png">


**System**
  System:
    OS: macOS 12.0.1
    CPU: (10) arm64 Apple M1 Max
  Binaries:
    Node: 16.13.0 - ~/.nvm/versions/node/v16.13.0/bin/node
    Yarn: 3.1.1 - ~/.nvm/versions/node/v16.13.0/bin/yarn
    npm: 8.1.0 - ~/.nvm/versions/node/v16.13.0/bin/npm
  Browsers:
    Chrome: 96.0.4664.110
    Safari: 15.1
  npmPackages:
    @storybook/addon-actions: ^6.5.0-alpha.5 => 6.5.0-alpha.5
    @storybook/addon-docs: ^6.5.0-alpha.5 => 6.5.0-alpha.5
    @storybook/addon-essentials: ^6.5.0-alpha.5 => 6.5.0-alpha.5
    @storybook/addon-links: ^6.5.0-alpha.5 => 6.5.0-alpha.5
    @storybook/web-components: ^6.5.0-alpha.5 => 6.5.0-alpha.5

**Additional context**

This issue causes undue friction for custom element development in Storybook because we can't mock a component reliably. The issue leads to undesirable side effects, especially if the custom element is attaching event listeners twice.
Repository: svelte
Issue: Interrupting a transition breaks reactivity for nested objects
Labels: transition/animation

### Describe the bug

When a transition is running, the objects under that transition is not reacting to updates.

(Severity is annoyance, as it can be worked around)


### Reproduction

See
https://svelte.dev/repl/a8394ee987714bb1a452574709562ea1?version=3.44.3

When 'Click Me' is pressed, the fade transition is started (as visible flag is turned off).
When 'Cancel' is pressed, the visible flag is turned on again, but the nested object has not been updated.
If fade is allowed to run to the end, and 'Click Me' is pressed again (visible flag is not changed, as it is already off), the nested object is updated, as can be seen in Cancel is pressed to turn on visibility again.

### Logs

_No response_

### System Info

```shell
REPL reproducible, so don't think it's system dependent.
```


### Severity

annoyance
Repository: create-react-app
Issue: src subdirectory files does not update react app
Labels: needs triage,issue: bug report

### Describe the bug
I only started learning React this week. Everything was working fine when all files were under the src directory. Then I made subdirectories like src/pages and src/components, and moved some files to those directories. If edit files like src/App.js then the React app would update. However, if edit something like src/pages/Home.tsx, the React app would not be updated unless I restart the server. 

### Did you try recovering your dependencies?
It's a fresh new project. Not an option. 

### Which terms did you search for in User Guide?
npm start doesn’t detect changes
src subdirectories
src subdirectory files not updating react app

### Environment
Windows 10 19043.1215
WSL 2: Arch Linux 
https://github.com/yuk7/ArchWSL

Environment Info:

  current version of create-react-app: 5.0.0
  running from /home/dosx/.npm/_npx/c67e74de0542c87c/node_modules/create-react-app

  System:
    OS: Linux 5.10 Arch Linux
    CPU: (12) x64 Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz
  Binaries:
    Node: 17.3.0 - /usr/sbin/node
    Yarn: 1.22.17 - /usr/sbin/yarn
    npm: 8.3.0 - /usr/sbin/npm
  Browsers:
    Chrome: Not Found
    Firefox: 95.0.2
    Edge: 96.0.1054.62
  npmPackages:
    react: ^17.0.2 => 17.0.2
    react-dom: ^17.0.2 => 17.0.2
    react-scripts: 5.0.0 => 5.0.0
  npmGlobalPackages:
    create-react-app: Not Found

### Steps to reproduce
```bash
git clone https://github.com/Dosx001/dosx001.github.io/
cd dosx001.github.io
yarn run start # or "npm run start"
```
Edit any file under src/pages or src/components

### Expected behavior
React app would update when editing all files in the src directory.

### Actual behavior
When editing files under src/pages and src/components React app does not update.

### Reproducible demo
https://github.com/Dosx001/dosx001.github.io
Repository: rust
Issue: Implementation of trait is not general enough when boxing future returning `<T as Foo<'a>>::Foo`
Labels: C-bug,A-async-await,AsyncAwait-Polish,AsyncAwait-Triaged

Reproduction:
```rust
use std::any::Any;
use std::future::Future;

trait Foo<'a>: Sized {
    type Error;
    fn foo(x: &'a str) -> Result<Self, Self::Error>;
}

impl<'a> Foo<'a> for &'a str {
    type Error = ();

    fn foo(x: &'a str) -> Result<Self, Self::Error> {
        Ok(x)
    }
}

async fn get_foo<'a, T>(x: &'a str) -> Result<T, <T as Foo<'a>>::Error>
where
    T: Foo<'a>,
{
    Foo::foo(x)
}

fn bar<'a>(x: &'a str) -> Box<dyn Future<Output = Result<&'a str, ()>> + Send + 'a> {
    Box::new(async move { get_foo(x).await })
}
```

Output on stable and nightly:
```
error: implementation of `Foo` is not general enough
  --> src/lib.rs:25:5
   |
25 |     Box::new(async move { get_foo(x).await })
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ implementation of `Foo` is not general enough
   |
   = note: `Foo<'1>` would have to be implemented for the type `&'0 str`, for any two lifetimes `'0` and `'1`...
   = note: ...but `Foo<'2>` is actually implemented for the type `&'2 str`, for some specific lifetime `'2
```

Interestingly, the code compiles without the `+ Send`. It also compiles without the async move block. This may be related to #61949.

@rustbot label +A-async-await

<!-- TRIAGEBOT_START -->

<!-- TRIAGEBOT_ASSIGN_START -->

<!-- TRIAGEBOT_ASSIGN_DATA_START$${"user":"vincenzopalazzo"}$$TRIAGEBOT_ASSIGN_DATA_END -->

<!-- TRIAGEBOT_ASSIGN_END -->
<!-- TRIAGEBOT_END -->
Repository: pytorch
Issue: backward checks len of inputs before it's converted to a tuple
Labels: module: autograd,triaged,actionable

### 🐛 Describe the bug

[`backward`](https://pytorch.org/docs/stable/generated/torch.Tensor.backward.html) checks the `len` of `inputs` before it's converted to a tuple. Example:

```python3
import torch

class Module(torch.nn.Module):
    def __init__(self):
        super().__init__()
        self.param = torch.nn.Parameter(torch.tensor(1.))

a = Module()
b = Module()

inputs = tuple(a.parameters())
print(type(inputs)) # <class 'tuple'>
(a.param + b.param).backward(inputs=inputs)
print('ok')

inputs = a.parameters()
print(type(inputs)) # <class 'generator'>
(a.param + b.param).backward(inputs=inputs) # TypeError: object of type 'generator' has no len()
print('ok')
```

[This](https://github.com/pytorch/pytorch/blob/9e175400ac388844a00a15fdb12730f0e31f4d9b/torch/autograd/__init__.py#L158) is the source of the error. The `len` check should be moved to *after* `inputs` is converted to a tuple.

I would go further and remove the `len` check completely, allowing `inputs` to be empty. See [here](https://github.com/pytorch/pytorch/issues/50402) for related discussion and rationale.

### Versions

Collecting environment information...
PyTorch version: 1.10.0
Is debug build: False
CUDA used to build PyTorch: None
ROCM used to build PyTorch: N/A

OS: macOS 11.6.1 (x86_64)
GCC version: Could not collect
Clang version: 12.0.5 (clang-1205.0.22.9)
CMake version: version 3.20.1
Libc version: N/A

Python version: 3.8.12 (default, Oct 13 2021, 06:42:42)  [Clang 13.0.0 (clang-1300.0.29.3)] (64-bit runtime)
Python platform: macOS-11.6.1-x86_64-i386-64bit
Is CUDA available: False
CUDA runtime version: No CUDA
GPU models and configuration: No CUDA
Nvidia driver version: No CUDA
cuDNN version: No CUDA
HIP runtime version: N/A
MIOpen runtime version: N/A

Versions of relevant libraries:
[pip3] mypy==0.812
[pip3] mypy-extensions==0.4.3
[pip3] numpy==1.19.5
[pip3] pytorch-lightning==1.2.10
[pip3] torch==1.10.0
[pip3] torchaudio==0.9.0.dev20210313
[pip3] torchmetrics==0.2.0
[pip3] torchvision==0.10.0
[conda] Could not collect

cc @ezyang @albanD @zou3519 @gqchen @pearu @nikitaved @soulitzer @Lezcano @Varal7