sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: rust
Issue: There is no cross-platform way to use `include_*!`
Labels: A-cross,T-lang,T-compiler

Build scripts place their output in a folder created by Cargo. The path to it is passed in the environment variable `OUT_DIR` both to the build script and the main code. Since the file is placed in the directory, we need to add the path separator and then the name of the file. There seems to be no way to call `include_bytes!` with a platform-agnostic path separator, inserting `/` or `\` depending on the host OS.

This works but is not portable: `include_bytes!(concat!(env!("OUT_DIR"), "/myfile"));`

This doesn't work: `include_bytes!(concat!(env!("OUT_DIR"), std::path::MAIN_SEPARATOR, "myfile"));` because `MAIN_SEPARATOR` is not a literal, and `concat!` only eats literals.

I've tried to to assemble a `String` in `const fn`, but that doesn't work either because `String::push()` requires a mutable borrow which are unsable in `const fn`.

`#[cfg(unix)]` and `#[cfg(windows)]` **sort of** work, but break on cross-compilation because [these `cfg` attributes look at the _target_ OS](https://doc.rust-lang.org/reference/conditional-compilation.html#unix-and-windows), and we need to add a separator that works on the _host_ OS.

It's weird that this is either impossible to accomplish or the way to do so is very obscure. I'd expect this to be a relatively common operation.

`rustc --version --verbose`:
```
rustc 1.46.0-beta.2 (6f959902b 2020-07-23)
binary: rustc
commit-hash: 6f959902b3103c49ca981fbc01871589c3498489
commit-date: 2020-07-23
host: x86_64-unknown-linux-gnu
release: 1.46.0-beta.2
LLVM version: 10.0
```
Repository: create-react-app
Issue: Add compilerOptions.paths support
Labels: issue: proposal,needs triage

### Is your proposal related to a problem?

<!--
  Provide a clear and concise description of what the problem is.
  For example, "I'm always frustrated when..."
-->

React scripts can not build app with custom relative paths as 
`compilerOptions: {
    "baseUrl": "./",
    "paths": {
      "@/*": ["src/*"],
      "~/*": ["../*"]
    }
}`
Error message: compilerOptions.paths must not be set (aliased imports are not supported)

### Describe the solution you'd like

<!--
  Provide a clear and concise description of what you want to happen.
-->

Using configuration from tsconfig file for aliases
Repository: pytorch
Issue: How to use libtorch on Jetson TX2
Labels: module: binaries,triaged,module: arm

Refer to https://forums.developer.nvidia.com/t/pytorch-for-jetson-nano-version-1-5-0-now-available/72048，I successfully installed Pytorch 1.0.0 and torchvision0.2.2 on jetpack4.3.According to the authentication method, I also succeeded in authentication: python–>import torch…
However,I want to call a scriptModel by libtorch on a QT project.but meet the error:
error:undefined reference to ‘nvrtcGetProgramLogSize’
error:undefined reference to ‘culaunchKernel’
error:undefined reference to ‘nvrtcComplieProgram’
error:undefined reference to ‘nvrtcCreateProgram’
error:undefined reference to ‘nvrtcGetErrorString’
error:undefined reference to ‘cuModuleGetFunction’
and so on.

Also I can not find libnvrtc.so at ~/.local/lib/python3.6/site-packages/torch/lib.

what is the problem?


cc @ezyang @seemethere @malfet
Repository: rust
Issue: Tracking Issue for [*const T|*mut T]::with_metadata_of
Labels: T-libs-api,B-unstable,C-tracking-issue,Libs-Tracked,A-raw-pointers

<!--
Thank you for creating a tracking issue!

Tracking issues are for tracking a feature from implementation to stabilization.

Make sure to include the relevant RFC for the feature if it has one.

If the new feature is small, it may be fine to skip the RFC process. In that
case, you can use use `issue = "none"` in your initial implementation PR. The
reviewer will ask you to open a tracking issue if they agree your feature can be
added without an RFC.
-->

Feature gate: `#![feature(set_ptr_value)]`

<!--
Include a short description of the feature.
-->

### Public API

<!--
For most library features, it'd be useful to include a summarized version of the public API.
(E.g. just the public function signatures without their doc comments or implementation.)
-->

```rust
impl<T: ?Sized> *mut T {
    pub fn with_metadata_of<U: ?Sized>(self, val: *const U) -> *mut U;
}

impl<T: ?Sized> *const T {
    pub fn with_metadata_of<U: ?Sized>(self, val: *const U) -> *const U;
}
```

### Steps / History

<!--
For larger features, more steps might be involved.
If the feature is changed later, please add those PRs here as well.
-->

- [x] Implementation: #74774
- [x] Change type and add `#[must_use]`: #75407
- [x] Reverse argument order and rename to `with_metadata_of`: #95249
- [x] Const argument for mutable with_metadata_of: #103346
- [ ] Final commenting period (FCP)
- [ ] Stabilization PR

<!--
Once the feature has gone through a few release cycles and there are no
unresolved questions left, the feature might be ready for stabilization.

If this feature didn't go through the RFC process, a final commenting period
(FCP) is always needed before stabilization. This works as follows:

A library team member can kick off the stabilization process, at which point
the rfcbot will ask all the team members to verify they agree with
stabilization. Once enough members agree and there are no concerns, the final
commenting period begins: this issue will be marked as such and will be listed
in the next This Week in Rust newsletter. If no blocking concerns are raised in
that period of 10 days, a stabilzation PR can be opened by anyone.
-->

### Unresolved Questions

<!--
Include any open questions that need to be answered before the feature can be
stabilised. If multiple (unrelated) big questions come up, it can be a good idea
to open a separate issue for each, to make it easier to keep track of the
discussions.

It's useful to link any relevant discussions and conclusions (whether on GitHub,
Zulip, or the internals forum) here.
-->

- [x] Correct argument type -- `*mut ()`? `*mut u8`? `*mut Opaque`?
- [ ] Is this even needed/useful given that there now also is https://github.com/rust-lang/rust/issues/81513?
Repository: pytorch
Issue: [feature request].Time Series Algorithms
Labels: feature,triaged

Want to develop Time series algorithms Holt Winter under pyTorch.
Repository: pytorch
Issue: torch.random.randperm stuck in multiprocess
Labels: module: multiprocessing,triaged,module: random

## 🐛 Bug

torch.random.randperm() will hung in multiprocess running, (which results in DataLoader hung as well)
I managed to reproduce it in a few lines of code
<!-- A clear and concise description of what the bug is. -->

## To Reproduce

 run the sample code below:


```
import multiprocessing as mp
import torch


if __name__ == '__main__':
    length = 2**15+1 # with 2**15 or less, it will be OK
    print("========== randperm in main process ==========")
    print("torch rand perm")
    print("randperm length: {}".format(length) )
    torch.randperm(length)

    def worker(rank, length):
        print("========== worker process {} ==========".format(rank) )
        print("torch rand perm")
        print("randperm length: {}".format(length) )
        torch.randperm(length) # stuck here, if length is greater than 2**15
        print("process finished")

    pool = []
    for i in range(3):
        w = mp.Process(
            target=worker,
            args = (i, length+i-1)
        )
        w.start()
        pool.append(w)
    for w in pool:
        w.join()
    print("done")
```

<!-- If you have a code sample, error messages, stack traces, please provide it here as well -->

## Expected behavior

when randperm(length) is called in the main process first, and then later in the sub process. Besides, "length" should be greater than 2**15 in both place, then it will stuck in the sub process

<!-- A clear and concise description of what you expected to happen. -->

## Environment

Collecting environment information...
PyTorch version: 1.5.0
Is debug build: No
CUDA used to build PyTorch: 10.2

OS: Ubuntu 18.04.4 LTS
GCC version: (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
CMake version: version 3.13.3

Python version: 3.6
Is CUDA available: Yes
CUDA runtime version: Could not collect
GPU models and configuration: GPU 0: GeForce GTX 1080 Ti
Nvidia driver version: 440.100
cuDNN version: /usr/lib/x86_64-linux-gnu/libcudnn.so.7.1.4

Versions of relevant libraries:
[pip3] efficientnet-pytorch==0.3.0
[pip3] numpy==1.16.2
[pip3] torch==1.5.0
[pip3] torchvision==0.6.0
[conda] Could not collect


## Additional context

<!-- Add any other context about the problem here. -->


cc @pbelevich
Repository: pytorch
Issue: OneCycleLR argument `pct_start` used as a proportion not percentage
Labels: module: docs,module: optimizer,triaged

## 📚 Documentation

The documentation for the `OneCycleLR` learning rate schedule refers to the argument `pct_start` as being a percentage [0,100], whereas it actually used as a proportion [0,1] in the code.

> pct_start (float) – The percentage of the cycle (in number of steps) spent increasing the learning rate. Default: 0.3

compared to the implementation in `torch.optim.lr_scheduler.OneCycleLR`
```python
        self.step_size_up = float(pct_start * self.total_steps) - 1
```

cc @jlin27 @vincentqb
Repository: youtube-dl
Issue: luna radio player support
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 2020.07.28. 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 **2020.07.28**
- [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

<!--
Provide all kinds of example URLs support for which should be included. Replace following example URLs by yours.
-->

- https://nowyswiat.online
- https://radioplayer.luna-universe.com/ - "examples" links at the top navbar

## Description

<!--
Provide any additional information.
If work on your issue requires account credentials please provide them or explain how one can obtain them.
-->

plain html5 player for many websites, available as a wordpress plugin. add to generic extractor.
more information from the authors: https://radioplayer.luna-universe.com/
Repository: flutter
Issue: Videoplayer not rendering video but sound is playing. 
Labels: platform-ios,p: video_player,package,has reproducible steps,P2,found in release: 2.2,found in release: 2.3,team-ios,triaged-ios

Hi, I'm facing some issues with the videoplayer plugin. Sometimes a video is not rendered but the sound is playing. The only error message I receive is the following: _`flutter: Failed to load video: Operation Stopped`_. Even the videoplayer example is not working with the same video...

It seems this is an iOS issue only because on Android the same video is rendered perfect. 

The video is a network url with a .mp4 extension. 

Anyone facing the same issue and have a solution? 

Thanks
Repository: pytorch
Issue: `device-side assert triggered` - when probability > 1.0
Labels: module: crash,module: cuda,triaged,better-engineering

## 🐛 Bug

When using CUDA, getting non-descriptive runtime error, which makes any future calls to CUDA fail, and requires runtime restart. When not using CUDA, error is nice and descriptive, and doesn't break the runtime.
## To Reproduce

Steps to reproduce the behavior:

```
import torch
prob = torch.tensor([1.01]).to('cuda:0')
torch.distributions.bernoulli.Bernoulli(probs=prob).sample([1])
```
This results in:
```
RuntimeError: cuda runtime error (59) : device-side assert triggered at /opt/conda/conda-bld/pytorch_1591914743399/work/aten/src/THC/THCReduceAll.cuh:327
```
Any subsequent calls to CUDA (even with valid instructions), result in:
```
RuntimeError: CUDA error: device-side assert triggered
```

## Expected behavior

This is a nice descriptive error, which one gets if not using CUDA.
```
RuntimeError: Expected p_in >= 0 && p_in <= 1 to be true, but got false.  (Could this error message be improved?  If so, please report an enhancement request to PyTorch.)
```

## Environment

```
Collecting environment information...
PyTorch version: 1.5.1
Is debug build: No
CUDA used to build PyTorch: 9.2

OS: Debian GNU/Linux 10 (buster)
GCC version: (Debian 8.3.0-6) 8.3.0
CMake version: Could not collect

Python version: 3.8
Is CUDA available: Yes
CUDA runtime version: Could not collect
GPU models and configuration: Could not collect
Nvidia driver version: Could not collect
cuDNN version: Could not collect

Versions of relevant libraries:
[pip3] numpy==1.19.1
[pip3] torch==1.5.1
[pip3] torchvision==0.6.0a0+35d732a
[conda] blas                      1.0                         mkl  
[conda] cudatoolkit               9.2                           0  
[conda] mkl                       2020.1                      217  
[conda] mkl-service               2.3.0            py38he904b0f_0  
[conda] mkl_fft                   1.1.0            py38h23d657b_0  
[conda] mkl_random                1.1.1            py38h0573a6f_0  
[conda] numpy                     1.19.1                   pypi_0    pypi
[conda] pytorch                   1.5.1           py3.8_cuda9.2.148_cudnn7.6.3_0    pytorch
[conda] torchvision               0.6.1                 py38_cu92    pytorch
```



## Additional context

Not sure how much of an actual issue this is, since any additional checks on parameters would result in slower execution - and it takes one second to try same code without CUDA to identify the issue. Also this has been mentioned several times in other tickets, and it just seems that CUDA errors aren't as descriptive.

https://github.com/pytorch/pytorch/issues/1204
https://github.com/pytorch/pytorch/issues/9585


cc @ngimel
Repository: rust
Issue: Check submodule commit provenance in CI
Labels: C-enhancement,T-infra

Currently, when any changes are made to a submodule in the Rust repository, rustbot adds a warning comment but it's up to the reviewer to check all the changes.

One of the things that should always be true of a submodule commit (at merge time in the Rust repo) is that it should already be merged in an upstream branch. This can be checked in an automated fashion during CI by checking the commit against a set of allowed remote branches.

If this is not checked, something that might happen is that an author simultaneously makes an upstream and Rust PR with one commit. Later, the author (force) pushes another commit to the same upstream PR but forgets to update the Rust submodule. The original commit will at some point be garbage-collected by GitHub and merging the Rust PR would be bad because the complete source code would not be accessible in git in the future. This happened in #75009.

This check should not be done for try builds, so that development can continue unimpeded.

@rustbot modify labels: +C-enhancement +T-infra
Repository: opencv
Issue: cv.cuda.createMorphologyFilter does not support 3-channel images
Labels: feature,category: gpu/cuda (contrib)

##### System information (version)

- OpenCV => 4.4.0
- Operating System / Platform => Linux
- Compiler => gcc

##### Detailed description

`cv.cuda.createMorphologyFilter` does not support a `srcType` of `CV_8UC3`. I would expect that most OpenCV APIs would support 3-channel images (RGB or BGR).

##### Steps to reproduce

```
kernel = cv.getStructuringElement(cv.MORPH_RECT, (7, 7))
filter = cv.cuda.createMorphologyFilter(cv.MORPH_OPEN, cv.CV_8UC3, kernel)
```

```
opencv_contrib/modules/cudafilters/src/filtering.cpp:558: error: (-215:Assertion failed) srcType == CV_8UC1 || srcType == CV_8UC4 || srcType == CV_32FC1 || srcType == CV_32FC4 in function 'MorphologyFilter'
```

##### Issue submission checklist

 - [x] I report the issue, it's not a question
   <!--
   OpenCV team works with answers.opencv.org, Stack Overflow and other communities
   to discuss problems. Tickets with question without real issue statement will be
   closed.
   -->
 - [ ] I checked the problem with documentation, FAQ, open issues,
       answers.opencv.org, Stack Overflow, etc and have not found solution
   <!--
   Places to check:
   * OpenCV documentation: https://docs.opencv.org
   * FAQ page: https://github.com/opencv/opencv/wiki/FAQ
   * OpenCV forum: https://answers.opencv.org
   * OpenCV issue tracker: https://github.com/opencv/opencv/issues?q=is%3Aissue
   * Stack Overflow branch: https://stackoverflow.com/questions/tagged/opencv
   -->
 - [x] I updated to latest OpenCV version and the issue is still there
   <!--
   master branch for OpenCV 4.x and 3.4 branch for OpenCV 3.x releases.
   OpenCV team supports only latest release for each branch.
   The ticket is closed, if the problem is not reproduced with modern version.
   -->
 - [x] There is reproducer code and related data files: videos, images, onnx, etc
   <!--
   The best reproducer -- test case for OpenCV that we can add to the library.
   Recommendations for media files and binary files:
   * Try to reproduce the issue with images and videos in opencv_extra repository
     to reduce attachment size
   * Use PNG for images, if you report some CV related bug, but not image reader
     issue
   * Attach the image as archite to the ticket, if you report some reader issue.
     Image hosting services compress images and it breaks the repro code.
   * Provide ONNX file for some public model or ONNX file with with random weights,
     if you report ONNX parsing or handling issue. Architecture details diagram
     from netron tool can be very useful too. See https://lutzroeder.github.io/netron/
   -->
Repository: pytorch
Issue: Training with AMP gives overflow warning
Labels: module: cuda,triaged,module: amp (automated mixed precision)

## 🐛 Bug

WARNING:root:NaN or Inf found in input tensor while using AMP but no such warning without AMP

AMP gives the following warning

```
/lib/python3.7/site-packages/numpy/core/fromnumeric.py:90: RuntimeWarning: overflow encountered in reduce
  return ufunc.reduce(obj, axis, dtype, out, **passkwargs)
WARNING:root:NaN or Inf found in input tensor.
```
Sorry, couldn't reproduce it outside my codebase.

## Expected behavior

No warnings

## Environment

 - PyTorch Version (e.g., 1.0): 1.6.0
 - OS (e.g., Linux): Linux
 - How you installed PyTorch (`conda`, `pip`, source): conda
 - Build command you used (if compiling from source): conda install pytorch torchvision cudatoolkit=10.2 -c pytorch
 - Python version: 3.7
 - CUDA/cuDNN version: 10.2
 - GPU models and configuration: DistributedDataParallel with one process per GPU on single machine
 - Any other relevant information:

## Additional context

<!-- Add any other context about the problem here. -->


cc @mcarilli @ngimel @ppwwyyxx @mruberry @rgommers
Repository: ant-design
Issue: Ability to check if a form is valid without having to display the errors/feedback on the UI (leveraging formInstance.validateFields)
Labels: Inactive

- [x] I have searched the [issues](https://github.com/ant-design/ant-design/issues) of this repository and believe that this is not a duplicate.

### What problem does this feature solve?
The FormInstance has a method `validateFields: (nameList?: NamePath[]) => Promise` which can be used to check if a field/all fields of the form are valid or not. This also updates the UI to display error messages/feedback on the form. 
However there could be use cases where we just need to know if the form is valid or not without displaying any feedback/errors. (e.g: displaying form for the first time with pre-populated data from external source etc.)

As an example @ the CAB https://codesandbox.io/s/bitter-frost-btmsy
When I click on the `Validate`  button, I would like to know if the form is valid or not without showing the errors/feedback on the UI.
But right now the this is not possible.

This can be useful to let's say enabling/disabling Submit button etc.

### What does the proposed API look like?
May be we can add an option/flag to the validateFields to allow checking the form is valid or not without any UI errors/feedback.

e.g:  `validateFields: (nameList?: NamePath[], options?: {
 showErrors?: boolean
}) => Promise`


<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->