mteb/LocBenchRR huggingface dataset:
RLOO Trainer Stopping After 1 Epoch
### System Info

- Platform: Linux-3.10.0-693.11.6.el7.x86_64-x86_64-with-glibc2.17
- Python version: 3.9.5
- PyTorch version: 2.4.0
- CUDA device(s): not available
- Transformers version: 4.46.2
- Accelerate version: 1.1.1
- Accelerate config: not found
- Datasets version: 3.1.0
- HF Hub version: 0.26.2
- TRL version: 0.13.0.dev0
- bitsandbytes version: not installed
- DeepSpeed version: 0.15.4
- Diffusers version: not installed
- Liger-Kernel version: not installed
- LLM-Blender version: not installed
- OpenAI version: 1.54.4
- PEFT version: not installed

### Information

- [X] The official example scripts
- [ ] My own modified scripts

### Tasks

- [X] An officially supported task in the `examples` folder
- [ ] My own task or dataset (give details below)

### Reproduction

While reproducing RLOO using a multi-GPU setup with official [script](https://huggingface.co/docs/trl/en/rloo_trainer#benchmark-experiments), training consistently halts midway, regardless of whether it's set for 1,000 or 1 million episodes. An example wandb [run](https://wandb.ai/omerveyselcagatan/huggingface/runs/zdftqdx5?nw=nwuseromerveyselcagatan) that ended with 1954 steps, whereas it should  3908. 

### Expected behavior

Should have run for 3908, or possible step miscalculation.

### Checklist

- [X] I have checked that my issue isn't already filed (see [open issues](https://github.com/huggingface/trl/issues?q=is%3Aissue))
- [X] I have included my system information
- [X] Any code provided is minimal, complete, and reproducible ([more on MREs](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/creating-and-highlighting-code-blocks))
- [X] Any code provided is properly formatted in code blocks, (no screenshot, [more on code blocks](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/creating-and-highlighting-code-blocks))
- [X] Any traceback provided is complete
Format time to show year only in choropleth time slider
There may already be a way to do this, but I was not able to stumble on it...

I would like to be able to control the data format in the slider bar in a time slider choropleth.  In my case (and I believe many others), I am describing annual trends and all that is required in the slider is the year.

I am requesting:
1) Ability to set the time format displayed in the choropleth time slider itself by passing a date format. or setting a "show year only" variable, or if this is already present,
2) Enhanced documentation describing how this can be modified.
AWS MuteList broken
### Steps to Reproduce

**What command are you running:**

```bash
prowler aws -M json-ocsf -f us-west-2 -w mutelist.yaml --ignore-exit-code-3
```

**Cloud provider you are launching:** AWS

**Environment you have:**

* Single account
* Prowler open source
* Issues with:
  * Prowler installed via Pip
  * Prowler Container
* Prowler Version: 4.5.0 or 4.6.0

**Error:**

```
Something went wrong in accessanalyzer_enabled, please use --log-level ERROR

2024-11-06 20:26:48,299 [File: check.py:617] 	[Module: check]	 ERROR: accessanalyzer_enabled -- AttributeError[33]: 'str' object has no attribute 'get'
Something went wrong in appstream_fleet_maximum_session_duration, please use --log-level ERROR

2024-11-06 20:26:49,877 [File: check.py:617] 	[Module: check]	 ERROR: appstream_fleet_maximum_session_duration -- AttributeError[12]: 'str' object has no attribute 'get'
Something went wrong in appstream_fleet_session_disconnect_timeout, please use --log-level ERROR

2024-11-06 20:26:49,880 [File: check.py:617] 	[Module: check]	 ERROR: appstream_fleet_session_disconnect_timeout -- AttributeError[12]: 'str' object has no attribute 'get'
Something went wrong in appstream_fleet_session_idle_disconnect_timeout, please use --log-level ERROR

2024-11-06 20:26:49,884 [File: check.py:617] 	[Module: check]	 ERROR: appstream_fleet_session_idle_disconnect_timeout -- AttributeError[12]: 'str' object has no attribute 'get'
Something went wrong in autoscaling_find_secrets_ec2_launch_configuration, please use --log-level ERROR

2024-11-06 20:26:50,400 [File: check.py:617] 	[Module: check]	 ERROR: autoscaling_find_secrets_ec2_launch_configuration -- AttributeError[16]: 'str' object has no attribute 'get'
Something went wrong in awslambda_function_no_secrets_in_code, please use --log-level ERROR

2024-11-06 20:26:51,828 [File: check.py:617] 	[Module: check]	 ERROR: awslambda_function_no_secrets_in_code -- AttributeError[13]: 'str' object has no attribute 'get'
Something went wrong in awslambda_function_no_secrets_in_variables, please use --log-level ERROR

2024-11-06 20:26:51,832 [File: check.py:617] 	[Module: check]	 ERROR: awslambda_function_no_secrets_in_variables -- AttributeError[11]: 'str' object has no attribute 'get'
```
More errors follow...

