helloadhavan/github_issues huggingface dataset:
Repository: facebook/react
Pull request: Run stale job hourly

Run stale job hourly

The stale job is currently limited to 100 API operations per run to protect against API limits and processing of each stale issue / PR take multiple API calls (commenting, adding or removing tags, closing etc).

It seems like we could bump this up as we have more operations available, but the limit seems to be hourly. Instead, this makes the job run hourly, spreading the work.

After an initial wave of marking and closing stale issues, this should keep the labeling "current" according to the "90 day to stale" configuration.


Changed files:
filename: .github/workflows/stale.yml
patch: @@ -2,8 +2,8 @@
 name: 'Manage stale issues and PRs'
 on:
   schedule:
-    # Run daily at 2AM
-    - cron: '0 2 * * *'
+    # Run hourly
+    - cron: '0 * * * *'
 
 jobs:
   stale:
@@ -16,7 +16,7 @@ jobs:
           days-before-stale: 90
           # Number of days of inactivity before a stale issue or PR is closed
           days-before-close: 7
-          # Number of issues or PRs to process per day
+          # API calls per run
           operations-per-run: 100
 
           # --- Issues ---
@@ -43,4 +43,4 @@ jobs:
           close-pr-message: >
             Closing this pull request after a prolonged period of inactivity. If this issue is still present in the latest release, please ask for this pull request to be reopened. Thank you!
           # PRs with these labels will never be considered stale
-          exempt-pr-labels: "Partner,React Core Team,Resolution: Backlog,Type: Bug,Type: Discussion,Type: Needs Investigation,Type: Regression,Type: Feature Request,Type: Enhancement"
\ No newline at end of file
+          exempt-pr-labels: "Partner,React Core Team,Resolution: Backlog,Type: Bug,Type: Discussion,Type: Needs Investigation,Type: Regression,Type: Feature Request,Type: Enhancement"
Repository: facebook/react
Pull request: Soften useFormState warning

It's not deprecated, it's really just renamed. Let's make the warning less scary.

Changed files:
filename: packages/react-dom/src/__tests__/ReactDOMFizzServer-test.js
patch: @@ -104,7 +104,7 @@ describe('ReactDOMFizzServer', () => {
       console.error = (error, ...args) => {
         if (
           typeof error !== 'string' ||
-          error.indexOf('ReactDOM.useFormState has been deprecated') === -1
+          error.indexOf('ReactDOM.useFormState has been renamed') === -1
         ) {
           originalConsoleError(error, ...args);
         }

filename: packages/react-dom/src/__tests__/ReactDOMForm-test.js
patch: @@ -66,7 +66,7 @@ describe('ReactDOMForm', () => {
       console.error = (error, ...args) => {
         if (
           typeof error !== 'string' ||
-          error.indexOf('ReactDOM.useFormState has been deprecated') === -1
+          error.indexOf('ReactDOM.useFormState has been renamed') === -1
         ) {
           originalConsoleError(error, ...args);
         }

filename: packages/react-reconciler/src/ReactFiberHooks.js
patch: @@ -395,8 +395,8 @@ function warnOnUseFormStateInDev(): void {
       didWarnAboutUseFormState.add(componentName);
 
       console.error(
-        'ReactDOM.useFormState has been deprecated and replaced by ' +
-          'React.useActionState. Please update %s to use React.useActionState.',
+        'ReactDOM.useFormState has been renamed to React.useActionState. ' +
+          'Please update %s to use React.useActionState.',
         componentName,
       );
     }
Repository: denoland/deno
Pull request: fix(ext/fetch): mark unix and vsock proxy conns as proxy

This means that requests will have an absolute path specified.

<!--
Before submitting a PR, please read https://docs.deno.com/runtime/manual/references/contributing

1. Give the PR a descriptive title.

  Examples of good title:
    - fix(std/http): Fix race condition in server
    - docs(console): Update docstrings
    - feat(doc): Handle nested reexports

  Examples of bad title:
    - fix #7123
    - update docs
    - fix bugs

2. Ensure there is a related issue and it is referenced in the PR text.
3. Ensure there are tests that cover the changes.
4. Ensure `cargo test` passes.
5. Ensure `./tools/format.js` passes without changing files.
6. Ensure `./tools/lint.js` passes.
7. Open as a draft PR if your work is still in progress. The CI won't run
   all steps, but you can add '[ci]' to a commit message to force it to.
8. If you would like to run the benchmarks on the CI, add the 'ci-bench' label.
-->


Changed files:
filename: ext/fetch/proxy.rs
patch: @@ -925,13 +925,13 @@ where
         }
       }
       #[cfg(not(windows))]
-      Proxied::Unix(_) => Connected::new(),
+      Proxied::Unix(_) => Connected::new().proxy(true),
       #[cfg(any(
         target_os = "android",
         target_os = "linux",
         target_os = "macos"
       ))]
-      Proxied::Vsock(_) => Connected::new(),
+      Proxied::Vsock(_) => Connected::new().proxy(true),
     }
   }
 }

