internlm/SWE-Fixer-Train-110K huggingface dataset:
Repository: PaddlePaddle/PaddleNLP

Issue:
[Bug]: UIE Taskflow loads from model_config.json instead of config.json
### 软件环境

```Markdown
- paddlepaddle:
- paddlepaddle-gpu: 
- paddlenlp: 2.4.7
```


### 重复问题

- [X] I have searched the existing issues

### 错误描述

```Markdown
File "/home/user/.pyenv/versions/3.8.9/lib/python3.8/site-packages/paddlenlp/taskflow/information_extraction.py", line 401, in __init__
    config_file_path = hf_hub_download(repo_id=self._task_path, filename="model_config.json")
  File "/home/user/.pyenv/versions/3.8.9/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 124, in _inner_fn
    return fn(*args, **kwargs)
  File "/home/user/.pyenv/versions/3.8.9/lib/python3.8/site-packages/huggingface_hub/file_download.py", line 1067, in hf_hub_download
    metadata = get_hf_file_metadata(
  File "/home/user/.pyenv/versions/3.8.9/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 124, in _inner_fn
    return fn(*args, **kwargs)
```
```


### 稳定复现步骤 & 代码

```
task_instance = Taskflow(
"information_extraction",
model="uie-x-base",
task_path="PaddlePaddle/uie-x-base",
from_hf_hub=True)
```


Discussion:

Resolving patch:
diff --git a/paddlenlp/taskflow/information_extraction.py b/paddlenlp/taskflow/information_extraction.py
--- a/paddlenlp/taskflow/information_extraction.py
+++ b/paddlenlp/taskflow/information_extraction.py
@@ -26,6 +26,7 @@
 from ..layers import GlobalPointerForEntityExtraction, GPLinkerForRelationExtraction
 from ..transformers import UIE, UIEM, UIEX, AutoModel, AutoTokenizer
 from ..utils.doc_parser import DocParser
+from ..utils.env import CONFIG_NAME
 from ..utils.ie_utils import map_offset, pad_image_data
 from ..utils.log import logger
 from ..utils.tools import get_bool_ids_greater_than, get_span
@@ -398,9 +399,9 @@ def __init__(self, task, model, schema=None, **kwargs):
         # TODO: temporary solution to support HF Hub due to lack of AutoModel
         # change this logic to use AutoConfig when available
         if self.from_hf_hub:
-            config_file_path = hf_hub_download(repo_id=self._task_path, filename="model_config.json")
+            config_file_path = hf_hub_download(repo_id=self._task_path, filename=CONFIG_NAME)
             with open(config_file_path) as f:
-                self._init_class = json.load(f)["init_class"]
+                self._init_class = json.load(f)["architectures"].pop()
         else:
             self._check_task_files()
             with open(os.path.join(self._task_path, "model_config.json")) as f:


Test patch:
Repository: PaddlePaddle/PaddleNLP

Issue:
[Bug]: ocr_process.py ocr结果处理异常
### 软件环境

```Markdown
- paddlepaddle:
- paddlepaddle-gpu: 2.4.1
- paddlenlp: 2.5.0
```


### 重复问题

- [X] I have searched the existing issues

### 错误描述

```Markdown
Traceback (most recent call last):
  File "/home/zhengzhenhong/paddlenlp/applications/document_intelligence/doc_vqa/OCR_process/ocr_process.py", line 277, in <module>
    process_input(ocr_results, tokenizer, save_path)
  File "/home/zhengzhenhong/paddlenlp/applications/document_intelligence/doc_vqa/OCR_process/ocr_process.py", line 240, in process_input
    ocr_reses = tokenize_ocr_res(ocr_reses)
  File "/home/zhengzhenhong/paddlenlp/applications/document_intelligence/doc_vqa/OCR_process/ocr_process.py", line 203, in tokenize_ocr_res
    x_min, y_min = [int(min(idx)) for idx in zip(*text_box)]
  File "/home/zhengzhenhong/paddlenlp/applications/document_intelligence/doc_vqa/OCR_process/ocr_process.py", line 203, in <listcomp>
    x_min, y_min = [int(min(idx)) for idx in zip(*text_box)]
TypeError: '<' not supported between instances of 'str' and 'list'

以下是para的打印数据：
{'text': [[288.0, 303.0], [638.0, 303.0], [638.0, 382.0], [288.0, 382.0]], 'bbox': [[[2530.0, 105.0], [2654.0, 105.0], [2654.0, 171.0], [2530.0, 171.0]], ('解锁', 0.993677020072937)]}
```


### 稳定复现步骤 & 代码

cd OCR_process/
python3 ocr_process.py
cd ..


Discussion:
感谢反馈，经排查，是由paddleOCR升级带来的不兼容问题，后续将进行升级。如急着使用，可以安装2.5版本的paddleOCR:

pip install paddleocr==2.5 -i https://pypi.tuna.tsinghua.edu.cn/simple/

Resolving patch:
diff --git a/applications/document_intelligence/doc_vqa/OCR_process/ocr_process.py b/applications/document_intelligence/doc_vqa/OCR_process/ocr_process.py
--- a/applications/document_intelligence/doc_vqa/OCR_process/ocr_process.py
+++ b/applications/document_intelligence/doc_vqa/OCR_process/ocr_process.py
@@ -12,14 +12,12 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-import os
 import json
-from paddleocr import PaddleOCR
-import numpy as np
+import os
 import re
-import time
-import sys
-from multiprocessing import Process, Queue
+
+from paddleocr import PaddleOCR
+from paddleocr import __version__ as paddleocr_version
 
 from paddlenlp.transformers import LayoutXLMTokenizer
 
@@ -60,8 +58,7 @@ def merge_bbox(tok_bboxes):
 
 
 def xlm_parse(ocr_res, tokenizer):
-
-    doc_tokens, doc_bboxes = [], []
+    doc_bboxes = []
     all_chr = get_all_chars(tokenizer)
 
     try:
@@ -171,7 +168,7 @@ def xlm_parse(ocr_res, tokenizer):
 
             doc_bboxes.append(merged_bbox)
             i = i + tok_len
-    except:
+    except Exception:
         print("Error")
         span_tokens = ["▁"] * 512
         doc_bboxes = [[0, 0, 0, 0]] * 512
@@ -263,6 +260,8 @@ def ocr_preprocess(img_dir):
         parsing_res = ocr.ocr(img_path, cls=True)
         ocr_res = []
         for para in parsing_res:
+            if paddleocr_version > "2.6.0.1":
+                para = para[0]
             ocr_res.append({"text": para[1][0], "bbox": para[0]})
         ocr_reses.append((img_name, ocr_res))
 


Test patch:
Repository: PaddlePaddle/PaddleNLP

Issue:
[Bug]: BigBird微调任务报错
### 软件环境

```Markdown
- paddlepaddle:最新develop0.0.0
- paddlepaddle-gpu: 
- paddlenlp:最新develop代码
```


### 重复问题

- [X] I have searched the existing issues

### 错误描述

```Markdown
利用cpu和npu运行BigBird微调任务均报错，报错信息为 KeyError: 'Indexing with integers is not available when using tokenizer.__call__() with return_dict=True. Please set return_dict to False to use integer indexing.'
```


### 稳定复现步骤 & 代码

在examples/language_model/bigbird目录下运行以下指令：
`python run_glue.py                 --model_type bigbird                 --model_name_or_path bigbird-base-uncased                 --task_name SST-2                 --max_encoder_length 128                 --batch_size 32                   --learning_rate 1e-5                 --epochs 5                 --logging_steps 1                 --save_steps 500                 --output_dir ./tmp/                 --device cpu`
会出现如下错误
<img width="961" alt="image" src="https://github.com/PaddlePaddle/PaddleNLP/assets/50285351/4d8b23b8-b3ba-4301-aff6-b204694e8b87">



Discussion:

Resolving patch:
diff --git a/examples/language_model/bigbird/run_glue.py b/examples/language_model/bigbird/run_glue.py
--- a/examples/language_model/bigbird/run_glue.py
+++ b/examples/language_model/bigbird/run_glue.py
@@ -73,18 +73,19 @@ def convert_example(example, tokenizer, label_list, max_seq_length=512, is_test=
     token_type_ids = None
 
     if (int(is_test) + len(example)) == 2:
-        input_ids.extend(tokenizer.convert_tokens_to_ids(tokenizer(example["sentence"])[: max_seq_length - 2]))
+        input_ids.extend(tokenizer(example["sentence"])["input_ids"][: max_seq_length - 2])
         input_ids.append(tokenizer.sep_id)
         input_len = len(input_ids)
         token_type_ids = input_len * [0]
     else:
-        input_ids1 = tokenizer.convert_tokens_to_ids(tokenizer(example["sentence1"]))
-        input_ids2 = tokenizer.convert_tokens_to_ids(tokenizer(example["sentence2"]))
-        total_len = len(input_ids1) + len(input_ids2) + tokenizer.num_special_tokens_to_add(pair=True)
+        input_ids1 = tokenizer(example["sentence1"])["input_ids"]
+        input_ids2 = tokenizer(example["sentence2"])["input_ids"]
+        total_len = len(input_ids1) + len(input_ids2) + tokenizer.num_special_tokens_to_add(pair=True) + 1
         if total_len > max_seq_length:
             input_ids1, input_ids2, _ = tokenizer.truncate_sequences(
                 input_ids1, input_ids2, total_len - max_seq_length
             )
+
         input_ids.extend(input_ids1)
         input_ids.append(tokenizer.sep_id)
         input_len1 = len(input_ids)
@@ -257,7 +258,7 @@ def do_train(args):
         apply_decay_param_fun=lambda x: x in decay_params,
     )
 
-    loss_fct = paddle.nn.loss.CrossEntropyLoss() if train_ds.label_list else paddle.nn.loss.MSELoss()
+    loss_fct = paddle.nn.CrossEntropyLoss() if train_ds.label_list else paddle.nn.MSELoss()
 
     metric = metric_class()
     global_step = 0


Test patch:
Repository: PaddlePaddle/PaddleNLP

Issue:
[Question]: GPT-3预训练的eval阶段出错
###  GPT-3预训练的eval阶段出错

环境：
（1）8卡A100
（2）python -m pip install paddlepaddle-gpu==0.0.0.post112 -f https://www.paddlepaddle.org.cn/whl/linux/gpu/develop.html

报错内容：
采用8卡tensor_parallel预训练GPT-13B，在eval阶段报错：
![image](https://github.com/PaddlePaddle/PaddleNLP/assets/41565156/13ba9d65-37f3-4456-9571-f79b54db4939)



Discussion:
> ### GPT-3预训练的eval阶段出错
> 环境： （1）8卡A100 （2）python -m pip install paddlepaddle-gpu==0.0.0.post112 -f https://www.paddlepaddle.org.cn/whl/linux/gpu/develop.html
> 
> 报错内容： 采用8卡tensor_parallel预训练GPT-13B，在eval阶段报错： ![image](https://user-images.githubusercontent.com/41565156/257722264-13ba9d65-37f3-4456-9571-f79b54db4939.png)

你好，想请教几个问题：
1. 在做pretrain时 用了多少数据量啊？ 数据量很大的情况下，如何边训练边去读数据？因为显卡有限 不能将所有数据读到内存再训练。 
2.  对于多任务的训练，怎么确定任务间数据量的比例， 来避免不同任务间可能存在不好的影响呢？

Resolving patch:
diff --git a/llm/gpt-3/modeling.py b/llm/gpt-3/modeling.py
--- a/llm/gpt-3/modeling.py
+++ b/llm/gpt-3/modeling.py
@@ -827,7 +827,6 @@ def forward(
         loss = None
         if labels is not None:
             loss = self.criterion(logits, labels)
-            return loss
 
         # outputs = [output, all_hidden_states, new_caches, all_self_attentions]
         if not return_dict:


Test patch:
Repository: PaddlePaddle/PaddleNLP

Issue:
[Bug]: 单卡微调gpt-3模型，出现GPTTrainer获取不到dp_group
### 软件环境

```Markdown
- paddlepaddle:2.5.0
- paddlepaddle-xpu: 2.5.0
- paddlenlp: 2.6.0rc0.post0
```


### 重复问题

- [X] I have searched the existing issues

### 错误描述

```Markdown
单卡微调时，通过paddle.distributed.get_world_size()获取world_size的值为1，
无法对dp_group属性进行赋值。只有当world_size大于1时，才会赋值。
导致保存模型参数时，会找不到属性报错。
[图片]
```


### 稳定复现步骤 & 代码

export PYTHONPATH="../../PaddleNLP/"

log_dir="log"
rm -rf $log_dir

python3 -m paddle.distributed.launch \
    --xpus "0" \
    --log_dir ${log_dir} \
    finetune_generation.py \
    --model_type "gpt" \
    --model_name_or_path gpt2-medium-en \
    --output_dir "output/$task_name" \
    --per_device_train_batch_size 2 \
    --per_device_eval_batch_size 1 \
    --tensor_parallel_degree 1 \
    --pipeline_parallel_degree 1 \
    --scale_loss 1024 \
    --learning_rate 0.00001 \
    --max_steps 10000 \
    --save_steps 5000 \
    --weight_decay 0.01 \
    --warmup_ratio 0.01 \
    --max_grad_norm 1.0 \
    --logging_steps 1\
    --dataloader_num_workers 1 \
    --sharding "stage2" \
    --max_evaluate_steps 1000 \
    --eval_steps 1000 \
    --report_to "visualdl" \
    --disable_tqdm true \
    --recompute 1 \
    --gradient_accumulation_steps 2 \
    --do_train \
    --do_eval \
    --device "xpu"
执行以上代码，问题必现。
解决方案：可以在获取属性之前，通过hasattr判断属性是否存在。


Discussion:

Resolving patch:
diff --git a/paddlenlp/trainer/training_args.py b/paddlenlp/trainer/training_args.py
--- a/paddlenlp/trainer/training_args.py
+++ b/paddlenlp/trainer/training_args.py
@@ -790,7 +790,9 @@ def __post_init__(self):
         if len(self.sharding) == 0 and self.sharding_parallel_degree > 0:
             warnings.warn("`--sharding_parallel_degree` is useful only when `--sharding` is specified.")
 
-        if len(self.sharding) > 0 or self.tensor_parallel_degree > 1 or self.pipeline_parallel_degree > 1:
+        if paddle.distributed.get_world_size() > 1 and (
+            len(self.sharding) > 0 or self.tensor_parallel_degree > 1 or self.pipeline_parallel_degree > 1
+        ):
             self.use_hybrid_parallel = True
 
         if self.amp_master_grad:


Test patch:
Repository: PaddlePaddle/PaddleNLP

Issue:
[Question]: FAQ pipeline能否给个能运行的说明？
### 请提出你的问题

试了很多次，都是在这一步报错：
https://github.com/PaddlePaddle/PaddleNLP/tree/release/2.8/pipelines/examples/FAQ#343-%E5%90%AF%E5%8A%A8-restapi-%E6%A8%A1%E5%9E%8B%E6%9C%8D%E5%8A%A1
前面的几步都是OK的，paddle-pipelines都是按照说明从源码安装的。
而且[dense_faq_example.py] 这个使用Faiss做索引的代码也是OK的，

报错是：
Exception: Exception while running node `Retriever` with input `{'root_node': 'Query', 'params': {'Retriever': {'top_k': 5, 'debug': False}, 'Ranker': {'top_k': 5}, 'Query': {'debug': False}}, 'query': '企业如何办理养老保险?', 'node_id': 'Retriever'}`: RequestError(400, 'search_phase_execution_exception', 'runtime error'), full stack trace: Traceback (most recent call last):


我怀疑这个代码repo链接ES的地方有问题，建议你们check一下


Discussion:
检查一下模型是否搞混了，然后检查一下索引名，是否和下面的人碰见的问题类似？

https://github.com/PaddlePaddle/PaddleNLP/issues/8262
我尝试修复了一下，您先测一下：

https://github.com/PaddlePaddle/PaddleNLP/pull/8292
好的，已试了今天看到的最新的commit版本的README，是可以的。
对了，那个离线建立索引的地方，估计还得更新一下，这个issue https://github.com/PaddlePaddle/PaddleNLP/issues/8247#issuecomment-2050888042
欢迎开发者贡献

Resolving patch:
diff --git a/pipelines/utils/offline_ann.py b/pipelines/utils/offline_ann.py
--- a/pipelines/utils/offline_ann.py
+++ b/pipelines/utils/offline_ann.py
@@ -13,6 +13,7 @@
 # limitations under the License.
 
 import argparse
+import time
 
 from pipelines.document_stores import (
     BaiduElasticsearchDocumentStore,
@@ -139,7 +140,12 @@ def offline_ann(index_name, doc_dir):
         use_gpu=use_gpu,
         embed_title=args.embed_title,
     )
-
+    # Writing docs may take a while. so waitting until writing docs to be completed.
+    document_count = document_store.get_document_count()
+    while document_count == 0:
+        time.sleep(1)
+        print("Waiting for writing docs to be completed.")
+        document_count = document_store.get_document_count()
     # 建立索引库
     document_store.update_embeddings(retriever)
 
diff --git a/pipelines/utils/offline_ann_mm.py b/pipelines/utils/offline_ann_mm.py
--- a/pipelines/utils/offline_ann_mm.py
+++ b/pipelines/utils/offline_ann_mm.py
@@ -14,6 +14,7 @@
 
 import argparse
 import os
+import time
 
 from pipelines.document_stores import ElasticsearchDocumentStore, MilvusDocumentStore
 from pipelines.nodes import MultiModalRetriever
@@ -93,7 +94,12 @@ def offline_ann(index_name, doc_dir):
             query_type="image",
             document_embedding_models={"text": args.document_embedding_model},
         )
-
+    # Writing docs may take a while. so waitting until writing docs to be completed.
+    document_count = document_store.get_document_count()
+    while document_count == 0:
+        time.sleep(1)
+        print("Waiting for writing docs to be completed.")
+        document_count = document_store.get_document_count()
     # 建立索引库
     document_store.update_embeddings(retriever_mm)
 


Test patch:
Repository: PaddlePaddle/PaddleNLP

Issue:
[Bug]: examples/text_classification/ernie_doc/train.py  参数错误
### 软件环境

```Markdown
- paddlepaddle:
- paddlepaddle-gpu: 
- paddlenlp:
```


### 重复问题

- [X] I have searched the existing issues

### 错误描述

```Markdown
examples/text_classification/ernie_doc/train.py
line 340：

    predict(model, test_dataloader, args.file_path, memories, test_ds.label_list)

