instance_id stringlengths 21 53 | repo stringclasses 188
values | language stringclasses 1
value | pull_number int64 20 148k | title stringlengths 6 144 | body stringlengths 0 83.4k | created_at stringdate 2015-09-25 03:17:17 2025-07-10 16:50:35 | problem_statement stringlengths 188 240k | hints_text stringlengths 0 145k | resolved_issues listlengths 1 6 | base_commit stringlengths 40 40 | commit_to_review dict | reference_review_comments listlengths 1 62 | merged_commit stringlengths 40 40 | merged_patch stringlengths 297 9.87M | metadata dict |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
gradio-app__gradio-5116@d2b0578 | gradio-app/gradio | Python | 5,116 | Add support for async functions and async generators to `gr.ChatInterface` | Added async support for all of the routes: the submit function, the example function, and the API functions. Test with any async function or generator, e.g.:
```py
async def slow_echo(message, history):
for i in range(len(message)):
time.sleep(0.05)
yield "You typed: " + message[: i+1]
de... | 2023-08-07T13:45:28Z | Add support for async fn to `ChatInterface`
### Describe the bug
I tried to mount the async function to ChatInterface and got the error. Please take a look at the logs included below.
If you have suggestions on how I can implement the Chat Interface with the async function, I'd like to read them.
### Have you s... | Hi @ZeusFSX not at the moment, that's on my list of todos. Will take a look at this soon. | [
{
"body": "### Describe the bug\r\n\r\nI tried to mount the async function to ChatInterface and got the error. Please take a look at the logs included below.\r\nIf you have suggestions on how I can implement the Chat Interface with the async function, I'd like to read them.\r\n\r\n### Have you searched existing... | eaa1ce14ac41de1c23321e93f11f1b03a2f3c7f4 | {
"head_commit": "d2b05784bdedf74173417c8dcd07fdbf14c86ff6",
"head_commit_message": "chat interface",
"patch_to_review": "diff --git a/.changeset/moody-buttons-tell.md b/.changeset/moody-buttons-tell.md\nnew file mode 100644\nindex 0000000000..edaafc405b\n--- /dev/null\n+++ b/.changeset/moody-buttons-tell.md\n@@ ... | [
{
"diff_hunk": "@@ -397,67 +403,86 @@ def _display_input(\n history.append([message, None])\n return history, history\n \n- def _submit_fn(\n+ async def _submit_fn(\n self,\n message: str,\n history_with_input: list[list[str | None]],\n *args,\n **kw... | a6b47fda5002b0a6f97fed0a2c0d499ca3c49d30 | diff --git a/.changeset/moody-buttons-tell.md b/.changeset/moody-buttons-tell.md
new file mode 100644
index 0000000000..edaafc405b
--- /dev/null
+++ b/.changeset/moody-buttons-tell.md
@@ -0,0 +1,5 @@
+---
+"gradio": minor
+---
+
+feat:Add support for async functions and async generators to `gr.ChatInterface`
diff --git... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "New Feature Additions"
} |
gradio-app__gradio-4933@8ceb23c | gradio-app/gradio | Python | 4,933 | Add RTL support to `Textbox`, `Markdown`, `Chatbot` | Adds support for right-to-left languages, such as Arabic or Hebrew, to `gr.Textbox`, `gr.Markdown`, `gr.Chatbot`
I realized halfway through that this is a bit tricky, because there are two different aspects of an RTL language:
* The text should be right-aligned
* The direction of the typing should be on the left (... | 2023-07-16T21:53:40Z | RTL support in `gr.Textbox`
- [x] I have searched to see if a similar issue already exists.
**Is your feature request related to a problem? Please describe.**
I want to build Arabic demo websites.
**Describe the solution you'd like**
I want a toggle to switch the web app from `LTR` to `RTL` | Hi @MohamedAliRashad can you elaborate more on what the desired behavior is? Is it just that the `Textbox` component should support text written from RTL, or something more?
@abidlabs
I was talking more about the whole UI. An option that i can flip from `False` to `True` that transforms the whole web page from `LTR`... | [
{
"body": "- [x] I have searched to see if a similar issue already exists.\r\n\r\n\r\n**Is your feature request related to a problem? Please describe.** \r\nI want to build Arabic demo websites.\r\n\r\n**Describe the solution you'd like** \r\nI want a toggle to switch the web app from `LTR` to `RTL`\r\n",
... | 6d40cdc7c516434d498d6b1bf129cfaa1d5a7eb3 | {
"head_commit": "8ceb23c8a06f03c754ad631a541abf7e758a83d9",
"head_commit_message": "format",
"patch_to_review": "diff --git a/.config/playwright.config.js b/.config/playwright.config.js\nindex 7172e17f97..cf8fb79278 100644\n--- a/.config/playwright.config.js\n+++ b/.config/playwright.config.js\n@@ -5,5 +5,5 @@ e... | [
{
"diff_hunk": "@@ -0,0 +1,35 @@\n+<script>\n+\timport {Meta, Template, Story } from \"@storybook/addon-svelte-csf\";\n+\timport Markdown from \"./Markdown.svelte\";\n+</script>\n+\n+<Meta\n+\ttitle=\"Components/Markdown\"\n+\tcomponent={Markdown}\n+\targTypes={{\n+\t\ttext_align: {\n+\t\t\toptions: [\"left\", ... | 8e46203b81c279bc19fdcfb36d94daf37a9e90be | diff --git a/.config/playwright.config.js b/.config/playwright.config.js
index 7172e17f97..cf8fb79278 100644
--- a/.config/playwright.config.js
+++ b/.config/playwright.config.js
@@ -5,5 +5,5 @@ export default {
},
testMatch: /.*.spec.ts/,
testDir: "..",
- globalSetup: "./playwright-setup.js",
+ globalSetup: "./p... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "New Feature Additions"
} |
gradio-app__gradio-5030@0fd9d21 | gradio-app/gradio | Python | 5,030 | highlightedtext throws an error basing on model | ## Description
It closes an issue , highlightext fails with an error reported in Issue 5029 , as the model output entity key name is different , fixed to accept both entity and entity_group, not sure if there are any other possibilities.
Closes: #5029
## 🎯 PRs Should Target Issues
Before your create a PR... | 2023-07-28T02:26:18Z | Gradio Highlittext method not working
### Describe the bug
I am using,
gradio==3.39.0
gradio_client==0.3.0
i get following error ,
gradio with ner events fails with this error, highlighted_text.py", line 162, in postprocess (text[entity[“start”] : entity[“end”]], entity[“entity”]) keyerror: ‘entity’
I think t... | [
{
"body": "### Describe the bug\n\nI am using, \r\ngradio==3.39.0\r\ngradio_client==0.3.0\r\ni get following error , \r\ngradio with ner events fails with this error, highlighted_text.py\", line 162, in postprocess (text[entity[“start”] : entity[“end”]], entity[“entity”]) keyerror: ‘entity’\r\n\r\nI think the i... | c7a20e0970586319260bfe9a067f7d7d70c01d08 | {
"head_commit": "0fd9d212cab1a86e7fd5ebc43528a54d1e6cfb91",
"head_commit_message": "highlightedtext throws an error basing on model",
"patch_to_review": "diff --git a/gradio/components/highlighted_text.py b/gradio/components/highlighted_text.py\nindex 8d8c9b0d0b..37686e262a 100644\n--- a/gradio/components/highli... | [
{
"diff_hunk": "@@ -158,8 +158,9 @@ def postprocess(\n entities = sorted(entities, key=lambda x: x[\"start\"])\n for entity in entities:\n list_format.append((text[index : entity[\"start\"]], None))\n+ entity_group = \"entity_group\" if \"en... | 3b49910dbd0990f44d8a80209817dbaef4d7a975 | diff --git a/.changeset/yellow-insects-dress.md b/.changeset/yellow-insects-dress.md
new file mode 100644
index 0000000000..518d93bf24
--- /dev/null
+++ b/.changeset/yellow-insects-dress.md
@@ -0,0 +1,5 @@
+---
+"gradio": patch
+---
+
+fix:highlightedtext throws an error basing on model
diff --git a/gradio/components/h... | {
"difficulty": "low",
"estimated_review_effort": 2,
"problem_domain": "Bug Fixes"
} | |
horovod__horovod-2927@bdaa5f2 | horovod/horovod | Python | 2,927 | Refactored FilesystemStore to use fsspec to support additional remote filesystems | This adds support for various cloud storage systems like S3, GCS, ADLS, etc. in the Spark Estimators.
Fixes #2905.
Fixes #1732. | 2021-05-21T17:09:31Z | S3Store on hovorod.spark.common.store
I'm interested in using Hovorod on our Spark cluster, but I'd like to use it with S3 rather than HDFS.
Supporting ADLS storage
Currently, access to ADLS (Azure Data Lake filesystem) is not there. Is there any plans of adding support to ADLS in near term ? | Hey @nanne-aben, thanks for the feature request. I think this should be doable given that PyArrow now natively supports S3. I can try putting together a quick PR for you to try out.
Hi @tgaddair, that'd be great! Thanks! Let me know when it's there, would be more than happy to look at the PR.
Hey @nanne-aben, quick u... | [
{
"body": "I'm interested in using Hovorod on our Spark cluster, but I'd like to use it with S3 rather than HDFS. ",
"number": 1732,
"title": "S3Store on hovorod.spark.common.store"
},
{
"body": "Currently, access to ADLS (Azure Data Lake filesystem) is not there. Is there any plans of adding su... | 4bc6df80573994c8e2e9f43ea83feff8b7785e52 | {
"head_commit": "bdaa5f2557afa5dcb023692d27aba6d0349cb2bf",
"head_commit_message": "Refactored LocalStore into FilesystemStore\n\nSigned-off-by: Travis Addair <tgaddair@gmail.com>",
"patch_to_review": "diff --git a/horovod/spark/common/store.py b/horovod/spark/common/store.py\nindex e5b893722c..73e5044f5f 100644... | [
{
"diff_hunk": "@@ -275,66 +262,83 @@ def _get_full_path_or_default(self, path, default_key):\n def _get_path(self, key):\n return os.path.join(self.prefix_path, key)\n \n- def path_prefix(self):\n- raise NotImplementedError()\n+ def get_local_output_dir_fn(self, run_id):\n+ @con... | 7f63261ab7049f8cb9290e5dbb062f609375bdd8 | diff --git a/docs/mocks.py b/docs/mocks.py
index 32c2e8512e..793e0fd9cc 100644
--- a/docs/mocks.py
+++ b/docs/mocks.py
@@ -37,6 +37,9 @@ def _dummy():
'h5py',
'psutil',
+ 'fsspec',
+ 'fsspec.core',
+
'pyarrow',
'pyarrow.parquet',
diff --git a/horovod/spark/common/store.py b/horovod/spark/c... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "New Feature Additions"
} |
huggingface__trl-1865@8d61214 | huggingface/trl | Python | 1,865 | Fix SFT for VLM example | Closes #1786
For some reason, when running sft with llava 1.5 without PEFT, you get this annoying errors:
- loss explosion because of high grad norm in the visual encoder; you need to specify a low `max_grad_norm` (0.1 at least)
- when training with multiple GPUs, you get OOM error (even with batch size = 1). Not ... | 2024-07-23T19:14:36Z | Lora seems to be invalid when using vsft_llava.py
I used two A100 40g to fine-tune llava-7b with lora. When I used the lora vsft command you provided, I found that the error CUDA out of memory still appeared, so it seems that lora did not work.
My command is as follows, in which I have modified the dataset path:
```
... | cc @qgallouedec
Thanks for reporting @shijian2001. I've encountered this error too. I will provide a fix asap. Feel free to open a PR if you manage to fix it.
@qgallouedec Sorry, I haven't located the specific bug yet.
After debugging, I think there is no problem with the construction of the peft model. After forwar... | [
{
"body": "I used two A100 40g to fine-tune llava-7b with lora. When I used the lora vsft command you provided, I found that the error CUDA out of memory still appeared, so it seems that lora did not work.\r\nMy command is as follows, in which I have modified the dataset path:\r\n```\r\npython examples/scripts/... | ddf4c8dc3ecf6d9ee2b24f94c62182ffd682c808 | {
"head_commit": "8d61214956140af3d01139e9c335c1435510a12c",
"head_commit_message": "doc",
"patch_to_review": "diff --git a/docs/source/sft_trainer.mdx b/docs/source/sft_trainer.mdx\nindex f6192b26f7..a69c70135a 100644\n--- a/docs/source/sft_trainer.mdx\n+++ b/docs/source/sft_trainer.mdx\n@@ -533,12 +533,12 @@ No... | [
{
"diff_hunk": "@@ -172,13 +154,13 @@ def __call__(self, examples):\n trainer = SFTTrainer(\n model=model,\n args=training_args,\n+ data_collator=collate_fn,\n train_dataset=train_dataset,\n eval_dataset=eval_dataset,\n- dataset_text_... | 4f5cdd9614c45d76243649784b74e9121ad10277 | diff --git a/docs/source/sft_trainer.mdx b/docs/source/sft_trainer.mdx
index f6192b26f7..1ddbfed7fa 100644
--- a/docs/source/sft_trainer.mdx
+++ b/docs/source/sft_trainer.mdx
@@ -533,12 +533,12 @@ Note however, that the amount of performance gain is _dataset dependent_ and in
You can further accelerate QLoRA / LoRA ... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
horovod__horovod-2346@f6ec79f | horovod/horovod | Python | 2,346 | Support backward_passes_per_step > 1 for TF Keras Graph Mode | ## Checklist before submitting
- [x] Did you read the [contributor guide](https://github.com/horovod/horovod/blob/master/CONTRIBUTING.md)?
- [ ] Did you update the docs?
- [x] Did you write any tests to validate this change?
- [x] Did you update the [CHANGELOG](https://github.com/horovod/horovod/blob/master/CHA... | 2020-10-02T19:29:39Z | Tensorflow Keras support of Gradient Accumulation?
**Is your feature request related to a problem? Please describe.**
No, it's not related to an issue.
**Describe the solution you'd like**
Currently the API supports Gradient Accumulation in Tensorflow and Pytorch module, but not TF.keras.
The proposal is to s... | [
{
"body": "**Is your feature request related to a problem? Please describe.**\r\n\r\nNo, it's not related to an issue.\r\n\r\n**Describe the solution you'd like**\r\n\r\nCurrently the API supports Gradient Accumulation in Tensorflow and Pytorch module, but not TF.keras.\r\nThe proposal is to support GA in tf.ke... | 10064fcd702b3cb24298e25a4f4f0a71b3951bb6 | {
"head_commit": "f6ec79f79406b9a74214f89dd1bacbe7ed06586c",
"head_commit_message": "Improve TF1 Keras gradient aggregation test.\n\nSigned-off-by: aaron276h <aaron@determined.ai>",
"patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex 7baebd1b26..6e50679284 100644\n--- a/CHANGELOG.md\n+++ b/CHANGEL... | [
{
"diff_hunk": "@@ -434,8 +435,9 @@ def variables(self, *args, **kwargs):\n \n def DistributedOptimizer(optimizer, name=None, use_locking=False, device_dense='',\n device_sparse='', compression=Compression.none,\n- sparse_as_dense=False, backward_passes_per_step=... | c75e1476cb243cd20ce6927e434dc7a6e28f223f | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 7baebd1b26..6e50679284 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -8,6 +8,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
### Added
+- Added support for backward_passes_per_step > 1 for TF Keras graph mode. ([#2346](https://g... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "New Feature Additions"
} | |
home-assistant__core-110255@a9d173a | home-assistant/core | Python | 110,255 | Remove old BMW vehicles/devices automatically | ## Proposed change
<!--
Describe the big picture of your changes here to communicate to the
maintainers why we should accept this pull request. If it fixes a bug
or resolves a feature request, be sure to link to that issue in the
additional information section.
-->
~~This PR enables removal of old device... | 2024-02-11T12:02:31Z | Remove previous cars
### Describe the issue
I'm on my third BMW now, but the two previous cars are still visible in the integration with apparently no way to remove them. How can I remove the previous cars?
### Expected behavior
A way to remove previous cars - or even better - they should automatically be removed wh... | [
{
"body": "### Describe the issue\n\nI'm on my third BMW now, but the two previous cars are still visible in the integration with apparently no way to remove them. How can I remove the previous cars?\n\n### Expected behavior\n\nA way to remove previous cars - or even better - they should automatically be remove... | e38cb01d8155b1c46ecf59f0e843ac50a94bea3f | {
"head_commit": "a9d173a14b65329e8b4ad15d89cefa3e70a9cb58",
"head_commit_message": "Remove not assigned vehicles from DeviceRegistry on startup",
"patch_to_review": "diff --git a/homeassistant/components/bmw_connected_drive/__init__.py b/homeassistant/components/bmw_connected_drive/__init__.py\nindex d5a213256c3... | [
{
"diff_hunk": "@@ -146,6 +150,16 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:\n )\n )\n \n+ # Clean up vehicles which are not assigned to the account anymore\n+ account_vehicles = {(DOMAIN, v.vin) for v in coordinator.account.vehicles}\n+ device_registry... | ccdfc3575d66709859678c5793f081f7bf4e932a | diff --git a/homeassistant/components/bmw_connected_drive/__init__.py b/homeassistant/components/bmw_connected_drive/__init__.py
index d5a213256c3b1..079563b1ad335 100644
--- a/homeassistant/components/bmw_connected_drive/__init__.py
+++ b/homeassistant/components/bmw_connected_drive/__init__.py
@@ -10,7 +10,11 @@
fro... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "New Feature Additions"
} | |
hpcaitech__ColossalAI-4529@6778358 | hpcaitech/ColossalAI | Python | 4,529 | [zero]fix zero ckptIO with offload | ## 📌 Checklist before creating the PR
- [x] I have created an issue for this PR for traceability
- [x] The title follows the standard format: `[doc/gemini/tensor/...]: A concise description`
- [x] I have added relevant tags if possible for us to better distinguish different PRs
## 🚨 Issue number
> Link t... | 2023-08-28T08:24:56Z | [BUG]: ZeRO checkpoint would change the offload behavior
### 🐛 Describe the bug
In the current code, there is a lack of processing for offload when comes to checkpoints.
For example, with offload, the device of optimizer state should be `CPU`, which leads to an error when comm.
Besides, when loading the checkpoin... | [
{
"body": "### 🐛 Describe the bug\n\nIn the current code, there is a lack of processing for offload when comes to checkpoints.\r\nFor example, with offload, the device of optimizer state should be `CPU`, which leads to an error when comm.\r\n\r\nBesides, when loading the checkpoint, the device of the optimizer... | 839847b7d78bce6af5dfe58d27b5ce2c74a3619b | {
"head_commit": "67783582fae0242744152fb57edc1c3bc51b4772",
"head_commit_message": "fix unit test",
"patch_to_review": "diff --git a/colossalai/zero/low_level/low_level_optim.py b/colossalai/zero/low_level/low_level_optim.py\nindex 8f2232393240..96d5902e893f 100644\n--- a/colossalai/zero/low_level/low_level_opti... | [
{
"diff_hunk": "@@ -90,6 +90,7 @@ def exam_zero_1_torch_ddp_ckpt():\n # examine the original state dict\n for torch_state, zero_state in zip(torch_state_dict['state'].values(), zero_state_dict['state'].values()):\n for t_v, z_v in zip(torch_state.values(), zero_state.values()):\n+ pri... | 8a8c9cfdbaadaa421036c7774a435f54c661aaeb | diff --git a/colossalai/zero/low_level/low_level_optim.py b/colossalai/zero/low_level/low_level_optim.py
index 8f2232393240..96d5902e893f 100644
--- a/colossalai/zero/low_level/low_level_optim.py
+++ b/colossalai/zero/low_level/low_level_optim.py
@@ -80,9 +80,6 @@ def __init__(
tp_process_group: Optional[P... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "Bug Fixes"
} | |
gradio-app__gradio-4738@fc73bce | gradio-app/gradio | Python | 4,738 | Fix for analytics error | So this is a weird issue. It turns out that if you define two Blocks and reference components in one Blocks from the events in the other Blocks, our analytics errors out.
Here's an example (note that this is invalid Gradio):
```py
import gradio as gr
with gr.Blocks() as demo1:
t1 = gr.Textbox()
with ... | 2023-06-29T23:43:21Z | KeyError: 13 in analytics.py
### Describe the bug
I encountered a KeyError: 13 error while using the Gradio library. The error occurred in the analytics.py file on line 126. Here is the full error message:
File "C:\Users\●●●\AppData\Local\Programs\Python\Python310\lib\site-packages\gradio\analytics.py", line 126, i... | I get the same error the only difference being key error : 64
Hi @dachi920 or @arian81 can you provide a well-formatted and self-contained code example we can use to reproduce this issue?
well the issue is resolved after I restarted my jupyter kerne. I don't have specific way of reproducing the bug yet. The problem be... | [
{
"body": "### Describe the bug\n\nI encountered a KeyError: 13 error while using the Gradio library. The error occurred in the analytics.py file on line 126. Here is the full error message:\r\n\r\nFile \"C:\\Users\\●●●\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\gradio\\analytics.py\", li... | 0b7340f900011a110050bb2be35627b3379bdfa7 | {
"head_commit": "fc73bcee68b17bbeed6e9dcfd2f53a6ceba41932",
"head_commit_message": "format",
"patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex 5a140f6043..6b63ba96e4 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -43,6 +43,8 @@\n - Update depedencies by [@pngwn](https://github.com/pngwn) in... | [
{
"diff_hunk": "@@ -216,6 +216,17 @@ def test_initiated_analytics(self, mock_post, monkeypatch):\n pass\n mock_post.assert_called_once()\n \n+ def test_launch_analytics_does_not_error_with_invalid_blocks(self, monkeypatch):\n+ monkeypatch.setenv(\"GRADIO_ANALYTICS_ENABLED\", \"True... | f5608f45650040717c5801d90be6064f2ffabcaa | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5a140f6043..6b63ba96e4 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -43,6 +43,8 @@
- Update depedencies by [@pngwn](https://github.com/pngwn) in [PR 4643](https://github.com/gradio-app/gradio/pull/4643)
- The theme builder now launches successfully, and the API docs a... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
huggingface__trl-1229@e35225a | huggingface/trl | Python | 1,229 | [`core` / SFTTrainer] Fix breaking change | # What does this PR do?
fixes a breaking change on a recent PR: https://github.com/huggingface/trl/pull/1188
Fixes: https://github.com/huggingface/trl/issues/1216
In fact, if one uses the default data collator + `remove_unused_columns=False`, the training script fails for some datasets such as imdb as the coll... | 2024-01-15T13:44:51Z | Failed to load data in trl 0.7.8/0.7.9.
This is a new regression introduced in trl 0.7.8 (and 0.7.9), 0.7.7 is fine.
We run into issues of `ValueError: too many dimensions 'str'` when loading data to the trainer.
Here's a simple LLAMA2+LoRA fine-tuning on IMDB dataset as minimal repro:
```py3
#!/usr/bin/env pyt... | Thanks for the repro @xkszltl , will try to repro and fix the issue and make another patch release
Hi @xkszltl
it seems to be caused by `remove_unused_columns=False,`, can you meanwhile either revert to 0.7.7 or set `remove_unused_columns=True` ? I'll try to provide the right fix meanwhile
True won't work at all (reg... | [
{
"body": "This is a new regression introduced in trl 0.7.8 (and 0.7.9), 0.7.7 is fine.\r\n\r\nWe run into issues of `ValueError: too many dimensions 'str'` when loading data to the trainer.\r\nHere's a simple LLAMA2+LoRA fine-tuning on IMDB dataset as minimal repro:\r\n\r\n```py3\r\n#!/usr/bin/env python3\r\n\... | ef209e311f25a017518cedd95a7964eea09c87b3 | {
"head_commit": "e35225a8160ee13cf05b221e5ec7091acfdc9cff",
"head_commit_message": "fix",
"patch_to_review": "diff --git a/trl/trainer/sft_trainer.py b/trl/trainer/sft_trainer.py\nindex 8d3320969e..3743f299cd 100644\n--- a/trl/trainer/sft_trainer.py\n+++ b/trl/trainer/sft_trainer.py\n@@ -243,6 +243,10 @@ def mak... | [
{
"diff_hunk": "@@ -424,7 +434,18 @@ def tokenize(element):\n else:\n self._dataset_sanity_checked = True\n \n- return {\"input_ids\": outputs[\"input_ids\"], \"attention_mask\": outputs[\"attention_mask\"]}\n+ return {\n+ \"input_ids\": o... | 68849f0c32285910338b2b26d85a0999797526ed | diff --git a/tests/slow/test_sft_slow.py b/tests/slow/test_sft_slow.py
index e6634f6fca..68299dbe34 100644
--- a/tests/slow/test_sft_slow.py
+++ b/tests/slow/test_sft_slow.py
@@ -53,8 +53,8 @@ def tearDown(self):
torch.cuda.empty_cache()
gc.collect()
- @parameterized.expand(list(itertools.product... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
horovod__horovod-2058@ec961d4 | horovod/horovod | Python | 2,058 | Added reset limit for elastic mode to prevent introducing excessive variance | Fixes #1947. | 2020-06-24T22:05:38Z | Add reset limit when running in elastic mode
The user should be able to optionally specify a hard limit on the number of reset events that can occur, with an optional sliding window.
For example:
```
horovodrun --reset-limit 3
```
Or:
```
horovodrun --reset-limit 3 --reset-limit-window-duration 60
```
... | [
{
"body": "The user should be able to optionally specify a hard limit on the number of reset events that can occur, with an optional sliding window.\r\n\r\nFor example:\r\n\r\n```\r\nhorovodrun --reset-limit 3\r\n```\r\n\r\nOr:\r\n\r\n```\r\nhorovodrun --reset-limit 3 --reset-limit-window-duration 60\r\n```\r\n... | f1b000fbb5313e7914cf48bac6e7eff251537b35 | {
"head_commit": "ec961d446770a9eb8e7276d1a04a81af7e26c93f",
"head_commit_message": "Added reset limit for Spark\n\nSigned-off-by: Travis Addair <taddair@uber.com>",
"patch_to_review": "diff --git a/horovod/run/elastic/constants.py b/horovod/run/elastic/constants.py\nnew file mode 100644\nindex 0000000000..2fc547... | [
{
"diff_hunk": "@@ -130,6 +135,13 @@ def _action(self):\n def _on_workers_recorded(self):\n logging.info('all {} workers recorded'.format(self.size()))\n \n+ # Check that we have already reset the maximum number of allowed times",
"line": null,
"original_line": 138,
"original_star... | 35604cdbdc3e8fc1b6f6a9e92a113cc665990f91 | diff --git a/horovod/run/elastic/constants.py b/horovod/run/elastic/constants.py
new file mode 100644
index 0000000000..2fc5479784
--- /dev/null
+++ b/horovod/run/elastic/constants.py
@@ -0,0 +1,16 @@
+# Copyright 2020 Uber Technologies, Inc. All Rights Reserved.
+#
+# Licensed under the Apache License, Version 2.0 (th... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "New Feature Additions"
} | |
huggingface__trl-979@e7618ec | huggingface/trl | Python | 979 | [SFT Trainer] precompute packed iterable into a dataset | With this PR we'll precompute the packed iterable dataloader and push it into a dataset. That will make sure the epoch estimate is right and we have a working progress bar.
Fixes #1008 #1004 | 2023-11-10T14:51:15Z | SFTTrainer training stops early?
It seems it just happen today. Has anyone met the error where the training stops early? For example, it should have run 1000 steps but stops after 300 steps, and giving a output like:
`TrainOutput(global_step=100, training_loss=1.2991660499572755, metrics={'train_runtime': 855.9696,... | seems caused by `packing = True`
Yes, when you pack it can happen that you end up with fewer samples if the average length of samples is shorter than the sequence length.
Should be fixed in #979. | [
{
"body": "It seems it just happen today. Has anyone met the error where the training stops early? For example, it should have run 1000 steps but stops after 300 steps, and giving a output like:\r\n\r\n`TrainOutput(global_step=100, training_loss=1.2991660499572755, metrics={'train_runtime': 855.9696, 'train_sa... | 9e9f024399b76842ece3552884bbc4f304fd4153 | {
"head_commit": "e7618ecae3082d009b3564fd1319be30a576e430",
"head_commit_message": "fix test",
"patch_to_review": "diff --git a/tests/test_sft_trainer.py b/tests/test_sft_trainer.py\nindex 100aeed970..0fe8d1627a 100644\n--- a/tests/test_sft_trainer.py\n+++ b/tests/test_sft_trainer.py\n@@ -178,9 +178,21 @@ def te... | [
{
"diff_hunk": "@@ -376,6 +369,52 @@ def tokenize(element):\n \n return tokenized_dataset\n \n+ def _prepare_packed_dataloader(\n+ self,\n+ tokenizer,\n+ dataset,\n+ dataset_text_field,\n+ max_seq_length,\n+ num_of_sequences,\n+ chars_per_token,\n+ ... | 30e507238c9621bd3ebdc186ba2aa7797eae665f | diff --git a/tests/test_sft_trainer.py b/tests/test_sft_trainer.py
index 100aeed970..0fe8d1627a 100644
--- a/tests/test_sft_trainer.py
+++ b/tests/test_sft_trainer.py
@@ -178,9 +178,21 @@ def test_sft_trainer_uncorrect_data(self):
args=training_args,
train_dataset=self.dummy_dataset,
... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
huggingface__trl-687@4b5e45b | huggingface/trl | Python | 687 | Fix: RuntimeError: 'weight' must be 2-D issue | Fix #669
# Problem description
In ZeRO3, issues like #669 are caused by running `deepspeed.initialize` on only one of the two models passed to DPO_Trainer.
Most users use `.from_pretrained` to get the weight of the model, and inside from_pretrained is the code below.
```python
if is_deepspeed_zero3_enabl... | 2023-08-24T13:39:43Z | DeepSpeed Zero3 dpo accured embedding weight error
i used `Open-Orca/OpenOrca-Platypus2-13B` and dpo error accured
dataset is used `Anthropic/hh-rlhf`
``` python3
Traceback (most recent call last):
File "/data/workspace/train/train_dpo.py", line 133, in <module>
main(model_args=model_args, dataset_args=dat... | also have the same problem with zero3
cc @vwxyzjn who is currently looking at DS
i find that problem is accured by `ref_wav`'s set accelerate initialize....
ref_wav can not prepare for deepspeed. because using just `prepare()` not `prepare_model()`
`prepare` is for inference, i think. ref_wav must be freezed but no... | [
{
"body": "i used `Open-Orca/OpenOrca-Platypus2-13B` and dpo error accured\r\ndataset is used `Anthropic/hh-rlhf`\r\n\r\n``` python3\r\nTraceback (most recent call last):\r\n File \"/data/workspace/train/train_dpo.py\", line 133, in <module>\r\n main(model_args=model_args, dataset_args=dataset_args, trainin... | d3bbee3ab84d4d5dcb413003bf93541df5b4e54c | {
"head_commit": "4b5e45b72b6362e1c2215d0d849fb6914401a22c",
"head_commit_message": "Fix: self.args.deepspeed > self.is_deepspeed_enabled",
"patch_to_review": "diff --git a/trl/trainer/dpo_trainer.py b/trl/trainer/dpo_trainer.py\nindex ff4d7a504d..17936d4c24 100644\n--- a/trl/trainer/dpo_trainer.py\n+++ b/trl/tra... | [
{
"diff_hunk": "@@ -205,7 +205,11 @@ def __init__(\n \"You are using a `peft` version that does not support `disable_adapter`. Please update your `peft` version to the latest version.\"\n )\n else:\n- self.ref_model = self.accelerator.prepare_model(self.ref... | 412f8fb9e88d638a4ef8feced18110a6a3d90916 | diff --git a/trl/trainer/dpo_trainer.py b/trl/trainer/dpo_trainer.py
index ff4d7a504d..92caec8190 100644
--- a/trl/trainer/dpo_trainer.py
+++ b/trl/trainer/dpo_trainer.py
@@ -205,7 +205,12 @@ def __init__(
"You are using a `peft` version that does not support `disable_adapter`. Please update your `... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "Bug Fixes"
} |
gradio-app__gradio-4661@4657279 | gradio-app/gradio | Python | 4,661 | fix upload file delay | There was a delay between an uploaded file and then trigger for `change` and `upload` listeners. This was caused by the fact that files were actually getting uploaded *twice*, once in the svelte File component, and once in the client library when submitting data. This us because the client looks to see if there's any b... | 2023-06-23T19:45:28Z | Delay between file upload and change file handler with no animation
### Describe the bug
If there's a File component with a change listener, there's a period of time between upload and firing the change event with no pending animation. Can be very long when uploading large files, especially on Spaces.
### Is the... | [
{
"body": "### Describe the bug\r\n\r\nIf there's a File component with a change listener, there's a period of time between upload and firing the change event with no pending animation. Can be very long when uploading large files, especially on Spaces. \r\n\r\n### Is there an existing issue for this?\r\n\r\n- [... | 9e13cf3890de3024c729031f763767c82d3b7d63 | {
"head_commit": "465727949ce6d8439ad6f813c1efd7ad744c2e97",
"head_commit_message": "changes",
"patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex b91b22a0ae..f197b754da 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -18,6 +18,7 @@\n - Fixed Dropdown height rendering in Columns by [@aliabid94]... | [
{
"diff_hunk": "@@ -80,10 +81,11 @@\n \t\t\t\t\t\t\t\t\tfile_data.orig_name = file_data.name;\n \t\t\t\t\t\t\t\t\tfile_data.name = response.files[i];\n \t\t\t\t\t\t\t\t\tfile_data.is_file = true;\n+\t\t\t\t\t\t\t\t\tfile_data.blob = null;",
"line": null,
"original_line": 84,
"original_start_line": n... | 07e692d61de86ef03d328572b4b62774b890f169 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index b91b22a0ae..f197b754da 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -18,6 +18,7 @@
- Fixed Dropdown height rendering in Columns by [@aliabid94](https://github.com/aliabid94) in [PR 4584](https://github.com/gradio-app/gradio/pull/4584)
- Fixed bug where `AnnotatedImag... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} | |
horovod__horovod-1193@bae8fbd | horovod/horovod | Python | 1,193 | Initial support for TensorFlow 2.0 | * Support for TensorFlow 2.0 in `horovod.tensorflow`
* Replace RMSProp with Adam (RMSProp doesn't scale)
* Minor example bugfixes
Fixes #1177 | 2019-07-04T06:45:06Z | Horovod GradientTape performance for Tensorflow
**Environment:**
1. Framework: Tensorflow
2. Framework version: 1.12
3. Horovod version:0.16.4
4. MPI version: Mvapich-GDR 2.3.1
5. CUDA version: 9.2
6. NCCL version:
7. Python version: 3.6
8. OS and version: Red Hat Enterprise Linux Server, 7.5 (Maipo)
9. GCC v... | This is not expected. @tgaddair, could you take a look?
@aj-prime, by the way, any reason you're not using NCCL?
@alsrgv No specific reason
@aj-prime, NCCL will give you better performance on GPU compared to MPI. That said, I do see a slowdown of Eager TF compared to a regular TF even with NCCL in my environment.
@al... | [
{
"body": "**Environment:**\r\n1. Framework: Tensorflow\r\n2. Framework version: 1.12\r\n3. Horovod version:0.16.4\r\n4. MPI version: Mvapich-GDR 2.3.1\r\n5. CUDA version: 9.2\r\n6. NCCL version:\r\n7. Python version: 3.6\r\n8. OS and version: Red Hat Enterprise Linux Server, 7.5 (Maipo)\r\n9. GCC version: xl/2... | 107d740a4055dc81c0c142dfa21ee2433189928a | {
"head_commit": "bae8fbde425982c9e3827a38f92447e0627c89b1",
"head_commit_message": "Bugfix Keras test exclusion logic\n\nSigned-off-by: Alex Sergeev <alsrgv@users.noreply.github.com>",
"patch_to_review": "diff --git a/.buildkite/gen-pipeline.sh b/.buildkite/gen-pipeline.sh\nindex c0fbddc3e6..af85d3ac5e 100755\n-... | [
{
"diff_hunk": "@@ -304,13 +273,69 @@ def DistributedGradientTape(gradtape, device_dense='', device_sparse='',\n performance and memory utilization if the original sparse gradient\n has high density. Defaults to false.\n \"\"\"\n- cls = type(gradtape.__class__.__name__, (gradtape.__class... | b316a9c881595eb7c752ded82624df3731695a6b | diff --git a/.buildkite/gen-pipeline.sh b/.buildkite/gen-pipeline.sh
index c0fbddc3e6..af85d3ac5e 100755
--- a/.buildkite/gen-pipeline.sh
+++ b/.buildkite/gen-pipeline.sh
@@ -17,6 +17,9 @@ tests=( \
test-cpu-openmpi-py2_7-tf1_14_0-keras2_2_4-torch1_1_0-mxnet1_4_1-pyspark2_4_0 \
test-cpu-openmpi-py3_5-tf... | {
"difficulty": "high",
"estimated_review_effort": 4,
"problem_domain": "Performance Optimizations"
} |
home-assistant__core-108594@16a4c88 | home-assistant/core | Python | 108,594 | Add configure option to Vodafone Station for consider home | <!--
You are amazing! Thanks for contributing to our project!
Please, DO NOT DELETE ANY TEXT from this template! (unless instructed).
-->
## Breaking change
<!--
If your PR contains a breaking change for existing users, it is important
to tell them what breaks, how to make it work again and why we did th... | 2024-01-21T17:26:29Z | Vodafone Station 6 shows device trackers as always "home"
### The problem
Installed the integration and it works quite well but the "consider home" parameter setting is missing. Navigated to the cogwheel but there are only the standard settings.
When disconnected, the device trackers remain "home".
### What ve... | Hey there @paoloantinori, @chemelli74, mind taking a look at this issue as it has been labeled with an integration (`vodafone_station`) you are listed as a [code owner](https://github.com/home-assistant/core/blob/dev/CODEOWNERS#L1395) for? Thanks!
<details>
<summary>Code owner commands</summary>
Code owners of `voda... | [
{
"body": "### The problem\r\n\r\nInstalled the integration and it works quite well but the \"consider home\" parameter setting is missing. Navigated to the cogwheel but there are only the standard settings.\r\n\r\nWhen disconnected, the device trackers remain \"home\".\r\n\r\n### What version of Home Assistant... | b4ab1bac56ca37f747933f3761589d8d7f4538d3 | {
"head_commit": "16a4c88e907d424d0710ae2e736a2b6c44e750ef",
"head_commit_message": "add test",
"patch_to_review": "diff --git a/homeassistant/components/vodafone_station/config_flow.py b/homeassistant/components/vodafone_station/config_flow.py\nindex dc33d0db52b443..21cc4fe5fc35ed 100644\n--- a/homeassistant/com... | [
{
"diff_hunk": "@@ -133,3 +141,31 @@ async def async_step_reauth_confirm(\n data_schema=STEP_REAUTH_DATA_SCHEMA,\n errors=errors,\n )\n+\n+\n+class VodafoneStationOptionsFlowHandler(OptionsFlow):\n+ \"\"\"Handle a option flow.\"\"\"\n+\n+ def __init__(self, config_entry: Co... | 65e3c018605d67aecacf57b4f95dcf7ca36c374a | diff --git a/homeassistant/components/vodafone_station/__init__.py b/homeassistant/components/vodafone_station/__init__.py
index 6696092175010..b4c44ea91305f 100644
--- a/homeassistant/components/vodafone_station/__init__.py
+++ b/homeassistant/components/vodafone_station/__init__.py
@@ -24,6 +24,8 @@ async def async_s... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
huggingface__trl-539@150c9a1 | huggingface/trl | Python | 539 | Relax reward trainer constraint | Fixes https://github.com/lvwerra/trl/issues/535
We should relax the constraint for users in case they implement their own Data collator when using `RewardTrainer`.
cc @lvwerra | 2023-07-19T10:06:24Z | Use my own compute_loss with RewardTrainer
Hi. I want to use my own RewardModel (not inherited from AutoModelForSequenceClassification)
But, i got message like below.
```
compute_loss is only implemented for RewardDataCollatorWithPadding, please implement your own compute_loss method if you are using a custom data... | Hi @allzero-kwon, it looks like you passed a custom data collator which is why you get this message. @younesbelkada maybe we don't need to through an error here, no? since a user might pass a viable alternative to the default collator that does not require writing a custom loss?
In any case, if you want to write you... | [
{
"body": "Hi. I want to use my own RewardModel (not inherited from AutoModelForSequenceClassification)\r\n\r\nBut, i got message like below.\r\n```\r\ncompute_loss is only implemented for RewardDataCollatorWithPadding, please implement your own compute_loss method if you are using a custom data collator\r\n```... | 7f297b38c665e6d2357dfd5ba552ef685afe1302 | {
"head_commit": "150c9a12c5c95c6b7dd39f10182ceb3ff1b1c7ce",
"head_commit_message": "relax reward trainer constraint",
"patch_to_review": "diff --git a/trl/trainer/reward_trainer.py b/trl/trainer/reward_trainer.py\nindex 8649dfb502..44c963d52c 100644\n--- a/trl/trainer/reward_trainer.py\n+++ b/trl/trainer/reward_... | [
{
"diff_hunk": "@@ -161,8 +161,10 @@ def compute_loss(\n return_outputs=False,\n ) -> Union[torch.Tensor, Tuple[torch.Tensor, Dict[str, torch.Tensor]]]:\n if not self.use_reward_data_collator:\n- raise NotImplementedError(\n- \"compute_loss is only implemented for R... | e59d58de583b4cc30ff58f621e7338626d4441da | diff --git a/trl/trainer/dpo_trainer.py b/trl/trainer/dpo_trainer.py
index 6218fc7512..4ae9551b20 100644
--- a/trl/trainer/dpo_trainer.py
+++ b/trl/trainer/dpo_trainer.py
@@ -353,8 +353,9 @@ def compute_loss(
return_outputs=False,
) -> Union[torch.Tensor, Tuple[torch.Tensor, Dict[str, torch.Tensor]]]:
... | {
"difficulty": "low",
"estimated_review_effort": 2,
"problem_domain": "Bug Fixes"
} |
hpcaitech__ColossalAI-4153@dd3657d | hpcaitech/ColossalAI | Python | 4,153 | [zero] allow passing process group to zero12 | ## 📌 Checklist before creating the PR
- [x] I have created an issue for this PR for traceability
- [x] The title follows the standard format: `[doc/gemini/tensor/...]: A concise description`
- [x] I have added relevant tags if possible for us to better distinguish different PRs
## 🚨 Issue number
> Link t... | 2023-07-04T05:57:09Z | [zero] pass process_group for low level zero
The `gpc` and the `ColoProcessGroup` would be removed after.
Therefore, leaving an interface that allows users to pass a process_group is needed to support the new ProcessGroupMesh.
For compatible with current codes, if no procss_group is passing, the default one would be u... | [
{
"body": "The `gpc` and the `ColoProcessGroup` would be removed after.\nTherefore, leaving an interface that allows users to pass a process_group is needed to support the new ProcessGroupMesh.\n\nFor compatible with current codes, if no procss_group is passing, the default one would be use.",
"number": 415... | a1bf51726f0e4d8b5929b247a752a4dce2dc68d1 | {
"head_commit": "dd3657dcb0b3aa05084dee4a24fc4549fe89fafc",
"head_commit_message": "allow passing process group to zero12",
"patch_to_review": "diff --git a/colossalai/zero/__init__.py b/colossalai/zero/__init__.py\nindex 3465079e4fbb..ce5dabe742b5 100644\n--- a/colossalai/zero/__init__.py\n+++ b/colossalai/zero... | [
{
"diff_hunk": "@@ -506,3 +469,47 @@ def no_sync(self):\n yield\n finally:\n self.require_grad_sync = old_require_grad_sync\n+\n+\n+class LowLevelZeroOptimizer(TPLowLevelZeroOptimizer):",
"line": null,
"original_line": 474,
"original_start_line": null,
"path": "co... | 5ac28573299795fd94825c5b6a2596cfc3034276 | diff --git a/colossalai/zero/low_level/_utils.py b/colossalai/zero/low_level/_utils.py
index a9e552ebdabc..4205a9891534 100644
--- a/colossalai/zero/low_level/_utils.py
+++ b/colossalai/zero/low_level/_utils.py
@@ -3,8 +3,9 @@
import torch
import torch.distributed as dist
-from torch import inf
+from torch import T... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "New Feature Additions"
} | |
hpcaitech__ColossalAI-4094@2e259c3 | hpcaitech/ColossalAI | Python | 4,094 | [chat] remove naive strategy and split colossalai strategy | ## 📌 Checklist before creating the PR
- [x] I have created an issue for this PR for traceability
- [x] The title follows the standard format: `[doc/gemini/tensor/...]: A concise description`
- [x] I have added relevant tags if possible for us to better distinguish different PRs
## 🚨 Issue number
> Link t... | 2023-06-27T07:25:57Z | [chat] remove naive strategy
## Description
`NaiveStrategy` is actually a strategy wrapper doing nothing.
## TODOs
- [x] Remove `NaiveStrategy.`
[chat] split colossalai strategy into gemini and low level zero strategy
## Description
`Gemini` strategy and low-level `Zero` strategy are somewhat different.
#... | [
{
"body": "## Description\r\n\r\n`NaiveStrategy` is actually a strategy wrapper doing nothing.\r\n\r\n## TODOs\r\n- [x] Remove `NaiveStrategy.`",
"number": 4084,
"title": "[chat] remove naive strategy"
},
{
"body": "## Description\r\n\r\n`Gemini` strategy and low-level `Zero` strategy are somewh... | b03d64d010cb6803b66230a0386bc62d989e6ef6 | {
"head_commit": "2e259c3b39b428e1c0bce76b81a361bd23ed7ba0",
"head_commit_message": "fix: align with modified colossal strategy",
"patch_to_review": "diff --git a/applications/Chat/README.md b/applications/Chat/README.md\nindex 082cbb22b587..016272ed8c89 100644\n--- a/applications/Chat/README.md\n+++ b/applicatio... | [
{
"diff_hunk": "@@ -29,22 +40,37 @@ def __init__(self,\n self.seed = seed\n super().__init__(plugin_initializer)\n \n+ def _try_init_dist(self, force: bool = False) -> None:\n+ try:\n+ rank = int(os.environ['RANK'])\n+ local_rank = int(os.environ['LOCAL_RANK'])\n+... | f1808a4660007032f20c890ebaffc29784f7b91e | diff --git a/applications/Chat/README.md b/applications/Chat/README.md
index 082cbb22b587..016272ed8c89 100644
--- a/applications/Chat/README.md
+++ b/applications/Chat/README.md
@@ -287,7 +287,7 @@ If you only have a single 24G GPU, you can use the following script. `batch_size
torchrun --standalone --nproc_per_node=... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "Code Refactoring / Architectural Improvement"
} | |
gradio-app__gradio-4608@6dc45de | gradio-app/gradio | Python | 4,608 | Use Literal Type Hint Where Possible | ## Description
Closes: #4599

## 🎯 PRs Should Target Issues
Before your create a PR, please check to see if there is [an existing issue](https://github.com/gradio-app/gradio/issues) for this change. If not,... | 2023-06-21T16:34:37Z | Use literal type hint in component parameters
- [ ] I have searched to see if a similar issue already exists.
**Is your feature request related to a problem? Please describe.**
There are some places in the code where a string value is expected from a finite list of possibilities. Like `source` in `Video`. These... | [
{
"body": "- [ ] I have searched to see if a similar issue already exists.\r\n\r\n\r\n**Is your feature request related to a problem? Please describe.** \r\nThere are some places in the code where a string value is expected from a finite list of possibilities. Like `source` in `Video`. These arguments are type... | a35e37b7e2c867e53318dc3fcb605306b5a645bb | {
"head_commit": "6dc45decf64f6262186ecefaa733e63a8394e505",
"head_commit_message": "CHANGELOG",
"patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex a8dce218c5..d07c0a1cb0 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -18,6 +18,7 @@\n ## Other Changes:\n \n - Update frontend dependencies in [... | [
{
"diff_hunk": "@@ -59,11 +59,11 @@ def __init__(\n shape: tuple[int, int] | None = None,\n height: int | None = None,\n width: int | None = None,\n- image_mode: str = \"RGB\",\n+ image_mode: Literal[\"RGB\", \"L\"] = \"RGB\",",
"line": null,
"original_line": 62,
... | a9972496b432cea77bbbda3324774351d3532b89 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index bdcbe346e6..76dc1f7321 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -21,6 +21,7 @@
- Add `.git-blame-ignore-revs` by [@akx](https://github.com/akx) in [PR 4586](https://github.com/gradio-app/gradio/pull/4586)
- Update frontend dependencies in [PR 4601](https://githu... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "New Feature Additions"
} | |
gradio-app__gradio-4436@b5a3200 | gradio-app/gradio | Python | 4,436 | Adds `variant` and `interactive` props to `gr.UploadButton` | Closes: #4364
Test code:
```py
import gradio as gr
with gr.Blocks() as demo:
gr.Button()
gr.Button(interactive=False)
gr.Button(variant="primary")
gr.Button(variant="stop", interactive=False)
gr.UploadButton()
gr.UploadButton(interactive=False)
gr.UploadButton(variant="prim... | 2023-06-06T16:43:29Z | UploadButton cannot be made non-interactive
### Describe the bug
The UploadButton can be made non-interactive but I can imagine a use case where this is desired: While a function is running prevent the user from uploading another file.
### Is there an existing issue for this?
- [X] I have searched the existing i... | As discussed via Slack DM, I'd like to give this a shot @pngwn | [
{
"body": "### Describe the bug\n\nThe UploadButton can be made non-interactive but I can imagine a use case where this is desired: While a function is running prevent the user from uploading another file.\r\n\r\n\n\n### Is there an existing issue for this?\n\n- [X] I have searched the existing issues\n\n### Re... | e06317bd0036e7cddc3d1936e2fb7e77fcb5a822 | {
"head_commit": "b5a3200b6b52031fe8d291f3a621ce1d693ad9e6",
"head_commit_message": "formatting",
"patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex b011504189..9597243d11 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -2,7 +2,7 @@\n \n ## New Features:\n \n-No changes to highlight.\n+- The `... | [
{
"diff_hunk": "@@ -16,6 +16,9 @@\n \texport let file_count: string;\n \texport let file_types: Array<string> = [\"file\"];\n \texport let root: string;\n+\texport let mode: \"static\" | \"dynamic\" = \"dynamic\";\n+\texport let variant: \"primary\" | \"secondary\" | \"stop\" = \"secondary\";\n+\tconsole.log(\"... | 69b861e4a0946bc876a15e270bc480cf74a83fcb | diff --git a/CHANGELOG.md b/CHANGELOG.md
index b011504189..9597243d11 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,7 +2,7 @@
## New Features:
-No changes to highlight.
+- The `gr.UploadButton` component now supports the `variant` and `interactive` parameters by [@abidlabs](https://github.com/abidlabs) in [PR... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
huggingface__trl-261@d19ad7b | huggingface/trl | Python | 261 | Add LlaMa in tests + `create_reference_model` | # What does this PR do?
Fixes https://github.com/lvwerra/trl/issues/258
Before this PR, Llama was not supported by `create_reference_model`, hence users needed to manually define the pattern of the layers to properly create a reference model, and this can be error prone.
This PR simply adds the Llama layer patte... | 2023-03-29T07:20:06Z | Debugging `create_reference_model` + `ValueError: optimizer got an empty parameter list`
I'm using the `create_reference_model` function to debug using LLaMA models with shared parameters, but when I use the default optimizer, I get the error that `ValueError: optimizer got an empty parameter list`.
I looked up the ... | [
{
"body": "I'm using the `create_reference_model` function to debug using LLaMA models with shared parameters, but when I use the default optimizer, I get the error that `ValueError: optimizer got an empty parameter list`.\r\n\r\nI looked up the pattern used in the llama models, and it should be correct here:\r... | 237eb9c6a5b1f90f6ccb674269bd7a33533e4bf7 | {
"head_commit": "d19ad7bd9596e74d057b950a9c1f86e5ee3ce9b5",
"head_commit_message": "add LlaMa in tests",
"patch_to_review": "diff --git a/tests/test_modeling_value_head.py b/tests/test_modeling_value_head.py\nindex 25c7096225..ba44288cc6 100644\n--- a/tests/test_modeling_value_head.py\n+++ b/tests/test_modeling_... | [
{
"diff_hunk": "@@ -30,6 +30,7 @@\n \"trl-internal-testing/tiny-random-BloomForCausalLM\",\n \"trl-internal-testing/tiny-random-GPT2LMHeadModel\",\n \"trl-internal-testing/tiny-random-CodeGenForCausalLM-sharded\",\n+ \"trl-internal-testing/tiny-random-LlamaForCausalLM\",",
"line": null,
"... | 320ed836744cd060caef202acb08b48d50b21dfa | diff --git a/tests/test_modeling_value_head.py b/tests/test_modeling_value_head.py
index 25c7096225..1e075db7ea 100644
--- a/tests/test_modeling_value_head.py
+++ b/tests/test_modeling_value_head.py
@@ -30,6 +30,7 @@
"trl-internal-testing/tiny-random-BloomForCausalLM",
"trl-internal-testing/tiny-random-GPT2LM... | {
"difficulty": "low",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} | |
huggingface__trl-239@783c0b4 | huggingface/trl | Python | 239 | [`core`] Add warning when negative KL | # What does this PR do?
Fixes: #235
The warning message will be displayed only once, if there is a repetition, as described in the official documentation of `warnings` package: https://docs.python.org/2/library/warnings.html / https://stackoverflow.com/questions/22661745/why-only-one-warning-in-a-loop
cc @lvw... | 2023-03-22T10:32:07Z | Add warning when KL-divergence is negative
A common failure mode of the training is that the generation kwargs are not correctly set which leads to negative KL-divergence which is almost always a precursor for failed training. We should at least show a warning when this happens. | [
{
"body": "A common failure mode of the training is that the generation kwargs are not correctly set which leads to negative KL-divergence which is almost always a precursor for failed training. We should at least show a warning when this happens.",
"number": 235,
"title": "Add warning when KL-divergenc... | a6ebdb6e757ddbce3f9cfa4794f1fb81e0cf3966 | {
"head_commit": "783c0b40f93bb7009621c191f35410cf4df2924c",
"head_commit_message": "fix",
"patch_to_review": "diff --git a/trl/trainer/ppo_trainer.py b/trl/trainer/ppo_trainer.py\nindex dec8eefd32..66da3415b1 100644\n--- a/trl/trainer/ppo_trainer.py\n+++ b/trl/trainer/ppo_trainer.py\n@@ -985,6 +985,14 @@ def rec... | [
{
"diff_hunk": "@@ -993,6 +985,14 @@ def record_step_stats(self, kl_coef: float, **data):\n \n mean_non_score_reward = masked_mean(data[\"non_score_reward\"], mask)\n \n+ if mean_kl.item() < 0.0:\n+ # warn users\n+ warnings.warn(\n+ f\"KL divergence is startin... | 3c4fcbbc7daaf768ccb8f81dee7e0e0388859dbc | diff --git a/trl/trainer/ppo_trainer.py b/trl/trainer/ppo_trainer.py
index dec8eefd32..57f61b4c35 100644
--- a/trl/trainer/ppo_trainer.py
+++ b/trl/trainer/ppo_trainer.py
@@ -985,6 +985,14 @@ def record_step_stats(self, kl_coef: float, **data):
mean_non_score_reward = masked_mean(data["non_score_reward"], ma... | {
"difficulty": "low",
"estimated_review_effort": 2,
"problem_domain": "New Feature Additions"
} | |
hpcaitech__ColossalAI-4080@dc82ade | hpcaitech/ColossalAI | Python | 4,080 | [chat] refactor trainer class | ## 📌 Checklist before creating the PR
- [x] I have created an issue for this PR for traceability
- [x] The title follows the standard format: `[doc/gemini/tensor/...]: A concise description`
- [x] I have added relevant tags if possible for us to better distinguish different PRs
## 🚨 Issue number
> Link t... | 2023-06-25T10:33:24Z | [chat] refactor trainer class
## Description
The base `Trainer` class contains methods like `_on_fit_start`and `_on_fit_end`, which is only used in RL training.
## TODOs
- [x] Separate current base `Trainer` into `SLTrainer` and `RLTrainer`.
- [x] Update `SFTTrainer`.
- [x] Update `RMTrainer`.
- [x] Update `PPOTraine... | [
{
"body": "## Description\n\nThe base `Trainer` class contains methods like `_on_fit_start`and `_on_fit_end`, which is only used in RL training.\n\n## TODOs\n- [x] Separate current base `Trainer` into `SLTrainer` and `RLTrainer`.\n- [x] Update `SFTTrainer`.\n- [x] Update `RMTrainer`.\n- [x] Update `PPOTrainer`.... | 95e95b6d588d27aeba8d62e6656392f771b69aee | {
"head_commit": "dc82ade6e4bdcc37d26e6d0458f2ba20af90a4ff",
"head_commit_message": "docs: align with modified arguments",
"patch_to_review": "diff --git a/applications/Chat/README.md b/applications/Chat/README.md\nindex 29cd581d7cc9..082cbb22b587 100644\n--- a/applications/Chat/README.md\n+++ b/applications/Chat... | [
{
"diff_hunk": "@@ -38,94 +36,93 @@ def __init__(\n optim: Optimizer,\n lr_scheduler: _LRScheduler,\n train_dataloader: DataLoader,\n- eval_dataloader: DataLoader = None,\n+ eval_dataloader: Optional[DataLoader] = None,\n max_epochs: int = 2,\n accumulation_... | 128ec4fa00858b2abbb75b95b6988f724db30c55 | diff --git a/applications/Chat/README.md b/applications/Chat/README.md
index 29cd581d7cc9..082cbb22b587 100644
--- a/applications/Chat/README.md
+++ b/applications/Chat/README.md
@@ -83,7 +83,7 @@ More details can be found in the latest news.
<img src="https://raw.githubusercontent.com/hpcaitech/public_assets/main/app... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "Code Refactoring / Architectural Improvement"
} | |
gradio-app__gradio-4228@febbb13 | gradio-app/gradio | Python | 4,228 | Fix for `typing.get_type_hints()` on Python 3.9 or lower | A fix for the issue pointed out by @hysts which was breaking Gradio demos running `Python<=3.9`
It's not a perfect fix, as it parses type annotations as strings, so for example for `gr.Request`, the type annotation has to be `gr.Request` or `gradio.Request` or `Request` for it to be recognized correctly. But I don't... | 2023-05-16T03:30:29Z | On Python 3.9, `typing.get_type_hints()` throws an error if "|" is used in the type hint
### Describe the bug
The following code works with Python 3.10, but not with Python 3.9, as reported by @hysts
`app.py`
```py
#!/usr/bin/env python
import gradio as gr
from utils import fn
with gr.Blocks() as de... | Adding to 3.x milestone as this could break a lot of gradio demos running on Python 3.9
This is the reason I disabled new-style annotations in the Ruff config.
https://github.com/gradio-app/gradio/blob/8b72e9e1272e9468646d9d5c689ec60a8cac0da8/pyproject.toml#L83 | [
{
"body": "### Describe the bug\r\n\r\nThe following code works with Python 3.10, but not with Python 3.9, as reported by @hysts \r\n\r\n`app.py`\r\n\r\n```py\r\n#!/usr/bin/env python\r\n\r\nimport gradio as gr\r\n\r\nfrom utils import fn\r\n\r\nwith gr.Blocks() as demo:\r\n text = gr.Text()\r\n text2 = g... | 7241cdaf915c437e05d35e7ae5510cb3d9ed1bc0 | {
"head_commit": "febbb138e07c9e336791e53a41bdb2abf9bd7c08",
"head_commit_message": "Update gradio/utils.py\n\nCo-authored-by: Aarni Koskela <akx@iki.fi>",
"patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex 4175c2b85e..29f55c4fbd 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -6,12 +6,14 @@\n... | [
{
"diff_hunk": "@@ -683,11 +683,41 @@ async def cancel(session_hash: str) -> None:\n \n \n def get_type_hints(fn):\n+ # Importing gradio with the canonical abbreviation. Used in typing._eval_type.\n+ import gradio as gr # noqa: F401\n+ from gradio import Request # noqa: F401\n+\n if inspect.isfun... | 5d13b519147e3ede98b5ba7a3c54c5de0c64854f | diff --git a/CHANGELOG.md b/CHANGELOG.md
index e73133a596..3939520105 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,12 +6,14 @@
- Added `format` argument to `Audio` component by [@freddyaboulton](https://github.com/freddyaboulton) in [PR 4178](https://github.com/gradio-app/gradio/pull/4178)
- Add JS client code ... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
home-assistant__core-107671@b9795e7 | home-assistant/core | Python | 107,671 | Fix duplicated resource issue in System Monitor | <!--
You are amazing! Thanks for contributing to our project!
Please, DO NOT DELETE ANY TEXT from this template! (unless instructed).
-->
## Proposed change
<!--
Describe the big picture of your changes here to communicate to the
maintainers why we should accept this pull request. If it fixes a bug
or... | 2024-01-09T17:36:21Z | Systemmonitor does not generate unique IDs
### The problem
After update to 2014.1
Sensor works but HA reports this error.
It's a sensor from the external drive.
Platform systemmonitor does not generate unique IDs. ID disk_use_media_storage already exists - ignoring sensor.disk_use_media_storage
Platform sys... | Hey there @gjohansson-st, mind taking a look at this issue as it has been labeled with an integration (`systemmonitor`) you are listed as a [code owner](https://github.com/home-assistant/core/blob/dev/CODEOWNERS#L1305) for? Thanks!
<details>
<summary>Code owner commands</summary>
Code owners of `systemmonitor` can t... | [
{
"body": "### The problem\n\nAfter update to 2014.1 \r\n\r\nSensor works but HA reports this error.\r\nIt's a sensor from the external drive.\r\n\r\n\r\nPlatform systemmonitor does not generate unique IDs. ID disk_use_media_storage already exists - ignoring sensor.disk_use_media_storage\r\nPlatform systemmonit... | ab6b9fe891a7677de8bbc0d23c4ff60d50f0a61b | {
"head_commit": "b9795e7999d54ce106ec78141f893e30404911fa",
"head_commit_message": "Fix duplicated resource issue",
"patch_to_review": "diff --git a/homeassistant/components/systemmonitor/sensor.py b/homeassistant/components/systemmonitor/sensor.py\nindex 28929d07a7c8c..14b55fe562dc5 100644\n--- a/homeassistant/... | [
{
"diff_hunk": "@@ -463,7 +463,7 @@ async def async_setup_entry(\n \n sensor_registry[(_type, \"\")] = SensorData(\"\", None, None, None, None)\n is_enabled = check_legacy_resource(f\"{_type}_\", legacy_resources)\n- loaded_resources.add(f\"{_type}_\")\n+ loaded_resources.add(slugi... | c09d99b6e06e4df7960801ea1f0e031e2450be72 | diff --git a/homeassistant/components/systemmonitor/sensor.py b/homeassistant/components/systemmonitor/sensor.py
index 28929d07a7c8c7..da6e35238ecf8a 100644
--- a/homeassistant/components/systemmonitor/sensor.py
+++ b/homeassistant/components/systemmonitor/sensor.py
@@ -405,7 +405,7 @@ async def async_setup_entry(
... | {
"difficulty": "low",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
home-assistant__core-107068@4b2d973 | home-assistant/core | Python | 107,068 | Fix mobile_app cloudhook creation | <!--
You are amazing! Thanks for contributing to our project!
Please, DO NOT DELETE ANY TEXT from this template! (unless instructed).
-->
## Breaking change
<!--
If your PR contains a breaking change for existing users, it is important
to tell them what breaks, how to make it work again and why we did th... | 2024-01-04T08:22:32Z | Device Tracker on Mobile app stopped working with 2024.01
### The problem
The device tracker of one of my phones stopped working with the update 2024.01.
I have no access to the sensor data of the phone.
According to the log there seems to be a problem with the cloud hooks.
I already updated the home assistant ... | Hey there @home-assistant/core, mind taking a look at this issue as it has been labeled with an integration (`mobile_app`) you are listed as a [code owner](https://github.com/home-assistant/core/blob/dev/CODEOWNERS#L798) for? Thanks!
<details>
<summary>Code owner commands</summary>
Code owners of `mobile_app` can tr... | [
{
"body": "### The problem\r\n\r\nThe device tracker of one of my phones stopped working with the update 2024.01.\r\nI have no access to the sensor data of the phone.\r\n\r\nAccording to the log there seems to be a problem with the cloud hooks.\r\nI already updated the home assistant app and did several restart... | dd6c5e89efdd38279cacd6bf875fd2cb5b085bc5 | {
"head_commit": "4b2d9731e930a2c07cd95c129a953382327b98e8",
"head_commit_message": "Fix import cycle",
"patch_to_review": "diff --git a/homeassistant/components/cloud/__init__.py b/homeassistant/components/cloud/__init__.py\nindex d7d57835e3ade1..6e5cddd0f28764 100644\n--- a/homeassistant/components/cloud/__init... | [
{
"diff_hunk": "@@ -214,3 +215,49 @@ async def test_remote_ui_url(hass: HomeAssistant, mock_cloud_fixture) -> None:\n cl.client.prefs._prefs[\"remote_domain\"] = \"example.com\"\n \n assert cloud.async_remote_ui_url(hass) == \"https://example.com\"\n+\n+\n+async def test_async_get_or_create_clou... | 267b5bdad2a8ae104ea47ff2ab0a39fd9ddebdaa | diff --git a/homeassistant/components/cloud/__init__.py b/homeassistant/components/cloud/__init__.py
index d7d57835e3ade1..6e5cddd0f28764 100644
--- a/homeassistant/components/cloud/__init__.py
+++ b/homeassistant/components/cloud/__init__.py
@@ -5,6 +5,7 @@
from collections.abc import Awaitable, Callable
from dateti... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
home-assistant__core-107730@8d231e3 | home-assistant/core | Python | 107,730 | Bump aioswitcher to 3.4.1 | Bump aioswitcher to 3.4.1
GitHub diff: https://github.com/TomerFi/aioswitcher/compare/3.3.0...3.4.1
Release notes: https://github.com/TomerFi/aioswitcher/releases/tag/3.4.1
<!--
You are amazing! Thanks for contributing to our project!
Please, DO NOT DELETE ANY TEXT from this template! (unless instructed).
... | 2024-01-10T14:47:15Z | Switch not working
### The problem
Hello,
every switcher that is installed does not work in Home Assistant.
Tried removing the integration and the component from the Switcher app and reconnecting - doesn't work.
Log:
```
Call api for Socket Oven failed, api: 'control_device', args: (<Command.ON: '1'>,), respo... | Hey there @thecode, mind taking a look at this issue as it has been labeled with an integration (`switcher_kis`) you are listed as a [code owner](https://github.com/home-assistant/core/blob/dev/CODEOWNERS#L1252) for? Thanks!
<details>
<summary>Code owner commands</summary>
Code owners of `switcher_kis` can trigger b... | [
{
"body": "### The problem\n\nHello, \r\nevery switcher that is installed does not work in Home Assistant. \r\nTried removing the integration and the component from the Switcher app and reconnecting - doesn't work.\r\n\r\nLog:\r\n```\r\nCall api for Socket Oven failed, api: 'control_device', args: (<Command.ON:... | 7d18ad6fe74e2d4d6e2eeb254cdeee1861c87278 | {
"head_commit": "8d231e33f4314938ccf1dc8a7d557b84f8cbaee5",
"head_commit_message": "switcher: small fix",
"patch_to_review": "diff --git a/homeassistant/components/switcher_kis/__init__.py b/homeassistant/components/switcher_kis/__init__.py\nindex fb6ded993467eb..aec6c6560a8d1b 100644\n--- a/homeassistant/compon... | [
{
"diff_hunk": "@@ -157,6 +158,11 @@ def device_id(self) -> str:\n \"\"\"Switcher device id.\"\"\"\n return self.data.device_id # type: ignore[no-any-return]\n \n+ @property\n+ def device_key(self) -> str:\n+ \"\"\"Switcher device key.\"\"\"\n+ return self.data.device_key #... | 39b10693e39ddaf1c03c50230e3bbf9fc04856ee | diff --git a/homeassistant/components/switcher_kis/__init__.py b/homeassistant/components/switcher_kis/__init__.py
index fb6ded993467e..051c5d2b72a46 100644
--- a/homeassistant/components/switcher_kis/__init__.py
+++ b/homeassistant/components/switcher_kis/__init__.py
@@ -89,8 +89,9 @@ def on_device_data_callback(devic... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
gradio-app__gradio-4080@23079bc | gradio-app/gradio | Python | 4,080 | Theme builder fixes | Two fixes for the theme builder:
1. Renames the file from `gradio.themes.builder.py` to `gradio.themes.builder_app.py` because there was an issue if you would re-reun `gradio.themes.builder()` twice (could easily happen in a notebook setting), it would think that you are trying to call the module instead of the func... | 2023-05-05T22:12:40Z | AttributeError: 'Base' object has no attribute 'primary_xpand' on 3.28.3
### Describe the bug
Nearly all xhr requests in theme builder result in a 500 error. Looking in the server log, you can see the error `AttributeError: 'Base' object has no attribute 'primary_xpand'` on nearly every request.
### Is there an exist... | Can confirm the issue thanks @reilnuud! Looking into it | [
{
"body": "### Describe the bug\n\nNearly all xhr requests in theme builder result in a 500 error. Looking in the server log, you can see the error `AttributeError: 'Base' object has no attribute 'primary_xpand'` on nearly every request.\n\n### Is there an existing issue for this?\n\n- [X] I have searched the e... | 4c314c3d88bb9d2d47513c324353afc69e528834 | {
"head_commit": "23079bc96b2d164becee706e7049058ba78d6a76",
"head_commit_message": "Merge branch 'theme-builder-fixes' of https://github.com/gradio-app/gradio into theme-builder-fixes",
"patch_to_review": "diff --git a/gradio/themes/__init__.py b/gradio/themes/__init__.py\nindex 6eb4b5d985..f7adbe74ee 100644\n--... | [
{
"diff_hunk": "@@ -610,6 +610,7 @@ def generate_theme_code(\n final_attr_values = {}\n diff = False\n for attr in dir(source_obj):\n+ print(attr)",
"line": null,
"original_line": 613,
"original_start_line": null,
"path": "gradio... | 0b0e64b6ec3aaaa72a64d97c0ed6666ff3b88218 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0805562c60..8fbbf009ee 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,6 +6,7 @@
## Bug Fixes:
+- Fixes the gradio theme builder error that appeared on launch by [@aliabid94](https://github.com/aliabid94) and [@abidlabs](https://github.com/abidlabs) in [PR 4080](ht... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
hpcaitech__ColossalAI-3151@239661e | hpcaitech/ColossalAI | Python | 3,151 | [booster] implemented mixed precision class | ## 📌 Checklist before creating the PR
- [x] I have created an issue for this PR for traceability
- [x] The title follows the standard format: `[doc/gemini/tensor/...]: A concise description`
- [x] I have added relevant tags if possible for us to better distinguish different PRs
## 🚨 Issue number
> Link t... | 2023-03-16T10:20:43Z | [booster] implement precision
# Overview
The `Precision` is abstraction for training (mixed) precision and manages relevant functions such as grad scaler and clipping.
# Goal
An sample class definition is given below and is subject to changes.
```python
class Precision:
def __init__(self, precision_type: dtype... | [
{
"body": "# Overview\n\nThe `Precision` is abstraction for training (mixed) precision and manages relevant functions such as grad scaler and clipping.\n\n# Goal\n\nAn sample class definition is given below and is subject to changes.\n\n\n```python\nclass Precision:\n def __init__(self, precision_type: dtype... | ecd643f1e4e0100c08bd0765337fe5d2287f07dd | {
"head_commit": "239661e47e796c1ba88ea1ffe5af5161153c8e47",
"head_commit_message": "[booster] implemented mixed precision class",
"patch_to_review": "diff --git a/colossalai/booster/__init__.py b/colossalai/booster/__init__.py\nindex d475676ba06a..3b3f45bb0fe2 100644\n--- a/colossalai/booster/__init__.py\n+++ b/... | [
{
"diff_hunk": "@@ -1,37 +1,93 @@\n from contextlib import contextmanager\n-from typing import Callable, Iterator, List, Optional, Tuple, Union\n+from typing import Callable, Iterable, Iterator, List, Optional, Tuple, Union\n \n import torch\n import torch.nn as nn\n+from torch import Tensor\n from torch.optim ... | f90cca72533b20e6e88c27f917873cde1e5dbe4d | diff --git a/colossalai/booster/__init__.py b/colossalai/booster/__init__.py
index d475676ba06a..3b3f45bb0fe2 100644
--- a/colossalai/booster/__init__.py
+++ b/colossalai/booster/__init__.py
@@ -2,4 +2,3 @@
from .booster import Booster
from .environment_table import EnvironmentTable
from .plugin import Plugin
-from ... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "New Feature Additions"
} | |
hpcaitech__ColossalAI-2944@effa19b | hpcaitech/ColossalAI | Python | 2,944 | [chatgpt]add inference example | ## 📌 Checklist before creating the PR
- [ ] I have created an issue for this PR for traceability
- [ ] The title follows the standard format: `[doc/gemini/tensor/...]: A concise description`
- [ ] I have added relevant tags if possible for us to better distinguish different PRs
## 🚨 Issue number
> Link t... | 2023-02-28T09:38:01Z | [DOC]: how to infer by chatgpt models
### 📚 The doc issue
Hello, authors and developers,I have a problem with chatgpt. I train my model with single GPU, I want to know how to infer or predict the chatgpt model trained based on scripts such as examples/train_prompt.py, without related scripts or some dependencies。Than... | meet the same issue.
anyone can write a doc or any blog to show how to use colossalai to infer
Hi @Muzzypepper and @hurun Thanks for the feedback, we will provide it soon. | [
{
"body": "### 📚 The doc issue\n\nHello, authors and developers,I have a problem with chatgpt. I train my model with single GPU, I want to know how to infer or predict the chatgpt model trained based on scripts such as examples/train_prompt.py, without related scripts or some dependencies。Thanks for your reply... | dca98937f834f5af2730f481bf6f5e5eee844742 | {
"head_commit": "effa19b168e09ec10f90f4485bbd2c5692acce60",
"head_commit_message": "Delete inference.sh",
"patch_to_review": "diff --git a/applications/ChatGPT/examples/README.md b/applications/ChatGPT/examples/README.md\nindex 5f9d8698d616..e5522f08770d 100644\n--- a/applications/ChatGPT/examples/README.md\n+++... | [
{
"diff_hunk": "@@ -0,0 +1,51 @@\n+import argparse\n+\n+from chatgpt.nn import BLOOMActor, GPTActor, OPTActor\n+from transformers import AutoTokenizer\n+from transformers.models.gpt2.tokenization_gpt2 import GPT2Tokenizer\n+\n+\n+def eval(args):\n+ # configure model\n+ if args.model == 'gpt2':\n+ m... | 5019066f0540eb79c2e5029f5f137c954fd9b888 | diff --git a/applications/ChatGPT/examples/README.md b/applications/ChatGPT/examples/README.md
index 5f9d8698d616..e5522f08770d 100644
--- a/applications/ChatGPT/examples/README.md
+++ b/applications/ChatGPT/examples/README.md
@@ -6,7 +6,21 @@
pip install -r requirements.txt
```
-## Train with dummy prompt data
+##... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Documentation Updates"
} |
gradio-app__gradio-4048@e25b011 | gradio-app/gradio | Python | 4,048 | Chatbot code syntax highlighting | # Description
Add code syntax highlighting to chatbot.
Opening this PR for review, but there's still some minor css styling to fix, and probably some bugs.

Please inc... | 2023-05-03T06:01:24Z | Better code blocks support in chatbot component
- [x] I have searched to see if a similar issue already exists.
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like** ... | I think if we can find a way to dynamically load the code component that would be best. Rather than re-implementing a worse version of the code component specifically for the chatbot. Plus there seems to be a lot of chatbot demos outputting code blocks. | [
{
"body": "- [x] I have searched to see if a similar issue already exists.\r\n\r\n\r\n**Is your feature request related to a problem? Please describe.** \r\nA clear and concise description of what the problem is. Ex. I'm always frustrated when [...]\r\n\r\n**Describe the solution you'd like** \r\n- Use `gr.Co... | ff21ecbc258b2d958957179e4b31499ad546ca46 | {
"head_commit": "e25b011b744224cd0d04c6c213954f0eee94e03a",
"head_commit_message": "version",
"patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex b1f2ace789..2c5422ebac 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -7,6 +7,7 @@\n ## New Features:\n \n - Add support for `visual-question-answe... | [
{
"diff_hunk": "@@ -994,6 +997,19 @@ def get_class_that_defined_method(meth: Callable):\n return cls.__name__\n \n \n+def highlight_code(code, name, attrs):\n+ if attrs:\n+ pass\n+",
"line": null,
"original_line": 1003,
"original_start_line": 1001,
"path": "gradio/utils.py",
... | 743d7c993014029affbc4e8b9d8ad7af886d717b | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 7c6168b909..ef85e7265e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,7 @@
## New Features:
- Add support for `visual-question-answering`, `document-question-answering`, and `image-to-text` using `gr.Interface.load("models/...")` and `gr.Interface.from_pipelin... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "New Feature Additions"
} |
gradio-app__gradio-3809@bf745c8 | gradio-app/gradio | Python | 3,809 | Allow client to be duplicated from an existing Space | Adds and documents a `Client.duplicate_from()` factory method
Not sure if there's a good way to test this without revealing write-access keys which is not a good idea, Lmk if you have suggestions!
Closes: #3804 | 2023-04-10T18:46:58Z | Let Python client be able to duplicate a Space easily and make it private
Public Spaces will be rate limited, which means that if someone connects a Space using the Gradio client and starts making requests, they'll quickly hit the limit, something like this:
```py
from gradio_client import Client
client = Client... | My thought is that running `Client("abidlabs/en2fr", hf_token="...", private=True)` should be idempotent so that a developer's app doesn't drastically change without their knowledge. But does that mean we should give them a mechanism to updating the private version of their space?
What if we keep the duplication log... | [
{
"body": "Public Spaces will be rate limited, which means that if someone connects a Space using the Gradio client and starts making requests, they'll quickly hit the limit, something like this:\r\n\r\n```py\r\nfrom gradio_client import Client\r\n\r\nclient = Client(\"abidlabs/en2fr\")\r\nclient.predict(\"hell... | 0b725fbac18b6e208dafe32fed53843c838c4f97 | {
"head_commit": "bf745c83941cc5626c7818d5195d60bac7389aec",
"head_commit_message": "fix tests",
"patch_to_review": "diff --git a/client/python/README.md b/client/python/README.md\nindex a6fa8365e3..be2bab3917 100644\n--- a/client/python/README.md\n+++ b/client/python/README.md\n@@ -53,6 +53,26 @@ from gradio_cli... | [
{
"diff_hunk": "@@ -110,6 +120,90 @@ def __init__(\n # Disable telemetry by setting the env variable HF_HUB_DISABLE_TELEMETRY=1\n threading.Thread(target=self._telemetry_thread).start()\n \n+ @classmethod\n+ def duplicate_from(\n+ cls,\n+ from_id: str,\n+ to_id: str | ... | c48d521ce136912e1079e5648e635ae84c4638f3 | diff --git a/client/python/README.md b/client/python/README.md
index a6fa8365e3..da0be45ed9 100644
--- a/client/python/README.md
+++ b/client/python/README.md
@@ -53,6 +53,26 @@ from gradio_client import Client
client = Client("abidlabs/my-private-space", hf_token="...")
```
+**Duplicating a Space for private use*... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "New Feature Additions"
} |
home-assistant__core-106748@f84db1b | home-assistant/core | Python | 106,748 | Close stale connections (Airthings BLE) | <!--
You are amazing! Thanks for contributing to our project!
Please, DO NOT DELETE ANY TEXT from this template! (unless instructed).
-->
## Breaking change
<!--
If your PR contains a breaking change for existing users, it is important
to tell them what breaks, how to make it work again and why we did th... | 2023-12-30T22:48:34Z | Airthings BLE Sensors Go Unavailable
### The problem
The Airthings BLE integration updates its sensors then five minutes later they go unavailable
### What version of Home Assistant Core has the issue?
2023.11.2
### What was the last working version of Home Assistant Core?
?
### What type of installation are you... | Hey there @vincegio, @lastrada, mind taking a look at this issue as it has been labeled with an integration (`airthings_ble`) you are listed as a [code owner](https://github.com/home-assistant/core/blob/dev/CODEOWNERS#L50) for? Thanks!
<details>
<summary>Code owner commands</summary>
Code owners of `airthings_ble` c... | [
{
"body": "### The problem\n\nThe Airthings BLE integration updates its sensors then five minutes later they go unavailable \n\n### What version of Home Assistant Core has the issue?\n\n2023.11.2\n\n### What was the last working version of Home Assistant Core?\n\n?\n\n### What type of installation are you runni... | eb01998395ef091d11dabc66d940ca9c53e3fe70 | {
"head_commit": "f84db1bc2d51c5775ebd69bebd41ce5146a0e790",
"head_commit_message": "Fix pr comment",
"patch_to_review": "diff --git a/homeassistant/components/airthings_ble/__init__.py b/homeassistant/components/airthings_ble/__init__.py\nindex d7e6bddbcd4e10..dcb9ce3b1c0b74 100644\n--- a/homeassistant/component... | [
{
"diff_hunk": "@@ -42,6 +43,8 @@ async def _async_update_method():\n ble_device = bluetooth.async_ble_device_from_address(hass, address)\n airthings = AirthingsBluetoothDeviceData(_LOGGER, elevation, is_metric)\n \n+ await close_stale_connections(ble_device)",
"line": null,
"orig... | 16d2ad7ad66b34e9a81e6b193ab11b4c14d9da00 | diff --git a/homeassistant/components/airthings_ble/__init__.py b/homeassistant/components/airthings_ble/__init__.py
index c642ebf95635c3..1d62442f14de1d 100644
--- a/homeassistant/components/airthings_ble/__init__.py
+++ b/homeassistant/components/airthings_ble/__init__.py
@@ -5,6 +5,7 @@
import logging
from airth... | {
"difficulty": "low",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
gradio-app__gradio-4068@d45d449 | gradio-app/gradio | Python | 4,068 | Fix bug where functions with type hints caused errors | # Description
Fixes #3514
End to end test
```python
import gradio as gr
from typing import Literal
def calculator(num1,
operation: Literal["add", "subtract", "multiply", "divide"],
num2):
if operation == "add":
return num1 + num2
elif operation == "subtract... | 2023-05-04T18:20:54Z | "issubclass() arg 1 must be a class" error appears when using input parameters with Optional type hint
### Describe the bug
I'm getting an error `issubclass() arg 1 must be a class` when using Optional typing in the target function. The problem started appearing with version `3.21.0`
### Is there an existing issu... | @hnsywangxin , I didn't try to downgrade the version. The simpler way was to remove type annotations.
> @hnsywangxin , I didn't try to downgrade the version. The simpler way was to remove type annotations.
Same, removing the annotations solved.
I'm having the same problem. It is a more generic problem than you desc... | [
{
"body": "### Describe the bug\r\n\r\nI'm getting an error `issubclass() arg 1 must be a class` when using Optional typing in the target function. The problem started appearing with version `3.21.0`\r\n\r\n### Is there an existing issue for this?\r\n\r\n- [X] I have searched the existing issues\r\n\r\n### Repr... | f763912bc8a05313c9de713a29797dbf8bdd9235 | {
"head_commit": "d45d449d27f166c9ec4e4ddbef14498abe98f449",
"head_commit_message": "CHANGELOG",
"patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex 3ec16b9e74..10df28d35c 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -6,7 +6,7 @@ No changes to highlight.\n \n ## Bug Fixes:\n \n-No changes to... | [
{
"diff_hunk": "@@ -633,6 +635,16 @@ class GenericObject:\n \n assert len(get_type_hints(GenericObject())) == 0\n \n+ def test_is_special_typed_parameter(self):\n+ def func(a: List[str], b: Literal[\"a\", \"b\"], c, d: Request):\n+ pass\n+\n+ hints = get_type_hints(func)\n+ ... | c71a71a35f72f9b27a06088a2508c17edd9834f3 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2aee623eba..d58dd2b7d8 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,6 +6,8 @@ No changes to highlight.
## Bug Fixes:
+
+- Fixed bug where type hints in functions caused the event handler to crash by [@freddyaboulton](https://github.com/freddyaboulton) in [PR 406... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
gradio-app__gradio-3640@6542a26 | gradio-app/gradio | Python | 3,640 | Raise errror if event queued but queue is not enabled | # Description
The root cause of #3610 was that an event was queued but `.queue()` was not called. Raising an error during launch and `mount_gradio_app` now.
Without this ValueError users get `AttributeError: 'Blocks' object has no attribute '_queue'` anyways so I think there won't be negative impact of existing w... | 2023-03-27T15:38:35Z | Can't run gradio in non-queue mode when using mount_gradio_app
### Describe the bug
We've been trying to run Gradio behind a local proxy. This works for one instance, but when you try to run multiple instances behind a proxy using path-based routing, you need to use `mount_gradio_app` to deploy your apps at differen... | Hi @dstieglitz ! Thanks for filing the issue.
Can you try with:
`hypercorn app:gradio_app --bind "0.0.0.0:7860" --debug`
That's working for me:
<img width="1240" alt="image" src="https://user-images.githubusercontent.com/41651716/227648004-cbb5a719-78f3-4263-90e7-a053e44d8e7f.png">
In your code snippet, ... | [
{
"body": "### Describe the bug\r\n\r\nWe've been trying to run Gradio behind a local proxy. This works for one instance, but when you try to run multiple instances behind a proxy using path-based routing, you need to use `mount_gradio_app` to deploy your apps at different paths (you can't rewrite proxied URLs ... | b1f8d11e4e1f8b1806d693158cccefb2d135ec06 | {
"head_commit": "6542a26d1de49e90d5d0c7d4ba15bbe0e0768e18",
"head_commit_message": "CHANGELOG",
"patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex 8ec9a69966..7a92df41ed 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -36,6 +36,7 @@ No changes to highlight.\n * Mobile responsive iframes in th... | [
{
"diff_hunk": "@@ -1453,21 +1477,7 @@ def reverse(text):\n if not self.enable_queue and self.progress_tracking:\n raise ValueError(\"Progress tracking requires queuing to be enabled.\")",
"line": null,
"original_line": 1478,
"original_start_line": 1477,
"path": "gradio/block... | ce7ffe666f89bf1d1e5eadd3e790b15cbaa1a554 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index b3fd8f5154..4460bbcd9a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -38,6 +38,7 @@ No changes to highlight.
* Mobile responsive iframes in themes guide by [@aliabd](https://github.com/aliabd) in [PR 3562](https://github.com/gradio-app/gradio/pull/3562)
* Remove extra... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
hpcaitech__ColossalAI-2812@def3fdb | hpcaitech/ColossalAI | Python | 2,812 | [CI/CD] fix nightly release CD running on forked repo | ## 📌 Checklist before creating the PR
- [x] I have created an issue for this PR for traceability
- [x] The title follows the standard format: `[doc/gemini/tensor/...]: A concise description`
- [ ] I have added relevant tags if possible for us to better distinguish different PRs
## 🚨 Issue number
> Link t... | 2023-02-18T02:15:46Z | [BUG]: CI/CD - Publish Nightly Version to PyPI runs on forked repo
### 🐛 Describe the bug
Hi, This morning I found that the `Publish Nightly Version to PyPI` CD ran at my forked repo and eventually turned to fail.
I think it was in the `.github/workflows/release_nightly_on_schedule.yml`, we only added conditions t... | [
{
"body": "### 🐛 Describe the bug\r\n\r\nHi, This morning I found that the `Publish Nightly Version to PyPI` CD ran at my forked repo and eventually turned to fail.\r\nI think it was in the `.github/workflows/release_nightly_on_schedule.yml`, we only added conditions to the `build-n-publish` job but not to the... | 09f457479db6567352de157133743dbd046c9b9a | {
"head_commit": "def3fdbf0185e984d301c874202587ef8d2d881c",
"head_commit_message": "[CI/CD] fix nightly release CD running on forker repo",
"patch_to_review": "diff --git a/.github/workflows/release_nightly_on_schedule.yml b/.github/workflows/release_nightly_on_schedule.yml\nindex aab42e1d754d..e2a8662c6a53 1006... | [
{
"diff_hunk": "@@ -7,7 +7,7 @@ on:\n \n jobs:\n build-n-publish:\n- if: github.event_name == 'workflow_dispatch' || github.repository == 'hpcaitech/ColossalAI'\n+ if: github.event_name == 'workflow_dispatch' && github.repository == 'hpcaitech/ColossalAI'",
"line": null,
"original_line": 10,
... | 5c800ae0fb60742859e4d3a3388a0db69b6fd6df | diff --git a/.github/workflows/release_nightly_on_schedule.yml b/.github/workflows/release_nightly_on_schedule.yml
index aab42e1d754d..4125f333f301 100644
--- a/.github/workflows/release_nightly_on_schedule.yml
+++ b/.github/workflows/release_nightly_on_schedule.yml
@@ -7,7 +7,7 @@ on:
jobs:
build-n-publish:
- ... | {
"difficulty": "low",
"estimated_review_effort": 2,
"problem_domain": "Test Suite / CI Enhancements"
} | |
home-assistant__core-106206@7a7dade | home-assistant/core | Python | 106,206 | Return multiple trains in Trafikverket Train | <!--
You are amazing! Thanks for contributing to our project!
Please, DO NOT DELETE ANY TEXT from this template! (unless instructed).
-->
## Proposed change
<!--
Describe the big picture of your changes here to communicate to the
maintainers why we should accept this pull request. If it fixes a bug
or... | 2023-12-21T22:35:49Z | Trafikverket train - get multiple departures for same route
### The problem
Is it possible to retrieve multiple departures for the same route instead of just the next one? The trains over the Oresund bridge can be very "unpredictable"
### What version of Home Assistant Core has the issue?
2023.5.3
### What was the... | Hey there @endor-force, @gjohansson-st, mind taking a look at this issue as it has been labeled with an integration (`trafikverket_train`) you are listed as a [code owner](https://github.com/home-assistant/core/blob/dev/CODEOWNERS#L1295) for? Thanks!
<details>
<summary>Code owner commands</summary>
Code owners of `t... | [
{
"body": "### The problem\n\nIs it possible to retrieve multiple departures for the same route instead of just the next one? The trains over the Oresund bridge can be very \"unpredictable\" \n\n### What version of Home Assistant Core has the issue?\n\n2023.5.3\n\n### What was the last working version of Home A... | 69f8514556a723b32218858c3369539fbeb97cd3 | {
"head_commit": "7a7dade9dffb8f7c86c99d4623a48734e81766fd",
"head_commit_message": "Fix to work",
"patch_to_review": "diff --git a/.coveragerc b/.coveragerc\nindex adb0458d6f67bc..6cf95669feafdc 100644\n--- a/.coveragerc\n+++ b/.coveragerc\n@@ -1386,7 +1386,6 @@ omit =\n homeassistant/components/tradfri/swit... | [
{
"diff_hunk": "@@ -117,6 +124,18 @@ async def _async_update_data(self) -> TrainData:\n f\"Train departure {when} encountered a problem: {error}\"\n ) from error\n \n+ depart_next = None\n+ depart_next_next = None\n+ if not state and states and len(states) > 0:\n... | 6f7cdfef531037b83366c0e01ed5c44672d8583d | diff --git a/.coveragerc b/.coveragerc
index adb0458d6f67bc..6cf95669feafdc 100644
--- a/.coveragerc
+++ b/.coveragerc
@@ -1386,7 +1386,6 @@ omit =
homeassistant/components/tradfri/switch.py
homeassistant/components/trafikverket_train/__init__.py
homeassistant/components/trafikverket_train/coordinator.py... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "New Feature Additions"
} |
hpcaitech__ColossalAI-2523@b2d6f72 | hpcaitech/ColossalAI | Python | 2,523 | [zero] add zero wrappers | ### What's New
I added two wrapper functions to unify current ZeRO APIs. In these functions, users can simply set the arguement `zero_stage` to switch to different types of ZeRO implementation. | 2023-01-29T08:32:28Z | [FEATURE]: Unify interface of Gemini(offload) + ZeRO1 + ZeRO2 + ZeRO3
### Describe the feature
## Current States
Currently, GeminiDDP has to shard the optimizer state (OS), and it has covered zero3 and zero3+offload. However, It doesn't actually cover zero1 and zero2, which do not shard the OS. Considering zero1/... | [
{
"body": "### Describe the feature\r\n\r\n## Current States\r\n\r\nCurrently, GeminiDDP has to shard the optimizer state (OS), and it has covered zero3 and zero3+offload. However, It doesn't actually cover zero1 and zero2, which do not shard the OS. Considering zero1/2 performs very well for small models, we s... | c198c7c0b067ab4216b31f7c70e0626e91ba949e | {
"head_commit": "b2d6f72d94750fdb99f918d62454ee301aa72c90",
"head_commit_message": "[zero] add zero wrappers",
"patch_to_review": "diff --git a/colossalai/nn/parallel/zero_wrapper.py b/colossalai/nn/parallel/zero_wrapper.py\nnew file mode 100644\nindex 000000000000..49e1ae29d193\n--- /dev/null\n+++ b/colossalai/... | [
{
"diff_hunk": "@@ -0,0 +1,106 @@\n+from copy import copy\n+from typing import Dict, Optional\n+\n+import torch\n+import torch.nn as nn\n+\n+from .gemini_parallel import GeminiDDP\n+\n+\n+def zero_model_wrapper(model: nn.Module, zero_stage: int = 1, gemini_config: Optional[Dict] = None):\n+ \"\"\"This wrappe... | d5571c4663c1e5600d5e688e9d4dee3307fd12c7 | diff --git a/colossalai/nn/optimizer/zero_optimizer.py b/colossalai/nn/optimizer/zero_optimizer.py
index 9f761efdb12c..402e28ce8458 100644
--- a/colossalai/nn/optimizer/zero_optimizer.py
+++ b/colossalai/nn/optimizer/zero_optimizer.py
@@ -65,7 +65,8 @@ def __init__(self,
**defaults: Any):
sup... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "New Feature Additions"
} | |
gradio-app__gradio-3821@2189381 | gradio-app/gradio | Python | 3,821 | Add support for async generators | # Description
Closes: #3618 . @deep-diver would appreciate if you could test this to see if it fixes your issue. Click on the link on the gradio-pr-bot message, Go to Files in the top right, requirements.txt will have a url hosting a wheel built for this PR.
## To test
### Blocks case
```python
import asynci... | 2023-04-11T17:48:31Z | async generator support
- [x] I have searched to see if a similar issue already exists.
**Is your feature request related to a problem? Please describe.**
I'm frustrated when the next user has to wait until the previous request is fully handled when using generator function.
**Describe the solution you'd li... | I came to this also, I want to do langchain's streaming in gradio like this:
```python
async def streaming(input, history):
callback = AsyncIteratorCallbackHandler()
run = asyncio.create_task(conversation_with_summary.apredict(
input=input, callbacks=[callback]))
async for token in ca... | [
{
"body": "- [x] I have searched to see if a similar issue already exists.\r\n\r\n\r\n**Is your feature request related to a problem? Please describe.** \r\nI'm frustrated when the next user has to wait until the previous request is fully handled when using generator function.\r\n\r\n**Describe the solution yo... | f1703d5f536de625756fdc49ca1f8cbc4be42020 | {
"head_commit": "218938109503d20ef014f7620cd1687638463a78",
"head_commit_message": "Fix tests",
"patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex 3ec16b9e74..eff2bb2f82 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -2,7 +2,7 @@\n \n ## New Features:\n \n-No changes to highlight.\n+- Suppor... | [
{
"diff_hunk": "@@ -643,6 +649,19 @@ def fn(*args):\n batch=self.batch,\n max_batch_size=self.max_batch_size,\n )\n+ if extra_output:\n+\n+ def cleanup():\n+ return [\n+ {\"__type__\": \"generic_updat... | b70b74d021467a9d4c18efe41fa29250015b0d3f | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 117fc7ab5f..ca0ee031c7 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,7 @@
## New Features:
+- Support for asynchronous iterators by [@freddyaboulton](https://github.com/freddyaboulton) in [PR 3821](https://github.com/gradio-app/gradio/pull/3821)
- Returning... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "New Feature Additions"
} |
hpcaitech__ColossalAI-1108@467cadc | hpcaitech/ColossalAI | Python | 1,108 | [pipeline] supported more flexible dataflow control for pipeline parallel training | # Summary
Fixed #120 to support more data formats in the engine schedules and implemented a more flexible tensor-argument mapping mechanism in pipeline schedules.
# Details
- Data in the format of list and tuple is now supported as the model inputs and outputs.
- The data_process_func now accepts the stage o... | 2022-06-14T07:08:52Z | Compatabilities to various batch formats[FEATURE]
**Is your feature request related to a problem? Please describe.**
The implementation of ColossalAI seems only transfer tesors in batch (dict) values to device. However the organization of batch format can be various and highly customized (e.g. list-type batches, minib... | Hi @ExtremeViscent , sorry for my late reply. I think you are right, we currently uses dictionary to support complex inputs in pipeline parallelism. But for normal schedule, I think list/tuple should be supported as well.
This issue is stale because it has been open for 14 days with no activity.
Work in process | [
{
"body": "**Is your feature request related to a problem? Please describe.**\r\nThe implementation of ColossalAI seems only transfer tesors in batch (dict) values to device. However the organization of batch format can be various and highly customized (e.g. list-type batches, minibatch dict containing lists of... | 53297330c09ef5489f1388edee988cdeeee50063 | {
"head_commit": "467cadcf50f53495e1df17b0f618c60793a61fde",
"head_commit_message": "polish code",
"patch_to_review": "diff --git a/colossalai/engine/schedule/_base_schedule.py b/colossalai/engine/schedule/_base_schedule.py\nindex 0501d878b118..687e220bdca9 100644\n--- a/colossalai/engine/schedule/_base_schedule.... | [
{
"diff_hunk": "@@ -16,10 +17,32 @@ class NonPipelineSchedule(BaseSchedule):\n to update the parameters if it is in training mode.\n \n Args:\n- batch_data_process_func (Callable, optional): The preprocessing function which receives a batch of data,\n+ batch_data_process_func (Callable, op... | ed4679898558266b685c23f9121e0e430e7834d0 | diff --git a/colossalai/engine/schedule/_base_schedule.py b/colossalai/engine/schedule/_base_schedule.py
index 0501d878b118..687e220bdca9 100644
--- a/colossalai/engine/schedule/_base_schedule.py
+++ b/colossalai/engine/schedule/_base_schedule.py
@@ -18,13 +18,12 @@ class BaseSchedule(ABC):
control of FP16 in clas... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "New Feature Additions"
} |
hpcaitech__ColossalAI-2374@05119a8 | hpcaitech/ColossalAI | Python | 2,374 | [setup] support pre-build and jit-build of cuda kernels | # Overview
It will in the best interest of the user if they can install colossalai smoothly. As discussed in #2337 , we should support two way kernel build:
1. build kernel during installation
2. build kernel only when needed during runtim
# Issue Number
Fixed #2337
# What does this PR do?
This PR has... | 2023-01-06T08:13:41Z | [FEATURE]: Build kernel only when executed
### Describe the feature
In the current Colossal-AI implementation, we build Colossal-AI in two ways:
1. built when doing `CUDA_EXT=1 pip install colossalai`
2. build the CUDA kernel when importing Colossal-AI
However, building all kernels at least takes 5 min, which is ... | **update**
it seems that only `CUDA_EXT=1 pip install colossalai` will work. If I install without `CUDA_EXT=1`, there will be errors. Previously, I try to import when `colossalai` is in `PWD`, and it start to build the extension. If I import from other place, it just raise errors.
---
Please at least add the ins... | [
{
"body": "### Describe the feature\n\nIn the current Colossal-AI implementation, we build Colossal-AI in two ways:\r\n1. built when doing `CUDA_EXT=1 pip install colossalai`\r\n2. build the CUDA kernel when importing Colossal-AI\r\n\r\nHowever, building all kernels at least takes 5 min, which is too long for m... | a881d6d00061e4f6d7d3270fe1d736af414f0ae5 | {
"head_commit": "05119a842684022390f36014c44c6289efb644fa",
"head_commit_message": "polish code",
"patch_to_review": "diff --git a/.gitignore b/.gitignore\nindex 40f3f6debeee..fd69e50bbb53 100644\n--- a/.gitignore\n+++ b/.gitignore\n@@ -144,3 +144,6 @@ docs/.build\n \n # ignore version.py generated by setup.py\n... | [
{
"diff_hunk": "@@ -30,6 +42,8 @@ def _multi_tensor_copy_this_to_that(this, that, overflow_buf=None):\n if overflow_buf:\n overflow_buf.fill_(0)\n # Scaling with factor `1.0` is equivalent to copy.\n+ global multi_tensor_scale",
"line": null,
"original_line": 45,
"original... | 313ea4b87452027835969d7b693d5a50acdea139 | diff --git a/.gitignore b/.gitignore
index 40f3f6debeee..6b6f980e3392 100644
--- a/.gitignore
+++ b/.gitignore
@@ -144,3 +144,10 @@ docs/.build
# ignore version.py generated by setup.py
colossalai/version.py
+
+# ignore any kernel build files
+.o
+.so
+
+# ignore python interface defition file
+.pyi
diff --git a/co... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "New Feature Additions"
} |
gradio-app__gradio-3369@66da9ba | gradio-app/gradio | Python | 3,369 | Chatbot height kwarg | # Description
Adds `height` kwarg to chatbot style.
Please include:
* relevant motivation
* a summary of the change
* which issue is fixed.
* any additional dependencies that are required for this change.
Closes: #3312
# Checklist:
- [ ] I have performed a self-review of my own code
- [ ] I have ad... | 2023-03-03T03:36:09Z | Add `height` kwarg to the `style` method of `Chatbot`
I think we support this on certain components, makes sense for the Chatbot but might also make sense for other `blockish` components too.
- [ ] I have searched to see if a similar issue already exists.
**Is your feature request related to a problem? Pleas... | [
{
"body": "I think we support this on certain components, makes sense for the Chatbot but might also make sense for other `blockish` components too.\r\n\r\n\r\n- [ ] I have searched to see if a similar issue already exists.\r\n\r\n\r\n**Is your feature request related to a problem? Please describe.** \r\nA cl... | fc39cbdd9b1a9f5509b4e1447f9b286491e1cd48 | {
"head_commit": "66da9ba94b2c5083a69d7590b11c3feb0643500f",
"head_commit_message": "Merge branch 'main' into chatbot-height",
"patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex 0108046f9c..6e6f7bc0b4 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -40,6 +40,11 @@ By [@freddyaboulton](https://... | [
{
"diff_hunk": "@@ -56,7 +55,8 @@\n \t}\n </script>\n \n-<div class=\"wrap\" bind:this={div}>\n+<!-- style={\"height:\" + height} -->",
"line": null,
"original_line": 58,
"original_start_line": null,
"path": "ui/packages/chatbot/src/ChatBot.svelte",
"start_line": null,
"text": "@user1:\n... | 0130d1a040b63a9411dc91bebbcf6260a011461f | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 44009bd6a1..fc429efb39 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,9 @@
No changes to highlight.
## Bug Fixes:
+- Add `height` kwarg to style in `gr.Chatbot()` component by [@dawoodkhan82](https://github.com/dawoodkhan82) in [PR 3369](https://github.com/gra... | {
"difficulty": "low",
"estimated_review_effort": 2,
"problem_domain": "New Feature Additions"
} | |
gradio-app__gradio-3275@067f582 | gradio-app/gradio | Python | 3,275 | Supabase Guide | Adds a Guide on how to use Gradio with Supabase (Closes: #3256) | 2023-02-21T21:49:01Z | New data source guide featuring Supabase and `gr.Barplot`
Given that we now have a native `gr.Barplot` component, it would be nice to write a Guide featuring this component. One interesting use case to the open-source community might be setting up Gradio with a Supabase database and plotting the data in a real-time `gr... | [
{
"body": "Given that we now have a native `gr.Barplot` component, it would be nice to write a Guide featuring this component. One interesting use case to the open-source community might be setting up Gradio with a Supabase database and plotting the data in a real-time `gr.Barplot`",
"number": 3256,
"ti... | cd99857e0fdc8753a00fd6f90972b6431078bf6a | {
"head_commit": "067f582bba0494f3f82227945cdf3f13e6ea58d6",
"head_commit_message": "added images",
"patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex 9ed194214d..3285e8d916 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -52,6 +52,9 @@ By [@freddyaboulton](https://github.com/freddyaboulton) i... | [
{
"diff_hunk": "@@ -0,0 +1,122 @@\n+# Creating a Dashboard from Supabase Data\n+\n+Tags: TABULAR, DASHBOARD, PLOTS \n+\n+Supabase is a cloud-based open-source backend that provides a PostgreSQL database, authentication, and other useful features for building web and mobile applications. In this tutorial, we wil... | 41ec48c13b54dcaeb8252025ee55449bf96ecde8 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 995bbef65c..ca30ccd184 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -52,6 +52,9 @@ By [@freddyaboulton](https://github.com/freddyaboulton) in [PR 3297](https://git
## Documentation Changes:
- Added the `types` field to the dependency field in the config by [@freddyabo... | {
"difficulty": "low",
"estimated_review_effort": 2,
"problem_domain": "New Feature Additions"
} | |
gradio-app__gradio-3194@a936a39 | gradio-app/gradio | Python | 3,194 | Miscellaneous warnings and errors | Just a few improvements to our warnings and errors:
* Raises a warning in the `File` component or `UploadButton` component if someone passes in a `file_types` parameter along with `file_count=="dir"` (closes: #3077)
* Raises a `gr.Error` instead of a regular Python error when you use `gr.Interface.load()` to load ... | 2023-02-14T16:57:15Z | Filter out files based on file_types when choosing the `directory` option
- [x] I have searched to see if a similar issue already exists.
Currently `gr.File(file_count="multiple", file_types=["image"])` checks if the file is an image before uploading. I was hoping for a similar behavior for `gr.File(file_count="dire... | To be sure, `gr.File(file_count="multiple", file_types=["image"])` works as expected though, right? It only let's you upload images.
> To be sure, `gr.File(file_count="multiple", file_types=["image"])` works as expected though, right? It only let's you upload images.
Yes, it works as expected.
It feels quite niche to ... | [
{
"body": "- [x] I have searched to see if a similar issue already exists.\r\n\r\nCurrently `gr.File(file_count=\"multiple\", file_types=[\"image\"])` checks if the file is an image before uploading. I was hoping for a similar behavior for `gr.File(file_count=\"directory\", file_types=[\"image\"])` where using ... | 4307d7e8099b688c637fb3ff74a6aa13b9e1fd8c | {
"head_commit": "a936a39e7956f30de14b2f8d0295330a863ecd01",
"head_commit_message": "formatting",
"patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex 534ceb6561..463ba67cd1 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -53,6 +53,8 @@ No changes to highlight.\n \n ## Full Changelog:\n * Fix de... | [
{
"diff_hunk": "@@ -531,6 +533,15 @@ def generic_update():\n }\n assert output[\"data\"][1] == {\"__type__\": \"update\", \"mode\": \"dynamic\"}\n \n+ def test_error_raised_if_num_outputs_mismatch(self):\n+ with gr.Blocks() as demo:\n+ textbox1 = gr.Textbox()\n+ ... | e646c1539624d34620562e03d2e31577d2a28635 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index a506bb9d75..d1aeb91750 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -54,6 +54,8 @@ No changes to highlight.
## Full Changelog:
* Fix demos page css and add close demos button by [@aliabd](https://github.com/aliabd) in [PR 3151](https://github.com/gradio-app/gradio/p... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "New Feature Additions"
} |
gradio-app__gradio-3266@589b32d | gradio-app/gradio | Python | 3,266 | Add `interactive=False` mode to `gr.Button` | Like other components, `gr.Button` should support a disabled mode if `interactive=False` is set. Note that unlike other components, `gr.Button()`'s interactive state should not be inferred based on whether it is an input component or not, so it needs to be explicitly set to `interactive=False` in order to be disabled. ... | 2023-02-21T17:00:24Z | No `interactive` option for `gr.Button()`
- [x] I have searched to see if a similar issue already exists.
**Is your feature request related to a problem? Please describe.**
I want to disable a button, but `gr.Button` has no `interactive` property. I have to hide it instead
**Describe the solution you'd like*... | [
{
"body": "- [x] I have searched to see if a similar issue already exists.\r\n\r\n\r\n**Is your feature request related to a problem? Please describe.** \r\nI want to disable a button, but `gr.Button` has no `interactive` property. I have to hide it instead\r\n\r\n**Describe the solution you'd like** \r\nAdd ... | 847610ccc083f0a3f18f0e9ad4dd40d485f734d5 | {
"head_commit": "589b32dd117c041ec141bf119d29b8c6537f7f9a",
"head_commit_message": "formatting",
"patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex cf6381711d..06c87f6da0 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -2,6 +2,8 @@\n \n ## New Features:\n - Updated image upload component to a... | [
{
"diff_hunk": "@@ -8,8 +8,16 @@\n \texport let visible: boolean = true;\n \texport let value: string;\n \texport let variant: \"primary\" | \"secondary\" = \"primary\";\n+\texport let mode: \"static\" | \"dynamic\";",
"line": null,
"original_line": 11,
"original_start_line": null,
"path": "ui/p... | 4ef34876b86f95fffc86bdcb4ea742947c29da20 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index cf6381711d..06c87f6da0 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,8 @@
## New Features:
- Updated image upload component to accept all image formats, including lossless formats like .webp by [@fienestar](https://github.com/fienestar) in [PR 3225](https://g... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "New Feature Additions"
} | |
ipython__ipython-14898@b9d6e2d | ipython/ipython | Python | 14,898 | Fix attribute completion for expressions with comparison operators | ## Fixes #14897
### Description
Modified `_attr_matches()` to check if an expression contains comparison operators `(=, ==, !=, etc.)` outside of parentheses. If so, it extracts the right-hand side of the operator for evaluation, providing appropriate completions.
For parenthesized expressions like `(x==y).<tab... | 2025-05-16T10:18:27Z | Tab completion fails with comparison operators
### Description
When using tab completion in IPython, it fails to correctly identify the object type when the cursor is after a comparison operator.
For example:
`x = y = 'a'` works correctly: `x.<tab>` shows string methods
But `x == y.<tab>` incorrectly shows boolean m... | [
{
"body": "### Description\n\nWhen using tab completion in IPython, it fails to correctly identify the object type when the cursor is after a comparison operator.\n\nFor example:\n\n`x = y = 'a'` works correctly: `x.<tab>` shows string methods\nBut `x == y.<tab>` incorrectly shows boolean methods instead of str... | 5a3bf345ed7c78e5fab84faa81285e5fd9dfa3da | {
"head_commit": "b9d6e2d431fcb398bea5814fce5f789b0f09210c",
"head_commit_message": "remove-comment",
"patch_to_review": "diff --git a/IPython/core/completer.py b/IPython/core/completer.py\nindex b450309707..4a9b457266 100644\n--- a/IPython/core/completer.py\n+++ b/IPython/core/completer.py\n@@ -1142,6 +1142,13 @... | [
{
"diff_hunk": "@@ -1142,6 +1142,13 @@ def _attr_matches(\n return [], \"\"\n expr, attr = m2.group(1, 2)\n \n+ operators = [\"=\", \"==\", \"!=\", \">=\", \"<=\", \">\", \"<\"]\n+ # Split by the operator and take the right side\n+ if not (expr.startswith(\"(\") and expr... | 7ccb220ae2dd624730925745b628af9a875d1c1e | diff --git a/IPython/core/completer.py b/IPython/core/completer.py
index b450309707..806fb1e25e 100644
--- a/IPython/core/completer.py
+++ b/IPython/core/completer.py
@@ -1134,6 +1134,48 @@ def attr_matches(self, text):
# we simple attribute matching with normal identifiers.
_ATTR_MATCH_RE = re.compile(r"(.+)... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} | |
gradio-app__gradio-3191@cbaf592 | gradio-app/gradio | Python | 3,191 | Support large files try 2 | Rewrote large file issue fixer with @freddyaboulton's approach. When a file is uploaded to FileUpload, it is automatically sent to the backend, and then the frontend receives a reference to the name of this new file. Much cleaner, thanks @freddyaboulton!
Fixes: #2421 | 2023-02-14T08:38:34Z | Large input files freeze/crash the interface
### Describe the bug
Hi, In my usecase a user uploads a rather large file (300-500mb) and it freezes the app for several seconds which makes for a very bad user experience. It happens after selecting a large file to a gradio File block. It freezes again when pressing a bu... | Could you give some more info about what you'd like to do with these large files when you have them? How we handle the files that are loaded by users dictates what you can do with it.
I haven't looked into this too much but I'm guessing that this is happening because we load the file into memory, in full. If the file... | [
{
"body": "### Describe the bug\r\n\r\nHi, In my usecase a user uploads a rather large file (300-500mb) and it freezes the app for several seconds which makes for a very bad user experience. It happens after selecting a large file to a gradio File block. It freezes again when pressing a button that processes th... | 9b2119f2979026163fc09a0212cdc6426644c0f6 | {
"head_commit": "cbaf592ac8fcf264dc6e7dd3c64d90b401206767",
"head_commit_message": "changes",
"patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex a1b1190ff9..be821ff653 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -38,6 +38,7 @@ By [@freddyaboulton](https://github.com/freddyaboulton) in [PR... | [
{
"diff_hunk": "@@ -292,17 +295,16 @@ async def file(path_or_url: str, request: fastapi.Request):\n )\n abs_path = str(utils.abspath(path_or_url))\n in_app_dir = utils.abspath(app.cwd) in utils.abspath(path_or_url).parents\n- created_by_app = str(utils.abspath(... | 8977eec7a682da6af23bbcb4f77836f317d5b022 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 7b218b454c..e61f40722a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -70,6 +70,7 @@ By [@dawoodkhan82](https://github.com/dawoodkhan82) in [PR 3165](https://github.
* Fixes `gr.utils.delete_none` to only remove props whose values are `None` from the config by [@abidlabs... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "Bug Fixes"
} |
ipython__ipython-14872@f0084d0 | ipython/ipython | Python | 14,872 | Do not always import * with autoreload3 | Fixes #14839
Previously, `%autoreload 3` always had the effect of `from module import *` on reloads. This PR fixes this functionality to the expected utility: if users specifically import some symbols from a module (for example `from X import Y` or `from X import Y as Z`), only those symbols are reloaded.
Unit ... | 2025-04-13T20:47:44Z | autoreload 3 has the effect of import *
The autoreload extension is almost magical, huge thanks to whoever's worked on it. There is one behavior that I find unexpected and I think may have been unintended.
We have a file reload.py containing:
```
n = 5
```
Then in ipython we do:
```
%load_ext autoreload
%autoreload 3
... | Hey @sczi thanks for catching this. I put up a PR #14872 with a minor modification to `autoreload 3` so that we appropriately deal with the `from X import Y` and `from X import Y as Z` cases -- I agree that it's unlikely this is intended. | [
{
"body": "The autoreload extension is almost magical, huge thanks to whoever's worked on it. There is one behavior that I find unexpected and I think may have been unintended.\n\nWe have a file reload.py containing:\n```\nn = 5\n```\nThen in ipython we do:\n```\n%load_ext autoreload\n%autoreload 3\nfrom reload... | d47970f7097668ec89a47120e14625d44b617d68 | {
"head_commit": "f0084d0485c088544171578a239a514cd040a195",
"head_commit_message": "Remove unused import",
"patch_to_review": "diff --git a/IPython/extensions/autoreload.py b/IPython/extensions/autoreload.py\nindex 39ac6d52d4..ebbeab7d41 100644\n--- a/IPython/extensions/autoreload.py\n+++ b/IPython/extensions/au... | [
{
"diff_hunk": "@@ -247,7 +248,33 @@ def check(self, check_all=False, do_reload=True):\n modules = list(sys.modules.keys())\n else:\n modules = list(self.modules.keys())\n-\n+ imports_froms = None\n+ symbol_map = {}\n+ if self.shell and \"In\" in self.shell.u... | 1bbcbf8d9a5f6b38dfe063ed566eb10bdcc5795b | diff --git a/IPython/core/interactiveshell.py b/IPython/core/interactiveshell.py
index 504681c358..ec85e2d3ad 100644
--- a/IPython/core/interactiveshell.py
+++ b/IPython/core/interactiveshell.py
@@ -252,13 +252,23 @@ class ExecutionInfo:
Stores information about what is going to happen.
"""
raw_cell = No... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "Bug Fixes"
} |
gradio-app__gradio-3211@5241f63 | gradio-app/gradio | Python | 3,211 | Dropdown Component Updates | # Description
Default dropdown uses the custom dropdown UI (adding searching ability)
`max_choices` param, can be set when `multiselect` is `True`
Adding A11y accessibility
Some styling updates (hover over tokens)
Please include:
* relevant motivation
* a summary of the change
* which issue is fixed.
... | 2023-02-16T16:44:30Z | Limit choices for `gr.Dropdown` multiselect
- [x] I have searched to see if a similar issue already exists.
**Is your feature request related to a problem? Please describe.**
I would like to limit to a certain number of choices for the multiselect option
**Describe the solution you'd like**
I would like to... | An odd additional request:
If we implement something like a `maximumChoices` parameter, please have it start with `1`.
It know it sounds weird and would be more logical that if `multiselect` == `True`, a `maximumChoices` parameter should start from `>=2`, but this would be a way to allow for users to use the amaz... | [
{
"body": "- [x] I have searched to see if a similar issue already exists.\r\n\r\n**Is your feature request related to a problem? Please describe.** \r\nI would like to limit to a certain number of choices for the multiselect option\r\n\r\n**Describe the solution you'd like** \r\nI would like to limit the use... | ed33e8f1a8cd2d3488edfd643ed4134fc9c3d59e | {
"head_commit": "5241f63da15989413c7ac5184d516e80da60b2b5",
"head_commit_message": "format",
"patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex 58e095b1c0..c5fde6cbe3 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -1,6 +1,16 @@\n # Upcoming Release\n \n ## New Features:\n+\n+### Dropdown Com... | [
{
"diff_hunk": "@@ -1238,6 +1240,9 @@ def __init__(\n if multiselect:\n if isinstance(value, str):\n value = [value]\n+ if not multiselect and max_choices is not None:\n+ warnings.warn(\"Max choices is ignored when multiselect is False.\")",
"line": null... | a2eb90d1f71e06e96ea89ee9e6c8d81770f100b7 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index f0a9b39cb3..a2d6f884b8 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,15 @@
## New Features:
+### Dropdown Component Updates
+
+The standard dropdown component now supports searching for choices. Also when `multiselect` is `True`, you can specify `max_choices... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "New Feature Additions"
} |
gradio-app__gradio-3045@6df272f | gradio-app/gradio | Python | 3,045 | Trigger events on programmatic change for Dropdown and Checkbox | # Description
Fixes #2995
How to test, run the repro from the issue

# Checklist:
- [x] I have performed a self-review of my own code
- [x] I have added a short summary of my ... | 2023-01-23T17:36:56Z | `gr.Checkbox` does not trigger `.change()` from being changed by another event handler
### Describe the bug
`gr.Slider()` amongst others trigger their `.change()` event handlers if another event changes their own values. However this does not apply to `gr.Checkbox()` for some reason
And after updating from 3.12.0 t... | [
{
"body": "### Describe the bug\n\n`gr.Slider()` amongst others trigger their `.change()` event handlers if another event changes their own values. However this does not apply to `gr.Checkbox()` for some reason\r\n\r\nAnd after updating from 3.12.0 to 3.16.2 I'm finding that the same now happens to `gr.Dropdown... | 35d4243854d2534d4a70593700485ef17350a229 | {
"head_commit": "6df272ffeace1c61dd14578ff405bd893ff4e520",
"head_commit_message": "CHANGELOG",
"patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex d459481f70..89056b21fc 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -50,6 +50,7 @@ By [@dawoodkhan82](https://github.com/dawoodkhan82) in [PR 3... | [
{
"diff_hunk": "@@ -1,12 +1,22 @@\n <script lang=\"ts\">\n \timport MultiSelect from \"./MultiSelect.svelte\";\n+\timport { createEventDispatcher } from \"svelte\";\n \timport { BlockTitle } from \"@gradio/atoms\";\n \texport let label: string;\n \texport let value: string | Array<string> | undefined = undefine... | f386063fc8043159fe2bd53b21d4dacf087591c6 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index d459481f70..89056b21fc 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -50,6 +50,7 @@ By [@dawoodkhan82](https://github.com/dawoodkhan82) in [PR 3014](https://github.
* Added better support for symlinks in the way absolute paths are resolved by [@abidlabs](https://github.... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} | |
gradio-app__gradio-3055@bbe7988 | gradio-app/gradio | Python | 3,055 | fix-tabs | # Description
Closes: #3040
- Fixes bug where tabs selected attribute not working if manually change tab.
# Checklist:
- [x] I have performed a self-review of my own code
- [x] I have added a short summary of my change to the CHANGELOG.md
- [x] My code follows the style guidelines of this project
- [x] I ... | 2023-01-25T12:22:50Z | Tabs selected attribute not working if manually change tab
### Describe the bug
Tabs won't dispatch change event or change selected if you have clicked tab manually.
### Is there an existing issue for this?
- [X] I have searched the existing issues
### Reproduction
Code:
```
import gradio as gr
with gr.Block... | Would you like to open a PR @tomchang25 ? Thanks for looking into this! | [
{
"body": "### Describe the bug\n\nTabs won't dispatch change event or change selected if you have clicked tab manually.\n\n### Is there an existing issue for this?\n\n- [X] I have searched the existing issues\n\n### Reproduction\n\nCode: \r\n```\r\nimport gradio as gr\r\n\r\nwith gr.Blocks() as demo:\r\n wi... | 4e3626bbeb1c9ca1d5133df7b431d05281cbaaef | {
"head_commit": "bbe79887289271e9bac540b127fecd8a80cd3746",
"head_commit_message": "fix-tabs",
"patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex 840cecdb48..6c21ac334e 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -1,4 +1,8 @@\n-# Upcoming Release \n+# Upcoming Release\n+\n+## Bug Fixes:\n... | [
{
"diff_hunk": "@@ -1,4 +1,8 @@\n-# Upcoming Release \n+# Upcoming Release\n+\n+## Bug Fixes:\n+\n+- Fixes bug where tabs selected attribute not working if manually change tab. Issuse #3040",
"line": null,
"original_line": 5,
"original_start_line": null,
"path": "CHANGELOG.md",
"start_line":... | 7f4f8315052b8b7b358c84090535c2575f123105 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index a97293ba25..bd576d97d6 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -57,6 +57,7 @@ By [@dawoodkhan82](https://github.com/dawoodkhan82) in [PR 3014](https://github.
* Fixes bug where app would crash if the `file_types` parameter of `gr.File` or `gr.UploadButton` was not... | {
"difficulty": "low",
"estimated_review_effort": 1,
"problem_domain": "Bug Fixes"
} |
ipython__ipython-14466@ac8c384 | ipython/ipython | Python | 14,466 | fixed honoring custom repr for NamedTuple if assigned by partialmethod | Fixes #14465.
- added test `test_custom_repr_namedtuple_partialmethod` | 2024-06-20T11:01:28Z | `display` does not honor custom `__repr__` for `NamedTuple` when defined by `partialmethod`
The issue occurs when the custom `__repr__` is defined via `partialmethod`:
```python
from functools import partialmethod
from typing import NamedTuple
def my_pprint(obj, **options):
return "Hello World"
def add_... | The culprit:
https://github.com/ipython/ipython/blob/1454013b8b615ce75d30d38b7710e3fccca16263/IPython/lib/pretty.py#L409-L411
This check is incorrect, because `partialmethod` is a descriptor and not callable. Instead, the test should be replaced with `callable(getattr(cls, "__repr__", None))`. | [
{
"body": "The issue occurs when the custom `__repr__` is defined via `partialmethod`:\r\n\r\n```python\r\nfrom functools import partialmethod\r\nfrom typing import NamedTuple\r\n\r\ndef my_pprint(obj, **options):\r\n return \"Hello World\"\r\n\r\ndef add_custom_pprint(cls=None, **options):\r\n if cls is ... | 1454013b8b615ce75d30d38b7710e3fccca16263 | {
"head_commit": "ac8c384dffa48f6f55cfd08eedca6e5dc013aa40",
"head_commit_message": "formatting",
"patch_to_review": "diff --git a/IPython/core/tests/test_formatters.py b/IPython/core/tests/test_formatters.py\nindex c642befaccf..cd8c83e555b 100644\n--- a/IPython/core/tests/test_formatters.py\n+++ b/IPython/core/t... | [
{
"diff_hunk": "@@ -406,8 +406,16 @@ def pretty(self, obj):\n meth = cls._repr_pretty_\n if callable(meth):\n return meth(obj, self, cycle)\n- if cls is not object \\\n- ... | 60967bbd4d302ac66d3936ae0f494a762736e954 | diff --git a/IPython/core/tests/test_formatters.py b/IPython/core/tests/test_formatters.py
index c642befaccf..cd8c83e555b 100644
--- a/IPython/core/tests/test_formatters.py
+++ b/IPython/core/tests/test_formatters.py
@@ -103,7 +103,7 @@ def set_fp(p):
def test_for_type():
f = PlainTextFormatter()
-
+
#... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "Bug Fixes"
} |
gradio-app__gradio-2890@b8fbdac | gradio-app/gradio | Python | 2,890 | Fix blocks_style demo | # Description
Fixes #2879
# Checklist:
- [x] I have performed a self-review of my own code
- [x] I have added a short summary of my change to the CHANGELOG.md
- [x] My code follows the style guidelines of this project
- [x] I have commented my code in hard-to-understand areas
- [x] I have made correspondin... | 2022-12-27T15:51:55Z | Cant run blocks_style demo
### Describe the bug
Run `python demo/blocks_style/run.py` and you will get an error
### Is there an existing issue for this?
- [X] I have searched the existing issues
### Reproduction
Above
### Screenshot
_No response_
### Logs
```shell
Traceback (most recent call last):
File "de... | [
{
"body": "### Describe the bug\n\nRun `python demo/blocks_style/run.py` and you will get an error\n\n### Is there an existing issue for this?\n\n- [X] I have searched the existing issues\n\n### Reproduction\n\nAbove\n\n### Screenshot\n\n_No response_\n\n### Logs\n\n```shell\nTraceback (most recent call last):\... | e3434dd4cb5f86bd54ed9dbdae010bcfffd146cc | {
"head_commit": "b8fbdacb23e350e079a204e011442eb5b4f9de8b",
"head_commit_message": "Add changelog",
"patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex e795d9fae9..dff18d5516 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -7,7 +7,8 @@\n * Fixed bug where setting `default_enabled=False` made i... | [
{
"diff_hunk": "@@ -70,7 +70,7 @@\n height=\"auto\",\n container=False,\n )\n- chat = gr.Chatbot(\"hi\", color_map=(\"pink\", \"blue\")).style(\n+ chat = gr.Chatbot([(\"hi\", \"good bye\")], color_map=(\"pink\", \"blue\")).style(\n rounded=False,\n ... | 8579da619bdafcf39289525be69fe1f1d3641e3d | diff --git a/CHANGELOG.md b/CHANGELOG.md
index e795d9fae9..dff18d5516 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,7 +7,8 @@
* Fixed bug where setting `default_enabled=False` made it so that the entire queue did not start by [@freddyaboulton](https://github.com/freddyaboulton) in [PR 2876](https://github.com/gra... | {
"difficulty": "low",
"estimated_review_effort": 2,
"problem_domain": "Bug Fixes"
} | |
home-assistant__core-109508@24fd8d2 | home-assistant/core | Python | 109,508 | Convert Anova to cloud push | <!--
You are amazing! Thanks for contributing to our project!
Please, DO NOT DELETE ANY TEXT from this template! (unless instructed).
-->
## Breaking change
<!--
If your PR contains a breaking change for existing users, it is important
to tell them what breaks, how to make it work again and why we did th... | 2024-02-03T14:46:10Z | Anova precision cooker not found
### The problem
I have an anova precision cooker in my app and it is currently online and allows me to control it but I am unable to add the integration because it does not find any devices.
### What version of Home Assistant Core has the issue?
Core-2023.5.0
### What was the last w... | Hey there @lash-l, mind taking a look at this issue as it has been labeled with an integration (`anova`) you are listed as a [code owner](https://github.com/home-assistant/core/blob/dev/CODEOWNERS#L85) for? Thanks!
<details>
<summary>Code owner commands</summary>
Code owners of `anova` can trigger bot actions by com... | [
{
"body": "### The problem\n\nI have an anova precision cooker in my app and it is currently online and allows me to control it but I am unable to add the integration because it does not find any devices.\n\n### What version of Home Assistant Core has the issue?\n\nCore-2023.5.0\n\n### What was the last working... | ad05a542ae19f842a554498f84ec994c8d9e2dff | {
"head_commit": "24fd8d2befc8f74fb17492bd47350a1acfb70e6e",
"head_commit_message": "Change to sensor setup to be listener based.",
"patch_to_review": "diff --git a/homeassistant/components/anova/__init__.py b/homeassistant/components/anova/__init__.py\nindex 6181d02025dbfc..dc550bc4c028f4 100644\n--- a/homeassis... | [
{
"diff_hunk": "@@ -35,36 +34,22 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:\n )\n return False\n assert api.jwt\n- api.existing_devices = [\n- AnovaPrecisionCooker(\n- aiohttp_client.async_get_clientsession(hass),\n- devic... | c02099634413c812c4d1fb525ec7761e287b5ae5 | diff --git a/homeassistant/components/anova/__init__.py b/homeassistant/components/anova/__init__.py
index 9b0f649dad9892..7503de8ea10841 100644
--- a/homeassistant/components/anova/__init__.py
+++ b/homeassistant/components/anova/__init__.py
@@ -3,18 +3,25 @@
from __future__ import annotations
import logging
+from... | {
"difficulty": "high",
"estimated_review_effort": 4,
"problem_domain": "Bug Fixes"
} |
ipython__ipython-14251@1e91131 | ipython/ipython | Python | 14,251 | Fix memory leak in Qt event loop integration (#14240) | The QEventLoop object, `event_loop`, created in `IPython/terminal/pt_intputhooks/qt.py` L58 is not deleted when exiting the scope as passing `app` to the constructor parents the object to `app`. This creates a memory leak as QEventLoop objects are being accumulated.
The issue was originally reported by @pag who also... | 2023-11-23T13:15:26Z | Memory leak with %matplotlib qt, with simple fix
When using matplotlib event loop integration (e.g. %matplotlib) with pyqt, there is a memory leak caused by a misunderstanding of the lifespan of QObjects.
I found it because I'm trying to debug slowdowns in long-running IPython sessions with autoreload. I'm not sure ... | > The fix is simple: just add a line at the end of that function containing event_loop.setParent(None).
Thanks for finding a fix @pag!
> Hopefully it's faster for you to just add that single line of code rather than me forking, making a pull request etc, but please tell me if you need me to do so.
Unfortunatel... | [
{
"body": "When using matplotlib event loop integration (e.g. %matplotlib) with pyqt, there is a memory leak caused by a misunderstanding of the lifespan of QObjects.\r\n\r\nI found it because I'm trying to debug slowdowns in long-running IPython sessions with autoreload. I'm not sure that this is actually the ... | 225a1a2699f328c1b4a0ded2de1f7af9f731ad55 | {
"head_commit": "1e91131cbfcfed1ad654e6750b934bdcbdd394d2",
"head_commit_message": "Fix memory leak in Qt event loop integration (#14240)\n\nSee: https://github.com/ipython/ipython/issues/14240\n\n- the QEventLoop, `event_loop`, is not deleted when exiting the scope as\npassing `app` to the constructor parents the... | [
{
"diff_hunk": "@@ -84,3 +84,5 @@ def inputhook(context):\n _exec(event_loop)\n finally:\n notifier.setEnabled(False)\n+ # make sure that the QObject is being deleted",
"line": null,
"original_line": 87,
"original_start_line": null,
"path": "IPython/termina... | b033ecc88f92e8d83b9679de666e142175d4dd6b | diff --git a/IPython/terminal/pt_inputhooks/qt.py b/IPython/terminal/pt_inputhooks/qt.py
index cf6d11ea6ca..2f3f491ef9e 100644
--- a/IPython/terminal/pt_inputhooks/qt.py
+++ b/IPython/terminal/pt_inputhooks/qt.py
@@ -84,3 +84,7 @@ def inputhook(context):
_exec(event_loop)
finally:
... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
ipython__ipython-14128@1fd7e9f | ipython/ipython | Python | 14,128 | Fix/mpl integration | - Closes https://github.com/matplotlib/matplotlib/issues/17454
- fixes qt5/qt6 confusion | 2023-08-07T02:14:10Z | %matplotlib inline called from IPython turns interactive mode off, forever and only for scripts
### Bug report
**Bug summary**
After calling `%matplotlib inline` from IPython shell, matplotlib interactive mode is turned off for commands inside scripts and cannot be turned on again, irrespectively from the intera... | attn @Carreau as this may be an IPython issue (as that is where the both the `%matplotlib` and `%run` magics are defined).
Thanks.
If it can be interesting, I am finding some other similar odd behavior.
For example this script contains three version of same functions, two of which fail on second execution if the s... | [
{
"body": "### Bug report\r\n\r\n**Bug summary**\r\n\r\nAfter calling `%matplotlib inline` from IPython shell, matplotlib interactive mode is turned off for commands inside scripts and cannot be turned on again, irrespectively from the interactive status in the console.\r\n\r\n**Code for reproduction**\r\n\r\n... | a4d77b415ade4f4f294516eed280eb1f30daeadc | {
"head_commit": "1fd7e9f14bd0daa736d5d93150b77d4120b47799",
"head_commit_message": "STY: more style fixes",
"patch_to_review": "diff --git a/IPython/core/pylabtools.py b/IPython/core/pylabtools.py\nindex deadf038ea3..cfe83123d66 100644\n--- a/IPython/core/pylabtools.py\n+++ b/IPython/core/pylabtools.py\n@@ -23,7... | [
{
"diff_hunk": "@@ -317,9 +319,15 @@ def find_gui_and_backend(gui=None, gui_select=None):\n \n import matplotlib\n \n+ has_unified_qt_backend = matplotlib.__version__[:3] >= \"3.5\"",
"line": null,
"original_line": 322,
"original_start_line": null,
"path": "IPython/core/pylabtools.py",
... | 97191eb508b2ff907053fdfb12cfa89394cbbb72 | diff --git a/IPython/core/pylabtools.py b/IPython/core/pylabtools.py
index deadf038ea3..e5715a94976 100644
--- a/IPython/core/pylabtools.py
+++ b/IPython/core/pylabtools.py
@@ -23,7 +23,7 @@
"qt4": "Qt4Agg",
"qt5": "Qt5Agg",
"qt6": "QtAgg",
- "qt": "Qt5Agg",
+ "qt": "QtAgg",
"osx": "MacOSX",
... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
gradio-app__gradio-3023@d2417df | gradio-app/gradio | Python | 3,023 | Chatbot Guide Update | # Description
Update chatbot guide to use blocks instead of interface. Also updated demo
+ Includes a quick chatbot component fix (set max height of messages + allow word wrap)
Please include:
* relevant motivation
* a summary of the change
* which issue is fixed.
* any additional dependencies that are requi... | 2023-01-19T16:46:37Z | Update Chatbot Guide
- [ ] I have searched to see if a similar issue already exists.
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
Update Chatbot Guide to ... | [
{
"body": "- [ ] I have searched to see if a similar issue already exists.\r\n\r\n\r\n**Is your feature request related to a problem? Please describe.** \r\nA clear and concise description of what the problem is. Ex. I'm always frustrated when [...]\r\n\r\n**Describe the solution you'd like** \r\nUpdate Chatb... | da4c46c33ac49481a693fb2fb6a4af3f1761062e | {
"head_commit": "d2417dfaa0958989698537e733476c4528d6b0ac",
"head_commit_message": "Merge branch 'main' into chatbot-guide",
"patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex 4995d8218e..fa24f479fc 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -17,7 +17,7 @@ Previously photos uploaded via ... | [
{
"diff_hunk": "@@ -21,9 +21,13 @@ Make sure you have the `gradio` Python package already [installed](/quickstart).\n \n Let's get started! Here's how to build your own chatbot: \n \n-1. [Set up the Chatbot Model](#1-set-up-the-chatbot-model)\n-2. [Define a `predict` function](#2-define-a-predict-function)\n-3.... | 6dbdea4226cbf2528174815bcfdb5ae5db366477 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 78e347e929..3c56d0aaa9 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -64,6 +64,7 @@ By [@freddyaboulton](https://github.com/freddyaboulton) in [PR 3101](https://git
- Fixed `Gallery.style(grid=...)` by by [@aliabd](https://github.com/aliabd) in [PR 3107](https://github.... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "New Feature Additions"
} | |
ipython__ipython-13566@3d15172 | ipython/ipython | Python | 13,566 | Adding and "End" key binding for applying an auto suggestion | For [#13492](https://github.com/ipython/ipython/issues/13492) | 2022-03-03T19:24:39Z | Auto-complete hinted suggestions using the END key
Sorry if this is duplicated and has been implemented already, but I did search the issue tracker and did not find anything mentioning it.
The auto-complete hints in the new version are awesome, however I find myself trying to apply them by pressing the END key, just... | Yes, that is a good idea, I thought about it at some point, configure which keys allow to validate hinted suggestion, and also allow other sources of hinted suggestions. I'm not sure I'll have the time to do that soon, so it will likely need someone to contribute it. | [
{
"body": "Sorry if this is duplicated and has been implemented already, but I did search the issue tracker and did not find anything mentioning it.\r\n\r\nThe auto-complete hints in the new version are awesome, however I find myself trying to apply them by pressing the END key, just like I do in the fish shell... | 385aad4abd987bda8821849cea85952fe09bbe57 | {
"head_commit": "3d15172f2ecf8368bf12ac68efc2961b63647489",
"head_commit_message": "Format according to black/darker",
"patch_to_review": "diff --git a/IPython/terminal/shortcuts.py b/IPython/terminal/shortcuts.py\nindex b53e5b49a7c..ba0cf123be3 100644\n--- a/IPython/terminal/shortcuts.py\n+++ b/IPython/terminal... | [
{
"diff_hunk": "@@ -267,15 +267,22 @@ def ebivim():\n focused_insert_vi = has_focus(DEFAULT_BUFFER) & vi_insert_mode\n \n # Needed for to accept autosuggestions in vi insert mode\n- @kb.add(\"c-e\", filter=focused_insert_vi & ebivim)\n- def _(event):\n+ def _apply_autosuggest(event):\n ... | 3da97ccfdd6072238a5d8a538adfdf3641573fe6 | diff --git a/IPython/terminal/shortcuts.py b/IPython/terminal/shortcuts.py
index b53e5b49a7c..44007d1a225 100644
--- a/IPython/terminal/shortcuts.py
+++ b/IPython/terminal/shortcuts.py
@@ -267,8 +267,7 @@ def ebivim():
focused_insert_vi = has_focus(DEFAULT_BUFFER) & vi_insert_mode
# Needed for to accept aut... | {
"difficulty": "low",
"estimated_review_effort": 2,
"problem_domain": "New Feature Additions"
} |
gradio-app__gradio-3300@ad7a048 | gradio-app/gradio | Python | 3,300 | Sets up the Python `gradio` client | Creates a lightweight Python library called `gradio_client`
Documentation:
-----------
# `gradio_client`: Use any Gradio app as an API -- in 3 lines of Python
## Installation
The lightweight `gradio_client` package can be installed from `pip` (or `pip3`) and works with Python versions 3.7 or higher:
... | 2023-02-24T00:00:15Z | Add a Python client to make it easy to connect to hosted Gradio apps & respect the queue
- [x] I have searched to see if a similar issue already exists.
As we make the queue the primary way of connecting with gradio apps programmatically, we should offer developers a friendly client that lets them connect to `queue/... | On the Python side, we already have `gr.Interface.load()`, which respects the queue. However, it only supports Spaces right now. Would be good to add support for arbitrary URLs
Revisiting this -- I think we should develop a separate Python library / client for connecting to hosted Gradio Spaces. The main advantage woul... | [
{
"body": "- [x] I have searched to see if a similar issue already exists.\r\n\r\nAs we make the queue the primary way of connecting with gradio apps programmatically, we should offer developers a friendly client that lets them connect to `queue/join` and get the websocket messages.\r\n\r\nThis will make it eas... | f2fb69ec29b9e7505b05e342443228507f8a7922 | {
"head_commit": "ad7a0482aee2a8ab38f31ae62973d28554340992",
"head_commit_message": "fix type checking",
"patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex 4621042195..29f5e4c963 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -75,6 +75,8 @@ with gr.Blocks() as demo:\n \n By [@aliabid94](https... | [
{
"diff_hunk": "@@ -0,0 +1,71 @@\n+from copy import deepcopy\n+import tempfile\n+\n+import pytest\n+from gradio import media_data\n+\n+from gradio_client import utils\n+\n+data = {\n+ \n+}",
"line": null,
"original_line": 11,
"original_start_line": 9,
"path": "client/python/test/test_utils.py... | ede1f6c1f7d348ce2da5557ee480073db757270f | diff --git a/client/python/README.md b/client/python/README.md
new file mode 100644
index 0000000000..f27d88f198
--- /dev/null
+++ b/client/python/README.md
@@ -0,0 +1,105 @@
+# `gradio_client`: Use any Gradio app as an API -- in 3 lines of Python
+
+This directory contains the source code for `gradio_client`, a lightw... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "New Feature Additions"
} |
ipython__ipython-13560@c1efb80 | ipython/ipython | Python | 13,560 | Restore lineno's for Input mapped files | This restores line number information in tracebacks from input, which got removed during the transition to v8 enhanced traceback reporting. | 2022-02-27T19:31:23Z | v8 Errors: input line numbers missing
I quite like the new (v8) simple format for syntax and other compile errors from Input, like `Input In [25]`. But compared to the old (v7) error header with pseudo-files (e.g. `File "<ipython-input-6-9e0b5ab16b5e>", line 4`), the line number has gone missing. There are tools whic... | I've been testing with the following in ultratb.py's `_format_filename`:
```python
if ipinst is not None and file in ipinst.compile._filename_map:
file = "[%s]" % ipinst.compile._filename_map[file]
if lineno is None:
tpl_link = f"Input {ColorFilename}In {{file}}{ColorNormal}"
... | [
{
"body": "I quite like the new (v8) simple format for syntax and other compile errors from Input, like `Input In [25]`. But compared to the old (v7) error header with pseudo-files (e.g. `File \"<ipython-input-6-9e0b5ab16b5e>\", line 4`), the line number has gone missing. There are tools which parse iPython's... | e9ffbb81f753f319b771732ae6b96983612cc90b | {
"head_commit": "c1efb80ca1000afefb97be27bb82d6c2bce5aa36",
"head_commit_message": "Remove <module> from traceback doctests",
"patch_to_review": "diff --git a/IPython/core/interactiveshell.py b/IPython/core/interactiveshell.py\nindex 790a75e7d4e..96e7cd1dd4b 100644\n--- a/IPython/core/interactiveshell.py\n+++ b/... | [
{
"diff_hunk": "@@ -464,29 +467,38 @@ def _format_list(self, extracted_list):\n Colors = self.Colors\n list = []\n for filename, lineno, name, line in extracted_list[:-1]:\n- item = \" %s in %s%s%s\\n\" % (\n+ item = \" %s\" % (\n _format_filename(... | 3df2c1266a81bf2608b6e7c5d73eb90d5692f7c0 | diff --git a/IPython/core/interactiveshell.py b/IPython/core/interactiveshell.py
index 790a75e7d4e..96e7cd1dd4b 100644
--- a/IPython/core/interactiveshell.py
+++ b/IPython/core/interactiveshell.py
@@ -15,7 +15,6 @@
import ast
import atexit
import builtins as builtin_mod
-import dis
import functools
import inspect
... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
gradio-app__gradio-2791@0b387fe | gradio-app/gradio | Python | 2,791 | 2777 Add restProps to IconButton … | … and use it to pass aria-labels down to the button element where it's used in other UI components
@pngwn
# Description
* relevant motivation - Button must have discernible text, per WCAG success criterion 4.1.2 https://www.w3.org/WAI/WCAG21/Understanding/name-role-value.html
* a summary of the change - rest... | 2022-12-12T01:32:44Z | Add aria-label to icon buttons
### Describe the bug
cc @emilyuhde
### Is there an existing issue for this?
- [X] I have searched the existing issues
### Reproduction
-
### Screenshot
_No response_
### Logs
```shell
-
```
### System Info
```shell
-
```
### Severity
serious, but I can work around it | Repro steps:
1. Go to the doc site for the Image component: https://gradio.app/docs/#image
2. Upload an image of your choice
3. Inspect the edit and close button in the button right hand corner of the component
Expected: There should be an aria-label on these button elements to give screen reader users labels d... | [
{
"body": "### Describe the bug\n\ncc @emilyuhde\n\n### Is there an existing issue for this?\n\n- [X] I have searched the existing issues\n\n### Reproduction\n\n-\n\n### Screenshot\n\n_No response_\n\n### Logs\n\n```shell\n-\n```\n\n\n### System Info\n\n```shell\n-\n```\n\n\n### Severity\n\nserious, but I can w... | 9c8fa8bf45105032fc71e9ccad68c773464dfccb | {
"head_commit": "0b387feb0a4ba5a1ba5888f74a30506fbda26ebf",
"head_commit_message": "2777 Add restProps to IconButton and use it to pass aria-labels down to the button element where it's used in other UI components",
"patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex dba9b95652..e30818c2e4 100644... | [
{
"diff_hunk": "@@ -7,9 +7,10 @@\n </script>\n \n <div class=\"z-50 top-2 right-2 justify-end flex gap-1 absolute\">\n-\t<IconButton Icon={Undo} on:click={() => dispatch(\"undo\")} />\n+\t<IconButton Icon={Undo} aria-label=\"Undo\" on:click={() => dispatch(\"undo\")} />",
"line": null,
"original_line": ... | 351ebd4eba8efb6d482c0d80b3c9496df52d0d0a | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 3d6772cce2..7e698ad34f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,4 @@
-# Upcoming Release
+# Upcoming Release
## New Features:
@@ -31,8 +31,9 @@ These links are a more secure and scalable way to create shareable demos!
No changes to highlight.
## Fu... | {
"difficulty": "low",
"estimated_review_effort": 2,
"problem_domain": "New Feature Additions"
} |
ipython__ipython-13345@575be23 | ipython/ipython | Python | 13,345 | Don't add ipython unconditionally to sys.path | Load ext will already do it with a context manager.
This should remove false positive when import modules, whithout breaking
functionalities.
Maybe closes #13294 (making this part of 8.0 release make sens). | 2021-11-27T18:14:54Z | Problems due to adding IPython profile dir (~/.ipython) to sys.path
When starting IPython, the profile directory gets added to sys.path. This means any `import` statement will also look for modules in that folder and in some cases allow you to import packages that aren't installed.
For instance, after using the Cyth... | Yes, this machinery is quite old, it pre-dates pip, so we should likely find other ways to do that. I think there was some recent changes in this area, maybe the master branch behaves better now.
Thanks. I will give the master branch a try soon and post the outcomes here.
The path `C:\Users\<USERNAME>\.ipython` is stil... | [
{
"body": "When starting IPython, the profile directory gets added to sys.path. This means any `import` statement will also look for modules in that folder and in some cases allow you to import packages that aren't installed.\r\n\r\nFor instance, after using the Cython magic, I can import cython even when cytho... | 9c54f3ee28612e334f6f4b609cfc2950b1de62d2 | {
"head_commit": "575be23d4994cabb0ad7b9469a319c1758b10a15",
"head_commit_message": "Don't add ipython unconditionally to sys.path\n\nLoad ext will already do it with a context manager.\n\nThis should remove false positive when import modules, whithout breaking\nfunctionalities.\n\nMaybe closes #13294 (making this ... | [
{
"diff_hunk": "@@ -294,21 +303,22 @@ def _ipython_dir_changed(self, change):\n str_old = os.path.abspath(old)\n if str_old in sys.path:\n sys.path.remove(str_old)\n- str_path = os.path.abspath(new)\n- sys.path.append(str_path)\n- ensure_dir_exists(ne... | 96c5d75c72131f888b8d3f9dc95a7fc35ee68808 | diff --git a/IPython/core/application.py b/IPython/core/application.py
index 85c91274d4e..c9e8e6f4d43 100644
--- a/IPython/core/application.py
+++ b/IPython/core/application.py
@@ -185,6 +185,17 @@ def _profile_changed(self, change):
get_ipython_package_dir(), u'config', u'profile', change['new']
... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Code Refactoring / Architectural Improvement"
} |
home-assistant__core-102636@3a8dbfd | home-assistant/core | Python | 102,636 | Add hvac_modes property to Plugwise | <!--
You are amazing! Thanks for contributing to our project!
Please, DO NOT DELETE ANY TEXT from this template! (unless instructed).
-->
## Proposed change
<!--
Describe the big picture of your changes here to communicate to the
maintainers why we should accept this pull request. If it fixes a bug
... | 2023-10-24T06:23:07Z | Plugwise does not adapt to removal of a schedule
### The problem
When a schedule of a thermostat is removed by the user, the `hvac_mode` `auto` should no longer be provided by the integration.
However, `hvac_mode` `auto` is still shown in HA when I remove the schedule of a thermostat.
### What version of Home Assist... | Hey there @compatech, @frenck, mind taking a look at this issue as it has been labeled with an integration (`plugwise`) you are listed as a [code owner](https://github.com/home-assistant/core/blob/dev/CODEOWNERS#L956) for? Thanks!
<details>
<summary>Code owner commands</summary>
Code owners of `plugwise` can trigger... | [
{
"body": "### The problem\n\nWhen a schedule of a thermostat is removed by the user, the `hvac_mode` `auto` should no longer be provided by the integration.\r\nHowever, `hvac_mode` `auto` is still shown in HA when I remove the schedule of a thermostat.\n\n### What version of Home Assistant Core has the issue?\... | 6372bc3aaa7af00d4ca3d1064d59978ea1c1ce60 | {
"head_commit": "3a8dbfdfeb985a70779febfcc7ee363754135062",
"head_commit_message": "Implement review comments",
"patch_to_review": "diff --git a/homeassistant/components/plugwise/climate.py b/homeassistant/components/plugwise/climate.py\nindex 32146c2753ff6a..82ee9b9dc6aeaa 100644\n--- a/homeassistant/components... | [
{
"diff_hunk": "@@ -117,6 +110,21 @@ def hvac_mode(self) -> HVACMode:\n return HVACMode.HEAT\n return HVACMode(mode)\n \n+ @property\n+ def hvac_modes(self) -> list[HVACMode]:\n+ \"\"\"Return the list of available HVACModes.\"\"\"\n+ hvac_modes: list[HVACMode] = [HVACMode... | de56dd42d3f30efff048d17d79d747568d956881 | diff --git a/homeassistant/components/plugwise/climate.py b/homeassistant/components/plugwise/climate.py
index 32146c2753ff6a..e25c2e72e0575c 100644
--- a/homeassistant/components/plugwise/climate.py
+++ b/homeassistant/components/plugwise/climate.py
@@ -66,13 +66,6 @@ def __init__(
self._attr_supported_fe... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
ipython__ipython-11358@bd7a4c2 | ipython/ipython | Python | 11,358 | Fixes 11334/11354 Multi line code blocks | This pull request merges the recent input transformer changes from master. It builds off of the work by @bartskowron in #11354 to resolve #11334 . The changes pass tests locally, including the new tests provided by @Carreau; let's see what CI says.
@takluyver [I commented out an assertion](https://github.com/ipyt... | 2018-10-04T02:13:25Z | Cannot make multi-line code blocks in ipython
I just did a `pip install ipython` while teaching a class today and typed an if statement and then hit enter after the first line and the code executed.
This seems like a bug.
I did a `pip install ipython==6.5.0` and hitting Enter in a code block properly showed me th... | you can use `ctrl-o` to force a new line.
I never would have guessed that one. I'm not sure how to make this more clear, but I do think it warrants some clarification/hand-holding. I tried every shortcut I could think of and ended up forcing a downgrade to fix my issue.
I use IPython to make it easier to type out a... | [
{
"body": "I just did a `pip install ipython` while teaching a class today and typed an if statement and then hit enter after the first line and the code executed.\r\n\r\nThis seems like a bug.\r\n\r\nI did a `pip install ipython==6.5.0` and hitting Enter in a code block properly showed me the next indented lin... | b3edf6c1ddbae4e8f6ed59947afc883861165d5d | {
"head_commit": "bd7a4c2d4abf3e5b765cfc04eb7fde67fa6822ea",
"head_commit_message": "Remove a condition from check_complete\n\nCo-Authored-By: Nicholas Bollweg <bollwyvl@users.noreply.github.com>",
"patch_to_review": "diff --git a/.travis.yml b/.travis.yml\nindex 09e16146476..cf184a9d993 100644\n--- a/.travis.yml... | [
{
"diff_hunk": "@@ -212,6 +214,17 @@ def test_check_complete():\n nt.assert_equal(cc(\"a = '''\\n hi\"), ('incomplete', 3))\n nt.assert_equal(cc(\"def a():\\n x=1\\n global x\"), ('invalid', None))\n nt.assert_equal(cc(\"a \\\\ \"), ('invalid', None)) # Nothing allowed after backslash\n+ nt.as... | bdaec6ffae6f8f4dfa644bffeab93c1e5ad30f99 | diff --git a/.travis.yml b/.travis.yml
index 09e16146476..cf184a9d993 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -34,6 +34,7 @@ after_success:
matrix:
include:
+ - { python: "3.6-dev", dist: xenial, sudo: true }
- { python: "3.7", dist: xenial, sudo: true }
- { python: "3.7-dev", dis... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "Bug Fixes"
} |
home-assistant__core-102134@e984172 | home-assistant/core | Python | 102,134 | Fix suggested UOM cannot be set for dsmr entities | <!--
You are amazing! Thanks for contributing to our project!
Please, DO NOT DELETE ANY TEXT from this template! (unless instructed).
-->
## Proposed change
<!--
Describe the big picture of your changes here to communicate to the
maintainers why we should accept this pull request. If it fixes a bug
or... | 2023-10-16T22:38:07Z | Energy sensor value changed from Kw to W resets after restart HA.
### Checklist
- [X] I have updated to the latest available Home Assistant version.
- [X] I have cleared the cache of my browser.
- [X] I have tried a different browser to see if it is related to my browser.
### Describe the issue you are experiencing
... | I have the same problem
There might be more than 1 bug here. The first bug is that the power settings reset from W to kW at last on all 4 of the power consumption sensor settings. I assume this is probably also the case for power production and energy consumption/production.
There is a second bug that in order to ... | [
{
"body": "### Checklist\n\n- [X] I have updated to the latest available Home Assistant version.\n- [X] I have cleared the cache of my browser.\n- [X] I have tried a different browser to see if it is related to my browser.\n\n### Describe the issue you are experiencing\n\nI have a 3 phase smart meter and activa... | 61104dd726157821a0bb1be5af2c4f3e4881934d | {
"head_commit": "e984172230759767ce02b227f1c2448091e994f0",
"head_commit_message": "Supply dsmr entities jit on first telegram",
"patch_to_review": "diff --git a/homeassistant/components/dsmr/sensor.py b/homeassistant/components/dsmr/sensor.py\nindex 2ff0a834e9eb56..e89b41f74e48f3 100644\n--- a/homeassistant/com... | [
{
"diff_hunk": "@@ -387,28 +395,76 @@ async def async_setup_entry(\n ) -> None:\n \"\"\"Set up the DSMR sensor.\"\"\"\n dsmr_version = entry.data[CONF_DSMR_VERSION]\n- entities = [\n- DSMREntity(description, entry)\n- for description in SENSORS\n- if (\n- description.d... | 4972fec3464e6e0757ae1005b442cb2707e7320f | diff --git a/homeassistant/components/dsmr/sensor.py b/homeassistant/components/dsmr/sensor.py
index 2ff0a834e9eb5..002e2797450e9 100644
--- a/homeassistant/components/dsmr/sensor.py
+++ b/homeassistant/components/dsmr/sensor.py
@@ -3,6 +3,7 @@
import asyncio
from asyncio import CancelledError
+from collections.abc... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "Bug Fixes"
} |
ivy-llc__ivy-28500@d65ff7f | ivy-llc/ivy | Python | 28,500 | fix: ivy.linalg.matrix_norm() for paddle backend | <!--
This template will help you to have a meaningful PR, please follow it and do not leave it blank.
-->
# PR Description
- Type-casting to the `dtype` argument through the `@infer_dtype` decorator and `ivy.astype(x, dtype).as_native()`.
- Added `dtype` argument to array and container methods.
- Added type-cas... | 2024-03-07T12:40:54Z | Fix Frontend Failing Test: torch - linalg.torch.linalg.matrix_norm
At the first glance, the possible reasons for errors:
- lack of `@with_supported_dtypes`/type-casting in some backends or unnecessary type-casting in the tests,
- lack of set tolerances and/or no bounds on values, possibly leading to the generation of... | - [ ] #28323 | [
{
"body": "At the first glance, the possible reasons for errors:\r\n- lack of `@with_supported_dtypes`/type-casting in some backends or unnecessary type-casting in the tests,\r\n- lack of set tolerances and/or no bounds on values, possibly leading to the generation of values too big for the dtype,\r\n- errors i... | a88d809e69a9474c3bdab1782f794efac674655e | {
"head_commit": "d65ff7f49897d2c26ebe8189f051f41ca6416cb9",
"head_commit_message": "Delete pytestdebug.log",
"patch_to_review": "diff --git a/ivy/data_classes/array/linear_algebra.py b/ivy/data_classes/array/linear_algebra.py\nindex 025932fa11f0c..0387ec59b3456 100644\n--- a/ivy/data_classes/array/linear_algebra... | [
{
"diff_hunk": "@@ -643,27 +643,39 @@ def test_matmul(*, x, y, test_flags, backend_fw, fn_name, on_device):\n \n # matrix_norm\n @handle_test(\n+ ground_truth_backend=\"torch\",\n fn_tree=\"functional.ivy.matrix_norm\",\n- # ground_truth_backend=\"numpy\",\n dtype_value_axis=helpers.dtype_values_a... | 946503886bdda82a37d4470570d3fac8db7f0981 | diff --git a/ivy/data_classes/array/linear_algebra.py b/ivy/data_classes/array/linear_algebra.py
index 025932fa11f0c..0387ec59b3456 100644
--- a/ivy/data_classes/array/linear_algebra.py
+++ b/ivy/data_classes/array/linear_algebra.py
@@ -453,6 +453,7 @@ def matrix_norm(
ord: Union[int, float, Literal[inf, -inf,... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Test Suite / CI Enhancements"
} |
gradio-app__gradio-2600@1f31831 | gradio-app/gradio | Python | 2,600 | Allow `gr.Templates` to take in arguments | A fix to `gr.Templates` so that they can take in arguments. Fixes: #2595 | 2022-11-03T18:18:54Z | `gr.Sketchpad` does not take arguments
### Describe the bug
When using the `gr.Sketchpad` component with any of the parameters in the docstring, it fails.
`gr.Sketchpad` only works without any parameter.
### Is there an existing issue for this?
- [X] I have searched the existing issues
### Reproduction
To reprodu... | [
{
"body": "### Describe the bug\n\nWhen using the `gr.Sketchpad` component with any of the parameters in the docstring, it fails.\r\n`gr.Sketchpad` only works without any parameter.\n\n### Is there an existing issue for this?\n\n- [X] I have searched the existing issues\n\n### Reproduction\n\nTo reproduce this,... | 85e5fd0f623cee578e80a37970aa552b46f79853 | {
"head_commit": "1f31831059eb67806e78ce8fa94415f3ba7e6a5c",
"head_commit_message": "formatting",
"patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex 6d9acf58f3..f0a76934f6 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -32,6 +32,8 @@ No changes to highlight.\n \n ## Full Changelog:\n * Add `a... | [
{
"diff_hunk": "@@ -97,7 +106,9 @@ class Pil(components.Image):\n is_template = True\n \n def __init__(self, **kwargs):",
"line": null,
"original_line": 108,
"original_start_line": null,
"path": "gradio/templates.py",
"start_line": null,
"text": "@user1:\nWouldn't it be better if... | 6ed3e117711953c6561eedddb2421daedddb3bb1 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 638dc05cdf..00f24b4c5d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -16,7 +16,7 @@ No changes to highlight.
No changes to highlight.
## Full Changelog:
-No changes to highlight.
+* Allow `gr.Templates` to accept parameters to override the defaults by [@abidlabs](htt... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} | |
gradio-app__gradio-2594@ee31eb3 | gradio-app/gradio | Python | 2,594 | Load example from external Spaces | `gr.Blocks.load()` or `gr.Interface.load()` now correctly loads examples from Spaces. You can test by running this:
```py
import gradio as gr
gr.Interface.load("spaces/sayakpaul/raindrop-deraining-maxim").launch()
```
or a more complex example:
```py
import gradio as gr
gr.Interface.load("spaces/gradi... | 2022-11-02T16:53:27Z | Load examples when Interface/Block is loaded unless examples are passed
When we load a gradio Interface from huggingface, the examples aren't loaded. I know this is intended behavior but maybe on top of it retrieving the example files when loading the Interface or Block would be good when they're loaded from a Space, _... | Even after passing examples, they did not show up in this Space (which uses multiple Spaces):
https://huggingface.co/spaces/sayakpaul/maxim-spaces
Lol so it looks like we manually make the examples dataset invisible when loading from spaces 😬
```python
def streamline_config(config: dict) -> dict:
... | [
{
"body": "When we load a gradio Interface from huggingface, the examples aren't loaded. I know this is intended behavior but maybe on top of it retrieving the example files when loading the Interface or Block would be good when they're loaded from a Space, _unless_ the user passes the examples parameter explic... | 26abbe62692b47e250d72c1ba90e107a971384c5 | {
"head_commit": "ee31eb379691482e0a6a21e6b19945d298a9021b",
"head_commit_message": "Merge branch 'main' into actually-load-examples",
"patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex 0b1fb92687..6d9acf58f3 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -19,6 +19,7 @@ The `api_name` paramet... | [
{
"diff_hunk": "@@ -618,13 +642,13 @@ def iterate_over_children(children_list):\n original_mapping[o] for o in dependency[\"outputs\"]\n ]\n dependency.pop(\"status_tracker\", None)\n- dependency[\"_js\"] = dependency.pop(\"js\", None)\n ... | 40159420a8aa484952740423a0c549dd28f22c21 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0b1fb92687..6d9acf58f3 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -19,6 +19,7 @@ The `api_name` parameter will take precendence over the `fn_index` parameter.
## Bug Fixes:
* Fixed bug where None could not be used for File,Model3D, and Audio examples by [@freddyabou... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "New Feature Additions"
} |
home-assistant__core-101397@768c115 | home-assistant/core | Python | 101,397 | Fix Withings translations | <!--
You are amazing! Thanks for contributing to our project!
Please, DO NOT DELETE ANY TEXT from this template! (unless instructed).
-->
## Proposed change
<!--
Describe the big picture of your changes here to communicate to the
maintainers why we should accept this pull request. If it fixes a bug
or... | 2023-10-04T13:40:50Z | Withings. Minor typos
### The problem
Entity: Maximum_Heart_Rate is labeled "Fat Mass" and Entity: Min_Heart_Rate is actually pointing at Maximum_Heart_Rate
### What version of Home Assistant Core has the issue?
2023.10.b7
### What was the last working version of Home Assistant Core?
2023.9.0
### What type of ins... | [
{
"body": "### The problem\n\nEntity: Maximum_Heart_Rate is labeled \"Fat Mass\" and Entity: Min_Heart_Rate is actually pointing at Maximum_Heart_Rate\n\n### What version of Home Assistant Core has the issue?\n\n2023.10.b7\n\n### What was the last working version of Home Assistant Core?\n\n2023.9.0\n\n### What ... | 17779c5f0c7b4d01a5746eb9f265d33773979e9f | {
"head_commit": "768c1151f4ed629c456188a2deeeb5a0e13ff6b4",
"head_commit_message": "Fix Withings translations",
"patch_to_review": "diff --git a/homeassistant/components/withings/sensor.py b/homeassistant/components/withings/sensor.py\nindex 42f5ac18f2f1d..f6cffbdcd3e9e 100644\n--- a/homeassistant/components/wit... | [
{
"diff_hunk": "@@ -240,7 +240,7 @@ class WithingsSensorEntityDescription(\n key=Measurement.SLEEP_HEART_RATE_MAX.value,\n measurement=Measurement.SLEEP_HEART_RATE_MAX,\n measure_type=GetSleepSummaryField.HR_MAX,\n- translation_key=\"fat_mass\",\n+ translation_key=\"maximum... | acb5d42e0adff014e9d3fa82d672a427e61fbce7 | diff --git a/homeassistant/components/withings/sensor.py b/homeassistant/components/withings/sensor.py
index 42f5ac18f2f1d..77a706dc55d38 100644
--- a/homeassistant/components/withings/sensor.py
+++ b/homeassistant/components/withings/sensor.py
@@ -240,8 +240,7 @@ class WithingsSensorEntityDescription(
key=Mea... | {
"difficulty": "low",
"estimated_review_effort": 2,
"problem_domain": "Bug Fixes"
} | |
gradio-app__gradio-2608@d39859b | gradio-app/gradio | Python | 2,608 | Add open in colab buttons to demos in docs and /demos | Adds buttons to open a demo in colab:
https://user-images.githubusercontent.com/9021060/200097976-7089cf0e-6d27-4280-880d-a46726af4fee.mov
If a contributor wants to change a demo in the /demo dir, they just have to run /demo/generate_notebooks.py to regenerate all the .ipynb notebooks. I could create a githu... | 2022-11-05T02:55:37Z | Add "Run in Colab" Links to demos on the website Demos Page
- [x] I have searched to see if a similar issue already exists.
**Is your feature request related to a problem? Please describe.**
It would help transition gradio users into gradio developers if they could easily run the demos hosted on our website on ... | Great suggestion @freddyaboulton, I'll also add these for the demos on Docs. | [
{
"body": "- [x] I have searched to see if a similar issue already exists.\r\n\r\n\r\n**Is your feature request related to a problem? Please describe.** \r\nIt would help transition gradio users into gradio developers if they could easily run the demos hosted on our website on colab.\r\n\r\n**Describe the solu... | c99a323ccf6f80f2ac7129c2fa1d28949861b5a0 | {
"head_commit": "d39859ba6386c613e95c7d854bd58bade5cb0a4b",
"head_commit_message": "Merge branch 'main' into aliabd/colab-buttons",
"patch_to_review": "diff --git a/.github/workflows/check-demo-notebooks.yml b/.github/workflows/check-demo-notebooks.yml\nnew file mode 100644\nindex 0000000000..d0b22ccd78\n--- /de... | [
{
"diff_hunk": "@@ -0,0 +1,27 @@\n+# This workflow will check if the run.py files in every demo match the run.ipynb notebooks.\n+\n+name: Check Demos Match Notebooks\n+\n+on:\n+ pull_request:\n+ types: [opened, synchronize, labeled, unlabeled]",
"line": null,
"original_line": 7,
"original_start_... | e27c1011b3fcbb58433bc7a452dcc2daf567d1e6 | diff --git a/.github/workflows/check-demo-notebooks.yml b/.github/workflows/check-demo-notebooks.yml
new file mode 100644
index 0000000000..61284ca70b
--- /dev/null
+++ b/.github/workflows/check-demo-notebooks.yml
@@ -0,0 +1,38 @@
+# This workflow will check if the run.py files in every demo match the run.ipynb noteboo... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "New Feature Additions"
} |
ivy-llc__ivy-28158@0a5a609 | ivy-llc/ivy | Python | 28,158 | fix: Fixing pytest discovery issues | <!--
This template will help you to have a meaningful PR, please follow it and do not leave it blank.
-->
# PR Description
Fixing pytest discovery issues
Specific edge cases addressed:
- `ivy.functional.frontends.jax.numpy.indexing.CClass` is a class object invoked as a function call, parsed in ast extracti... | 2024-02-02T08:26:15Z | Fixing pytest discovery issues on vscode
Pytest discovery on vscode fails for our tests as of now with multiple errors regarding imports, unsupported dtypes, missing keys, etc. The goal of this task is to find workarounds and make fixes so that pytest discovery on vscode works for our repository. | @vedpatwardhan can you give an example that we can run and produce the error and take look at this . It would be great help thanks
Hey @Vismay-dev, have you already made a start on this issue? If yes, I'll assign this to you 😄
Hey @vedpatwardhan, yes I've already started trying to cross check file import paths for fi... | [
{
"body": "Pytest discovery on vscode fails for our tests as of now with multiple errors regarding imports, unsupported dtypes, missing keys, etc. The goal of this task is to find workarounds and make fixes so that pytest discovery on vscode works for our repository.",
"number": 28138,
"title": "Fixing ... | 935cde8ebd48d8b57c4d93599b6e406943ced374 | {
"head_commit": "0a5a6090bb1bfd98839a5a9354612a1e1258579f",
"head_commit_message": "Fixing pytest discovery issues",
"patch_to_review": "diff --git a/ivy/functional/frontends/__init__.py b/ivy/functional/frontends/__init__.py\nindex 013a7e3fc26f8..4ae0d2ddfa489 100644\n--- a/ivy/functional/frontends/__init__.py\... | [
{
"diff_hunk": "@@ -80,6 +80,14 @@ def get(identifier):\n raise ValueError(f\"Could not interpret function identifier: {identifier}\")\n \n \n+# helper\n+# note: defined to avoid AST call extraction of\n+# 'tf_frontend.keras.activations.__dict__.items()\n+# or 'tf_frontend.keras.activations.__dict__.val... | e8f7fa00be81d7250d03a40de91c1ff42055b2c9 | diff --git a/ivy/functional/frontends/__init__.py b/ivy/functional/frontends/__init__.py
index 013a7e3fc26f8..4ae0d2ddfa489 100644
--- a/ivy/functional/frontends/__init__.py
+++ b/ivy/functional/frontends/__init__.py
@@ -11,6 +11,7 @@
"sklearn": "1.3.0",
"xgboost": "1.7.6",
"torchvision": "0.15.2.",
+ ... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Test Suite / CI Enhancements"
} |
home-assistant__core-100577@f840d25 | home-assistant/core | Python | 100,577 | Adjust hassfest.manifest based on config.action | ## Proposed change
Currently, when calling `hassfest.manifest.validate`, once we retrieve all the integration manifests that were not sorted, `hassfest` will try to run prettier on the corresponding integrations, regardless of whether the mode `config.action` is `generate` or `validate`. Currently, when running `hassf... | 2023-09-19T07:10:43Z | Issue with manifest key sort validation?
In #devs, someone reported that they were getting the following error when running the action:
```
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "/usr/src/homeassistant/scri... | same here | [
{
"body": "In #devs, someone reported that they were getting the following error when running the action:\r\n```\r\nTraceback (most recent call last):\r\n File \"<frozen runpy>\", line 198, in _run_module_as_main\r\n File \"<frozen runpy>\", line 88, in _run_code\r\n File \"/usr/src/homeassistant/script/hass... | 2722e5ddaaf583adda9dce55197145b54097d08d | {
"head_commit": "f840d25517b92318c702b65d405ccf0362c109b7",
"head_commit_message": "Adjust hassfest.manifest based on config.action",
"patch_to_review": "diff --git a/script/hassfest/manifest.py b/script/hassfest/manifest.py\nindex 9323b8e86c0083..0554b15728fd97 100644\n--- a/script/hassfest/manifest.py\n+++ b/s... | [
{
"diff_hunk": "@@ -366,15 +366,19 @@ def _sort_manifest_keys(key: str) -> str:\n return _SORT_KEYS.get(key, key)\n \n \n-def sort_manifest(integration: Integration) -> bool:\n+def sort_manifest(integration: Integration, config: Config) -> bool:\n \"\"\"Sort manifest.\"\"\"\n keys = list(integration... | 6945a76be623b7aa2e12d6feb073e0cc25c96627 | diff --git a/script/hassfest/manifest.py b/script/hassfest/manifest.py
index 9323b8e86c0083..acdea23444dc73 100644
--- a/script/hassfest/manifest.py
+++ b/script/hassfest/manifest.py
@@ -366,15 +366,19 @@ def _sort_manifest_keys(key: str) -> str:
return _SORT_KEYS.get(key, key)
-def sort_manifest(integration: ... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
gradio-app__gradio-2448@707ac96 | gradio-app/gradio | Python | 2,448 | Add blur event to textbox and number | # Description
Add blur event. Triggered when user clicks out of textbox.
https://user-images.githubusercontent.com/12725292/195451431-d652365b-ded9-46ec-a6ec-454835fd0679.mov
Please include:
* relevant motivation
* a summary of the change
* which issue is fixed.
* any additional dependencies that are ... | 2022-10-12T21:29:28Z | Add blur event trigger for textbox and number components
- [x] I have searched to see if a similar issue already exists.
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'... | [
{
"body": "- [x] I have searched to see if a similar issue already exists.\r\n\r\n\r\n**Is your feature request related to a problem? Please describe.** \r\nA clear and concise description of what the problem is. Ex. I'm always frustrated when [...]\r\n\r\n**Describe the solution you'd like** \r\nA clear and ... | e935f105e11355e18fd8d7afe74865fd39958393 | {
"head_commit": "707ac96d70932b3c1261c131d88bd5fc0524dbdf",
"head_commit_message": "changelog",
"patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex 8e6fefcd26..22397b52ad 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -93,6 +93,7 @@ No changes to highlight.\n * Fix bug where errors would caus... | [
{
"diff_hunk": "@@ -465,3 +465,52 @@ def stream(\n postprocess=postprocess,\n queue=queue,\n )\n+\n+class Blurable(Block):\n+ def blur(\n+ self,\n+ fn: Callable,\n+ inputs: List[Component],\n+ outputs: List[Component],\n+ api_name: AnyStr = N... | 4c32f3cda376c22c34b35e66075441325d33d707 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8e6fefcd26..22397b52ad 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -93,6 +93,7 @@ No changes to highlight.
* Fix bug where errors would cause apps run in reload mode to hang forever by [@freddyaboulton](https://github.com/freddyaboulton) in [PR 2394](https://github.co... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "New Feature Additions"
} | |
gradio-app__gradio-2359@ae9fc30 | gradio-app/gradio | Python | 2,359 | Raise error if Blocks has duplicate component with same IDs | Fixes: #2320
Also avoids making a call to figure out the IP address if analytics is disabled. The reason for that change is that I was working with airplane Wifi and noticed it was *extremely* slow to launch a Gradio Interface because it was taking a long time to get the IP address. The real solution is to use asyn... | 2022-09-28T17:02:56Z | Components/Blocks have duplicate IDs if rendered more than once
### Describe the bug
If a component or Interface is rendered, but has already been rendered previously, it will add blocks with duplicate IDs to the config. Here's an example:
```py
io3b = gr.Interface(
lambda x: [x["mask"], x["image"]],
gr.... | [
{
"body": "### Describe the bug\n\nIf a component or Interface is rendered, but has already been rendered previously, it will add blocks with duplicate IDs to the config. Here's an example:\r\n\r\n```py\r\nio3b = gr.Interface(\r\n lambda x: [x[\"mask\"], x[\"image\"]],\r\n gr.ImageMask(),\r\n [gr.Image... | 3f58434b0f2ade8e7864f6faeff376fad398568d | {
"head_commit": "ae9fc30e1c7e365de1a8c005cead31f0d01698cd",
"head_commit_message": "version",
"patch_to_review": "diff --git a/gradio/blocks.py b/gradio/blocks.py\nindex 5e57fe8c2c..d4f0a8f2be 100644\n--- a/gradio/blocks.py\n+++ b/gradio/blocks.py\n@@ -34,6 +34,7 @@\n document_component_api,\n set_docume... | [
{
"diff_hunk": "@@ -1,3 +1,7 @@\n+class DuplicateBlockError(KeyError):",
"line": null,
"original_line": 1,
"original_start_line": null,
"path": "gradio/exceptions.py",
"start_line": null,
"text": "@user1:\nI think KeyError is usually reserved for when a key in a dictionary is not present... | 71c265989a8a2de42876f604ae0ed4b3d5a1c28e | diff --git a/gradio/blocks.py b/gradio/blocks.py
index 5e57fe8c2c..d4f0a8f2be 100644
--- a/gradio/blocks.py
+++ b/gradio/blocks.py
@@ -34,6 +34,7 @@
document_component_api,
set_documentation_group,
)
+from gradio.exceptions import DuplicateBlockError
from gradio.utils import component_or_layout_class, delet... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} | |
gradio-app__gradio-2288@6fd3ab5 | gradio-app/gradio | Python | 2,288 | fix : queue could be blocked | # Description
Surround the code in gradio.queue.Queue.process_event with try...finally... to ensure that the processed events in the queue are cleared to avoid the queue being blocked.
Closes: #2261
# Checklist:
- [X] I have performed a self-review of my own code
- [X] My code follows the style guidelines ... | 2022-09-18T11:19:28Z | Queue will be blocked if `gradio.event_queue.Queue.process_event` has an exception
### Describe the bug
If there is an exception in gradio.event_queue.Queue.process_event when predicting, the queue will be blocked.
### Is there an existing issue for this?
- [X] I have searched the existing issues
### Reprod... | Hi @SkyTNT can you please provide more context for when you run into this issue?
Specifically, why are you adding an Exception manually?
> First add an exception manually in gradio.event_queue.Queue.process_event
I sometimes find my space app's queue is blocked and get error log like this
```shell
ERROR:asynci... | [
{
"body": "### Describe the bug\r\n\r\nIf there is an exception in gradio.event_queue.Queue.process_event when predicting, the queue will be blocked.\r\n\r\n### Is there an existing issue for this?\r\n\r\n- [X] I have searched the existing issues\r\n\r\n### Reproduction\r\n\r\nFirst add an exception manually in... | b8fc5518075b2edee406797fbc3dc33f4145d2ce | {
"head_commit": "6fd3ab53d3915d42e15da367b1fd66b792320e3c",
"head_commit_message": "fix: queue could be blocked",
"patch_to_review": "diff --git a/gradio/queue.py b/gradio/queue.py\nindex a829317027..caabaeab26 100644\n--- a/gradio/queue.py\n+++ b/gradio/queue.py\n@@ -220,49 +220,52 @@ async def call_prediction(... | [
{
"diff_hunk": "@@ -220,49 +220,52 @@ async def call_prediction(self, event: Event):\n return response\n \n async def process_event(self, event: Event) -> None:\n- client_awake = await self.gather_event_data(event)\n- if not client_awake:\n- return\n- client_awake = a... | efc1652a453ebc191210ab57f7af42b818d08c8c | diff --git a/gradio/queue.py b/gradio/queue.py
index 5d311c3130..1fff450014 100644
--- a/gradio/queue.py
+++ b/gradio/queue.py
@@ -220,49 +220,61 @@ async def call_prediction(self, event: Event):
return response
async def process_event(self, event: Event) -> None:
- client_awake = await self.gath... | {
"difficulty": "low",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
gradio-app__gradio-2293@a14f9a5 | gradio-app/gradio | Python | 2,293 | Promotes `postprocess` and `preprocess` to documented parameters | Makes `postprocess` and `preprocess` official and documented parameters for event triggers, since we've started to see questions that could be resolved by using these parameters (e.g. see #2283)
Also does the following:
* Noticed that some event triggers were missing some parameters, so this adds other missing para... | 2022-09-19T20:22:26Z | Accept `base64` strings as `value` for `gr.Image` and `gr.Gallery`
**Is your feature request related to a problem? Please describe.**
I have a backend that returns base64 images. Converting them to PIL to have Gradio to convert them back to base64 seems a bit wasteful
**Describe the solution you'd like**
Allow... | Hi @apolinario we could write some logic to detect if it's a base64 and not do any processing. But in this case, it might just be easier if you do something like this:
```py
import gradio as gr
with gr.Blocks() as demo:
im = gr.Image()
im.value = "data:image/gif;base64,R0lGODlhPQBEAPeoAJosM//AwO/AwHVYZ... | [
{
"body": "**Is your feature request related to a problem? Please describe.** \r\nI have a backend that returns base64 images. Converting them to PIL to have Gradio to convert them back to base64 seems a bit wasteful\r\n\r\n**Describe the solution you'd like** \r\nAllow base64 strings as input - and do not pr... | bbd1c7237ed291c9f057a17a35fb55a750bb1b8c | {
"head_commit": "a14f9a5ae1a25459216677637f3093f87dc8e4e9",
"head_commit_message": "added for grid",
"patch_to_review": "diff --git a/demo/blocks_flag/run.py b/demo/blocks_flag/run.py\nindex 2083d39edf..a2579e0e73 100644\n--- a/demo/blocks_flag/run.py\n+++ b/demo/blocks_flag/run.py\n@@ -27,7 +27,7 @@ def sepia(i... | [
{
"diff_hunk": "@@ -326,20 +365,26 @@ def stop(\n inputs: List of inputs\n outputs: List of outputs\n api_name: Defining this parameter exposes the endpoint in the api docs\n+ status_tracker: StatusTracker to visualize function progress",
"line": null,
"ori... | 373205afae5a280a24050b13bdbe07b9f412d1a4 | diff --git a/demo/blocks_flag/run.py b/demo/blocks_flag/run.py
index 2083d39edf..a2579e0e73 100644
--- a/demo/blocks_flag/run.py
+++ b/demo/blocks_flag/run.py
@@ -27,7 +27,7 @@ def sepia(input_img, strength):
strength.change(sepia, [img_input, strength], img_output)
# We can choose which components to f... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "New Feature Additions"
} |
home-assistant__core-99740@77ba954 | home-assistant/core | Python | 99,740 | Handle alexa invalid climate temp adjustment | <!--
You are amazing! Thanks for contributing to our project!
Please, DO NOT DELETE ANY TEXT from this template! (unless instructed).
-->
## Proposed change
<!--
Describe the big picture of your changes here to communicate to the
maintainers why we should accept this pull request. If it fixes a bug
or resolve... | 2023-09-06T13:37:10Z | Uncaught exception processing Alexa
### The problem
Tried to change the temperature today using Alexa. Found this in the logs later on while looking up an unrelated issue.
### What version of Home Assistant Core has the issue?
core-2023.8.4
### What was the last working version of Home Assistant Core?
_No response... | Hey there @home-assistant/cloud, @ochlocracy, @jbouwh, mind taking a look at this issue as it has been labeled with an integration (`alexa`) you are listed as a [code owner](https://github.com/home-assistant/core/blob/dev/CODEOWNERS#L66) for? Thanks!
<details>
<summary>Code owner commands</summary>
Code owners of `a... | [
{
"body": "### The problem\n\nTried to change the temperature today using Alexa. Found this in the logs later on while looking up an unrelated issue.\n\n### What version of Home Assistant Core has the issue?\n\ncore-2023.8.4\n\n### What was the last working version of Home Assistant Core?\n\n_No response_\n\n##... | bb765449eb32802c4db4396d8c79fec26bc2e418 | {
"head_commit": "77ba9540457cfde7308cdce76c6ead4909072ba6",
"head_commit_message": "Handle temp adjust when target state not set",
"patch_to_review": "diff --git a/homeassistant/components/alexa/errors.py b/homeassistant/components/alexa/errors.py\nindex 2c5ced62403a6a..e2a26033d21933 100644\n--- a/homeassistant... | [
{
"diff_hunk": "@@ -90,6 +90,17 @@ class AlexaUnsupportedThermostatModeError(AlexaError):\n error_type = \"UNSUPPORTED_THERMOSTAT_MODE\"\n \n \n+class AlexaUnsupportedThermostatTargetStateError(AlexaError):\n+ \"\"\"Class to represent unsupported climate target state error.\"\"\"\n+\n+ namespace = \"A... | 724e0e11edefc129f72223a94311badaa07923e6 | diff --git a/homeassistant/components/alexa/errors.py b/homeassistant/components/alexa/errors.py
index 2c5ced62403a6a..f8e3720e16026f 100644
--- a/homeassistant/components/alexa/errors.py
+++ b/homeassistant/components/alexa/errors.py
@@ -90,6 +90,13 @@ class AlexaUnsupportedThermostatModeError(AlexaError):
error_... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
gradio-app__gradio-2267@a8ac155 | gradio-app/gradio | Python | 2,267 | Fix Multiple File Examples | # Description
Fix issue when trying to use examples with multiple file component. Issue was with dataframe examples not having a proper header. Also updated a demo to use a multiple file component.
\n \n- def as_example(self, input_data: str) -> str:\n- return Path(input_data).name\n+ def as_example(self, input_data: str | List) -> str:\n+ if isinstance(input_data, list):\n+ return in... | 230744187d0f3f3f148d88e80823ad7dcd11670c | diff --git a/demo/zip_two_files/files/titanic.csv b/demo/zip_files/files/titanic.csv
similarity index 100%
rename from demo/zip_two_files/files/titanic.csv
rename to demo/zip_files/files/titanic.csv
diff --git a/demo/zip_files/run.py b/demo/zip_files/run.py
new file mode 100644
index 0000000000..712844ef62
--- /dev/nul... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} | |
home-assistant__core-99403@641d8a0 | home-assistant/core | Python | 99,403 | Fix battery reading in SOMA API | <!--
You are amazing! Thanks for contributing to our project!
Please, DO NOT DELETE ANY TEXT from this template! (unless instructed).
-->
## Proposed change
<!--
SOMA Connect API has for a long time now provided a battery level reading as a percentage. Doing that calculation in device makes much more se... | 2023-08-31T12:10:40Z | Battery values are displayed incorrectly in Soma Connect
### The problem
I use for our roller blinds, drives from Soma. As a bridge I use the new version with the USB stick. I have installed the integration Soma Connect, but it is always displayed at the battery levels 100%.
I have to test whether the values of the U... | Hey there @ratsept, @sebfortier2288, mind taking a look at this issue as it has been labeled with an integration (`soma`) you are listed as a [code owner](https://github.com/home-assistant/core/blob/dev/CODEOWNERS#L1163) for? Thanks!
<details>
<summary>Code owner commands</summary>
Code owners of `soma` can trigger ... | [
{
"body": "### The problem\n\nI use for our roller blinds, drives from Soma. As a bridge I use the new version with the USB stick. I have installed the integration Soma Connect, but it is always displayed at the battery levels 100%.\r\nI have to test whether the values of the USB Brigde are output, installed a ... | 7ead5c44eada5caa36cd72fe14737b6deeefe3eb | {
"head_commit": "641d8a0e5b02d78c6e13b32d691946df148a91b4",
"head_commit_message": "Merge branch 'dev' into soma-battery-fix",
"patch_to_review": "diff --git a/homeassistant/components/soma/sensor.py b/homeassistant/components/soma/sensor.py\nindex 6472f6934e00dc..e48c51f40d3ad1 100644\n--- a/homeassistant/compo... | [
{
"diff_hunk": "@@ -43,11 +43,6 @@ def native_value(self):\n async def async_update(self) -> None:\n \"\"\"Update the sensor with the latest data.\"\"\"\n response = await self.get_battery_level_from_api()\n-\n- # https://support.somasmarthome.com/hc/en-us/articles/360026064234-HTTP-A... | 035805fb2eb864435a6e20387e66792d8b040161 | diff --git a/homeassistant/components/soma/sensor.py b/homeassistant/components/soma/sensor.py
index 6472f6934e00dc..d1c0de188a08e4 100644
--- a/homeassistant/components/soma/sensor.py
+++ b/homeassistant/components/soma/sensor.py
@@ -43,11 +43,12 @@ def native_value(self):
async def async_update(self) -> None:
... | {
"difficulty": "medium",
"estimated_review_effort": 2,
"problem_domain": "Bug Fixes"
} |
gradio-app__gradio-4380@b918380 | gradio-app/gradio | Python | 4,380 | Update message when share link binary is blocked | Aggressive antivirus software sometimes blocks the share link binary file. Here, we make the error message more explicit so that users can find the binary file themselves and whitelist it from their antivirus software settings.
Closes: #4347 | 2023-06-01T00:06:53Z | Share= True fails to generate public share link
### Describe the bug
Attempting to run the "Hello, World!" example given in the gradio docs, with share=True set, on a linux machine (Ubuntu 22.04, gradio version =3.32.0) simply results in a localhost link. No public sharing link is generated despite waiting for 4+ mi... | Hi @Gothos I think I know what the issue is. Basically your antivirus software is blocking the download of the binary file that creates the share link. Will make this more explicit and suggest a workaround. | [
{
"body": "### Describe the bug\r\n\r\nAttempting to run the \"Hello, World!\" example given in the gradio docs, with share=True set, on a linux machine (Ubuntu 22.04, gradio version =3.32.0) simply results in a localhost link. No public sharing link is generated despite waiting for 4+ minutes.\r\nI have looked... | a43531cc4b95cd5fbcf7f28a74fd8e5f1db8522c | {
"head_commit": "b91838097b1ad2ab2764ee7f1887945d0b1bfeb3",
"head_commit_message": "update share link message",
"patch_to_review": "diff --git a/gradio/blocks.py b/gradio/blocks.py\nindex 275061c2ac..49d80ba345 100644\n--- a/gradio/blocks.py\n+++ b/gradio/blocks.py\n@@ -40,7 +40,7 @@\n from gradio.helpers import... | [
{
"diff_hunk": "@@ -1845,7 +1845,7 @@ def reverse(text):\n analytics.error_analytics(\"Not able to set up tunnel\")\n self.share_url = None\n self.share = False\n- print(strings.en[\"COULD_NOT_GET_SHARE_LINK\"])\n+ print(strings.e... | 5abd5f487f84aaf1cb5a665d5f6896392eebc475 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 4b6afaf34a..491e20bf7f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -10,7 +10,7 @@ No changes to highlight.
## Other Changes:
-No changes to highlight.
+- More explicit error message when share link binary is blocked by antivirus by [@abidlabs](https://github.com/a... | {
"difficulty": "low",
"estimated_review_effort": 2,
"problem_domain": "Bug Fixes"
} |
gradio-app__gradio-2214@cac3ec9 | gradio-app/gradio | Python | 2,214 | Tests for Queue | Adds unit tests for queuing. In some cases, it was hard to test behavior and not implementation, so any feedback on making the tests better is welcome. But I think it's important to have some unit tests for queuing in place as we work on improving it to make sure we don't inadvertently break anything.
Fixes: #1983
... | 2022-09-08T22:55:22Z | Write Tests for Queueing
**Is your feature request related to a problem? Please describe.**
We need to write tests for the new event queue in the Frontend.
**Additional context**
Websocket testing tooling is seems to not work well in Python, and we're unable to test it in Backend.
Testing a single event cas... | We should write unit tests for `queueing.py` as well!
@abidlabs I'd like to write unit tests for 'queueing.py' if it is still unassigned. Please let me know
Hi @hibestil, that would be a welcome contribution, thank you! | [
{
"body": "**Is your feature request related to a problem? Please describe.** \r\nWe need to write tests for the new event queue in the Frontend.\r\n\r\n**Additional context** \r\nWebsocket testing tooling is seems to not work well in Python, and we're unable to test it in Backend.\r\n\r\nTesting a single eve... | 6ee7efa86cd350b588a3589c8390ab9a7d2f10e5 | {
"head_commit": "cac3ec9ec22319b9f10d438454c103eef2764213",
"head_commit_message": "removed websocket",
"patch_to_review": "diff --git a/gradio/blocks.py b/gradio/blocks.py\nindex b6d0fe9bd6..67b722dd47 100644\n--- a/gradio/blocks.py\n+++ b/gradio/blocks.py\n@@ -20,9 +20,9 @@\n from gradio import (\n compone... | [
{
"diff_hunk": "@@ -12,6 +14,11 @@\n os.environ[\"GRADIO_ANALYTICS_ENABLED\"] = \"False\"\n \n \n+class AsyncMock(MagicMock):",
"line": null,
"original_line": 17,
"original_start_line": null,
"path": "test/test_routes.py",
"start_line": null,
"text": "@user1:\nThis class isn't used anywh... | 9134555a0d6ee29904bb053748ae4f62e96adf62 | diff --git a/gradio/blocks.py b/gradio/blocks.py
index b6d0fe9bd6..67b722dd47 100644
--- a/gradio/blocks.py
+++ b/gradio/blocks.py
@@ -20,9 +20,9 @@
from gradio import (
components,
encryptor,
- event_queue,
external,
networking,
+ queue,
routes,
strings,
utils,
@@ -910,7 +910,... | {
"difficulty": "low",
"estimated_review_effort": 3,
"problem_domain": "Test Suite / CI Enhancements"
} |
home-assistant__core-99314@9cc24ad | home-assistant/core | Python | 99,314 | Add zwave_js device config file change fix/repair | ## Proposed change
Z-Wave JS now has the ability to detect if a device config file changed since the last interview of the node. With this PR, we add an issue and repair flow to trigger a reinterview of a node.
Closes https://github.com/home-assistant-libs/zwave-js-server-python/issues/739
## Type of change
<... | 2023-08-30T06:44:25Z | Implement hasDeviceConfigChanged
We should call this on startup for every node to see if the device config has changed. Or if we install config updates on the fly like we do once a day in HA?
If the device config has changed, we can create a repair entry suggesting the user reinterview the device with an automatic ... | [
{
"body": "We should call this on startup for every node to see if the device config has changed. Or if we install config updates on the fly like we do once a day in HA? \r\n\r\nIf the device config has changed, we can create a repair entry suggesting the user reinterview the device with an automatic action to ... | 7e7cb15d5b7b63786d73a42bbfb8dc4b513296be | {
"head_commit": "9cc24adda8b4b6e26db3be24379abefbc2fb5d4c",
"head_commit_message": "Validate that refresh command is called",
"patch_to_review": "diff --git a/homeassistant/components/zwave_js/__init__.py b/homeassistant/components/zwave_js/__init__.py\nindex 2e6ff4f0b34fd0..268e97c967f4bb 100644\n--- a/homeassi... | [
{
"diff_hunk": "@@ -550,6 +550,24 @@ async def async_on_node_ready(self, node: ZwaveNode) -> None:\n node,\n )\n \n+ # After ensuring the node is set up in HA, we should check if the node's\n+ # device config has changed, and if so, issue a repair registry entry for a\n... | d6de2c53f8c4cb46b763e9bd7fe0f7dfb8d726ca | diff --git a/homeassistant/components/zwave_js/__init__.py b/homeassistant/components/zwave_js/__init__.py
index 2e6ff4f0b34fd0..bdc3649b10efad 100644
--- a/homeassistant/components/zwave_js/__init__.py
+++ b/homeassistant/components/zwave_js/__init__.py
@@ -550,6 +550,26 @@ async def async_on_node_ready(self, node: Zw... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "New Feature Additions"
} | |
gradio-app__gradio-2721@88c52c3 | gradio-app/gradio | Python | 2,721 | enhancement: record audio and video from webcam simultaneously | # Description
From @MandarGogate issue:
> **Is your feature request related to a problem? Please describe.**
I want to build a demo for machine learning model that processes Audio-Visual data from webcam. The current Video component records from webcam without audio.
> **Describe the solution you'd like**
Since ... | 2022-11-25T13:12:47Z | Recording Audio and Video from webcam simultaneously
- [X] I have searched to see if a similar issue already exists.
**Is your feature request related to a problem? Please describe.**
I want to build a demo for machine learning model that processes Audio-Visual data from webcam. The current Video component reco... | I managed to update the Webcam.svelte to fix this. You can have a look at [https://github.com/MandarGogate/gradio/commit/2d291e7f311192899e01b5f82133905ce1dace67](https://github.com/MandarGogate/gradio/commit/2d291e7f311192899e01b5f82133905ce1dace67). I tested this on Safari, Chrome and Firefox.
Great, thanks so much @... | [
{
"body": "- [X] I have searched to see if a similar issue already exists.\r\n\r\n\r\n**Is your feature request related to a problem? Please describe.** \r\nI want to build a demo for machine learning model that processes Audio-Visual data from webcam. The current Video component records from webcam without au... | 066adf1a9dbbee939cbfed6db0af1f6dc63aa8a6 | {
"head_commit": "88c52c36a502f330919c2557e2356ba96c137a5b",
"head_commit_message": "Add include_audio option in Video component",
"patch_to_review": "diff --git a/CHANGELOG.md b/CHANGELOG.md\nindex 7fc0ce2791..b05ffdfbcd 100644\n--- a/CHANGELOG.md\n+++ b/CHANGELOG.md\n@@ -19,6 +19,7 @@ No changes to highlight.\n... | [
{
"diff_hunk": "@@ -1612,7 +1613,8 @@ def __init__(\n interactive: if True, will allow users to upload a video; if False, can only be used to display videos. If not provided, this is inferred based on whether the component is used as an input or output.\n visible: If False, component wil... | f9356149e398c7e7fdf73bd3f4bdd172fb22a660 | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 466f6b5c5b..c5466265ac 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -405,6 +405,7 @@ No changes to highlight.
* Make try examples button more prominent by [@aliabd](https://github.com/aliabd) in [PR 2705](https://github.com/gradio-app/gradio/pull/2705)
* Fix id clashe... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "New Feature Additions"
} |
home-assistant__core-100535@9f0abf8 | home-assistant/core | Python | 100,535 | Cache the latest short term stat id for each metadata_id on each run | ## Proposed change
<!--
Describe the big picture of your changes here to communicate to the
maintainers why we should accept this pull request. If it fixes a bug
or resolves a feature request, be sure to link to that issue in the
additional information section.
-->
We currently have to do a algorithmical... | 2023-09-17T21:38:42Z | Slow running queries in HA 2023.6.1 with Postgres
### The problem
Postgres 13.9 with a large database
After updating from 2023.5.3 to 2023.6.1, I noticed the following query running every 5 minutes. It takes about 90 seconds to complete and spikes the CPU during that time.
```
SELECT statistics_short_term.me... | Hey there @home-assistant/core, mind taking a look at this issue as it has been labeled with an integration (`recorder`) you are listed as a [code owner](https://github.com/home-assistant/core/blob/dev/CODEOWNERS#L1001) for? Thanks!
<details>
<summary>Code owner commands</summary>
Code owners of `recorder` can trigg... | [
{
"body": "### The problem\r\n\r\nPostgres 13.9 with a large database\r\n\r\nAfter updating from 2023.5.3 to 2023.6.1, I noticed the following query running every 5 minutes. It takes about 90 seconds to complete and spikes the CPU during that time.\r\n\r\n```\r\nSELECT statistics_short_term.metadata_id, statis... | 31e9ca009991bdde292971356a194a1fe54f536a | {
"head_commit": "9f0abf8e165df27f529fc46bcd081570ee1e210b",
"head_commit_message": "Save latest short term stat id for each metadata_id on each run\n\nWe currently have to do a algorithmically complex query to find the\nlatest short term stat id every five minutes when stats are run. To\navoid this we now save the... | [
{
"diff_hunk": "@@ -508,19 +509,23 @@ def _compile_statistics(\n platform_stats.extend(compiled.platform_stats)\n current_metadata.update(compiled.current_metadata)\n \n+ new_short_term_stats: list[StatisticsBase] = []\n+ updated_metadata_ids: set[int] = set()\n # Insert collected stat... | 4d7142ecf7b58e1786d8a7eb36aaaad96b12b7a1 | diff --git a/homeassistant/components/recorder/statistics.py b/homeassistant/components/recorder/statistics.py
index 005859b865b5b..24fb209ae0748 100644
--- a/homeassistant/components/recorder/statistics.py
+++ b/homeassistant/components/recorder/statistics.py
@@ -24,6 +24,7 @@
from homeassistant.const import ATTR_UNI... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "Performance Optimizations"
} |
home-assistant__core-97939@ee924af | home-assistant/core | Python | 97,939 | Create abstraction for Generic YeeLight | <!--
You are amazing! Thanks for contributing to our project!
Please, DO NOT DELETE ANY TEXT from this template! (unless instructed).
-->
## Proposed change
<!--
Describe the big picture of your changes here to communicate to the
maintainers why we should accept this pull request. If it fixes a bug
or... | 2023-08-06T21:48:08Z | yeelight integration failed using proper name convention
### The problem
Entity None (<class 'homeassistant.components.yeelight.light.YeelightGenericLight'>) is implicitly using device name by not setting its name. Instead, the name should be set to None,
### What version of Home Assistant Core has the issue?
2023.8... | Hey there @zewelor, @shenxn, @starkillerog, @alexyao2015, mind taking a look at this issue as it has been labeled with an integration (`yeelight`) you are listed as a [code owner](https://github.com/home-assistant/core/blob/dev/CODEOWNERS#L1439) for? Thanks!
<details>
<summary>Code owner commands</summary>
Code owne... | [
{
"body": "### The problem\n\nEntity None (<class 'homeassistant.components.yeelight.light.YeelightGenericLight'>) is implicitly using device name by not setting its name. Instead, the name should be set to None,\n\n### What version of Home Assistant Core has the issue?\n\n2023.8.1\n\n### What was the last work... | 4230465fcdd14247f75d9829f87835bf84054d90 | {
"head_commit": "ee924afba225833f98819eeec3e00c1a1801ee64",
"head_commit_message": "Create abstraction for Generic YeeLight",
"patch_to_review": "diff --git a/homeassistant/components/yeelight/light.py b/homeassistant/components/yeelight/light.py\nindex f5f39e9997d07..8f8a8d78f8322 100644\n--- a/homeassistant/co... | [
{
"diff_hunk": "@@ -291,7 +291,7 @@ def _lights_setup_helper(klass):\n lights.append(klass(device, config_entry, custom_effects=custom_effects))\n \n if device_type == BulbType.White:\n- _lights_setup_helper(YeelightGenericLight)\n+ _lights_setup_helper(YeeLightGenericLight)",
"lin... | ae673291254d88b49f9064e3292f2a3f222b1e67 | diff --git a/homeassistant/components/yeelight/light.py b/homeassistant/components/yeelight/light.py
index f5f39e9997d07..a442540109a4b 100644
--- a/homeassistant/components/yeelight/light.py
+++ b/homeassistant/components/yeelight/light.py
@@ -238,7 +238,7 @@ def _parse_custom_effects(effects_config) -> dict[str, dict... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
gradio-app__gradio-2005@0c4a800 | gradio-app/gradio | Python | 2,005 | [Integration Tests] Update a demo's config.json as part of integration test | # Description
When `pnpm test:browser` or `pnpm test:browser:full` is run from the `ui` the configs for each demo in the integration tests will be re-created.
Please include:
* relevant motivation
* a summary of the change
* which issue is fixed.
* any additional dependencies that are required for this chang... | 2022-08-12T23:29:06Z | [Integration Tests] Update a demo's config.json as part of integration test
### Describe the bug
The config.json for each demo used by the integration test needs to be manually updated by running `write_config.py`. This should be done as part of each integration test programatically.
### Is there an existing issue f... | [
{
"body": "### Describe the bug\n\nThe config.json for each demo used by the integration test needs to be manually updated by running `write_config.py`. This should be done as part of each integration test programatically. \n\n### Is there an existing issue for this?\n\n- [X] I have searched the existing issues... | 21f9da9380b66420a598e79eb0b41feceba9077d | {
"head_commit": "0c4a8003ab15dd05c6d30e851333d5ca45205125",
"head_commit_message": "add script to create configs for test demos",
"patch_to_review": "diff --git a/demo/blocks_inputs/config.json b/demo/blocks_inputs/config.json\nindex 5321604599..2af2202d90 100644\n--- a/demo/blocks_inputs/config.json\n+++ b/demo... | [
{
"diff_hunk": "@@ -73,7 +73,7 @@ def fn(\n (\".\", 0),\n ]\n + [(f\"test\", x / 10) for x in range(-10, 10)], # HighlightedText\n- json.loads(JSONOBJ), # JSON\n+ json.loads(JSONOBJ), # JSONåå",
"line": null,
"original_line": 76,
"original_start_line": nu... | d27d760e1c72a56460faed73d0629815750dd6a0 | diff --git a/.github/workflows/ui.yml b/.github/workflows/ui.yml
index 1e3cc9675b..c83ad60982 100644
--- a/.github/workflows/ui.yml
+++ b/.github/workflows/ui.yml
@@ -53,6 +53,7 @@ jobs:
node-version: 16
cache: pnpm
cache-dependency-path: ui/pnpm-lock.yaml
+ - run: pip install -r .... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Test Suite / CI Enhancements"
} | |
gradio-app__gradio-1882@90de959 | gradio-app/gradio | Python | 1,882 | Add example of using component update method | # Description
Fixes #1359
<img width="1097" alt="image" src="https://user-images.githubusercontent.com/41651716/180884170-bc4e4101-10f2-4968-9861-987e40ba4dd5.png">
# Checklist:
- [x] I have performed a self-review of my own code
- [x] My code follows the style guidelines of this project
- [x] I have... | 2022-07-25T22:25:02Z | Add component update to docs
- [x] I have searched to see if a similar issue already exists.
**Is your feature request related to a problem? Please describe.**
In workflows with multiple steps it might be necessary to make the user choose based on output for model 1 for subsequent models.
Currently, the radio a... | This is actually possible with `Blocks`! We still need to add documentation around it, but in your case, all you need to do is modify the return statement to use the special `.update()` method that every component defines, like this:
```py
def update(name):
return gr.Radio.update(choices=[f'Hello {name}',f'Bye... | [
{
"body": "- [x] I have searched to see if a similar issue already exists.\r\n\r\n**Is your feature request related to a problem? Please describe.** \r\nIn workflows with multiple steps it might be necessary to make the user choose based on output for model 1 for subsequent models. \r\nCurrently, the radio and... | ba65a95e070f4be1a6727e4bd262633770360a7c | {
"head_commit": "90de959902cac6860ad7da2d66bdea66a70ff028",
"head_commit_message": "Fix wording",
"patch_to_review": "diff --git a/gradio/blocks.py b/gradio/blocks.py\nindex 733811e716..574b08f8b2 100644\n--- a/gradio/blocks.py\n+++ b/gradio/blocks.py\n@@ -205,8 +205,10 @@ def update(**kwargs) -> dict:\n Upd... | [
{
"diff_hunk": "@@ -205,8 +205,10 @@ def update(**kwargs) -> dict:\n Updates component parameters.\n This is a shorthand for using the update method on a component.\n For example, rather than using gr.Number.update(...) you can just use gr.update(...).\n+ Note that your editor's autocompletion wi... | 3def0836c64c7340263bab2d416e16a76d71de6a | diff --git a/gradio/blocks.py b/gradio/blocks.py
index 733811e716..487d6cd67e 100644
--- a/gradio/blocks.py
+++ b/gradio/blocks.py
@@ -205,8 +205,10 @@ def update(**kwargs) -> dict:
Updates component parameters.
This is a shorthand for using the update method on a component.
For example, rather than usin... | {
"difficulty": "low",
"estimated_review_effort": 2,
"problem_domain": "New Feature Additions"
} |
fastapi__fastapi-3372@06f543d | fastapi/fastapi | Python | 3,372 | ✨ Add support for Trio via AnyIO | Fixes #310
see also https://github.com/encode/starlette/pull/1157 | 2021-06-14T22:47:29Z | Trio - Python library for async concurrency and I/O
**Description**
Hello!
I'm using Hypercorn with uvloop.
I'd like to use Hypercorn with trio, but the program doesn't start when i switch uvloop by trio.
Do you have plans to implement trio?
Thank's!
PS: Nice work. | I guess most FastAPI users use it with uvloop which trio is not compatible with: https://github.com/python-trio/trio/issues/138
Thanks for the help here @haizaar ! Nice investigation.
I think @haizaar is right, by checking that issue.
This is a great place to mention that you can use hypercorn, which [seems to suppo... | [
{
"body": "**Description**\r\n\r\nHello!\r\nI'm using Hypercorn with uvloop.\r\nI'd like to use Hypercorn with trio, but the program doesn't start when i switch uvloop by trio.\r\n\r\nDo you have plans to implement trio?\r\n\r\nThank's!\r\n\r\nPS: Nice work.\r\n",
"number": 310,
"title": "Trio - Python... | 4d26fa5c546f68ddb67bd3e6c194c644323aadaa | {
"head_commit": "06f543d8de1bf968e5115b4fd80fc961044e33c1",
"head_commit_message": "Merge branch 'master' into anyio",
"patch_to_review": "diff --git a/docs/en/docs/advanced/async-tests.md b/docs/en/docs/advanced/async-tests.md\nindex 921bdb708c871..7b8e3cd3eb9af 100644\n--- a/docs/en/docs/advanced/async-tests.m... | [
{
"diff_hunk": "@@ -62,7 +61,8 @@ test = [\n \"async_generator >=1.10,<2.0.0\",\n \"python-multipart >=0.0.5,<0.0.6\",\n \"aiofiles >=0.5.0,<0.6.0\",\n- \"flask >=1.1.2,<2.0.0\"\n+ \"flask >=1.1.2,<2.0.0\",\n+ \"anyio[trio] >=3.1.0,<4\",",
"line": null,
"original_line": 65,
"ori... | 7c19efb8175ecbe3b42d030338bc9c1435cf7ccf | diff --git a/README.md b/README.md
index 3055e670d9505..d376fb74ea78f 100644
--- a/README.md
+++ b/README.md
@@ -442,7 +442,6 @@ Used by Pydantic:
Used by Starlette:
* <a href="https://requests.readthedocs.io" target="_blank"><code>requests</code></a> - Required if you want to use the `TestClient`.
-* <a href="http... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "New Feature Additions"
} |
gradio-app__gradio-1709@ed96d3e | gradio-app/gradio | Python | 1,709 | allow users to update the current tab from python SDK | Closes #1652 and implement steps noted in the issue.
To test run `demo/blocks_plug`.
| 2022-07-05T12:15:12Z | Allow currently selected `TabItem` to be set + updated
Currently there is no way to initialise or update the `Tabs` component to show a specific `TabItem` it always defaults to the first.
We need to implement the following:
- Add `selected` kwarg to `Tabs`
- Add `id` kwargs to `TabItem`
- Add an `update` method... | [
{
"body": "Currently there is no way to initialise or update the `Tabs` component to show a specific `TabItem` it always defaults to the first.\r\n\r\nWe need to implement the following:\r\n\r\n- Add `selected` kwarg to `Tabs`\r\n- Add `id` kwargs to `TabItem`\r\n- Add an `update` method to `Tabs` that accepts ... | 745e69d75c34c25db3b85483f9f9d3efa7c3a9a0 | {
"head_commit": "ed96d3e3ea9afc471300bac57470a077ad481a7e",
"head_commit_message": "update test again",
"patch_to_review": "diff --git a/demo/blocks_plug/run.py b/demo/blocks_plug/run.py\nindex 0447e67de5..97684fa61b 100644\n--- a/demo/blocks_plug/run.py\n+++ b/demo/blocks_plug/run.py\n@@ -1,9 +1,14 @@\n import ... | [
{
"diff_hunk": "@@ -96,6 +96,21 @@ class Tabs(BlockContext):\n Tabs context.\n \"\"\"\n \n+ def __init__(self, selected=False, **kwargs):",
"line": null,
"original_line": 99,
"original_start_line": null,
"path": "gradio/layouts.py",
"start_line": null,
"text": "@user1:\nDoesn'... | ebfacc6a9b0264414b7cb0013e9a58f629bfd636 | diff --git a/demo/blocks_plug/run.py b/demo/blocks_plug/run.py
index 0447e67de5..97684fa61b 100644
--- a/demo/blocks_plug/run.py
+++ b/demo/blocks_plug/run.py
@@ -1,9 +1,14 @@
import gradio as gr
+
+def change_tab():
+ return gr.Tabs.update(selected=2)
+
+
identity_demo, input_demo, output_demo = gr.Blocks(), gr... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "New Feature Additions"
} | |
gradio-app__gradio-1716@c82be78 | gradio-app/gradio | Python | 1,716 | allow data frame to change number of columns | Closes #1198. Closes #1430.
This PR changes the preprocess signature for Dataframe so we have access to the current headers rather than only the initial ones. I'm not sure if there is an impact outside of what I've tested, there may also be some test failures that I may not understand. | 2022-07-06T10:14:31Z | Dataframe with headers throws error when new column is added
### Is there an existing issue for this?
- [X] I have searched the existing issues
### Describe the bug
If a `gr.Dataframe` is created with defined `headers`, then when a new column is created, it throws an error, since the backend tries to apply the origi... | Yesssss let's do this
I think this is a duplicate of #1198 | [
{
"body": "### Is there an existing issue for this?\n\n- [X] I have searched the existing issues\n\n### Describe the bug\n\nIf a `gr.Dataframe` is created with defined `headers`, then when a new column is created, it throws an error, since the backend tries to apply the original headers to the new dataframe whi... | 2a67fe6ec99443fb340cf9b37d56dd3161bb50ff | {
"head_commit": "c82be78958f44908b2aed41c23a438eaebb19182",
"head_commit_message": "fix tests finally",
"patch_to_review": "diff --git a/demo/blocks_plug/run.py b/demo/blocks_plug/run.py\nindex 97684fa61b..198b5ee8fe 100644\n--- a/demo/blocks_plug/run.py\n+++ b/demo/blocks_plug/run.py\n@@ -1,36 +1,19 @@\n import... | [
{
"diff_hunk": "@@ -1140,7 +1143,10 @@ def check_odd(array):\n return array % 2 == 0\n \n iface = gr.Interface(check_odd, \"numpy\", \"numpy\")\n- self.assertEqual(iface.process([[2, 3, 4]])[0], {\"data\": [[True, False, True]]})\n+ print(iface.process([{\"data\": [[2, 3, 4]]}]... | 3d7a409347504bf1a448e9e21b608a6c158dcf93 | diff --git a/gradio/components.py b/gradio/components.py
index 1c5afffe26..9b8f1f565f 100644
--- a/gradio/components.py
+++ b/gradio/components.py
@@ -16,7 +16,7 @@
import warnings
from copy import deepcopy
from types import ModuleType
-from typing import Any, Callable, Dict, List, Optional, Tuple
+from typing impor... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "Bug Fixes"
} |
gradio-app__gradio-1700@8323b47 | gradio-app/gradio | Python | 1,700 | Fix `assert_configs_are_equivalent_besides_ids()` | Fixes the `assert_configs_are_equivalent_besides_ids()` to check for other fields in the `dependencies`. Adds a test as well to catch the mistake @freddyaboulton pointed out.
Fixes: #1653 | 2022-07-04T15:47:14Z | assert_configs_are_equivalent_besides_ids does not check documentation field
### Describe the bug
`assert_configs_are_equivalent_besides_ids` does not check all fields in the config, e.g. `documentation`, `api_name`
### Is there an existing issue for this?
- [X] I have searched the existing issues
### Reproduction
... | [
{
"body": "### Describe the bug\n\n`assert_configs_are_equivalent_besides_ids` does not check all fields in the config, e.g. `documentation`, `api_name`\n\n### Is there an existing issue for this?\n\n- [X] I have searched the existing issues\n\n### Reproduction\n\nRepro. I would expect the assertion to fail in ... | 1176180ac3107776098cd1200932daeedd79a7ae | {
"head_commit": "8323b47583eaaab6360872f2dfa7fed5d9741cbd",
"head_commit_message": "formatting",
"patch_to_review": "diff --git a/gradio/test_data/blocks_configs.py b/gradio/test_data/blocks_configs.py\nindex 2ecfb8afaa..b8a4eb5fb8 100644\n--- a/gradio/test_data/blocks_configs.py\n+++ b/gradio/test_data/blocks_c... | [
{
"diff_hunk": "@@ -225,13 +224,16 @@ def same_children_recursive(children1, chidren2, mapping):\n same_children_recursive(children1, children2, mapping)\n \n for d1, d2 in zip(config1[\"dependencies\"], config2[\"dependencies\"]):\n- for t1, t2 in zip(d1[\"targets\"], d2[\"targets\"]):\n+ ... | 698e9fc6748c1187e2cb955d6f813d39265948f0 | diff --git a/gradio/test_data/blocks_configs.py b/gradio/test_data/blocks_configs.py
index 6003aaf0de..b38f50f793 100644
--- a/gradio/test_data/blocks_configs.py
+++ b/gradio/test_data/blocks_configs.py
@@ -164,6 +164,9 @@
"js": None,
"status_tracker": None,
"queue": None,
+ ... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} | |
gradio-app__gradio-1681@ce753e4 | gradio-app/gradio | Python | 1,681 | File component: list multiple files and allow for download #1446 | # Description
List each file individually and allow for download in a scroll view.
Before:
<img width="608" alt="Screen Shot 2022-07-08 at 9 12 40 AM" src="https://user-images.githubusercontent.com/12725292/177937748-d6ff995a-3d0b-45e1-8f12-0732d2134392.png">
After:
<img width="615" alt="Screen Shot 2022-07-11... | 2022-07-01T07:16:24Z | File component: list multiple files and allow for download
As of now, when `file_count` is set to multiple; the file component does not list all uploaded files and does not allow each to be downloaded.
- [x] I have searched to see if a similar issue already exists.
**Is your feature request related to a problem... | [
{
"body": "As of now, when `file_count` is set to multiple; the file component does not list all uploaded files and does not allow each to be downloaded.\r\n\r\n- [x] I have searched to see if a similar issue already exists.\r\n\r\n\r\n**Is your feature request related to a problem? Please describe.** \r\nA cl... | 06bfb6b218bb7c188eef01ced5e7df635ddafc3c | {
"head_commit": "ce753e448d18b8cbead03c565693dede26d96da5",
"head_commit_message": "format",
"patch_to_review": "diff --git a/demo/zip_two_files/run.py b/demo/zip_two_files/run.py\nindex 29c1b015ed..3702e35a93 100644\n--- a/demo/zip_two_files/run.py\n+++ b/demo/zip_two_files/run.py\n@@ -13,7 +13,7 @@ def zip_two... | [
{
"diff_hunk": "@@ -13,7 +13,7 @@ def zip_two_files(file1, file2):\n \n demo = gr.Interface(\n zip_two_files,\n- [\"file\", \"file\"],\n+ [gr.File(file_count=\"multiple\"), gr.File(file_count=\"multiple\")],",
"line": null,
"original_line": 16,
"original_start_line": null,
"path": "dem... | 3b231a9fad81766c4af26dfeeb7295449d1c4c27 | diff --git a/gradio/components.py b/gradio/components.py
index 1c5afffe26..fb1764ae6b 100644
--- a/gradio/components.py
+++ b/gradio/components.py
@@ -2327,7 +2327,10 @@ def process_single_file(f):
else:
return process_single_file(x)
else:
- return [process_single_file(... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "New Feature Additions"
} | |
gradio-app__gradio-1639@7fa7884 | gradio-app/gradio | Python | 1,639 | Exposing examples as a component for Blocks | We now have `gr.Examples()` as a component that can be used within Blocks. See example: `demo\blocks_inputs\run.py`
Usage:
* Case 1: Only `inputs` is provided, in which case clicking on the examples will populate the inputs components
```py
with blocks:
....
with gr.Row()
textbox = gr.Textbox(... | 2022-06-26T08:59:22Z | [Blocks] Expose Examples as Block Component
At the moment, examples are part of the `Interface` Class, as well as the `cache_examples` feature. With `Blocks` users can compose custom layouts, positioning inputs and outputs arbitrarily using `Columns`, `Rows`, etc.
This request is to expose examples as a `Block` comp... | [
{
"body": "At the moment, examples are part of the `Interface` Class, as well as the `cache_examples` feature. With `Blocks` users can compose custom layouts, positioning inputs and outputs arbitrarily using `Columns`, `Rows`, etc.\r\n\r\nThis request is to expose examples as a `Block` component, thus one can p... | 68afe67497d83a867bcee9c4006f90f740e3d9b1 | {
"head_commit": "7fa78848a0e2e49c8e9a7e7563b351cfb9d2ff09",
"head_commit_message": "removed test from now",
"patch_to_review": "diff --git a/demo/blocks_inputs/lion.jpg b/demo/blocks_inputs/lion.jpg\nnew file mode 100644\nindex 0000000000..e9bf9f5d08\nBinary files /dev/null and b/demo/blocks_inputs/lion.jpg diff... | [
{
"diff_hunk": "@@ -60,49 +54,43 @@ class Series(gradio.Interface):\n and so the input and output components must agree between the interfaces).\n \"\"\"\n \n- def __init__(self, *interfaces, **options):\n+ def __init__(self, *interfaces: gradio.Interface, **options):\n \"\"\"\n Pa... | c516e0ae1512aac06b28e4e7587be2b0cdf4c6ed | diff --git a/demo/blocks_inputs/lion.jpg b/demo/blocks_inputs/lion.jpg
new file mode 100644
index 0000000000..e9bf9f5d08
Binary files /dev/null and b/demo/blocks_inputs/lion.jpg differ
diff --git a/demo/blocks_inputs/run.py b/demo/blocks_inputs/run.py
index 4b7413f94b..cf131e9ee3 100644
--- a/demo/blocks_inputs/run.py
... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "New Feature Additions"
} | |
gradio-app__gradio-1146@fb02a6c | gradio-app/gradio | Python | 1,146 | move styling for interface panels to frontend | Adds a `variant` kwarg to `Column`. Closes #999.
@gary149 If you want to tweak the 'panel' styling for interfaces, feel feree to push to this branch. | 2022-05-02T10:48:23Z | handle custom styling for interfaces in the frontend rather than in the python lib
At the minute we are injecting custom CSS to create the interface design. Ideally we would not need to do this and would use either some new layout components (`Panel`, etc.) or custom CSS properties to modify the components we are using... | [
{
"body": "At the minute we are injecting custom CSS to create the interface design. Ideally we would not need to do this and would use either some new layout components (`Panel`, etc.) or custom CSS properties to modify the components we are using.\r\n\r\nThe current approach makes the dev experience very tedi... | 87dcdd713453f34d86896d82400652682411bfe4 | {
"head_commit": "fb02a6c5347ca521253b8f54b22ab65601ec4def",
"head_commit_message": "Merge branch 'main' into 999-row-variant",
"patch_to_review": "diff --git a/gradio/blocks.py b/gradio/blocks.py\nindex 6c36c4c099..46d46f75b6 100644\n--- a/gradio/blocks.py\n+++ b/gradio/blocks.py\n@@ -158,15 +158,23 @@ def get_t... | [
{
"diff_hunk": "@@ -158,15 +158,23 @@ def get_template_context(self):\n \n \n class Column(BlockContext):\n- def __init__(self, visible: bool = True, css: Optional[Dict[str, str]] = None):\n+ def __init__(\n+ self,\n+ visible: bool = True,\n+ css: Optional[Dict[str, str]] = None,\n+ ... | a10b376f9d063fbe28362d85acf663fb1acb558e | diff --git a/gradio/blocks.py b/gradio/blocks.py
index 6c36c4c099..70840050d7 100644
--- a/gradio/blocks.py
+++ b/gradio/blocks.py
@@ -158,15 +158,23 @@ def get_template_context(self):
class Column(BlockContext):
- def __init__(self, visible: bool = True, css: Optional[Dict[str, str]] = None):
+ def __init__... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Code Refactoring / Architectural Improvement"
} | |
home-assistant__core-96850@3927da8 | home-assistant/core | Python | 96,850 | Add username to Reauth flow in Honeywell | <!--
You are amazing! Thanks for contributing to our project!
Please, DO NOT DELETE ANY TEXT from this template! (unless instructed).
-->
## Breaking change
<!--
If your PR contains a breaking change for existing users, it is important
to tell them what breaks, how to make it work again and why we did th... | 2023-07-18T14:20:29Z | Honeywell TCC - Inability to Update Username / Only Password
### The problem
Trying to change the email address for my Honeywell TCC, but cannot find a way to do this via the GUI nor config files. Should be an option via the integration GUI.
### What version of Home Assistant Core has the issue?
2023.4.6
### What w... | Hey there @rdfurman, @mkmer, mind taking a look at this issue as it has been labeled with an integration (`honeywell`) you are listed as a [code owner](https://github.com/home-assistant/core/blob/dev/CODEOWNERS#L538) for? Thanks!
<details>
<summary>Code owner commands</summary>
Code owners of `honeywell` can trigger... | [
{
"body": "### The problem\n\nTrying to change the email address for my Honeywell TCC, but cannot find a way to do this via the GUI nor config files. Should be an option via the integration GUI.\n\n### What version of Home Assistant Core has the issue?\n\n2023.4.6\n\n### What was the last working version of Hom... | 6bd4ace3c3b4ab05e1fdb85c27d55ac09c39d950 | {
"head_commit": "3927da864bd32700de163475b5008e57c44f2870",
"head_commit_message": "Use add_suggested_value_to_schema",
"patch_to_review": "diff --git a/homeassistant/components/honeywell/config_flow.py b/homeassistant/components/honeywell/config_flow.py\nindex 8b24fc912f1796..af0f217a923a3f 100644\n--- a/homeas... | [
{
"diff_hunk": "@@ -71,6 +76,7 @@ async def async_step_reauth_confirm(\n self.entry,\n data={\n **self.entry.data,\n+ CONF_USERNAME: username,\n CONF_PASSWORD: password,",
"line": null,
"origin... | 057b65d13980190dc4eba4bbf914c9187186732e | diff --git a/homeassistant/components/honeywell/config_flow.py b/homeassistant/components/honeywell/config_flow.py
index 8b24fc912f1796..dab8353c7732e1 100644
--- a/homeassistant/components/honeywell/config_flow.py
+++ b/homeassistant/components/honeywell/config_flow.py
@@ -22,7 +22,12 @@
DOMAIN,
)
-REAUTH_SCHE... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
gradio-app__gradio-1821@abf5bdc | gradio-app/gradio | Python | 1,821 | Add a flagging callback to save json files to a hugging face dataset | # Description
Based on issue #1676 I have created the `HuggingFaceDatasetJSONSaver` class which saves the files as JSONL.
Specifically, for each flagged sample:
- I create a unique ID (a hash of random numbers and strings) and create a folder with the name of the ID. In the code I call the new folder `folder_nam... | 2022-07-18T22:22:02Z | Add a flagging callback to save json files to a hugging face dataset
- [x] I have searched to see if a similar issue already exists.
**Is your feature request related to a problem? Please describe.**
As a gradio user, I would like to save flagged instances as separate json files to a hugging face dataset.
@c... | @chrisemezue Feel free to pick this up when you have the bandwidth !
With pleasurere! | [
{
"body": "- [x] I have searched to see if a similar issue already exists.\r\n\r\n\r\n**Is your feature request related to a problem? Please describe.** \r\nAs a gradio user, I would like to save flagged instances as separate json files to a hugging face dataset.\r\n\r\n@chrisemezue wrote this awesome [space](... | e63ffb326ee2aa838ebf858734558c144e3963fe | {
"head_commit": "abf5bdc7e9003164e639f72a9c2ebaf686ad5191",
"head_commit_message": "final updates + added test case",
"patch_to_review": "diff --git a/gradio/__init__.py b/gradio/__init__.py\nindex b330b0fc83..8531387b29 100644\n--- a/gradio/__init__.py\n+++ b/gradio/__init__.py\n@@ -48,6 +48,7 @@\n Flagging... | [
{
"diff_hunk": "@@ -344,3 +346,170 @@ def flag(\n self.repo.push_to_hub(commit_message=\"Flagged sample #{}\".format(line_count))\n \n return line_count\n+\n+\n+class HuggingFaceDatasetJSONSaver(FlaggingCallback):\n+ \"\"\"\n+ A FlaggingCallback that saves flagged data to a HuggingFace dat... | 5a1388be3d94e216886d7a016e5941b9e1b002cb | diff --git a/gradio/__init__.py b/gradio/__init__.py
index e83854893b..9cb437e673 100644
--- a/gradio/__init__.py
+++ b/gradio/__init__.py
@@ -48,6 +48,7 @@
from gradio.flagging import (
CSVLogger,
FlaggingCallback,
+ HuggingFaceDatasetJSONSaver,
HuggingFaceDatasetSaver,
SimpleCSVLogger,
)
diff... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "New Feature Additions"
} |
gradio-app__gradio-782@c65f9a5 | gradio-app/gradio | Python | 782 | Added pydantic data models for all requests | Closes #777 | 2022-03-06T02:57:43Z | Update fastapi routes to use pydantic data models
There are several routes where we manually convert the request to a dictionary using e.g.:
```python
body = await request.json()
```
It is better to use FastAPI's built in support for pydantic data models, which allows automatic validation & typing. | [
{
"body": "There are several routes where we manually convert the request to a dictionary using e.g.:\r\n\r\n```python\r\nbody = await request.json()\r\n```\r\n\r\nIt is better to use FastAPI's built in support for pydantic data models, which allows automatic validation & typing.\r\n\r\n",
"number": 777,
... | 9e2cac6e4c1ed9b62968060bd5bf63e61f4e9c43 | {
"head_commit": "c65f9a599f55b5a82329f18879d9a132815d1fb8",
"head_commit_message": "added pydantic data models for all requests",
"patch_to_review": "diff --git a/gradio/queueing.py b/gradio/queueing.py\nindex 9b6ab16abf..d402db9290 100644\n--- a/gradio/queueing.py\n+++ b/gradio/queueing.py\n@@ -7,6 +7,9 @@\n \n... | [
{
"diff_hunk": "@@ -106,8 +109,9 @@ def pop() -> Tuple[int, str, Dict, str]:\n return result[0], result[1], json.loads(result[2]), result[3]\n \n \n-def push(input_data: Dict, action: str) -> Tuple[str, int]:\n- input_data = json.dumps(input_data)\n+def push(request: QueuePushRequest) -> Tuple[str, int]:... | 86b6a5bffad42e86856edfba5c907714cbb11d9e | diff --git a/gradio/interface.py b/gradio/interface.py
index 1a9c55226c..7dd36aeefb 100644
--- a/gradio/interface.py
+++ b/gradio/interface.py
@@ -28,7 +28,7 @@
from gradio.outputs import State as o_State # type: ignore
from gradio.outputs import get_output_instance
from gradio.process_examples import load_from_cac... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "Code Refactoring / Architectural Improvement"
} | |
gradio-app__gradio-765@6bcbde4 | gradio-app/gradio | Python | 765 | Blocks components | Combine all input output and static components under components. A huge refactoring, detailed review would be great!
Fixes: #639
- create general structure
- move Textbox into component.py | 2022-03-02T19:00:23Z | [Blocks] Allow any output component to be used to display statically
It should be possible to treat ANY output component like a static component by simply dumping an appropriate value to it. Like this:
```python
with Blocks() as block:
outputs.Dataframe(df)
```
I think in order to do this, we would have to ... | I think we should reconsider this with Inputs and Outputs merging into Components.
Inputs and Outputs both can have default values.
In addition to default values, components should be able to display suitable variables statically for convenience. For example, we should be able to use `Image` to display an image easi... | [
{
"body": "It should be possible to treat ANY output component like a static component by simply dumping an appropriate value to it. Like this:\r\n\r\n```python\r\nwith Blocks() as block:\r\n outputs.Dataframe(df)\r\n```\r\n\r\nI think in order to do this, we would have to refactor the arguments for the `Outpu... | d396c2ce01dbd5c2cbc7016ea390ba2ea6d25c47 | {
"head_commit": "6bcbde43d791ac75071d328b1a7236254b801bb9",
"head_commit_message": "fixing test_inputs.py",
"patch_to_review": "diff --git a/gradio/__init__.py b/gradio/__init__.py\nindex d29c8db627..b631326713 100644\n--- a/gradio/__init__.py\n+++ b/gradio/__init__.py\n@@ -3,7 +3,7 @@\n import gradio.components... | [
{
"diff_hunk": "@@ -198,7 +198,7 @@ def quantify_difference_in_label(interface, original_output, perturbed_output):\n score = diff(original_label, perturbed_label)\n return score\n \n- elif isinstance(output_component, Textbox):\n+ elif isinstance(output_component, (Textbox, Number)):"... | d25419b16f596b29b3d79c6114a2ff2832cce278 | diff --git a/gradio/__init__.py b/gradio/__init__.py
index d29c8db627..b631326713 100644
--- a/gradio/__init__.py
+++ b/gradio/__init__.py
@@ -3,7 +3,7 @@
import gradio.components as components
import gradio.inputs as inputs
import gradio.outputs as outputs
-from gradio.blocks import Blocks, Column, Row, Tabs, TabIt... | {
"difficulty": "medium",
"estimated_review_effort": 4,
"problem_domain": "New Feature Additions"
} |
gradio-app__gradio-420@9d54d13 | gradio-app/gradio | Python | 420 | Fixes port issue; deprecates server_port, server_name parameter | Fixes #419. Deprecates `server_port` and `server_name` in `Interface()` class because it was getting messy to support it. These are now parameters of the `launch()` method | 2021-12-17T16:44:31Z | [Suggestions] Don't autofind a port when a port is user specified
**Is your feature request related to a problem? Please describe.**
When using `iface = gr.Interface(.., server_port=5000)` if port `5000` is already used it will use port `5001` instead.
**Describe the solution you'd like**
If it could crash ins... | Makes sense, we'll fix it! | [
{
"body": "**Is your feature request related to a problem? Please describe.**\r\n\r\nWhen using `iface = gr.Interface(.., server_port=5000)` if port `5000` is already used it will use port `5001` instead.\r\n\r\n**Describe the solution you'd like**\r\n\r\nIf it could crash instead that would be better saying th... | eb7194f7563def402d5efa6c3afff781340065a5 | {
"head_commit": "9d54d13d54bea63786d54ef67d1696402ad4eb11",
"head_commit_message": "allows you to fix port; deprecates server_port, server_name parameters in Interface()",
"patch_to_review": "diff --git a/gradio/interface.py b/gradio/interface.py\nindex 557187d2ce..7884f0a76c 100644\n--- a/gradio/interface.py\n+... | [
{
"diff_hunk": "@@ -696,17 +689,19 @@ def launch(self, inline=None, inbrowser=None, share=False, debug=False,\n \n return app, path_to_local_server, share_url\n \n- def close(self):\n+ def close(self, verbose=True):\n \"\"\"\n Closes the Interface that was launched. This will close... | 3d4306adca2d109fdf480853bf5f9b2a1fe675c6 | diff --git a/codecov.yml b/codecov.yml
index ae7639975d..8b8b7bc9de 100644
--- a/codecov.yml
+++ b/codecov.yml
@@ -2,3 +2,4 @@ coverage:
range: 0..100
round: down
precision: 2
+comment: false
diff --git a/gradio/interface.py b/gradio/interface.py
index 811aa59fab..d2bb6ec983 100644
--- a/gradio/interface.py
++... | {
"difficulty": "medium",
"estimated_review_effort": 3,
"problem_domain": "Bug Fixes"
} |
Subsets and Splits
Review Test Instances
Retrieves basic metadata about code review instances but doesn't provide any analytical insights or patterns beyond raw data access.