filename: tests/unit/fetch_test.ts
patch: @@ -2260,7 +2260,7 @@ Deno.test(
     const resp1 = await fetch("http://localhost/ping", { client });
     assertEquals(resp1.status, 200);
     assertEquals(resp1.headers.get("content-type"), "text/plain");
-    assertEquals(await resp1.text(), "http+unix://localhost/ping");
+    assertEquals(await resp1.text(), "http://localhost/ping");
 
     const resp2 = await fetch("http://localhost/not-found", { client });
     assertEquals(resp2.status, 404);
Repository: nodejs/node
Pull request: node-api: add warning for NAPI_EXPERIMENTAL

https://github.com/nodejs/abi-stable-node/issues/461

Changed files:
filename: src/js_native_api.h
patch: @@ -21,6 +21,18 @@
 #endif
 #endif
 
+#if defined(NAPI_EXPERIMENTAL) &&                                              \
+    !defined(NODE_API_EXPERIMENTAL_NO_WARNING) &&                              \
+    !defined(NODE_WANT_INTERNALS)
+#ifdef _MSC_VER
+#pragma message("NAPI_EXPERIMENTAL is enabled. "                               \
+                "Experimental features may be unstable.")
+#else
+#warning "NAPI_EXPERIMENTAL is enabled. " \
+       "Experimental features may be unstable."
+#endif
+#endif
+
 #include "js_native_api_types.h"
 
 // If you need __declspec(dllimport), either include <node_api.h> instead, or
Repository: facebook/react
Pull request: [DOM] Fix package.json files for #28784

Missed some files for the react-server disallow client change in #28784

Changed files:
filename: packages/react-dom/package.json
patch: @@ -25,23 +25,28 @@
   "files": [
     "LICENSE",
     "README.md",
-    "index.js",
     "client.js",
+    "client.react-server.js",
+    "index.js",
     "profiling.js",
-    "server.js",
+    "profiling.react-server.js",
+    "react-dom.react-server.js",
+    "server-rendering-stub.js",
     "server.browser.js",
+    "server.bun.js",
     "server.edge.js",
+    "server.js",
     "server.node.js",
-    "server.bun.js",
-    "static.js",
+    "server.react-server.js",
     "static.browser.js",
     "static.edge.js",
+    "static.js",
     "static.node.js",
-    "server-rendering-stub.js",
+    "static.react-server.js",
     "test-utils.js",
     "unstable_testing.js",
+    "unstable_testing.react-server.js",
     "unstable_server-external-runtime.js",
-    "react-dom.react-server.js",
     "cjs/",
     "umd/"
   ],
Repository: ggml-org/llama.cpp
Pull request: [bug fix] initialise buffer.device in ggml_hexagon_session

It seems `buffer_type.device` and `repack_buffer_type.device` remains uninitialised.

This causes an sporadic crash at `ggml_backend_dev_get_props(dev, &props);` at `llama-model.cpp:6184`.

I believe `ggml_hexagon_session` should always be initialised with the device it corresponds to?

The original code works fine when ran via the cli, however, the crash becomes apparent when bundled into a consumer facing APK.

