sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: ollama
Issue: Feature: API error response in case of exceeding context length
Labels: feature request,api

It would be good to get a error response back from the API if the prompt exceeds the context length of the model, similar to openai API.
Repository: angular
Issue: injector yields wrong result inside embedded view
Labels: area: core,core: di

### Which @angular/* package(s) are the source of the bug?

core, forms

### Is this a regression?

No

### Description

Inside an embedded view with an associated injector the injector seems to return an unexpected result, even if the host flag is used.

We've got a nested form, and `formControlName` uses `@Host()` when injecting its container

https://github.com/angular/angular/blob/c3b00959659ca20d3f798820dfcb4dee250a32ac/packages/forms/src/directives/reactive_directives/form_control_name.ts#L129

Our inner form is contained in an ng-template. In the repro below we just instantiate it next to the ng-template itself, in our real code the template outlet would be somewhere else entirely in the application (and DOM).

```html
<!-- outer component -->
<form [formGroup]="outerForm">
  <wrapper-component />
</form>

<!-- wrapper component -->
<ng-container [ngTemplateOutlet]="tpl" [ngTemplateOutletInjector]="injector" />

<ng-template #tpl>
  <inner-component />
</ng-template>

<!-- inner component -->
<form [formGroup]="innerForm">
  <input formControlName="innerInput">
</form>
```

While registering the `formControlName="innerInput"` an error is thrown. Debugging the issue shows that the `formControlName` actually gets the outer form as its form.

<img width="559" alt="image" src="https://github.com/angular/angular/assets/821510/2dd63fd3-5e91-426a-9ff7-7d7f5b1e68af">


### Please provide a link to a minimal reproduction of the bug

https://stackblitz.com/edit/stackblitz-starters-vvqjnr?file=src%2Fmain.ts

### Please provide the exception or error you saw

```true
Error: Cannot find control with name: 'innerInput'
    at _throwError (forms.mjs:3208:11)
    at setUpControl (forms.mjs:2991:13)
    at FormGroupDirective.addControl (forms.mjs:4902:9)
    at FormControlName._setUpControl (forms.mjs:5499:43)
    at FormControlName.ngOnChanges (forms.mjs:5444:18)
    at FormControlName.rememberChangeHistoryAndInvokeOnChangesHook (core.mjs:2561:14)
    at callHookInternal (core.mjs:3603:14)
    at callHook (core.mjs:3634:9)
    at callHooks (core.mjs:3585:17)
    at executeInitAndCheckHooks (core.mjs:3535:9)
```


### Please provide the environment you discovered this bug in (run `ng version`)

```true
I've verified the described behaviour is present in Angular 16.1.9, 16.2.12, and 17.1.1.
```


### Anything else?

Removing the `ngTemplateOutletInjector` solves the issue, which makes me question whether it's necessary to pass along an injector. The documentation on the injector input/parameter (both for the `ngTemplateOutlet` directive and for `createEmbeddedView` on `ViewContainerRef` or `TemplateRef`) doesn't really yield any useful information.
Repository: vscode
Issue: Workspace Trust - Workspace trust should not default to true when hitting enter?
Labels: under-discussion,workspace-trust

<!-- ⚠️⚠️ Do Not Delete This! bug_report_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- 🕮 Read our guide about submitting issues: https://github.com/microsoft/vscode/wiki/Submitting-Bugs-and-Suggestions -->
<!-- 🔎 Search existing issues to avoid creating duplicates. -->
<!-- 🧪 Test using the latest Insiders build to see if your issue has already been fixed: https://code.visualstudio.com/insiders/ -->
<!-- 💡 Instead of creating your report here, use 'Report Issue' from the 'Help' menu in VS Code to pre-fill useful information. -->

**Description:** When creating a new workspace, the user is presented with a dialog on workspace trust. By hitting enter, the workspace is trusted. It would be safer to have no trust as the default, to ensure that the user actively decided to trust the workspace.

<!-- 🔧 Launch with `code --disable-extensions` to check. -->
Does this issue occur when all extensions are disabled?: Yes

