sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: langchain
Issue: SurrealDBStore returns error `ImportError: cannot import name 'Surreal' from 'surrealdb'`
Labels: 🤖:bug

### Checked other resources

- [X] I added a very descriptive title to this issue.
- [X] I searched the LangChain documentation with the integrated search.
- [X] I used the GitHub search to find a similar question and didn't find it.
- [X] I am sure that this is a bug in LangChain rather than my code.
- [X] The bug is not resolved by updating to the latest stable version of LangChain (or the specific integration package).

### Example Code

```
#!/usr/bin/env python3

from langchain_community.vectorstores import SurrealDBStore

dg = SurrealDBStore(
        dburl="ws://10.0.0.2:28000/rpc",
        embedding_function=None
        )
```

### Error Message and Stack Trace (if applicable)

```
./surreal.py
Traceback (most recent call last):
  File "/home/frja/.local/share/virtualenvs/index-docs-py-M1grQ13y/lib/python3.12/site-packages/langchain_community/vectorstores/surrealdb.py", line 59, in __init__
    from surrealdb import Surreal
ImportError: cannot import name 'Surreal' from 'surrealdb' (/home/frja/.local/share/virtualenvs/index-docs-py-M1grQ13y/lib/python3.12/site-packages/surrealdb/__init__.py). Did you mean: 'SurrealDB'?

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/frja/rust/avassa-chatbot/index-docs-py/./surreal.py", line 5, in <module>
    dg = SurrealDBStore(
         ^^^^^^^^^^^^^^^
  File "/home/frja/.local/share/virtualenvs/index-docs-py-M1grQ13y/lib/python3.12/site-packages/langchain_community/vectorstores/surrealdb.py", line 61, in __init__
    raise ImportError(
ImportError: Cannot import from surrealdb.
                please install with `pip install surrealdb`.
```

### Description

I believe the import should be `from surrealdb import SurrealDB`

### System Info

```
aiohappyeyeballs==2.4.4
aiohttp==3.11.11
aiosignal==1.3.2
annotated-types==0.7.0
anyio==4.8.0
attrs==24.3.0
cbor2==5.6.5
certifi==2024.12.14
charset-normalizer==3.4.1
dataclasses-json==0.6.7
frozenlist==1.5.0
greenlet==3.1.1
h11==0.14.0
httpcore==1.0.7
httpx==0.28.1
httpx-sse==0.4.0
idna==3.10
jsonpatch==1.33
jsonpointer==3.0.0
langchain==0.3.14
langchain-community==0.3.14
langchain-core==0.3.29
langchain-text-splitters==0.3.5
langsmith==0.2.10
marshmallow==3.24.2
multidict==6.1.0
mypy-extensions==1.0.0
numpy==2.2.1
orjson==3.10.14
packaging==24.2
propcache==0.2.1
pydantic==2.10.5
pydantic-settings==2.7.1
pydantic_core==2.27.2
python-dotenv==1.0.1
PyYAML==6.0.2
requests==2.32.3
requests-toolbelt==1.0.0
sniffio==1.3.1
SQLAlchemy==2.0.36
surrealdb==0.4.1
tenacity==9.0.0
typing-inspect==0.9.0
typing_extensions==4.12.2
urllib3==2.3.0
websockets==14.1
yarl==1.18.3
```
Repository: ui
Issue: [bug]: Popover cannot be worked properly inside Dialog with React 19
Labels: bug

### Describe the bug

just example code here:

`<Dialog>
      <DialogTrigger asChild>
        <Button>Open Dialog</Button>
      </DialogTrigger>
      <DialogContent>
        <DialogHeader>
          <DialogTitle>Are you absolutely sure?</DialogTitle>
          <Popover>
            <PopoverTrigger
              asChild
              className="flex-1 flex gap-2 flex-col justify-start"
            >
              <Button>
                <Input type="text" />
              </Button>
            </PopoverTrigger>
            <PopoverContent className="flex flex-col gap-2 w-80">
              <Input type="text" placeholder="more.." />
              <Input type="text" placeholder="more.." />
              <Input type="text" placeholder="more.." />
              <Input type="text" placeholder="more.." />
            </PopoverContent>
          </Popover>
        </DialogHeader>
      </DialogContent>
    </Dialog>`

