helloadhavan/github_issues huggingface dataset:
Repository: ollama/ollama
Pull request: fix nil deref in auth.go

`server/auth.go` uses `makeRequest` with `nil` `registryOptions` so `registryOptions.CheckRedirect` will dereference `nil` and panic

Changed files:
filename: server/auth.go
patch: @@ -67,7 +67,7 @@ func getAuthorizationToken(ctx context.Context, challenge registryChallenge) (st
 
 	headers.Add("Authorization", signature)
 
-	response, err := makeRequest(ctx, http.MethodGet, redirectURL, headers, nil, nil)
+	response, err := makeRequest(ctx, http.MethodGet, redirectURL, headers, nil, &registryOptions{})
 	if err != nil {
 		return "", err
 	}

filename: server/upload.go
patch: @@ -254,7 +254,7 @@ func (b *blobUpload) uploadPart(ctx context.Context, method string, requestURL *
 
 		// retry uploading to the redirect URL
 		for try := range maxRetries {
-			err = b.uploadPart(ctx, http.MethodPut, redirectURL, part, nil)
+			err = b.uploadPart(ctx, http.MethodPut, redirectURL, part, &registryOptions{})
 			switch {
 			case errors.Is(err, context.Canceled):
 				return err
Repository: facebook/react
Pull request: Turn off enableYieldingBeforePassive in internal test renderers

https://github.com/facebook/react/pull/31785 turned on `enableYieldingBeforePassive` for the internal test renderer builds. We have some failing tests on the RN side blocking the sync so lets turn these off for now.

Changed files:
filename: packages/shared/forks/ReactFeatureFlags.test-renderer.native-fb.js
patch: @@ -68,7 +68,7 @@ export const enableFabricCompleteRootInCommitPhase = false;
 export const enableSiblingPrerendering = true;
 export const enableUseResourceEffectHook = true;
 export const enableHydrationLaneScheduling = true;
-export const enableYieldingBeforePassive = true;
+export const enableYieldingBeforePassive = false;
 
 // Flow magic to verify the exports of this file match the original version.
 ((((null: any): ExportsType): FeatureFlagsType): ExportsType);

filename: packages/shared/forks/ReactFeatureFlags.test-renderer.www.js
patch: @@ -82,7 +82,7 @@ export const enableUseResourceEffectHook = false;
 
 export const enableHydrationLaneScheduling = true;
 
-export const enableYieldingBeforePassive = true;
+export const enableYieldingBeforePassive = false;
 
 // Flow magic to verify the exports of this file match the original version.
 ((((null: any): ExportsType): FeatureFlagsType): ExportsType);
Repository: nodejs/node
Pull request: build: use call command when calling python

<!--
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.
-->
When running .\vcbuild.bat in PowerShell the file is stopping execution after calling ``python configure %configure_flags%`` even if python configure exits with a status of 0. Because the commands after ``python configure %configure_flags%`` are never called you don't finish building and thus never get a out or release folder with node.exe in it.
I am currently developing on Windows 10 and it looks like using ``call python configure %configure_flags%`` allows batch to continue after the python subroutine is finished 

Changed files:
filename: vcbuild.bat
patch: @@ -353,7 +353,7 @@ del .gyp_configure_stamp 2> NUL
 @rem Generate the VS project.
 echo configure %configure_flags%
 echo %configure_flags%> .used_configure_flags
-python configure %configure_flags%
+call python configure %configure_flags%
 if errorlevel 1 goto create-msvs-files-failed
 if not exist node.sln goto create-msvs-files-failed
 set project_generated=1
Repository: vuejs/vue
Pull request: support short prop declaration as prop: true

Vue 1 support this form of prop declaration:
`props: {
  someProp: true
}`
[https://jsfiddle.net/89a15uby/](https://jsfiddle.net/89a15uby/)
Vue 2 throw an error `Right-hand side of 'instanceof' is not an object`
[https://jsfiddle.net/jbovp90x/](https://jsfiddle.net/jbovp90x/)


Changed files:
filename: src/core/util/props.js
patch: @@ -91,7 +91,7 @@ function assertProp (
     return
   }
   let type = prop.type
-  let valid = !type
+  let valid = !type || type === true
   const expectedTypes = []
   if (type) {
     if (!Array.isArray(type)) {

filename: test/unit/features/options/props.spec.js
patch: @@ -244,6 +244,19 @@ describe('Options props', () => {
       expect(console.error.calls.count()).toBe(2)
       expect('Expected Boolean').toHaveBeenWarned()
     })
+
+    it('optional prop of any type (type: true or prop: true)', () => {
+      makeInstance(1, true)
+      expect(console.error.calls.count()).toBe(0)
+      makeInstance('any', true)
+      expect(console.error.calls.count()).toBe(0)
+      makeInstance({}, true)
+      expect(console.error.calls.count()).toBe(0)
+      makeInstance(undefined, true)
+      expect(console.error.calls.count()).toBe(0)
+      makeInstance(null, true)
+      expect(console.error.calls.count()).toBe(0)
+    })
   })
 
   it('should warn data fields already defined as a prop', () => {
Repository: ollama/ollama
Pull request: Update api.md


Changed files:
filename: docs/api.md
patch: @@ -418,6 +418,7 @@ Generate the next message in a chat with a provided model. This is a streaming e
 
 - `model`: (required) the [model name](#model-names)
 - `messages`: the messages of the chat, this can be used to keep a chat memory
+- `tools`: tools for the model to use if supported. Requires `stream` to be set to `false`
 
 The `message` object has the following fields:
 
@@ -432,7 +433,6 @@ Advanced parameters (optional):
 - `options`: additional model parameters listed in the documentation for the [Modelfile](./modelfile.md#valid-parameters-and-values) such as `temperature`
 - `stream`: if `false` the response will be returned as a single response object, rather than a stream of objects
 - `keep_alive`: controls how long the model will stay loaded into memory following the request (default: `5m`)
-- `tools`: external tools the model can use. Not all models support this feature.
 
 ### Examples
 
@@ -1286,4 +1286,4 @@ curl http://localhost:11434/api/embeddings -d '{
     0.8785552978515625, -0.34576427936553955, 0.5742510557174683, -0.04222835972905159, -0.137906014919281
   ]
 }
-```
\ No newline at end of file
+```
Repository: vuejs/vue
Pull request: Expose all types via index.d.ts

This patch allows us to import vue's types easier.
We can just import them like `import { ComponentOptions } from 'vue'`.

This is also useful for some plugin creators to use vue's types on their declarations.


Changed files:
filename: types/index.d.ts
patch: @@ -1,6 +1,33 @@
 import {Vue as _Vue} from "./vue";
+import * as Options from "./options";
+import * as Plugin from "./plugin";
+import * as VNode from "./vnode";
+
 // `Vue` in `export = Vue` must be a namespace
-declare namespace Vue {}
+// All available types are exported via this namespace
+declare namespace Vue {
+  export type ComponentOptions = Options.ComponentOptions;
+  export type FunctionalComponentOptions = Options.FunctionalComponentOptions;
+  export type RenderContext = Options.RenderContext;
+  export type PropOptions = Options.PropOptions;
+  export type ComputedOptions = Options.ComputedOptions;
+  export type WatchHandler = Options.WatchHandler;
+  export type WatchOptions = Options.WatchOptions;
+  export type DirectiveFunction = Options.DirectiveFunction;
+  export type DirectiveOptions = Options.DirectiveOptions;
+
+  export type PluginFunction<T> = Plugin.PluginFunction<T>;
+  export type PluginObject<T> = Plugin.PluginObject<T>;
+
+  export type VNodeChildren = VNode.VNodeChildren;
+  export type VNodeChildrenArrayContents = VNode.VNodeChildrenArrayContents;
+  export type VNode = VNode.VNode;
+  export type VNodeComponentOptions = VNode.VNodeComponentOptions;
+  export type VNodeData = VNode.VNodeData;
+  export type VNodeDirective = VNode.VNodeDirective;
+}
+
 // TS cannot merge imported class with namespace, declare a subclass to bypass
 declare class Vue extends _Vue {}
+
 export = Vue;

filename: types/test/options-test.ts
patch: @@ -1,5 +1,5 @@
 import Vue = require("../index");
-import { ComponentOptions, FunctionalComponentOptions } from "../options";
+import { ComponentOptions, FunctionalComponentOptions } from "../index";
 
 interface Component extends Vue {
   a: number;

filename: types/test/plugin-test.ts
patch: @@ -1,5 +1,5 @@
 import Vue = require("../index");
-import { PluginFunction, PluginObject } from "../plugin";
+import { PluginFunction, PluginObject } from "../index";
 
 class Option {
   prefix: string;
Repository: huggingface/transformers
Pull request: fix ipex+fp32 jit trace model inference error in ipex 1.13

error show like: “Currently the auto_kernel_selection does not support the grad mode! Please add torch.no_grad() before the inference runtime..” since jit mode only work in inference mode, it's safe to add such logic.


Fixes # (issue)


## Before submitting
- [ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
- [ ] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#start-contributing-pull-requests),
      Pull Request section?
- [ ] Was this discussed/approved via a Github issue or the [forum](https://discuss.huggingface.co/)? Please add a link
      to it if that's the case.
- [ ] Did you make sure to update the documentation with your changes? Here are the
      [documentation guidelines](https://github.com/huggingface/transformers/tree/main/docs), and
      [here are tips on formatting docstrings](https://github.com/huggingface/transformers/tree/main/docs#writing-source-documentation).
- [ ] Did you write any new necessary tests?


## Who can review?
- trainer: @sgugger



Changed files:
filename: src/transformers/trainer.py
patch: @@ -1305,8 +1305,9 @@ def torch_jit_model_eval(self, model, dataloader, training=False):
                         jit_inputs = tuple(jit_inputs)
                         jit_model = torch.jit.trace(jit_model, jit_inputs, strict=False)
                 jit_model = torch.jit.freeze(jit_model)
-                jit_model(**example_batch)
-                jit_model(**example_batch)
+                with torch.no_grad():
+                    jit_model(**example_batch)
+                    jit_model(**example_batch)
                 model = jit_model
                 self.use_cpu_amp = False
                 self.use_cuda_amp = False
Repository: vuejs/vue
Pull request: Update package.json

For TypeScript and Typings


Changed files:
filename: package.json
patch: @@ -3,11 +3,17 @@
   "version": "2.0.0-rc.4",
   "description": "Reactive, component-oriented view layer for modern web interfaces.",
   "main": "dist/vue.common.js",
+  "typings": "index.d.ts",
   "files": [
     "dist/vue.common.js",
     "dist/vue.js",
     "dist/vue.min.js",
-    "src"
+    "src",
+    "types/index.d.ts",
+    "types/options.d.ts",
+    "types/plugin.d.ts",
+    "types/vnode.d.ts",
+    "types/vue.d.ts"
   ],
   "scripts": {
     "dev": "TARGET=web-standalone-dev rollup -w -c build/config.js",
Repository: electron/electron
Pull request: perf: avoid a little extra work in `InvokeIpcCallback()`

#### Description of Change

Avoid a little extra work in `InvokeIpcCallback()`:

1. Allocate the `node::CallbackScope` on the stack instead of the heap by using `std::optional` instead of `std::unique_ptr`.
2. Skip a redundant call to  `node::Environment::GetCurrent()` by passing `env` to the callback scope's constructor

CC @codebytere, @deepak1556 

#### 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/renderer/electron_ipc_native.cc
patch: @@ -4,6 +4,8 @@
 
 #include "electron/shell/renderer/electron_ipc_native.h"
 
+#include <optional>
+
 #include "base/trace_event/trace_event.h"
 #include "shell/common/gin_converters/blink_converter.h"
 #include "shell/common/gin_converters/value_converter.h"
@@ -45,10 +47,9 @@ void InvokeIpcCallback(v8::Isolate* const isolate,
 
   // Only set up the node::CallbackScope if there's a node environment.
   // Sandboxed renderers don't have a node environment.
-  std::unique_ptr<node::CallbackScope> callback_scope;
-  if (node::Environment::GetCurrent(context)) {
-    callback_scope = std::make_unique<node::CallbackScope>(
-        isolate, ipcNative, node::async_context{0, 0});
+  std::optional<node::CallbackScope> callback_scope;
+  if (auto* env = node::Environment::GetCurrent(context)) {
+    callback_scope.emplace(env, ipcNative, node::async_context{0, 0});
   }
 
   auto callback_key = gin::ConvertToV8(isolate, callback_name)
Repository: facebook/react
Pull request: [ci] getWorkflowRun should not throw early if workflow hasn't completed


We already have handling and retry logic for in-flight workflows in `downloadArtifactsFromGitHub`, so there's no need to exit early if we find a workflow for a given commit but it hasn't finished yet.


Changed files:
filename: scripts/release/shared-commands/download-build-artifacts.js
patch: @@ -43,12 +43,7 @@ async function getWorkflowRun(commit) {
   );
 
   const json = JSON.parse(res.stdout);
-  const workflowRun = json.workflow_runs.find(
-    run =>
-      run.head_sha === commit &&
-      run.status === 'completed' &&
-      run.conclusion === 'success'
-  );
+  const workflowRun = json.workflow_runs.find(run => run.head_sha === commit);
 
   if (workflowRun == null || workflowRun.id == null) {
     console.log(
Repository: nodejs/node
Pull request: src: -Wmismatched-new-delete in debug_utils.cc

Refs https://github.com/nodejs/node/pull/57738

Fixes the following:

```
Error: ../../third_party/electron_node/src/debug_utils.cc(491,11): error: 'delete' applied to a pointer that was allocated with 'new[]'; did you mean 'delete[]'? [-Werror,-Wmismatched-new-delete]
  491 |           delete str;
      |           ^
      |                 []
../../third_party/electron_node/src/debug_utils.cc(487,23): note: allocated with 'new[]' here
  487 |           char* str = new char[size];
      |                       ^
1 error generated.
```
<!--
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.
-->


Changed files:
filename: src/debug_utils.cc
patch: @@ -488,7 +488,7 @@ std::vector<std::string> NativeSymbolDebuggingContext::GetLoadedLibraries() {
           WideCharToMultiByte(
               CP_UTF8, 0, module_name, -1, str, size, nullptr, nullptr);
           list.emplace_back(str);
-          delete str;
+          delete[] str;
         }
       }
     }
Repository: ggml-org/llama.cpp
Pull request: [SYCL] use malloc to support both iGPU and dGPU in same time

Fix the issue: https://github.com/ggml-org/llama.cpp/issues/9241.

The host_buffer is used to create the copy of memory on devices.
The original code use the malloc_host() which bind with queue/devices.
When copy the memory from another device which has different context of malloc_host, the memcpy() is forbidden:
    SYCL need both queues' context are same when copy memory between devices. 
    It's same for the memory created by malloc_host().

In the issue case, two dGPU belong to different context, the malloc_host() will be executed on the queue of second GPU.
When set the -ngl 48 (total 49), during load model, the tensor of first GPU will be copied to host_buffer based on queue of second GPU. It will trigger the error of L0.

To support iGPU+dGPU, we can't resolve it by add both GPUs' queue to same context. (iGPU and dGPU are different family and can't belong to same context).

So, we use the malloc() to replace the malloc_host() to support more multiple GPUs cases.

It won't impact the performance.


Changed files:
filename: ggml/src/ggml-sycl/ggml-sycl.cpp
patch: @@ -1157,13 +1157,28 @@ static const char * ggml_backend_sycl_host_buffer_type_name(ggml_backend_buffer_
     GGML_UNUSED(buft);
 }
 
+inline void * aligned_malloc_host(size_t alignment, size_t size) {
+#ifdef _WIN32
+    return _aligned_malloc(size, alignment);
+#else
+    return aligned_alloc(alignment, size);
+#endif
+}
+
+inline void free_aligned_mem_host(void * memblock) {
+#ifdef _WIN32
+    _aligned_free(memblock);
+#else
+    free(memblock);
+#endif
+}
+
 static void ggml_backend_sycl_host_buffer_free_buffer(ggml_backend_buffer_t buffer) {
-    ggml_sycl_host_free(buffer->context);
+    free_aligned_mem_host((void *)buffer->context);
 }
 
 static ggml_backend_buffer_t ggml_backend_sycl_host_buffer_type_alloc_buffer(ggml_backend_buffer_type_t buft, size_t size) {
-    void * ptr = ggml_sycl_host_malloc(size);
-
+    void * ptr = aligned_malloc_host(TENSOR_ALIGNMENT, size);
     if (ptr == nullptr) {
         // fallback to cpu buffer
         return ggml_backend_buft_alloc_buffer(ggml_backend_cpu_buffer_type(), size);
Repository: vuejs/vue
Pull request: fix typo


Changed files:
filename: packages/vue-template-compiler/README.md
patch: @@ -32,7 +32,7 @@ Note the returned function code uses `with` and thus cannot be used in strict mo
 
 #### Options
 
-It's possible to hook into the compilation process to support custom template features. **However, beware that by injecting custom compile-time modules, your templates will not work with other build tools built on standard built-in modules, e.g `vue-laoder` and `vueify`.**
+It's possible to hook into the compilation process to support custom template features. **However, beware that by injecting custom compile-time modules, your templates will not work with other build tools built on standard built-in modules, e.g `vue-loader` and `vueify`.**
 
 The optional `options` object can contain the following:
Repository: vercel/next.js
Pull request: [test] Increase response timeout in `next.browserWithResponse()`

The `next.browserWithResponse()` test helper is currently only used in the `fallback-shells` test suite, which frequently times out after 10 seconds in CI, because the initial compilation for the first request can take quite a while when there's resource contention. Increasing the timeout to 30 seconds should help mitigate these issues. We could also consider removing the timeout entirely. Playwright also doesn't use a timeout per default for the `page.goto()` method, which we use for `next.browser()` and `next.browserWithResponse()` under the hood.

Changed files:
filename: test/e2e/app-dir/fallback-shells/fallback-shells.test.ts
patch: @@ -19,7 +19,7 @@ describe('fallback-shells', () => {
       }
 
       // If we didn't use the fallback shell, then we didn't postpone the
-      // response and therefore shouldn't have sent the postponed header.
+      // response, and therefore shouldn't have sent the postponed header.
       expect(headers['x-nextjs-postponed']).not.toBe('1')
     })
   })

filename: test/lib/next-modes/base.ts
patch: @@ -784,7 +784,7 @@ export class NextInstance {
     const responsePromise = new Promise<Response>((resolve, reject) => {
       const timer = setTimeout(() => {
         reject(`Timed out waiting for the response of ${url}`)
-      }, 10_000)
+      }, 30_000)
 
       resolveResponse = (response: Response) => {
         clearTimeout(timer)