sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: pytorch
Issue: [feature request] [ux] Frontend methods for fused  elementwise affine transform: mul+add+dtype convert + support  `integer_tensor.mul_(float_constant)` and `float_tensor.mul(some_constant, out = integer_tensor)` maybe via new args `rounding_mode=...` and `dtype=...` + maybe support OpenCV-style saturated dtype conversions (e.g. `clamp_` before conversion)
Labels: triaged,module: type promotion,module: python frontend

### 🚀 The feature, motivation and pitch

This should be well-compiled as it's elementwise, but would be nice to have as a frontend method for colloquial use.

A prototypical example is conversion of float32 image to uint8 image:

```python
import torch
a = torch.rand(10)
b = torch.empty_like(a, dtype = torch.uint8)
f32_to_u8 = torch.mul(a, 255, out = b)
# RuntimeError: result type Float can't be cast to the desired output type Byte
```

Might be that these methods already exist in the form of helpers for quantization, but would be nice to expose them for wider usage.

OpenCV https://docs.opencv.org/4.x/d3/d63/classcv_1_1Mat.html#adf88c60c5b4980e05bb556080916978b has a similar method `convertTo` which multiplies by a scalar, than adds another scalar and then casts dtype. OpenCV also does saturate cast functionality (to make sure that uint8 doesn't overflow too badly) - might be useful for PyTorch too, but saturation might be done prior to actual conversion by `clamp_` or by providing also a fused `mul_add_clamp(..., dtype=...)` (`torch.add(a, b, alpha = ...)` exists but also doesn't support the needed casting).

Related: `addcmul` generalization discussion: https://github.com/pytorch/pytorch/issues/104849