This fix is tested to fix this issue (running from packaged APK, S25+ Ultra)

Changed files:
filename: ggml/src/ggml-hexagon/ggml-hexagon.cpp
patch: @@ -211,7 +211,7 @@ static inline void hex_format_op_names(char * str, const struct ggml_tensor * t)
 // ** backend sessions
 
 struct ggml_hexagon_session {
-    ggml_hexagon_session(int dev_id) noexcept(false);
+    ggml_hexagon_session(int dev_id, ggml_backend_dev_t dev) noexcept(false);
     ~ggml_hexagon_session() noexcept(true);
 
     void allocate(int dev_id) noexcept(false);
@@ -1631,10 +1631,13 @@ void ggml_hexagon_session::release() noexcept(true) {
     }
 }
 
-ggml_hexagon_session::ggml_hexagon_session(int dev_id) noexcept(false) {
+ggml_hexagon_session::ggml_hexagon_session(int dev_id, ggml_backend_dev_t dev) noexcept(false) {
     buffer_type.context        = nullptr;
     repack_buffer_type.context = nullptr;
 
+    buffer_type.device         = dev;
+    repack_buffer_type.device  = dev;
+
     try {
         allocate(dev_id);
 
@@ -3628,7 +3631,7 @@ ggml_hexagon_registry::ggml_hexagon_registry(ggml_backend_reg_t reg) {
         devices[i].iface   = ggml_backend_hexagon_device_i;
         devices[i].reg     = reg;
         try {
-            devices[i].context = new ggml_hexagon_session(i);
+            devices[i].context = new ggml_hexagon_session(i, &devices[i]);
         } catch (std::exception const &exc) {
             GGML_LOG_ERROR("ggml-hex: failed to create device/session %zu\n", i);
             devices[i].context = nullptr;
Repository: huggingface/transformers
Pull request: fix(example): align parameter names with the latest function definition for gdino

# What does this PR do?

fix function parameter with the latest function implementation

<!--
Congratulations! You've made it this far! You're not quite done yet though.

Once merged, your PR is going to appear in the release notes with the title you set, so make sure it's a great title that fully reflects the extent of your awesome contribution.

Then, please replace this with a description of the change and which issue is fixed (if applicable). Please also include relevant motivation and context. List any dependencies (if any) that are required for this change.

Once you're done, someone will review your PR shortly (see the section "Who can review?" below to tag some potential reviewers). They may suggest changes to make the code even better. If no one reviewed your PR after a week has passed, don't hesitate to post a new comment @-mentioning the same persons---sometimes notifications get lost.
-->


## Before submitting
- [x] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
- [x] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#create-a-pull-request),
      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?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.

<!-- Your PR will be replied to more quickly if you can figure out the right person to tag with @

 If you know how to use git blame, that is the easiest way, otherwise, here is a rough guide of **who to tag**.
 Please tag fewer than 3 people.

Models:
- vision models: @amyeroberts, @qubvel

Library:

- generate: @zucchini-nlp (visual-language models) or @gante (all others)

Documentation: @stevhliu

 -->


Changed files:
filename: docs/source/en/model_doc/grounding-dino.md
patch: @@ -70,7 +70,7 @@ Here's how to use the model for zero-shot object detection:
 >>> results = processor.post_process_grounded_object_detection(
 ...     outputs,
 ...     inputs.input_ids,
-...     box_threshold=0.4,
+...     threshold=0.4,
 ...     text_threshold=0.3,
 ...     target_sizes=[image.size[::-1]]
 ... )
Repository: facebook/react
Pull request: [Float] treat `props.async` in Float consistent with the rest of react-dom

Treat async (boolean prop) consistently with Float. Previously float checked if `props.async === true` (or not true) but the rest of react-dom considers anything truthy that isn't a function or symbol as `true`. This PR normalizes the Float behavior.

Changed files:
filename: packages/react-dom-bindings/src/client/ReactFiberConfigDOM.js
patch: @@ -2417,9 +2417,15 @@ export function getResource(
       return null;
     }
     case 'script': {
-      if (typeof pendingProps.src === 'string' && pendingProps.async === true) {
-        const scriptProps: ScriptProps = pendingProps;
-        const key = getScriptKey(scriptProps.src);
+      const async = pendingProps.async;
+      const src = pendingProps.src;
+      if (
+        typeof src === 'string' &&
+        async &&
+        typeof async !== 'function' &&
+        typeof async !== 'symbol'
+      ) {
+        const key = getScriptKey(src);
         const scripts = getResourcesFromRoot(resourceRoot).hoistableScripts;
 
         let resource = scripts.get(key);
@@ -3065,16 +3071,20 @@ export function isHostHoistableType(
       }
     }
     case 'script': {
+      const isAsync =
+        props.async &&
+        typeof props.async !== 'function' &&
+        typeof props.async !== 'symbol';
       if (
-        props.async !== true ||
+        !isAsync ||
         props.onLoad ||
         props.onError ||
-        typeof props.src !== 'string' ||
-        !props.src
+        !props.src ||
+        typeof props.src !== 'string'
       ) {
         if (__DEV__) {
           if (outsideHostContainerContext) {
-            if (props.async !== true) {
+            if (!isAsync) {
               console.error(
                 'Cannot render a sync or defer <script> outside the main document without knowing its order.' +
                   ' Try adding async="" or moving it into the root <head> tag.',
Repository: vercel/next.js
Pull request: Route modules: Call setReferenceManifestsSingleton for app-route to match app-page

## What?

The changes in #82903 highlighted some failing tests because `use cache` relies on the global singleton being set which accidentally depended on the `load-components` call to `setReferenceManifestsSingleton`. The `app-page` template did the right thing calling `setReferenceManifestsSingleton` already but `app-route` did not, causing those tests to fail when I removed calling `setReferenceManifestsSingleton` in the PR further in the stack.

Closes PACK-5311

Changed files:
filename: packages/next/src/build/templates/app-route.ts
patch: @@ -8,6 +8,8 @@ import { patchFetch as _patchFetch } from '../../server/lib/patch-fetch'
 import type { IncomingMessage, ServerResponse } from 'node:http'
 import { getRequestMeta } from '../../server/request-meta'
 import { getTracer, type Span, SpanKind } from '../../server/lib/trace/tracer'
+import { setReferenceManifestsSingleton } from '../../server/app-render/encryption-utils'
+import { createServerModuleMap } from '../../server/app-render/action-utils'
 import { normalizeAppPath } from '../../shared/lib/router/utils/app-paths'
 import { NodeNextRequest, NodeNextResponse } from '../../server/base-http/node'
 import {
@@ -119,6 +121,8 @@ export async function handler(
     isOnDemandRevalidate,
     revalidateOnlyGenerated,
     resolvedPathname,
+    clientReferenceManifest,
+    serverActionsManifest,
   } = prepareResult
 
   const normalizedSrcPage = normalizeAppPath(srcPage)
@@ -160,6 +164,20 @@ export async function handler(
   // request.
   const isRevalidate = isIsr && !supportsDynamicResponse
 
+  // Before rendering (which initializes component tree modules), we have to
+  // set the reference manifests to our global store so Server Action's
+  // encryption util can access to them at the top level of the page module.
+  if (serverActionsManifest && clientReferenceManifest) {
+    setReferenceManifestsSingleton({
+      page: srcPage,
+      clientReferenceManifest,
+      serverActionsManifest,
+      serverModuleMap: createServerModuleMap({
+        serverActionsManifest,
+      }),
+    })
+  }
+
   const method = req.method || 'GET'
   const tracer = getTracer()
   const activeSpan = tracer.getActiveScopeSpan()
Repository: electron/electron
Pull request: perf: improve temporaries in `WebWorkerObserver::WorkerScriptReadyForEvaluation()` (33-x-y)

Manually backport #46347 to 33-x-y. See that PR for details.

Notes: none.

Changed files:
filename: shell/renderer/web_worker_observer.cc
patch: @@ -4,10 +4,12 @@
 
 #include "shell/renderer/web_worker_observer.h"
 
+#include <string_view>
 #include <utility>
 
 #include "base/no_destructor.h"
 #include "base/ranges/algorithm.h"
+#include "base/strings/strcat.h"
 #include "base/threading/thread_local.h"
 #include "shell/common/api/electron_bindings.h"
 #include "shell/common/gin_helper/event_emitter_caller.h"
@@ -70,15 +72,14 @@ void WebWorkerObserver::WorkerScriptReadyForEvaluation(
   // is loaded. See corresponding change in node/init.ts.
   v8::Local<v8::Object> global = worker_context->Global();
 
-  std::vector<std::string> keys = {"fetch",   "Response", "FormData",
-                                   "Request", "Headers",  "EventSource"};
-  for (const auto& key : keys) {
+  for (const std::string_view key :
+       {"fetch", "Response", "FormData", "Request", "Headers", "EventSource"}) {
     v8::MaybeLocal<v8::Value> value =
-        global->Get(worker_context, gin::StringToV8(isolate, key.c_str()));
+        global->Get(worker_context, gin::StringToV8(isolate, key));
     if (!value.IsEmpty()) {
-      std::string blink_key = "blink" + key;
+      std::string blink_key = base::StrCat({"blink", key});
       global
-          ->Set(worker_context, gin::StringToV8(isolate, blink_key.c_str()),
+          ->Set(worker_context, gin::StringToV8(isolate, blink_key),
                 value.ToLocalChecked())
           .Check();
     }
Repository: facebook/react
Pull request: [Fiber] Use real event priority for hydration scheduling

Stacked on #28751 

Historically explicit hydration scheduling used the reconciler's update priority to schedule the hydration. There was a lingering todo to switch to using event priority in the absence of an explicit update priority. This change updates the hydration priority by referring to the event priority if no update priority is set

Changed files:
filename: packages/react-dom-bindings/src/events/ReactDOMEventReplaying.js
patch: @@ -38,7 +38,7 @@ import {isHigherEventPriority} from 'react-reconciler/src/ReactEventPriorities';
 import {isRootDehydrated} from 'react-reconciler/src/ReactFiberShellHydration';
 import {dispatchReplayedFormAction} from './plugins/FormActionEventPlugin';
 import {
-  getCurrentUpdatePriority,
+  resolveUpdatePriority,
   runWithPriority as attemptHydrationAtPriority,
 } from '../client/ReactDOMUpdatePriority';
 
@@ -333,10 +333,7 @@ function attemptExplicitHydrationTarget(
 }
 
 export function queueExplicitHydrationTarget(target: Node): void {
-  // TODO: This will read the priority if it's dispatched by the React
-  // event system but not native events. Should read window.event.type, like
-  // we do for updates (getCurrentEventPriority).
-  const updatePriority = getCurrentUpdatePriority();
+  const updatePriority = resolveUpdatePriority();
   const queuedTarget: QueuedHydrationTarget = {
     blockedOn: null,
     target: target,
Repository: electron/electron
Pull request: perf: avoid redundant map lookups in `GlobalShortcut::OnKeyPressed()` (33-x-y backport)

Manually backport #46229 to 33-x-y. See that PR for details.

Notes: none.

Changed files:
filename: shell/browser/api/electron_api_global_shortcut.cc
patch: @@ -6,6 +6,7 @@
 
 #include <vector>
 
+#include "base/containers/map_util.h"
 #include "extensions/common/command.h"
 #include "gin/dictionary.h"
 #include "gin/handle.h"
@@ -52,12 +53,13 @@ GlobalShortcut::~GlobalShortcut() {
 }
 
 void GlobalShortcut::OnKeyPressed(const ui::Accelerator& accelerator) {
-  if (!accelerator_callback_map_.contains(accelerator)) {
+  if (auto* cb = base::FindOrNull(accelerator_callback_map_, accelerator)) {
+    cb->Run();
+  } else {
     // This should never occur, because if it does, GlobalShortcutListener
     // notifies us with wrong accelerator.
     NOTREACHED();
   }
-  accelerator_callback_map_[accelerator].Run();
 }
 
 bool GlobalShortcut::RegisterAll(
Repository: denoland/deno
Pull request: fix: Add info/hint for unstable Deno.bundle API

This was missed in https://github.com/denoland/deno/pull/29949

Changed files:
filename: runtime/fmt_errors.rs
patch: @@ -358,6 +358,13 @@ fn get_suggestions_for_terminal_errors(e: &JsError) -> Vec<FixSuggestion<'_>> {
           "Run again with `--unstable-kv` flag to enable this API.",
         ),
       ];
+    } else if msg.contains("bundle is not a function") {
+      return vec![
+        FixSuggestion::info("Deno.bundle() is an unstable API."),
+        FixSuggestion::hint(
+          "Run again with `--unstable-bundle` flag to enable this API.",
+        ),
+      ];
     } else if msg.contains("cron is not a function") {
       return vec![
         FixSuggestion::info("Deno.cron() is an unstable API."),

filename: tests/specs/run/unstable/__test__.jsonc
patch: @@ -5,6 +5,11 @@
       "exitCode": 1,
       "output": "broadcast_channel.out"
     },
+    "bundle": {
+      "args": "run bundle.ts",
+      "exitCode": 1,
+      "output": "bundle.out"
+    },
     "cron": {
       "args": "run cron.ts",
       "exitCode": 1,

filename: tests/specs/run/unstable/bundle.out
patch: @@ -0,0 +1,7 @@
+error: Uncaught (in promise) TypeError: Deno.bundle is not a function
+Deno.bundle();
+     ^
+    at [WILDCARD]bundle.ts:1:6
+
+    info: Deno.bundle() is an unstable API.
+    hint: Run again with `--unstable-bundle` flag to enable this API.

filename: tests/specs/run/unstable/bundle.ts
patch: @@ -0,0 +1 @@
+Deno.bundle();
Repository: ollama/ollama
Pull request: Update api.md

Avoid triple ticks in visual editor and also copied in clipboard.

![CleanShot 2023-10-09 at 17 07 51@2x](https://github.com/jmorganca/ollama/assets/12672541/be329fc6-23e0-4897-a611-2ce42c3b7cf0)

![CleanShot 2023-10-09 at 17 08 51@2x](https://github.com/jmorganca/ollama/assets/12672541/a14daee3-9558-4be7-9b5d-b90b1ad8dcd2)


Changed files:
filename: docs/api.md
patch: @@ -352,4 +352,5 @@ curl -X POST http://localhost:11434/api/embeddings -d '{
     0.5670403838157654, 0.009260174818336964, 0.23178744316101074, -0.2916173040866852, -0.8924556970596313,
     0.8785552978515625, -0.34576427936553955, 0.5742510557174683, -0.04222835972905159, -0.137906014919281
   ]
-}```
+}
+```
Repository: ollama/ollama
Pull request: not found error before pulling model

When attempting to run a model through the API before pulling it a cryptic "no such file or directory" error was returned with the error path. 

Improve this error to suggest pulling the model first, like the CLI does automatically.
```
curl -X 'POST' -d '{"prompt":"hello", "model": "mistral"}' 'http://127.0.0.1:11434/api/generate'
{"error":"model 'mistral' not found, try pulling it first"}%  
```

resolves #715 

Changed files:
filename: server/routes.go
patch: @@ -3,8 +3,10 @@ package server
 import (
 	"context"
 	"encoding/json"
+	"errors"
 	"fmt"
 	"io"
+	"io/fs"
 	"log"
 	"net"
 	"net/http"
@@ -170,6 +172,11 @@ func GenerateHandler(c *gin.Context) {
 
 	model, err := GetModel(req.Model)
 	if err != nil {
+		var pErr *fs.PathError
+		if errors.As(err, &pErr) {
+			c.JSON(http.StatusNotFound, gin.H{"error": fmt.Sprintf("model '%s' not found, try pulling it first", req.Model)})
+			return
+		}
 		c.JSON(http.StatusBadRequest, gin.H{"error": err.Error()})
 		return
 	}