### Expected behavior

Prowler will scan the AWS account and mute findings in the mutelist

### Actual Result with Screenshots or Logs

Prowler scans, but the above errors are displayed and no findings are muted.

### How did you install Prowler?

From pip package (pip install prowler)

### Environment Resource

EKS
Local

### OS used

EKS: `toniblyx/prowler:latest` Docker image
Local: macOS 14.7 Python 3.11

### Prowler version

Prowler 4.6.0

### Pip version

24.0

### Context

_No response_
Add a warning for mismatched inputs structure in `Functional`
There are several issues related to mismatched inputs structure:
- #20166
- #20136
- #20086
and more...

As a result, it would be beneficial to add a warning for users.
Ultimately, we might want to raise an error when a mismatch occurs. Otherwise, it could lead to subtle issues if the inputs have the same shape and dtype, as the computation could be incorrect even though the code runs.
Binary operations in Modin is slower than in pandas in case operands are Modin structures 
<details><summary>Benchmark code</summary>

```python
import time

import numpy as np
import modin.pandas as pd
# import pandas as pd
import modin.config as cfg

cfg.BenchmarkMode.put(True)
# cfg.NPartitions.put(1)

def generate_data(path, nrows=5000, n_random_cols=100):
    labels = ["red", "blue", "black"]
    data = {
        "Int": np.random.randint(0, 100, nrows),
        "Float": np.random.rand(nrows),
        "Color": [labels[np.random.randint(0, len(labels), 1)[0]] for _ in range(nrows)],
    }
    data_random = {f"col{i}":  np.random.rand(nrows) for i in range(n_random_cols)}
    data.update(data_random)
    df = pd.DataFrame(data)

    df.to_csv(path, index=False)

if __name__ == "__main__":
    path = "data.csv"

    # generate_data(path, nrows=5000000, n_random_cols=100)

    print("Reading data...")
    df = pd.read_csv(path)

    # df = df._to_pandas()
    print(f"Original shape: {df.shape}")

    print("Filters...")

    t1 = time.time()
    filter_series1 = (df.Int < 50)
    print(f'Time binary op #1 (scalar): {time.time() - t1} s')

    t2 = time.time()
    filter_series2 = (df.Color == "red")
    print(f'Time binary op #2 (scalar): {time.time() - t2} s')

    t3 = time.time()
    filter_series3 = (df.Color != "blue")
    print(f'Time binary op #3 (scalar): {time.time() - t3} s')

    t4 = time.time()
    filter_series4 = (df.Float < 0.5)
    print(f'Time binary op #4 (scalar): {time.time() - t4} s')

    t5 = time.time()
    filter_series = filter_series1 & filter_series2 & filter_series3 & filter_series4
    print(f'Time binary op #5 (query compilers): {time.time() - t5} s')

    t6 = time.time()
    df = df[filter_series] # Default to pandas in case indexer is query_compiler
    print(f'Time getting by mask: {time.time() - t6} s')

    print(f"Result shape: {df.shape}")
    print(f'Time filters: {time.time() - t1} s')

```

</details>

Table below shows number from binary operation №5 (from the code above) (`&` operation between Modin Series).
| Shape | (10m, 103) | (10m, 4) | (5m, 103) |
| ----------- | ----------- | ----------- | ----------- |
| modin      | 4.996 | 5.33 | 4.98 |
| modin (NPartitions==1)| 0.184| 0.17| 0.11 |
| pandas | 0.025 | 0.024 | 0.008 |

Decreasing of number of partitions improves Modin's time. Possible, there is some gaps in parallelization.
[core][adag] Support reading the same node from another DAG node and the driver
### What happened + What you expected to happen

Currently a DAG node can only be read by other DAG nodes or by the driver. We should support allowing it to be read by both. This should already work since the driver is represented by a proxy actor, so there might just be too strong of an assertion check right now.

### Versions / Dependencies

3.0dev

### Reproduction script

```python
with InputNode() as inp:
  x = a.foo.bind(inp)
  y = b.foo.bind(x)
  dag = MultiOutputNode([x, y])

dag = dag.experimental_compile()
```