args中不存在参数“args.file_path”，根据代码逻辑，应该是参数“args.test_results_file”
```


### 稳定复现步骤 & 代码

python train.py --batch_size 4                 --model_name_or_path ernie-doc-base-zh                 --epoch 5                 --output_dir ./checkpoints/

报错如图：
![image](https://user-images.githubusercontent.com/34698600/237020653-80bdaa3e-87d1-4914-b90e-678ee38d796f.png)



Discussion:

Resolving patch:
diff --git a/examples/text_classification/ernie_doc/train.py b/examples/text_classification/ernie_doc/train.py
--- a/examples/text_classification/ernie_doc/train.py
+++ b/examples/text_classification/ernie_doc/train.py
@@ -337,8 +337,8 @@ def do_train(args):
     )
     # Copy the memory
     memories = create_memory()
-    predict(model, test_dataloader, args.file_path, memories, test_ds.label_list)
-    logger.info("Done Predicting the results has been saved in file: {}".format(args.file_path))
+    predict(model, test_dataloader, args.test_results_file, memories, test_ds.label_list)
+    logger.info("Done Predicting the results has been saved in file: {}".format(args.test_results_file))
 
 
 if __name__ == "__main__":


Test patch:
Repository: vacanza/python-holidays

Issue:
setting state/province using CountryHoliday
Assuming that, `CountryHoliday` is used as described in the README and the country is not know until runtime (e.g. it is read from a config or user input):

```python
import holidays