![Screenshot_236](https://github.com/user-attachments/assets/6529a1c1-edd8-4f96-bd6a-4f16a863c6f1)




### Affected component/components

Popover

### How to reproduce

Click on

### Codesandbox/StackBlitz link

_No response_

### Logs

_No response_

### System Info

```bash
Browser
```


### Before submitting

- [X] I've made research efforts and searched the documentation
- [X] I've searched for existing issues
Repository: pytorch
Issue: Partitioner's auto-AC misbehaves with mixed dtypes
Labels: feature,module: autograd,triaged,oncall: pt2,activation-checkpointing

### 🚀 The feature, motivation and pitch

When using the partitioner to do some automatic selective activation checkpointing, the default mode consists in estimating the runtime cost of the operators by computing the number of FLOPs they consume. Unfortunately, this is a bad proxy metric in cases where different operators are executed with different dtypes because, in a sense, not all FLOPs are equal.

Concretely, this occurs when using fp8 matmuls on H100 GPUs, because (in most/all current recipes) only the matmuls are converted to fp8, whereas the self-attention remains in bf16. Moreover, in some cases only _some_ matmuls get converted to fp8 (e.g., some layers, or some specific weights within layers).

If the partitioner just compares FLOPs without adjusting them by the time it takes to execute a FLOP in a given dtype this might lead to a suboptimal solution to the AC problem.

### Alternatives

_No response_

### Additional context

_No response_

cc @ezyang @albanD @gqchen @pearu @nikitaved @soulitzer @Varal7 @xmfan @chauhang @penguinwu
Repository: ant-design
Issue: 【Button】colorPrimary 不支持语义化的颜色
Labels: 🐛 Bug

### Reproduction link

[https://github.com/consistent-k/VodNext/blob/main/components/providers/ThemeProvider.tsx](https://github.com/consistent-k/VodNext/blob/main/components/providers/ThemeProvider.tsx)

https://stackblitz.com/edit/react-y7v5ygbf?file=demo.tsx

### Steps to reproduce

在ConfigProvider内 Token配置为`colorPrimary: 'skyblue'` 按钮颜色会显示为黑色，配置十六进制则没问题


```ts
<ConfigProvider
  theme={{
    token: {
      colorPrimary: 'red',
    },
  }}
>
  <Flex gap="small" wrap>
    <Button type="primary">Primary Button</Button>
    <Button>Default Button</Button>
    <Button type="dashed">Dashed Button</Button>
    <Button type="text">Text Button</Button>
    <Button type="link">Link Button</Button>
  </Flex>
</ConfigProvider>
```
<img width="1374" alt="image" src="https://github.com/user-attachments/assets/00f69c65-efaa-42db-9e34-c487d4c5d199" />

语义化：
<img width="364" alt="image" src="https://github.com/user-attachments/assets/e8895460-b908-473b-9c57-92bf644d9ee9" />

十六进制：
<img width="360" alt="image" src="https://github.com/user-attachments/assets/de7736f2-1799-4c42-aedf-292295a38de5" />


### What is expected?

期望可以支持语义化颜色

### What is actually happening?

实际不支持

| Environment | Info |
| --- | --- |
| antd | 5.23.0 |
| React | 19.0.0 |
| System | Mac OS |
| Browser | 131.0.6778.109 |

<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->
Repository: electron
Issue: Caret in focused text input stops blinking after context menu has been shown (until page is clicked)
Labels: platform/macOS,bug :beetle:,blocked/upstream ❌,has-repro-gist,33-x-y

### Preflight Checklist

- [x] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project.
- [x] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to.
- [x] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success.

### Electron Version

33.3.1

### What operating system(s) are you using?

macOS

### Operating System Version

macOS Sonoma 14.7

### What arch are you using?

arm64 (including Apple Silicon)

### Last Known Working Electron version

Behavior was the same (not working) in `31.1.0`

### Expected Behavior

When a context menu is opened using `Menu.popup()`, then closed (either using the `Escape` key, or by clicking one of the menu options) and then a text input is focused, I would expect the input caret to render normally (e.g. blinking).

### Actual Behavior

When a context menu is opened using `Menu.popup()` and then closed (either using the `Escape` key, or by clicking one of the menu options), the caret of text inputs doesn't blink (even though the input has focus and it's it's possible to write in the text input). When the page is clicked, the caret blinking goes back to normal.

### Testcase Gist URL

https://gist.github.com/heyman/4917fd8871f6bb1f322960c31f1efcdd

### Additional Information

_No response_
Repository: ant-design
Issue: The itemBg property of the Pagination component does not apply without using !important
Labels: unconfirmed

### Reproduction link

[![Edit on CodeSandbox](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/p/sandbox/gracious-brattain-5zm8km)

### Steps to reproduce

1. Configure a custom theme using `ThemeConfig` in an Ant Design project.
2. Change the `Pagination.itemBg` property to a color like `"red"`.
3. Notice that the background color is not applied to the component.
4. Apply `!important` to the `itemBg` value (e.g., `"red !important"`).
5. Observe that the background color is applied but overrides other styles

### What is expected?

The background color (`itemBg`) should be applied correctly without the need to use `!important`.

### What is actually happening?

- Without `!important`: The background color defined in `itemBg` is not applied.

| Environment | Info |
| --- | --- |
| antd | 5.23.0 |
| React | 18 |
| System | Windows |
| Browser | Chrome |

<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->
Repository: godot
Issue: Custom Resource Default settings not being set when game is exported
Labels: topic:core,needs testing

### Tested versions

Reproducible in v4.3.stable.official.
MacOS version.


Demonstrated here: https://github.com/joelldt/GodotBugTest



### System information

MacBook Pro M1 2020, macOS Sonoma Version 14.5, 16GB memory

### Issue description

The best way I can explain it is with an example. Say you have a custom resource, Item:

```gdscript
extends Resource

class_name Item

@export var name: String

@export var sound: AudioStream = load("res://assets/sound/noisy.wav")
```

You create your first item, SWORD, and in the inspector you name it "Sword" and assign an AudioStream "res://assets/sound/noisy.wav" IN THE INSPECTOR.

You then create a second item, AXE, and in the inspector you name it "Axe" and don't assign any AudioStream to it in the inspector.

If you then run your project within Godot, both the SWORD and the AXE will have the AudioStream "res://assets/sound/noisy.wav" playing when they need to be, which I guess is because the AXE gets it from the default value being = load("res://assets/sound/noisy.wav") ...

However, when you come to export your project, ONLY THE SWORD will have the audio stream playing, the axe will have no sound at all. I am not quite sure why this is? I think either the reference to the default value is lost completely (I'm not sure it always is or I think more of my game would have broken... lol...) or the res:// part is now no longer relevant in the exported version of the game (but this doesn't really make sense, again I think more of my game would have broken if that was the case).

If anyone can explain what's happening better here I'm all ears! But this does feel very unexpected (different output in Godot playback versus exported game).

### Steps to reproduce

New project.
Add an audio file to the project.
Create new custom resource class.
Add this variable to the custom resource script:

```gdscript
@export var soundEffect: AudioStream = preload("your_audio_file")
```

Add two new custom resources of this class, in one assign the audio file to the soundEffect variable in the inspector, in the other leave the inspector blank.

Create a method of calling these (I use buttons in the MRP with an audio_stream_player_2d attached) that is the same scene that has an @export var blah: your_custom_resource

In the ready() function for that scene, assign the audio stream 

```gdscript
func _ready() -> void:
	audio_stream_player.stream = item.soundEffect
```

Export the game to .exe or .dmg.

This should work fine in the Godot editor when you run the project, but the custom resource without an assigned audio will have no audio in the exported version of the game.

### Minimal reproduction project (MRP)

https://github.com/joelldt/GodotBugTest

[testproject.zip](https://github.com/user-attachments/files/18363722/testproject.zip)
Repository: vscode
Issue: Editor GPU: Double rendering after undo
Labels: bug,editor-gpu

Repro:

1. Enable editor gpu rendering, reload window
2. Go to this line in vscode: https://github.com/microsoft/vscode/blob/77027e72e5f497e72edeba40aa9360a0865eec08/extensions/terminal-suggest/src/terminalSuggestMain.ts#L243-L247
3. Delete that function
4. Undo, 🐛 bad render

![Image](https://github.com/user-attachments/assets/da017ff5-3dd9-42e1-bf9c-969e7d2c10da)
Repository: go
Issue: proposal: text/templates: custom block preprocessor
Labels: Proposal

### Proposal Details

I wanted to share a feature request that I have been seeking for a long time.   Would love to get feedback and see the appetite for this.   The templating package is simple and yet powerful by design.  Today the actions are hard coded in the parser (text/template/parse/parse.go).  Templating languages like Jinja offer custom "nodes" - extensions for user defined action types instead of the fixed ones defined by the template parser.   This would allow users to build custom functionality at parse time itself.

#### Example Usage:

```
// text/template/parse: 
// Block take a parse tree and transforms/rewrites it.
type Block interface {
    // TODO - Needs further if parent/root template is passed for sharing context etc is the right way
    HandleTree(t *parse.Tree, root *parse.Node) *parse.Node
}

type BlockMap map[string]Block

// text.template to also have an BlockMap
```

```
func main() {
    actionMap := template.BlockMap{
       "myaction": func(root *parse.Tree, node *parse.Node) *parse.Node {
           ... process/rewrite/transform body of custom action
       }
    }

    contents := `{{ myaction pipeline }} .... template body {{ end }}`
    t := template.Must(template.New("helloworld").Actions(actionMap).Parse(contents)
}
Parse(contents))
```

#### Goals:

1. Must be optin
2. Must not break existing templates
3. Must not break existing syntax
4. Functions to still be Prioritized over actions (??)
5. Minimize exposure of parser interface - currently the parser is pretty closed and we may not want to open up top-down parser completely.   eg, Should we add a new "custom node" type in the Tree?
6. [Added] Secure:   As called out in #33449 html/template performs escaping of text/template before rendering.   This must not be circumventable or incompatible.   

In this proposal when a custom action is encountered the child is parsed and passed to the action instead of the action driving its own parser - this is in line with (2).   Doing so will incur an inefficiency.  However this is optin and parsed templates can be cached making this a one off.

To address (6).  This proposal is only for a parser.   By making the parser only act as a preprocessor and rewriting the parse tree, the standard exec phase can apply.  For example a "switch" action could rewrite the body in terms of a "if/else-if" actions.

#### Use cases

##### "switch" action

```
{{ switch pipeline }}
    {{ case cond1 }}
    {{ end }}
    {{ case cond2 }}
    {{ end }}
    {{ case cond3 }}
    {{ end }}
    {{ default }} 
    {{ end }}
{{ end }}
```


##### "import" action

Instead of loading all templates, we could only provide a root template that loads its dependencies providing better isolation:

```

{{ import HomeHeader }}
{{ import HomeFooter }}

{{ define HomePage }}
   {{ template HomeHeader }} 
  .... Home Page template
   {{ template HomeFooter }} 
{{ end }}
```
Repository: transformers
Issue: Inconsistent saving of tokenizer with custom code from HF hub vs. local directory
Labels: bug,Remote code

### System Info

- `transformers` version: 4.47.1
- Platform: Linux-5.15.0-130-generic-x86_64-with-glibc2.35
- Python version: 3.10.12
- Huggingface_hub version: 0.25.2
- Safetensors version: 0.4.5
- Accelerate version: not installed
- Accelerate config: not found
- PyTorch version (GPU?): 2.4.1+cu121 (True)
- Tensorflow version (GPU?): not installed (NA)
- Flax version (CPU?/GPU?/TPU?): not installed (NA)
- Jax version: not installed
- JaxLib version: not installed
- Using distributed or parallel set-up in script?: no
- Using GPU in script?: no
- GPU type: NVIDIA RTX A6000

### Who can help?

@ArthurZucker or @itazap 

### Information

- [ ] The official example scripts
- [X] My own modified scripts

### Tasks

- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [X] My own task or dataset (give details below)

### Reproduction

https://colab.research.google.com/drive/1GPySa5JEclxzlVZbI1mg3ajWzjv3mf42?usp=sharing

When loading a tokenizer that requires custom code from HF hub and saving it, the custom Python file is not saved. In contrast, loading the same tokenizer from a local clone of the repository and saving it behaves as expected, including the custom Python file.

**Aditional context**
The output during the `save_pretrained` method lists an `added_tokens.json` file, which does not exist after saving and is not part of the original repository files. This happens regardless of where the tokenizer was loaded from.

### Expected behavior

When saving the tokenizer loaded from the HF hub, the custom Python file should be consistently included, ensuring complete functionality of the tokenizer.
Repository: ui
Issue: [bug]: Toggle pressed error data-state always closed
Labels: bug

### Describe the bug

when pressed toggle is true or false then data-state must be closed

should be data-state=on or off but here it is closed
<img width="581" alt="Jepretan Layar 2025-01-09 pukul 23 26 58" src="https://github.com/user-attachments/assets/ed54b3d8-649e-43ba-8c41-8a30302da7db" />
<img width="581" alt="Jepretan Layar 2025-01-09 pukul 23 26 25" src="https://github.com/user-attachments/assets/b8eef407-d516-4d74-9586-1462908bae6a" />


### Affected component/components

Toggle

### How to reproduce

when pressed

### Codesandbox/StackBlitz link

_No response_

### Logs

_No response_

### System Info

```bash
"next": "15.1.2",
"react": "^19.0.0",
"@radix-ui/react-toggle": "^1.1.1",
```


### Before submitting

- [X] I've made research efforts and searched the documentation
- [X] I've searched for existing issues
Repository: tauri
Issue: [bug] Listen permission problem
Labels: type: bug,status: needs triage

### Describe the bug

Hi. I'm having trouble with permission to use listen.

When I use listen in my code and run it for the first time, I get `event.listen not allowed. Command not found`

So I thought I should add the permission explicitly.

Documentation seems to indicate that `core:event:allow-listen` can be added as a permission, so I added that code to `src-tauri/capabilities/default.json`.

```
src-tauri/capabilities/default.json
{
  "$schema": "../gen/schemas/desktop-schema.json",
  "identifier": "default",
  "description": "Capability for the main window",
  "windows": ["main"],
  "permissions": [
    "core:default",
    "core:event:allow-listen",
    "shell:allow-open",
    "fs:read-all",
    "fs:write-all",
    "fs:allow-read-file",
    "fs:allow-write-file",
    {
      "identifier": "fs:scope",
      "allow": ["**/*"]
    }
  ]
}
```

However, this makes a new issue in build time. `Permission core:event:allow-listen not found`.

How can I use listen function?


### Reproduction

_No response_

### Expected behavior

_No response_

### Full `tauri info` output

```text
[✔] Environment
    - OS: Mac OS 15.1.0 arm64 (X64)
    ✔ Xcode Command Line Tools: installed
    ✔ rustc: 1.82.0 (f6e511eec 2024-10-15)
    ✔ cargo: 1.82.0 (8f40fc59f 2024-08-21)
    ✔ rustup: 1.27.1 (54dd3d00f 2024-04-24)
    ✔ Rust toolchain: stable-aarch64-apple-darwin (default)
    - node: 21.7.1
    - pnpm: 8.15.4
    - npm: 10.5.0
    - deno: deno 1.46.3

[-] Packages
    - tauri :crab:: 2.2.0
    - tauri-build :crab:: 2.0.4
    - wry :crab:: 0.48.0
    - tao :crab:: 0.31.1
    - @tauri-apps/api : 2.2.0
    - @tauri-apps/cli : 2.2.2

[-] Plugins
    - tauri-plugin-fs :crab:: 2.2.0
    - @tauri-apps/plugin-fs : 2.2.0
    - tauri-plugin-shell :crab:: 2.2.0
    - @tauri-apps/plugin-shell : 2.2.0

[-] App
    - build-type: bundle
    - CSP: unset
    - frontendDist: ../dist
    - devUrl: http://localhost:1420/
    - framework: React
    - bundler: Vite
```


### Stack trace

_No response_

### Additional context

[1]
1. npm create tauri-app@latest
2. added this code in FE React
```
useEffect(() => {
    const unlisten = listen<string>("global-mouse-event", (event) => {
      const { x, y } = JSON.parse(event.payload);
      console.log(`Mouse moved to: X=${x}, Y=${y}`);
    });

    return () => {
      unlisten.then((f) => f());
    };
  }, []);
```
3. It needed permission.
`Unhandled Promise Rejection: event. listen not allowed. Command not found`


+ so I added permission
```
{
  "$schema": "../gen/schemas/desktop-schema.json",
  "identifier": "default",
  "description": "Capability for the main window",
  "windows": ["main"],
  "permissions": ["core:default", "core:event:allow-listen", "opener:default"]
}
```
-> Same problem




[2]
It has same problem even if i rm -rf .cargo and remove src-tauri/target and reinstall rustup.
Repository: godot
Issue: `Window.move_to_center` moves the window 15 px lower than the centered initial window position.
Labels: bug,topic:gui

### Tested versions

Reproducable: 4.2-stable - 4.4.dev7
not Reproducable: 4.1-stable (function doesn't exist yet)

### System information

Godot v4.4.dev7 - Windows 10 (build 19045) - Multi-window, 2 monitors - OpenGL 3 (Compatibility) - NVIDIA GeForce RTX 2060 SUPER (NVIDIA; 32.0.15.6636) - Intel(R) Core(TM) i7-9700K CPU @ 3.60GHz (8 threads)

### Issue description

the get_window().move_to_center() is not the same position to the initial startup position of the window with default project settings.
this seems to be the case since the function got added to the engine.

### Steps to reproduce

- create a new projcet.
- make a 2d scene. give it a script
- add button to it. connect pressed signal to script

```gdscript
func _on_button_pressed() -> void:
	print(get_window().position)
	get_window().move_to_center() 
	print(get_window().position)
```

run the game and press the button.

```
printout
(2624, 381)
(2624, 396)
```
the window moves by 15 px for me.


### Minimal reproduction project (MRP)

N/A