<!-- 🪓 If you answered No above, use 'Help: Start Extension Bisect' from Command Palette to try to identify the cause. -->
<!-- 📣 Issues caused by an extension need to be reported directly to the extension publisher. The 'Help > Report Issue' dialog can assist with this. -->
- VS Code Version: 1.85.1
- OS Version: Darwin arm64 23.2.0

Steps to Reproduce:

1. Create new workspace.
 ```
mkdir tmp
code tmp
```
2. When presented with Workspace Trust dialog, hit enter.

Now, the workspace is trusted. The suggestion here is to leave the workspace as untrusted in that case.
Repository: angular
Issue: Provide flexible way to generate `srcset` based on `ngSrcset` density multipliers when image size is unknown
Labels: area: common,common: image directive

### Which @angular/* package(s) are relevant/related to the feature request?

common

### Description

As far as I can see, `ImageLoaderConfig` currently does not support a flexible way of transforming `ngSrcset="1x, 2x"` to `srcset="https://foo.bar/image.jpg?density=1x 1x, https://foo.bar/image.jpg?density=2x 2x"` for images of varying sizes.

Example: Let's say I want to support three different screen densities, 1x, 2x and 3x. The images provided to support this are named `image.1x.jpg`, `image.2x.jpg` and `image.3x.jpg`. Also there are multiple ways of building the application, causing the actual image to change based on the build variant, meaning the size of the image is not known.

Instead of having to type:
```html
<img src="assets/image.jpg" srcset="assets/image.1x.jpg 1x, assets/image.2x.jpg 2x, assets/image.3x.jpg 3x" />
```

What I want is to utilise the possibility of writing a custom `ImageLoader`:
```typescript
{
  provide: IMAGE_LOADER,
  useValue: (config: ImageLoaderConfig) => {
    const srcComponents = config.src.split(".");

    const density = config.density !== undefined ? config.density : "1x";
    srcComponents.splice(-1, 0, density);

    return srcComponents.join(".");
  }
}
```

Then type the `img`-tag in the following way:
```html
<img fill ngSrc="assets/image.jpg" ngSrcset="1x, 2x, 3x" />
```

Though, there is no property `density` on `ImageLoaderConfig` of course - the only size-related property available is `width`. `width` is however `NaN` when the image size is unknown, so it is not helpful here. Would it be possible to provide each of the density multipliers in a property `density` or in some other way to enable this?

### Proposed solution

A new property `density` on `ImageLoaderConfig` that contains the density multiplier for each call to the `ImageLoader`. At least I guess that it is more preferable than e.g. changing the type of `width` to `number | string | undefined`, then passing the density multiplier value there(?).

### Alternatives considered

It would be preferable if the density multipliers could be defined in `ngSrcset` instead of in the `ImageLoader` implementation itself, as this would avoid e.g. having to define some arbitrary variable to keep track of each iteration:

```typescript
{
  provide: IMAGE_LOADER,
  useFactory: (): ImageLoader => {
    let densityMultiplier = 1;

    return (config: ImageLoaderConfig): string => {
      const srcComponents = config.src.split(".");
      srcComponents.splice(-1, 0, `${pixelDensity}x`);

      if (config.width === undefined) {
        densityMultiplier = 1;
      } else {
        densityMultiplier++;
      }

      return srcComponents.join(".");
    };
  }
}
```
Repository: pytorch
Issue: Dynamo x autograd.Function: silently ignores all of the ctx.methods 
Labels: triaged,oncall: pt2,module: dynamo,module: pt2-dispatcher,dynamo-must-fix,dynamo-autograd-function

In fact it looks like we may silently ignore them.

The ctx methods in question are:
- ctx.mark_dirty()
- ctx.mark_non_differentiable()
- ctx.set_materialize_grads()