(although I realize, this might be somwhat niche - also sth similar exists in torchvision: https://pytorch.org/vision/stable/generated/torchvision.transforms.Normalize.html)

Being able to do `int32_tensor.mul_(float_constant)` or `uint8_tensor.mul_(float_constant)` is also useful and related to https://github.com/pytorch/pytorch/issues/54389. It could certainly support rounding, similar to `torch.div(..., rounding_mode = 'trunc')` e.g. by doing int32_tensor.mul_(numerator).div_(denominator, rounding_mode = 'floor')

Currently:
```python
x = torch.tensor([2, 4, 8], dtype = torch.int32)

although docs say "None - default behavior. Performs no rounding and, if both input and other are integer types, promotes the inputs to the default scalar type."
x.div_(2) # RuntimeError: result type Float can't be cast to the desired output type Long

x.div_(2, rounding_mode = 'trunc') # works
x //= 2 # works
```

cc @nairbv @mruberry @albanD
Repository: flutter
Issue: providing flipVertically feature for paintImage()
Labels: c: new feature,framework,a: images,c: proposal,P3,team-framework,triaged-framework

### Use case

As you can see from the title, it would be good to add the flipVertically property for paintImage() in the decoration_image.dart source. flipHorizontally property is available for this function. I can copy this function and add this property, but I don't want to break away from Flutter's native environment.

### Proposal

Adding this feature can provide a good facility for people using the function.
Repository: flutter
Issue: [flutter_tools] if version solving fails, `flutter update-packages --force-upgrade` only shows relevant pub output in verbose mode
Labels: P3,team-tool,triaged-tool

If the user runs `flutter update-packages --force-upgrade` and the underlying `pub get` invocation fails, the pub error messages is not logged by the tool unless the `--verbose` flag is provided.
Repository: rust
Issue: Tracking issue: 32bit x86 targets without SSE2 have unsound floating point behavior
Labels: P-medium,I-unsound,C-tracking-issue,A-floating-point,O-x86_32,I-miscompile

On x86 (32bit) targets that cannot use SSE2 instructions (this includes the tier 1 i686 targets with flags that disable SSE2 support, such as `-C target-cpu=pentium`), floating-point operation can return results that are rounded in different ways than they should, and results can be "inconsistent": depending on whether const-propagation happened, the same computation can produce different results, leading to a program that seemingly contradicts itself. This is caused by using x87 instructions to perform floating-point arithmetic, which do not accurately implement IEEE floating-point semantics (not with the right precision, anyway). The test `tests/ui/numbers-arithmetic/issue-105626.rs` has an example of such a problem.

Worse, LLVM can use x87 register to store values it thinks are floats, which resets the signaling bit and thus alters the value -- leading to [miscompilations](https://github.com/rust-lang/rust/issues/114479#issuecomment-2072052116).

This is an LLVM bug: rustc is generating LLVM IR with the intended semantics, but LLVM does not compile that code in the way that the LLVM LangRef describes. This is a known and long-standing problem, and very hard to fix. The affected targets are so niche these days that that is nobody's priority. The purpose of this issue mostly is to document its existence and to give it a URL that can be referenced.

Some ideas that have been floated for fixing this problem:
- We could emit different instruction sequences for floating-point operations that emulate the expected rounding behavior using x87 instructions. This will likely require changes deep in LLVM's x86 backend. This is [what Java does](https://open-std.org/JTC1/SC22/JSG/docs/m3/docs/jsgn326.pdf).
- We could use softfloats.
- ~~We could set the FPU control register to 64bit precision for Rust programs, and require other code to set the register in that way before calling into a Rust library.~~ [this does not work](https://github.com/rust-lang/rust/issues/114479#issuecomment-1808507590)

Related issues:
- https://github.com/llvm/llvm-project/issues/44218: basically the same bug on the LLVM side, and pointing out the potential for soundness issues
- https://github.com/rust-lang/rust/issues/115567: that's a different problem, also affecting x86-32 but unrelated to what happens when an FP operation is executed; it is about the behavior of NaN bits as they get returned from a function

Prior issues:
- https://github.com/rust-lang/rust/issues/72327
Repository: material-ui
Issue: Automate releases: publish from CI + npm provenance 
Labels: core,security

### Summary 💡

Hi! I've noticed you have a very well-defined [release process](https://github.com/mui/material-ui/blob/afdec50351507894c1e4cfe4030bce4e7068d15f/scripts/README.md) with scripts to support this process for mui/material-ui. It looks to me like the scripts are currently run manually, and we could automate the script runs, that don't require human action, using GitHub workflows to release.

### Examples 🌈

Examples of GitHub workflows releasing to npm:
https://github.com/reduxjs/react-redux/blob/4a7e129ee537d35c53da258ccf7924a0376391ee/.github/workflows/publish.yaml
https://github.com/SAP/ui5-webcomponents/blob/3b7c711875303be0bb995c80545a9786b2ec511c/.github/workflows/release-custom-tag.yaml

### Motivation 🔦

Automating the release makes the process easier for you (fewer things to do each time!). It also improves the security of the release by using a "trusted builder". A "trusted builder" provides a higher level of confidence, for example, that your checking out the correct commit and that `yarn` package was not compromised, over running in a local machine.

##### Additional context

If you are willing to automate your releasing script runs using GitHub workflows, I can support you by opening PRs!

I'm Gabriela and I work on behalf of Google and the OpenSSF suggesting supply-chain security changes :)
Repository: material-ui
Issue: [material-ui][Autocomplete] Component with `freeSolo` and `isOptionEqualToValue` doesn't use string for type of value
Labels: bug 🐛,typescript,component: autocomplete

### Duplicates

- [X] I have searched the existing issues

### Latest version

- [X] I have tested the latest version

### Steps to reproduce 🕹

Link to live example: https://codesandbox.io/s/jolly-sid-x28zcd?file=/src/App.tsx

Steps:

1. Type something into the input
2. Press enter
3. Click on the input again

### Current behavior 😯

Page crashes because of error  `Cannot read properties of undefined (reading 'id')`

### Expected behavior 🤔

Typescript tells me that `value` in `isOptionEqualToValue` could be a string

### Context 🔦

I have a similar example to this in my project with a nested object, and just discovered it was crashing because I don't check if the value is a string. `onChange` seems to use the correct types of S | string.

### Your environment 🌎

Using the mui template codesandbox, which is a browser sandbox not cloud one.
Repository: pytorch
Issue: Confusing error message for DataLoader with num_workers=0 and non-zero timeout
Labels: module: dataloader,triaged

### 🐛 Describe the bug

It looks like setting a timeout on the DataLoader is illegal with num_workers=0, but the documentation doesn't mention it and the error message is very confusing. I would expect the timeout to be ignored under those circumstances, but at the very least this deserves a clear error message, since the current one reads as if a timeout occurred, rather than an illegal value for it was passed.

Minimal reproducing example
```python
from torch.utils.data import DataLoader
train_dataloader_full_tracks = DataLoader(
    [], num_workers=0, timeout=1
)
iter(train_dataloader_full_tracks)
```

Output
```
Traceback (most recent call last):
  File "dataloader_problem.py", line 6, in <module>
    iter(train_dataloader_full_tracks)
  File "/usr/local/lib/python3.8/dist-packages/torch/utils/data/dataloader.py", line 442, in __iter__
    return self._get_iterator()
  File "/usr/local/lib/python3.8/dist-packages/torch/utils/data/dataloader.py", line 385, in _get_iterator
    return _SingleProcessDataLoaderIter(self)
  File "/usr/local/lib/python3.8/dist-packages/torch/utils/data/dataloader.py", line 664, in __init__
    assert self._timeout == 0
AssertionError
```

### Versions

I use 2.0.0, but I see that the main branch has the same issue as of today.

cc @SsnL @VitalyFedyunin @ejguan @dzhulgakov
Repository: tauri
Issue: [docs] Improve `BaseDirectory` documentation
Labels: type: documentation,good first issue

Is it possible to improve the documentation for `BaseDirectory` here:

https://github.com/tauri-apps/tauri/blob/4db363a03c182349f8491f46ced258d84723b11f/tooling/api/src/path.ts#L19

It might be enough to just add a reference to each enum value to the respective `path.appFooBar` documentation (so add a note to `BaseDirectory.AppCache` that points to `path.appCacheDir()`)

Other enum that's documented:

https://github.com/tauri-apps/tauri/blob/b7ae725/tooling/api/src/window.ts#L228

Discord thread: <https://discord.com/channels/616186924390023171/1137125879571558480> and <https://discord.com/channels/616186924390023171/731495028677148753/1137122018744074391> that have a bit more context for someone using the enums without knowing what they resolve to.

Would be nice if we didn't have to deal with inline headers `###` downstream in docs, but I can handle that for the sake of more documentation <3
Repository: godot
Issue: there's a white pixel in the corners of docks when they're floating
Labels: bug,topic:editor,topic:porting,topic:gui

### Godot version

4.1

### System information

ubuntu, gnome

### Issue description

![image](https://github.com/godotengine/godot/assets/71937306/a4db8d10-80b4-4014-b66e-54cee5904922)

### Steps to reproduce

1. make a dock floating
2. look at the corners

### Minimal reproduction project

any
Repository: stable-diffusion-webui
Issue: [Feature Request]: Update launch.py to Handle Package Version Constraints
Labels: enhancement

### Is there an existing issue for this?

- [X] I have searched the existing issues and checked the recent builds/commits

### What would your feature do ?

There may be technical reasons behind this choice, but the current implementation of `is_installed` in launch.py only checks if a package can be imported, without considering any specific version constraints. While this approach is sufficient for simply checking if a package is installed, it fails to ensure that the installed version meets the specific requirements of the application, such as minimum or exact version constraints. This is really painful to manage in extensions.

**Current Behavior:**

The is_installed function uses importlib.util.find_spec to check if the package can be imported, returning True if found, regardless of the version.

**Expected Behavior:**

The function should be updated to also check the version constraints, e.g., "==", ">=" to ensure that the installed package meets the application's requirements. This could be done using pkg_resources or similar tools to get the installed version and compare it against the required version as specified in the requirements file.

### Proposed workflow

Here's a naive solution

```python
from packaging.version import parse
import pkg_resources

def is_installed(package):
    try:
        package_name = package.strip().split("==")[0].split(">=")[0]
        installed_version = parse(pkg_resources.get_distribution(package_name).version)

        if "==" in package:
            _, required_version = package.split("==")
            return installed_version == parse(required_version)
        elif ">=" in package:
            _, required_version = package.split(">=")
            return installed_version >= parse(required_version)
        else:
            return True
    except Exception:
        return False
```

This implementation will handle both exact and minimum version constraints, ensuring that the installed package meets the requirements specified.

### Additional information

Without this change, the application may run with incompatible package versions, leading to unexpected behavior, bugs, or crashes. By implementing this change, we can ensure that the installed packages are compatible with the extension's needs.


Thanks for your great work.
Repository: tensorflow
Issue: Incorrect tf.nn.max_pool2d outputs for NCHW and NHWC in the same thread.
Labels: stat:awaiting tensorflower,type:bug,comp:mkl,TF 2.13

### Issue type

Bug

### Have you reproduced the bug with TensorFlow Nightly?

Yes

### Source

binary

### TensorFlow version

2.13

### Custom code

No

### OS platform and distribution

Ubuntu 22.04

### Mobile device

_No response_

### Python version

3.10

### Bazel version

_No response_

### GCC/compiler version

_No response_

### CUDA/cuDNN version

_No response_

### GPU model and memory

_No response_

### Current behavior?

There is an incorrect output of tf.nn.max_pool2d when calling with the input of the same batch size, height, width and depth first in NCHW, then in NHWC format with MKL support. \
Output of tf.nn.max_pool2d on the same input (except data format) must be the same (except data format).

### Standalone code to reproduce the issue

Colab to reproduce https://colab.research.google.com/drive/1Vuo7txDPDq-YXAuCFQcPNowHgOwbT7Oi?usp=sharing



### Relevant log output

_No response_
Repository: create-react-app
Issue: [eslint-config-react-app] eslint-config-react-app should warn user about react convention
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..."
-->

`eslint-config-react-app` should warn user about react convention, for example, 

https://react.dev/learn/state-a-components-memory#anatomy-of-usestate

> The convention is to name this pair like `const [something, setSomething]`. You could name it anything you like, but conventions make things easier to understand across projects.

### Describe the solution you'd like

<!--
  Provide a clear and concise description of what you want to happen.
-->



Mention `"react/hook-use-state"` on doc page.

https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/hook-use-state.md#rule-details

eslint OK

```js
const [index, setIndex] = useState(0);
```

eslint warning

```js
const [x, y] = useState(0);
```

### Describe alternatives you've considered

<!--
  Let us know about other solutions you've tried or researched.
-->


### Additional context

<!--
  Is there anything else you can add about the proposal?
  You might want to link to related issues here, if you haven't already.
-->
Repository: opencv
Issue: OpenCV4.8.0 dnn can not load fp16 onnx model which converts from onnxmltools
Labels: bug,category: dnn (onnx)

### System Information

opencv 4.8.0
onnx 1.6.0
onnxmltools   1.11.2 

 

### Detailed description

I'm using opencv dnn to load fp16 onnx model, but it fails with the following error
`[ERROR:0@1.465] global onnx_importer.cpp:1064 handleNode DNN/ONNX: ERROR during processing node with 3 inputs and 1 outputs: [Resize]:(onnx_node!/model.39/Resize) from domain='ai.onnx'
terminate called after throwing an instance of 'cv::Exception'
  what():  OpenCV(4.8.0) /mnt/d/LSoftware/opencv-4.8.0/modules/dnn/src/onnx/onnx_importer.cpp:1083: error: (-2:Unspecified error) in function 'handleNode'
> Node [Resize@ai.onnx]:(onnx_node!/model.39/Resize) parse error: OpenCV(4.8.0) /mnt/d/LSoftware/opencv-4.8.0/modules/dnn/src/onnx/onnx_importer.cpp:595: error: (-5:Bad argument) Blob /model.39/Resize_input_cast_2 not found in const blobs in function 'getBlob'
>
Aborted (core dumped)`


### Steps to reproduce


My code
`Mat blob = blobFromImage(det1, 1 / 255.0, Size(inputWidth, inputHeight), Scalar(0, 0, 0), true, false);
cv::dnn::Net net = cv::dnn::readNetFromONNX(modelPath);
net.setInput(blob);`

It works well with original fp32 model. I get fp16 model using onnxmltools using this
`from onnxmltools.utils.float16_converter import convert_float_to_float16`

### Issue submission checklist

- [X] I report the issue, it's not a question
- [X] I checked the problem with documentation, FAQ, open issues, forum.opencv.org, Stack Overflow, etc and have not found any solution
- [X] I updated to the latest OpenCV version and the issue is still there
- [X] There is reproducer code and related data files (videos, images, onnx, etc)
Repository: vscode
Issue: [wsl] Option to start new window in WSL from File menu
Labels: feature-request,WSL

<!-- ⚠️⚠️ Do Not Delete This! feature_request_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- Please search existing issues to avoid creating duplicates. -->

<!-- Describe the feature you'd like. -->

VSCode version: 1.81.0 
Operating System: Windows 10 

When opening VSCode in a WSL workspace hitting the "New Window" button in the file menu goes and opens the new window using windows/local as default. I am proposing either an option allowing the user to choose to open windows using a remote client as default or showing both an "New Window" and a "New WSL Window" in the file menu. Thank you!

![image](https://github.com/microsoft/vscode/assets/116247007/ed0160af-36f5-44b2-ab92-92f8971e7d46)
Repository: material-ui
Issue: [Joy][Menu] Menu stays open - `onClose` not called
Labels: bug 🐛,component: menu,package: joy-ui

### Duplicates

- [X] I have searched the existing issues

### Latest version

- [X] I have tested the latest version

### Steps to reproduce 🕹

Link to live example:
https://codesandbox.io/s/bold-fog-dc2lz2?file=/Demo.tsx

Steps:

1. Click on the Button to open the menu
2. Click away from the menu to close the menu


### Current behavior 😯

Menu stays open even when clicking away - onClose is not called:
![image](https://github.com/mui/material-ui/assets/32999/5211a652-b15c-44f2-83f0-f5c4c35886a3)


### Expected behavior 🤔

onClose is called, and the menu closes

### Context 🔦

I've ported my application to the newly released Joy UI `^5.0.0-beta.0`, and most menus in the application stay open.
Selects close normally, but I cannot close menus. The repro shows the minimal code that used to work pre-beta.

### Your environment 🌎

<details>
  <summary><code>npx @mui/envinfo</code></summary>

```
  System:
    OS: Windows 10 10.0.22621
  Binaries:
    Node: 18.16.1 - C:\P\apps\nodejs\node.EXE
    Yarn: Not Found
    npm: 9.5.1 - C:\P\apps\nodejs\npm.CMD
  Browsers:
    Chrome: Not Found
    Edge: Spartan (44.22621.2070.0), Chromium (115.0.1901.188)
  npmPackages:
    @emotion/react: ^11.11.1 => 11.11.1
    @emotion/styled: ^11.11.0 => 11.11.0
    @mui/base:  5.0.0-beta.9
    @mui/core-downloads-tracker:  5.14.3
    @mui/icons-material: ^5.14.3 => 5.14.3
    @mui/joy: ^5.0.0-beta.0 => 5.0.0-beta.0
    @mui/material:  5.14.3
    @mui/private-theming:  5.13.7
    @mui/styled-engine:  5.13.2
    @mui/system:  5.14.3
    @mui/types:  7.2.4
    @mui/utils:  5.14.3
    @types/react: ^18.2.18 => 18.2.18
    react: ^18.2.0 => 18.2.0
    react-dom: ^18.2.0 => 18.2.0
    typescript: ^5.1.6 => 5.1.6
```
</details>
Repository: ant-design
Issue: Antd table performance issue when pagination is disabled and data set is > 100. This issue causes huge lag in row selection and page navigation. Issue occurred since 2019
Labels: Inactive,⚡️ Performance

### Reproduction link

[![Edit on CodeSandbox](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/custom-selection-antd-5-8-2-forked-hfm79m)

### Steps to reproduce

Display around 100rows in Antd table, clicking on selection causes a noticeable delay. Have tried other people's work around but man the delay is really obvious. Trying to migrate from ag grid to antd, but the table is almost making the component unusable... 

ShouldCellUpdate is not helping 
shouldCellUpdate: (record, prevRecord) => !_.isEqual(record, prevRecord)

### What is expected?

Not expecting performance issue for 100+ dataset

### What is actually happening?

delay for small size data

| Environment | Info |
| --- | --- |
| antd | 5.8.2 |
| React | 18.2 |
| System | web |
| Browser | Chrome |

<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->
Repository: PowerToys
Issue: [PowerRename] Support for renaming filenames with increasing numbers
Labels: Idea-Enhancement,Product-PowerRename

### Description of the new feature / enhancement

PowerRename can be used in most renaming situations at present, but there is still a convenient function that can be considered: rename the file name with an increasing number or put it before or after the file name.

### Scenario when this would be used?

My usage scenario is to merge pictures in two folders (such as comics), but the picture file names in both folders are like `0001.jpg` ~ `0019.jpg`, which are incremental numbers, so there will be conflicts when merging. 

At this time, use the Rename tool to name the pictures in one of the folders with increasing numbers after `0020.jpg` to avoid file name conflicts. E.g.,

![image](https://github.com/microsoft/PowerToys/assets/7609173/ae455fec-9318-44c5-b463-c9bbf0f0f9a4)


### Supporting information

There is an old Windows rename app `MyRename` that does this, which I currently use for this purpose. Its UI is presented as follows for reference:

![image](https://github.com/microsoft/PowerToys/assets/7609173/e9e0957e-4d63-42df-99ab-32151411fa04)

Thanks!