[BUG] Another permissions error when installing with docker-compose

### Pre-check

- [X] I have searched the existing issues and none cover this bug.

### Description

This looks similar, but not the same as #1876

As for following the instructions, I've not seen any relevant guide to installing with Docker, hence working a bit blind.

Background: I'm trying to run this on an Asustor NAS, which offers very little ability to customize the environment. Ideally, I'd just like to be able to run this by pasting a docker-compose file into Portainer, and having it work it's magic from there:

---

```
sal@halob:/volume1/home/sal/apps/private-gpt $ docker-compose up
[+] Running 3/3
 ✔ Network private-gpt_default          Created                                                                                0.1s
 ✔ Container private-gpt-ollama-1       Created                                                                                0.1s
 ✔ Container private-gpt-private-gpt-1  Created                                                                                0.1s
Attaching to ollama-1, private-gpt-1
ollama-1       | Couldn't find '/root/.ollama/id_ed25519'. Generating new private key.
ollama-1       | Your new public key is:
ollama-1       |
ollama-1       | ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBNQkShAIoUDyyueUTiCHM9/AZfZ+rxnUZgmh+YByBVB
ollama-1       |
ollama-1       | 2024/07/23 23:20:28 routes.go:1096: INFO server config env="map[CUDA_VISIBLE_DEVICES: GPU_DEVICE_ORDINAL: HIP_VISIBLE_DEVICES: HSA_OVERRIDE_GFX_VERSION: OLLAMA_DEBUG:false OLLAMA_FLASH_ATTENTION:false OLLAMA_HOST:http://0.0.0.0:11434 OLLAMA_INTEL_GPU:false OLLAMA_KEEP_ALIVE:5m0s OLLAMA_LLM_LIBRARY: OLLAMA_MAX_LOADED_MODELS:0 OLLAMA_MAX_QUEUE:512 OLLAMA_MAX_VRAM:0 OLLAMA_MODELS:/root/.ollama/models OLLAMA_NOHISTORY:false OLLAMA_NOPRUNE:false OLLAMA_NUM_PARALLEL:0 OLLAMA_ORIGINS:[http://localhost https://localhost http://localhost:* https://localhost:* http://127.0.0.1 https://127.0.0.1 http://127.0.0.1:* https://127.0.0.1:* http://0.0.0.0 https://0.0.0.0 http://0.0.0.0:* https://0.0.0.0:* app://* file://* tauri://*] OLLAMA_RUNNERS_DIR: OLLAMA_SCHED_SPREAD:false OLLAMA_TMPDIR: ROCR_VISIBLE_DEVICES:]"
ollama-1       | time=2024-07-23T23:20:28.317Z level=INFO source=images.go:778 msg="total blobs: 0"
ollama-1       | time=2024-07-23T23:20:28.317Z level=INFO source=images.go:785 msg="total unused blobs removed: 0"
ollama-1       | time=2024-07-23T23:20:28.317Z level=INFO source=routes.go:1143 msg="Listening on [::]:11434 (version 0.2.6)"
ollama-1       | time=2024-07-23T23:20:28.318Z level=INFO source=payload.go:30 msg="extracting embedded files" dir=/tmp/ollama1112441504/runners
private-gpt-1  | 23:20:29.406 [INFO    ] private_gpt.settings.settings_loader - Starting application with profiles=['default', 'docker']
ollama-1       | time=2024-07-23T23:20:33.589Z level=INFO source=payload.go:44 msg="Dynamic LLM libraries [cpu_avx cpu_avx2 cuda_v11 rocm_v60102 cpu]"
ollama-1       | time=2024-07-23T23:20:33.589Z level=INFO source=gpu.go:205 msg="looking for compatible GPUs"
ollama-1       | time=2024-07-23T23:20:33.589Z level=WARN source=gpu.go:225 msg="CPU does not have minimum vector extensions, GPU inference disabled" required=avx detected="no vector extensions"
ollama-1       | time=2024-07-23T23:20:33.590Z level=INFO source=types.go:105 msg="inference compute" id=0 library=cpu compute="" driver=0.0 name="" total="31.1 GiB" available="28.1 GiB"
private-gpt-1  | There was a problem when trying to write in your cache folder (/nonexistent/.cache/huggingface/hub). You should set the environment variable TRANSFORMERS_CACHE to a writable directory.
private-gpt-1  | None of PyTorch, TensorFlow >= 2.0, or Flax have been found. Models won't be available and only tokenizers, configuration and file/data utilities can be used.
private-gpt-1  | 23:20:40.419 [INFO    ] private_gpt.components.llm.llm_component - Initializing the LLM in mode=ollama
private-gpt-1  | Traceback (most recent call last):
private-gpt-1  |   File "/home/worker/app/.venv/lib/python3.11/site-packages/injector/__init__.py", line 798, in get
private-gpt-1  |     return self._context[key]
private-gpt-1  |            ~~~~~~~~~~~~~^^^^^
private-gpt-1  | KeyError: <class 'private_gpt.ui.ui.PrivateGptUi'>
private-gpt-1  |
private-gpt-1  | During handling of the above exception, another exception occurred:
private-gpt-1  |
private-gpt-1  | Traceback (most recent call last):
private-gpt-1  |   File "/home/worker/app/.venv/lib/python3.11/site-packages/injector/__init__.py", line 798, in get
private-gpt-1  |     return self._context[key]
private-gpt-1  |            ~~~~~~~~~~~~~^^^^^
private-gpt-1  | KeyError: <class 'private_gpt.server.ingest.ingest_service.IngestService'>
private-gpt-1  |
private-gpt-1  | During handling of the above exception, another exception occurred:
private-gpt-1  |
private-gpt-1  | Traceback (most recent call last):
private-gpt-1  |   File "/home/worker/app/.venv/lib/python3.11/site-packages/injector/__init__.py", line 798, in get
private-gpt-1  |     return self._context[key]
private-gpt-1  |            ~~~~~~~~~~~~~^^^^^
private-gpt-1  | KeyError: <class 'private_gpt.components.vector_store.vector_store_component.VectorStoreComponent'>
private-gpt-1  |
private-gpt-1  | During handling of the above exception, another exception occurred:
private-gpt-1  |
private-gpt-1  | Traceback (most recent call last):
private-gpt-1  |   File "<frozen runpy>", line 198, in _run_module_as_main
private-gpt-1  |   File "<frozen runpy>", line 88, in _run_code
private-gpt-1  |   File "/home/worker/app/private_gpt/__main__.py", line 5, in <module>
private-gpt-1  |     from private_gpt.main import app
private-gpt-1  |   File "/home/worker/app/private_gpt/main.py", line 6, in <module>
private-gpt-1  |     app = create_app(global_injector)
private-gpt-1  |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
private-gpt-1  |   File "/home/worker/app/private_gpt/launcher.py", line 63, in create_app
private-gpt-1  |     ui = root_injector.get(PrivateGptUi)
private-gpt-1  |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
private-gpt-1  |   File "/home/worker/app/.venv/lib/python3.11/site-packages/injector/__init__.py", line 91, in wrapper
private-gpt-1  |     return function(*args, **kwargs)
private-gpt-1  |            ^^^^^^^^^^^^^^^^^^^^^^^^^
private-gpt-1  |   File "/home/worker/app/.venv/lib/python3.11/site-packages/injector/__init__.py", line 974, in get
private-gpt-1  |     provider_instance = scope_instance.get(interface, binding.provider)
private-gpt-1  |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
private-gpt-1  |   File "/home/worker/app/.venv/lib/python3.11/site-packages/injector/__init__.py", line 91, in wrapper
private-gpt-1  |     return function(*args, **kwargs)
private-gpt-1  |            ^^^^^^^^^^^^^^^^^^^^^^^^^
private-gpt-1  |   File "/home/worker/app/.venv/lib/python3.11/site-packages/injector/__init__.py", line 800, in get
private-gpt-1  |     instance = self._get_instance(key, provider, self.injector)
private-gpt-1  |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
private-gpt-1  |   File "/home/worker/app/.venv/lib/python3.11/site-packages/injector/__init__.py", line 811, in _get_instance
private-gpt-1  |     return provider.get(injector)
private-gpt-1  |            ^^^^^^^^^^^^^^^^^^^^^^
private-gpt-1  |   File "/home/worker/app/.venv/lib/python3.11/site-packages/injector/__init__.py", line 264, in get
private-gpt-1  |     return injector.create_object(self._cls)
private-gpt-1  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
private-gpt-1  |   File "/home/worker/app/.venv/lib/python3.11/site-packages/injector/__init__.py", line 998, in create_object
private-gpt-1  |     self.call_with_injection(init, self_=instance, kwargs=additional_kwargs)
private-gpt-1  |   File "/home/worker/app/.venv/lib/python3.11/site-packages/injector/__init__.py", line 1031, in call_with_injection
private-gpt-1  |     dependencies = self.args_to_inject(
private-gpt-1  |                    ^^^^^^^^^^^^^^^^^^^^
private-gpt-1  |   File "/home/worker/app/.venv/lib/python3.11/site-packages/injector/__init__.py", line 91, in wrapper
private-gpt-1  |     return function(*args, **kwargs)
private-gpt-1  |            ^^^^^^^^^^^^^^^^^^^^^^^^^
private-gpt-1  |   File "/home/worker/app/.venv/lib/python3.11/site-packages/injector/__init__.py", line 1079, in args_to_inject
private-gpt-1  |     instance: Any = self.get(interface)
private-gpt-1  |                     ^^^^^^^^^^^^^^^^^^^
private-gpt-1  |   File "/home/worker/app/.venv/lib/python3.11/site-packages/injector/__init__.py", line 91, in wrapper
private-gpt-1  |     return function(*args, **kwargs)
private-gpt-1  |            ^^^^^^^^^^^^^^^^^^^^^^^^^
private-gpt-1  |   File "/home/worker/app/.venv/lib/python3.11/site-packages/injector/__init__.py", line 974, in get
private-gpt-1  |     provider_instance = scope_instance.get(interface, binding.provider)
private-gpt-1  |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
private-gpt-1  |   File "/home/worker/app/.venv/lib/python3.11/site-packages/injector/__init__.py", line 91, in wrapper
private-gpt-1  |     return function(*args, **kwargs)
private-gpt-1  |            ^^^^^^^^^^^^^^^^^^^^^^^^^
private-gpt-1  |   File "/home/worker/app/.venv/lib/python3.11/site-packages/injector/__init__.py", line 800, in get
private-gpt-1  |     instance = self._get_instance(key, provider, self.injector)
private-gpt-1  |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
private-gpt-1  |   File "/home/worker/app/.venv/lib/python3.11/site-packages/injector/__init__.py", line 811, in _get_instance
private-gpt-1  |     return provider.get(injector)
private-gpt-1  |            ^^^^^^^^^^^^^^^^^^^^^^
private-gpt-1  |   File "/home/worker/app/.venv/lib/python3.11/site-packages/injector/__init__.py", line 264, in get
private-gpt-1  |     return injector.create_object(self._cls)
private-gpt-1  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
private-gpt-1  |   File "/home/worker/app/.venv/lib/python3.11/site-packages/injector/__init__.py", line 998, in create_object
private-gpt-1  |     self.call_with_injection(init, self_=instance, kwargs=additional_kwargs)
private-gpt-1  |   File "/home/worker/app/.venv/lib/python3.11/site-packages/injector/__init__.py", line 1031, in call_with_injection
private-gpt-1  |     dependencies = self.args_to_inject(
private-gpt-1  |                    ^^^^^^^^^^^^^^^^^^^^
private-gpt-1  |   File "/home/worker/app/.venv/lib/python3.11/site-packages/injector/__init__.py", line 91, in wrapper
private-gpt-1  |     return function(*args, **kwargs)
private-gpt-1  |            ^^^^^^^^^^^^^^^^^^^^^^^^^
private-gpt-1  |   File "/home/worker/app/.venv/lib/python3.11/site-packages/injector/__init__.py", line 1079, in args_to_inject
private-gpt-1  |     instance: Any = self.get(interface)
private-gpt-1  |                     ^^^^^^^^^^^^^^^^^^^
private-gpt-1  |   File "/home/worker/app/.venv/lib/python3.11/site-packages/injector/__init__.py", line 91, in wrapper
private-gpt-1  |     return function(*args, **kwargs)
private-gpt-1  |            ^^^^^^^^^^^^^^^^^^^^^^^^^
private-gpt-1  |   File "/home/worker/app/.venv/lib/python3.11/site-packages/injector/__init__.py", line 974, in get
private-gpt-1  |     provider_instance = scope_instance.get(interface, binding.provider)
private-gpt-1  |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
private-gpt-1  |   File "/home/worker/app/.venv/lib/python3.11/site-packages/injector/__init__.py", line 91, in wrapper
private-gpt-1  |     return function(*args, **kwargs)
private-gpt-1  |            ^^^^^^^^^^^^^^^^^^^^^^^^^
private-gpt-1  |   File "/home/worker/app/.venv/lib/python3.11/site-packages/injector/__init__.py", line 800, in get
private-gpt-1  |     instance = self._get_instance(key, provider, self.injector)
private-gpt-1  |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
private-gpt-1  |   File "/home/worker/app/.venv/lib/python3.11/site-packages/injector/__init__.py", line 811, in _get_instance
private-gpt-1  |     return provider.get(injector)
private-gpt-1  |            ^^^^^^^^^^^^^^^^^^^^^^
private-gpt-1  |   File "/home/worker/app/.venv/lib/python3.11/site-packages/injector/__init__.py", line 264, in get
private-gpt-1  |     return injector.create_object(self._cls)
private-gpt-1  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
private-gpt-1  |   File "/home/worker/app/.venv/lib/python3.11/site-packages/injector/__init__.py", line 998, in create_object
private-gpt-1  |     self.call_with_injection(init, self_=instance, kwargs=additional_kwargs)
private-gpt-1  |   File "/home/worker/app/.venv/lib/python3.11/site-packages/injector/__init__.py", line 1040, in call_with_injection
private-gpt-1  |     return callable(*full_args, **dependencies)
private-gpt-1  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
private-gpt-1  |   File "/home/worker/app/private_gpt/components/vector_store/vector_store_component.py", line 114, in __init__
private-gpt-1  |     client = QdrantClient(
private-gpt-1  |              ^^^^^^^^^^^^^
private-gpt-1  |   File "/home/worker/app/.venv/lib/python3.11/site-packages/qdrant_client/qdrant_client.py", line 117, in __init__
private-gpt-1  |     self._client = QdrantLocal(
private-gpt-1  |                    ^^^^^^^^^^^^
private-gpt-1  |   File "/home/worker/app/.venv/lib/python3.11/site-packages/qdrant_client/local/qdrant_local.py", line 66, in __init__
private-gpt-1  |     self._load()
private-gpt-1  |   File "/home/worker/app/.venv/lib/python3.11/site-packages/qdrant_client/local/qdrant_local.py", line 97, in _load
private-gpt-1  |     os.makedirs(self.location, exist_ok=True)
private-gpt-1  |   File "<frozen os>", line 215, in makedirs
private-gpt-1  |   File "<frozen os>", line 225, in makedirs
private-gpt-1  | PermissionError: [Errno 13] Permission denied: 'local_data/private_gpt'
^CGracefully stopping... (press Ctrl+C again to force)
[+] Stopping 2/2
 ✔ Container private-gpt-private-gpt-1  Stopped                                                                                0.3s
 ✔ Container private-gpt-ollama-1       Stopped
```

