helloadhavan/github_issues huggingface dataset:
Repository: facebook/react
Pull request: [circleci] Inline scrape_warning_messages

Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom):
* __->__ #30388
* #30387
* #30380
* #30376
* #30375
* #30374
* #30385

This job was only being used for process_artifacts_combined in circleci
but as it was a separate job would incur the cost and time of spinning
up a new CI worker. We can simply inline this into
process_artifacts_combined.

Test plan: Download
[build.tgz](https://app.circleci.com/pipelines/github/facebook/react/57183/workflows/3b22a99e-b8a5-4c80-9682-576f24581b00/jobs/956476/artifacts)
from circleci and observe that the __test_utils__ directory is still
present.

Changed files:
filename: .circleci/config.yml
patch: @@ -91,8 +91,8 @@ jobs:
       - setup_node_modules
       - run: echo "<< pipeline.git.revision	>>" >> build/COMMIT_SHA
       - run: |
-        mkdir -p ./build/__test_utils__
-        node ./scripts/print-warnings/print-warnings.js > build/__test_utils__/ReactAllWarnings.js
+          mkdir -p ./build/__test_utils__
+          node ./scripts/print-warnings/print-warnings.js > build/__test_utils__/ReactAllWarnings.js
       # Compress build directory into a single tarball for easy download
       - run: tar -zcvf ./build.tgz ./build
         # TODO: Migrate scripts to use `build` directory instead of `build2`

filename: .github/workflows/runtime_build_and_test.yml
patch: @@ -586,6 +586,10 @@ jobs:
           pattern: _build_*
           path: build
           merge-multiple: true
+      - name: Scrape warning messages
+        run: |
+          mkdir -p ./build/__test_utils__
+          node ./scripts/print-warnings/print-warnings.js > build/__test_utils__/ReactAllWarnings.js
       - name: Display structure of build for PR
         run: ls -R build
       - name: Restore archived base-build from origin/main

filename: scripts/release/download-experimental-build-ghaction.js
patch: @@ -69,7 +69,6 @@ async function getWorkflowRunId(commit) {
     `curl -L ${GITHUB_HEADERS} https://api.github.com/repos/${OWNER}/${REPO}/actions/workflows/${getWorkflowId()}/runs?head_sha=${commit}&branch=main&exclude_pull_requests=true`
   );
 
-  console.log(res);
   const json = JSON.parse(res.stdout);
   let workflowRun;
   if (json.total_count === 1) {
@@ -95,7 +94,6 @@ async function getArtifact(workflowRunId, artifactName) {
     `curl -L ${GITHUB_HEADERS} https://api.github.com/repos/${OWNER}/${REPO}/actions/runs/${workflowRunId}/artifacts?per_page=100&name=${artifactName}`
   );
 
-  console.log(res);
   const json = JSON.parse(res.stdout);
   let artifact;
   if (json.total_count === 1) {
Repository: huggingface/transformers
Pull request: fix TrainerIntegrationDeepSpeed UT failures

when run `TrainerIntegrationDeepSpeed` cases like `pytest -rA tests/deepspeed/test_deepspeed.py::TrainerIntegrationDeepSpeed::test_can_resume_training_normal_zero2_bf16_ds_optim_ds_scheduler`, it will fail w/

>         if "optimizer" in config:
>           if args.adafactor:
> E           AttributeError: 'RegressionTrainingArguments' object has no attribute 'adafactor'
> 
> src/transformers/integrations/deepspeed.py:359: AttributeError

Fix it by using `args.optim`

@ydshieh, @SunMarc  pls help review, thx very much.



Changed files:
filename: src/transformers/integrations/deepspeed.py
patch: @@ -356,7 +356,7 @@ def deepspeed_optim_sched(trainer, hf_deepspeed_config, args, num_training_steps
 
     optimizer = None
     if "optimizer" in config:
-        if args.adafactor:
+        if args.optim == "adafactor":
             raise ValueError(
                 "--adafactor was passed, but also found `optimizer` configured in the DeepSpeed config. "
                 "Only one optimizer can be configured."
Repository: facebook/react
Pull request: [ci] Remove sizebot from circleci

Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom):
* #30388
* __->__ #30387
* #30380
* #30376
* #30375
* #30374
* #30385

Now that the job is migrated to GH, we can remove this from circleci.
Note that sizebot still comments on this PR.

Changed files:
filename: .github/workflows/runtime_build_and_test.yml
patch: @@ -586,6 +586,10 @@ jobs:
           pattern: _build_*
           path: build
           merge-multiple: true
+      - name: Scrape warning messages
+        run: |
+          mkdir -p ./build/__test_utils__
+          node ./scripts/print-warnings/print-warnings.js > build/__test_utils__/ReactAllWarnings.js
       - name: Display structure of build for PR
         run: ls -R build
       - name: Restore archived base-build from origin/main

filename: scripts/release/download-experimental-build-ghaction.js
patch: @@ -69,7 +69,6 @@ async function getWorkflowRunId(commit) {
     `curl -L ${GITHUB_HEADERS} https://api.github.com/repos/${OWNER}/${REPO}/actions/workflows/${getWorkflowId()}/runs?head_sha=${commit}&branch=main&exclude_pull_requests=true`
   );
 
-  console.log(res);
   const json = JSON.parse(res.stdout);
   let workflowRun;
   if (json.total_count === 1) {
@@ -95,7 +94,6 @@ async function getArtifact(workflowRunId, artifactName) {
     `curl -L ${GITHUB_HEADERS} https://api.github.com/repos/${OWNER}/${REPO}/actions/runs/${workflowRunId}/artifacts?per_page=100&name=${artifactName}`
   );
 
-  console.log(res);
   const json = JSON.parse(res.stdout);
   let artifact;
   if (json.total_count === 1) {
Repository: ggml-org/llama.cpp
Pull request: ggml: use 'exists( const std::filesystem::path&, std::error_code&)' instead of 'exists( const std::filesystem::path&)' to enhance robustness 

When use `exists( const std::filesystem::path& p)`, if `p` can't access(like: Permission denied), it will throw `std::filesystem::filesystem_error` to break the execution flow.



Changed files:
filename: ggml/src/ggml-backend-reg.cpp
patch: @@ -534,8 +534,12 @@ static ggml_backend_reg_t ggml_backend_load_best(const char * name, bool silent,
     fs::path best_path;
 
     for (const auto & search_path : search_paths) {
-        if (!fs::exists(search_path)) {
-            GGML_LOG_DEBUG("%s: search path %s does not exist\n", __func__, path_str(search_path).c_str());
+        if (std::error_code ec; !fs::exists(search_path, ec)) {
+            if (ec) {
+                GGML_LOG_DEBUG("%s: posix_stat(%s) failure, error-message: %s\n", __func__, path_str(search_path).c_str(), ec.message().c_str());
+            } else {
+                GGML_LOG_DEBUG("%s: search path %s does not exist\n", __func__, path_str(search_path).c_str());
+            }
             continue;
         }
         fs::directory_iterator dir_it(search_path, fs::directory_options::skip_permission_denied);
@@ -575,8 +579,12 @@ static ggml_backend_reg_t ggml_backend_load_best(const char * name, bool silent,
         for (const auto & search_path : search_paths) {
             fs::path filename = backend_filename_prefix().native() + name_path.native() + backend_filename_extension().native();
             fs::path path = search_path / filename;
-            if (fs::exists(path)) {
+            if (std::error_code ec; fs::exists(path, ec)) {
                 return get_reg().load_backend(path, silent);
+            } else {
+                if (ec) {
+                    GGML_LOG_DEBUG("%s: posix_stat(%s) failure, error-message: %s\n", __func__, path_str(path).c_str(), ec.message().c_str());
+                }
             }
         }
         return nullptr;

filename: ggml/src/ggml-rpc/ggml-rpc.cpp
patch: @@ -1257,7 +1257,8 @@ bool rpc_server::get_cached_file(uint64_t hash, std::vector<uint8_t> & data) {
     char hash_str[17];
     snprintf(hash_str, sizeof(hash_str), "%016" PRIx64, hash);
     fs::path cache_file = fs::path(cache_dir) / hash_str;
-    if (!fs::exists(cache_file)) {
+    std::error_code ec;
+    if (!fs::exists(cache_file, ec)) {
         return false;
     }
     std::ifstream ifs(cache_file, std::ios::binary);
Repository: ollama/ollama
Pull request: fix: clip memory leak

this change patches llama.cpp and fixes two bugs

1. llama_server_context never calls clip_free
2. clip_free does not fully free its context

Changed files:
filename: llm/patches/05-fix-clip-free.diff
patch: @@ -0,0 +1,45 @@
+From 9192432daf90b1bfec75577434a99b4ea70d54c8 Mon Sep 17 00:00:00 2001
+From: Michael Yang <mxyng@pm.me>
+Date: Thu, 14 Mar 2024 12:09:50 -0700
+Subject: [PATCH] fix clip free
+
+---
+ examples/llava/clip.cpp    | 4 ++++
+ examples/server/server.cpp | 6 ++++++
+ 2 files changed, 10 insertions(+)
+
+diff --git a/examples/llava/clip.cpp b/examples/llava/clip.cpp
+index ef9e4ba7..b4ddfe6b 100644
+--- a/examples/llava/clip.cpp
++++ b/examples/llava/clip.cpp
+@@ -1673,6 +1673,10 @@ void clip_free(clip_ctx * ctx) {
+     ggml_free(ctx->ctx_data);
+     gguf_free(ctx->ctx_gguf);
+ 
++    ggml_backend_buffer_free(ctx->params_buffer);
++    ggml_backend_buffer_free(ctx->compute_buffer);
++    ggml_backend_free(ctx->backend);
++    ggml_gallocr_free(ctx->compute_alloc);
+     delete ctx;
+ }
+ 
+diff --git a/examples/server/server.cpp b/examples/server/server.cpp
+index 8fe5e0b1..f927336b 100644
+--- a/examples/server/server.cpp
++++ b/examples/server/server.cpp
+@@ -353,6 +353,12 @@ struct llama_server_context
+ 
+     ~llama_server_context()
+     {
++        if (clp_ctx)
++        {
++            LOG_INFO("freeing clip model", {});
++            clip_free(clp_ctx);
++            clp_ctx = nullptr;
++        }
+         if (ctx)
+         {
+             llama_free(ctx);
+-- 
+2.43.2
+
Repository: facebook/react
Pull request: [ci] Add sizebot to gh actions

Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom):
* #30388
* #30387
* __->__ #30380
* #30376
* #30375
* #30374
* #30385

Wires up sizebot in gh actions. I also fixed sizebot incorrectly
reporting that ReactAllWarnings was deleted.

Changed files:
filename: .github/workflows/runtime_build_and_test.yml
patch: @@ -586,6 +586,10 @@ jobs:
           pattern: _build_*
           path: build
           merge-multiple: true
+      - name: Scrape warning messages
+        run: |
+          mkdir -p ./build/__test_utils__
+          node ./scripts/print-warnings/print-warnings.js > build/__test_utils__/ReactAllWarnings.js
       - name: Display structure of build for PR
         run: ls -R build
       - name: Restore archived base-build from origin/main

filename: scripts/release/download-experimental-build-ghaction.js
patch: @@ -69,7 +69,6 @@ async function getWorkflowRunId(commit) {
     `curl -L ${GITHUB_HEADERS} https://api.github.com/repos/${OWNER}/${REPO}/actions/workflows/${getWorkflowId()}/runs?head_sha=${commit}&branch=main&exclude_pull_requests=true`
   );
 
-  console.log(res);
   const json = JSON.parse(res.stdout);
   let workflowRun;
   if (json.total_count === 1) {
@@ -95,7 +94,6 @@ async function getArtifact(workflowRunId, artifactName) {
     `curl -L ${GITHUB_HEADERS} https://api.github.com/repos/${OWNER}/${REPO}/actions/runs/${workflowRunId}/artifacts?per_page=100&name=${artifactName}`
   );
 
-  console.log(res);
   const json = JSON.parse(res.stdout);
   let artifact;
   if (json.total_count === 1) {
Repository: nodejs/node
Pull request: doc: clarify maxRSS unit in `process.resourceUsage()`

Fixes: https://github.com/nodejs/node/issues/59508
References: https://simple.wikipedia.org/wiki/Kilobyte

<!--
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: doc/api/process.md
patch: @@ -3642,7 +3642,7 @@ added: v12.6.0
   * `systemCPUTime` {integer} maps to `ru_stime` computed in microseconds.
     It is the same value as [`process.cpuUsage().system`][process.cpuUsage].
   * `maxRSS` {integer} maps to `ru_maxrss` which is the maximum resident set
-    size used in kilobytes.
+    size used in kibibytes (1024 bytes).
   * `sharedMemorySize` {integer} maps to `ru_ixrss` but is not supported by
     any platform.
   * `unsharedDataSize` {integer} maps to `ru_idrss` but is not supported by
Repository: ollama/ollama
Pull request: Use stdin for term discovery on windows

When you feed input to the cmd via a pipe it no longer reports a warning


Before:
```
> echo "what is the captial of australia" | .\ollama.exe run phi
failed to get console mode for stdin: The handle is invalid.
 The capital of Australia is Canberra. It's located in the Australian Capital Territory, about 120 kilometers
northwest of Sydney and 130 kilometers southwest of Melbourne.
```

After fix:
```
> echo "what is the captial of australia" | .\ollama.exe run phi
 The capital city of Australia is Canberra. It is located in the Australian Capital Territory (ACT) and is home to important government buildings, such as Parliament House and the National Museum of Australia
```


Fixes #2698 

Changed files:
filename: cmd/cmd.go
patch: @@ -900,8 +900,7 @@ func NewCLI() *cobra.Command {
 	cobra.EnableCommandSorting = false
 
 	if runtime.GOOS == "windows" {
-		// Enable colorful ANSI escape code in Windows terminal (disabled by default)
-		console.ConsoleFromFile(os.Stdout) //nolint:errcheck
+		console.ConsoleFromFile(os.Stdin) //nolint:errcheck
 	}
 
 	rootCmd := &cobra.Command{
Repository: facebook/react
Pull request: [ci] Add script to download artifact from github

Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom):
* #30388
* #30387
* #30380
* __->__ #30376
* #30375
* #30374
* #30385

Updates the forked script to download build artifacts from GitHub. Note
that this PR just adds the script, it does not add it to GH actions yet.

Changed files:
filename: scripts/release/download-experimental-build-ghaction.js
patch: @@ -69,7 +69,6 @@ async function getWorkflowRunId(commit) {
     `curl -L ${GITHUB_HEADERS} https://api.github.com/repos/${OWNER}/${REPO}/actions/workflows/${getWorkflowId()}/runs?head_sha=${commit}&branch=main&exclude_pull_requests=true`
   );
 
-  console.log(res);
   const json = JSON.parse(res.stdout);
   let workflowRun;
   if (json.total_count === 1) {
@@ -95,7 +94,6 @@ async function getArtifact(workflowRunId, artifactName) {
     `curl -L ${GITHUB_HEADERS} https://api.github.com/repos/${OWNER}/${REPO}/actions/runs/${workflowRunId}/artifacts?per_page=100&name=${artifactName}`
   );
 
-  console.log(res);
   const json = JSON.parse(res.stdout);
   let artifact;
   if (json.total_count === 1) {
Repository: huggingface/transformers
Pull request: 🚨 [v5] Remove SinkCache

# What does this PR do?

It could be removed in V5.

Changed files:
filename: src/transformers/__init__.py
patch: @@ -370,7 +370,6 @@
         "OffloadedStaticCache",
         "QuantizedCache",
         "QuantoQuantizedCache",
-        "SinkCache",
         "SlidingWindowCache",
         "StaticCache",
     ]
@@ -495,7 +494,6 @@
     from .cache_utils import QuantizedCache as QuantizedCache
     from .cache_utils import QuantoQuantizedCache as QuantoQuantizedCache
     from .cache_utils import QuantoQuantizedLayer as QuantoQuantizedLayer
-    from .cache_utils import SinkCache as SinkCache
     from .cache_utils import SlidingWindowCache as SlidingWindowCache
     from .cache_utils import SlidingWindowLayer as SlidingWindowLayer
     from .cache_utils import StaticCache as StaticCache

filename: src/transformers/cache_utils.py
patch: @@ -1469,18 +1469,3 @@ def __init__(
             "Use `QuantizedCache(backend='hqq', ...)` instead."
         )
         super().__init__("hqq", config, nbits, axis_key, axis_value, q_group_size, residual_length)
-
-
-class SinkCache(Cache):
-    """
-    It is now a `custom_generate` repository on the Hub: https://huggingface.co/transformers-community/sink_cache.
-    See [these docs](https://huggingface.co/docs/transformers/generation_strategies#custom-decoding-methods) for
-    general `custom_generate`usage.
-    """
-
-    # TODO (joao, manuel): Remove this class in v4.59.0
-    def __init__(self, **kwargs) -> None:
-        raise NotImplementedError(
-            "`SinkCache` has been moved as a `custom_generate` repository on the Hub: "
-            "https://huggingface.co/transformers-community/sink_cache. See the repository for usage examples."
-        )

filename: src/transformers/utils/dummy_pt_objects.py
patch: @@ -65,13 +65,6 @@ def __init__(self, *args, **kwargs):
         requires_backends(self, ["torch"])
 
 
-class SinkCache(metaclass=DummyObject):
-    _backends = ["torch"]
-
-    def __init__(self, *args, **kwargs):
-        requires_backends(self, ["torch"])
-
-
 class SlidingWindowCache(metaclass=DummyObject):
     _backends = ["torch"]
 

filename: utils/check_repo.py
patch: @@ -1001,7 +1001,6 @@ def find_all_documented_objects() -> list[str]:
     "VitPoseBackbone",  # Internal module
     "VitPoseBackboneConfig",  # Internal module
     "get_values",  # Internal object
-    "SinkCache",  # Moved to a custom_generate repository, to be deleted from transformers in v4.59.0
 ]
 
 # This list should be empty. Objects in it should get their own doc page.
Repository: facebook/react
Pull request: [ci] Use yargs to parse args to download-experimental-build

Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom):
* #30388
* #30387
* #30380
* #30376
* __->__ #30375
* #30374
* #30385



Changed files:
filename: .github/workflows/runtime_build_and_test.yml
patch: @@ -180,9 +180,8 @@ jobs:
       - name: Archive build
         uses: actions/upload-artifact@v4
         with:
-          name: build_${{ matrix.worker_id }}_${{ matrix.release_channel }}
-          path: |
-            build
+          name: _build_${{ matrix.worker_id }}_${{ matrix.release_channel }}
+          path: build
 
   test_build:
     name: yarn test-build
@@ -242,6 +241,7 @@ jobs:
       - name: Restore archived build
         uses: actions/download-artifact@v4
         with:
+          pattern: _build_*
           path: build
           merge-multiple: true
       - name: Display structure of build
@@ -269,6 +269,7 @@ jobs:
       - name: Restore archived build
         uses: actions/download-artifact@v4
         with:
+          pattern: _build_*
           path: build
           merge-multiple: true
       - name: Display structure of build
@@ -311,6 +312,7 @@ jobs:
       - name: Restore archived build
         uses: actions/download-artifact@v4
         with:
+          pattern: _build_*
           path: build
           merge-multiple: true
       - name: Display structure of build
@@ -341,6 +343,7 @@ jobs:
       - name: Restore archived build
         uses: actions/download-artifact@v4
         with:
+          pattern: _build_*
           path: build
           merge-multiple: true
       - name: Display structure of build
@@ -370,6 +373,7 @@ jobs:
       - name: Restore archived build
         uses: actions/download-artifact@v4
         with:
+          pattern: _build_*
           path: build
           merge-multiple: true
       - name: Display structure of build
@@ -407,6 +411,7 @@ jobs:
       - name: Restore archived build
         uses: actions/download-artifact@v4
         with:
+          pattern: _build_*
           path: build
           merge-multiple: true
       - name: Display structure of build
@@ -462,6 +467,7 @@ jobs:
       - name: Restore archived build
         uses: actions/download-artifact@v4
         with:
+          pattern: _build_*
           path: build
           merge-multiple: true
       - run: ./scripts/circleci/pack_and_store_devtools_artifacts.sh
@@ -507,6 +513,7 @@ jobs:
       - name: Restore archived build
         uses: actions/download-artifact@v4
         with:
+          pattern: _build_*
           path: build
           merge-multiple: true
       - run: |
Repository: facebook/react
Pull request: [ci] Fork scripts/release/download-experimental-build.js

Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom):
* #30388
* #30387
* #30380
* #30376
* #30375
* __->__ #30374
* #30385

This PR just copies the original file without any modifications for
easier review.

The original script makes assumptions about CircleCI that are difficult
to untangle. So let's fork this file temporarily for GitHub actions.
Later on we will remove the original and rename this fork back to the
original naming.

Changed files:
filename: .github/workflows/runtime_build_and_test.yml
patch: @@ -180,9 +180,8 @@ jobs:
       - name: Archive build
         uses: actions/upload-artifact@v4
         with:
-          name: build_${{ matrix.worker_id }}_${{ matrix.release_channel }}
-          path: |
-            build
+          name: _build_${{ matrix.worker_id }}_${{ matrix.release_channel }}
+          path: build
 
   test_build:
     name: yarn test-build
@@ -242,6 +241,7 @@ jobs:
       - name: Restore archived build
         uses: actions/download-artifact@v4
         with:
+          pattern: _build_*
           path: build
           merge-multiple: true
       - name: Display structure of build
@@ -269,6 +269,7 @@ jobs:
       - name: Restore archived build
         uses: actions/download-artifact@v4
         with:
+          pattern: _build_*
           path: build
           merge-multiple: true
       - name: Display structure of build
@@ -311,6 +312,7 @@ jobs:
       - name: Restore archived build
         uses: actions/download-artifact@v4
         with:
+          pattern: _build_*
           path: build
           merge-multiple: true
       - name: Display structure of build
@@ -341,6 +343,7 @@ jobs:
       - name: Restore archived build
         uses: actions/download-artifact@v4
         with:
+          pattern: _build_*
           path: build
           merge-multiple: true
       - name: Display structure of build
@@ -370,6 +373,7 @@ jobs:
       - name: Restore archived build
         uses: actions/download-artifact@v4
         with:
+          pattern: _build_*
           path: build
           merge-multiple: true
       - name: Display structure of build
@@ -407,6 +411,7 @@ jobs:
       - name: Restore archived build
         uses: actions/download-artifact@v4
         with:
+          pattern: _build_*
           path: build
           merge-multiple: true
       - name: Display structure of build
@@ -462,6 +467,7 @@ jobs:
       - name: Restore archived build
         uses: actions/download-artifact@v4
         with:
+          pattern: _build_*
           path: build
           merge-multiple: true
       - run: ./scripts/circleci/pack_and_store_devtools_artifacts.sh
@@ -507,6 +513,7 @@ jobs:
       - name: Restore archived build
         uses: actions/download-artifact@v4
         with:
+          pattern: _build_*
           path: build
           merge-multiple: true
       - run: |