Repro:
```
import torch


class MulY(torch.autograd.Function):
    @staticmethod
    def forward(ctx, x):
        ctx.set_materialize_grads(True)
        return x * 3

    @staticmethod
    def backward(ctx, grad_out):
        return grad_out * 3

@torch.compile(backend="eager", fullgraph=True)
def f(x):
    return MulY.apply(x)

x = torch.tensor(2., requires_grad=True)
expected = MulY.apply(x)
out = f(x)
assert torch.allclose(out, expected)
```
TORCH_LOGS="+dynamo" on this shows that the graph looks the same no matter if ctx.set_materialize_grads is True or False. We should preserve this somehow, so that AOTAutograd knows to set it.

cc @ezyang @chauhang @penguinwu @voznesenskym @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @chenyang78 @kadeng @amjames @xmfan @bdhirsh @msaroufim @anijain2305 @aakhundov
Repository: pytorch
Issue: Dynamo x autograd.Function: graph breaks on all the staticmethods on autograd.Function
Labels: triaged,oncall: pt2,module: dynamo,module: higher order operators,module: pt2-dispatcher,dynamo-triage-june2024

In order of importance:
- setup_context
- vmap (since we support vmap in torch.compile now!)
- jvp (we don't support jvp in torch.compile, so this is not going to work anytime soon.)

Repro:
```
import torch


class MulY(torch.autograd.Function):
    @staticmethod
    def forward(x):
        return x * 3

    @staticmethod
    def setup_context(ctx, inputs, output):
        return

    @staticmethod
    def backward(ctx, grad_out):
        return grad_out * 3

@torch.compile(backend="eager", fullgraph=True)
def f(x):
    return MulY.apply(x)

x = torch.tensor(2., requires_grad=True)
expected = MulY.apply(x)
out = f(x)
assert torch.allclose(out, expected)

```

Gives: "Unsupported: NYI - autograd.Function with custom setup_context method"


cc @ezyang @anijain2305 @chauhang @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @chenyang78 @kadeng @ydwu4 @bdhirsh @gchanan @msaroufim @aakhundov
Repository: vscode
Issue: Notebook scroll gets stuck when scrolling slowly
Labels: bug,notebook-layout

Just noticed that I'm in a state where if I scroll slowly, then I can't get past this title. But if I scroll quickly, there's no problem.

![Recording 2024-01-26 at 14 10 53](https://github.com/microsoft/vscode/assets/323878/459131b1-478e-4c79-ac1b-141915ec40b4)
Repository: pytorch
Issue: DISABLED test_inductor_all_reduce_coalesced (__main__.C10DFunctionalNativeTest)
Labels: module: rocm,triaged,skipped

Platforms: rocm

Last known good: https://hud.pytorch.org/pytorch/pytorch/commit/3e76a0e9c265be7a52afc2597f98d8a166fb80cd
First known bad: https://hud.pytorch.org/pytorch/pytorch/commit/6596a3f23dfe1ea4175637fa979bcbfbff397737

This test was disabled because it is failing on main branch ([recent examples](https://torch-ci.com/failure?failureCaptures=%5B%22distributed%2Ftest_c10d_functional_native.py%3A%3AC10DFunctionalNativeTest%3A%3Atest_inductor_all_reduce_coalesced%22%5D)).

cc @jeffdaily @sunway513 @jithunnair-amd @pruthvistony @ROCmSupport @dllehr-amd @jataylo @hongxiayang
Repository: pytorch
Issue: [export] Error loudly when tracing over a module not in the module hierarchy
Labels: export-triage-review,oncall: export

Code like this:
```
inp = (torch.tensor([0.1, 0.1]),)
linear = torch.nn.Linear(2, 2)

class Module(torch.nn.Module):
    def forward(self, x):
      x = x + 1
      y = x.t()
      y = y.relu()
      y = linear(y)
      return y

 ep = export(Module(), inp)
```
has weird behavior today. In eager, `linear.weight` and `linear.bias` are not in `Module`'s state dict, but we detect them as parameters/buffers and lift them due to how we do input handling.

I think that export should just error loudly on oddly shaped code like this. In practical settings, it's almost never what you want, since things would not train correctly, and `load_state_dict` etc. would be totally broken.

cc @avikchaudhuri @gmagogsfm @zhxchen17 @tugsbayasgalan @angelayi @ydwu4
Repository: PowerToys
Issue: Crop And Lock : incorrect size of crop
Labels: Issue-Bug,Needs-Triage,Product-CropAndLock

### Microsoft PowerToys version

0.77.0

### Installation method

Other (please specify in "Steps to Reproduce")

### Running as admin

No

### Area(s) with issue?

Crop and Lock

### Steps to reproduce

powertoys package installed from my corporate software store
precisely capture an area displaying details of a ruler (as an exemple)
carefully select 10cm by 10cm area
(sorry, I am trying to attach a picture but for some reason it does not upload)

### ✔️ Expected Behavior

the crop should display precisely the selected area

### ❌ Actual Behavior

the size of the crop is slightly higher (+4mm) and narrower (-3mm) than the area selected

### Other Software

_No response_
Repository: vscode
Issue: Check for updates
Labels: feature-request,install-update

Type: <b>Feature Request</b>

Under the Help menu, "Check for updates" not only checks for an update but also automatically installs it if one is available. This is unexpected since "check" <> "install".  The user should be alerted to an available update and given the option to proceed or cancel.

VS Code version: Code 1.85.2 (8b3775030ed1a69b13e4f4c628c612102e30a681, 2024-01-18T06:40:10.514Z)
OS version: Windows_NT x64 10.0.22621
Modes:


<!-- generated by issue reporter -->
Repository: godot
Issue: PopupMenu throws signal connection errors on release build
Labels: bug,topic:export

### Tested versions

4.2.stable
4.3 dev2

### System information

Godot v4.2.1.stable - Manjaro Linux 23.1.3 - X11 - Vulkan (Forward+) - dedicated AMD Radeon RX 6700 XT (RADV NAVI22) () - Intel(R) Xeon(R) CPU E5-2697 v3 @ 2.60GHz (28 Threads)

### Issue description

Project release exported for linux throws some errors when user interact with OptionButton and its PopupMenu.

Every time when opened popup menu closing:
```
ERROR: Attempt to disconnect a nonexistent connection from 'root:<Window#24729617100>'. Signal: 'focus_entered', callable: ''.
   at: _disconnect (core/object/object.cpp:1420)
ERROR: Attempt to disconnect a nonexistent connection from 'root:<Window#24729617100>'. Signal: 'tree_exited', callable: ''.
   at: _disconnect (core/object/object.cpp:1420)
``` 
When menu opening after been closed prevously (so every time excluding the very first opening):
```
ERROR: Signal 'focus_entered' is already connected to given callable '' in that object.
   at: connect (core/object/object.cpp:1358)
ERROR: Signal 'tree_exited' is already connected to given callable '' in that object.
   at: connect (core/object/object.cpp:1358)
```

This doesn't reproduces in editor.
This doesn't reproduces for web export .
This doesn't reproduces when project exported with debug option.
This doesn't reproduces when project settnig `display/window/subwindows/embed_subwindows` disabled.

All popup menu features works normally as far I as can tell, but this error spam in logs is kinda annoying.

### Steps to reproduce

1. Create new project, add OptionButton to scene.
2. Export project for linux with standard release template.
3. Launch compiled app and open/close button popup menu several times.  

### Minimal reproduction project (MRP)

Absolutely trivial project with OptionButton as one and only element in single scene. 
[option_button_project.zip](https://github.com/godotengine/godot/files/14068015/option_button_project.zip)
Repository: flutter
Issue: build dashboard--when sorting columns, should sort blue builds to the left
Labels: team-infra,P2,triaged-infra

### Type of Request

bug

### Infrastructure Environment

Build dashboard

### What is happening?

There exists in the build dashboard a sorting algorithm to move test targets whose last finished run failed (or something like that). However, it appears that blue builds (infra failures) are not sorted according to this logic, even though they can make the tree red. Therefore, when an infra failure causes the tree to go red, the gardener may have to use the search feature to find the target and investigate the failure. For example:
 
![Screenshot from 2024-01-26 10-34-45](https://github.com/flutter/flutter/assets/7856010/2d9b0597-5785-41f7-b3bc-e2211d9c76a6)


### Steps to reproduce

_No response_

### Expected results

I expect to see targets making the tree red sorted to the left.
Repository: three.js
Issue: Add an API to disable TransformControls's XYZ, XY, YZ, XZ and the extra 'x', 'y' and 'z' in the visual controls.
Labels: Addons

### Description

When I'm attaching `TransformControls` to an object it automatically gets 13 children which are the navigation children. By default is okay but it is very frustrating when there are many objects and you are trying to move the objects using the arrows. Looks very complicated and there is no reason for them to exist. To give more context here's a screenshot:

![image](https://github.com/mrdoob/three.js/assets/43875051/0cce8d20-4ff1-431e-8504-c233504bf24e)
But okay, we can disable them(sort of) by doing this:

```
[228, 231, 234, 236, 237, 238, 239].forEach(axisMetal => {
    const objM = gizmoMetal.translate.getObjectById(axisMetal);
    objM.visible = false;
    objM.layers.disable(0);
});
```
but this is just disabling the visibility, not the functionality which needs to be done so when there are two object near and wonder why both object are moving together check for an invisible working arrow. Also when a new object is added, the IDs change so good luck when you have 100+ objects.

### Solution

I think we should have the ability to disable them and by using `TransformControls` directly like this:
```
const transformControlsMetal = new TransformControls(camera, renderer.domElement);
transformControlsMetal.showXYZ = false;
```

This way we will disable the entire functionality of things we don't need.

### Alternatives

Using this will make it a partial solution but once the IDs change then the correct IDs should be updated again.
```
[228, 231, 234, 236, 237, 238, 239].forEach(axisMetal => {
    const objM = gizmoMetal.translate.getObjectById(axisMetal);
    objM.visible = false;
    objM.layers.disable(0);
});
```

### Additional context

_No response_
Repository: flutter
Issue: Add support for Gradle Tooling API to gradle_utils.dart
Labels: c: new feature,platform-android,P2,team-android,triaged-android,fyi-tool

### Use case

`gradle_utils.dart` is a script that is used to determine and configure Android dependencies, etc. It needs to be manually updated each time there is a change in gradle behavior.

While addressing https://github.com/flutter/flutter/issues/141410, it also appears that some logic is relying on regex which can be error prone and may not cover all the cases.

### Proposal

Per https://dzone.com/articles/gradle-tooling-api-introduction, the Gradle Tooling API can be used to perform Gradle builds programmatically and to query configuration.

We should investigate if the Gradle Tooling API could be used to replace some or all of the functionality that `gradle_utils.dart `currently provides.
Repository: go
Issue: x/build: timeout on LUCI openbsd-amd64 builder
Labels: Builders,NeedsInvestigation

```
#!watchflakes
post <- builder ~ `(gotip|go1\.\d\d)-openbsd-amd64` && (`test timed out` || `SIGQUIT` || `context deadline exceeded` || `command exceeded time limit` || status == "ABORT")
```

It mostly times out on the tools repo.
Repository: next.js
Issue: Running next build breaks next dev server
Labels: bug

### Link to the code that reproduces this issue

There is no code -- read on...

### To Reproduce

1. `npx create-next-app@latest mytest --typescript --tailwind --eslint`
   ```none
   Would you like to use `src/` directory? … Yes
   Would you like to use App Router? (recommended) … Yes
   Would you like to customize the default import alias (@/*)? … No
   ```
3. `cd mytest`
4. `next dev`
5. Check in a browser that `http://localhost:3000` is working fine
6. In another shell, run `next build`
7. Go back to the browser, refresh the page


### Current vs. Expected behavior

The page is broken:

```none
Server Error
Error: Cannot find module './638.js'
```

I expected the dev server to either (1) continue working correctly or (2) exit with a message explaining why it can't work.

### Provide environment information

```bash
Operating System:
  Platform: linux
  Arch: x64
  Version: #102-Ubuntu SMP Wed Jan 10 09:33:48 UTC 2024
Binaries:
  Node: 20.5.1
  npm: 10.2.5
  Yarn: 1.22.19
  pnpm: N/A
Relevant Packages:
  next: 14.1.0
  eslint-config-next: 14.1.0
  react: 18.2.0
  react-dom: 18.2.0
  typescript: 5.3.3
Next.js Config:
  output: N/A
```


### Which area(s) are affected? (Select all that apply)

Not sure

### Which stage(s) are affected? (Select all that apply)

next dev (local)

### Additional context

Restarting `next dev` "fixes" the issue.
Repository: flutter
Issue: `-[FlutterTextInputView updateEditingState]` > `-[FlutterEngine flutterTextInputView:updateEditingClient:withState:]` Invalid JSON message, The string failed to convert to UTF8
Labels: c: crash,platform-ios,engine,P2,team-ios,triaged-ios

Splitting out from https://github.com/flutter/flutter/issues/100891#issuecomment-1912469518

@hig-dev

Flutter version: 3.16.7

**Crash log 1:**
Full log: [053357acb5ba41878673f2822929d3ca-symbolicated.log](https://github.com/flutter/flutter/files/14067917/053357acb5ba41878673f2822929d3ca-symbolicated.log)
Device: iPad13,18 (iOS 17.1)
```
NSInternalInconsistencyException: Invalid JSON message, encoding failed: Error Domain=NSCocoaErrorDomain Code=3852 "The string 0x280d7e190 failed to convert to UTF8" UserInfo={NSDebugDescription=The string 0x280d7e190 failed to convert to UTF8}

CoreFoundation 0x1a65fc870 __exceptionPreprocess
Flutter 0x103a0d514 -[FlutterJSONMessageCodec encode:] (FlutterCodecs.mm:82)
Flutter 0x103a0c70c -[FlutterJSONMethodCodec encodeMethodCall:] (FlutterCodecs.mm:125)
Flutter 0x103a093ac -[FlutterMethodChannel invokeMethod:arguments:] (FlutterChannels.mm:281)
Flutter 0x103442b2c -[FlutterEngine flutterTextInputView:updateEditingClient:withState:] (FlutterEngine.mm:990)
Flutter 0x103477d4c -[FlutterTextInputView updateEditingState] (FlutterTextInputPlugin.mm:2020)
Flutter 0x103473bd8 -[FlutterTextInputView replaceRange:withText:] (FlutterTextInputPlugin.mm:1283)
Flutter 0x1034789fc -[FlutterTextInputView insertText:] (FlutterTextInputPlugin.mm:2115)
UIKitCore 0x1a9075000 -[UIKBInputDelegateManager insertText:updateInputSource:]
Runner 0x100e28774 main (AppDelegate.swift:9)
```
Repository: transformers
Issue: Any plans to support KV Cache offloading to CPU (and NVMe)?
Labels: Feature request

### Feature request

Similar to how model parameter and optimizer offload is supported using the [deepspeed library](https://github.com/huggingface/transformers/blob/de13a951b38b85195984164819f1ab05fe508677/docs/source/en/perf_train_gpu_one.md#deepspeed-zero), are there plans for natively supporting KV cache offloading as well? 

### Motivation

Apart from helping accommodate larger batch sizes on a single GPU, this can also significantly improve overall throughput, specially when batch sizes grow very large (resulting in a linear increase in KV cache size).

### Your contribution

I see there already exists an implementation of this: https://github.com/tjruwase/transformers/tree/kvcache-offload-cpu, so maybe this is simply about incorporating those changes in the main repo?
Repository: ollama
Issue: ollama.ai and registry.ollama.ai does not have IPv6
Labels: ollama.com

ollama.ai and registry.ollama.ai does not have IPv6 and it cannot be installed on AWS IPv6 only servers.

`Error: max retries exceeded: Get "https://registry.ollama.ai/v2/library/codellama/blobs/sha256:3a43f93b78ec50f7c4e4dc8bd1cb3fff5a900e7d574c51a6f7495e48486e0dac": dial tcp 34.120.132.20:443: connect: network is unreachable`

34.120.132.20 seems to on GCP, which supports IPv6.