internlm/SWE-Fixer-Train-110K huggingface dataset:
Repository: azavea/raster-vision

Issue:
Query is invisible in interactive docs search 
## 🐛 Bug

When I search for something in the docs using the new interactive search bar it seems to work except the query is not visible in the search box. Instead a bunch of dots appear. This was in Chrome Version 107.0.5304.110 (Official Build) (arm64) with the extension turned off.

![Screen Shot 2022-11-14 at 12 40 05 PM (2)](https://user-images.githubusercontent.com/1896461/201729357-53cc9725-0327-413c-91da-979dac0ea7e4.png)


Query is invisible in interactive docs search 
## 🐛 Bug

When I search for something in the docs using the new interactive search bar it seems to work except the query is not visible in the search box. Instead a bunch of dots appear. This was in Chrome Version 107.0.5304.110 (Official Build) (arm64) with the extension turned off.

![Screen Shot 2022-11-14 at 12 40 05 PM (2)](https://user-images.githubusercontent.com/1896461/201729357-53cc9725-0327-413c-91da-979dac0ea7e4.png)


Query is invisible in interactive docs search 
## 🐛 Bug

When I search for something in the docs using the new interactive search bar it seems to work except the query is not visible in the search box. Instead a bunch of dots appear. This was in Chrome Version 107.0.5304.110 (Official Build) (arm64) with the extension turned off.

![Screen Shot 2022-11-14 at 12 40 05 PM (2)](https://user-images.githubusercontent.com/1896461/201729357-53cc9725-0327-413c-91da-979dac0ea7e4.png)




Discussion:
@AdeelH 
@AdeelH 
@AdeelH 

Resolving patch:
diff --git a/docs/conf.py b/docs/conf.py
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -107,8 +107,6 @@ def setup(app: 'Sphinx') -> None:
     'sphinx_gallery.load_style',
     # add a copy button to code blocks
     'sphinx_copybutton',
-    # search-as-you-type
-    'sphinx_search.extension',
 ]
 
 #########################


Test patch:
Repository: azavea/raster-vision

Issue:
Improve Dataset.from_uris methods
When using the `from_uris` methods (such as in `SemanticSegmentationSlidingWindowGeoDataset`), it's easy to forget to pass in an important argument due to the use of kwargs. For example, size and stride are needed, and `label_vector_default_class_id` defaults to None which counterintuitively removes all the vectors. We should fix these and related problems.

This issue was originally noted in https://github.com/azavea/raster-vision/pull/1476




Discussion:

Resolving patch:
diff --git a/rastervision_core/rastervision/core/data/vector_transformer/class_inference_transformer.py b/rastervision_core/rastervision/core/data/vector_transformer/class_inference_transformer.py
--- a/rastervision_core/rastervision/core/data/vector_transformer/class_inference_transformer.py
+++ b/rastervision_core/rastervision/core/data/vector_transformer/class_inference_transformer.py
@@ -1,5 +1,6 @@
 from typing import TYPE_CHECKING, Dict, Optional
 from copy import deepcopy
+import logging
 
 from rastervision.core.data.vector_transformer import VectorTransformer
 from rastervision.core.data.vector_transformer.label_maker.filter import (
@@ -9,6 +10,8 @@
 if TYPE_CHECKING:
     from rastervision.core.data import ClassConfig, CRSTransformer
 
+log = logging.getLogger(__name__)
+
 
 class ClassInferenceTransformer(VectorTransformer):
     """Infers missing class_ids from GeoJSON features.
@@ -91,6 +94,7 @@ def transform(self,
         rules apply and the default_class_id is None), the feature is dropped.
         """
         new_features = []
+        warned = False
         for feature in geojson['features']:
             class_id = self.infer_feature_class_id(
                 feature,
@@ -103,5 +107,13 @@ def transform(self,
                 properties['class_id'] = class_id
                 feature['properties'] = properties
                 new_features.append(feature)
+            elif not warned:
+                log.warning(
+                    'ClassInferenceTransformer is dropping vector features because '
+                    'class_id cannot be inferred. To avoid this behavior, '
+                    'set default_class_id to a non-None value in '
+                    'ClassInferenceTransformer.')
+                warned = True
+
         new_geojson = features_to_geojson(new_features)
         return new_geojson


Test patch:
Repository: azavea/raster-vision

Issue:
Same explanation for SlidingWindowGeoDataset and RandomWindowGeoDataset
## 📚 Documentation

<!-- A clear and concise description of what content in https://docs.rastervision.io/ is an issue.-->

> The SlidingWindowGeoDataset allows reading the scene by sampling random window sizes and locations.

This description is same to explained both SlidingWindowGeoDataset and RandomWindowGeoDataset. This can be found here: https://docs.rastervision.io/en/latest/tutorials/sampling_training_data.html


Discussion:
Sorry for closing this due to wrong explanation. The issue is actually at the class name mentioned in those two sections's description. **SlidingWindowGeoDataset** was used at RandomWindowGeoDataset section too.
Thanks for catching that!

Resolving patch:
diff --git a/rastervision_core/rastervision/core/data/class_config.py b/rastervision_core/rastervision/core/data/class_config.py
--- a/rastervision_core/rastervision/core/data/class_config.py
+++ b/rastervision_core/rastervision/core/data/class_config.py
@@ -120,5 +120,6 @@ def __len__(self) -> int:
 
     @property
     def color_triples(self) -> List[Tuple[float, float, float]]:
+        """Class colors in a normalized form."""
         color_triples = [normalize_color(c) for c in self.colors]
         return color_triples


Test patch:
Repository: azavea/raster-vision

Issue:
ARM64 build currently broken
## 🐛 Bug

The ARM64 docker image appears to be broken.  On the following configuration,
```
$ docker --version
Docker version 24.0.5, build ced0996
$ uname -a
Linux XXX #26~22.04.1-Ubuntu SMP Mon Apr 24 01:58:03 UTC 2023 aarch64 aarch64 aarch64 GNU/Linux
```
I get this while trying to build:
```
3.713 ERROR: Could not find a version that satisfies the requirement onnxruntime-gpu==1.15.0 (from versions: none)
3.713 ERROR: No matching distribution found for onnxruntime-gpu==1.15.0
```
There does not seem to be an `onnxrutnime-gpu` package for ARM64.

I does not seem possible to resolve the dependency on `triangle`, either (the native code does not build on ARM).

## To Reproduce

1. Start up a Graviton instnace on AWS
2. [Install the latest docker](https://docs.docker.com/engine/install/ubuntu/)
3. Attempt to build the docker image

## Expected behavior

A successful build

## Environment

A Graviton instance on AWS.



Discussion:
A solution might be to declare these as [optional dependencies](https://setuptools.pypa.io/en/latest/userguide/dependency_management.html#optional-dependencies) and add some exception handling around their imports.

Resolving patch:
diff --git a/rastervision_core/rastervision/core/data/utils/aoi_sampler.py b/rastervision_core/rastervision/core/data/utils/aoi_sampler.py
--- a/rastervision_core/rastervision/core/data/utils/aoi_sampler.py
+++ b/rastervision_core/rastervision/core/data/utils/aoi_sampler.py
@@ -3,7 +3,6 @@
 import numpy as np
 from shapely.geometry import Polygon, MultiPolygon, LinearRing
 from shapely.ops import unary_union
-from triangle import triangulate
 
 
 class AoiSampler():
@@ -67,6 +66,8 @@ def triangulate_polygon(self, polygon: Polygon) -> dict:
         """Extract vertices and edges from the polygon (and its holes, if any)
         and pass them to the Triangle library for triangulation.
         """
+        from triangle import triangulate
+
         vertices, edges = self.polygon_to_graph(polygon)
 
         holes = polygon.interiors
diff --git a/rastervision_pytorch_learner/rastervision/pytorch_learner/dataset/dataset.py b/rastervision_pytorch_learner/rastervision/pytorch_learner/dataset/dataset.py
--- a/rastervision_pytorch_learner/rastervision/pytorch_learner/dataset/dataset.py
+++ b/rastervision_pytorch_learner/rastervision/pytorch_learner/dataset/dataset.py
@@ -385,7 +385,11 @@ def __init__(self,
                 p.intersection(extent_polygon) for p in self.aoi_polygons
             ]
             if efficient_aoi_sampling:
-                self.aoi_sampler = AoiSampler(self.aoi_polygons)
+                try:
+                    self.aoi_sampler = AoiSampler(self.aoi_polygons)
+                except ModuleNotFoundError:
+                    log.info('Ignoring efficient_aoi_sampling since triangle '
+                             'is not installed.')
 
     def get_resize_transform(
             self, transform: Optional[A.BasicTransform],


Test patch:
Repository: openai/openai-python

Issue:
Use `entry_points console_scripts `
Hi,

I was wondering if it might make sense to switch from `scripts` to `entry_points console_scripts ` in _setup.py_. This is the more modern and preferred approach and recommended by PyPA nowadays.

Example:
```
entry_points={
    'console_scripts': [
        'sample=sample:main',
    ],
},
```


Guide: https://packaging.python.org/guides/distributing-packages-using-setuptools/#scripts

Ref: 
* https://github.com/openai/openai-python/blob/main/bin/openai
* https://github.com/openai/openai-python/blob/62f8d40ffc6d3a723f5f1d99fee7febfd47026b5/setup.py#L25


Discussion:

Resolving patch:
diff --git a/bin/openai b/openai/_openai_scripts.py
similarity index 100%
rename from bin/openai
rename to openai/_openai_scripts.py
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -22,7 +22,11 @@
     ],
     extras_require={"dev": ["black~=21.6b0", "pytest==6.*"]},
     python_requires=">=3.7.1",
-    scripts=["bin/openai"],
+    entry_points={
+        'console_scripts': [
+            'openai=openai._openai_scripts:main',
+        ],
+    },
     packages=find_packages(exclude=["tests", "tests.*"]),
     package_data={
         "openai": [


Test patch:
Repository: openai/openai-python

Issue:
`ModuleNotFoundError: No module named 'openai.datalib'` on main branch
### Describe the bug

Building the following Dockerfile with `docker build .`:

```dockerfile
FROM python:3.8

RUN pip install git+https://github.com/openai/openai-python
RUN python -c 'from openai.api_resources.embedding import Embedding'
```

gives:

```
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/local/lib/python3.8/site-packages/openai/__init__.py", line 19, in <module>
    from openai.api_resources import (
  File "/usr/local/lib/python3.8/site-packages/openai/api_resources/__init__.py", line 7, in <module>
    from openai.api_resources.embedding import Embedding  # noqa: F401
  File "/usr/local/lib/python3.8/site-packages/openai/api_resources/embedding.py", line 6, in <module>
    from openai.datalib.numpy_helper import assert_has_numpy
ModuleNotFoundError: No module named 'openai.datalib'
```

### To Reproduce

See above

### Code snippets

```Python
See above
```


### OS

Linux

### Python version

3.8

### Library version

main


Discussion:
I think the cause is `openai/databli` doesn't have `__init__.py`

Resolving patch:
diff --git a/openai/datalib/__init__.py b/openai/datalib/__init__.py
new file mode 100644
--- /dev/null
+++ b/openai/datalib/__init__.py
@@ -0,0 +1,14 @@
+"""
+This module helps make data libraries like `numpy` and `pandas` optional dependencies.
+
+The libraries add up to 130MB+, which makes it challenging to deploy applications
+using this library in environments with code size constraints, like AWS Lambda.
+
+This module serves as an import proxy and provides a few utilities for dealing with the optionality.
+
+Since the primary use case of this library (talking to the OpenAI API) doesn't generally require data libraries,
+it's safe to make them optional. The rare case when data libraries are needed in the client is handled through
+assertions with instructive error messages.
+
+See also `setup.py`.
+"""
diff --git a/openai/datalib/common.py b/openai/datalib/common.py
--- a/openai/datalib/common.py
+++ b/openai/datalib/common.py
@@ -1,23 +1,8 @@
-"""
-This module helps make data libraries like `numpy` and `pandas` optional dependencies.
-
-The libraries add up to 130MB+, which makes it challenging to deploy applications
-using this library in environments with code size constraints, like AWS Lambda.
-
-This module serves as an import proxy and provides a few utilities for dealing with the optionality.
-
-Since the primary use case of this library (talking to the OpenAI API) doesn’t generally require data libraries,
-it’s safe to make them optional. The rare case when data libraries are needed in the client is handled through
-assertions with instructive error messages.
-
-See also `setup.py`.
-
-"""
 INSTRUCTIONS = """
 
-OpenAI error: 
+OpenAI error:
 
-    missing `{library}` 
+    missing `{library}`
 
 This feature requires additional dependencies:
 


Test patch:
Repository: openai/openai-python

Issue:
Missing default value to logprobs in openai.types.chat.chat_completion.Choice
### Confirm this is an issue with the Python library and not an underlying OpenAI API

- [X] This is an issue with the Python library

### Describe the bug

#980 added token `logprobs` to chat completions of type `Optional[ChoiceLogprobs]` in [`openai.types.chat.chat_completion.Choice`](https://github.com/openai/openai-python/blob/3ad4e8bc9d89d7a81586bf598289ff62b0a339b9/src/openai/types/chat/chat_completion.py#L33) and [`openai.types.chat.chat_completion_chunk.Choice`](https://github.com/openai/openai-python/blob/3ad4e8bc9d89d7a81586bf598289ff62b0a339b9/src/openai/types/chat/chat_completion_chunk.py#L97). In the latter, the default value is set to `None`, while in the former it is not set. This causes backward compatibility problems with code written for versions prior to 1.5.0.



### To Reproduce

Execution of the following code fails:

```python 
from openai.types.chat.chat_completion import ChatCompletionMessage, Choice

msg = ChatCompletionMessage(role="assistant", content="")

Choice(
    index=0,
    finish_reason="stop",
    message=msg,
)
```
The output
```
----> 1 Choice(
      2     index=0,
      3     finish_reason="stop",
      4     message=msg,
      5 )

File /.venv-3.10/lib/python3.10/site-packages/pydantic/main.py:164, in BaseModel.__init__(__pydantic_self__, **data)
    162 # `__tracebackhide__` tells pytest and some other tools to omit this function from tracebacks
    163 __tracebackhide__ = True
--> 164 __pydantic_self__.__pydantic_validator__.validate_python(data, self_instance=__pydantic_self__)

ValidationError: 1 validation error for Choice
logprobs
  Field required [type=missing, input_value={'index': 0, 'finish_reas...=None, tool_calls=None)}, input_type=dict]
    For further information visit https://errors.pydantic.dev/2.5/v/missing
```
Setting `logprobs` to `None` fixes the problem.
```python 
from openai.types.chat.chat_completion import ChatCompletionMessage, Choice

msg = ChatCompletionMessage(role="assistant", content="")

Choice(
    index=0,
    finish_reason="stop",
    message=msg,
    logprobs=None # added line
)
```

### Code snippets

```Python
see above
```


### OS

Linux

### Python version

Python 3.10.13

### Library version

openai 1.6.0


Discussion:

Resolving patch:
diff --git a/src/openai/types/chat/chat_completion.py b/src/openai/types/chat/chat_completion.py
--- a/src/openai/types/chat/chat_completion.py
+++ b/src/openai/types/chat/chat_completion.py
@@ -30,7 +30,7 @@ class Choice(BaseModel):
     index: int
     """The index of the choice in the list of choices."""
 
-    logprobs: Optional[ChoiceLogprobs]
+    logprobs: Optional[ChoiceLogprobs] = None
     """Log probability information for the choice."""
 
     message: ChatCompletionMessage


Test patch:
Repository: aws/aws-cli

Issue:
aws ses displays error msg: "No handlers could be found for logger "awscli.customizations.removals""
The error msg appears before the output whenever "ses" command is called.

```
C:\> aws ses
No handlers could be found for logger "awscli.customizations.removals"
usage: aws [options] <service_name> <operation> [parameters]
aws.cmd: error: too few arguments
```

```
C:\> aws ses list-identities
No handlers could be found for logger "awscli.customizations.removals"
{
    "Identities": [
        "...",
        "..."
    ]
}
```



Discussion:

Resolving patch:
diff --git a/awscli/clidriver.py b/awscli/clidriver.py
--- a/awscli/clidriver.py
+++ b/awscli/clidriver.py
@@ -203,6 +203,8 @@ def _handle_top_level_args(self, args):
             # loading of plugins, etc.
             self.session.set_debug_logger(logger_name='botocore')
             self.session.set_debug_logger(logger_name='awscli')
+        else:
+            self.session.set_stream_logger(logger_name='awscli', log_level='ERROR')
 
 
 class CLICommand(object):


Test patch:
diff --git a/tests/unit/test_clidriver.py b/tests/unit/test_clidriver.py
--- a/tests/unit/test_clidriver.py
+++ b/tests/unit/test_clidriver.py
@@ -84,6 +84,7 @@ def __init__(self, emitter=None):
         self.emitter = emitter
         self.provider = Provider(self, 'aws')
         self.profile = None
+        self.stream_logger_args = None
 
     def register(self, event_name, handler):
         self.emitter.register(event_name, handler)
@@ -138,10 +139,12 @@ def get_service_data(self, service_name):
                 ['Bucket', 'Delimiter', 'Marker', 'MaxKeys', 'Prefix']),
         }}}}
 
-
     def user_agent(self):
         return 'user_agent'
 
+    def set_stream_logger(self, *args, **kwargs):
+        self.stream_logger_args = (args, kwargs)
+
 
 class TestCliDriver(unittest.TestCase):
     def setUp(self):
@@ -166,6 +169,12 @@ def test_profile(self):
         driver.main('s3 list-objects --bucket foo --profile foo'.split())
         self.assertEqual(driver.session.profile, 'foo')
 
+    def test_error_logger(self):
+        driver = CLIDriver(session=self.session)
+        driver.main('s3 list-objects --bucket foo --profile foo'.split())
+        expected = {'log_level': 'ERROR', 'logger_name': 'awscli'}
+        self.assertEqual(driver.session.stream_logger_args[1], expected)
+
 
 class TestCliDriverHooks(unittest.TestCase):
     # These tests verify the proper hooks are emitted in clidriver.
Repository: aws/aws-cli

Issue:
Pull in s3 tutorial rst from doc folder into examples/ dir
"aws s3 help" leaves out important high level concepts that's in the html docs but not in the man page output (http://docs.aws.amazon.com/cli/latest/reference/s3/index.html)



Discussion:
May I suggest assuming one is online and having help just spawn a text browser?

e.g. `aws help s3` spawns `w3m http://docs.aws.amazon.com/cli/latest/reference/s3/index.html`

If you are using cloud services, I am going to assume reaching docs.aws.amazon.com is not a problem.


Resolving patch:
diff --git a/awscli/customizations/s3/s3.py b/awscli/customizations/s3/s3.py
--- a/awscli/customizations/s3/s3.py
+++ b/awscli/customizations/s3/s3.py
@@ -192,12 +192,13 @@ def doc_description(self, help_command, **kwargs):
         doc.style.h2('Description')
         doc.include_doc_string(command.documentation)
         if help_command.obj._name == 's3':
-            doc_path = os.path.join(
-                os.path.dirname(
-                    os.path.dirname(
-                        os.path.abspath(awscli.__file__))), 'doc', 'source',
-                                                            'tutorial', 's3')
-            doc_path = os.path.join(doc_path, 'concepts.rst')
+            doc_dir = os.path.join(
+                os.path.dirname(os.path.abspath(awscli.__file__)),
+                'examples', help_command.event_class.lower())
+            # The file is named '_concepts.rst' so that it doesn't
+            # collide with any s3 commands, in the rare chance we
+            # create a subcommand called "concepts".
+            doc_path = os.path.join(doc_dir, '_concepts.rst')
             if os.path.isfile(doc_path):
                 help_command.doc.style.h2('Important Concepts')
                 fp = open(doc_path)


Test patch:
Repository: aws/aws-cli

Issue:
aws_completer lists currently unsupported services (emr)
I was playing with aws-cli today and I am using the bash completion:

```
complete -C aws_completer aws
aws em<tab>
```

completes to `aws emr`

Hitting `<tab>` again causes

```
$ aws emr Traceback (most recent call last):
  File "/usr/local/bin/aws_completer", line 22, in <module>
    awscli.completer.complete(cline, cpoint)
  File "/usr/local/lib/python2.7/dist-packages/awscli/completer.py", line 153, in complete
    choices = Completer().complete(cmdline, point)
  File "/usr/local/lib/python2.7/dist-packages/awscli/completer.py", line 142, in complete
    self._process_command_line()
  File "/usr/local/lib/python2.7/dist-packages/awscli/completer.py", line 126, in _process_command_line
    if self.command_hc.command_table:
AttributeError: 'NoneType' object has no attribute 'command_table'
```

I guess the answer is to filter out non-supported services in the completer.



Discussion:
I think completing `aws emr` is okay because we do allow you to enable `emr` in preview mode, as explained when you type `aws emr`.  But the traceback is a bug.


Resolving patch:
diff --git a/awscli/completer.py b/awscli/completer.py
--- a/awscli/completer.py
+++ b/awscli/completer.py
@@ -63,13 +63,15 @@ def _complete_provider(self):
     def _complete_command(self):
         retval = []
         if self.current_word == self.command_name:
-            retval = self.command_hc.command_table.keys()
+            if self.command_hc:
+                retval = self.command_hc.command_table.keys()
         elif self.current_word.startswith('-'):
             retval = self._find_possible_options()
         else:
             # See if they have entered a partial command name
-            retval = [n for n in self.command_hc.command_table
-                      if n.startswith(self.current_word)]
+            if self.command_hc:
+                retval = [n for n in self.command_hc.command_table
+                          if n.startswith(self.current_word)]
         return retval
 
     def _complete_subcommand(self):
@@ -123,7 +125,7 @@ def _process_command_line(self):
                 self.command_name = w
                 cmd_obj = self.main_hc.command_table[self.command_name]
                 self.command_hc = cmd_obj.create_help_command()
-                if self.command_hc.command_table:
+                if self.command_hc and self.command_hc.command_table:
                     # Look for subcommand name
                     for w in self.non_options:
                         if w in self.command_hc.command_table:


Test patch:
diff --git a/tests/unit/test_completer.py b/tests/unit/test_completer.py
--- a/tests/unit/test_completer.py
+++ b/tests/unit/test_completer.py
@@ -68,6 +68,7 @@
     ('aws s3 cp --quiet -', -1, set(['--no-guess-mime-type', '--dryrun',
                                      '--recursive', '--acl',
                                      '--exclude', '--include'] + GLOBALOPTS)),
+    ('aws emr ', -1, set([])),
     ]
Repository: aws/aws-cli

Issue:
argparse dependency is only needed for Python 2.6
We currently have a dependency on argparse because it's not in stdlib for Python 2.6.  We should make this dependency specific to 2.6 and not install it for other Python versions.



Discussion:

Resolving patch:
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -1,5 +1,4 @@
 #!/usr/bin/env python
-import os
 import sys
 
 from setuptools import setup, find_packages
@@ -11,10 +10,14 @@
             'bcdoc>=0.9.0,<0.10.0',
             'six>=1.1.0',
             'colorama==0.2.5',
-            'argparse>=1.1',
             'docutils>=0.10',
             'rsa==3.1.1']
 
+if sys.version_info[:2] == (2, 6):
+    # For python2.6 we have to require argparse since it
+    # was not in stdlib until 2.7.
+    requires.append('argparse>=1.1')
+
 
 setup_options = dict(
     name='awscli',


Test patch: