helloadhavan/github_issues huggingface dataset:
Repository: huggingface/transformers
Pull request: [MistralCommonBackend] fix loading proc

# What does this PR do?

MistralCommonBackend does not implement `added_tokens_decoder` so any call to PreTrainedTokenizerBase's `__repr__ `fails.

Changed files:
filename: src/transformers/tokenization_mistral_common.py
patch: @@ -1589,6 +1589,18 @@ def _get_validation_mode(mode: str | ValidationMode) -> ValidationMode:
             raise ValueError(_invalid_mode_msg)
         return mode
 
+    def __repr__(self) -> str:
+        # MistralCommonBackend does not implement added_tokens_decoder, so we need a custom repr
+        return (
+            f"{self.__class__.__name__}(name_or_path='{self.name_or_path}',"
+            f" vocab_size={self.vocab_size}, model_max_length={self.model_max_length},"
+            f" padding_side='{self.padding_side}', truncation_side='{self.truncation_side}',"
+            f" special_tokens={self.special_tokens_map}"
+        )
+
+    def added_tokens_decoder(self):
+        raise NotImplementedError("`MistralCommonBackend` does not implement `added_tokens_decoder`.")
+
     def add_special_tokens(
         self,
         special_tokens_dict: dict[str, str | AddedToken | Sequence[str | AddedToken]],
Repository: nodejs/node
Pull request: deps: update amaro to 1.1.7

This is an automated update of amaro to 1.1.7.

Changed files:
filename: deps/amaro/dist/package.json
patch: @@ -4,7 +4,7 @@
     "강동윤 <kdy1997.dev@gmail.com>"
   ],
   "description": "wasm module for swc",
-  "version": "1.14.0",
+  "version": "1.15.11",
   "license": "Apache-2.0",
   "repository": {
     "type": "git",

filename: deps/amaro/dist/strip-loader.js
patch: @@ -8,7 +8,7 @@ export async function load(url, context, nextLoad) {
     try {
       const { source } = await nextLoad(url, {
         ...context,
-        format: "module"
+        format
       });
       const { code } = transformSync(source.toString(), {
         mode: "strip-only",

filename: deps/amaro/dist/transform-loader.js
patch: @@ -8,7 +8,7 @@ export async function load(url, context, nextLoad) {
     try {
       const { source } = await nextLoad(url, {
         ...context,
-        format: "module"
+        format
       });
       const { code, map } = transformSync(source.toString(), {
         mode: "transform",

filename: deps/amaro/package.json
patch: @@ -1,6 +1,6 @@
 {
 	"name": "amaro",
-	"version": "1.1.6",
+	"version": "1.1.7",
 	"description": "Node.js TypeScript wrapper",
 	"license": "MIT",
 	"type": "commonjs",

filename: src/amaro_version.h
patch: @@ -2,5 +2,5 @@
 // Refer to tools/dep_updaters/update-amaro.sh
 #ifndef SRC_AMARO_VERSION_H_
 #define SRC_AMARO_VERSION_H_
-#define AMARO_VERSION "1.1.6"
+#define AMARO_VERSION "1.1.7"
 #endif  // SRC_AMARO_VERSION_H_
Repository: ollama/ollama
Pull request: api: fix unreachable status err

StatusError was unreachable, the client always checked for error messages in the response body first, and the server always includes error messages with HTTP error status codes.

Changed files:
filename: api/client.go
patch: @@ -222,10 +222,6 @@ func (c *Client) stream(ctx context.Context, method, path string, data any, fn f
 			return fmt.Errorf("unmarshal: %w", err)
 		}
 
-		if errorResponse.Error != "" {
-			return errors.New(errorResponse.Error)
-		}
-
 		if response.StatusCode >= http.StatusBadRequest {
 			return StatusError{
 				StatusCode:   response.StatusCode,
@@ -234,6 +230,10 @@ func (c *Client) stream(ctx context.Context, method, path string, data any, fn f
 			}
 		}
 
+		if errorResponse.Error != "" {
+			return errors.New(errorResponse.Error)
+		}
+
 		if err := fn(bts); err != nil {
 			return err
 		}

filename: api/client_test.go
patch: @@ -89,6 +89,16 @@ func TestClientStream(t *testing.T) {
 			},
 			wantErr: "mid-stream error",
 		},
+		{
+			name: "http status error takes precedence over general error",
+			responses: []any{
+				testError{
+					message:    "custom error message",
+					statusCode: http.StatusInternalServerError,
+				},
+			},
+			wantErr: "500",
+		},
 		{
 			name: "successful stream completion",
 			responses: []any{
Repository: electron/electron
Pull request: fix: apply `zoomFactor` from `setWindowOpenHandler` to `window.open()` windows

Backport of #49886

See that PR for details.


Notes: Fixed an issue where setting `zoomFactor` in `setWindowOpenHandler`'s `overrideBrowserWindowOptions` had no effect on windows opened via `window.open()`.

Changed files:
filename: shell/browser/api/electron_api_web_contents.cc
patch: @@ -4645,6 +4645,19 @@ gin_helper::Handle<WebContents> WebContents::CreateFromWebPreferences(
       existing_preferences->SetFromDictionary(web_preferences_dict);
       web_contents->SetBackgroundColor(
           existing_preferences->GetBackgroundColor());
+
+      double zoom_factor;
+      if (web_preferences.Get(options::kZoomFactor, &zoom_factor)) {
+        auto* zoom_controller = WebContentsZoomController::FromWebContents(
+            web_contents->web_contents());
+        if (zoom_controller) {
+          zoom_controller->SetDefaultZoomFactor(zoom_factor);
+          // Also set the current zoom level immediately, since the page
+          // has already navigated by the time we wrap the webContents.
+          zoom_controller->SetZoomLevel(
+              blink::ZoomFactorToZoomLevel(zoom_factor));
+        }
+      }
     }
   } else {
     // Create one if not.

filename: spec/api-browser-window-spec.ts
patch: @@ -3983,6 +3983,28 @@ describe('BrowserWindow module', () => {
         expect(webPreferences!.contextIsolation).to.equal(false);
       });
 
+      it('should apply zoomFactor from setWindowOpenHandler overrideBrowserWindowOptions', async () => {
+        const w = new BrowserWindow({
+          show: false,
+          webPreferences: {
+            sandbox: true
+          }
+        });
+
+        w.webContents.setWindowOpenHandler(() => ({
+          action: 'allow',
+          overrideBrowserWindowOptions: {
+            webPreferences: {
+              zoomFactor: 2.0
+            }
+          }
+        }));
+        w.loadFile(path.join(fixtures, 'api', 'new-window.html'));
+        const [childWindow] = await once(w.webContents, 'did-create-window') as [BrowserWindow, any];
+        await once(childWindow.webContents, 'did-finish-load');
+        expect(childWindow.webContents.getZoomFactor()).to.be.closeTo(2.0, 0.1);
+      });
+
       it('should set ipc event sender correctly', async () => {
         const w = new BrowserWindow({
           show: false,
Repository: ollama/ollama
Pull request: typo


Changed files:
filename: docs/macos.md
patch: @@ -22,7 +22,7 @@ To install the Ollama application somewhere other than `Applications`, place the
 Ollama on MacOS stores files in a few different locations.
 - `~/.ollama` contains models and configuration
 - `~/.ollama/logs` contains logs
-    - *app.log* contains most resent logs from the GUI application
+    - *app.log* contains most recent logs from the GUI application
     - *server.log* contains the most recent server logs
 - `<install location>/Ollama.app/Contents/Resources/ollama` the CLI binary
 
@@ -39,4 +39,4 @@ rm -rf ~/Library/Caches/com.electron.ollama/
 rm -rf ~/Library/Caches/ollama
 rm -rf ~/Library/WebKit/com.electron.ollama
 rm -rf ~/.ollama
-```
\ No newline at end of file
+```
Repository: vuejs/vue
Pull request: fix: directives shorthand normalize error (fix #12743)

<!--
Please make sure to read the Pull Request Guidelines:
https://github.com/vuejs/vue/blob/dev/.github/CONTRIBUTING.md#pull-request-guidelines
-->

<!-- PULL REQUEST TEMPLATE -->
<!-- (Update "[ ]" to "[x]" to check a box) -->

**What kind of change does this PR introduce?** (check at least one)

- [x] Bugfix
- [ ] Feature
- [ ] Code style update
- [ ] Refactor
- [ ] Build-related changes
- [ ] Other, please describe:

**Does this PR introduce a breaking change?** (check one)

- [ ] Yes
- [x] No

If yes, please describe the impact and migration path for existing applications:

**The PR fulfills these requirements:**

- [ ] It's submitted to the `dev` branch for v2.x (or to a previous version branch), _not_ the `master` branch
- [x] When resolving a specific issue, it's referenced in the PR's title (e.g. `fix #xxx[,#xxx]`, where "xxx" is the issue number)
- [x] All tests are passing: https://github.com/vuejs/vue/blob/dev/.github/CONTRIBUTING.md#development-setup
- [x] New/updated tests are included

If adding a **new feature**, the PR's description includes:
- [ ] A convincing reason for adding this feature (to avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it)

**Other information:**
Fix #12743

If I miss anything, please comment to remind me. :)

Changed files:
filename: src/core/vdom/modules/directives.ts
patch: @@ -103,7 +103,15 @@ function normalizeDirectives(
     }
     res[getRawDirName(dir)] = dir
     if (vm._setupState && vm._setupState.__sfc) {
-      dir.def = dir.def || resolveAsset(vm, '_setupState', 'v-' + dir.name)
+      const setupDef = dir.def || resolveAsset(vm, '_setupState', 'v-' + dir.name)
+      if (typeof setupDef === 'function') {
+        dir.def = {
+          bind: setupDef,
+          update: setupDef,
+        }
+      } else {
+        dir.def = setupDef
+      }
     }
     dir.def = dir.def || resolveAsset(vm.$options, 'directives', dir.name, true)
   }

filename: test/unit/features/v3/apiSetup.spec.ts
patch: @@ -251,6 +251,19 @@ describe('api: setup context', () => {
     expect(spy).toHaveBeenCalled()
   })
 
+  // #12743
+  it('directive resolution for shorthand', () => {
+    const spy = vi.fn()
+    new Vue({
+      setup: () => ({
+        __sfc: true,
+        vDir: spy
+      }),
+      template: `<div v-dir />`
+    }).$mount()
+    expect(spy).toHaveBeenCalled()
+  })
+  
   // #12561
   it('setup props should be reactive', () => {
     const msg = ref('hi')
Repository: ollama/ollama
Pull request: ggml: Use assigned layers when reporting loading stats

Reporting params.NumGPULayers can be misleading because it is the requested number of layers, not the actual number that is loaded. While they are often the same, there are cases where they might mismatch, such as if the GPU backend is missing.

Changed files:
filename: ml/backend/ggml/ggml.go
patch: @@ -356,23 +356,25 @@ func New(modelPath string, params ml.BackendParams) (ml.Backend, error) {
 	}
 
 	// Mimic llama runner logs summarizing layers and memory
-	slog.Info(fmt.Sprintf("offloading %d repeating layers to GPU", max(0, params.NumGPULayers-1)))
 	gpuLayers := 0
+	for _, layer := range layers {
+		if C.ggml_backend_dev_type(layer.d) == C.GGML_BACKEND_DEVICE_TYPE_GPU {
+			gpuLayers++
+		}
+	}
+	slog.Info(fmt.Sprintf("offloading %d repeating layers to GPU", gpuLayers))
+
 	switch C.ggml_backend_dev_type(output.d) {
-	case 0: // CPU
+	case C.GGML_BACKEND_DEVICE_TYPE_CPU:
 		slog.Info("offloading output layer to CPU")
-	case 1: // GPU
+	case C.GGML_BACKEND_DEVICE_TYPE_GPU:
 		slog.Info("offloading output layer to GPU")
 		gpuLayers++
-	case 2: // ACCEL
+	case C.GGML_BACKEND_DEVICE_TYPE_ACCEL:
 		slog.Info("offloading output layer to ACCEL")
 	}
-	for _, layer := range layers {
-		if C.ggml_backend_dev_type(layer.d) == 1 {
-			gpuLayers++
-		}
-	}
 	slog.Info(fmt.Sprintf("offloaded %d/%d layers to GPU", gpuLayers, len(layers)+1))
+
 	for bs := range maps.Values(bbs) {
 		slog.Info("model weights", "buffer", C.GoString(C.ggml_backend_buffer_name(bs)), "size", format.HumanBytes2(uint64(C.ggml_backend_buffer_get_size(bs))))
 	}
Repository: nodejs/node
Pull request: doc: mention default option for test runner env

<!--
Before submitting a pull request, please read:

- the CONTRIBUTING guide at https://github.com/nodejs/node/blob/HEAD/CONTRIBUTING.md
- the commit message formatting guidelines at
  https://github.com/nodejs/node/blob/HEAD/doc/contributing/pull-requests.md#commit-message-guidelines

For code changes:
1. Include tests for any bug fixes or new features.
2. Update documentation if relevant.
3. Ensure that `make -j4 test` (UNIX), or `vcbuild test` (Windows) passes.

If you believe this PR should be highlighted in the Node.js CHANGELOG
please add the `notable-change` label.

Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
    have the right to submit it under the open source license
    indicated in the file; or

(b) The contribution is based upon previous work that, to the best
    of my knowledge, is covered under an appropriate open source
    license and I have the right under that license to submit that
    work with modifications, whether created in whole or in part
    by me, under the same open source license (unless I am
    permitted to submit under a different license), as indicated
    in the file; or

(c) The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified
    it.

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including all
    personal information I submit with it, including my sign-off) is
    maintained indefinitely and may be redistributed consistent with
    this project or the open source license(s) involved.
-->

This is a follow up to fix the docs from:

- https://github.com/nodejs/node/pull/61367

Changed files:
filename: doc/api/test.md
patch: @@ -1561,6 +1561,7 @@ changes:
   * `env` {Object} Specify environment variables to be passed along to the test process.
     This options is not compatible with `isolation='none'`. These variables will override
     those from the main process, and are not merged with `process.env`.
+    **Default:** `process.env`.
 * Returns: {TestsStream}
 
 **Note:** `shard` is used to horizontally parallelize test running across
Repository: ollama/ollama
Pull request: ggml: Disable unused pipeline parallelism

We're not currently using it, even in cases where we could. Disabling it improves generation performance by 10-30% with multiple GPUs.

Changed files:
filename: ml/backend/ggml/ggml.go
patch: @@ -418,7 +418,7 @@ func New(modelPath string, params ml.BackendParams) (ml.Backend, error) {
 			(*C.ggml_backend_buffer_type_t)(unsafe.Pointer(&schedBufts[0])),
 			C.int(len(schedBackends)),
 			C.size_t(maxGraphNodes),
-			C._Bool(len(gpus) > 1 && slices.Contains(gpus, output.d)),
+			C._Bool(false),
 			C._Bool(false),
 		),
 		schedBackends: schedBackends,
Repository: vercel/next.js
Pull request: Update Rspack development test manifest

This auto-generated PR updates the development integration test manifest used when testing Rspack.

Changed files:
filename: test/rspack-dev-tests-manifest.json
patch: @@ -10021,11 +10021,10 @@
     "runtimeError": false
   },
   "test/e2e/app-dir/use-cache-without-experimental-flag/use-cache-without-experimental-flag.test.ts": {
-    "passed": [
-      "use-cache-without-experimental-flag should recover from the build error if useCache flag is set",
-      "use-cache-without-experimental-flag should show a build error"
+    "passed": ["use-cache-without-experimental-flag should show a build error"],
+    "failed": [
+      "use-cache-without-experimental-flag should recover from the build error if useCache flag is set"
     ],
-    "failed": [],
     "pending": [],
     "flakey": [],
     "runtimeError": false
Repository: facebook/react
Pull request: Performance Tracks: log properties diff for renders in DEV if no console task available

React Native doesn't support `console.createTask` yet, but it does support `performance.measure` and extensibility APIs for Performance panel, including `detail.devtools` field.

Previously, this logic was gated with `if (__DEV__ && debugTask)`, now `debugTask` is no longer required to log render. If there is no console task, we will just call `performance.measure(...)`. The same pattern is used in other reporters.

Changed files:
filename: packages/react-reconciler/src/ReactFiberPerformanceTrack.js
patch: @@ -228,9 +228,20 @@ export function logComponentRender(
               ? 'tertiary-dark'
               : 'primary-dark'
             : 'error';
-    const debugTask = fiber._debugTask;
-    if (__DEV__ && debugTask) {
+
+    if (!__DEV__) {
+      console.timeStamp(
+        name,
+        startTime,
+        endTime,
+        COMPONENTS_TRACK,
+        undefined,
+        color,
+      );
+    } else {
       const props = fiber.memoizedProps;
+      const debugTask = fiber._debugTask;
+
       if (
         props !== null &&
         alternate !== null &&
@@ -268,38 +279,45 @@ export function logComponentRender(
           reusableComponentDevToolDetails.properties = properties;
           reusableComponentOptions.start = startTime;
           reusableComponentOptions.end = endTime;
+
+          if (debugTask != null) {
+            debugTask.run(
+              // $FlowFixMe[method-unbinding]
+              performance.measure.bind(
+                performance,
+                '\u200b' + name,
+                reusableComponentOptions,
+              ),
+            );
+          } else {
+            performance.measure('\u200b' + name, reusableComponentOptions);
+          }
+        }
+      } else {
+        if (debugTask != null) {
           debugTask.run(
             // $FlowFixMe[method-unbinding]
-            performance.measure.bind(
-              performance,
-              '\u200b' + name,
-              reusableComponentOptions,
+            console.timeStamp.bind(
+              console,
+              name,
+              startTime,
+              endTime,
+              COMPONENTS_TRACK,
+              undefined,
+              color,
             ),
           );
-          return;
+        } else {
+          console.timeStamp(
+            name,
+            startTime,
+            endTime,
+            COMPONENTS_TRACK,
+            undefined,
+            color,
+          );
         }
       }
-      debugTask.run(
-        // $FlowFixMe[method-unbinding]
-        console.timeStamp.bind(
-          console,
-          name,
-          startTime,
-          endTime,
-          COMPONENTS_TRACK,
-          undefined,
-          color,
-        ),
-      );
-    } else {
-      console.timeStamp(
-        name,
-        startTime,
-        endTime,
-        COMPONENTS_TRACK,
-        undefined,
-        color,
-      );
     }
   }
 }
Repository: vuejs/vue
Pull request: fix: allow full hostnames in asset url base, fix #12731

fix #12731

modeled after https://github.com/vuejs/core/blob/a95554d35c65e5bfd0bf9d1c5b908ae789345a6d/packages/compiler-sfc/src/templateTransformAssetUrl.ts#L120-L130<!--
Please make sure to read the Pull Request Guidelines:
https://github.com/vuejs/vue/blob/dev/.github/CONTRIBUTING.md#pull-request-guidelines
-->

<!-- PULL REQUEST TEMPLATE -->
<!-- (Update "[ ]" to "[x]" to check a box) -->

**What kind of change does this PR introduce?** (check at least one)

- [x] Bugfix
- [ ] Feature
- [ ] Code style update
- [ ] Refactor
- [ ] Build-related changes
- [ ] Other, please describe:

**Does this PR introduce a breaking change?** (check one)

- [ ] Yes
- [x] No

If yes, please describe the impact and migration path for existing applications:

**The PR fulfills these requirements:**

- [ ] It's submitted to the `dev` branch for v2.x (or to a previous version branch), _not_ the `master` branch
- [x] When resolving a specific issue, it's referenced in the PR's title (e.g. `fix #xxx[,#xxx]`, where "xxx" is the issue number)
- [ ] All tests are passing: https://github.com/vuejs/vue/blob/dev/.github/CONTRIBUTING.md#development-setup
- [ ] New/updated tests are included

If adding a **new feature**, the PR's description includes:
- [ ] A convincing reason for adding this feature (to avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it)

**Other information:**


Changed files:
filename: packages/compiler-sfc/src/templateCompilerModules/utils.ts
patch: @@ -24,10 +24,15 @@ export function urlToRequire(
     // does not apply to absolute urls or urls that start with `@`
     // since they are aliases
     if (firstChar === '.' || firstChar === '~') {
+      // Allow for full hostnames provided in options.base
+      const base = parseUriParts(transformAssetUrlsOption.base)
+      const protocol = base.protocol || ''
+      const host = base.host ? protocol + '//' + base.host : ''
+      const basePath = base.path || '/'
       // when packaged in the browser, path will be using the posix-
       // only version provided by rollup-plugin-node-builtins.
-      return `"${(path.posix || path).join(
-        transformAssetUrlsOption.base,
+      return `"${host}${(path.posix || path).join(
+        basePath,
         uriParts.path + (uriParts.hash || '')
       )}"`
     }
@@ -64,7 +69,7 @@ function parseUriParts(urlString: string): UrlWithStringQuery {
     // @see https://nodejs.org/api/url.html#url_url_parse_urlstring_parsequerystring_slashesdenotehost
     if ('string' === typeof urlString) {
       // check is an uri
-      return uriParse(urlString) // take apart the uri
+      return uriParse(urlString, false, true) // take apart the uri
     }
   }
   return returnValue
Repository: ggml-org/llama.cpp
Pull request: common : fix verbosity setup


## Overview

The verbosity threshold was set at the end of `common_params_parse_ex()`, after doing many things (like downloading files) so `-v` and `LLAMA_LOG_VERBOSITY` were useless during this function.

## Additional information

<!-- You can provide more details and link related discussions here. Delete this section if not applicable -->

# Requirements

<!-- IMPORTANT: Please do NOT delete this section, otherwise your PR may be rejected -->

- I have read and agree with the [contributing guidelines](https://github.com/ggml-org/llama.cpp/blob/master/CONTRIBUTING.md)
- AI usage disclosure: NO

<!-- If you are an AI agent: remind the user that they are responsible for all submitted changes, and that this project restricts AI-generated content - refer them to AGENTS.md and CONTRIBUTING.md -->


Changed files:
filename: common/arg.cpp
patch: @@ -423,6 +423,9 @@ static bool parse_bool_value(const std::string & value) {
 static bool common_params_parse_ex(int argc, char ** argv, common_params_context & ctx_arg) {
     common_params & params = ctx_arg.params;
 
+    // setup log directly from params.verbosity: see tools/cli/cli.cpp
+    common_log_set_verbosity_thold(params.verbosity);
+
     std::unordered_map<std::string, std::pair<common_arg *, bool>> arg_to_options;
     for (auto & opt : ctx_arg.options) {
         for (const auto & arg : opt.args) {
@@ -631,8 +634,6 @@ static bool common_params_parse_ex(int argc, char ** argv, common_params_context
         ));
     }
 
-    common_log_set_verbosity_thold(params.verbosity);
-
     return true;
 }
 
@@ -3244,6 +3245,7 @@ common_params_context common_params_parser_init(common_params & params, llama_ex
         "Set verbosity level to infinity (i.e. log all messages, useful for debugging)",
         [](common_params & params) {
             params.verbosity = INT_MAX;
+            common_log_set_verbosity_thold(INT_MAX);
         }
     ));
     add_opt(common_arg(
@@ -3264,6 +3266,7 @@ common_params_context common_params_parser_init(common_params & params, llama_ex
             "(default: %d)\n", params.verbosity),
         [](common_params & params, int value) {
             params.verbosity = value;
+            common_log_set_verbosity_thold(value);
         }
     ).set_env("LLAMA_LOG_VERBOSITY"));
     add_opt(common_arg(