helloadhavan/github_issues huggingface dataset:
Repository: vercel/next.js
Pull request: Fix no-double-tailwind-execution flake

https://github.com/vercel/next.js/runs/56466402435

wait for the `patchFile` revert operation to finish before asserting

```
FAIL webpack test/e2e/app-dir/no-double-tailwind-execution/no-double-tailwind-execution.test.ts (31.136 s)
  no-double-tailwind-execution
    ✕ should run tailwind only once initially and per change (20280 ms)

  ● no-double-tailwind-execution › should run tailwind only once initially and per change

    expect(received).toBe(expected) // Object.is equality

    Expected: 3
    Received: 2

      48 |     ].length
      49 |     if (isNextDev) {
    > 50 |       expect(tailwindProcessingCount).toBe(3) // dev: initial + hmr + hmr (revert)
         |                                       ^
      51 |     } else {
      52 |       expect(tailwindProcessingCount).toBe(1) // build
      53 |     }

      at Object.toBe (e2e/app-dir/no-double-tailwind-execution/no-double-tailwind-execution.test.ts:50:39)
```

Changed files:
filename: test/e2e/app-dir/no-double-tailwind-execution/no-double-tailwind-execution.test.ts
patch: @@ -23,33 +23,37 @@ describe('no-double-tailwind-execution', () => {
     const browser = await next.browser('/')
     expect(await browser.elementByCss('p').text()).toBe('hello world')
 
+    function getTailwindProcessingCount() {
+      return [
+        ...next.cliOutput.matchAll(
+          /\[@tailwindcss\/postcss\] app\/globals.css/g
+        ),
+      ].length
+    }
+
+    expect(getTailwindProcessingCount()).toBe(1) // initial
+
     if (isNextDev) {
-      const filePath = 'app/page.tsx'
-      const origContent = await next.readFile(filePath)
-      let getOutput = next.getCliOutputFromHere()
       await next.patchFile(
-        filePath,
-        origContent.replace('hello world', 'hello hmr'),
+        'app/page.tsx',
+        (content) => content.replace('hello world', 'hello hmr'),
         async () => {
           await retry(async () => {
             expect(await browser.elementByCss('p').text()).toBe('hello hmr')
-            let tailwindProcessingCount = [
-              ...getOutput().matchAll(
-                /\[@tailwindcss\/postcss\] app\/globals.css/g
-              ),
-            ].length
-            expect(tailwindProcessingCount).toBe(1)
+            expect(getTailwindProcessingCount()).toBe(2) // dev: initial + hmr
           })
         }
       )
+      // Wait for the patchFile revert to get processed
+      await retry(async () => {
+        expect(await browser.elementByCss('p').text()).toBe('hello world')
+      })
     }
-    let tailwindProcessingCount = [
-      ...next.cliOutput.matchAll(/\[@tailwindcss\/postcss\] app\/globals.css/g),
-    ].length
+
     if (isNextDev) {
-      expect(tailwindProcessingCount).toBe(3) // dev: initial + hmr + hmr (revert)
+      expect(getTailwindProcessingCount()).toBe(3) // dev: initial + hmr + hmr (revert)
     } else {
-      expect(tailwindProcessingCount).toBe(1) // build
+      expect(getTailwindProcessingCount()).toBe(1) // build
     }
   })
 })
Repository: electron/electron
Pull request: fix: logical bug in install.js env var handling

Backport of #48634

See that PR for details.


Notes: Fixed an error when checking environmental variables when using remote checksums when installing Electron via npm.

Changed files:
filename: npm/install.js
patch: @@ -44,7 +44,7 @@ downloadArtifact({
   artifactName: 'electron',
   force: process.env.force_no_cache === 'true',
   cacheRoot: process.env.electron_config_cache,
-  checksums: process.env.electron_use_remote_checksums ?? process.env.npm_config_electron_use_remote_checksums ? undefined : require('./checksums.json'),
+  checksums: (process.env.electron_use_remote_checksums || process.env.npm_config_electron_use_remote_checksums) ? undefined : require('./checksums.json'),
   platform,
   arch
 }).then(extractFile).catch(err => {
Repository: vuejs/vue
Pull request: Remove warnings about inline value attributes for v-model

This commit aims to close #4733, for the reason explained there.

Changed files:
filename: src/platforms/web/compiler/directives/model.js
patch: @@ -159,23 +159,6 @@ function genDefaultModel (
   value: string,
   modifiers: ?ASTModifiers
 ): ?boolean {
-  if (process.env.NODE_ENV !== 'production') {
-    if (el.tag === 'input' && el.attrsMap.value) {
-      warn(
-        `<${el.tag} v-model="${value}" value="${el.attrsMap.value}">:\n` +
-        'inline value attributes will be ignored when using v-model. ' +
-        'Declare initial values in the component\'s data option instead.'
-      )
-    }
-    if (el.tag === 'textarea' && el.children.length) {
-      warn(
-        `<textarea v-model="${value}">:\n` +
-        'inline content inside <textarea> will be ignored when using v-model. ' +
-        'Declare initial values in the component\'s data option instead.'
-      )
-    }
-  }
-
   const type = el.attrsMap.type
   const { lazy, number, trim } = modifiers || {}
   const event = lazy || (isIE && type === 'range') ? 'change' : 'input'

filename: test/unit/features/directives/model-text.spec.js
patch: @@ -204,30 +204,6 @@ describe('Directive v-model text', () => {
     })
   }
 
-  it('warn inline value attribute', () => {
-    const vm = new Vue({
-      data: {
-        test: 'foo'
-      },
-      template: '<input v-model="test" value="bar">'
-    }).$mount()
-    expect(vm.test).toBe('foo')
-    expect(vm.$el.value).toBe('foo')
-    expect('inline value attributes will be ignored').toHaveBeenWarned()
-  })
-
-  it('warn textarea inline content', function () {
-    const vm = new Vue({
-      data: {
-        test: 'foo'
-      },
-      template: '<textarea v-model="test">bar</textarea>'
-    }).$mount()
-    expect(vm.test).toBe('foo')
-    expect(vm.$el.value).toBe('foo')
-    expect('inline content inside <textarea> will be ignored').toHaveBeenWarned()
-  })
-
   it('warn invalid tag', () => {
     new Vue({
       data: {
Repository: ggml-org/llama.cpp
Pull request: tests: reduce number of FA test permutations

Only test non-F16 for head size 64 and 72 (one a multiple of QK, one not).


Changed files:
filename: tests/test-backend-ops.cpp
patch: @@ -8231,6 +8231,7 @@ static std::vector<std::unique_ptr<test_case>> make_test_cases_eval() {
                                                 for (ggml_prec prec : {GGML_PREC_F32, GGML_PREC_DEFAULT}) {
                                                     if (hsk != 128 && prec == GGML_PREC_DEFAULT) continue;
                                                     for (ggml_type type_KV : {GGML_TYPE_F32, GGML_TYPE_F16, GGML_TYPE_BF16, GGML_TYPE_Q8_0, GGML_TYPE_Q4_0}) {
+                                                        if (type_KV != GGML_TYPE_F16 && hsk != 64 && hsk != 72) continue;
                                                         test_cases.emplace_back(new test_flash_attn_ext(
                                                                     hsk, hsv, nh, {nr2, nr3}, kv, nb, mask, sinks, max_bias, logit_softcap, prec, type_KV));
                                                         // run fewer test cases permuted
Repository: ollama/ollama
Pull request: doc: fixed spelling error

Changed "dorrect" to "correct".

Changed files:
filename: CONTRIBUTING.md
patch: @@ -18,7 +18,7 @@ See the [development documentation](./docs/development.md) for instructions on h
 
 * New features: new features (e.g. API fields, environment variables) add surface area to Ollama and make it harder to maintain in the long run as they cannot be removed without potentially breaking users in the future.
 * Refactoring: large code improvements are important, but can be harder or take longer to review and merge.
-* Documentation: small updates to fill in or dorrect missing documentation is helpful, however large documentation additions can be hard to maintain over time.
+* Documentation: small updates to fill in or correct missing documentation is helpful, however large documentation additions can be hard to maintain over time.
 
 ### Issues that may not be accepted
Repository: facebook/react
Pull request: [devtools] Introduce REACT_DEVTOOLS_PORT for the standalone react-devtools

## Summary

This PR attempts to make running the React DevTools a little friendlier in projects that are not completely React. 

At the moment, running the DevTools with `npx react-devtools` will default to the port to use the `PORT` env variable otherwise it'll fall back to `8097`. `PORT` is a common env variable, so we can get into this strange situation where the a Rails server (eg Puma) is using `PORT`, and then the React DevTools attempts to boot using the same `PORT`.

This PR introduces a dedicated env variable, `REACT_DEVTOOLS_PORT` to assist in this scenario.

## How did you test this change?

I'm using fish shell, so I did the following, please let me know if there's a better way:

```sh
cd packages/react-devtools
set -x PORT 1000
set -x REACT_DEVTOOLS_PORT 2000
node bin.js
```

We can see in the UI that it's listening on `2000`. Without this PR, it'd listen on `1000`:

![Screenshot 2024-08-21 at 10 45 42 AM](https://github.com/user-attachments/assets/a5c7590c-1b54-4ac8-9a8b-8eb66ff67cfb)

Changed files:
filename: packages/react-devtools/README.md
patch: @@ -87,7 +87,7 @@ This will ensure the developer tools are connected. **Don’t forget to remove i
 
 ## Advanced
 
-By default DevTools listen to port `8097` on `localhost`. If you need to customize host, port, or other settings, see the `react-devtools-core` package instead.
+By default DevTools listen to port `8097` on `localhost`. The port can be modified by setting the `REACT_DEVTOOLS_PORT` environment variable. If you need to further customize host, port, or other settings, see the `react-devtools-core` package instead.
 
 ## FAQ
 

filename: packages/react-devtools/preload.js
patch: @@ -35,7 +35,7 @@ contextBridge.exposeInMainWorld('api', {
     }
     const host = process.env.HOST || 'localhost';
     const protocol = useHttps ? 'https' : 'http';
-    const port = +process.env.PORT || 8097;
+    const port = +process.env.REACT_DEVTOOLS_PORT || +process.env.PORT || 8097;
     return {options, useHttps, host, protocol, port};
   },
 });
Repository: ollama/ollama
Pull request: Update README.md with PyOllaMx

Based on [this comment](https://github.com/ollama/ollama/issues/5937#issuecomment-2327760726), creating this PR to add PyOllaMx to list of ollama based applications

Changed files:
filename: README.md
patch: @@ -306,7 +306,8 @@ See the [API documentation](./docs/api.md) for all endpoints.
 - [Go-CREW](https://www.jonathanhecl.com/go-crew/) (Powerful Offline RAG in Golang)
 - [PartCAD](https://github.com/openvmp/partcad/) (CAD model generation with OpenSCAD and CadQuery)
 - [Ollama4j Web UI](https://github.com/ollama4j/ollama4j-web-ui) - Java-based Web UI for Ollama built with Vaadin, Spring Boot and Ollama4j
-
+- [PyOllaMx](https://github.com/kspviswa/pyOllaMx) - macOS application capable of chatting with both Ollama and Apple MLX models.
+  
 ### Terminal
 
 - [oterm](https://github.com/ggozad/oterm)
Repository: huggingface/transformers
Pull request: TP + EP + MoE disclaimer


Changed files:
filename: MIGRATION_GUIDE_V5.md
patch: @@ -317,8 +317,18 @@ labels = tokenizer(text_target=tgt_texts, ...)
 ## Disclaimers for the RC0
 
 ### PEFT + MoE:
+
 Because we are switching from the naive MOE (`nn.ModuleList` for experts) we currently have an issue with MoEs that have adapters. For more details see https://github.com/huggingface/transformers/issues/42491#issuecomment-3591485649. 
 
+_We aim for this to be fixed and released in a following release candidate in the week that follows RC0._
+
+### Tensor parallel and Expert parallel + MoE
+
+We are streamlining the MoE support with vLLM; while this is being implemented, tensor parallelism and expert parallelism aren't working as expected.
+This is known and actively being worked on.
+
+_We aim for this to be fixed and released in a following release candidate in the week that follows RC0._
+
 ### Custom pretrained models:
 For anyone inheriting from a `transformers` `PreTrainedModel`, the weights are automatically initialized with the common scheme: 
 ```python
Repository: huggingface/transformers
Pull request: Add afmoe to models __init__.py


Changed files:
filename: src/transformers/models/__init__.py
patch: @@ -18,6 +18,7 @@
 
 
 if TYPE_CHECKING:
+    from .afmoe import *
     from .aimv2 import *
     from .albert import *
     from .align import *
Repository: vuejs/vue
Pull request: Preserve the only whitespace child in pre (fix #4758)

fix #4758 

Changed files:
filename: src/compiler/parser/index.js
patch: @@ -197,7 +197,7 @@ export function parse (
       // remove trailing whitespace
       const element = stack[stack.length - 1]
       const lastNode = element.children[element.children.length - 1]
-      if (lastNode && lastNode.type === 3 && lastNode.text === ' ') {
+      if (lastNode && lastNode.type === 3 && lastNode.text === ' ' && !inPre) {
         element.children.pop()
       }
       // pop stack
@@ -242,7 +242,7 @@ export function parse (
             expression,
             text
           })
-        } else if (text !== ' ' || children[children.length - 1].text !== ' ') {
+        } else if (text !== ' ' || !children.length || children[children.length - 1].text !== ' ') {
           currentParent.children.push({
             type: 3,
             text

filename: test/unit/modules/compiler/parser.spec.js
patch: @@ -481,12 +481,16 @@ describe('parser', () => {
 
   it('preserve whitespace in <pre> tag', function () {
     const options = extend({}, baseOptions)
-    const ast = parse('<pre><code>  \n<span>hi</span>\n  </code></pre>', options)
+    const ast = parse('<pre><code>  \n<span>hi</span>\n  </code><span> </span></pre>', options)
     const code = ast.children[0]
     expect(code.children[0].type).toBe(3)
     expect(code.children[0].text).toBe('  \n')
     expect(code.children[2].type).toBe(3)
     expect(code.children[2].text).toBe('\n  ')
+
+    const span = ast.children[1]
+    expect(span.children[0].type).toBe(3)
+    expect(span.children[0].text).toBe(' ')
   })
 
   it('forgivingly handle < in plain text', () => {
Repository: ggml-org/llama.cpp
Pull request: common : add common_speculative_is_compat()

fix #19267

Memory modules that do not support removing the last tokens from the context (such as recurrent modules) cannot perform speculative decoding. Add new `common_speculative_is_compat()` to query this functionality and use it in `llama-server` to disable speculative decoding for those contexts.

Changed files:
filename: common/speculative.cpp
patch: @@ -805,6 +805,42 @@ enum common_speculative_type common_speculative_type_from_name(const std::string
     return it->second;
 }
 
+bool common_speculative_is_compat(llama_context * ctx_tgt) {
+    auto * mem = llama_get_memory(ctx_tgt);
+    if (mem == nullptr) {
+        return false;
+    }
+
+    bool res = true;
+
+    llama_memory_clear(mem, true);
+
+    // eval 2 tokens to check if the context is compatible
+    std::vector<llama_token> tmp;
+    tmp.push_back(0);
+    tmp.push_back(0);
+
+    int ret = llama_decode(ctx_tgt, llama_batch_get_one(tmp.data(), tmp.size()));
+    if (ret != 0) {
+        LOG_ERR("%s: llama_decode() failed: %d\n", __func__, ret);
+        res = false;
+        goto done;
+    }
+
+    // try to remove the last tokens
+    if (!llama_memory_seq_rm(mem, 0, 1, -1)) {
+        LOG_WRN("%s: the target context does not support partial sequence removal\n", __func__);
+        res = false;
+        goto done;
+    }
+
+done:
+    llama_memory_clear(mem, true);
+    llama_synchronize(ctx_tgt);
+
+    return res;
+}
+
 // initialization of the speculative decoding system
 //
 common_speculative * common_speculative_init(

filename: common/speculative.h
patch: @@ -14,6 +14,10 @@ enum common_speculative_type common_speculative_type_from_name(const std::string
 // convert type to string
 std::string common_speculative_type_to_str(enum common_speculative_type type);
 
+// check if the llama_context is compatible for speculative decoding
+// note: clears the memory of the context
+bool common_speculative_is_compat(llama_context * ctx_tgt);
+
 common_speculative * common_speculative_init(
         common_params_speculative & params,
         llama_context             * ctx_tgt);

filename: tools/server/server-context.cpp
patch: @@ -740,6 +740,11 @@ struct server_context_impl {
 
         slots.clear();
 
+        const bool can_spec = common_speculative_is_compat(ctx);
+        if (!can_spec) {
+            SRV_WRN("%s", "speculative decoding not supported by this context\n");
+        }
+
         // initialize slots
         for (int i = 0; i < params_base.n_parallel; i++) {
             server_slot slot;
@@ -752,7 +757,7 @@ struct server_context_impl {
             slot.prompt.tokens.has_mtmd = mctx != nullptr;
 
             // try speculative decoding
-            {
+            if (can_spec) {
                 slot.spec = common_speculative_init(params_base.speculative, slot.ctx);
                 if (slot.spec) {
                     if (mctx) {
Repository: electron/electron
Pull request: fix: logical bug in install.js env var handling

#### Description of Change

If either `NPM_CONFIG_ELECTRON_USE_REMOTE_CHECKSUMS` or `ELECTRON_USE_REMOTE_CHECKSUMS` are set as environment variables, then force Electron to verify with remote checksums instead of embedded ones.

Fixes #48594.

Thanks to @KinshukSS2 for reporting this and suggesting a solution.

#### 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: Fixed an error when checking environmental variables when using remote checksums when installing Electron via npm.

Changed files:
filename: npm/install.js
patch: @@ -44,7 +44,7 @@ downloadArtifact({
   artifactName: 'electron',
   force: process.env.force_no_cache === 'true',
   cacheRoot: process.env.electron_config_cache,
-  checksums: process.env.electron_use_remote_checksums ?? process.env.npm_config_electron_use_remote_checksums ? undefined : require('./checksums.json'),
+  checksums: (process.env.electron_use_remote_checksums || process.env.npm_config_electron_use_remote_checksums) ? undefined : require('./checksums.json'),
   platform,
   arch
 }).then(extractFile).catch(err => {
Repository: ollama/ollama
Pull request: Use cuda v11 for driver 525 and older

It looks like driver 525 (aka, cuda driver 12.0) has problems with the cuda v12 library we compile against, so run v11 on those older drivers if detected.

Fixes #6556 

Changed files:
filename: gpu/cuda_common.go
patch: @@ -57,7 +57,7 @@ func cudaVariant(gpuInfo CudaGPUInfo) string {
 		}
 	}
 
-	if gpuInfo.computeMajor < 6 || gpuInfo.DriverMajor < 12 {
+	if gpuInfo.computeMajor < 6 || gpuInfo.DriverMajor < 12 || (gpuInfo.DriverMajor == 12 && gpuInfo.DriverMinor == 0) {
 		return "v11"
 	}
 	return "v12"
Repository: nodejs/node
Pull request: doc: highlight difference in module loading between ESM and CommonJS

<!--
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 PR updates the documentation to add a note clarifying the difference between ESM and CommonJS module behavior. 
fixes https://github.com/nodejs/node/issues/59686


Changed files:
filename: doc/api/esm.md
patch: @@ -332,6 +332,12 @@ syncBuiltinESMExports();
 fs.readFileSync === readFileSync;
 ```
 
+> When importing built-in modules, all the named exports (i.e. properties of the module exports object)
+> are populated even if they are not individually accessed.
+> This can make initial imports of built-in modules slightly slower compared to loading them with
+> `require()` or `process.getBuiltinModule()`, where the module exports object is evaluated immediately,
+> but some of its properties may only be initialized when first accessed individually.
+
 ## `import()` expressions
 
 [Dynamic `import()`][] provides an asynchronous way to import modules. It is
Repository: vuejs/vue
Pull request: fix(sfc): component contains '<' only

<!--
Please make sure to read the Pull Request Guidelines:
https://github.com/vuejs/vue/blob/dev/.github/CONTRIBUTING.md#pull-request-guidelines
-->

```vue
<template>
    <span><</span>
</template>
```

Vue will run into infinite loop with such component.
It's better to give some warning?

Changed files:
filename: src/compiler/parser/html-parser.js
patch: @@ -123,7 +123,7 @@ export function parseHTML (html, options) {
       }
 
       let text, rest, next
-      if (textEnd > 0) {
+      if (textEnd >= 0) {
         rest = html.slice(textEnd)
         while (
           !endTag.test(rest) &&

filename: test/unit/modules/sfc/sfc-parser.spec.js
patch: @@ -78,6 +78,15 @@ describe('Single File Component parser', () => {
     expect(res.template.content.trim()).toBe(`div\n  h1(v-if='1 < 2') hello`)
   })
 
+  it('should handle component contains "<" only', () => {
+    const res = parseComponent(`
+      <template>
+        <span><</span>
+      </template>
+    `)
+    expect(res.template.content.trim()).toBe(`<span><</span>`)
+  })
+
   it('should handle custom blocks without parsing them', () => {
     const res = parseComponent(`
       <template>