mteb/LocBenchRR huggingface dataset:
[Chaturbate] Consider using the API
### DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE

- [X] I understand that I will be **blocked** if I *intentionally* remove or skip any mandatory\* field

### Checklist

- [X] I'm requesting a site-specific feature
- [X] I've verified that I have **updated yt-dlp to nightly or master** ([update instructions](https://github.com/yt-dlp/yt-dlp#update-channels))
- [X] I've checked that all provided URLs are playable in a browser with the same IP and same login details
- [X] I've searched [known issues](https://github.com/yt-dlp/yt-dlp/issues/3766) and the [bugtracker](https://github.com/yt-dlp/yt-dlp/issues?q=) for similar issues **including closed ones**. DO NOT post duplicates
- [X] I've read the [guidelines for opening an issue](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#opening-an-issue)
- [ ] I've read about [sharing account credentials](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#are-you-willing-to-share-account-details-if-needed) and I'm willing to share it if required

### Region

_No response_

### Example URLs

https://chaturbate.com/kira_censori/

### Provide a description that is worded well enough to be understood

Currently yt-dlp loads the entire page to find the m3u8 stream URL, but another way is to use the API:

```sh
$ curl -X POST "https://chaturbate.com/get_edge_hls_url_ajax/" -H "X-Requested-With: XMLHttpRequest" -d "room_slug=kira_censori"
```

```json
{
    "success": true,
    "url": "https://edge17-hel.live.mmcdn.com/live-hls/amlst:kira_censori-sd-203fe4e99b463f0b5013d75b7f491286d7f8cbdad109cef79db409bfc80e33d0_trns_h264/playlist.m3u8",
    "room_status": "public",
    "hidden_message": ""
}
```

This endpoint provides the same m3u8 stream URL that is embedded in HTML (specifically in `window.initialRoomDossier`). The advantage is that this is ~500 times smaller in size compared to downloading the entire HTML page and simplifies error handling.

Here is a rough sequence of actions:

```
if "success":
  - true:
    if "room_status":
      - "public":
        if "url":
          - [m3u8 stream url]
          - "": [room is geo-blocked]
      - something else: [room is private or offline]
  - false: [room doesn't exist]
```

All possible `room_status` values can be found [here](https://devportal.cb.dev/wiki/api/$room#roomstatus-string). Not sure what we need to tell the user in non-`public` cases, above is just an example.

Maybe someday I'll do a PR if I have time. What do you think about that?

### Provide verbose output that clearly demonstrates the problem

- [X] Run **your** yt-dlp command with **-vU** flag added (`yt-dlp -vU <your command line>`)
- [ ] If using API, add `'verbose': True` to `YoutubeDL` params instead
- [X] Copy the WHOLE output (starting with `[debug] Command-line config`) and insert it below

### Complete Verbose Output

_No response_
[BUG] Accelerator.__init__() got an unexpected keyword argument 'logging_dir'
### System Info

```Shell
accelerate version: main
python version: 3.11
torch version: 2.4
numpy version: 1.26.4
```


### Information

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

### Tasks

- [X] One of the scripts in the examples/ folder of Accelerate or an officially supported `no_trainer` script in the `examples` folder of the `transformers` repo (such as `run_no_trainer_glue.py`)
- [ ] My own task or dataset (give details below)

### Reproduction

When I run the accelerate/examples/megatron_1m_gpt_pretraining. py file 
accelerate launch --config_file megatron_gpt_pretraining.py \
--config_name "gpt2-large" \
--tokenizer_name "gpt2-large" \
--dataset_name wikitext \
--dataset_config_name wikitext-2-raw-v1 \
--block_size 1024 \
--learning_rate 5e-5 \
--per_device_train_batch_size 24 \
--per_device_eval_batch_size 24 \
--num_train_epochs 5 \
--with_tracking \
--report_to "wandb" \
--output_dir "awesome_model"

### Expected behavior

Normal training, but I found that in megatron_1m_gpt_pretraining on line 255 of the py file, there is an undefined parameter 'logging.dir' in the __init__ method of the Accelerator function
[BUG] Accelerator.__init__() got an unexpected keyword argument 'logging_dir'
### System Info

```Shell
accelerate version: main
python version: 3.11
torch version: 2.4
numpy version: 1.26.4
```


### Information

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

### Tasks

- [X] One of the scripts in the examples/ folder of Accelerate or an officially supported `no_trainer` script in the `examples` folder of the `transformers` repo (such as `run_no_trainer_glue.py`)
- [ ] My own task or dataset (give details below)

### Reproduction

When I run the accelerate/examples/megatron_1m_gpt_pretraining. py file 
accelerate launch --config_file megatron_gpt_pretraining.py \
--config_name "gpt2-large" \
--tokenizer_name "gpt2-large" \
--dataset_name wikitext \
--dataset_config_name wikitext-2-raw-v1 \
--block_size 1024 \
--learning_rate 5e-5 \
--per_device_train_batch_size 24 \
--per_device_eval_batch_size 24 \
--num_train_epochs 5 \
--with_tracking \
--report_to "wandb" \
--output_dir "awesome_model"

### Expected behavior

Normal training, but I found that in megatron_1m_gpt_pretraining on line 255 of the py file, there is an undefined parameter 'logging.dir' in the __init__ method of the Accelerator function
Building meson-python fails in AIX
When I tried to meson-python master branch in AIX using meson, I get the below error
```
Traceback (most recent call last):
  File "/meson/install/opt/freeware/lib/python3.9/site-packages/mesonbuild/mesonmain.py", line 193, in run
    return options.run_func(options)
  File "/meson/install/opt/freeware/lib/python3.9/site-packages/mesonbuild/msetup.py", line 365, in run
    app.generate()
  File "/meson/install/opt/freeware/lib/python3.9/site-packages/mesonbuild/msetup.py", line 188, in generate
    return self._generate(env, capture, vslite_ctx)
  File "/meson/install/opt/freeware/lib/python3.9/site-packages/mesonbuild/msetup.py", line 253, in _generate
    captured_compile_args = intr.backend.generate(capture, vslite_ctx)
  File "/meson/install/opt/freeware/lib/python3.9/site-packages/mesonbuild/backend/ninjabackend.py", line 642, in generate
    self.generate_rules()
  File "/meson/install/opt/freeware/lib/python3.9/site-packages/mesonbuild/backend/ninjabackend.py", line 1354, in generate_rules
    self.generate_dynamic_link_rules()
  File "/meson/install/opt/freeware/lib/python3.9/site-packages/mesonbuild/backend/ninjabackend.py", line 2376, in generate_dynamic_link_rules
    cmdlist = compiler.get_command_to_archive_shlib()
UnboundLocalError: local variable 'compiler' referenced before assignment
```

For this I would like to propose a simple fix that handles the scenario when compiler is empty 
```
diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py
index cb3552d7f..7b573e4e4 100644
--- a/mesonbuild/backend/ninjabackend.py
+++ b/mesonbuild/backend/ninjabackend.py
@@ -2369,7 +2369,7 @@ class NinjaBackend(backends.Backend):
 
                 options = self._rsp_options(compiler)
                 self.add_rule(NinjaRule(rule, command, args, description, **options, extra=pool))
-            if self.environment.machines[for_machine].is_aix():
+            if self.environment.machines[for_machine].is_aix() and complist:
                 rule = 'AIX_LINKER{}'.format(self.get_rule_suffix(for_machine))
                 description = 'Archiving AIX shared library'
                 cmdlist = compiler.get_command_to_archive_shlib()
```

Kindly let me know if can I raise a PR and you're okay with this.
Allow `license` to be listed in the dynamic section
Meson already has `project(license:)`. Would it be possible to autodetect it dynamically? For instace, I have `'Apache-2.0 OR MIT'` as the value in `project()`. I would like this to populate the `license = { text = "XXX" }` metadata like this project already does with `version`.
`NestedContainer.to_container` method gets tracked individually per NestedContainer object
Looking into https://github.com/dask/distributed/issues/8958, I've noticed that for each `NestedContainer` object, its bound `to_container` method is tracked individually by the GC. This accounts for ~500k of 9MM objects in my workload. It would probably be better to stop tracking these individually.
CVE-2023-40590: Untrusted search path on Windows systems leading to arbitrary code execution 
This appeared in the CVE additional information here https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-wfm5-v35h-vwf4.

I found it reported already. I am reporting it here just in case.
Feature: Users can create a store in order to sell items
**Given** a user clicks on the profile icon in the navbar
**And** the user has not created a store yet
**When** the _Interested in selling?_ option is chosen
**Then** the user should see a form to create a store with a text field for store name, and a textarea for store description

**Given** a user has filled out the store form
**When** the **Save** button is clicked
**Then** a new store should be created for the user
**And** the user should be shown the **My Store** view
ErrorDict always uses default renderer
Description
	 
When BaseForm.full_clean() instantiates ErrorDict, it doesn't pass it the renderer:
​https://github.com/django/django/blob/1860a1afc9ac20750f932e8e0a94b32d096f2848/django/forms/forms.py#L319
Despite ErrorDict being ready to receive it and use it for rendering:
​https://github.com/django/django/blob/1860a1afc9ac20750f932e8e0a94b32d096f2848/django/forms/utils.py#L124
Practically, this means customizations to the renderer are ignored when rendering the form errors using {{ errors }} in the template.
Building on top of the example and fix from #35987, I have a custom renderer that swaps out some templates:
from django import forms
from django.forms.renderers import TemplatesSetting
from django.forms.utils import ErrorList
from django.template.exceptions import TemplateDoesNotExist
class CustomRenderer(TemplatesSetting):
	def get_template(self, template_name):
		if template_name.startswith("django/forms/"):
			# Load our custom version from "custom/forms/" if it exists
			our_template = f"custom/{template_name.removeprefix('django/')}"
			try:
				return super().get_template(our_template)
			except TemplateDoesNotExist:
				pass
		return super().get_template(template_name)
class CustomErrorList(ErrorList):
	def copy(self):
		# Copying the fix from Django Ticket #35987
		copy = super().copy()
		copy.renderer = self.renderer
		return copy
class MyForm(forms.Form):
	default_renderer = CustomRenderer()
	def __init__(self, *args, error_class=CustomErrorList, **kwargs):
		super().__init__(*args, error_class=error_class, **kwargs)
The custom error list template uses some CSS utility classes from Tailwind, like text-red-600:
{% if errors %}<ul class="text-red-600">{% for field, error in errors %}<li>{{ field }}{{ error }}</li>{% endfor %}</ul>{% endif %}
But creating a form with a non-field error and rendering the error dict uses the default renderer and its template:
In [1]: from example.forms import MyForm
 ...:
 ...: form = MyForm({})
 ...: form.full_clean()
 ...: form.add_error(None, "Test error")
In [2]: form.errors.render()
Out[2]: '<ul class="errorlist"><li>__all__<ul class="text-red-600"><li>Test error</li></ul></li></ul>'
I need to override full_clean() to set the renderer:
class MyForm(forms.Form):
	...
	
	def full_clean(self):
		super().full_clean()
		# Fix a bug in Django where self._errors = ErrorDict is not passed the
		# renderer argument when initialized.
		self._errors.renderer = self.renderer
Then form errors use my custom template:
In [1]: from example.forms import MyForm
 ...:
 ...: form = MyForm({})
 ...: form.full_clean()
 ...: form.add_error(None, "Test error")
In [2]: form.errors.render()
Out[2]: '<ul class="text-red-600"><li>__all__<ul class="text-red-600"><li>Test error</li></ul></li></ul>'
I think this has probably been an issue ever since a custom renderer became possible in #31026. The argument was added to ErrorDict but missed in BaseForm.full_clean(), the only place where the class is instantiated.
Allow skipping compiler checking during concretization.
### Summary

During the concretization process, all compilers undergo testing, which is run multiple times and is particularly time-consuming for certain compilers that require lengthy startup times, such as Intel ICC. This has become a significant time-drain during concretization. Please provide a configuration to disable this feature, or use cache to store info for defined compilers.

### Rationale

Run:
```bash
spack --debug spec -I gcc
```
In debug log:
```
[2024-10-13-00:09:02.902192] '/usr/bin/gcc' '-v' '/tmp/spack-implicit-link-infoym_ku0em/main.c' '-o' '/tmp/spack-implicit-link-infoym_ku0em/output'
...(multiple times)
```

### Description

This feature may relate to:
https://github.com/spack/spack/blob/e65be13056b1b71d1c5fe92bdf58d3713cd76473/lib/spack/spack/compiler.py#L446-L476
which is called in:
https://github.com/spack/spack/blob/e65be13056b1b71d1c5fe92bdf58d3713cd76473/lib/spack/spack/solver/asp.py#L324-L325
https://github.com/spack/spack/blob/e65be13056b1b71d1c5fe92bdf58d3713cd76473/lib/spack/spack/solver/asp.py#L3167-L3173
This will call every defined compilers, which may consume a lot of time.

### Additional information

Also used in:
https://github.com/spack/spack/blob/e65be13056b1b71d1c5fe92bdf58d3713cd76473/lib/spack/spack/compiler.py#L403-L425
It may be a better pracitice to cache `compiler_verbose_output`.

### General information

- [X] I have searched the issues of this repo and believe this is not a duplicate
Streamlit unnecessarily runs the file watcher against every path in imported modules, even when watching is disabled
### Checklist

- [X] I have searched the [existing issues](https://github.com/streamlit/streamlit/issues) for similar issues.
- [X] I added a very descriptive title to this issue.
- [X] I have provided sufficient information below to help reproduce this issue.

### Summary

We are running an application that has a bunch of module dependencies.
Recording some profiles, we often see stack traces like this

![image](https://github.com/streamlit/streamlit/assets/84412986/108c2645-f57f-4d0c-ac48-8c5e0729a6eb)

https://github.com/streamlit/streamlit/blob/ad3dc4e19d261fc66560a25bab92a7a560068338/lib/streamlit/runtime/app_session.py#L604

This happens despite the file watcher type being set to `none`, because the local watcher does not gate on that setting. It is only when the per-file watch request addition happens that the setting is checked and it determines that no watch is required. This is incredibly wasteful as it incurs a `isfile` check (along with an fnmatch) for ~40000 files in our case. If I understand the code correctly, this happens at the end of every successful page load.

This seems like it could easily be avoided if the app session also consulted the setting.

Does this make sense and would you accept the relevant fix?

### Reproducible Code Example

_No response_

### Steps To Reproduce

_No response_

### Expected Behavior

Don't iterate over a bunch of files when file watching is disabled.

### Current Behavior

Lot of compute and disk I/O wasted on "watching" files.

### Is this a regression?

- [ ] Yes, this used to work in a previous version.

### Debug info

- Streamlit version: We are running 1.33, but the same code exists in the latest code
- Python version: 3.8
- Operating System: Linux
- Browser: Any


### Additional Information

_No response_
[FEA] Add official mechanism to check if query-planning is enabled in ``dask.dataframe``
The value of the `"dataframe.query-planning"` config currently dictates whether or not `dask.dataframe` will use dask-expr under the hood. However, after `dask.dataframe` is first imported, the value of the `"dataframe.query-planning"` config becomes somewhat useless.

For example, a down-stream library may wish to warn/raise if `dask.dataframe` is already imported with query-planning enabled, but the value of the `"dataframe.query-planning"` config will typically be `None` whether the module was already imported or not.

One way to mitigate this problem is for `dask.dataframe.__init__` to always convert `None` values into `True` (using the config system). This way, a down-stream library (or user) can interpret `None` as a confirmation that the query-planning config can still be modified. An alternative solution is to tell users to inspect `sys.modules` themselves to confirm that `dask.dataframe` is missing.

Whether or not we introduce a simple way for users to check if the query-planning config is already established (i.e. whether `dask.dataframe` was imported), it still seems problematic that the user **can** change the `"query-planning"` config after the fact. This problem is certainly tricky to resolve, but it would be nice if the user could be warned that their config will not be accommodated.
ENH: Group some columns in subplots with DataFrame.plot
`df.plot(subplots=True)`  will create one subplot per column. Is there a way to group multiple columns on the same subplot (and leave the rest of the column separated)?

I'd be happy to submit a PR if that's something you'd consider? In terms of API  `subplot` could accept a list of tuples where each tuple indicates which columns should be grouped together.
Limit number of parametes logged with `MLflowCallback`
### Feature request

Add a new environment variable, such as `MLFLOW_MAX_LOG_PARAMS`, which can limit the number of parameters logged by the `MLflowCallback`.

### Motivation

When using mlflow in Azure ML, there is a limit of 200 parameters that can be logged in a single run, meaning that when attempting to run a training job, the callback needs to be disabled entirely, or the module needs to be "monkeypatched" to limit the number of params logged.

### Your contribution

I will submit a PR
Make creating streams faster in large organizations
In large organizations (like chat.zulip.org), creating a stream can be very slow (seconds to tens of seconds). We should fix this.

It should be possible to reproduce this by creating 20K users with `manage.py populate_db --extra-users` in a development environment.
Make creating streams faster in large organizations
In large organizations (like chat.zulip.org), creating a stream can be very slow (seconds to tens of seconds). We should fix this.

It should be possible to reproduce this by creating 20K users with `manage.py populate_db --extra-users` in a development environment.
Expansion DMatrix on 6 new parameters
Need add new parameters and functions in class DMatrix

Support parameters ``missing``, ``feature_names``, ``feature_types``, ``feature_weights``, ``silent``, ``enable_categorical``.
Generic type aliases with TypeVar defaults infer to an incorrect type
<!--
If you're not sure whether what you're experiencing is a mypy bug, please see the "Question and Help" form instead.
Please consider:

- checking our common issues page: https://mypy.readthedocs.io/en/stable/common_issues.html
- searching our issue tracker: https://github.com/python/mypy/issues to see if it's already been reported
- asking on gitter chat: https://gitter.im/python/typing
-->

**Bug Report**

When using type alias of a generic type which uses type variables with defaults unbound type variables may infer to an incorrect default type.

<!--
If you're reporting a problem with a specific library function, the typeshed tracker is better suited for this report: https://github.com/python/typeshed/issues

If the project you encountered the issue in is open source, please provide a link to the project.
-->

**To Reproduce**

```python
from typing import Generic, TypeVar, TypeAlias

T1 = TypeVar('T1', default=int | None)
T2 = TypeVar('T2', default=int | None)

class A(Generic[T1, T2]):
    def __init__(self, a: T1, b: T2) -> None:
        self.a = a
        self.b = b


MyA: TypeAlias = A[T1, int]
a: MyA = A(None, 10)
```
https://mypy-play.net/?mypy=latest&python=3.12&gist=abece06adfb80e28c6d23bd99997964e

**Expected Behavior**

`MyA` should preserve `T1` default type, which is `int | None`

**Actual Behavior**

`T1` is inferred to `int` default in `MyA`, so assignment to `a` fails with:

`Argument 1 to "A" has incompatible type "None"; expected "int"  [arg-type]`

<!-- What went wrong? Paste mypy's output. -->

**Your Environment**

<!-- Include as many relevant details about the environment you experienced the bug in -->

- Mypy version used: 1.13
- Python version used: 3.12

<!-- You can freely edit this text, please remove all the lines you believe are unnecessary. -->
FEAT: Do not put binary functions to the Ray storage multiple times.
Currently, the binary operations are wrapped into lambdas which are put into the Ray storage on each operation.
Icon rotation doesn't work with flet-0.25.0.dev3711
### Duplicate Check

- [X] I have searched the [opened issues](https://github.com/flet-dev/flet/issues) and there are no duplicates

### Describe the bug

Icon rotation doesn't work anymore with flet 0.25
IconButton and other controls are OK

### Code sample

<details open><summary>Code</summary>

flet 0.24.1 : 
```python
import flet as ft
import math


def main(page: ft.Page):
    page.add(
        ft.Icon(
            name=ft.icons.FAVORITE,
        ),
        ft.Icon(
            name=ft.icons.FAVORITE,
            size=60,
            rotate=ft.Rotate(0.5*math.pi)
        ),
    )
    


ft.app(target=main)
```

flet-0.25.0.dev3711 : 
```python
import flet as ft
import math


def main(page: ft.Page):
    page.add(
        ft.Icon(
            name=ft.Icons.FAVORITE,
        ),
        ft.Icon(
            name=ft.Icons.FAVORITE,
            size=60,
            rotate=ft.Rotate(0.5*math.pi)
        ),
    )

ft.app(target=main)
```
</details>


### To reproduce

Nothing particular : 
With the same code, icon is rotated with flet 0.24.1 and lower, not rotated with 0.25

### Expected behavior

Icon rotate..

### Screenshots / Videos

<details open>
<summary>Captures</summary>

0.24.1 : 
![image](https://github.com/user-attachments/assets/620d5cd8-c867-4cd7-8ecf-73837665cb68)

flet-0.25.0.dev3711
![image](https://github.com/user-attachments/assets/25a13b91-3de3-4831-86cf-06b201c28312)

</details>


### Operating System

Windows

### Operating system details

windows 11 24H2

### Flet version

flet-0.25.0.dev3711

### Regression

Yes, it used to work in a previous Flet version (please specify the version in additional details)

### Suggestions

_No response_

### Logs

<details open><summary>Logs</summary>

```console
[Paste your logs here]
```

</details>


### Additional details

_No response_
Fix flake8 rule B019
This is a subtask of https://github.com/ray-project/ray/issues/47991. See the parent issue for more information.

https://github.com/PyCQA/flake8-bugbear
SiqlipVisionModel does not support "device map= auto": no split modules`attribute
### Feature request

How to make SiglipVisionModel can support Auto map to map to multiple GPUs.

### Motivation

Currently, using MLLM with siglip, the whole model might need automap, since the vision encoder part is SiglipVisionModel, if it doesn;t support , would be a big problme

Also, would consider add flashattention support for Siglip?

### Your contribution

None for now