### Issue Severity

None
Inconsistent naming conventions and lack of type hinting in existing code, needs improvement for better scalability
The existing code has inconsistent naming conventions and lacks proper type hinting, leading to decreased readability and maintainability. Additionally, the model architecture and dataset preparation can be improved for better scalability and modification.
Duplicate key value violates unique constraint with recursive chunking
When use `RecursiveChunking` with large files, some errors happen:

```
ERROR    Error with batch starting at index 0: (psycopg.errors.UniqueViolation) duplicate key value violates unique constraint "recipes_agentic_recursive_chunking_pkey"
         DETAIL:  Key (id)=(relativity_1) already exists.
```
Elide ordering of prefetch querysets for single valued relationships
Description
		
(last modified by Laurent Lyaudet)		
While the ordering of multi-valued relationships must be preserved when prefetching relationships is it unnecessary when using prefetch_related against single valued relationships.
For example, given the following models
class Author(models.Model):
	name = models.CharField(max_length=200)
	class Meta:
		ordering = ["name"]
class Book(models.Model):
	title = models.CharField(max_length=200)
	author = models.ForeignKey(Author, related_name="books", on_delete=models.CASCADE)
	class Meta:
		ordering = ["title"]
The ordering of an author's books in Author.objects.prefetch_related("books") has a significance as multiple books might be associated with each authors.
It's not the case for a book's author in Book.objects.prefetch_related("author") through as the relationship can only contain a single author and there is a single way to order the members of a singleton.
In other words sorted([element], key=sort_func) will result in [element] for any sort_func.
This property holds true for all the single valued relationships that the ORM supports (backward and forward 1:1 and forward 1:M) which allows the prefetching to elide any predefined ordering safely to avoid an unnecessary and possibly expensive ordering defined for the related model queryset.
Currently the prefetch of authors will use the order by and add useless load on the DB server.
It would be useful to remove this order by.
#ClimateChangeBrake
DOC: Dataframe.from_records should not say that passing in a DataFrame for data is allowed
### Pandas version checks

- [X] I have checked that the issue still exists on the latest versions of the docs on `main` [here](https://pandas.pydata.org/docs/dev/)


### Location of the documentation

https://pandas.pydata.org/docs/dev/reference/api/pandas.DataFrame.from_records.html#pandas.DataFrame.from_records

### Documentation problem

The first text in the docstring says (emphasis at the end is mine)

> Convert structured or record ndarray to DataFrame.
>
> Creates a DataFrame object from a structured ndarray, sequence of
> tuples or dicts, or **DataFrame**.

However, starting in 2.1.0, passing in a DataFrame has been deprecated. In 2.1.0 it would raise a FutureWarning; in main it will raise a TyperError.

The documentation between 2.1.0 and main appear to have been updated to remove text in the Parameters section of the docstring that still said a DataFrame could be passed in for data, but the text in the initial section of the docstring was not.

### Suggested fix for documentation

Change the initial docstring text to be:

> Convert structured or record ndarray to DataFrame.
>
> Creates a DataFrame object from a structured ndarray or sequence of
> tuples or dicts.
XSS issues on books page
<!-- What problem are we solving? What does the experience look like today? What are the symptoms? -->
XSS issues

### Evidence / Screenshot (if possible)

### Relevant url?

https://openlibrary.org/books/OL27912983M/'_script_alert(_Ultra_Security_)_script
https://twitter.com/BugsBun75181771/status/1228314510563385346

### Details

- **Logged in (Y/N)?** 
- **Browser type/version?** 
- **Operating system?** 
- **Environment (prod/dev/local)?** prod
<!-- If not sure, put prod -->

### Proposal & Constraints
<!-- What is the proposed solution / implementation? Is there a precedent of this approach succeeding elsewhere? -->

### Related files
<!-- Files related to this issue; this is super useful for new contributors who might want to help! If you're not sure, leave this blank; a maintainer will add them. -->

### Stakeholders
<!-- @ tag stakeholders of this bug -->
[BUG] Unable to use _StatsModelsAdapter.predict if config remember_data=False
**Describe the bug**
If the config `remember_data=False` is set then `_StatsModelsAdapter._predict` will throw an error when trying to use `_y` and `_X`.


**To Reproduce**


```python
import numpy as np
from sktime.forecasting.sarimax import SARIMAX

forecaster = SARIMAX()
forecaster.set_config(remember_data=False)

y = np.ones(10)
forecaster.fit(y)
forecaster.predict(fh=11)
```

**Expected behavior**
`_StatsModelsAdapter` forecasters should be able to `predict` with config `remember_data=False`.

Related to #6914
Add calibration curve to plotting module
I think it would be nice to have something like

```python
def plot_calibration_curve(y_true, prob_y_pred, n_bins=5, ax=None):
    prop_true, prop_pred = calibration_curve(y_true, prob_y_pred, n_bins=n_bins)
    if ax is None:
        ax = plt.gca()
    ax.plot([0, 1], [0, 1], ':', c='k')
    ax.plot(prop_pred, prop_true)

    ax.set_xlabel("predicted probability")
    ax.set_ylabel("fraction of positive samples")
    ax.set_aspect("equal")
```

I got confused for a bit because the order of the return arguments is not the order of the arguments to plot. I think a plot function even just labeling the axes right would decrease mental effort (yes, I'm lazy).
Cache Options.verbose_name_raw
Description
		
(last modified by Adam Johnson)		
Another candidate for caching, like #35230, following the same system check profiling.
The Model._meta.verbose_name_raw property returns the stringified version of the verbose_name attribute whilst temporarily disabling translations. It is only used in django.contrib.auth for creating permission names.
I found this property was taking ~15% of the total runtime for system checks on a project with 118 models. calls. Turning it into a cached_property and adding a no-translation fast path saves nearly all this cost, with the below results.
Before: 520 calls taking 10ms
After: 105 calls taking ~0ms
Include filename in visible GHA output
### Search before asking

- [X] I searched the [issues](https://github.com/sqlfluff/sqlfluff/issues) and found no similar issues.


### Description

When using `github-annotation-native` format, the raw output contains the filename
```
::warning title=SQLFluff,file=migrations/manual/20240912220714_foo.sql,line=2,col=1,endLine=2,endColumn=3::LT02: Line should not be indented. [layout.indent]
```
and the actual annotations work properly, however the output visible in the GH console doesn't show the filename, which makes it a little tricky from the console output. It might be a little redundant, but maybe the messagee should be prefixed with the filename (or else put the filename on top of each section the way we do in other output formats, if that won't confuse GH)

<img width="991" alt="image" src="https://github.com/user-attachments/assets/fd327745-c835-4c7e-85e8-943106c0e308">

### Use case

_No response_

### Dialect

postgres

### Are you willing to work on and submit a PR to address the issue?

- [X] Yes I am willing to submit a PR!

### Code of Conduct

- [X] I agree to follow this project's [Code of Conduct](https://github.com/sqlfluff/sqlfluff/blob/main/CODE_OF_CONDUCT.md)
Feed API slow
Querying the API, e.g. `/api/feeds/all/all/recent.json`, takes a while. Requesting the feed on my GreedyBear instancees with `curl -so /dev/null -w '%{time_total}\n' http://HOSTNAME/api/feeds/all/all/recent.json` takes about 6 seconds. This also produces significant CPU load on the server. However the Honeynet instance seems to be much quicker. Is it just an issue of my installations?
Plants seeds can die before growing
A plant seed can die before evolving to a growing plant. This behavior will be decided randomly during the seed phase of the plant. A threshold will be established to decide if the seed evolves or not. The seed will be able to evolve at the end of its seed phase, where it will be decided randomly.
A seed that succesfully evolves will go to growing phase. A seed that dies, will evolve directly to ground (last plant status).
Plants seeds can die before growing
A plant seed can die before evolving to a growing plant. This behavior will be decided randomly during the seed phase of the plant. A threshold will be established to decide if the seed evolves or not. The seed will be able to evolve at the end of its seed phase, where it will be decided randomly.
A seed that succesfully evolves will go to growing phase. A seed that dies, will evolve directly to ground (last plant status).
Improve `RuntimeError: Max post-process passes exceeded.` error
Description
		
(last modified by Michael)		
Having just spend 3 hours trying to debug a collect static issue, to help future travellers, I recommend printing the files that caused max depth to be exceeded, often when a file references itself it causes recursion, but the only clue it currently prints is 'All' which does not narrow down the problem. We can surely do better than that! The proposed change prints the problem files only that keep chaning and can't be resolved:
So instead of getting:
Post-processing 'All' failed!
We get the new and improved:
Post-processing 'jsapp/jsapp/notify.min.js' failed!
Or if more than one file:
Post-processing 'jsapp/jsapp/notify.min.js, jsapp/jsapp/somethingelse.min.js' failed!
I recommend changing from:
# contrib/staticfiles/storage.py line 313: in def post_process(self, paths, dry_run=False, **options):
		unresolved_paths = []
		for i in range(self.max_post_process_passes):
			substitutions = False
			for name, hashed_name, processed, subst in self._post_process(
				paths, adjustable_paths, hashed_files
			):
				# Overwrite since hashed_name may be newer.
				processed_adjustable_paths[name] = (name, hashed_name, processed)
				if subst and i == self.max_post_process_passes - 1:
					unresolved_paths.append(name)
				substitutions = substitutions or subst
			if not substitutions:
				break
		if substitutions:
			problem_paths_str = ", ".join(unresolved_paths) if unresolved_paths else "All"
			yield problem_paths_str, None, RuntimeError("Max post-process passes exceeded.")
I recommend changing to (see the comments on the right of the proposed changed lines 1/5 to 5/5):
# contrib/staticfiles/storage.py line 313: in def post_process(self, paths, dry_run=False, **options):
		unresolved_paths = []											# < -- add this line 1/5
		for i in range(self.max_post_process_passes):
			substitutions = False
			for name, hashed_name, processed, subst in self._post_process(
				paths, adjustable_paths, hashed_files
			):
				# Overwrite since hashed_name may be newer.
				processed_adjustable_paths[name] = (name, hashed_name, processed)
				if subst and i == self.max_post_process_passes - 1:	 # < -- add this line 2/5
					unresolved_paths.append(name)						# < -- add this line 3/5
				substitutions = substitutions or subst
			if not substitutions:
				break
		if substitutions:
			problem_paths_str = ", ".join(unresolved_paths) if unresolved_paths else "All"	 # < -- add this line 4/5
			yield problem_paths_str, None, RuntimeError("Max post-process passes exceeded.") # < -- change this line 5/5
Breaking change for module loading in PyLate
Hello,

Since the version 3.1, the module are loaded with [get_class_from_dynamic_module](https://github.com/UKPLab/sentence-transformers/commit/6257cb00ef87ddc8f445f0e436377ea4c48879b2#diff-b85567d4fdaffe34a3ccd8fe6cd1fcb15a986ebd34af373c71f1f5cf5efff021R1466) when using ```trust_remote_code=True```
However, this function [breaks if the type of the modules contains more than one dot](https://github.com/huggingface/transformers/blob/31299670cda29f25fbc655f6f166e7b8cc21c89f/src/transformers/dynamic_module_utils.py#L536)
The Dense module from PyLate is saved with the type pylate.models.Dense.Dense, [due to this line](https://github.com/UKPLab/sentence-transformers/blob/ba8cb2ef1d7a5ad6b9169eddee469e900456532c/sentence_transformers/SentenceTransformer.py#L1189).

Before 3.1, the type of the module was pylate.models.Dense, but this still break when parsing on the dot. As the PyLate module still loads correctly with the ```import_from_string``` function (that was used to load the modules prior to 3.1), one of the solution is to broaden a bit the exception to prevent crash if the file is not there locally AND also if the parsing fail (```ValueError: too many values to unpack (expected 2)```)
The other possibility is to add ```class_ref.startswith("pylate.")``` to [this test](https://github.com/UKPLab/sentence-transformers/blob/ba8cb2ef1d7a5ad6b9169eddee469e900456532c/sentence_transformers/SentenceTransformer.py#L1550). It is a bit hardcoded but prevents not catching an exception earlier if there is some other ValueError

Let me know what solution you prefer and I can create a PR for this
MSAL can consider using lazy import for `request`, `jwt`
**Describe the bug**

Importing MSAL is can cost ~300ms on Windows due to some heavy libraries like `request` and `jwt`: 

```
python -X importtime -c "import msal"  2>perf.log; tuna .\perf.log
```

![image](https://user-images.githubusercontent.com/4003950/137872368-a85b9753-f46b-4ffe-acdd-323815486c1b.png)

MSAL can consider using lazy import for these libraries so that importing MSAL can be lightweight. (Azure CLI lazily imports MSAL: https://github.com/Azure/azure-cli/pull/19898)
Issue warning when `mutation_rate` is high and `mutate` potentially takes long
#157 made sure that exactly the correct number of mutations occurs in a genome by checking that the mutated genome differs from the original one in `n_mutations` position. when using a high mutation rate and small number of primitives, this can lead to a long runtime for `mutate` as it struggles to find positions in the genome to mutate and alternative genes to insert. we should figure out exactly under which conditions this tends to occur and issue a user warning when we detect such a situation.

@HenrikMettler, since you're already familiar with that part of the code, maybe you want to look into this?