### Steps to Reproduce

1. Clone the repo
2. docker-compose build
3. docker-compose up

### Expected Behavior

It should just run

### Actual Behavior

Error, as reported above

### Environment

Running on an Asustor router, docker 25.0.5

### Additional Information

_No response_

### Version

latest

### Setup Checklist

- [X] Confirm that you have followed the installation instructions in the project’s documentation.
- [X] Check that you are using the latest version of the project.
- [X] Verify disk space availability for model storage and data processing.
- [X] Ensure that you have the necessary permissions to run the project.

### NVIDIA GPU Setup Checklist

- [ ] Check that the all CUDA dependencies are installed and are compatible with your GPU (refer to [CUDA's documentation](https://docs.nvidia.com/deploy/cuda-compatibility/#frequently-asked-questions))
- [ ] Ensure an NVIDIA GPU is installed and recognized by the system (run `nvidia-smi` to verify).
- [ ] Ensure proper permissions are set for accessing GPU resources.
- [ ] Docker users - Verify that the NVIDIA Container Toolkit is configured correctly (e.g. run `sudo docker run --rm --gpus all nvidia/cuda:11.0.3-base-ubuntu20.04 nvidia-smi`)


KNNImputer add_indicator fails to persist where missing data had been present in training

### Describe the bug

Hello, I've encountered an issue where the KNNImputer fails to record the fields where there were missing data at the time when `.fit` is called, but not recognised if `.transform` is called on a dense matrix. I would have expected it to return a 2x3 matrix rather than 2x2, with `missingindicator_A = False` for all cases.

Reproduction steps below. Any help much appreciated :)

### Steps/Code to Reproduce

```python
>>> import pandas as pd
>>> from sklearn.impute import KNNImputer
>>> knn = KNNImputer(add_indicator=True)
>>> df = pd.DataFrame({'A': [0, None], 'B': [1, 2]})
>>> df
     A  B
0  0.0  1
1  NaN  2
>>> knn.fit(df)
KNNImputer(add_indicator=True)
>>> pd.DataFrame(knn.transform(df), columns=knn.get_feature_names_out())
     A    B  missingindicator_A
0  0.0  1.0                 0.0
1  0.0  2.0                 1.0
>>> df['A'] = 0
>>> pd.DataFrame(knn.transform(df), columns=knn.get_feature_names_out())
```

### Expected Results

```
     A    B  missingindicator_A
0  0.0  1.0                 0.0
1  0.0  2.0                 0.0
```

### Actual Results

```pytb
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
Cell In[30], line 1
----> 1 pd.DataFrame(knn.transform(df), columns=knn.get_feature_names_out())

File /opt/conda/lib/python3.10/site-packages/pandas/core/frame.py:694, in DataFrame.__init__(self, data, index, columns, dtype, copy)
    684         mgr = dict_to_mgr(
    685             # error: Item "ndarray" of "Union[ndarray, Series, Index]" has no
    686             # attribute "name"
   (...)
    691             typ=manager,
    692         )
    693     else:
--> 694         mgr = ndarray_to_mgr(
    695             data,
    696             index,
    697             columns,
    698             dtype=dtype,
    699             copy=copy,
    700             typ=manager,
    701         )
    703 # For data is list-like, or Iterable (will consume into list)
    704 elif is_list_like(data):

File /opt/conda/lib/python3.10/site-packages/pandas/core/internals/construction.py:351, in ndarray_to_mgr(values, index, columns, dtype, copy, typ)
    346 # _prep_ndarray ensures that values.ndim == 2 at this point
    347 index, columns = _get_axes(
    348     values.shape[0], values.shape[1], index=index, columns=columns
    349 )
--> 351 _check_values_indices_shape_match(values, index, columns)
    353 if typ == "array":
    355     if issubclass(values.dtype.type, str):

File /opt/conda/lib/python3.10/site-packages/pandas/core/internals/construction.py:422, in _check_values_indices_shape_match(values, index, columns)
    420 passed = values.shape
    421 implied = (len(index), len(columns))
--> 422 raise ValueError(f"Shape of passed values is {passed}, indices imply {implied}")

ValueError: Shape of passed values is (2, 2), indices imply (2, 3)
```

### Versions

```shell
python3, sklearn = 1.2.1
```


Adding sudo works for `aura -Sy` but not `aura -Ay`

`fuck` is unable to add `sudo` to an `aura -Ay` command:

```
$ aura -Ay foobar-beta-git  # from AUR
aura >>= You have to use `sudo` for that.
$ fuck
No fucks given
```

But works as expected for `aura -Sy`:

```
$ aura -Sy foobar  # pacman alias
error: you cannot perform this operation unless you are root.
aura >>= Please check your input.
$ fuck
sudo aura -Sy foobar [enter/↑/↓/ctrl+c]
```

It's slightly annoying anyway that the `aura` outut is different in these cases, but is it possible for `thefuck` to work-around? Or is the only way for `aura` to give a stderr message containing "root"?


ConvergenceWarnings cannot be turned off

Hi, I'm unable to turn off convergence warnings from `GraphicalLassoCV`.

I've tried most of the solutions from, and none of them worked (see below for actual implementations):
https://stackoverflow.com/questions/879173/how-to-ignore-deprecation-warnings-in-python
https://stackoverflow.com/questions/32612180/eliminating-warnings-from-scikit-learn/33812427#33812427
https://stackoverflow.com/questions/53968004/how-to-silence-all-sklearn-warning
https://stackoverflow.com/questions/14463277/how-to-disable-python-warnings

Contrary to what the designers of the sklearn's exceptions must have thought when it was implemented, some of us actually use stdout to log important information of the host program for diagnostics purposes.  Flooding it with garbage that cannot be turned off, as is in the case with cross-validation, is not ok.

To briefly speak to the severity of the issue, the above sklearn-specific questions relating to suppressing warnings have been viewed ~500K times with combined ~400 upvotes, and dates back 7 years.

I've tried the following (`n_jobs` parameter does not appear to affect the result):

```py
from sklearn.covariance import GraphicalLassoCV
import warnings
warnings.filterwarnings("ignore", category=ConvergenceWarning)

model = GraphicalLassoCV(n_jobs=4)
model = model.fit(data)
```

```py
from sklearn.covariance import GraphicalLassoCV
import warnings
warnings.filterwarnings(action='ignore')

model = GraphicalLassoCV(n_jobs=4)
model = model.fit(data)
```

```py
import warnings
with warnings.catch_warnings():
    warnings.simplefilter("ignore", ConvergenceWarning)

    model = GraphicalLassoCV(n_jobs=4)
    model = model.fit(data)
```

```py
from sklearn.covariance import GraphicalLassoCV
def warn(*args, **kwargs):
    pass
import warnings
warnings.warn = warn

model = GraphicalLassoCV(n_jobs=4)
model = model.fit(data)
```

```py
import contextlib
import os, sys

@contextlib.contextmanager
def suppress_stdout():
    with open(os.devnull, 'w') as fnull:
        old_stdout = sys.stdout
        sys.stdout = fnull
        try:
            yield
        finally:
            sys.stdout = old_stdout

with suppress_stdout():
    model = GraphicalLassoCV(n_jobs=4)
    model = model.fit(data)
```

```py
import logging
logging.captureWarnings(True)

logging.getLogger("py.warnings").setLevel(logging.ERROR)

model = GraphicalLassoCV(n_jobs=4)
model = model.fit(data)
```


Control Loop: long term planning and execution

The biggest, most complicated aspect of Devin is long-term planning and execution. I'd like to start a discussion about how this might work in OpenDevin.

There's some [recent prior work from Microsoft](https://arxiv.org/pdf/2403.08299.pdf) with some impressive results. I'll summarize here, with some commentary.

## Overall Flow
* User specifies objective and associated settings
* Conversation Manager kicks in
* Sends convo to Agent Scheduler
* Agents execute commands
* Output is placed back into the conversation
* Rinse and repeat

## Configuraiton
* A YAML file defines a set of actions/commands the bot can take (e.g. `npm test`)
  * comment: why not just leave it open-ended?
* You can have different agents with different capabilities, e.g. a "dev agent" and a "reviewer agent", who work collaboratively
  * comment: this sounds like MetaGPT

## Components
### Conversation Manager
* maintains message history and command outputs
* decides when to interrupt the conversation
  * comment: for what? more info from the user?
* decides when the conversation is over, i.e. task has been completed
  * agent can send a "stop" command, max tokens can be reached, problems w/ execution environment
### Parser
* interprets agent output and turns it into commands, file edits, etc
* in case of parsing failure, a message is sent back to the agent to rewrite its command
### Output Organizer
* Takes command output and selectively places it into the conversation history
  * sometimes summarizes the content first
  * comment: why not just drop everything back into the conversation history (maybe truncating really long CLI output)
### Agent Scheduler
* orchestrates different agents
* uses different algos for deciding who gets to go next
  * round-robin: everyone takes turns in order
  * token-based: agent gets to keep going until it says it's done
  * priority-based: agents go based on (user defined?) priority
### Tools Library
 * file editing (can edit entire file, or specify start line and end line)
 * retrieval (file contents, `ls`, `grep`). Seems to use vector search as well
 * build and execution: abstracts away the implementation in favor of simple commands like `build foo`
 * testing and validation: includes linters and bug-finding utils
 * git: can commit, push, merge
 * communication: can as human for input/feedback, can talk to other agents
### Evaluation Environment
* runs in Docker


Sandbox Capabilities Framework

**Summary**
We have an existing use case for a Jupyter-aware agent, which always runs in a sandbox where Jupyter is available. There are some other scenarios I can think of where an agent might want some guarantees about what it can do with the sandbox:
* We might want a "postgres migration writer", which needs access to a postgres instance
* We might have a "cypress test creator" agent, which would need access to cypress
* Further down the road, we might want to have an [Open Interpreter](https://github.com/OpenInterpreter/open-interpreter) agent, which needs access to osascript
* etc etc

This proposal would allow agents to guarantee that certain programs are available in the sandbox, or that certain services are running in a predictable way.

What if we did something like this:

**Motivation**
We want agents to be able to have certain guarantees about the sandbox environment. But we also want our sandbox interface to be generic--something like "you have a bash terminal".

The latter is especially important, because we want users to be able to bring their own sandbox images. E.g. you might use an off-the-shelf haskell image if your project uses haskell--otherwise you'd need to go through the install process every time you start OpenDevin, or maintain a fork of the sandbox.

**Technical Design**
* For every requirement we support (e.g. jupyter, postgres, cypress), we have a bash script that
  * checks if it's installed
  * if not, installs it
  * maybe starts something in the background
* Let agents specify a list of requirements
  * e.g. CodeActAgent could say requirements: ['jupyter']
* When we start the Agent+Sandbox pair, we run the necessary bash scripts
  * should be pretty quick if the requirement is already built into the image
* Then the agent has some guarantees about the requirement being met, and how it's running
   * e.g. we can put in the prompt "there's a postgres server running on port 5432, user foo, password bar"
* If there are specific ways of interacting with that env (e.g. for jupyter, it seems we have to write to a websocket that's open in the sandbox?) the agent can implement custom Actions, like run_in_jupyter

**Alternatives to Consider**
* Building a bunch of stuff into one big sandbox
* Building special sandboxes that are required by certain agents (e.g. a JupyterSandbox)

**Additional context**
https://opendevin.slack.com/archives/C06QKSD9UBA/p1713552591042089


Very slow extraction with scripts vs fakeapp 1.1

1080ti + OC'd 2600k using winpython 3.6.2 cuda 9.0 and tensorflow 1.6

**Training** utilizes ~50% of the GPU now (which is better than the ~25% utilized with FA 1.1) but extraction doesn't seem to utilize the GPU at all (getting around 1.33it/s) wheras with FA 1.1 I get around 17it/s - tried CNN and it dropped down to taking nearly a minute per file. Although I say it doesn't utilize the GPU it still seems to use all 11GB of RAM on the GPU, just none of the compute cores or processor are in use. CPU is using about 17%.

Tried using extracted data from FA 1.1 with .py -convert but it just says 'no alignment found for file: x" for every file even tho --alignments points to the path with alignments.json

I would've thought the alignments.json from FA 1.1 was compatible so I'm not sure if the above is a separate issue or not.


Support PEP 593 `Annotated` for specifying dependencies and parameters

### First check

* [x] I added a very descriptive title to this issue.
* [x] I used the GitHub search to find a similar issue and didn't find it.
* [x] I searched the FastAPI documentation, with the integrated search.
* [x] I already searched in Google "How to X in FastAPI" and didn't find any information.
* [x] I already read and followed all the tutorial in the docs and didn't find an answer.
* [x] I already checked if it is not related to FastAPI but to [Pydantic](https://github.com/samuelcolvin/pydantic).
* [x] I already checked if it is not related to FastAPI but to [Swagger UI](https://github.com/swagger-api/swagger-ui).
* [x] I already checked if it is not related to FastAPI but to [ReDoc](https://github.com/Redocly/redoc).
* [x] After submitting this, I commit to:
    * Read open issues with questions until I find 2 issues where I can help someone and add a comment to help there.
    * Or, I already hit the "watch" button in this repository to receive notifications and I commit to help at least 2 people that ask questions in the future.
    * Implement a Pull Request for a confirmed bug.

### Example

I propse to allow transforming:
<!-- Replace the code below with your own self-contained, minimal, reproducible, example -->

```Python
from typing import Optional

from fastapi import Depends, FastAPI

app = FastAPI()

async def common_parameters(q: Optional[str] = None, skip: int = 0, limit: int = 100):
    return {"q": q, "skip": skip, "limit": limit}

@app.get("/items/")
async def read_items(commons: dict = Depends(common_parameters)):
    return commons
```
to
```Python
from typing import Annotated, Optional

from fastapi import Depends, FastAPI

app = FastAPI()

async def common_parameters(q: Optional[str] = None, skip: int = 0, limit: int = 100):
    return {"q": q, "skip": skip, "limit": limit}

@app.get("/items/")
async def read_items(commons: Annotated[dict, Depends(common_parameters)]):
    return commons
```

### Discussion
[PEP 593](https://www.python.org/dev/peps/pep-0593/) Added `Annotated` for adding additional annotations beyond type annotations. I think FastAPI's `Depends`, `Query`, `Body` and the likes fit well with the kind of additional annotations this supports.

This would also make default values less awkward:
```python
@app.get("/items/")
async def read_items(q: Optional[str] = Query(None, max_length=50)):
    pass
```
Could become
```python
@app.get("/items/")
async def read_items(q: Annotated[Optional[str], Query(max_length=50)] = None):
    pass
```

This will also solve the issue mentioned [in the docs](https://fastapi.tiangolo.com/tutorial/path-params-numeric-validations/#order-the-parameters-as-you-need) of parameter ordering.

Finally, it is sometimes convenient to use the same function as both a FastAPI dependency and a regular function. In these cases, because `= Depends(...)` is a default parameter value, if you forget to pass a parameter the error is not caught by your IDE. Worse, it is not caught at runtime because Python will just pass along the `Depends` object. This will probably cause an error down the road, but may silently succeed in some cases.

I'm willing to implement this if you think it's a good idea.


Many references to unsupported Python versions in the stdlib docs

**Documentation**

There are currently many places in the stdlib docs where there are needless comments about how to maintain compatibility with Python versions that are now end-of-life. Many of these can now be removed, to improve brevity and clarity in the documentation.

I plan to submit a number of PRs to fix these.

PRs:

- #92418
- #92419
- #92420
- #92421
- #92422
- #92423
- #92424
- #92425
- https://github.com/python/cpython/pull/92502
- #92538
- #92539
- #92543
- #92544
- [More to come]

Backports:
- https://github.com/python/cpython/pull/92459
- https://github.com/python/cpython/pull/92460
- https://github.com/python/cpython/pull/92461
- https://github.com/python/cpython/pull/92462
- https://github.com/python/cpython/pull/92463
- https://github.com/python/cpython/pull/92491
- https://github.com/python/cpython/pull/92467
- https://github.com/python/cpython/pull/92468
- https://github.com/python/cpython/pull/92492
- https://github.com/python/cpython/pull/92464
- https://github.com/python/cpython/pull/92465
- https://github.com/python/cpython/pull/92466
- https://github.com/python/cpython/pull/92472
- https://github.com/python/cpython/pull/92473
- https://github.com/python/cpython/pull/92474
- https://github.com/python/cpython/pull/92485
- https://github.com/python/cpython/pull/92486
- https://github.com/python/cpython/pull/92487
- https://github.com/python/cpython/pull/92606
- https://github.com/python/cpython/pull/92607


Birch should be called BIRCH

C.f. the original paper.
Zhang, T.; Ramakrishnan, R.; Livny, M. (1996). "BIRCH: an efficient data clustering method for very large databases". Proceedings of the 1996 ACM SIGMOD international conference on Management of data - SIGMOD '96. pp. 103–114. doi:10.1145/233269.233324


Dynamodbstreams Use Kinesis Shard Identifiers

<!-- Love localstack? Please consider supporting our collective:
👉  https://opencollective.com/localstack/donate -->

Dynamodbstreams seem to be making use of Kinesis shard identifiers which are considered invalid by botocore request validators.

Error response from boto3 when attempting to `get_shard_iterator` from shard ids returned from `describe_stream`:

```
[test-integration:L51:27s] exception = ParamValidationError(u'Parameter validation failed:\nInvalid length for parameter ShardId, value: 20, valid range: 28-inf',)
[test-integration:L52:27s]
[test-integration:L53:27s]     def _reraise_exception(self, exception):
[test-integration:L54:27s]         if hasattr(exception, 'response'):
[test-integration:L55:27s]             code = exception.response['Error']['Code']
[test-integration:L56:27s]
[test-integration:L57:27s]             if code == 'TrimmedDataAccessException':
[test-integration:L58:27s]                 raise TrimmedRecordsException()
[test-integration:L59:27s]             elif code == 'ResourceNotFoundException':
[test-integration:L60:27s]                 raise ResourceDNEException()
[test-integration:L61:27s]
[test-integration:L62:27s] >       raise exception
[test-integration:L63:27s] E       ParamValidationError: Parameter validation failed:
[test-integration:L64:27s] E       Invalid length for parameter ShardId, value: 20, valid range: 28-inf
[test-integration:L65:27s]
[test-integration:L66:27s] .tox/py27/lib/python2.7/site-packages/pyrokinesis/dynamodbstreams_ingress_backend.py:111: ParamValidationError
```

The following is the response object I am getting back when I `describe_stream` on the stream's ARN:

```
[test-integration:L68:27s] {'ResponseMetadata': {'HTTPStatusCode': 200, 'RetryAttempts': 0, 'HTTPHeaders': {'content-length': '692', 'access-control-allow-origin': '*', 'date': 'Fri, 13 Oct 2017 12:47:00 GMT', 'server': 'Werkzeug/0.12.2 Python/2.7.13', 'content-type': 'application/json'}}, u'StreamDescription': {u'StreamLabel': u'TODO', u'StreamArn': u'arn:aws:dynamodb:us-east-1:000000000000:table/DynamoTest/stream/2017-10-13T12:47:00', u'Shards': [{u'ShardId': u'shardId-000000000000', u'SequenceNumberRange': {u'StartingSequenceNumber': u'49577893583130519883135457518096755974321873497073123330'}}], u'KeySchema': [{u'KeyType': u'HASH', u'AttributeName': u'ID'}], u'TableName': u'DynamoTest', u'StreamStatus': u'ENABLED'}}
```

My localstack setup:

```
localstack 0.7.3

[localstack:L2:1s] 2017-10-13 15:10:35,915 INFO spawned: 'dashboard' with pid 13
[localstack:L3:1s] 2017-10-13 15:10:35,917 INFO spawned: 'infra' with pid 14
[localstack:L4:1s] (. .venv/bin/activate; bin/localstack web --port=8080)
[localstack:L5:1s] (. .venv/bin/activate; exec bin/localstack start)
[localstack:L6:1s] Starting local dev environment. CTRL-C to quit.
[localstack:L7:1s]  * Running on http://0.0.0.0:8080/ (Press CTRL+C to quit)
[localstack:L8:1s]  * Restarting with stat
[localstack:L9:1s] Starting mock Kinesis (http port 4568)...
[localstack:L10:1s] Starting mock S3 (http port 4572)...
[localstack:L11:1s] Starting mock DynamoDB (http port 4569)...
[localstack:L12:1s]  * Debugger is active!
[localstack:L13:2s]  * Debugger PIN: 281-540-735
[localstack:L14:2s] 2017-10-13 15:10:37,123 INFO success: dashboard entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
[localstack:L15:2s] 2017-10-13 15:10:37,123 INFO success: infra entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
[localstack:L16:2s] Starting mock DynamoDB Streams service (http port 4570)...
[localstack:L17:2s] Listening at http://:::4565
[localstack:L18:2s] Initializing DynamoDB Local with the following configuration:
[localstack:L19:2s] Port:	4564
[localstack:L20:2s] InMemory:	false
[localstack:L21:2s] DbPath:	/tmp/localstack/dynamodb
[localstack:L22:2s] SharedDb:	true
[localstack:L23:2s] shouldDelayTransientStatuses:	false
[localstack:L24:2s] CorsParams:	*
[localstack:L25:2s]
[localstack:L26:2s] * Running on http://0.0.0.0:4563/ (Press CTRL+C to quit)
```


Misspelling in docs @ flask.Flask.handle_exception

`Default exception handling that kicks in when an exception occours that is not caught. In debug mode the exception will be re-raised immediately, otherwise it is logged and the handler for a 500 internal server error is used. If no such handler exists, a default 500 internal server error message is displayed.`

Occours should be occurs.

I looked around in the project code to see if i could update this, but it looks like the docs subdir is no longer used? I could be wrong, if you let me know where this is at I'll update it and send a PR :)

不太确定问题类别，因为是开发者询问typo error


cloud
aws
module
affects_2.4
support:certified
docs

Documentation Error for ec2_vpc_nacl rules

##### ISSUE TYPE
 - Documentation Report

##### COMPONENT NAME
ec2_vpc_nacl

##### ANSIBLE VERSION
```
ansible 2.4.3.0
  config file = None
  configured module search path = [u'/home/ubuntu/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/lib/python2.7/dist-packages/ansible
  executable location = /usr/local/bin/ansible
  python version = 2.7.12 (default, Dec  4 2017, 14:50:18) [GCC 5.4.0 20160609]
```

##### CONFIGURATION

##### OS / ENVIRONMENT
N/A

##### SUMMARY
The example documentation is the wrong way round for ec2_vpc_nacl with respect to the icmp code and type.

##### STEPS TO REPRODUCE
https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/cloud/amazon/ec2_vpc_nacl.py#L87 has the order of the `icmp_code` and `icmp_type` inverted compared to the code that parses it https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/cloud/amazon/ec2_vpc_nacl.py#L298

##### EXPECTED RESULTS

##### ACTUAL RESULTS


New provider: Amazon Bedrock (AWS)

**Feature description**
Please include support for Amazon Bedrock models. These models can be from Amazon, Anthropic, AI21, Cohere, Mistral, or Meta Llama 2.

**Your Feature**
1. Create a new LLM Provides under [metagpt/provider](https://github.com/geekan/MetaGPT/tree/db65554c4931d4a95e20331b770cf4f7e5202264/metagpt/provider) for Amazon Bedrock
2. Include it in the [LLMType](https://github.com/geekan/MetaGPT/blob/db65554c4931d4a95e20331b770cf4f7e5202264/metagpt/configs/llm_config.py#L17) available


Enhancement
Groupby
ExtensionArray
NA - MaskedArrays
Closing Candidate

ENH: improve the resulting dtype for groupby operations on nullable dtypes

Follow-up on https://github.com/pandas-dev/pandas/pull/37433, and partly related to https://github.com/pandas-dev/pandas/issues/37493

Currently, after groupby operations we try to cast back to the original dtype when possible (at least in case of extension arrays). But this is not always correct, and also not done consistently. Some examples using the test case from the mentioned PR using a nullable Int64 column as input:

```
In [1]: df = DataFrame(
   ...:     {
   ...:         "A": ["A", "B"] * 5,
   ...:         "B": pd.array([1, 2, 3, 4, 5, 6, 7, 8, 9, pd.NA], dtype="Int64"),
   ...:     }
   ...: )

In [2]: df.groupby("A")["B"].sum()
Out[2]:
A
A    25
B    20
Name: B, dtype: Int64

In [3]: df.groupby("A")["B"].std()
Out[3]:
A
A    3.162278
B    2.581989
Name: B, dtype: float64

In [4]: df.groupby("A")["B"].mean()
Out[4]:
A
A    5
B    5
Name: B, dtype: Int64

In [5]: df.groupby("A")["B"].count()
Out[5]:
A
A    5
B    4
Name: B, dtype: int64
```

So some observations:

* For `sum()`, we correctly have Int64 for the result
* For `std()`, we could use the nullable Float64 instead of float64 dtype
* For `mean()`, we incorrectly cast back to Int64 dtype, as the result of mean should always be floating (in this case the casting just happened to work because the means were rounded numbers)
* For `count()`, we did not create a nullable Int64 dtype for the result, while this could be done in the input is nullable


BUG: MLE for PCA mis-estimates rank

After #16224 it looks like this code no longer produces the correct result:
```
import numpy as np
from sklearn.decomposition import PCA
n_samples, n_dim = 1000, 10
X = np.random.RandomState(0).randn(n_samples, n_dim)
X[:, -1] = np.mean(X[:, :-1], axis=-1)  # true X dim is ndim - 1
pca_skl = PCA('mle', svd_solver='full')
pca_skl.fit(X)
assert pca_skl.n_components_ == n_dim - 1
```
Before #16224 this passed (`n_components_ == 9`) but after #16224 it gives 8. Not sure why this would happen given the singular value spectrum looks good:
```
import matplotlib.pyplot as plt
s = np.linalg.svdvals(X)
plt.stem(s)
```
![Figure_1](https://user-images.githubusercontent.com/2365790/77180767-c4f62a00-6aa0-11ea-8dc8-99c6dc137a71.png)

Maybe an off-by-one error somewhere?

cc'ing @lschwetlick since it was your PR