helloadhavan/github_issues huggingface dataset:
Repository: denoland/deno
Pull request: fix: don't invoke `Proxy` getter trap on `console.log`

Proxy traps should never be invoked on `console.log()`. This PR aligns Deno's behaviour with other runtimes like Chrome, Firefox and Node. This fixes the linked issue where it wasn't possible to call `console.log()` on vite's module graph without an error being thrown.

Fixes https://github.com/denoland/deno/issues/30229


Changed files:
filename: ext/console/01_console.js
patch: @@ -634,7 +634,10 @@ function formatRaw(ctx, value, recurseTimes, typedArray, proxyDetails) {
     protoProps = undefined;
   }
 
-  let tag = value[SymbolToStringTag];
+  let tag;
+  if (!proxyDetails) {
+    tag = value[SymbolToStringTag];
+  }
   // Only list the tag in case it's non-enumerable / not an own property.
   // Otherwise we'd print this twice.
   if (

filename: tests/unit/console_test.ts
patch: @@ -2177,7 +2177,7 @@ Deno.test(function inspectProxy() {
         },
       }),
     )),
-    `Object [MyProxy] { prop1: 5, prop2: 5 }`,
+    `{ prop1: 5, prop2: 5 }`,
   );
   assertEquals(
     stripAnsiCode(Deno.inspect(
@@ -2217,6 +2217,18 @@ Deno.test(function inspectProxy() {
     )),
     "Proxy [ [Function: fn], { get: [Function: get] } ]",
   );
+
+  // Issue: https://github.com/denoland/deno/issues/30229
+  assertEquals(
+    stripAnsiCode(Deno.inspect(
+      new Proxy({}, {
+        get() {
+          throw new Error("fail");
+        },
+      }),
+    )),
+    "{}",
+  );
 });
 
 Deno.test(function inspectError() {
Repository: nodejs/node
Pull request: src: adding #include <cstdint> to worker_inspector. h for gcc v15

Added `cstdint` to `worker_inspector.h `as on new version of gcc
(v15) the build was failing due to changes to **libstdc++** and
the removal of transitive includes. Build then now fails due to
the usage of uint64_t in worker_inspector.h.
**Output of build:**
`../../src/inspector/worker_inspector.h:63:7: **error: ‘uint64_t’ has not been declared**
   63 |       uint64_t thread_id, const std::string& url, const std::string& name) {
      |       ^~~~~~~~

../../src/inspector/worker_inspector.h:12:1: note: ‘uint64_t’ is defined in header ‘<cstdint>’; this is probably fixable by adding ‘#include <cstdint>’
   11 | #include <unordered_set>
  +++ |+#include <cstdint>`

Fixes: https://github.com/nodejs/node/issues/56731


Changed files:
filename: src/inspector/worker_inspector.h
patch: @@ -5,6 +5,7 @@
 #error("This header can only be used when inspector is enabled")
 #endif
 
+#include <cstdint>
 #include <memory>
 #include <string>
 #include <unordered_map>
Repository: electron/electron
Pull request: perf: avoid redundant map lookups in `GetStorageMask()`

Backport of #46315

See that PR for details.


Notes: none.

Changed files:
filename: shell/browser/api/electron_api_session.cc
patch: @@ -13,6 +13,7 @@
 
 #include "base/command_line.h"
 #include "base/containers/fixed_flat_map.h"
+#include "base/containers/map_util.h"
 #include "base/files/file_enumerator.h"
 #include "base/files/file_path.h"
 #include "base/files/file_util.h"
@@ -139,9 +140,8 @@ uint32_t GetStorageMask(const std::vector<std::string>& storage_types) {
 
   uint32_t storage_mask = 0;
   for (const auto& it : storage_types) {
-    auto type = base::ToLowerASCII(it);
-    if (Lookup.contains(type))
-      storage_mask |= Lookup.at(type);
+    if (const uint32_t* val = base::FindOrNull(Lookup, base::ToLowerASCII(it)))
+      storage_mask |= *val;
   }
   return storage_mask;
 }
@@ -179,9 +179,8 @@ BrowsingDataRemover::DataType GetDataTypeMask(
     const std::vector<std::string>& data_types) {
   BrowsingDataRemover::DataType mask = 0u;
   for (const auto& type : data_types) {
-    if (kDataTypeLookup.contains(type)) {
-      mask |= kDataTypeLookup.at(type);
-    }
+    if (const auto* val = base::FindOrNull(kDataTypeLookup, type))
+      mask |= *val;
   }
   return mask;
 }
Repository: facebook/react
Pull request: fix[devtools/tree/element]: onClick -> onMouseDown to handle first click correctly

There is a weird behaviour in all shells of RDT: when user opens `Components` tab and scrolls down a tree (without any prior click or focus event), and then clicks on some element, the `click` event will not be fired. Because `click` event hasn't been fired, the `focus` event is fired for the whole list and we pre-select the first (root) element in the tree:
https://github.com/facebook/react/blob/034130c02ffb47b0026059b57d17e9b080976ff3/packages/react-devtools-shared/src/devtools/views/Components/Tree.js#L217-L226

Check the demo (before) what is happening. I don't know exactly why `click` event is not fired there, but it only happens:
1. For elements, which were not previously rendered (for virtualization purposes).
2. When HTML-element (div), which represents the container for the tree was not focused previously.

Unlike the `click` event, the `mousedown` event is fired consistently.

### Before

https://github.com/facebook/react/assets/28902667/9f3ad75d-55d0-4c99-b2d0-ead63a120ea0

### After


https://github.com/facebook/react/assets/28902667/e34816be-644c-444c-8e32-562a79494e44


Tested that it works in all shells, including the select / deselect features (with `metaKey` param in event).

Changed files:
filename: packages/react-devtools-inline/__tests__/__e2e__/devtools-utils.js
patch: @@ -37,7 +37,10 @@ async function selectElement(page, displayName, waitForOwnersText) {
       createTestNameSelector('ComponentTreeListItem'),
       createTextSelector(listItemText),
     ])[0];
-    listItem.click();
+
+    listItem.dispatchEvent(
+      new MouseEvent('mousedown', {bubbles: true, cancelable: true})
+    );
   }, displayName);
 
   if (waitForOwnersText) {

filename: packages/react-devtools-shared/src/devtools/views/Components/Element.js
patch: @@ -142,7 +142,7 @@ export default function Element({data, index, style}: Props): React.Node {
       className={className}
       onMouseEnter={handleMouseEnter}
       onMouseLeave={handleMouseLeave}
-      onClick={handleClick}
+      onMouseDown={handleClick}
       onDoubleClick={handleDoubleClick}
       style={style}
       data-testname="ComponentTreeListItem"
Repository: denoland/deno
Pull request: fix(ext/node): validate `fd` is integer on `fsync` and `fdatasync`

Also addresses `prefer-primordials` lint rule. This allows [parallel/test-fs-fsync.js](https://github.com/denoland/node_test/blob/8846b5392f4ebd3d4e995b9bed61c23c0192d806/test/parallel/test-fs-fsync.js) test to pass.

Towards #29972, #24236.


Changed files:
filename: ext/node/polyfills/_fs/_fs_fdatasync.ts
patch: @@ -1,24 +1,28 @@
 // Copyright 2018-2025 the Deno authors. MIT license.
 
-// TODO(petamoriken): enable prefer-primordials for node polyfills
-// deno-lint-ignore-file prefer-primordials
-
 import { CallbackWithError } from "ext:deno_node/_fs/_fs_common.ts";
 import { FsFile } from "ext:deno_fs/30_fs.js";
 import { promisify } from "ext:deno_node/internal/util.mjs";
+import { validateInt32 } from "ext:deno_node/internal/validators.mjs";
+import { primordials } from "ext:core/mod.js";
+
+const { PromisePrototypeThen, SymbolFor } = primordials;
 
 export function fdatasync(
   fd: number,
   callback: CallbackWithError,
 ) {
-  new FsFile(fd, Symbol.for("Deno.internal.FsFile")).syncData().then(
+  validateInt32(fd, "fd", 0);
+  PromisePrototypeThen(
+    new FsFile(fd, SymbolFor("Deno.internal.FsFile")).syncData(),
     () => callback(null),
     callback,
   );
 }
 
 export function fdatasyncSync(fd: number) {
-  new FsFile(fd, Symbol.for("Deno.internal.FsFile")).syncDataSync();
+  validateInt32(fd, "fd", 0);
+  new FsFile(fd, SymbolFor("Deno.internal.FsFile")).syncDataSync();
 }
 
 export const fdatasyncPromise = promisify(fdatasync) as (

filename: ext/node/polyfills/_fs/_fs_fsync.ts
patch: @@ -1,24 +1,28 @@
 // Copyright 2018-2025 the Deno authors. MIT license.
 
-// TODO(petamoriken): enable prefer-primordials for node polyfills
-// deno-lint-ignore-file prefer-primordials
-
 import { CallbackWithError } from "ext:deno_node/_fs/_fs_common.ts";
 import { FsFile } from "ext:deno_fs/30_fs.js";
 import { promisify } from "ext:deno_node/internal/util.mjs";
+import { validateInt32 } from "ext:deno_node/internal/validators.mjs";
+import { primordials } from "ext:core/mod.js";
+
+const { PromisePrototypeThen, SymbolFor } = primordials;
 
 export function fsync(
   fd: number,
   callback: CallbackWithError,
 ) {
-  new FsFile(fd, Symbol.for("Deno.internal.FsFile")).sync().then(
+  validateInt32(fd, "fd", 0);
+  PromisePrototypeThen(
+    new FsFile(fd, SymbolFor("Deno.internal.FsFile")).sync(),
     () => callback(null),
     callback,
   );
 }
 
 export function fsyncSync(fd: number) {
-  new FsFile(fd, Symbol.for("Deno.internal.FsFile")).syncSync();
+  validateInt32(fd, "fd", 0);
+  new FsFile(fd, SymbolFor("Deno.internal.FsFile")).syncSync();
 }
 
 export const fsyncPromise = promisify(fsync) as (fd: number) => Promise<void>;

filename: tests/node_compat/config.toml
patch: @@ -427,6 +427,7 @@
 "parallel/test-fs-exists.js" = {}
 "parallel/test-fs-existssync-false.js" = {}
 "parallel/test-fs-fchown.js" = {}
+"parallel/test-fs-fsync.js" = {}
 "parallel/test-fs-link.js" = { flaky = true }
 "parallel/test-fs-long-path.js" = {}
 "parallel/test-fs-promises-exists.js" = {}
Repository: ollama/ollama
Pull request: log prediction failures

this will help track down #241 

Changed files:
filename: server/routes.go
patch: @@ -129,6 +129,7 @@ func GenerateHandler(c *gin.Context) {
 		}
 
 		if err := activeSession.llm.Predict(req.Context, prompt, fn); err != nil {
+			log.Printf("llm.Predict failed with %s", err)
 			ch <- gin.H{"error": err.Error()}
 		}
 	}()
@@ -345,11 +346,13 @@ func streamResponse(c *gin.Context, ch chan any) {
 
 		bts, err := json.Marshal(val)
 		if err != nil {
+			log.Printf("streamResponse: json.Marshal failed with %s", err)
 			return false
 		}
 
 		bts = append(bts, '\n')
 		if _, err := w.Write(bts); err != nil {
+			log.Printf("streamResponse: w.Write failed with %s", err)
 			return false
 		}
Repository: huggingface/transformers
Pull request: Fix QuantoQuantizedCache import issues

Revert some changes from #39797 to fix QuantoQuantizedCache.

cc @Cyrilvallez 

Fixes #40099

Changed files:
filename: src/transformers/cache_utils.py
patch: @@ -16,9 +16,6 @@
 )
 
 
-if _is_quanto_greater_than_0_2_5 := is_quanto_greater("0.2.5", accept_dev=True):
-    from optimum.quanto import MaxOptimizer, qint2, qint4, quantize_weight
-
 if is_hqq_available():
     from hqq.core.quantize import Quantizer as HQQQuantizer
 
@@ -558,7 +555,7 @@ def __init__(
         q_group_size: int = 64,
         residual_length: int = 128,
     ):
-        super().__init__(self)
+        super().__init__()
         self.nbits = nbits
         self.axis_key = axis_key
         self.axis_value = axis_value
@@ -635,10 +632,12 @@ def __init__(
             residual_length=residual_length,
         )
 
-        if not _is_quanto_greater_than_0_2_5:
+        # We need to import quanto here to avoid circular imports due to optimum/quanto/models/transformers_models.py
+        if is_quanto_greater("0.2.5", accept_dev=True):
+            from optimum.quanto import MaxOptimizer, qint2, qint4
+        else:
             raise ImportError(
                 "You need optimum-quanto package version to be greater or equal than 0.2.5 to use `QuantoQuantizedCache`. "
-                "Detected version {optimum_quanto_version}."
             )
 
         if self.nbits not in [2, 4]:
@@ -656,6 +655,8 @@ def __init__(
         self.optimizer = MaxOptimizer()  # hardcode as it's the only one for per-channel quantization
 
     def _quantize(self, tensor, axis):
+        from optimum.quanto import quantize_weight
+
         scale, zeropoint = self.optimizer(tensor, self.qtype, axis, self.q_group_size)
         qtensor = quantize_weight(tensor, self.qtype, axis, scale, zeropoint, self.q_group_size)
         return qtensor

filename: src/transformers/utils/import_utils.py
patch: @@ -1286,7 +1286,7 @@ def is_quanto_greater(library_version: str, accept_dev: bool = False):
     given version. If `accept_dev` is True, it will also accept development versions (e.g. 2.7.0.dev20250320 matches
     2.7.0).
     """
-    if not _is_package_available("optimum-quanto"):
+    if not _is_package_available("optimum.quanto"):
         return False
 
     if accept_dev:
Repository: nodejs/node
Pull request: watch: reload env file for --env-file-if-exists

While using watch mode with --env-file-if-exists, reload env correctly

ref: https://github.com/nodejs/node/issues/49148#issuecomment-2585886195

Changed files:
filename: lib/internal/main/watch_mode.js
patch: @@ -33,7 +33,7 @@ markBootstrapComplete();
 // TODO(MoLow): Make kill signal configurable
 const kKillSignal = 'SIGTERM';
 const kShouldFilterModules = getOptionValue('--watch-path').length === 0;
-const kEnvFile = getOptionValue('--env-file');
+const kEnvFile = getOptionValue('--env-file') || getOptionValue('--env-file-if-exists');
 const kWatchedPaths = ArrayPrototypeMap(getOptionValue('--watch-path'), (path) => resolve(path));
 const kPreserveOutput = getOptionValue('--watch-preserve-output');
 const kCommand = ArrayPrototypeSlice(process.argv, 1);

filename: test/sequential/test-watch-mode.mjs
patch: @@ -242,6 +242,32 @@ describe('watch mode', { concurrency: !process.env.TEST_PARALLEL, timeout: 60_00
     }
   });
 
+  it('should load new env variables when --env-file-if-exists changes', async () => {
+    const envKey = `TEST_ENV_${Date.now()}`;
+    const envKey2 = `TEST_ENV_2_${Date.now()}`;
+    const jsFile = createTmpFile(`console.log('ENV: ' + process.env.${envKey} + '\\n' + 'ENV2: ' + process.env.${envKey2});`);
+    const envFile = createTmpFile(`${envKey}=value1`, '.env');
+    const { done, restart } = runInBackground({ args: ['--watch', `--env-file-if-exists=${envFile}`, jsFile] });
+
+    try {
+      await restart();
+      writeFileSync(envFile, `${envKey}=value1\n${envKey2}=newValue`);
+
+      // Second restart, after env change
+      const { stderr, stdout } = await restart();
+
+      assert.strictEqual(stderr, '');
+      assert.deepStrictEqual(stdout, [
+        `Restarting ${inspect(jsFile)}`,
+        'ENV: value1',
+        'ENV2: newValue',
+        `Completed running ${inspect(jsFile)}`,
+      ]);
+    } finally {
+      await done();
+    }
+  });
+
   it('should watch changes to a failing file', async () => {
     const file = createTmpFile('throw new Error("fails");');
     const { stderr, stdout } = await runWriteSucceed({
Repository: electron/electron
Pull request: perf: avoid redundant map lookups in `GetStorageMask()`

#### Description of Change

I'm getting close to the end of these double-map-lookup PRs, but here are two fixes.

This one removes double lookups in `GetStorageMask()` and `GetDataTypeMask()`.

#### Checklist

- [x] PR description included and stakeholders cc'd
- [x] `npm test` passes
- [x] [PR release notes](https://github.com/electron/clerk/blob/main/README.md) describe the change in a way relevant to app developers, and are [capitalized, punctuated, and past tense](https://github.com/electron/clerk/blob/main/README.md#examples).

#### Release Notes

Notes: none.

Changed files:
filename: shell/browser/api/electron_api_session.cc
patch: @@ -13,6 +13,7 @@
 
 #include "base/command_line.h"
 #include "base/containers/fixed_flat_map.h"
+#include "base/containers/map_util.h"
 #include "base/files/file_enumerator.h"
 #include "base/files/file_path.h"
 #include "base/files/file_util.h"
@@ -139,9 +140,8 @@ uint32_t GetStorageMask(const std::vector<std::string>& storage_types) {
 
   uint32_t storage_mask = 0;
   for (const auto& it : storage_types) {
-    auto type = base::ToLowerASCII(it);
-    if (Lookup.contains(type))
-      storage_mask |= Lookup.at(type);
+    if (const uint32_t* val = base::FindOrNull(Lookup, base::ToLowerASCII(it)))
+      storage_mask |= *val;
   }
   return storage_mask;
 }
@@ -179,9 +179,8 @@ BrowsingDataRemover::DataType GetDataTypeMask(
     const std::vector<std::string>& data_types) {
   BrowsingDataRemover::DataType mask = 0u;
   for (const auto& type : data_types) {
-    if (kDataTypeLookup.contains(type)) {
-      mask |= kDataTypeLookup.at(type);
-    }
+    if (const auto* val = base::FindOrNull(kDataTypeLookup, type))
+      mask |= *val;
   }
   return mask;
 }
Repository: ggml-org/llama.cpp
Pull request: cuda : avoid initializing unused devices

Remove an unnecessary call to `cudaSetDevice` during initialization. Calling this function will initialize the CUDA runtime for the device and allocate resources that may not be necessary if the device is not actually used.

Fixes #16509

Changed files:
filename: ggml/src/ggml-cuda/ggml-cuda.cu
patch: @@ -3867,7 +3867,6 @@ ggml_backend_reg_t ggml_backend_cuda_reg() {
                 dev_ctx->device = i;
                 dev_ctx->name = GGML_CUDA_NAME + std::to_string(i);
 
-                ggml_cuda_set_device(i);
                 cudaDeviceProp prop;
                 CUDA_CHECK(cudaGetDeviceProperties(&prop, i));
                 dev_ctx->description = prop.name;
Repository: ollama/ollama
Pull request: allow multiline text using three double-quotes

This change will allow you to start a multi-line string using three double quotes. It looks something like:
```
>>> """What
... do you think
... about multi-line
... strings?
... """
```
To use a multi-line string, you have to begin the sentence with the three double quotes. To end it, you just have to put the three double quotes at the end of a line (or on a line by itself).

Changed files:
filename: cmd/cmd.go
patch: @@ -358,6 +358,9 @@ func generateInteractive(cmd *cobra.Command, model string) error {
 	}
 	defer scanner.Close()
 
+	var multiLineBuffer string
+	var isMultiLine bool
+
 	for {
 		line, err := scanner.Readline()
 		switch {
@@ -376,6 +379,22 @@ func generateInteractive(cmd *cobra.Command, model string) error {
 		line = strings.TrimSpace(line)
 
 		switch {
+		case isMultiLine:
+			if strings.HasSuffix(line, `"""`) {
+				isMultiLine = false
+				multiLineBuffer += strings.TrimSuffix(line, `"""`)
+				line = multiLineBuffer
+				multiLineBuffer = ""
+				scanner.SetPrompt(">>> ")
+			} else {
+				multiLineBuffer += line + " "
+				continue
+			}
+		case strings.HasPrefix(line, `"""`):
+			isMultiLine = true
+			multiLineBuffer = strings.TrimPrefix(line, `"""`) + " "
+			scanner.SetPrompt("... ")
+			continue
 		case strings.HasPrefix(line, "/list"):
 			args := strings.Fields(line)
 			if err := ListHandler(cmd, args[1:]); err != nil {
Repository: ollama/ollama
Pull request: check os.Walk err


Changed files:
filename: server/images.go
patch: @@ -591,6 +591,10 @@ func DeleteModel(name string) error {
 		return nil
 	})
 
+	if err != nil {
+		return err
+	}
+
 	// only delete the files which are still in the deleteMap
 	for k, v := range deleteMap {
 		if v {
Repository: ggml-org/llama.cpp
Pull request: fix: convert_hf_to_gguf - change Jamba non-sentencepiece mode (tokeni…

The JambaModel implementation at `convert_hf_to_gguf.py` was incorrectly constructing its vocab using the gpt-2 tokenizer logic when no SentencePiece model was present (i.e., tokenizer.json path). Jamba actually uses a llama tokenizer, not gpt-2.

This change updates the vocab build path to use the correct llama tokenizer for non-SentencePiece Jamba models. Also includes several small adjustments within the Jamba llama based tokenizer construction.

No changes are expected for other model types.

**Testing**
Verified with local conversion of Jamba GGUF model (tokenizer.json mode) and confirmed generated vocab matches the llama tokenizer layout. SentencePiece mode GGUF was also verified and it remains unaffected.

Changed files:
filename: convert_hf_to_gguf.py
patch: @@ -5966,20 +5966,12 @@ def modify_tensors(self, data_torch: Tensor, name: str, bid: int | None) -> Iter
 class JambaModel(TextModel):
     model_arch = gguf.MODEL_ARCH.JAMBA
 
-    def get_vocab_base_pre(self, tokenizer) -> str:
-        del tokenizer  # unused
-
-        return "gpt-2"
-
     def set_vocab(self):
         if (self.dir_model / "tokenizer.model").is_file():
-            # Using Jamba's tokenizer.json causes errors on model load
-            # (something about "byte not found in vocab"),
-            # but there's a working tokenizer.model
             self._set_vocab_sentencepiece()
         else:
-            # Some Jamba models only have a tokenizer.json, which works.
-            self._set_vocab_gpt2()
+            self._set_vocab_llama_hf()
+            self.gguf_writer.add_add_space_prefix(False)
 
     def set_gguf_parameters(self):
         d_model = self.find_hparam(["hidden_size", "mamba_d_model"])
Repository: vercel/next.js
Pull request: fix: swc tracing

regression introduced in https://github.com/vercel/next.js/pull/67166/files#diff-907b7be0cfc75bd37773e5ebc38d1deffa40861b8ac1cde92e4992e284a1ee59R1324

<!-- Thanks for opening a PR! Your contribution is much appreciated.
To make sure your PR is handled as smoothly as possible we request that you follow the checklist sections below.
Choose the right checklist for the change(s) that you're making:

## For Contributors

### Improving Documentation

- Run `pnpm prettier-fix` to fix formatting issues before opening the PR.
- Read the Docs Contribution Guide to ensure your contribution follows the docs guidelines: https://nextjs.org/docs/community/contribution-guide

### Adding or Updating Examples

- The "examples guidelines" are followed from our contributing doc https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md
- Make sure the linting passes by running `pnpm build && pnpm lint`. See https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md

### Fixing a bug

- Related issues linked using `fixes #number`
- Tests added. See: https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs
- Errors have a helpful link attached, see https://github.com/vercel/next.js/blob/canary/contributing.md

### Adding a feature

- Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. (A discussion must be opened, see https://github.com/vercel/next.js/discussions/new?category=ideas)
- Related issues/discussions are linked using `fixes #number`
- e2e tests added (https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs)
- Documentation added
- Telemetry added. In case of a feature if it's used or not.
- Errors have a helpful link attached, see https://github.com/vercel/next.js/blob/canary/contributing.md


## For Maintainers

- Minimal description (aim for explaining to someone not on the team to understand the PR)
- When linking to a Slack thread, you might want to share details of the conclusion
- Link both the Linear (Fixes NEXT-xxx) and the GitHub issues
- Add review comments if necessary to explain to the reviewer the logic behind a change

### What?

### Why?

### How?

Closes NEXT-
Fixes #

-->


Changed files:
filename: packages/next/src/build/swc/index.ts
patch: @@ -1532,7 +1532,7 @@ export function getBinaryMetadata() {
  *
  */
 export function initCustomTraceSubscriber(traceFileName?: string) {
-  if (swcTraceFlushGuard) {
+  if (!swcTraceFlushGuard) {
     // Wasm binary doesn't support trace emission
     let bindings = loadNative()
     swcTraceFlushGuard = bindings.initCustomTraceSubscriber?.(traceFileName)
Repository: huggingface/transformers
Pull request: changed xLSTMRMSNorm to RMSNorm

xLSTMRMSNorm doesn't exist and hence gives an ImportError, without it users can't test NX-AI/xLSTM-7b.

cc @Cyrilvallez

Changed files:
filename: src/transformers/models/xlstm/modeling_xlstm.py
patch: @@ -29,9 +29,9 @@
 
 
 if is_xlstm_available():
+    from xlstm.xlstm_large.model import RMSNorm as xLSTMRMSNorm
     from xlstm.xlstm_large.model import mLSTMBlock as xLSTMBlock
     from xlstm.xlstm_large.model import mLSTMStateType, soft_cap
-    from xlstm.xlstm_large.model import xLSTMRMSNorm as xLSTMRMSNorm
 
     external_xlstm = True
 else: