repo stringclasses 17
values | instance_id stringlengths 15 32 | base_commit stringlengths 40 40 | patch stringlengths 1 101M | test_patch stringclasses 1
value | problem_statement stringlengths 28 29.2k | hints_text stringlengths 0 30.7k | created_at stringdate 2011-11-02 23:26:02 2023-08-23 21:42:04 | version stringclasses 1
value | FAIL_TO_PASS stringclasses 1
value | PASS_TO_PASS stringclasses 1
value | environment_setup_commit stringclasses 1
value |
|---|---|---|---|---|---|---|---|---|---|---|---|
JohnSnowLabs/spark-nlp | JohnSnowLabs__spark-nlp-13798 | e586d5647be4e574643d00f70fb0c3da194f5330 | diff --git a/python/sparknlp/annotator/classifier_dl/bert_for_zero_shot_classification.py b/python/sparknlp/annotator/classifier_dl/bert_for_zero_shot_classification.py
--- a/python/sparknlp/annotator/classifier_dl/bert_for_zero_shot_classification.py
+++ b/python/sparknlp/annotator/classifier_dl/bert_for_zero_shot_cla... | DocumentAssembler on array<string>
### Is there an existing issue for this?
- [X] I have searched the existing issues and did not find a match.
### Who can help?
_No response_
### What are you working on?
I don't know why but my question was deleted. Therefore, I will repeat again.
I am working with a dataframe t... | 2023-05-16T14:39:56Z | [] | [] | ||||
JohnSnowLabs/spark-nlp | JohnSnowLabs__spark-nlp-13873 | d732eaaf323f3605701c5d1b2b1ec5f4aae39615 | diff --git a/python/docs/conf.py b/python/docs/conf.py
--- a/python/docs/conf.py
+++ b/python/docs/conf.py
@@ -23,7 +23,7 @@
author = "John Snow Labs"
# The full version, including alpha/beta/rc tags
-release = "4.4.4"
+release = "5.0.0"
pyspark_version = "3.2.3"
# -- General configuration ---------------------... | BART Summarization max tokens?
### Is there an existing issue for this?
- [X] I have searched the existing issues and did not find a match.
### What are you working on?
I am trying to summarize potentially long texts with distilbart_xsum_12_6.
### Current Behavior
Currently I get an error on long texts... | Hi @clabornd
Could you please update your Spark NLP to `spark-nlp==4.4.3`? We have introduced optimizations for both speed and memory with some code enhancements/bug-fixes:
https://colab.research.google.com/drive/1KucyhiPBc5Eivkiyx94_VFaba8K1bvoV?usp=sharing
Thanks for the fast response, I tried upgrading to `sp... | 2023-07-01T13:08:34Z | [] | [] | |||
JohnSnowLabs/spark-nlp | JohnSnowLabs__spark-nlp-13912 | 2b2f93c6922d822d208500ca412e3e5b524d53ad | diff --git a/python/docs/conf.py b/python/docs/conf.py
--- a/python/docs/conf.py
+++ b/python/docs/conf.py
@@ -23,7 +23,7 @@
author = "John Snow Labs"
# The full version, including alpha/beta/rc tags
-release = "5.0.1"
+release = "5.0.2"
pyspark_version = "3.2.3"
# -- General configuration ---------------------... | The summarization model(s) are not giving any result
Hello,
Sorry for posting this under the "documentation" label, but I thought it is more appropriate than the "bug". The problem I am facing is currently of **two** types.
1️⃣ Model is **not downloading** at all
2️⃣ Model can be downloaded but **cannot do the inf... | Hi, thanks for reporting! @prabod I think this might be related to your feature?
Hie @prabod ! Any update on this?
I have found other models too which are causing this issue 😢
Thanks!
@AayushSameerShah I tried to reproduce this issue, but I cannot reproduce it on Colab and locally via the GPU.
You can check t... | 2023-08-02T13:04:43Z | [] | [] | |||
apache/mxnet | apache__mxnet-1318 | 800b4eb4e36e61e19cffbdc1f6e2e440911cc615 | diff --git a/python/mxnet/optimizer.py b/python/mxnet/optimizer.py
--- a/python/mxnet/optimizer.py
+++ b/python/mxnet/optimizer.py
@@ -345,8 +345,8 @@ def __init__(self, learning_rate=0.002,
decay_factor=(1 - 1e-8),
wd=0.,
rescale_grad=1, clip_gradient=None,
- ... | Running Adam optimizer error
Hi,
When I change the optimizer to Adam. For example,
``` python
model = mx.model.FeedForward(
ctx = [mx.gpu(0)],
num_epoch = 60,
symbol = network,
optimizer = 'adam',
initializer = mx.init.Xavier(factor_... | Seems the `__init__` function of the Adam optimizer has no `arg_names` keyword.
Does the following revision help? In https://github.com/dmlc/mxnet/blob/master/python/mxnet/optimizer.py#L348, add `arg_names = None` after `lr_schedule = None` and change https://github.com/dmlc/mxnet/blob/master/python/mxnet/optimizer.py... | 2016-01-19T18:52:00Z | [] | [] | |||
apache/mxnet | apache__mxnet-1661 | 771a2d6a0db5b770bb086f5cd570356df49b810d | diff --git a/amalgamation/amalgamation.py b/amalgamation/amalgamation.py
--- a/amalgamation/amalgamation.py
+++ b/amalgamation/amalgamation.py
@@ -7,7 +7,7 @@
'glog/logging.h', 'io/azure_filesys.h', 'io/hdfs_filesys.h', 'io/s3_filesys.h',
'kvstore_dist.h', 'mach/clock.h', 'mach/mach.h',
'malloc.h', 'mkl.... | Issue in amalgamation
~/mxnet/amalgamation$ make
g++ -std=c++11 -Wno-unknown-pragmas -Wall -I/opt/OpenBLAS -fPIC -o mxnet_predict-all.o -c mxnet_predict-all.cc
mxnet_predict-all.cc:31:18: fatal error: cuda.h: No such file or directory
#include <cuda.h>
^
compilation terminated.
make: **\* [mxnet_pre... | 2016-03-18T13:14:11Z | [] | [] | ||||
apache/mxnet | apache__mxnet-613 | 52793a151fba87291cb5db1bd98769365d994917 | diff --git a/python/mxnet/kvstore.py b/python/mxnet/kvstore.py
--- a/python/mxnet/kvstore.py
+++ b/python/mxnet/kvstore.py
@@ -310,7 +310,7 @@ def _set_updater(self, updater):
>>> def update(key, input, stored):
... print "update on key: %d" % key
... stored += input * 2
- >>> ... | python doc error in KVstore example
in the KVstore example:
``` python
>>> def update(key, input, stored):
>>> print "update on key: %d" % key
>>> stored += input * 2
>>> kv.set_updater(update)
```
where `kv.set_updater` should be
`kv._set_updater(update)`
| yeah, we try to replace it by `set_optimizer`, which is probably more straightforward for optimization algorothms. can you please push a PR to fix the example. thanks
| 2015-11-18T03:05:10Z | [] | [] | |||
apache/mxnet | apache__mxnet-627 | e304fc05e9e8ef429bfd2d87a8aa029caba2bdb6 | diff --git a/example/cifar10/cifar10.py b/example/cifar10/cifar10.py
deleted file mode 100644
--- a/example/cifar10/cifar10.py
+++ /dev/null
@@ -1,97 +0,0 @@
-# pylint: skip-file
-import sys, os
-# code to automatically download dataset
-curr_path = os.path.dirname(os.path.abspath(os.path.expanduser(__file__)))
-sys.pa... | improve the sematic of lr_scheduler
the current lr_scheduler is based on epoch, it is not flexible, and it has problem with the distributed training, where the optimizer runs on the server nodes. a server node neither can get the current epoch number, nor there is a clear definition of epoch for async sgd.
i suggest ... | Can we put learning rate in kvstore and synchronize it?
currently it only syncs once when call `kvstore.set_optimizer(optm)`. syncing later is nontrivial in a full async updating, some nodes may fast while others may slow, especially, any worker may die at any moment if running on the ec2 spot instance
This will resu... | 2015-11-19T03:50:25Z | [] | [] | |||
apache/mxnet | apache__mxnet-724 | c5c8a20556480fb716f003aecb26b548f131c4d3 | diff --git a/example/image-classification/train_model.py b/example/image-classification/train_model.py
--- a/example/image-classification/train_model.py
+++ b/example/image-classification/train_model.py
@@ -43,12 +43,14 @@ def fit(args, network, data_loader):
step = max(int(epoch_size * args.lr_factor_epoc... | [example] train_model.py AttributeError: 'Namespace' object has no attribute 'clip_gradient'
# ../../tools/launch.py -n 2 python train_mnist.py
2015-11-26 10:03:21,152 Node[0] start with arguments Namespace(batch_size=128, data_dir='mnist/', gpus=None, kv_store='local', load_epoch=None, lr=0.1, lr_factor=1, lr_factor_... | env:
1. g++ 4.8
2. cuda 7.0
execution:
1. git pull
2. git submodule update
| 2015-11-26T02:30:22Z | [] | [] | |||
tiangolo/fastapi | tiangolo__fastapi-1122 | 025b38df40a18f94322fab445aee13024fe783da | diff --git a/fastapi/routing.py b/fastapi/routing.py
--- a/fastapi/routing.py
+++ b/fastapi/routing.py
@@ -480,7 +480,12 @@ def decorator(func: Callable) -> Callable:
def add_api_websocket_route(
self, path: str, endpoint: Callable, name: str = None
) -> None:
- route = APIWebSocketRoute(path,... | Dependency override websocket broken
### Describe the bug
Dependency override does not work for websockets.
The function `add_api_websocket_route` does not add `dependency_overrides_provider` to `APIWebSocketRoute`.
### To Reproduce
Create a simple app with websockets and test it with override.
### Expe... | `APIRouter.add_api_websocket_route` should be modified to construct the `APIWebSocketRoute` like this:
```
route = APIWebSocketRoute(
path,
endpoint=endpoint,
name=name,
dependency_overrides_provider=self.dependency_overrides_provider,
)
``` | 2020-03-16T17:12:49Z | [] | [] | |||
tiangolo/fastapi | tiangolo__fastapi-1524 | 8cfe254400a92c1184c354a92541b401932d24a3 | diff --git a/fastapi/encoders.py b/fastapi/encoders.py
--- a/fastapi/encoders.py
+++ b/fastapi/encoders.py
@@ -71,6 +71,8 @@ def jsonable_encoder(
by_alias=by_alias,
skip_defaults=bool(exclude_unset or skip_defaults),
)
+ if "__root__" in obj_dict:
+ obj_... | Pydantic __root__ model - incorrect handling
### Describe the bug
https://pydantic-docs.helpmanual.io/usage/models/#custom-root-types
Pydantic allows to create models with only `__root__` field. In such scenario the model behaves as transparent wrapper for this single type.
When such model is used in response (r... | If anyone wants to submit a PR to fix this I'd be happy to review it. (I think it's worth handling this properly.)
For now created issue for `pydantic` (https://github.com/samuelcolvin/pydantic/issues/1193) as it looks like it is more broken there than here.
I wouldn't recommend using `__root__` in FastAPI. `__root__` ... | 2020-06-06T03:48:18Z | [] | [] | |||
tiangolo/fastapi | tiangolo__fastapi-1534 | 543ef7753aff639ad3aed7c153e42f719e361d38 | diff --git a/fastapi/routing.py b/fastapi/routing.py
--- a/fastapi/routing.py
+++ b/fastapi/routing.py
@@ -1,4 +1,5 @@
import asyncio
+import enum
import inspect
from typing import Any, Callable, Dict, List, Optional, Sequence, Set, Type, Union
@@ -295,6 +296,9 @@ def __init__(
dependency_overrides_provid... | Support HTTPStatus
### Is your feature request related to a problem
We typically use [HTTPStatus](https://docs.python.org/3/library/http.html#http.HTTPStatus) in our code. When used as a value for `status_code` in path functions this results in the string literal in the documentation and when "trying" the response i... | For now you can create your own HTTPStatus class (you can't subclass Enums) and add a `__str__` method to convert it to the string representation of the actual status code, for example:
```python
class MyHTTPStatus(IntEnum):
OK = 200
...
def __str__(self):
return str(int(self))
```
or use `i... | 2020-06-08T12:29:39Z | [] | [] | |||
tiangolo/fastapi | tiangolo__fastapi-1540 | 543ef7753aff639ad3aed7c153e42f719e361d38 | diff --git a/docs_src/websockets/tutorial002.py b/docs_src/websockets/tutorial002.py
--- a/docs_src/websockets/tutorial002.py
+++ b/docs_src/websockets/tutorial002.py
@@ -1,4 +1,4 @@
-from fastapi import Cookie, Depends, FastAPI, Header, WebSocket, status
+from fastapi import Cookie, Depends, FastAPI, Query, WebSocket,... | Tutorial websocket doc example
**Describe the bug**
Hi,
On the docs of websocket the last example doesn't work.
**To Reproduce**
Steps to reproduce the behavior:
1. Create a file main.py with the last example on the bottom of the file
>https://fastapi.tiangolo.com/tutorial/websockets/#create-a-websocket
```... | @BenjPy ,
Just add `event.preventDefault()` in the beginning of `connect` js function.
The problem here is when you are trying to make websocket connection, browser refreshes page and closes websocket connection.
So `connect` function should looks like this:
```
function connect(event) {
event.preventDefault(... | 2020-06-09T15:37:27Z | [] | [] | |||
tiangolo/fastapi | tiangolo__fastapi-1547 | 34c857b7cb493fa41f296c001234bc6b2ed6a083 | diff --git a/fastapi/applications.py b/fastapi/applications.py
--- a/fastapi/applications.py
+++ b/fastapi/applications.py
@@ -38,6 +38,7 @@ def __init__(
version: str = "0.1.0",
openapi_url: Optional[str] = "/openapi.json",
openapi_tags: Optional[List[Dict[str, Any]]] = None,
+ server... | I need a way to specify servers in the openapi spec
### Is your feature request related to a problem
I want to be able to use the generated openapi.json doc as it is and hook it up with a document publishing flow, but i'm not able to because I have to add in information about `servers` manually.
### The solution ... | It's @tiangolo's decision to make, but given this *is* part of the OpenAPI spec, I personally would be in favor of adding this as a keyword argument to `FastAPI`, and as an argument to `get_openapi`, making it easier to set this.
I think those should be the only changes you need to make (just make sure the value als... | 2020-06-10T19:32:26Z | [] | [] | |||
tiangolo/fastapi | tiangolo__fastapi-1549 | 543ef7753aff639ad3aed7c153e42f719e361d38 | diff --git a/fastapi/dependencies/utils.py b/fastapi/dependencies/utils.py
--- a/fastapi/dependencies/utils.py
+++ b/fastapi/dependencies/utils.py
@@ -478,6 +478,7 @@ async def solve_dependencies(
name=sub_dependant.name,
security_scopes=sub_dependant.security_scopes,
)
+ ... | dependency_overrides does not play well with scopes
**Describe the bug**
When working with `Security()` dependencies, the scopes disappear when `app.dependency_overrides` is executed. The callable dealing with the scopes gets an empty list instead of the scopes.
**To Reproduce**
```python
from fastapi import Fa... | Hello,
I was reading your [comment](https://github.com/tiangolo/fastapi/issues/738#issuecomment-558795651) in the other thread. In my case, I am using `dependency_overrides` to mock the connection to database.
```python
class TransactionTestCaseMixin:
db_session: Session
@pytest.fixture(autouse=True)... | 2020-06-11T01:14:25Z | [] | [] | |||
tiangolo/fastapi | tiangolo__fastapi-1553 | 543ef7753aff639ad3aed7c153e42f719e361d38 | diff --git a/fastapi/dependencies/utils.py b/fastapi/dependencies/utils.py
--- a/fastapi/dependencies/utils.py
+++ b/fastapi/dependencies/utils.py
@@ -623,9 +623,17 @@ async def request_body_to_args(
field = required_params[0]
field_info = get_field_info(field)
embed = getattr(field_info, "em... | Bad `loc` on validation error, if payload represended by one model
### Describe the bug
Really like your framework, but there is, indeed, an annoying issue with `loc` on validation error with one object as payload.
### To Reproduce
Code sample
```Python
from typing import List
from fastapi import FastAPI, B... | We can also observe this behaviour, it caused a bit of head-scratching when trying to diagnose the source of an error between frontend and backend services.
Also observed this behaviour when fiddling around with the framework for the first time. | 2020-06-11T17:24:14Z | [] | [] | |||
tiangolo/fastapi | tiangolo__fastapi-17 | 014c7df142baf0e5cade2c452edfc0c138fda398 | diff --git a/fastapi/routing.py b/fastapi/routing.py
--- a/fastapi/routing.py
+++ b/fastapi/routing.py
@@ -18,7 +18,7 @@
from starlette.formparsers import UploadFile
from starlette.requests import Request
from starlette.responses import JSONResponse, Response
-from starlette.routing import get_name, request_response... | starlette update breaks routing
[starlette 0.9.11](https://pypi.org/project/starlette/0.9.11/) breaks fastapi routing
I'm currently working around this by enforcing starlette==0.9.10
| Thanks for the report! I'll check it as soon as I get to my laptop.
It should now be fixed in the latest version `0.1.18`. The change is only pinning the dependencies so FastAPI is not broken, it should work now.
The next step will be to actually update FastAPI's code to be compatible with the latest changes in Star... | 2019-01-30T20:16:49Z | [] | [] | |||
tiangolo/fastapi | tiangolo__fastapi-241 | 3cf92a156ce36c3127366edac3b09c89fdb3a195 | diff --git a/fastapi/applications.py b/fastapi/applications.py
--- a/fastapi/applications.py
+++ b/fastapi/applications.py
@@ -9,7 +9,7 @@
from starlette.exceptions import ExceptionMiddleware, HTTPException
from starlette.middleware.errors import ServerErrorMiddleware
from starlette.requests import Request
-from sta... | make swagger_ui_html, redoc_html and openapi.json handled by async function?
**Is your feature request related to a problem? Please describe.**
I add a loop on all my router of my app to check if the handler are all coroutine function to get better performance, but I fount that swagger_ui_html, redoc_html and openapi.... | Nice catch @Trim21 ! I'll fix it.
If you don't mind, could I give a PR to fix it?
Of course! PRs are very welcome. | 2019-05-20T09:39:22Z | [] | [] |
End of preview. Expand in Data Studio
README.md exists but content is empty.
- Downloads last month
- 7