country = "DE"  # from sys.argv, for example
ch = holidays.CountryHoliday(country)
```

This of course yields a perfectly fine instance. The problem comes up when the state or province is also relevant. Since `CountryHoliday` returns an instance, there is no way to add a state, which is set using the constructor.

A couple of workarounds:

* use `type()` or `.__class__` to get the class; create a new instance
* use `getattr(holidays, country)` to get the class directly, skips the nice error handling

Neither of those seem like a sleek and easy to understand solution to me.

To resolve this, I propose that all keyword arguments to `CountryHoliday` should be passed onto the class, like so (omitting error handling):

```python
def CountryHoliday(country, **kwargs):
    country_holiday = globals()[country](**kwargs)
    return country_holiday

holidays_de_he = CountryHoliday("DE", prov="HE")
```

This enables setting the state/province and of course all other options like `expand` or `observed`, even when using the very friendly `CountryHoliday`. The external API stays stable, since arguments are only added and the single existing one just stays in place.

What do you think? :) I am happy to code up a quick PR including docs and a test, if you'd like.


Discussion:

Resolving patch:
diff --git a/holidays.py b/holidays.py
--- a/holidays.py
+++ b/holidays.py
@@ -188,9 +188,9 @@ def _populate(self, year):
     return HolidaySum
 
 
-def CountryHoliday(country):
+def CountryHoliday(country, prov=None, state=None):
     try:
-        country_holiday = globals()[country]()
+        country_holiday = globals()[country](prov=prov, state=state)
     except (KeyError):
         raise KeyError("Country %s not available" % country)
     return country_holiday


Test patch:
diff --git a/tests.py b/tests.py
--- a/tests.py
+++ b/tests.py
@@ -402,6 +402,14 @@ def setUp(self):
     def test_country(self):
         self.assertEqual(self.holidays.country, 'US')
 
+    def test_country_state(self):
+        h = holidays.CountryHoliday('US', state='NY')
+        self.assertEqual(h.state, 'NY')
+
+    def test_country_province(self):
+        h = holidays.CountryHoliday('AU', prov='NT')
+        self.assertEqual(h.prov, 'NT')
+
     def test_exceptions(self):
         self.assertRaises((KeyError), lambda: holidays.CountryHoliday('XXXX'))
Repository: vacanza/python-holidays

Issue:
Revisit #211 to include FR for France
This is an appeal to reconsider the request in #211 

Started using this library and I really like it, but this one exception to the [iso3166 standard](https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes) is most unexpected. I'll skip a lengthy opinion on the value of standards and go directly to my question: if there was a pull request to adhere to iso3166, would it be considered? Or would that be wasted work because of reasons (backwards compatibility or anything else)?

Thanks,
rfm.


Discussion:
Two-letter standards would be heavily appreciated. Non-compatibility with certain countries is [surprising](https://en.wikipedia.org/wiki/Principle_of_least_astonishment), to say the least ;) Thank you very much!

Resolving patch:
diff --git a/holidays/countries/__init__.py b/holidays/countries/__init__.py
--- a/holidays/countries/__init__.py
+++ b/holidays/countries/__init__.py
@@ -30,7 +30,7 @@
 from .estonia import Estonia, EE, EST
 from .european_central_bank import EuropeanCentralBank, ECB, TAR
 from .finland import Finland, FI, FIN
-from .france import France, FRA
+from .france import France, FR, FRA
 from .germany import Germany, DE, DEU
 from .greece import Greece, GR, GRC
 from .honduras import Honduras, HN, HND
diff --git a/holidays/countries/france.py b/holidays/countries/france.py
--- a/holidays/countries/france.py
+++ b/holidays/countries/france.py
@@ -123,6 +123,10 @@ def _populate(self, year):
             self[date(year, DEC, 20)] = "Abolition de l'esclavage"
 
 
-# FR already exists (Friday), we don't want to mess it up
+# *Warning* FR is also used by dateutlis (Friday), so be careful with its use
+class FR(France):
+    pass
+
+
 class FRA(France):
     pass


Test patch:
diff --git a/tests.py b/tests.py
--- a/tests.py
+++ b/tests.py
@@ -3974,8 +3974,8 @@ class TestFrance(unittest.TestCase):
 
     def setUp(self):
         self.holidays = holidays.France()
-        self.prov_holidays = {prov: holidays.France(prov=prov)
-                              for prov in holidays.France.PROVINCES}
+        self.prov_holidays = {prov: holidays.FR(prov=prov)
+                              for prov in holidays.FRA.PROVINCES}
 
     def test_2017(self):
         self.assertIn(date(2017, 1, 1), self.holidays)
Repository: vacanza/python-holidays

Issue:
pop_named() sometimes generates an exception
This simple code block generates an exception when I try to pop "Columbus Day" (last line):

```
from datetime import date
  
import holidays

us_holidays = holidays.CountryHoliday('US', prov=None, state='CA', years=2022)

print(us_holidays.get('2022-10-10').format("%s"))

us_holidays.pop_named("Columbus Day")
```

The exception is `dictionary changed size during iteration`, and it seems to be related to popping elements out of a dictionary while you're iterating through it: https://stackoverflow.com/questions/11941817/how-to-avoid-runtimeerror-dictionary-changed-size-during-iteration-error.  The element to be popped isn't actually removed.

I'm far from a competent Python programmer, but iterating over `list(self)` seems to solve the problem for me - no exception, and the item is removed properly:

```
    def get_named(self, name):
        # find all dates matching provided name (accepting partial
        # strings too, case insensitive), returning them in a list
        return [key for key in list(self) if name.lower() in self[key].lower()]
```


Discussion:

Resolving patch:
diff --git a/holidays/holiday_base.py b/holidays/holiday_base.py
--- a/holidays/holiday_base.py
+++ b/holidays/holiday_base.py
@@ -147,7 +147,8 @@ def get_list(self, key):
     def get_named(self, name):
         # find all dates matching provided name (accepting partial
         # strings too, case insensitive), returning them in a list
-        return [key for key in self if name.lower() in self[key].lower()]
+        matches = [key for key in self if name.lower() in self[key].lower()]
+        return matches
 
     def pop(self, key, default=None):
         if default is None:


Test patch: