text
stringlengths 20
57.3k
| labels
class label 4
classes |
---|---|
Title: Failed Index Uniqueness Validation for Dask Series
Body: **Describe the bug**
A clear and concise description of what the bug is.
- [X ] I have checked that this issue has not already been reported.
- [X ] I have confirmed this bug exists on the latest version of pandera.
- [X ] (optional) I have confirmed this bug exists on the main branch of pandera.
#### Code Sample
```python
import pandera as pa
import dask.dataframe as dd
import pandas as pd
example_schema = pa.SeriesSchema(
float,
index=pa.Index(pa.dtypes.Timestamp, unique=True),
nullable=False,
unique=False,
)
example_series = dd.from_pandas(
pd.Series([1.333, 2.22, 3.333, 4.311, 5.222], index=[1, 2, 3, 5, 5]),
npartitions=1,
)
# Skips validation despite having a duplicate
example_schema.validate(example_series).compute()
# Validates correctly and throws an exception.
# Note that when we execute .compute(), we are dealing with a Pandas Series
example_schema.validate(example_series.compute())
```
#### Expected behavior
pandera should be able to validate a Dask Series directly and throw an exception if it fails the validation.
#### Desktop (please complete the following information):
- OS: Windows 10
- Browser: Chrome
- Version: pandera 0.20.3
### Additional Information
I have validated that this issue is only occurring with Dask Series. If we convert Dask Series into a DataFrame, pandera throws an exception:
> SchemaError: series 'None' contains duplicate values:
> 3 5
> 4 5
> dtype: int64 | 1medium
|
Title: debuginfo output doesn't seem to work with gdb v15
Body: This is true across Numba releases; I tried 0.58 through 0.60. I am setting `NUMBA_DEBUGINFO=1` for profiling (https://github.com/pythonspeed/profila/).
1. On Ubuntu 24.04, gdb v15 doesn't see the symbols generated. lldb _does_ see the symbols, so they are being generated.
2. On Ubuntu 22.04, gdb v12 does see the symbols.
So something about how NUMBA_DEBUGINFO works doesn't work with the latest gdb when running on Ubuntu 24.04.
It's possible this is a gdb bug, of course, but if e.g. gdb got a little stricter seems easier to fix in Numba than trying to get new gdb bug fixes into stable LTS Linux distros... | 1medium
|
Title: 使用configparser读取.ini配置文件,在部署时报错
Body: 在Scrapy的settings文件中使用configparser读取.ini配置文件,
```
config = RawConfigParser()
config_file = os.getcwd() + '/config.ini'
config.read(config_file)
env = config['env']['env']
```
在gerapy中部署时报错,报错信息如下:
```
File "<frozen importlib._bootstrap>", line 994, in _gcd_import
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 656, in _load_unlocked
File "<frozen importlib._bootstrap>", line 626, in _load_backward_compatible
File "/tmp/douyin-1581320692-ek4kqmnm.egg/douyin/settings.py", line 38, in <module>
File "/root/.pyenv/versions/3.6.7/lib/python3.6/configparser.py", line 959, in __getitem__
raise KeyError(key)
KeyError: 'env'
```
| 1medium
|
Title: Error handlers on namespaces causes error
Body: Flask-restplus=0.9.0
When error handlers are registered on a namespace and afterwards are transfered to api an error occurs. I got it working on my side by adding ".items()" on api.py:398:
`for exception, handler in ns.error_handlers.items():`
Due to the lack of time I cannot go through the contribution process myself.
More info:
For example when registering my error handler for a specific exception
```
namespace = Namespace('endpoint')
@namespace.errorhandler(ConflictExceptionClass)
def handle_conflict_exception(error):
...
```
When starting the program you will get:
``` ...
api.add_namespace(ns_engine)
File "/home/bevandeba/tools/python/local/lib/python2.7/site-packages/flask_restplus/api.py", line 398, in add_namespace
for exception, handler in ns.error_handlers:
TypeError: 'type' object is not iterable
```
This issue is located at
api.py:397-399:
```
# Register error handlers
for exception, handler in ns.error_handlers:
self.error_handlers[exception] = handler
```
Fixed by changing to:
```
# Register error handlers
for exception, handler in ns.error_handlers.items():
self.error_handlers[exception] = handler
```
| 1medium
|
Title: Version 2.2.0 crashes when using app.test_client() as a context-manager in multi-threaded tests
Body: The following code defines a simple app, and queries it from a test that uses threads:
```py
import threading
from flask import Flask
import pytest
def create_app():
app = Flask(__name__)
@app.route("/hi", methods=["POST"])
def hello():
return "Hello, World!"
return app
@pytest.fixture()
def app():
app = create_app()
yield app
@pytest.fixture()
def client(app):
with app.test_client() as client:
yield client
def test_request_example(client):
successes = 0
def f():
nonlocal successes
response = client.post("/hi")
assert "Hello, World!" == response.text
successes += 1
thread = threading.Thread(target=f)
thread.start()
thread.join()
f()
assert successes == 2
```
When running with pytest on Flask 2.1.3, this test passes:
```
========================================================================= test session starts ==========================================================================
platform linux -- Python 3.9.2, pytest-7.1.2, pluggy-0.13.0
rootdir: /home/dev/swh-environment/swh-indexer, configfile: pytest.ini
plugins: asyncio-0.18.3, requests-mock-1.9.3, django-4.5.2, xdist-2.5.0, swh.core-2.13, mock-3.8.2, django-test-migrations-1.2.0, flask-1.2.0, redis-2.4.0, hypothesis-6.49.1, cov-3.0.0, subtesthack-0.1.2, forked-1.3.0, postgresql-3.1.3, swh.journal-0.8.1.dev3+gf92d4ac
asyncio: mode=strict
collected 1 item
test_flask_threads.py . [100%]
===================================================================== 1 passed, 1 warning in 0.02s =====================================================================
```
However, when running with Flask 2.2.0:
```
========================================================================= test session starts ==========================================================================
platform linux -- Python 3.9.2, pytest-7.1.2, pluggy-0.13.0
rootdir: /home/dev/swh-environment/swh-indexer, configfile: pytest.ini
plugins: asyncio-0.18.3, requests-mock-1.9.3, django-4.5.2, xdist-2.5.0, swh.core-2.13, mock-3.8.2, django-test-migrations-1.2.0, flask-1.2.0, redis-2.4.0, hypothesis-6.49.1, cov-3.0.0, subtesthack-0.1.2, forked-1.3.0, postgresql-3.1.3, swh.journal-0.8.1.dev3+gf92d4ac
asyncio: mode=strict
collected 1 item
test_flask_threads.py F [100%]
=============================================================================== FAILURES ===============================================================================
_________________________________________________________________________ test_request_example _________________________________________________________________________
self = <contextlib.ExitStack object at 0x7fc444b63b20>
exc_details = (<class 'ValueError'>, ValueError("<Token var=<ContextVar name='flask.request_ctx' at 0x7fc44844a1d0> at 0x7fc444a18a80> was created in a different Context"), <traceback object at 0x7fc444a18d40>)
received_exc = False, _fix_exception_context = <function ExitStack.__exit__.<locals>._fix_exception_context at 0x7fc444a7edc0>, suppressed_exc = False
def __exit__(self, *exc_details):
received_exc = exc_details[0] is not None
# We manipulate the exception state so it behaves as though
# we were actually nesting multiple with statements
frame_exc = sys.exc_info()[1]
def _fix_exception_context(new_exc, old_exc):
# Context may not be correct, so find the end of the chain
while 1:
exc_context = new_exc.__context__
if exc_context is old_exc:
# Context is already set correctly (see issue 20317)
return
if exc_context is None or exc_context is frame_exc:
break
new_exc = exc_context
# Change the end of the chain to point to the exception
# we expect it to reference
new_exc.__context__ = old_exc
# Callbacks are invoked in LIFO order to match the behaviour of
# nested context managers
suppressed_exc = False
pending_raise = False
while self._exit_callbacks:
is_sync, cb = self._exit_callbacks.pop()
assert is_sync
try:
> if cb(*exc_details):
/usr/lib/python3.9/contextlib.py:498:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <flask.ctx.AppContext object at 0x7fc444b75730>, exc_type = None, exc_value = None, tb = None
def __exit__(
self,
exc_type: t.Optional[type],
exc_value: t.Optional[BaseException],
tb: t.Optional[TracebackType],
) -> None:
> self.pop(exc_value)
../../.local/lib/python3.9/site-packages/flask/ctx.py:275:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <flask.ctx.AppContext object at 0x7fc444b75730>, exc = None
def pop(self, exc: t.Optional[BaseException] = _sentinel) -> None: # type: ignore
"""Pops the app context."""
try:
if len(self._cv_tokens) == 1:
if exc is _sentinel:
exc = sys.exc_info()[1]
self.app.do_teardown_appcontext(exc)
finally:
ctx = _cv_app.get()
> _cv_app.reset(self._cv_tokens.pop())
E ValueError: <Token var=<ContextVar name='flask.app_ctx' at 0x7fc44844f090> at 0x7fc444a18ac0> was created in a different Context
../../.local/lib/python3.9/site-packages/flask/ctx.py:256: ValueError
During handling of the above exception, another exception occurred:
client = <FlaskClient <Flask 'test_flask_threads'>>
def test_request_example(client):
successes = 0
def f():
nonlocal successes
response = client.post("/hi")
assert "Hello, World!" == response.text
successes += 1
thread = threading.Thread(target=f)
thread.start()
thread.join()
> f()
test_flask_threads.py:42:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test_flask_threads.py:34: in f
response = client.post("/hi")
../../.local/lib/python3.9/site-packages/werkzeug/test.py:1140: in post
return self.open(*args, **kw)
../../.local/lib/python3.9/site-packages/flask/testing.py:221: in open
self._context_stack.close()
/usr/lib/python3.9/contextlib.py:521: in close
self.__exit__(None, None, None)
/usr/lib/python3.9/contextlib.py:513: in __exit__
raise exc_details[1]
/usr/lib/python3.9/contextlib.py:498: in __exit__
if cb(*exc_details):
../../.local/lib/python3.9/site-packages/flask/ctx.py:432: in __exit__
self.pop(exc_value)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <RequestContext 'http://localhost/hi' [POST] of test_flask_threads>
exc = ValueError("<Token var=<ContextVar name='flask.app_ctx' at 0x7fc44844f090> at 0x7fc444a18ac0> was created in a different Context")
def pop(self, exc: t.Optional[BaseException] = _sentinel) -> None: # type: ignore
"""Pops the request context and unbinds it by doing that. This will
also trigger the execution of functions registered by the
:meth:`~flask.Flask.teardown_request` decorator.
.. versionchanged:: 0.9
Added the `exc` argument.
"""
clear_request = len(self._cv_tokens) == 1
try:
if clear_request:
if exc is _sentinel:
exc = sys.exc_info()[1]
self.app.do_teardown_request(exc)
request_close = getattr(self.request, "close", None)
if request_close is not None:
request_close()
finally:
ctx = _cv_request.get()
token, app_ctx = self._cv_tokens.pop()
> _cv_request.reset(token)
E ValueError: <Token var=<ContextVar name='flask.request_ctx' at 0x7fc44844a1d0> at 0x7fc444a18a80> was created in a different Context
../../.local/lib/python3.9/site-packages/flask/ctx.py:407: ValueError
======================================================================= short test summary info ========================================================================
FAILED test_flask_threads.py::test_request_example - ValueError: <Token var=<ContextVar name='flask.request_ctx' at 0x7fc44844a1d0> at 0x7fc444a18a80> was created in...
===================================================================== 1 failed, 1 warning in 0.11s =====================================================================
```
Environment:
- Python version: 3.9
- Flask version: 2.2.0
| 2hard
|
Title: pytest-xdist rtd documentation site problem
Body: It seems that pytest-xdist documentation rtd website exists but never container docs on it, but searching for xdist docs brings https://readthedocs.org/projects/pytest-xdist amont top results which is confusing.
Apparently @hpk42 @nicoddemus and @RonnyPfannschmidt the the ones listed as admins on RTD. I suspect that removing the project from RTD can sort the problem. As I guess that if nobody bothered to add a sphinx config in so many years it will never happen.
To improve the situation I would also add extra metadata to package to link directly the readme as the Documentation, avoiding further confusions. | 1medium
|
Title: Cyclic imports of db objcect
Body: I've run flasky with pylint (I can post the specific pylintrc file, if required) and discovered a lot of cyclic imports
```
app/auth/__init__.py:1:0: R0401: Cyclic import (app -> app.auth -> app.auth.views -> app.models) (cyclic-import)
app/auth/__init__.py:1:0: R0401: Cyclic import (app.auth -> app.auth.views) (cyclic-import)
app/auth/__init__.py:1:0: R0401: Cyclic import (app.main -> app.main.views) (cyclic-import)
app/auth/__init__.py:1:0: R0401: Cyclic import (app.api -> app.api.users) (cyclic-import)
app/auth/__init__.py:1:0: R0401: Cyclic import (app -> app.auth -> app.auth.views) (cyclic-import)
app/auth/__init__.py:1:0: R0401: Cyclic import (app -> app.main -> app.main.views -> app.decorators -> app.models) (cyclic-import)
app/auth/__init__.py:1:0: R0401: Cyclic import (app -> app.auth -> app.auth.views -> app.email) (cyclic-import)
app/auth/__init__.py:1:0: R0401: Cyclic import (app -> app.main -> app.models) (cyclic-import)
app/auth/__init__.py:1:0: R0401: Cyclic import (app.main -> app.main.errors) (cyclic-import)
app/auth/__init__.py:1:0: R0401: Cyclic import (app -> app.main -> app.main.views -> app.main.forms -> app.models) (cyclic-import)
app/auth/__init__.py:1:0: R0401: Cyclic import (app -> app.main -> app.main.views -> app.models) (cyclic-import)
app/auth/__init__.py:1:0: R0401: Cyclic import (app -> app.api -> app.api.users -> app.models) (cyclic-import)
app/auth/__init__.py:1:0: R0401: Cyclic import (app.api -> app.api.posts -> app.api.decorators -> app.api.errors) (cyclic-import)
app/auth/__init__.py:1:0: R0401: Cyclic import (app -> app.api -> app.api.comments -> app.models) (cyclic-import)
app/auth/__init__.py:1:0: R0401: Cyclic import (app.api -> app.api.posts -> app.api.errors) (cyclic-import)
app/auth/__init__.py:1:0: R0401: Cyclic import (app -> app.api -> app.api.authentication -> app.models) (cyclic-import)
app/auth/__init__.py:1:0: R0401: Cyclic import (app -> app.api -> app.api.posts -> app.models) (cyclic-import)
app/auth/__init__.py:1:0: R0401: Cyclic import (app -> app.auth -> app.auth.views -> app.auth.forms -> app.models) (cyclic-import)
app/auth/__init__.py:1:0: R0401: Cyclic import (app -> app.main -> app.main.views) (cyclic-import)
```
Most of them are related to `app.models` module and it doesn't seem to be a good practice. | 1medium
|
Title: forms.MultipleChoiceField doesn't work as it does in default admin site
Body: When a use django default admin site, I get the desired MultiChoiceField

but when i switch to django-jet admin site I get something like below, none of the option are selectable

| 1medium
|
Title: db.session.add(..) but without commit(()
Body: Hi, i'm reading your book and at this point in Chapter 10. In model.py the "User" class has several db.session.add(self) but no db.session.commit(). I thought that every time an update in database there should be an commit() in the end but your code works fine. So i'm a little confused. Thank you for your patient.
| 0easy
|
Title: Django 3 support
Body: | 1medium
|
Title: Python 3.5 on CI tests
Body: Refs #133
As I said earlier in my mail, this is absolutely vital to us.
We can't have a big part of our production code note run on our tech stack.
I'm happy to make the changes, if you tell me how you want it.
| 1medium
|
Title: Allowing `UsageError` subclasses
Body: Hi,
I'm developing a package that exposes magic commands to users. In many cases, the Python traceback is long and uninformative so I only want to display an appropriate error message.
I noticed that this can be done with [`UsageError`](https://github.com/ipython/ipython/blob/a3d5a06d9948260a6b08c622e86248f48afd66c3/IPython/core/interactiveshell.py#L2086) since the shell will hide the traceback. However, some errors we want to display are not really "usage errors" so we want to provide alternative names.
Unfortunately, subclassing `UsageError` doesn't work:

Because the code is checking for the `UsageError` type: https://github.com/ipython/ipython/blob/a3d5a06d9948260a6b08c622e86248f48afd66c3/IPython/core/interactiveshell.py#L2086
Checking for subclasses instead would fix the issue. Another approach would be defining a `HideTracebackError`, and `UsageError` could be a subclass of it, then, the checking condition could verify if the exception is `HideTracebackError` or a subclass.
I believe this is a common scenario among packages that expose magics to users and can greatly improve user experience.
I'm happy to open a PR if the maintainers accept this change.
| 1medium
|
Title: [Bug]: `identify_dynamic_embeddings` does not work for `DataPair`
Body: ### Describe the bug
The training util `identify_dynamic_embeddings` does not look properly at the embeddings for the `first` and `second`. It probably makes more sense to have a member function for each `DataPoint` class, instead of checking `isinstance` within an external function. There could still be an outer function that iterates over data points in a batch, but it should itself call `identify_dynamic_embeddings_point` for each data point it iterates over. I would say that `identify_dynamic_embeddings` should be called `identify_dynamic_embeddings_batch`, but that would change the API.
### To Reproduce
```python
first = flair.data.DataPoint()
second = flair.data.DataPoint()
dynamic_tensor1 = torch.tensor([1., 2., 3.], requires_grad=True)
dynamic_tensor2 = torch.tensor([1., 2., 3.], requires_grad=True)
first.set_embedding('dynamic', dynamic_tensor1)
second.set_embedding('dynamic', dynamic_tensor2)
dynamic_data_pair = flair.data.DataPair(first, second)
print(flair.training_utils.identify_dynamic_embeddings([dynamic_data_pair]))
```
### Expected behavior
This should return `['dynamic']`
### Logs and Stack traces
```stacktrace
```
### Screenshots
_No response_
### Additional Context
_No response_
### Environment
#### Versions:
##### Flair
0.15.1
##### Pytorch
2.6.0+cu124
##### Transformers
4.48.2
#### GPU
False | 1medium
|
Title: [Duplicate] With fixed rows, columns are as wide as the data and not the headers
Body: If the column headers are wider than the data (which is often the case with numerical tables & text column headers), then the width of the columns is too narrow and the column headers are cut off.
Without fixed columns, the column width expands to account for the width of the headers. I would expect the behavior to be the same with fixed headers.
Expected behavior:

Default behavior with `fixed_rows`

Still undesirable behavior with header overflow:
 | 1medium
|
Title: TypeError: BoxAnnotator.annotate() got an unexpected keyword argument 'custom_colors_lookup'
Body: ### Search before asking
- [X] I have searched the Supervision [issues](https://github.com/roboflow/supervision/issues) and found no similar feature requests.
### Question
First of all, I really like how supervision is providing so many features to integrate with yolov8 detection
I am trying to give assign different colors to some of the bounding boxes by using "custom_color_lookup", but it appears that this error showed up:
TypeError: BoxAnnotator.annotate() got an unexpected keyword argument 'custom_colors_lookup'
Here is my code on calling the annotate() :
"colors" is initiated as an array
<img width="439" alt="image" src="https://github.com/roboflow/supervision/assets/62897998/b928a289-5541-4379-b99f-506c92b3d57a">
not sure if i am doing anything wrong here. Perhaps if there is other way of achieving this, please do let me know! thank you
### Additional
_No response_ | 1medium
|
Title: INspector view error
Body: ``` python
TypeError
TypeError: 'Database' object is not callable. If you meant to call the '__html__' method on a 'MongoClient' object it is failing because no such method exists.
Traceback (most recent call last)
File "/home/rochacbruno/.virtualenvs/quokkaclean/lib/python2.7/site-packages/flask/app.py", line 1836, in __call__
return self.wsgi_app(environ, start_response)
File "/home/rochacbruno/.virtualenvs/quokkaclean/lib/python2.7/site-packages/flask/app.py", line 1820, in wsgi_app
response = self.make_response(self.handle_exception(e))
File "/home/rochacbruno/.virtualenvs/quokkaclean/lib/python2.7/site-packages/flask/app.py", line 1403, in handle_exception
reraise(exc_type, exc_value, tb)
File "/home/rochacbruno/.virtualenvs/quokkaclean/lib/python2.7/site-packages/flask/app.py", line 1817, in wsgi_app
response = self.full_dispatch_request()
File "/home/rochacbruno/.virtualenvs/quokkaclean/lib/python2.7/site-packages/flask/app.py", line 1477, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/rochacbruno/.virtualenvs/quokkaclean/lib/python2.7/site-packages/flask/app.py", line 1381, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/home/rochacbruno/.virtualenvs/quokkaclean/lib/python2.7/site-packages/flask/app.py", line 1475, in full_dispatch_request
rv = self.dispatch_request()
File "/home/rochacbruno/.virtualenvs/quokkaclean/lib/python2.7/site-packages/flask/app.py", line 1461, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/home/rochacbruno/.virtualenvs/quokkaclean/lib/python2.7/site-packages/flask_admin/base.py", line 68, in inner
return self._run_view(f, *args, **kwargs)
File "/home/rochacbruno/.virtualenvs/quokkaclean/lib/python2.7/site-packages/flask_admin/base.py", line 359, in _run_view
return fn(self, *args, **kwargs)
File "/home/rochacbruno/www/quokka/quokka/core/admin/views.py", line 37, in index
return self.render('admin/inspector.html', **context)
File "/home/rochacbruno/www/quokka/quokka/core/admin/models.py", line 43, in render
return render_template(template, theme=theme, **kwargs)
File "/home/rochacbruno/www/quokka/quokka/core/templates.py", line 16, in render_template
return render_theme_template(theme, template, **context)
File "/home/rochacbruno/.virtualenvs/quokkaclean/lib/python2.7/site-packages/quokka_themes/__init__.py", line 184, in render_theme_template
return render_template('_themes/%s/%s' % (theme, last), **context)
File "/home/rochacbruno/.virtualenvs/quokkaclean/lib/python2.7/site-packages/flask/templating.py", line 128, in render_template
context, ctx.app)
File "/home/rochacbruno/.virtualenvs/quokkaclean/lib/python2.7/site-packages/flask/templating.py", line 110, in _render
rv = template.render(context)
File "/home/rochacbruno/.virtualenvs/quokkaclean/lib/python2.7/site-packages/jinja2/environment.py", line 989, in render
return self.environment.handle_exception(exc_info, True)
File "/home/rochacbruno/.virtualenvs/quokkaclean/lib/python2.7/site-packages/jinja2/environment.py", line 754, in handle_exception
reraise(exc_type, exc_value, tb)
File "/home/rochacbruno/www/quokka/quokka/themes/admin/templates/admin/inspector.html", line 2, in top-level template code
{% from theme('admin/lib.html') import format_value, render_table with context %}
File "/home/rochacbruno/www/quokka/quokka/themes/admin/templates/admin/master.html", line 1, in top-level template code
{% extends theme(admin_base_template) %}
File "/home/rochacbruno/www/quokka/quokka/themes/admin/templates/admin/base.html", line 29, in top-level template code
{% block page_body %}
File "/home/rochacbruno/www/quokka/quokka/themes/admin/templates/admin/base.html", line 73, in block "page_body"
{% block body %}{% endblock %}
File "/home/rochacbruno/www/quokka/quokka/themes/admin/templates/admin/inspector.html", line 42, in block "body"
{{render_table(headers=('name', 'extension'), values=app.extensions.items())}}
File "/home/rochacbruno/www/quokka/quokka/themes/admin/templates/admin/lib.html", line 258, in template
<td>{{format_value(subitem)}}</td>
File "/home/rochacbruno/www/quokka/quokka/themes/admin/templates/admin/lib.html", line 214, in template
{{ render_table(headers=('Key', 'Value'), values=value.items()) }}
File "/home/rochacbruno/www/quokka/quokka/themes/admin/templates/admin/lib.html", line 258, in template
<td>{{format_value(subitem)}}</td>
File "/home/rochacbruno/www/quokka/quokka/themes/admin/templates/admin/lib.html", line 214, in template
{{ render_table(headers=('Key', 'Value'), values=value.items()) }}
File "/home/rochacbruno/www/quokka/quokka/themes/admin/templates/admin/lib.html", line 258, in template
<td>{{format_value(subitem)}}</td>
File "/home/rochacbruno/www/quokka/quokka/themes/admin/templates/admin/lib.html", line 238, in template
{{value}}
File "/home/rochacbruno/.virtualenvs/quokkaclean/lib/python2.7/site-packages/pymongo/database.py", line 1054, in __call__
self.__name, self.__connection.__class__.__name__))
TypeError: 'Database' object is not callable. If you meant to call the '__html__' method on a 'MongoClient' object it is failing because no such method exists.
The debugger caught an exception in your WSGI application. You can now look at the traceback which led to the error.
To switch between the interactive traceback and the plaintext one, you can click on the "Traceback" headline. From the text traceback you can also create a paste of it. For code execution mouse-over the frame you want to debug and click on the console icon on the right side.
You can execute arbitrary Python code in the stack frames and there are some extra helpers available for introspection:
dump() shows all variables in the frame
dump(obj) dumps all that's known about the object
Brought to you by DON'T PANIC, your friendly Werkzeug powered traceback interpreter.
```
| 1medium
|
Title: Tado new api authentication
Body: ### The problem
From March 21 todo require MFA on API.
https://support.tado.com/en/articles/8565472-how-do-i-authenticate-to-access-the-rest-api
Tado integration unable to login.
### What version of Home Assistant Core has the issue?
All
### What was the last working version of Home Assistant Core?
_No response_
### What type of installation are you running?
Home Assistant OS
### Integration causing the issue
Tado
### Link to integration documentation on our website
_No response_
### Diagnostics information
_No response_
### Example YAML snippet
```yaml
```
### Anything in the logs that might be useful for us?
```txt
```
### Additional information
_No response_ | 1medium
|
Title: How to use this with ForeignKey table
Body: How to use this with ForeignKey table ,Just like join or inner Sql | 1medium
|
Title: Update documentation with python3.5 features
Body: 1) document `async with` for pool/connection/cursor
2) document `async for` iteration over cursor
3) change examples to async/await
| 1medium
|
Title: validation loss does not decrease
Body: Hello,
I have been trying to finetune the donut model on my custom dataset. However, I have encountered an issue where the validation loss does not decrease after a few training epochs.
Here are the details of my dataset:
Total number of images in the training set: 12032
Total number of images in the validation set: 1290
Here are the config details that I have used for training;
config = { "max_epochs":30,
"val_check_interval":1.0,
"check_val_every_n_epoch":1,
"gradient_clip_val":1.0,
"num_training_samples_per_epoch": 12032,
"lr":3e-5,
"train_batch_sizes": [1],
"val_batch_sizes": [1],
# "seed":2022,
"num_nodes": 1,
"warmup_steps": 36096,
"result_path": "./result",
"verbose": False,
}
Here is the training log :
Epoch 21: 99%
13160/13320 [51:42<00:37, 4.24it/s, loss=0.0146, v_num=0]
Epoch : 0 | Train loss : 0.13534872224594618 | Validation loss : 0.06959894845040267
Epoch : 1 | Train loss : 0.06630147620920149 | Validation loss : 0.06210419170951011
Epoch : 2 | Train loss : 0.05352105059947349 | Validation loss : 0.07186826165058287
Epoch : 3 | Train loss : 0.04720975606560736 | Validation loss : 0.06583545940979477
Epoch : 4 | Train loss : 0.04027246460695355 | Validation loss : 0.07237467494971456
Epoch : 5 | Train loss : 0.03656758802423008 | Validation loss : 0.06615438500516262
Epoch : 6 | Train loss : 0.03334385565814249 | Validation loss : 0.0690448615986076
Epoch : 7 | Train loss : 0.030216083118764458 | Validation loss : 0.06872327175676446
Epoch : 8 | Train loss : 0.028938407997482745 | Validation loss : 0.06971958731054592
Epoch : 9 | Train loss : 0.02591740866504401 | Validation loss : 0.07369288451116424
Epoch : 10 | Train loss : 0.023537077281242467 | Validation loss : 0.09032832324105358
Epoch : 11 | Train loss : 0.023199086009602708 | Validation loss : 0.08460190268222034
Epoch : 12 | Train loss : 0.02142925070562108 | Validation loss : 0.08330771044260839
Epoch : 13 | Train loss : 0.023064635992034854 | Validation loss : 0.08292237208095442
Epoch : 14 | Train loss : 0.019547534460417258 | Validation loss : 0.0834848547896493
Epoch : 15 | Train loss : 0.018710007107520535 | Validation loss : 0.08551564997306298
Epoch : 16 | Train loss : 0.01841766658555733 | Validation loss : 0.08025501600490885
Epoch : 17 | Train loss : 0.017241064160256097 | Validation loss : 0.10344411130643169
Epoch : 18 | Train loss : 0.015813576313222295 | Validation loss : 0.10317703346507855
Epoch : 19 | Train loss : 0.015648367624887447 | Validation loss : 0.09659983590732446
Epoch : 20 | Train loss : 0.01492729377679406 | Validation loss : 0.09451819387128098
The validation loss appears to fluctuate without showing a consistent decreasing trend. I would appreciate any insights or suggestions on how to address this issue and potentially improve the validation loss convergence.
Thank you for your assistance. | 1medium
|
Title: I get type error if I use __root__ from pydantic while inheriting from SQLModel
Body: ### 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 SQLModel documentation, with the integrated search.
- [X] I already searched in Google "How to X in SQLModel" 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 SQLModel but to [Pydantic](https://github.com/samuelcolvin/pydantic).
- [X] I already checked if it is not related to SQLModel but to [SQLAlchemy](https://github.com/sqlalchemy/sqlalchemy).
### Commit to Help
- [X] I commit to help with one of those options 👆
### Example Code
```python
from sqlmodel import SQLModel
from pydantic import BaseModel
data = [
{ "id": 1, "name": "awesome-product" }
]
class ProductBase(SQLModel):
name: str
class ProductOut(ProductBase):
id: int
# Here 👋 If I inherit from `SQLModel`` then I get type error. However, If I inherit from `BaseModel` then I don't get error.
# UnComment below line and comment the `SQLModel` usage to resolve the type error
# class ProductList(BaseModel):
class ProductList(SQLModel):
__root__: list[ProductOut]
class SomeResponse(SQLModel):
products: ProductList
msg: str
product_list_model = ProductList.parse_obj(data)
SomeResponse(products=product_list_model, msg="Hello world")
```
### Description
I get a type error if I inherit `ProductList` model from `SQLModel` saying:
```
Argument of type "SQLModel" cannot be assigned to parameter "products" of type "ProductList" in function "__init__"
"SQLModel" is incompatible with "ProductList"
```
However, If I use `BaseModel` from pydantic for inheritance error went away.
Below line gives type error
```python
class ProductList(SQLModel):
```
Below line looks fine
```python
class ProductList(BaseModel):
```
### Operating System
Linux
### Operating System Details
Ubuntu 21.10
### SQLModel Version
0.0.6
### Python Version
3.10.2
### Additional Context

| 1medium
|
Title: Deadlock when spawning tasks from a function and limiting concurrency
Body: ### Bug summary
I'm getting what seems to be a deadlock when I have Python functions that aren't tasks "spawning" new tasks (and limiting concurrency). At some point Prefect is just waiting on a bunch of futures but no new tasks get started.
Here's a simple reproduction of the issue:
```python
"""
Example flow that demonstrates task nesting patterns in a ThreadPoolTaskRunner context.
Each parent task spawns multiple child tasks, which can lead to resource contention.
"""
from random import random
from time import sleep
from prefect import flow, task
from prefect.task_runners import ThreadPoolTaskRunner
@task
def dependent_task(n: int) -> int:
"""Child task that simulates work with a random delay.
Returns the input number unchanged."""
sleep_time = random() * 3
print(f"Dependent task {n} sleeping for {sleep_time:.2f}s")
sleep(sleep_time)
return n
def task_spawner(n: int) -> list[int]:
"""Creates 5 identical child tasks for a given number n.
Returns the collected results as a list."""
dependent_futures = dependent_task.map([n] * 5)
return dependent_futures.result()
@task
def initial_task(n: int) -> list[int]:
"""Parent task that adds its own delay before spawning child tasks.
Returns a list of results from child tasks."""
sleep_time = random() * 2
print(f"Initial task {n} sleeping for {sleep_time:.2f}s")
sleep(sleep_time)
return task_spawner(n)
@flow(task_runner=ThreadPoolTaskRunner(max_workers=10))
def deadlock_example_flow() -> None:
"""
Creates a workflow where 10 parent tasks each spawn 5 child tasks (50 total tasks)
using a thread pool limited to 10 workers. Tasks execute concurrently within
these constraints.
The flow demonstrates how task dependencies and thread pool limitations interact,
though "deadlock" is a misnomer as the tasks will eventually complete given
sufficient time.
"""
# Create 10 parent tasks
initial_futures = initial_task.map(range(10))
# Collect results from all task chains
results = [f.result() for f in initial_futures]
print(f"Flow complete with results: {results}")
```
Thanks a bunch!
### Version info
```Text
(crosswise-ai) [02/07/2025 04:58:22PM] [thomas:~/crosswise/crosswise_app]$ prefect version
Version: 3.1.12
API version: 0.8.4
Python version: 3.12.7
Git commit: e299e5a7
Built: Thu, Jan 9, 2025 10:09 AM
OS/Arch: linux/x86_64
Profile: ephemeral
Server type: cloud
Pydantic version: 2.9.2
Integrations:
prefect-aws: 0.5.3
```
### Additional context
_No response_ | 1medium
|
Title: get_data_yahoo raise RemoteDataError(msg)!
Body: import pandas_datareader as pdr
start=datetime(2019,1,1)
nio=pdr.get_data_yahoo('NIO',start=start)
error:
raise RemoteDataError(msg)
pandas_datareader._utils.RemoteDataError: Unable to read URL: https://finance.yahoo.com/quote/NIO/history?period1=1546333200&period2=1625990399&interval=1d&frequency=1d&filter=history
Response Text:
| 1medium
|
Title: Very low-efficiency dataloader when no explicit matrix2numpy conversion using pykaldi+pytorch
Body: Thanks to pykaldi. Now it is very easy to incorporate kaldi's feature into pytorch to do NN training related to speaker verification with only few lines of codes.
However, I found it is very slow to convert pykaldi's submatrix into pytorch's FloatTensor if there is no explicit conversion from submatrix to numpy. This leads the data loading phase become performance bottleneck when incorporating pykaldi into pytorch using its dataloader scheme.
The initial problematic part of codes of my dataloader.py looks like this:
```python
class Mydataset(object):
...
def __getitem__(self, idx):
uttid = self.uttids[idx]
feat2d = utt2feat2d[uttid] # utt2feat2d is provided by read_utt2feat2d function
label = labels[uttid]
return torch.FloatTensor(feat2d), torch.LongTensor(label)
def read_utt2feat2d(self, iopath2feat2d): # this function provides utt2featd
rspec = 'scp:{0}/feat2d.scp'.format(iopath2feat2d)
utt2feat2d = {}
for key,val in SequentialMatrixReader(rspec):
utt2feat2d[key] = val # Replacing it with utt2feat2d[key] = val.numpy() increases data loading speed
return utt2feat2d. # It occupies large amount of men, but the aim here is to debug
```
The above codes result a slow dataloader. If the batch-size is 128, #workers 24, it costs **4 mins** to load 150 batches.
I checked the gpu (doing model training) consumes about 1mins, and the cpu (data loading) consumes
4 mins. And they are nearly doing in parallel, the bottleneck lies in the data loading part.
And If I simply revise the code of function read_utt2feat2d to: **utt2feat2d[key] = val.numpy()**, the total time consumed is **1min**.
I don't know the underlying reason and feel interested. | 1medium
|
Title: Armv7l环境运行错误
Body: 设备 树莓派3b
系统 Raspbian 4.x
docker镜像
postgres 正常
redis 无限重启,log输出错误 缺失文件
其余两个组件均无法运行 standrad_init_linux.go:195 报错 exec user process caused "exec format error" | 2hard
|
Title: Add `Model-based Deep Reinforcement Learning` to RWKV-LM?
Body: What about add some `Model-based Deep Reinforcement Learning` to RWKV-LM? | 2hard
|
Title: I am using. page SetRequestInterception (True), a page doesn't load properly
Body: I want to get all the requests and responses on the page through the interceptor, but it prevents the page from loading properly.
It's just a simple demo, and I'm just going to listen with an interceptor, and I'm going to print out everything I hear. That's it. | 1medium
|
Title: Assertion on input dim in recurrent model
Body: Hi,
I'd like to try LSTM with an input size less than 3 but I receive this error:
`AssertionError: Input dim should be at least 3.`
Does tflearn inherit this from TF? Would the recurrent model still works fine if I remove that assertion?
| 1medium
|
Title: [BUG] `sktime` fails if an older version of `polars` is installed
Body: Reported by @wirrywoo on discord.
If an older version of `polars` is installed, `sktime` fails due to import chains and module level generation of a test fixture with `DataFrame(strict=False)`, where the `strict` argument is not present in earlier `polars` versions.
The solution is to add the fixture only on `polars` versions that have the argument, and a workaround is to avoid older `polars` versions. | 1medium
|
Title: cannot import aimstack without aimos package
Body: ## ❓Question
I'm trying to setup a Langchain debugger on Windows. Since `aimos` cannot be installed on Windows I installed `aimstack` and have the following code:
```
def get_callbacks() -> list:
callbacks = []
aimos_url = os.environ["AIMOS_URL"]
if aimos_url:
try:
from aimstack.langchain_debugger.callback_handlers import \
GenericCallbackHandler
callbacks.append(GenericCallbackHandler(aimos_url))
except ImportError:
pass
return callbacks
```
For some reason I'm getting ImportError. I've checked that correct venv is used and double checked I've installed `aimstack`. Please help
| 1medium
|
Title: Vedo only render the change when I move my mouse on the screen
Body: it happens to me that the scene only change when I hover my mouse on the screen which does not make it smooth. Can you help to solve this issue ? | 1medium
|
Title: Key Error: 'ib0'
Body: **Environment:**
1. Framework: pytorch
2. Framework version:1.8.0
3. Horovod version:0.21.3
4. MPI version: mpich 3.0.4
5. CUDA version: 10.1
6. NCCL version:
7. Python version:
8. Spark / PySpark version:
9. Ray version:
10. OS and version:
11. GCC version:
12. CMake version:
when I run `horovodrun -np 1 --start-timeout=180 --min-np 1 --max-np 3 --host-discovery-script ./discover_hosts.sh python -u pytorch_mnist_elastic.py `, I got the following error
**Bug report:**
Traceback (most recent call last):
File "/home/test/dat01/txacs/anaconda3/envs/py36/bin/horovodrun", line 8, in <module>
sys.exit(run_commandline())
File "/home/test/dat01/txacs/anaconda3/envs/py36/lib/python3.6/site-packages/horovod/runner/launch.py", line 768, in run_commandline
_run(args)
File "/home/test/dat01/txacs/anaconda3/envs/py36/lib/python3.6/site-packages/horovod/runner/launch.py", line 756, in _run
return _run_elastic(args)
File "/home/test/dat01/txacs/anaconda3/envs/py36/lib/python3.6/site-packages/horovod/runner/launch.py", line 666, in _run_elastic
gloo_run_elastic(settings, env, args.command)
File "/home/test/dat01/txacs/anaconda3/envs/py36/lib/python3.6/site-packages/horovod/runner/gloo_run.py", line 336, in gloo_run_elastic
launch_gloo_elastic(command, exec_command, settings, env, get_common_interfaces, rendezvous)
File "/home/test/dat01/txacs/anaconda3/envs/py36/lib/python3.6/site-packages/horovod/runner/gloo_run.py", line 303, in launch_gloo_elastic
server_ip = network.get_driver_ip(nics)
File "/home/test/dat01/txacs/anaconda3/envs/py36/lib/python3.6/site-packages/horovod/runner/util/network.py", line 100, in get_driver_ip
for addr in net_if_addrs()[iface]:
KeyError: 'ib0'
Launching horovod task function was not successful:
Exception in thread Thread-10:
Traceback (most recent call last):
File "/home/test/dat01/txacs/anaconda3/envs/py36/lib/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
File "/home/test/dat01/txacs/anaconda3/envs/py36/lib/python3.6/threading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "/home/test/dat01/txacs/anaconda3/envs/py36/lib/python3.6/site-packages/horovod/runner/util/threads.py", line 58, in fn_execute
res = fn(*arg[:-1])
File "/home/test/dat01/txacs/anaconda3/envs/py36/lib/python3.6/site-packages/horovod/runner/driver/driver_service.py", line 87, in _exec_command
os._exit(exit_code)
TypeError: an integer is required (got type NoneType)
Launching horovod task function was not successful:
Please help me, thanks!
| 1medium
|
Title: thanks
Body: delete thanks | 3misc
|
Title: SingleUtteranceGmmDecoder.feature_pipeline() causes segmentation fault
Body: Kaldi: compiled from master (d366a93aad)
PyKaldi: pykaldi-cpu 0.1.3 py37h14c3975_1 pykaldi
Python: 3.7.11
OS: Manjaro Linux VM
When calling `feature_pipeline()` from a `SingleUtteranceGmmDecoder` object twice, a segmentation fault occurs.
I am trying to run online GMM based decoding. I translated a similar c++ example that can be found here: <https://kaldi-asr.org/doc/online_decoding.html#GMM-based>, to PyKaldi. But when I try to feed the `OnlineFeaturePipeline` instance with audio data, it crashes with a segmentation fault.
I could enclose the error to being thrown when trying to get the feature pipeline twice and created following minimal working example:
```py
#!/usr/bin/env python
from kaldi.online2 import (
SingleUtteranceGmmDecoder,
OnlineGmmAdaptationState,
OnlineFeaturePipelineCommandLineConfig,
OnlineGmmDecodingConfig,
OnlineFeaturePipelineConfig,
OnlineFeaturePipeline,
OnlineGmmDecodingModels,
)
from kaldi.fstext import read_fst_kaldi
import subprocess, sys
from os.path import expanduser
base_path = expanduser("~/speech/kaldi/asr")
kaldi_root = expanduser("~/speech/kaldi/kaldi")
subprocess.run(
f"{kaldi_root}/src/bin/matrix-sum --binary=false scp:{base_path}/data/train/cmvn.scp - >/tmp/global_cmvn.stats", shell=True
)
feature_cmdline_config = OnlineFeaturePipelineCommandLineConfig()
feature_cmdline_config.feature_type = "mfcc"
feature_cmdline_config.mfcc_config = f"{base_path}/conf/mfcc.conf"
feature_cmdline_config.global_cmvn_stats_rxfilename = "/tmp/global_cmvn.stats"
feature_config = OnlineFeaturePipelineConfig.from_config(feature_cmdline_config)
decode_config = OnlineGmmDecodingConfig()
decode_config.faster_decoder_opts.beam = 11.0
decode_config.faster_decoder_opts.max_active = 7000
decode_config.model_rxfilename = f"{base_path}/exp/mono/final.mdl"
gmm_models = OnlineGmmDecodingModels(decode_config)
pipeline_prototype = OnlineFeaturePipeline(feature_config)
decode_fst = read_fst_kaldi(f"{base_path}/exp/mono/graph/HCLG.fst")
adaptation_state = OnlineGmmAdaptationState()
decoder = SingleUtteranceGmmDecoder(
decode_config, gmm_models, pipeline_prototype, decode_fst, adaptation_state
)
# this one does not crash, but using pipe.accept_waveform crashed for me
pipe = decoder.feature_pipeline()
# the next line crashes with "segmentation fault (core dumped)"
pipe = decoder.feature_pipeline()
``` | 2hard
|
Title: Add raw log endpoint
Body: Inspired by http://atlasboard.bitbucket.org
| 1medium
|
Title: Database Connection per Schema
Body: * GINO version: 0.8.6
* Python version: 3.7.0
* asyncpg version: 0.20.1
* aiocontextvars version: 0.2.2
* PostgreSQL version: 11
### Description
We're trying to implement our database logic to be a single connection to a schema in a database, meaning that we use schemas as databases themselves to maintain our connection pool. We need this since we don't want to connect to different databases as this affects our performance, but we still need to separate the information between different schemas as its client specific.
Currently we are doing this for each new request (because each request could be related to a different client and we need to set a new client schema):
```
async def adjust_schemas(self):
"""Adjust schemas on all model tables."""
for table_name, table_dict in self.__db.tables.items():
table_dict.schema = self.__schema
```
but most probably you can already guess that this messes up with requests that have still not finished giving a response, since the schema could change from a different request and data would go into the wrong client schema.
We can't find any straightforward solution for this. Do you think we can achieve this with Gino?
| 2hard
|
Title: Hi, I created an interactive map with your API, thanks for the dataset!
Body: You can visit the map in [COVID-19 Map](https://python.robertocideos.com)
Thanks for the hardwork and the dataset! | 3misc
|
Title: `Database access not allowed` when passing function to default foreign key
Body: I am getting the following error when I am setting a function as a `default` value for a foreign key. I have the decorator on many tests, but it doesn't even finish loading the first test with the decorator before exploding.
```
Failed: Database access not allowed, use the "django_db" mark, or the "db" or "transactional_db" fixtures to enable it.
```
Here is what I have:
```python
class Score(models.Model):
def default_value():
return Sport.objects.get(game='football').id
sport = models.ForeignKey(
Sport,
null=True,
blank=True,
on_delete=models.SET_NULL,
default=default_value
)
```
1. This works with django since default is either looking for a value or a callable.
2. It works in migrations since it is being called after all of the apps are initialized.
3. It also just works in the normal course of using the project
I suspect this is just tripping up the order of something getting loaded.
| 1medium
|
Title: [Bug]:
Body: ### Don't skip these steps / 不要跳过这些步骤
- [X] I understand that I will be **blocked** if I *intentionally* remove or skip any mandatory\* field / 我明白,如果我“故意”删除或跳过任何强制性的\*字段,我将被**封锁**
- [X] I have checked through the search that there are no similar issues that already exist / 我已经通过搜索仔细检查过没有存在已经创建的相似问题
- [X] I will not submit any issues that are not related to this project / 我不会提交任何与本项目无关的问题
### Occurrence environment / 触发环境
- [ ] Workflow / 工作流
- [ ] GUI / 软件
- [X] Docker
- [ ] Command line / 命令行
### Bug description / 具体描述
docket完整版。同步回来的播放源。
地址后面会有汉字~湖北酒店源~。
直接导入到播放器中,无法播放噢
### Error log / 报错日志
_No response_ | 1medium
|
Title: Add support for HTTP request rewriter
Body: Sometimes we need to pass through proxies which have authorizations, and we need to rewrite our HTTP requests to meet those needs. A `request_rewriter` argument can be added to session objects to support this. | 1medium
|
Title: No alignments file found
Body: Hi, when i am doing "convert". it tells me No alignments file found.
The command I used is:
python3 faceswap.py convert -i ~/faceswap/src/trump/ -o ~/faceswap/converted/ -m ~/faceswap/trump_cage_model/
The console output is :
03/11/2020 10:39:30 ERROR No alignments file found. Please provide an alignments file for your destination video (recommended) or enable on-the-fly conversion (not recommended).
I find there is a xx_alignments.fsa file in the input dir. But no alignments.json file. So what should I do then.
| 1medium
|
Title: Change warning temp
Body: I changed warning temp in v0.4 from 80 to 90
Now I can not find where it was in v0.5
Can you help me please? | 1medium
|
Title: Disabling the GPU causes `--enable-3d-apis` to not work
Body: ## Disabling the GPU causes `--enable-3d-apis` to not work
The fix for this is simple: If using `--enable-3d-apis` / `enable_3d_apis=True`, then don't disable the GPU, which was being set in places to prevent other issues from happening. The GPU was being disabled by the Chromium option: `--disable-gpu`, which is needed under several circumstances. However, once the SeleniumBase option `--enable-3d-apis` is fixed, SeleniumBase will prioritize the 3D stuff over the GPU stuff when using that option.
Related SeleniumBase issues:
* https://github.com/seleniumbase/SeleniumBase/issues/1384
* https://github.com/seleniumbase/SeleniumBase/issues/1873 | 1medium
|
Title: Intermittent failing of ONNX model
Body: # Bug Report
### Describe the bug
I have a script from compiling a `pytorch` model to ONNX that runs inference with the ONNX model, and when running inference on the GPU, it intermittently fails with the error:
```File "/home/ec2-user/anaconda3/envs/onnx/lib/python3.10/site-packages/onnxruntime/capi/onnxruntime_inference_collection.py", line 220, in run
return self._sess.run(output_names, input_feed, run_options)
onnxruntime.capi.onnxruntime_pybind11_state.Fail: [ONNXRuntimeError] : 1 : FAIL : Non-zero status code returned while running Expand node. Name:'/Expand_591' Status Message: /Expand_591: left operand cannot broadcast on dim 0 LeftShape: {243}, RightShape: {267}.
```
Some additional notes:
1. In the script (see below), I'm running inference 10x (via a for loop). When it fails, it fails on the first iteration of the for loop and crashes the script. But, if I re-run the script, it sometimes doesn't fail on that first iteration and completes successfully. Thus, the intermittent nature here seems to be between iterations of the script, _not between iterations of the for loop_.
2. Each time it runs into the error, it does have the `Expand_591` node called out, and the `RightShape {267}` remains the same. However, the `LeftShape` (243 in the error example above) changes.
### System information
- OS Platform and Distribution (*e.g. Linux Ubuntu 20.04*):
<img width="317" alt="image" src="https://github.com/onnx/onnx/assets/124316637/20ccd564-5d0b-4515-a3e1-09fb27b5eb36">
- ONNX version (*e.g. 1.13*):
<img width="235" alt="image" src="https://github.com/onnx/onnx/assets/124316637/c1680d8f-17f0-4239-910f-e84c69ac1a2d">
- Python version: 3.10.6
- Torch version
<img width="158" alt="image" src="https://github.com/onnx/onnx/assets/124316637/ef625eb7-6ff7-4487-bf61-5a93e3afcd1f">
### Reproduction instructions
Script I'm using to test (with private details removed):
```
import onnx
import onnxruntime
import torch
import numpy as np
device = torch.device("cuda")
input_tensor = torch.randn(1, 3, 1280, 896)
input_tensor = input_tensor.to(device)
def to_numpy(tensor):
return tensor.detach().cpu().numpy() if tensor.requires_grad else tensor.cpu().numpy()
onnx_model = onnx.load("exp_06_aug_stacked_strong_v5_step_50_epoch_69.onnx")
onnx.checker.check_model(onnx_model)
ort_session = onnxruntime.InferenceSession(
"exp_06_aug_stacked_strong_v5_step_50_epoch_69.onnx",
providers=['CUDAExecutionProvider']
)
# compute ONNX Runtime output prediction
ort_inputs = {ort_session.get_inputs()[0].name: to_numpy(input_tensor)}
for idx in range(10):
ort_outs = ort_session.run(None, ort_inputs)
```
### Expected behavior
I would expect the model to run successfully each time and not intermittently fail.
### Notes
We got several different flavors of warnings when compiling:
- TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
- TracerWarning: torch. tensor results are registered as constants in the trace. You can safely ignore this warning if you use this function to create tensors out of constant variables that would be the same every time you call this function. In any other case, this might cause the trace to be incorrect.
- TracerWarning: Converting a tensor to a Python float might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs!
- When we compiled the model on the GPU but ran on the CPU, it ran successfully each time. However, it did not produce the same results as the underlying pytorch model.
- When we compiled this same model on CPU and tested using the `CPUExecutionProvider`, we ran into this error 100% of the time:
```
2024-02-08 22:53:05.966710901 [E:onnxruntime:, sequential_executor.cc:514 ExecuteKernel] Non-zero status code returned while running Gather node.
Name:'/Gather_2452' Status Message: indices element out of data bounds,
idx=264 must be within the inclusive range [-264,263]
Traceback (most recent call last): File "/home/ec2-user/projects/onnx/test_onnx_model.py", line 60,
in <module> ort_outs = ort_session.run(None, ort_inputs)
File "/home/ec2-user/anaconda3/envs/onnx/lib/python3.10/site-packages/onnxruntime/capi/onnxruntime_inference_collection.py", line 220, in run return self._sess.run(output_names, input_feed, run_options)
``` | 2hard
|
Title: TestClient request mock HttpRequest is missing SessionStore session attribute
Body: **AttributeError: Mock object has no attribute 'session'**
This error is raised when using TestClient to test a login endpoint that uses `django.contrib.auth.login` because the mock request object as defined here https://github.com/vitalik/django-ninja/blob/master/ninja/testing/client.py#L128-L138 is missing a session attribute.
**Possible Solution**
I was able to solve this issue on my own by monkey patching the test client by defining a function like
```
from django.contrib.sessions.backends.db import SessionStore
def _new_build_request(self, *args, **kwargs) -> Mock:
"""Method to be monkey patched into the TestClient to add session store to the request mock"""
mock = self._old_build_request(*args, **kwargs)
mock.session = SessionStore()
return mock
```
and then using this new function to replace the `_build_request` function in my TestClient instance like
```
client._old_build_request = client._build_request
client._build_request = _new_build_request.__get__(client)
```
Maybe a better solution would be to use a SessionStore mock? | 1medium
|
Title: `dataframe.read_parquet` crashed with DefaultAzureCredential cannot be deterministically hashed
Body: <!-- Please include a self-contained copy-pastable example that generates the issue if possible.
Please be concise with code posted. See guidelines below on how to provide a good bug report:
- Craft Minimal Bug Reports http://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports
- Minimal Complete Verifiable Examples https://stackoverflow.com/help/mcve
Bug reports that follow these guidelines are easier to diagnose, and so are often handled much more quickly.
-->
**Describe the issue**:
Dask 2024.2.1 version in python 3.9 works as expected.
Dask 2024.12.0 version in python 3.12 crashed with
```
File "/home/user/conda-envs/dev-env/lib/python3.12/site-packages/dask/utils.py", line 772, in __call__
return meth(arg, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/conda-envs/dev-env/lib/python3.12/site-packages/dask/tokenize.py", line 159, in normalize_seq
return type(seq).__name__, _normalize_seq_func(seq)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/conda-envs/dev-env/lib/python3.12/site-packages/dask/tokenize.py", line 152, in _normalize_seq_func
return tuple(map(_inner_normalize_token, seq))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/conda-envs/dev-env/lib/python3.12/site-packages/dask/tokenize.py", line 146, in _inner_normalize_token
return normalize_token(item)
^^^^^^^^^^^^^^^^^^^^^
File "/home/user/conda-envs/dev-env/lib/python3.12/site-packages/dask/utils.py", line 772, in __call__
return meth(arg, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/conda-envs/dev-env/lib/python3.12/site-packages/dask/tokenize.py", line 210, in normalize_object
_maybe_raise_nondeterministic(
File "/home/user/conda-envs/dev-env/lib/python3.12/site-packages/dask/tokenize.py", line 89, in _maybe_raise_nondeterministic
raise TokenizationError(msg)
dask.tokenize.TokenizationError: Object <azure.identity.aio._credentials.default.DefaultAzureCredential object at 0x7fb2dad44d40> cannot be deterministically hashed. See https://docs.dask.org/en/latest/custom-collections.html#implementing-deterministic-hashing for more information.
```
Note that in the following example if i replace `storage_options` by `filesystem` it works.
```python
from adlfs.spec import AzureBlobFileSystem
filesystem = AzureBlobFileSystem(
**storage_options,
)
```
**Minimal Complete Verifiable Example**:
```python
import pyarrow as pa
import dask.dataframe as dd
from azure.identity.aio import DefaultAzureCredential
DEV_PA_SCHEMAS = pa.schema([
('dev_code', pa.string()),
('dev_value', pa.float64()),
])
storage_options = dict(
account_name='my_azure_blob_storage_name',
credential=DefaultAzureCredential(),
)
d = dd.read_parquet(
[
'az://my-container/2024-12-17/file1.parquet',
'az://my-container/2024-12-17/file2.parquet',
],
filters=None,
index=False,
columns=['dev_code'],
engine='pyarrow',
storage_options=storage_options,
open_file_options=dict(precache_options=dict(method='parquet')),
schema=DEV_PA_SCHEMAS,
)['dev_code'].unique().compute()
```
**Anything else we need to know?**:
**Environment**: Azure Kubernetes pod
- Dask version: 2024.12.0
- Python version: 3.12.8
- Operating System: Ubuntu 22.04
- Install method (conda, pip, source): conda
- Pandas version: 2.2.3
- Pyarrow version: 18.1.0
| 1medium
|
Title: There is no config.json in pre-trained BERT models by DeepPavlov
Body: BERT pre-trained models from http://docs.deeppavlov.ai/en/master/features/pretrained_vectors.html#bert have `bert_config.json` instead of `config.json`. This leads to errors when these models are used with HuggingFace Transformers:
```python
from transformers import AutoTokenizer
t = AutoTokenizer.from_pretrained("./conversational_cased_L-12_H-768_A-12_v1")
```
```
OSError Traceback (most recent call last)
<ipython-input-2-1a3f920b5ef3> in <module>
----> 1 t = AutoTokenizer.from_pretrained("/home/yurakuratov/.deeppavlov/downloads/bert_models/conversational_cased_L-12_H-768_A-12_v1")
~/anaconda3/envs/dp_tf1.15/lib/python3.7/site-packages/transformers/tokenization_auto.py in from_pretrained(cls, pretrained_model_name_or_path, *inputs, **kwargs)
184 config = kwargs.pop("config", None)
185 if not isinstance(config, PretrainedConfig):
--> 186 config = AutoConfig.from_pretrained(pretrained_model_name_or_path, **kwargs)
187
188 if "bert-base-japanese" in pretrained_model_name_or_path:
~/anaconda3/envs/dp_tf1.15/lib/python3.7/site-packages/transformers/configuration_auto.py in from_pretrained(cls, pretrained_model_name_or_path, **kwargs)
185 """
186 config_dict, _ = PretrainedConfig.get_config_dict(
--> 187 pretrained_model_name_or_path, pretrained_config_archive_map=ALL_PRETRAINED_CONFIG_ARCHIVE_MAP, **kwargs
188 )
189
~/anaconda3/envs/dp_tf1.15/lib/python3.7/site-packages/transformers/configuration_utils.py in get_config_dict(cls, pretrained_model_name_or_path, pretrained_config_archive_map, **kwargs)
268 )
269 )
--> 270 raise EnvironmentError(msg)
271
272 except json.JSONDecodeError:
OSError: Can't load '/home/yurakuratov/.deeppavlov/downloads/bert_models/conversational_cased_L-12_H-768_A-12_v1'. Make sure that:
- '/home/yurakuratov/.deeppavlov/downloads/bert_models/conversational_cased_L-12_H-768_A-12_v1' is a correct model identifier listed on 'https://huggingface.co/models'
- or '/home/yurakuratov/.deeppavlov/downloads/bert_models/conversational_cased_L-12_H-768_A-12_v1' is the correct path to a directory containing a 'config.json' file
```
Renaming `bert_config.json` to `config.json` should solve the problem. | 0easy
|
Title: Cannot close the proxy
Body: <!-- Summary. -->
In windows pycharm jupyterlab when i open windows system proxy requests will use the proxy i set on windows system.
but cannot close this proxy direct to the internet . I try
```python
response = requests.post(url, headers=headers, json=data, proxies=None)
response = requests.post(url, headers=headers, json=data, proxies={})
response = requests.post(url, headers=headers, json=data, proxies="")
```
can't work
## Expected Result
don't use proxy I set on windows
<!-- What you expected. -->
## Actual Result
I can check this connection on clash
<!-- What happened instead. -->
## Reproduction Steps
windows requests 2.31.0
use pycharm and jupyter
```python
import requests
response = requests.post(url, headers=headers, json=data, proxies=None)# I try None {} "" []
```
## System Information
$ python -m requests.help
```json
{
"chardet": {
"version": null
},
"charset_normalizer": {
"version": "2.0.4"
},
"cryptography": {
"version": "41.0.7"
},
"idna": {
"version": "3.4"
},
"implementation": {
"name": "CPython",
"version": "3.11.5"
},
"platform": {
"release": "10",
"system": "Windows"
},
"pyOpenSSL": {
"openssl_version": "300000c0",
"version": "23.2.0"
},
"requests": {
"version": "2.31.0"
},
"system_ssl": {
"version": "300000c0"
},
"urllib3": {
"version": "1.26.18"
},
"using_charset_normalizer": true,
"using_pyopenssl": true
}
```
<!-- This command is only available on Requests v2.16.4 and greater. Otherwise,
please provide some basic information about your system (Python version,
operating system, &c). -->
| 1medium
|
Title: Support for Multi-Modality Models (DeepSeek Janus-Pro-7B)
Body: ### Feature request
I’m requesting support for multi_modality models in transformers, specifically for models like DeepSeek Janus-Pro-7B.
Currently, when attempting to load this model using AutoModel.from_pretrained(), I received the following error:
KeyError: 'multi_modality'
During handling of the above exception, another exception occurred:
ValueError Traceback (most recent call last)
[/usr/local/lib/python3.11/dist-packages/transformers/models/auto/configuration_auto.py](https://localhost:8080/#) in from_pretrained(cls, pretrained_model_name_or_path, **kwargs)
1092 config_class = CONFIG_MAPPING[config_dict["model_type"]]
1093 except KeyError:
-> 1094 raise ValueError(
1095 f"The checkpoint you are trying to load has model type `{config_dict['model_type']}` "
1096 "but Transformers does not recognize this architecture. This could be because of an "
ValueError: The checkpoint you are trying to load has model type `multi_modality` but Transformers does not recognize this architecture. This could be because of an issue with the checkpoint, or because your version of Transformers is out of date.
### Motivation
I’d like to use DeepSeek Janus-Pro-7B with transformers, but since it’s labeled as multi_modality, it cannot be loaded.
Is there an ETA for support?
Are there any workarounds to load the model until official support is added?
### Your contribution
At this time, I am unable to submit a PR, but I am happy to help with testing once support for multi_modality models is added. If there are any workarounds or steps to try, I’d be glad to assist in debugging and verifying compatibility. | 1medium
|
Title: Navigation bar vanishes in case of protected event in an otherwise unprotected category for logged in user
Body: **Describe the bug / how to reprocess**
Maybe it's a feature, not a bug, but I'll leave it here, as I find it mildly annoying :sweat_smile:
I'm logged in to our Indico instance and can see all the categories and events that I have the permissions to see, and in each category I can also see protected events but can't open them, which is OK.
When I click on an unprotected event in an unprotected category (=unprotected when logged in, i.e. I have the rights to see it) I see the navigation bar at the top (Figure 1). If I now use the "go to previous event" (Older Event) or "go to next event" (Newer Event) this works fine, until I reach a protected event, where I see the "Access denied" message and all navigation vanishes (Figure 2). The only option is to go back in the history to the previously visited event, go up to the category, select the next unprotected event in the direction Older / Newer that I want to go, and then I can use the shortcuts to navigate again - until I encounter the next protected event in the category. Example (after navigating to category `Sub category Foo`:
```
Home page >> Some Category >> Sub category Foo
.
.
.
8. Event on Topic A
7. Event on Topic C
6. Event on Topic B
5. Conveners meeting (protected)
4. Event on Topic A
3. Event on Topic B
.
.
.
```
In this case if I start at event 7 by clicking on it, and proceed to go to `Older event` I reach event 6 - fine. If I click `Older event` again, I get to the protected event, get the `Access denied` message, and all of the navigation is gone. I can't just go to the category, nor just simply click `Older event` again to get to event 4 which would be the ideal case. The only way to continue is to go back in browser history as described above. Same if I start at event 1, 2, 3 and click `Newer Event`.
**Expected behavior**
Ideally, the navigation bar would still be present, even if the event is protected and the `Access denied` message is shown, to allow for easy navigation. It's still clear that I'm not supposed to see the content of that meeting, but I know it is there anyway from the category overview, but at least I can easily go to the older or newer event.
**Screenshots**

Figure 1: Usual navigation bar

Figure 2: For restricted / protected events I don't have the permissions to see
I hope the bug description is clear enough. If this is the desired behaviour, I'm happy to learn about the reasons :slightly_smiling_face: | 1medium
|
Title: Scattermapbox cluster says “The layer does not exist in the map’s style…”
Body: **Describe your context**
```
dash 2.14.1
dash-auth 2.0.0
dash-bootstrap-components 1.4.1
dash-core-components 2.0.0
dash-extensions 1.0.1
dash-html-components 2.0.0
dash-leaflet 0.1.23
dash-table 5.0.0
plotly 5.18.0
```
**Describe the bug**
Hi,
I’m trying to create a webapp which uses the cluster function within scattermapbox. However, every so often, when loading the webapp, I’m presented with the following console error (which prevents any further interaction with the map):
```
Uncaught (in promise) Error: Mapbox error.
```
followed by multiple errors of the type:
```
Error: The layer 'plotly-trace-layer-4f7f6d-circle' does not exist in the map's style and cannot be queried for features.
```
I’ve created the following minimal example which throws up the same errors (they occur once every ~10 times I reload the webapp making the issue hard to track down). The example creates a list of random points around the world and plots them on a map. The example includes a simple callback to print the location of a point when clicking on it. I’ve tracked the issue down to the use of the cluster option in the “map_data” list (i.e. if I disable the cluster option, the errors no longer appear). From other posts/the documentation, I’m aware that the cluster option is not expected to work with OpenStreetMaps tiles hence the example requires a Mapbox access token.
```python
from dash import Dash, dcc, html
from dash import Input, Output
from random import randint, seed
# -- Fix the randomness
seed(10)
# -- Generate random data
npoints = 100
latitudes = [randint(-90, 90) for i in range(npoints)]
longitudes = [randint(-180, 180) for i in range(npoints)]
colors = ["green" for i in range(npoints)]
# -- Mapbox styles
mapbox_style = "streets"
mapbox_accesstoken = open(".mapbox_token").read().strip()
# -- Set map data
map_data = [
{
"type": "scattermapbox",
"lat": latitudes,
"lon": longitudes,
"mode": "markers",
"marker": {
"size": 15,
"color": colors,
},
"cluster": {
"enabled": True,
"color": "green",
"type": "circle",
"maxzoom": 10,
"size": 25,
"opacity": 0.7,
},
},
]
# -- Set map layout
map_layout = {
"mapbox": {
"style": mapbox_style,
"accesstoken": mapbox_accesstoken,
},
"clickmode": "event",
"margin": {"t": 0, "r": 0, "b": 0, "l": 0},
}
# -- Create div with map and a dummy div for the callback
layout = html.Div(
children=[
dcc.Graph(
id="world-map",
figure={"data": map_data, "layout": map_layout},
config={"displayModeBar": False, "scrollZoom": True},
style={"height": "100vh"},
),
html.Div(id="dummy"),
],
)
# -- Create app
app = Dash(
__name__,
)
app.layout = layout
# -- Simple callback to print click data
@app.callback(
Output("dummy", "children"),
Input("world-map", "clickData"),
prevent_initial_call=True,
)
def print_click(
clickData,
):
lat = clickData["points"][0]["lat"]
lon = clickData["points"][0]["lon"]
print("Clicked on point at lat/lon {}/{}".format(lat, lon))
return None
if __name__ == "__main__":
app.run_server(debug=True, use_reloader=False, host="0.0.0.0", port=8081)
```
I have tested the code on multiple computers with different browsers and they all present the same issue. The full console logs for the errors are:
```
Uncaught (in promise) Error: Mapbox error.
r plotly.min.js:8
fire plotly.min.js:8
fire plotly.min.js:8
queryRenderedFeatures plotly.min.js:8
queryRenderedFeatures plotly.min.js:8
hoverPoints plotly.min.js:8
ht plotly.min.js:8
hover plotly.min.js:8
hover plotly.min.js:8
l plotly.min.js:8
throttle plotly.min.js:8
hover plotly.min.js:8
initFx plotly.min.js:8
fire plotly.min.js:8
mousemove plotly.min.js:8
handleEvent plotly.min.js:8
addEventListener plotly.min.js:8
ki plotly.min.js:8
i plotly.min.js:8
createMap plotly.min.js:8
n plotly.min.js:8
plot plotly.min.js:8
plot plotly.min.js:8
drawData plotly.min.js:8
syncOrAsync plotly.min.js:8
_doPlot plotly.min.js:8
newPlot plotly.min.js:8
react plotly.min.js:8
React 3
commitLifeCycles [email protected]_14_1m1699425702.14.0.js:19949
commitLayoutEffects [email protected]_14_1m1699425702.14.0.js:22938
callCallback [email protected]_14_1m1699425702.14.0.js:182
invokeGuardedCallbackDev [email protected]_14_1m1699425702.14.0.js:231
invokeGuardedCallback [email protected]_14_1m1699425702.14.0.js:286
commitRootImpl [email protected]_14_1m1699425702.14.0.js:22676
unstable_runWithPriority [email protected]_14_1m1699425702.14.0.js:2685
runWithPriority$1 [email protected]_14_1m1699425702.14.0.js:11174
commitRoot [email protected]_14_1m1699425702.14.0.js:22516
finishSyncRender [email protected]_14_1m1699425702.14.0.js:21942
performSyncWorkOnRoot [email protected]_14_1m1699425702.14.0.js:21928
flushSyncCallbackQueueImpl [email protected]_14_1m1699425702.14.0.js:11224
unstable_runWithPriority [email protected]_14_1m1699425702.14.0.js:2685
runWithPriority$1 [email protected]_14_1m1699425702.14.0.js:11174
flushSyncCallbackQueueImpl [email protected]_14_1m1699425702.14.0.js:11219
workLoop [email protected]_14_1m1699425702.14.0.js:2629
flushWork [email protected]_14_1m1699425702.14.0.js:2584
performWorkUntilDeadline [email protected]_14_1m1699425702.14.0.js:2196
EventHandlerNonNull* [email protected]_14_1m1699425702.14.0.js:2219
<anonymous> [email protected]_14_1m1699425702.14.0.js:15
<anonymous> [email protected]_14_1m1699425702.14.0.js:16
```
and
```
Error: The layer 'plotly-trace-layer-4f7f6d-circle' does not exist in the map's style and cannot be queried for features.
queryRenderedFeatures plotly.min.js:8
queryRenderedFeatures plotly.min.js:8
hoverPoints plotly.min.js:8
ht plotly.min.js:8
hover plotly.min.js:8
hover plotly.min.js:8
l plotly.min.js:8
throttle plotly.min.js:8
hover plotly.min.js:8
initFx plotly.min.js:8
fire plotly.min.js:8
mousemove plotly.min.js:8
handleEvent plotly.min.js:8
addEventListener plotly.min.js:8
ki plotly.min.js:8
i plotly.min.js:8
createMap plotly.min.js:8
n plotly.min.js:8
plot plotly.min.js:8
plot plotly.min.js:8
drawData plotly.min.js:8
syncOrAsync plotly.min.js:8
_doPlot plotly.min.js:8
newPlot plotly.min.js:8
react plotly.min.js:8
React 3
commitLifeCycles [email protected]_14_1m1699425702.14.0.js:19949
commitLayoutEffects [email protected]_14_1m1699425702.14.0.js:22938
callCallback [email protected]_14_1m1699425702.14.0.js:182
invokeGuardedCallbackDev [email protected]_14_1m1699425702.14.0.js:231
invokeGuardedCallback [email protected]_14_1m1699425702.14.0.js:286
commitRootImpl [email protected]_14_1m1699425702.14.0.js:22676
unstable_runWithPriority [email protected]_14_1m1699425702.14.0.js:2685
runWithPriority$1 [email protected]_14_1m1699425702.14.0.js:11174
commitRoot [email protected]_14_1m1699425702.14.0.js:22516
finishSyncRender [email protected]_14_1m1699425702.14.0.js:21942
performSyncWorkOnRoot [email protected]_14_1m1699425702.14.0.js:21928
flushSyncCallbackQueueImpl [email protected]_14_1m1699425702.14.0.js:11224
unstable_runWithPriority [email protected]_14_1m1699425702.14.0.js:2685
runWithPriority$1 [email protected]_14_1m1699425702.14.0.js:11174
flushSyncCallbackQueueImpl [email protected]_14_1m1699425702.14.0.js:11219
workLoop [email protected]_14_1m1699425702.14.0.js:2629
flushWork [email protected]_14_1m1699425702.14.0.js:2584
performWorkUntilDeadline [email protected]_14_1m1699425702.14.0.js:2196
EventHandlerNonNull* [email protected]_14_1m1699425702.14.0.js:2219
<anonymous> [email protected]_14_1m1699425702.14.0.js:15
<anonymous> [email protected]_14_1m1699425702.14.0.js:16
plotly.min.js:8:2494743
fire plotly.min.js:8
queryRenderedFeatures plotly.min.js:8
queryRenderedFeatures plotly.min.js:8
hoverPoints plotly.min.js:8
ht plotly.min.js:8
hover plotly.min.js:8
hover plotly.min.js:8
l plotly.min.js:8
throttle plotly.min.js:8
hover plotly.min.js:8
initFx plotly.min.js:8
fire plotly.min.js:8
mousemove plotly.min.js:8
handleEvent plotly.min.js:8
(Async: EventListener.handleEvent)
addEventListener plotly.min.js:8
ki plotly.min.js:8
i plotly.min.js:8
createMap plotly.min.js:8
n plotly.min.js:8
plot plotly.min.js:8
plot plotly.min.js:8
drawData plotly.min.js:8
syncOrAsync plotly.min.js:8
_doPlot plotly.min.js:8
newPlot plotly.min.js:8
react plotly.min.js:8
React 3
commitLifeCycles [email protected]_14_1m1699425702.14.0.js:19949
commitLayoutEffects [email protected]_14_1m1699425702.14.0.js:22938
callCallback [email protected]_14_1m1699425702.14.0.js:182
invokeGuardedCallbackDev [email protected]_14_1m1699425702.14.0.js:231
invokeGuardedCallback [email protected]_14_1m1699425702.14.0.js:286
commitRootImpl [email protected]_14_1m1699425702.14.0.js:22676
unstable_runWithPriority [email protected]_14_1m1699425702.14.0.js:2685
runWithPriority$1 [email protected]_14_1m1699425702.14.0.js:11174
commitRoot [email protected]_14_1m1699425702.14.0.js:22516
finishSyncRender [email protected]_14_1m1699425702.14.0.js:21942
performSyncWorkOnRoot [email protected]_14_1m1699425702.14.0.js:21928
flushSyncCallbackQueueImpl [email protected]_14_1m1699425702.14.0.js:11224
unstable_runWithPriority [email protected]_14_1m1699425702.14.0.js:2685
runWithPriority$1 [email protected]_14_1m1699425702.14.0.js:11174
flushSyncCallbackQueueImpl [email protected]_14_1m1699425702.14.0.js:11219
workLoop [email protected]_14_1m1699425702.14.0.js:2629
flushWork [email protected]_14_1m1699425702.14.0.js:2584
performWorkUntilDeadline [email protected]_14_1m1699425702.14.0.js:2196
(Async: EventHandlerNonNull)
<anonymous> [email protected]_14_1m1699425702.14.0.js:2219
<anonymous> [email protected]_14_1m1699425702.14.0.js:15
<anonymous> [email protected]_14_1m1699425702.14.0.js:16
```
Any help on understanding the source of the issue and a way to remedy it would be greatly appreciated!
[This is a duplicate of [this post](https://community.plotly.com/t/scattermapbox-cluster-bug-the-layer-does-not-exist-in-the-maps-style/80132/1) on the Plotly forum]
| 1medium
|
Title: [Feature request] checking an input rank is within a specific range
Body: ### What is the problem that this feature solves?
Please keep in mind I am new to ONNX. I will be missing context on priorities with the code so this might be useless.
While looking into extending Microsoft's ORT functionality to accept a 5D input for Grid Sampling, I noticed it might be helpful to have shape inferencing capabilities to check an input's rank is within a range when you know the inputs rank ahead of time.
Currently `shape_inference.h` has
```
inline void checkInputRank(InferenceContext& ctx, size_t input_index, int expected_rank) {
// We check the rank only if a rank is known for the input:
if (hasInputShape(ctx, input_index)) {
auto rank = getInputShape(ctx, input_index).dim_size();
if (rank != expected_rank) {
fail_shape_inference("Input ", input_index, " expected to have rank ", expected_rank, " but has rank ", rank);
}
}
}
```
which will work for only one rank. But if you want to extend an operators functionality to work within a certain range of ranks I believe it would be helpful to have an overload that will accept a range instead.
### Alternatives considered
downstream code can use their own implementation by reusing functions like `hasInputShape`, `getInputShape` and `fail_shape_inference`.
### Describe the feature
if it makes sense for the operator to work with different ranks, downstream code will not need to define their own function.
### Will this influence the current api (Y/N)?
no
### Feature Area
shape_inference
### Are you willing to contribute it (Y/N)
Yes
### Notes
I understand this is quite small and insignificant. Figured it was a good entry point to get to contributing to ONNX. | 1medium
|
Title: 400 error in Swagger when using POST/PUT through reqparse
Body: Hey all,
While testing out PUT/POST requests using reqparser through Swagger UI (using _**Try it Out!**_), my application will throw a 400 error with the following message:
`{
"message": "The browser (or proxy) sent a request that this server could not understand."
}`
The same call will result in a success when submitted through Postman however. There is no stacktrace for the error. Also note that this issue only arises through passing the reqparse through @api.expect()
I can successfully pass a model through without any error calling the api on swagger. However, I need the option to pass things like choices etc for the user.
I'm using Flask-restplus v 0.10.0 and Python v 3.6. My SQL is handled through pyodbc 4.0.23.
Here is the code I use for setting up the reqparser:
```
parser = reqparse.RequestParser()
parser.add_argument("alternateNameId", type=int, required=False)
parser.add_argument("alternateName", type=str, required=True)
parser.add_argument("isColloquial", type=bool, required=True, default='False')
parser.add_argument("isSearchTerm", type=bool, required=True)
```
and then it's called through the @api.expect decorator as follows:
```@api.route('/<int:diseaseId>/AlternateName', methods=['PUT'])
class AlternateName(Resource):
@api.doc(model=altNameModel, id='put_alternatename', responses={201: 'Success', 400: 'Validation Error'})
@api.expect(parser)
@auth.requires_auth
def put(self, diseaseId):
```
And here are screenshots of the swagger UI:


I have seen similar issues logged but nothing quite addressing the fact that the operation only fails through the swagger UI and a GET request operates as normal.
Has anyone seen this behavior before or understand how to mitigate it? My users would be using swagger as their main UI to access the endpoint. | 1medium
|
Title: stats not attributing URLs to discovering modules
Body: As an example - ffuf_shortnames discovers URL_UNVERIFIED events which are not tracked in stats, but are then checked by httpx, and some will become URL events. But despite the face that ffuf_shortnames discovered them, it does not get attributed with the URL.
Expected behavior: when HTTPX finds a URL, the stats should get attributed to the module that supplied the URL_UNVERIFIED event not HTTPX itself, falling back to HTTPX if there isn't one.
This should apply to ffuf and excavate as well. In the case of excavate, I think it is much more useful to know it came from excavate then just everything being attributed to httpx. | 1medium
|
Title: Keras fails to load TextVectorization layer from .keras file
Body: When downloading a model I trained on Kaggle using the `.keras` format it fails to load on my machine. I believe it is a codec error because the TextVectorization layer uses the `utf-8` format, but the error message appears to be using the `charmap` codec in python. This is all just speculation though.
```
ValueError: A total of 2 objects could not be loaded. Example error message for object <TextVectorization name=text_vectorization, built=True>:
'charmap' codec can't decode byte 0x8d in position 8946: character maps to <undefined>
List of objects that could not be loaded:
[<TextVectorization name=text_vectorization, built=True>, <StringLookup name=string_lookup, built=False>]
```
In the notebook it was trained on, it loaded perfectly so I don't understand the reason why this failed to work.
My Machine:
python version 3.10.5
```
Name Version Build Channel
_tflow_select 2.3.0 mkl
abseil-cpp 20211102.0 hd77b12b_0
absl-py 2.1.0 py310haa95532_0
aext-assistant 4.0.15 py310haa95532_jl4_0
aext-assistant-server 4.0.15 py310haa95532_0
aext-core 4.0.15 py310haa95532_jl4_0
aext-core-server 4.0.15 py310haa95532_1
aext-panels 4.0.15 py310haa95532_0
aext-panels-server 4.0.15 py310haa95532_0
aext-share-notebook 4.0.15 py310haa95532_0
aext-share-notebook-server 4.0.15 py310haa95532_0
aext-shared 4.0.15 py310haa95532_0
aiohappyeyeballs 2.4.0 py310haa95532_0
aiohttp 3.10.5 py310h827c3e9_0
aiosignal 1.2.0 pyhd3eb1b0_0
anaconda-cloud-auth 0.5.1 py310haa95532_0
anaconda-toolbox 4.0.15 py310haa95532_0
annotated-types 0.6.0 py310haa95532_0
anyio 4.2.0 py310haa95532_0
argon2-cffi 21.3.0 pyhd3eb1b0_0
argon2-cffi-bindings 21.2.0 py310h2bbff1b_0
asttokens 2.0.5 pyhd3eb1b0_0
astunparse 1.6.3 py_0
async-lru 2.0.4 py310haa95532_0
async-timeout 4.0.3 py310haa95532_0
attrs 23.1.0 py310haa95532_0
babel 2.11.0 py310haa95532_0
beautifulsoup4 4.12.3 py310haa95532_0
blas 1.0 mkl
bleach 4.1.0 pyhd3eb1b0_0
blinker 1.6.2 py310haa95532_0
brotli-python 1.0.9 py310hd77b12b_8
bzip2 1.0.8 h2bbff1b_6
c-ares 1.19.1 h2bbff1b_0
ca-certificates 2024.9.24 haa95532_0
cachetools 5.3.3 py310haa95532_0
certifi 2024.8.30 py310haa95532_0
cffi 1.17.1 py310h827c3e9_0
charset-normalizer 3.3.2 pyhd3eb1b0_0
click 8.1.7 py310haa95532_0
colorama 0.4.6 py310haa95532_0
comm 0.2.1 py310haa95532_0
cryptography 41.0.3 py310h3438e0d_0
debugpy 1.6.7 py310hd77b12b_0
decorator 5.1.1 pyhd3eb1b0_0
defusedxml 0.7.1 pyhd3eb1b0_0
exceptiongroup 1.2.0 py310haa95532_0
executing 0.8.3 pyhd3eb1b0_0
flatbuffers 2.0.0 h6c2663c_0
frozenlist 1.4.0 py310h2bbff1b_0
gast 0.4.0 pyhd3eb1b0_0
giflib 5.2.1 h8cc25b3_3
google-auth 2.29.0 py310haa95532_0
google-auth-oauthlib 0.4.4 pyhd3eb1b0_0
google-pasta 0.2.0 pyhd3eb1b0_0
grpc-cpp 1.48.2 hf108199_0
grpcio 1.48.2 py310hf108199_0
h11 0.14.0 py310haa95532_0
h5py 3.11.0 py310hed405ee_0
hdf5 1.12.1 h51c971a_3
httpcore 1.0.2 py310haa95532_0
httpx 0.27.0 py310haa95532_0
icc_rt 2022.1.0 h6049295_2
icu 58.2 ha925a31_3
idna 3.7 py310haa95532_0
importlib-metadata 7.0.1 py310haa95532_0
importlib_metadata 7.0.1 hd3eb1b0_0
intel-openmp 2023.1.0 h59b6b97_46320
ipykernel 6.28.0 py310haa95532_0
ipython 8.27.0 py310haa95532_0
jaraco.classes 3.2.1 pyhd3eb1b0_0
jedi 0.19.1 py310haa95532_0
jinja2 3.1.4 py310haa95532_0
jpeg 9e h827c3e9_3
json5 0.9.6 pyhd3eb1b0_0
jsonschema 4.19.2 py310haa95532_0
jsonschema-specifications 2023.7.1 py310haa95532_0
jupyter-lsp 2.2.0 py310haa95532_0
jupyter_client 8.6.0 py310haa95532_0
jupyter_core 5.7.2 py310haa95532_0
jupyter_events 0.10.0 py310haa95532_0
jupyter_server 2.14.1 py310haa95532_0
jupyter_server_terminals 0.4.4 py310haa95532_1
jupyterlab 4.2.5 py310haa95532_0
jupyterlab_pygments 0.1.2 py_0
jupyterlab_server 2.27.3 py310haa95532_0
keras 2.10.0 py310haa95532_0
keras-preprocessing 1.1.2 pyhd3eb1b0_0
keyring 24.3.1 py310haa95532_0
libcurl 8.9.1 h0416ee5_0
libffi 3.4.4 hd77b12b_1
libpng 1.6.39 h8cc25b3_0
libprotobuf 3.20.3 h23ce68f_0
libsodium 1.0.18 h62dcd97_0
libssh2 1.10.0 hcd4344a_2
markdown 3.4.1 py310haa95532_0
markupsafe 2.1.3 py310h2bbff1b_0
matplotlib-inline 0.1.6 py310haa95532_0
mistune 2.0.4 py310haa95532_0
mkl 2023.1.0 h6b88ed4_46358
mkl-service 2.4.0 py310h2bbff1b_1
mkl_fft 1.3.10 py310h827c3e9_0
mkl_random 1.2.7 py310hc64d2fc_0
more-itertools 10.3.0 py310haa95532_0
multidict 6.0.4 py310h2bbff1b_0
nbclient 0.8.0 py310haa95532_0
nbconvert 7.10.0 py310haa95532_0
nbformat 5.9.2 py310haa95532_0
nest-asyncio 1.6.0 py310haa95532_0
notebook 7.2.2 py310haa95532_0
notebook-shim 0.2.3 py310haa95532_0
numpy 1.26.4 py310h055cbcc_0
numpy-base 1.26.4 py310h65a83cf_0
oauthlib 3.2.2 py310haa95532_0
openssl 1.1.1w h2bbff1b_0
opt_einsum 3.3.0 pyhd3eb1b0_1
overrides 7.4.0 py310haa95532_0
packaging 24.1 py310haa95532_0
pandocfilters 1.5.0 pyhd3eb1b0_0
parso 0.8.3 pyhd3eb1b0_0
pip 24.2 py310haa95532_0
pkce 1.0.3 py310haa95532_0
platformdirs 3.10.0 py310haa95532_0
prometheus_client 0.14.1 py310haa95532_0
prompt-toolkit 3.0.43 py310haa95532_0
prompt_toolkit 3.0.43 hd3eb1b0_0
protobuf 3.20.3 py310hd77b12b_0
psutil 5.9.0 py310h2bbff1b_0
pure_eval 0.2.2 pyhd3eb1b0_0
pyasn1 0.4.8 pyhd3eb1b0_0
pyasn1-modules 0.2.8 py_0
pybind11-abi 5 hd3eb1b0_0
pycparser 2.21 pyhd3eb1b0_0
pydantic 2.8.2 py310haa95532_0
pydantic-core 2.20.1 py310hefb1915_0
pygments 2.15.1 py310haa95532_1
pyjwt 2.8.0 py310haa95532_0
pyopenssl 23.2.0 py310haa95532_0
pysocks 1.7.1 py310haa95532_0
python 3.10.13 h966fe2a_0
python-dateutil 2.9.0post0 py310haa95532_2
python-dotenv 0.21.0 py310haa95532_0
python-fastjsonschema 2.16.2 py310haa95532_0
python-flatbuffers 24.3.25 py310haa95532_0
python-json-logger 2.0.7 py310haa95532_0
pytz 2024.1 py310haa95532_0
pywin32 305 py310h2bbff1b_0
pywin32-ctypes 0.2.2 py310haa95532_0
pywinpty 2.0.10 py310h5da7b33_0
pyyaml 6.0.1 py310h2bbff1b_0
pyzmq 25.1.2 py310hd77b12b_0
re2 2022.04.01 hd77b12b_0
referencing 0.30.2 py310haa95532_0
requests 2.32.3 py310haa95532_0
requests-oauthlib 2.0.0 py310haa95532_0
rfc3339-validator 0.1.4 py310haa95532_0
rfc3986-validator 0.1.1 py310haa95532_0
rpds-py 0.10.6 py310h062c2fa_0
rsa 4.7.2 pyhd3eb1b0_1
scipy 1.13.1 py310h8640f81_0
semver 3.0.2 py310haa95532_0
send2trash 1.8.2 py310haa95532_0
setuptools 75.1.0 py310haa95532_0
six 1.16.0 pyhd3eb1b0_1
snappy 1.2.1 hcdb6601_0
sniffio 1.3.0 py310haa95532_0
soupsieve 2.5 py310haa95532_0
sqlite 3.45.3 h2bbff1b_0
stack_data 0.2.0 pyhd3eb1b0_0
tbb 2021.8.0 h59b6b97_0
tensorboard 2.10.0 py310haa95532_0
tensorboard-data-server 0.6.1 py310haa95532_0
tensorboard-plugin-wit 1.8.1 py310haa95532_0
tensorflow 2.10.0 mkl_py310hd99672f_0
tensorflow-base 2.10.0 mkl_py310h6a7f48e_0
tensorflow-estimator 2.10.0 py310haa95532_0
termcolor 2.1.0 py310haa95532_0
terminado 0.17.1 py310haa95532_0
tinycss2 1.2.1 py310haa95532_0
tk 8.6.14 h0416ee5_0
tomli 2.0.1 py310haa95532_0
tornado 6.4.1 py310h827c3e9_0
traitlets 5.14.3 py310haa95532_0
typing-extensions 4.11.0 py310haa95532_0
typing_extensions 4.11.0 py310haa95532_0
tzdata 2024a h04d1e81_0
urllib3 2.2.3 py310haa95532_0
vc 14.40 h2eaa2aa_1
vs2015_runtime 14.40.33807 h98bb1dd_1
wcwidth 0.2.5 pyhd3eb1b0_0
webencodings 0.5.1 py310haa95532_1
websocket-client 1.8.0 py310haa95532_0
werkzeug 3.0.3 py310haa95532_0
wheel 0.44.0 py310haa95532_0
win_inet_pton 1.1.0 py310haa95532_0
winpty 0.4.3 4
wrapt 1.14.1 py310h2bbff1b_0
xz 5.4.6 h8cc25b3_1
yaml 0.2.5 he774522_0
yarl 1.11.0 py310h827c3e9_0
zeromq 4.3.5 hd77b12b_0
zipp 3.17.0 py310haa95532_0
zlib 1.2.13 h8cc25b3_1
```
On kaggle I used the 2024-8-21 [docker container ](https://github.com/Kaggle/docker-python/releases/tag/5439620d9e9d1944f6c7ed0711374b2f8a603e27bdda6f44b3a207c225454d7b) | 1medium
|
Title: [ENH]: Registering custom markers
Body: ### Problem
While working on a library to make styles (with custom colors, etc...) I discovered that there is no easy way to register custom markers, unlike for colors and the like.
I found a workaround digging in `markers.py`:
```python
from matplotlib.markers import MarkerStyle
...
MarkerStyle.markers[marker_name] = marker_name
setattr(MarkerStyle, f'_set_{marker_name}', lambda self, path=marker_path: self._set_custom_marker(path))
```
which seems to work, and allows to use the new maker in other files as
```python
plt.plot(x, y, marker = marker_name)
```
However, this code is quite clumsy and inelegant!
### Proposed solution
It would be nice to have a way to specify
```python
MarkerStyle.register(marker_name, marker_path)
```
similarly to [how it is done for colormaps](https://matplotlib.org/stable/api/cm_api.html).
This would be pretty easy because it could leverage internally `MarkerStyle._set_custom_marker`, which already implements most of the necessary functionality!
If this is welcome, I would be happy to have a go and submit a PR!
I have found that this is quite nice to drive up the engagement of students to be able to easily play with visuals in this way :) | 1medium
|
Title: Pillow (4.3.0) for manylinux1 is not packaged, instead zappa packages Pillow for Windows 64-bit
Body: This is almost related to #398 / #841 , but instead no Pillow is packaged at all.
## Context
Python 3.6 on Windows (Anaconda)
## Expected Behavior
Pillow 4.3.0 is packaged. It seems that lambda-packages doesn't have pillow 4.3.0 yet, only 3.4.2 (https://github.com/Miserlou/lambda-packages/tree/master/lambda_packages/Pillow), however there is a [manylinux wheel](https://pypi.python.org/pypi/Pillow/4.3.0): Pillow-4.3.0-cp36-cp36m-manylinux1_x86_64.whl which should be usable, right ?
## Actual Behavior
Pillow 4.3.0 is not packaged, and instead zappa uses PIL for Windows 64bit:

Pillow-4.3.0.dist-info exists:

`WHEEL` contains:
```
Wheel-Version: 1.0
Generator: bdist_wheel (0.30.0)
Root-Is-Purelib: false
Tag: cp36-cp36m-win_amd64
```
## Possible Fix
Patch the zip and use the manylinux wheel manually?
## Steps to Reproduce
On Windows 64-bit:
```
pip install Pillow
```
## Your Environment
* Zappa version used: zappa==0.45.1
* Operating System and Python version: Windows 10 64-bit, Python 3.6
* The output of `pip freeze`:
```
argcomplete==1.9.2
Babel==2.5.1
base58==0.2.4
boto==2.48.0
boto3==1.4.8
botocore==1.8.11
cachetools==2.0.1
certifi==2017.11.5
cfn-flip==0.2.5
chardet==3.0.4
click==6.7
decorator==4.1.2
Django==2.0
django-appconf==1.0.2
django-imagekit==4.0.2
django-ipware==1.1.6
django-nine==0.1.13
django-phonenumber-field==1.3.0
django-qartez==0.7.1
django-s3-storage==0.12.1
docutils==0.14
durationpy==0.5
future==0.16.0
google-auth==1.2.1
hjson==3.0.1
httplib2==0.10.3
idna==2.6
jmespath==0.9.3
kappa==0.6.0
lambda-packages==0.19.0
oauth2client==4.1.2
olefile==0.44
phonenumberslite==8.8.5
pilkit==2.0
Pillow==4.3.0
placebo==0.8.1
psycopg2==2.7.3.2
pyasn1==0.4.2
pyasn1-modules==0.2.1
python-dateutil==2.6.1
python-slugify==1.2.4
pytz==2017.3
PyYAML==3.12
ratelim==0.1.6
requests==2.18.4
rsa==3.4.2
s3transfer==0.1.12
six==1.11.0
toml==0.9.3
tqdm==4.19.1
troposphere==2.1.2
Unidecode==0.4.21
uritemplate==3.0.0
urllib3==1.22
Werkzeug==0.12
wsgi-request-logger==0.4.6
zappa==0.45.1
```
* Your `zappa_settings.py`: (Note: this should be `zappa_settings.json`, perhaps you want to change the template?)
```
{
"prd": {
"aws_region": "us-east-1",
"django_settings": "samaraweb.settings",
"profile_name": "default",
"project_name": "samaraweb",
"runtime": "python3.6",
"s3_bucket": "samaraedu-code",
"domain": "keluargasamara.com",
"certificate_arn": "arn:aws:acm:us-east-1:703881650703:certificate/a5683018-90ee-4e47-b59b-bc0d147ed174",
"route53_enabled": false,
"exclude": ["snapshot"]
}
}
``` | 1medium
|
Title: Development and Maintance of this package
Body: Hey, it seems to me that this package is lacking People to maintain and develop it.
I come to this conclusion because many Issues go unanswered and Pull requests not merged.
What can we do about it? Who is willing to actively contribute in any way?
Are the current Maintainers willing to give some level of access to those people or should we gather around a fork? | 3misc
|
Title: No module named 'thefuck'
Body: When I install using the following commands, the terminal say:
File "/home/test/.local/bin/fuck", line 7, in <module>
from thefuck.not_configured import main
ImportError: No module named 'thefuck'
I don't know how to do at next, so I create the issue.
OS:elementary os 0.4
using bash
| 0easy
|
Title: Update selection when already a selection is made
Body: If the plot is made with the `selected features` checkbox, the expression (and the selection) is correct, but it loops in **all** the attribute table and not just in the feature subset.
Handling this is quite tricky. | 2hard
|
Title: Properties of images for the best result
Body: * face_recognition version:
* Python version:
* Operating System:
### Description
Using images to train the Model with face_recognition
### Query
What are all the similar properties (i.e : Image size, resolution) all the image should have So, that face_recognition gives the best results.
| 1medium
|
Title: GINO don't released the connection after exception in Starlette extension
Body: * GINO version: 0.8.3
* Python version: 3.7.4
* asyncpg version: 0.18.3
* aiocontextvars version: 0.2.2
* PostgreSQL version: 11.3
* FastAPI version: 0.36.0
* Starlette version: 0.12.7
* uvicorn version: 0.8.6
* uvloop version: 0.12.2
### Description
I'm use GINO with FastAPI + uvicorn. In development mode i use autoreload by uvicorn, it's works well, but if in my endpoint, where i use GINO, raising exception, GINO interferes stopping application.
### What I Did
For example i have endpoint like this:
```python
@router.get('users/{user_id}', tags=['Users'], response_model=UserSchema)
async def retrieve_user(user_id: int):
user: User = await User.get(user_id)
return UserSchema.from_orm(user)
```
Now going to our server and try to get user with nonexistent ID (http://localhost:8000/users/1818456489489456). Oh no, we got "Internal Server Error". Well, let's fix it:
```python
@router.get('users/{user_id}', tags=['Users'], response_model=UserSchema)
async def retrieve_user(user_id: int):
user: User = await User.get(user_id)
if user:
return UserSchema.from_orm(user)
else:
raise HTTPException(status_code=404, detail="User with this ID not found")
```
Let's test it again. But wait, server don't responding. Ok, let's see the logs:
```
WARNING: Detected file change in 'api/v1/users.py'. Reloading...
INFO: Shutting down
INFO: Waiting for application shutdown.
*** minute wait ***
WARNING: Pool.close() is taking over 60 seconds to complete. Check if you have any unreleased connections left. Use asyncio.wait_for() to set a timeout for Pool.close().
```
Only manual "hard" reset of the server helps.
### What i suggest
After small research i think i found bug (?). After raising exception in endpoint, Starlette Strategy (i don't checked realizations for anothers frameworks) of GINO don't release the connection. I'm added try-finnaly block in class `_Middleware` in `gino.ext.starlette` (inspired by [this](https://python-gino.readthedocs.io/en/latest/gino.engine.html#gino.engine.GinoEngine.acquire))
this code
```python
async def __call__(self, scope: Scope, receive: Receive,
send: Send) -> None:
if (scope['type'] == 'http' and
self.db.config['use_connection_for_request']):
scope['connection'] = await self.db.acquire(lazy=True)
await self.app(scope, receive, send)
conn = scope.pop('connection', None)
if conn is not None:
await conn.release()
return
```
i edited like this:
```python
async def __call__(self, scope: Scope, receive: Receive,
send: Send) -> None:
if (scope['type'] == 'http' and
self.db.config['use_connection_for_request']):
scope['connection'] = await self.db.acquire(lazy=True)
try:
await self.app(scope, receive, send)
finally:
conn = scope.pop('connection', None)
if conn is not None:
await conn.release()
return
```
and after that everything works great.
I am just starting to dive into the world of asynchronous python, so I'm not sure if this is a bug and i'm not sure if this that it completely fixes it. | 1medium
|
Title: Can we convert this in to ServerResponseError.from_response exception instead of NonXMLResponseError
Body: It would be helpful if ServerResponseError.from_response is implemented on line 173 instead NonXMLResponseError.
https://github.com/tableau/server-client-python/blob/4259316ef2e2656531b0c65c71d043708b37b4a9/tableauserverclient/server/endpoint/endpoint.py#L173 | 1medium
|
Title: Fill in empty space in open mesh
Body: 
Hi, I have open mesh and want to fill some space.
So, I try to create points about empty space. And using reconstruct_surface() to create a mesh filled whit empty space.
I want to get points for empty space through plane slicing (intersect_with_plane()) and create spline.
The result is similar to the image below.

The line was recognized individually and there was no order for the direction, making it impossible to fill the empty space through the splines.

Can we order multiple lines made through intercept_with_plane() ? Like the image above
Or Is there any other way to fill in the empty space? | 1medium
|
Title: what is h_dim in vanilla VAE implementation
Body: I tried VAE implementation but did not understand the algo. So I searched for implementations on GitHub and found yours. The problem I am facing with your implementation is to understand 2 things, 1st is what exactly is h_dim and how is the value of it decided?
Thanks in advance | 1medium
|
Title: Travis CI fails for contributor PRs
Body: > <a href="https://github.com/dlmiddlecote"><img align="left" height="50" src="https://avatars0.githubusercontent.com/u/9053880?v=4"></a> An issue by [dlmiddlecote](https://github.com/dlmiddlecote) at _2019-07-09 23:00:41+00:00_
> Original URL: https://github.com/zalando-incubator/kopf/issues/138
>
## Expected Behavior
Build passes if it should, i.e. if all tests pass.
## Actual Behavior
Tests pass but build fails because the coveralls command fails, see [here](https://travis-ci.org/dlmiddlecote/kopf/jobs/556541531).
### Side Note
Tags also build in forks, which could lead to versions of the library being uploaded to pupils.
---
> <a href="https://github.com/dlmiddlecote"><img align="left" height="30" src="https://avatars0.githubusercontent.com/u/9053880?v=4"></a> Commented by [dlmiddlecote](https://github.com/dlmiddlecote) at _2019-07-14 14:21:20+00:00_
>
Solution to this is to turn on coveralls support for kopf fork repo. | 1medium
|
Title: unicode issues
Body: When I follow the example to retrieve data I'm greeted with the following stacktrace:
```
In [4]: supabase.table("countries").select("*").execute()
---------------------------------------------------------------------------
UnicodeEncodeError Traceback (most recent call last)
<ipython-input-4-91499f52c962> in <module>
----> 1 supabase.table("countries").select("*").execute()
/usr/lib/python3.8/site-packages/supabase_py/client.py in table(self, table_name)
72 Alternatively you can use the `._from()` method.
73 """
---> 74 return self.from_(table_name)
75
76 def from_(self, table_name: str) -> SupabaseQueryBuilder:
/usr/lib/python3.8/site-packages/supabase_py/client.py in from_(self, table_name)
79 See the `table` method.
80 """
---> 81 query_builder = SupabaseQueryBuilder(
82 url=f"{self.rest_url}/{table_name}",
83 headers=self._get_auth_headers(),
/usr/lib/python3.8/site-packages/supabase_py/lib/query_builder.py in __init__(self, url, headers, schema, realtime, table)
71 **headers,
72 }
---> 73 self.session = AsyncClient(base_url=url, headers=headers)
74 # self._subscription = SupabaseRealtimeClient(realtime, schema, table)
75 # self._realtime = realtime
/usr/lib/python3.8/site-packages/httpx/_client.py in __init__(self, auth, params, headers, cookies, verify, cert, http2, proxies, timeout, limits, pool_limits, max_redirects, event_hooks, base_url, transport, app, trust_env)
1209 trust_env: bool = True,
1210 ):
-> 1211 super().__init__(
1212 auth=auth,
1213 params=params,
/usr/lib/python3.8/site-packages/httpx/_client.py in __init__(self, auth, params, headers, cookies, timeout, max_redirects, event_hooks, base_url, trust_env)
98 self._auth = self._build_auth(auth)
99 self._params = QueryParams(params)
--> 100 self.headers = Headers(headers)
101 self._cookies = Cookies(cookies)
102 self._timeout = Timeout(timeout)
/usr/lib/python3.8/site-packages/httpx/_models.py in __init__(self, headers, encoding)
549 self._list = list(headers._list)
550 elif isinstance(headers, dict):
--> 551 self._list = [
552 (
553 normalize_header_key(k, lower=False, encoding=encoding),
/usr/lib/python3.8/site-packages/httpx/_models.py in <listcomp>(.0)
553 normalize_header_key(k, lower=False, encoding=encoding),
554 normalize_header_key(k, lower=True, encoding=encoding),
--> 555 normalize_header_value(v, encoding),
556 )
557 for k, v in headers.items()
/usr/lib/python3.8/site-packages/httpx/_utils.py in normalize_header_value(value, encoding)
54 if isinstance(value, bytes):
55 return value
---> 56 return value.encode(encoding or "ascii")
57
58
UnicodeEncodeError: 'ascii' codec can't encode character '\u2026' in position 50: ordinal not in range(128)
In [5]: data = supabase.table("countries").select("*").execute()
---------------------------------------------------------------------------
UnicodeEncodeError Traceback (most recent call last)
<ipython-input-5-a2ce57b52ae2> in <module>
----> 1 data = supabase.table("countries").select("*").execute()
/usr/lib/python3.8/site-packages/supabase_py/client.py in table(self, table_name)
72 Alternatively you can use the `._from()` method.
73 """
---> 74 return self.from_(table_name)
75
76 def from_(self, table_name: str) -> SupabaseQueryBuilder:
/usr/lib/python3.8/site-packages/supabase_py/client.py in from_(self, table_name)
79 See the `table` method.
80 """
---> 81 query_builder = SupabaseQueryBuilder(
82 url=f"{self.rest_url}/{table_name}",
83 headers=self._get_auth_headers(),
/usr/lib/python3.8/site-packages/supabase_py/lib/query_builder.py in __init__(self, url, headers, schema, realtime, table)
71 **headers,
72 }
---> 73 self.session = AsyncClient(base_url=url, headers=headers)
74 # self._subscription = SupabaseRealtimeClient(realtime, schema, table)
75 # self._realtime = realtime
/usr/lib/python3.8/site-packages/httpx/_client.py in __init__(self, auth, params, headers, cookies, verify, cert, http2, proxies, timeout, limits, pool_limits, max_redirects, event_hooks, base_url, transport, app, trust_env)
1209 trust_env: bool = True,
1210 ):
-> 1211 super().__init__(
1212 auth=auth,
1213 params=params,
/usr/lib/python3.8/site-packages/httpx/_client.py in __init__(self, auth, params, headers, cookies, timeout, max_redirects, event_hooks, base_url, trust_env)
98 self._auth = self._build_auth(auth)
99 self._params = QueryParams(params)
--> 100 self.headers = Headers(headers)
101 self._cookies = Cookies(cookies)
102 self._timeout = Timeout(timeout)
/usr/lib/python3.8/site-packages/httpx/_models.py in __init__(self, headers, encoding)
549 self._list = list(headers._list)
550 elif isinstance(headers, dict):
--> 551 self._list = [
552 (
553 normalize_header_key(k, lower=False, encoding=encoding),
/usr/lib/python3.8/site-packages/httpx/_models.py in <listcomp>(.0)
553 normalize_header_key(k, lower=False, encoding=encoding),
554 normalize_header_key(k, lower=True, encoding=encoding),
--> 555 normalize_header_value(v, encoding),
556 )
557 for k, v in headers.items()
/usr/lib/python3.8/site-packages/httpx/_utils.py in normalize_header_value(value, encoding)
54 if isinstance(value, bytes):
55 return value
---> 56 return value.encode(encoding or "ascii")
57
58
UnicodeEncodeError: 'ascii' codec can't encode character '\u2026' in position 50: ordinal not in range(128)
```
I've tried this on Python 3.7, 3.8, and 3.9 all with similar results. I've also tried different OSes (OSX, Linux), but both fail in similar fashion. | 1medium
|
Title: Request.from_curl() with $-prefixed string literals
Body: Chrome (and probably other things) sometimes generate curl commands with a [$-prefixed](https://www.gnu.org/software/bash/manual/html_node/ANSI_002dC-Quoting.html) data string, probably when it's easier to represent the string in that way or when it includes non-ASCII characters, e.g. the DiscoverQueryRendererQuery XHR on https://500px.com/popular is copied as
```
curl 'https://api.500px.com/graphql' \
<headers omitted>
--data-raw $'{"operationName":"DiscoverQueryRendererQuery",<omitted> "query":"query DiscoverQueryRendererQuery($filters: [PhotoDiscoverSearchFilter\u0021], <the rest omitted>' \
--compressed
```
, most likely because of `\u0021` in this payload.
`scrapy.utils.curl.curl_to_request_kwargs()` isn't smart enough to understand this kind of shell escaping, so it puts `$` into the request body which is incorrect. Ideally we should support this, though I don't know if there are existing libraries to unescape this. | 1medium
|
Title: model from_pretrained bug in 4.50.dev0 in these days
Body: ### System Info
- `transformers` version: 4.50.dev0
- Platform: Linux-5.10.101-1.el8.ssai.x86_64-x86_64-with-glibc2.31
- Python version: 3.10.16
- Huggingface_hub version: 0.29.1
- Safetensors version: 0.5.3
- Accelerate version: 1.4.0
- Accelerate config: not found
- DeepSpeed version: 0.15.4
- PyTorch version (GPU?): 2.5.1+cu124 (True)
- Tensorflow version (GPU?): not installed (NA)
- Flax version (CPU?/GPU?/TPU?): not installed (NA)
- Jax version: not installed
- JaxLib version: not installed
- Using distributed or parallel set-up in script?: <fill in>
- Using GPU in script?: <fill in>
- GPU type: NVIDIA A800-SXM4-80GB
### Who can help?
@amyeroberts, @qubvel
### Information
- [x] The official example scripts
- [ ] My own modified scripts
### Tasks
- [x] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [ ] My own task or dataset (give details below)
### Reproduction
code sample
```
from transformers import Qwen2_5_VLForConditionalGeneration, AutoProcessor
model_path = "Qwen/Qwen2.5-VL-7B-Instruct"
model = Qwen2_5_VLForConditionalGeneration.from_pretrained(
model_path,
torch_dtype=torch.bfloat16,
device_map="auto",
trust_remote_code=True
)
processor = AutoProcessor.from_pretrained(model_path)
```
When I configured the environment and ran the code on a new machine as usual today, I encountered the following error
```
Loading checkpoint shards: 0%|
| 0/5 [00:00<?, ?it/s]
[rank0]: Traceback (most recent call last):
[rank0]: File "/mnt/……/Qwen2.5-VL/…r/script.py", line 14, in <module>
[rank0]: model = Qwen2_5_VLForConditionalGeneration.from_pretrained(
[rank0]: File "/opt/conda/envs/…/lib/python3.10/site-packages/transformers/modeling_utils.py", line 269, in _wrapper
[rank0]: return func(*args, **kwargs)
[rank0]: File "/opt/conda/envs/…/lib/python3.10/site-packages/transformers/modeling_utils.py", line 4417, in from_pretrained
[rank0]: ) = cls._load_pretrained_model(
[rank0]: File "/opt/conda/envs/…/lib/python3.10/site-packages/transformers/modeling_utils.py", line 4985, in _load_pretrained_model
[rank0]: new_error_msgs, offload_index, state_dict_index = _load_state_dict_into_meta_model(
[rank0]: File "/opt/conda/envs/…/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 116, in decorate_context
[rank0]: return func(*args, **kwargs)
[rank0]: File "/opt/conda/envs/…/lib/python3.10/site-packages/transformers/modeling_utils.py", line 795, in _load_state_dict_into_meta_model
[rank0]: full_tp_plan.update(getattr(submodule, "_tp_plan", {}))
[rank0]: TypeError: 'NoneType' object is not iterable
[rank0]:[W303 15:32:35.530123370 ProcessGroupNCCL.cpp:1250] Warning: WARNING: process group has NOT been destroyed before we destruct ProcessGroupNCCL. On normal program exit, the applicati
on should call destroy_process_group to ensure that any pending NCCL operations have finished in this process. In rare cases this process can exit before this point and block the progress o
f another member of the process group. This constraint has always been present, but this warning has only been added since PyTorch 2.4 (function operator())
```
The version of transformers I use is 4.50.dev0, downloaded from github.
This environment will not report errors when running the same code on the machine I configured a few days ago, but today's new environment reports errors.
I solved the problem by downgrading the transformers version from 4.50.dev0 to 4.49.0.
### Expected behavior
I want to load model | 2hard
|
Title: Trying to Find Bottleneck When Using Nvidia Jetson Nano
Body: Hi,
Great work on this! It's amazing to see this working!
I am testing this software out on a [4 GB NVIDIA Jetson Nano Developer Kit](https://developer.nvidia.com/embedded/jetson-nano-developer-kit), and am seeing ~1 minute needed to synthesize a waveform, and am trying to figure out what the bottleneck could be.
I originally tried this code on my Windows machine (Ryzen 7 2700X) and saw about 10 seconds for the waveform to be synthesized. This testing used the CPU for inference.
On the Jetson, it's using the GPU:
`"Found 1 GPUs available. Using GPU 0 (NVIDIA Tegra X1) of compute capability 5.3 with 4.1Gb total memory."`
It did seem to be RAM-limited at first, but created a swap file to file the gap and did not see the RAM changing much during synthesis. I can see it being read during synthesis and the read time of disk slowing everything down, but it looked like one of the four CPU cores was also taking a 100% load to process, making me think that I'm CPU bottlenecked.
I figured that since this project uses PyTorch, using a 128 CUDA core GPU would be faster than an 8 core CPU, but I may be missing some fundamentals, especially when seeing that one of my CPU cores is at 100% usage.
Is synthesis CPU and GPU constrained or would it rely mostly on GPU?
Here are images of the program just before it finished synthesizing and just after with jtop monitoring GPU, CPU, and RAM.
**Before:**
- 5.5GB of memory used. 3.4 is RAM, 2.089 is swap file on disk
- CPU1 at 100%
- CPU 2 at 25%
- GPU at 40%

**After:**
- 5.5GB of memory used. 3.4 is RAM, 2.089 is swap file on disk
- CPU1 at 12%
- CPU 2 at 98%
- GPU at 0%

Thank you!
voloved
| 1medium
|
Title: AttributeError: 'Doc2VecTrainables' object has no attribute 'vectors_lockf'
Body: Python version 3.7.5
gensim version 3.6.0
apache-beam[gcp] 2.20.0
tensorflow==1.14
#### Problem description
Trying to create tf records using gensim Doc2Vec.
Expected result is to create tf records with the given parameters.
In Directrunner
tf record creation is happening when used with gensim 3.6.0
but AttributeError is raised when ran with 3.8.0 version of gensim (AttributeError: 'Doc2VecTrainables' object has no attribute 'vectors_lockf')
While running a dataflow job even with gensim 3.6.0
Attribute error is raised
#### Steps/code/corpus to reproduce
pretrained_emb = 'glove.6B.100d.txt'
vector_size = 300
window_size = 15
min_count = 1
sampling_threshold = 1e-5
negative_size = 5
train_epoch = 100
dm = 0 #0 = dbow; 1 = dmpv
worker_count = 1 #number of parallel processes
print('max_seq_len which is being passed above Doc2Vec', self.max_seq_len)
self.model = g.Doc2Vec(documents=None,size=vector_size,
window=window_size, min_count=min_count,
sample=sampling_threshold,
workers=worker_count, hs=0,
dm=dm, negative=negative_size,
dbow_words=1, dm_concat=1,
pretrained_emb=pretrained_emb,
iter=100)
print("Loaded Model")
plot class type is 'string'
embedding_vector = self.model.infer_vector([plot])
It is raising an attribute error when ran in dataflow runner. In Directrunner issue is raised when gensim version is 3.8.0
Error log:
I have pasted the entire error log.
textPayload: "Error message from worker: Traceback (most recent call last):
File "apache_beam/runners/common.py", line 950, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam/runners/common.py", line 547, in apache_beam.runners.common.SimpleInvoker.invoke_process
File "apache_beam/runners/common.py", line 1078, in apache_beam.runners.common._OutputProcessor.process_outputs
File "tfrecord_util/csv2tfrecord_train_valid.py", line 310, in process
x = self.preprocess(x)
File "tfrecord_util/csv2tfrecord_train_valid.py", line 233, in preprocess
embedding_vector = self._embedding(plot)
File "tfrecord_util/csv2tfrecord_train_valid.py", line 300, in _embedding
embedding_vector = self.model.infer_vector([plot])
File "/usr/local/lib/python3.7/site-packages/gensim/models/doc2vec.py", line 915, in infer_vector
learn_words=False, learn_hidden=False, doctag_vectors=doctag_vectors, doctag_locks=doctag_locks
File "gensim/models/doc2vec_inner.pyx", line 332, in gensim.models.doc2vec_inner.train_document_dbow
File "gensim/models/doc2vec_inner.pyx", line 254, in gensim.models.doc2vec_inner.init_d2v_config
AttributeError: 'Doc2VecTrainables' object has no attribute 'vectors_lockf'
I hope you understand the issue from the above details. Please let me know if you still need any additional information.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/dataflow_worker/batchworker.py", line 647, in do_work
work_executor.execute()
File "/usr/local/lib/python3.7/site-packages/dataflow_worker/executor.py", line 176, in execute
op.start()
File "dataflow_worker/native_operations.py", line 38, in dataflow_worker.native_operations.NativeReadOperation.start
File "dataflow_worker/native_operations.py", line 39, in dataflow_worker.native_operations.NativeReadOperation.start
File "dataflow_worker/native_operations.py", line 44, in dataflow_worker.native_operations.NativeReadOperation.start
File "dataflow_worker/native_operations.py", line 54, in dataflow_worker.native_operations.NativeReadOperation.start
File "apache_beam/runners/worker/operations.py", line 329, in apache_beam.runners.worker.operations.Operation.output
File "apache_beam/runners/worker/operations.py", line 192, in apache_beam.runners.worker.operations.SingletonConsumerSet.receive
File "apache_beam/runners/worker/operations.py", line 682, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam/runners/worker/operations.py", line 683, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam/runners/common.py", line 952, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam/runners/common.py", line 1013, in apache_beam.runners.common.DoFnRunner._reraise_augmented
File "apache_beam/runners/common.py", line 950, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam/runners/common.py", line 547, in apache_beam.runners.common.SimpleInvoker.invoke_process
File "apache_beam/runners/common.py", line 1105, in apache_beam.runners.common._OutputProcessor.process_outputs
File "apache_beam/runners/worker/operations.py", line 192, in apache_beam.runners.worker.operations.SingletonConsumerSet.receive
File "apache_beam/runners/worker/operations.py", line 682, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam/runners/worker/operations.py", line 683, in apache_beam.runners.worker.operations.DoOperation.process
File "apache_beam/runners/common.py", line 952, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam/runners/common.py", line 1028, in apache_beam.runners.common.DoFnRunner._reraise_augmented
File "/usr/local/lib/python3.7/site-packages/future/utils/__init__.py", line 421, in raise_with_traceback
raise exc.with_traceback(traceback)
File "apache_beam/runners/common.py", line 950, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam/runners/common.py", line 547, in apache_beam.runners.common.SimpleInvoker.invoke_process
File "apache_beam/runners/common.py", line 1078, in apache_beam.runners.common._OutputProcessor.process_outputs
File "tfrecord_util/csv2tfrecord_train_valid.py", line 310, in process
x = self.preprocess(x)
File "tfrecord_util/csv2tfrecord_train_valid.py", line 233, in preprocess
embedding_vector = self._embedding(plot)
File "tfrecord_util/csv2tfrecord_train_valid.py", line 300, in _embedding
embedding_vector = self.model.infer_vector([plot])
File "/usr/local/lib/python3.7/site-packages/gensim/models/doc2vec.py", line 915, in infer_vector
learn_words=False, learn_hidden=False, doctag_vectors=doctag_vectors, doctag_locks=doctag_locks
File "gensim/models/doc2vec_inner.pyx", line 332, in gensim.models.doc2vec_inner.train_document_dbow
File "gensim/models/doc2vec_inner.pyx", line 254, in gensim.models.doc2vec_inner.init_d2v_config
AttributeError: 'Doc2VecTrainables' object has no attribute 'vectors_lockf' [while running 'PreprocessData']
```
| 1medium
|
Title: set encoding parameters in addition to the original encoding
Body: ### Is your feature request related to a problem?
When writing to disk with `to_netcdf`, the `encoding` argument causes existing encoding to be dropped. This is described in the [docs](https://docs.xarray.dev/en/latest/generated/xarray.Dataset.to_netcdf.html).
What is a good approach to add encoding parameters in addition to the original encoding? e.g.
```python
import rioxarray
import xarray as xr
import numpy as np
# make some random dummy netcdf file
data = np.random.rand(4, 4)
lat = np.linspace(10, 20, 4)
lon = np.linspace(10, 20, 4)
ds = xr.Dataset({"dummy": (["lat", "lon"], data)}, coords={"lat": lat, "lon": lon})
ds.rio.set_spatial_dims("lon", "lat", inplace=True)
ds.rio.write_crs("EPSG:4326", inplace=True)
# note the spatial_ref coordinate
print(ds.dummy)
```
```
<xarray.DataArray 'dummy' (lat: 4, lon: 4)> Size: 128B
...
Coordinates:
* lat (lat) float64 32B 10.0 13.33 16.67 20.0
* lon (lon) float64 32B 10.0 13.33 16.67 20.0
spatial_ref int64 8B 0
```
```python
ds.to_netcdf("test.nc", mode="w")
# read it back in - ok
ds2 = xr.open_dataset("test.nc", decode_coords="all")
print(ds2.dummy)
```
```
<xarray.DataArray 'dummy' (lat: 4, lon: 4)> Size: 128B
...
Coordinates:
* lat (lat) float64 32B 10.0 13.33 16.67 20.0
* lon (lon) float64 32B 10.0 13.33 16.67 20.0
spatial_ref int64 8B ...
```
```python
# now compress
ds2.to_netcdf("test_compressed.nc", mode="w", encoding={"dummy": {"compression": "zstd"}})
# read it back in - drops the spatial_ref
ds3 = xr.open_dataset("test_compressed.nc", decode_coords="all")
print(ds3.dummy)
```
```
<xarray.DataArray 'dummy' (lat: 4, lon: 4)> Size: 128B
...
Coordinates:
* lat (lat) float64 32B 10.0 13.33 16.67 20.0
* lon (lon) float64 32B 10.0 13.33 16.67 20.0
```
this is because rioxarray stores "grid_mapping" in the encoding.
so what is a nice generic way to specify encoding in addition to the original encoding?
```python
encoding = ds2.dummy.encoding.copy()
encoding["compression"] = "zstd"
ds2.to_netcdf("test_compressed_2.nc", mode="w", encoding={"dummy": encoding})
```
```
ValueError: unexpected encoding parameters for 'netCDF4' backend: ['szip', 'zstd', 'bzip2', 'blosc']. Valid encodings are: ...
```
It seems not possible to pass the original encoding back in (even unmodified) due to [additional checks](https://github.com/pydata/xarray/blob/5ea1e81f6ae7728dd9add2e97807f4357287fa6e/xarray/backends/api.py#L1968C1-L1969C1)
### Describe the solution you'd like
in `to_netcdf()` be able to specify `encoding` in addition to the original encoding
### Describe alternatives you've considered
_No response_
### Additional context
_No response_ | 1medium
|
Title: [FEATURE] Fix index warning in fugue_dask
Body: **Is your feature request related to a problem? Please describe.**

**Describe the solution you'd like**
For newer version of pandas we need to do something similar to [this](https://github.com/fugue-project/triad/blob/4998449e8a714de2e4c02d51d841650fe2c068c5/triad/utils/pandas_like.py#L240)
| 1medium
|
Title: How do you get the training time on each epoch using TPUEstimator?
Body: I am able to see INFO:tensorflow:loss = 134.62343, step = 97
but not the time.
| 1medium
|
Title: DiT Licence?
Body: What is the Licence for using DiT? I am seeing the whole repository is under MIT Licence, but some of the projects contains difference licensing. As there's no info mentioned for DiT, can you update it? | 3misc
|
Title: Different ways of websocket disconnection effects in task pending
Body: **Describe the bug**
Hi I am actually seeking for help. I was following this gist https://gist.github.com/ahopkins/5b6d380560d8e9d49e25281ff964ed81 building up a chat server. Now that we have a frontend, I am strucked by a task pending problem.
From the perspective of a user, the most common practise of leaving a web conversation is by closing the tab directly. So I tried the movement, and the error occurs at server shutdown.
```bash
Task was destroyed but it is pending!
source_traceback: Object created at (most recent call last):
File "/home/yuzixin/workspace/sanicserver/server.py", line 30, in <module>
app.run(host="0.0.0.0", port=4017, debug=app.config.DEBUG, workers=1)
File "/home/yuzixin/workspace/sanicserver/venv/lib/python3.10/site-packages/sanic/mixins/runner.py", line 145, in run
self.__class__.serve(primary=self) # type: ignore
File "/home/yuzixin/workspace/sanicserver/venv/lib/python3.10/site-packages/sanic/mixins/runner.py", line 578, in serve
serve_single(primary_server_info.settings)
File "/home/yuzixin/workspace/sanicserver/venv/lib/python3.10/site-packages/sanic/server/runners.py", line 206, in serve_single
serve(**server_settings)
File "/home/yuzixin/workspace/sanicserver/venv/lib/python3.10/site-packages/sanic/server/runners.py", line 155, in serve
loop.run_forever()
File "/home/yuzixin/workspace/sanicserver/utils/decorators.py", line 34, in decorated_function
response = await f(request, *args, **kwargs)
File "/home/yuzixin/workspace/sanicserver/filesystem/blueprint.py", line 30, in feed
await client.receiver()
File "/home/yuzixin/workspace/sanicserver/filesystem/client.py", line 52, in receiver
message_str = await self.protocol.recv()
File "/home/yuzixin/workspace/sanicserver/venv/lib/python3.10/site-packages/sanic/server/websockets/impl.py", line 523, in recv
asyncio.ensure_future(self.assembler.get(timeout)),
File "/home/yuzixin/usr/lib/python3.10/asyncio/tasks.py", line 619, in ensure_future
return _ensure_future(coro_or_future, loop=loop)
File "/home/yuzixin/usr/lib/python3.10/asyncio/tasks.py", line 638, in _ensure_future
return loop.create_task(coro_or_future)
task: <Task pending name='Task-28' coro=<WebsocketFrameAssembler.get() done, defined at /home/yuzixin/workspace/sanicserver/venv/lib/python3.10/site-packages/sanic/server/websockets/frame.py:91> wait_for=<Future pending cb=[Task.task_wakeup()] created at /home/yuzixin/usr/lib/python3.10/asyncio/locks.py:210> created at /home/yuzixin/usr/lib/python3.10/asyncio/tasks.py:638>
```
Curiously, this does not happen when testing with postman. I catched the asyncio.CanceledError at client.py for a stack printing, turned out the cancelled error were raised by different lines in impl.py:
The stack at postman close
```bash
Traceback (most recent call last):
File "/home/yuzixin/workspace/sanicserver/filesystem/client.py", line 52, in receiver
message_str = await self.protocol.recv()
File "/home/yuzixin/workspace/sanicserver/venv/lib/python3.10/site-packages/sanic/server/websockets/impl.py", line 534, in recv
raise asyncio.CancelledError()
asyncio.exceptions.CancelledError
```
The stack at tab close
```
Traceback (most recent call last):
File "/home/yuzixin/workspace/sanicserver/filesystem/client.py", line 52, in receiver
message_str = await self.protocol.recv()
File "/home/yuzixin/workspace/sanicserver/venv/lib/python3.10/site-packages/sanic/server/websockets/impl.py", line 525, in recv
done, pending = await asyncio.wait(
File "/home/yuzixin/usr/lib/python3.10/asyncio/tasks.py", line 384, in wait
return await _wait(fs, timeout, return_when, loop)
File "/home/yuzixin/usr/lib/python3.10/asyncio/tasks.py", line 495, in _wait
await waiter
asyncio.exceptions.CancelledError
```
Codes between lineno 525 and lineno 534 are
```python
done, pending = await asyncio.wait(
tasks,
return_when=asyncio.FIRST_COMPLETED,
)
done_task = next(iter(done))
if done_task is self.recv_cancel:
# recv was cancelled
for p in pending:
p.cancel()
raise asyncio.CancelledError()
```
I am not quite familiar with async scripting, but if anything, this looks like some tasks were successfully created but not cancelled when asyncio wait was raising a cancelled error.
This is by far not effecting the server function, but I am a bit worried that this might indicate some tasks are constantly executing during the whole process on a server that could continue to run for months, and thus dragging down the whole performance. Perhaps theres something I could do to manually close the protocol.recv task when catching the error?
**Code snippet**
https://gist.github.com/ahopkins/5b6d380560d8e9d49e25281ff964ed81
**Expected behavior**
A clean server shutdown with no errors reporting.
**Environment (please complete the following information):**
- OS: Debian
- Version buster
- python version: 3.10
| 1medium
|
Title: Assigning Probability in imgaug OneOf
Body: can we have a different probability for selecting augmentations in OneOf?
Its use case is for example when you want to select one of the 3 augmentations but with prob = [0.5. 0.25, 0.25] instead of 1/3 for all of them. | 1medium
|
Title: Docs recipe: stream media with range request
Body: Hello,
i'm tryning to stream mp4 video, with range request support.but i cannot manage to make it work with resp.stream.
This code work :
```
def on_get(self, req, resp):
media = 'test.mp4'
resp.set_header('Content-Type', 'video/mp4')
resp.accept_ranges = 'bytes'
stream = open(media,'rb')
size = os.path.getsize(media)
if req.range :
end = req.range[1]
if end < 0 :
end = size + end
stream.seek(req.range[0])
resp.content_range = (req.range[0],end,size)
size = end - req.range[0] + 1
resp.status = falcon.HTTP_206
resp.content_length = size
resp.body = stream.read(size)
```
but this will load all file in memory, which is not an option.
if i change the 2 last line with
`resp.set_stream(stream,size)`,
i've got an error
```
SIGPIPE: writing to a closed pipe/socket/fd (probably the client disconnected) on request /api/stream/557 (ip 10.0.0.136) !!!
uwsgi_response_sendfile_do(): Broken pipe [core/writer.c line 645] during GET /api/stream/557 (10.0.0.136)
IOError: write error
```
i'm using uwsgi with nginx as reverse proxy. Not sure it's related to falcon, but i don't have any clue where to look at.
Any idea?
Thanks
Johan
Ps : i know it's not optimal to use falcon for this, but i cannot expose real video path to client (in real in come from a db). and performance are not really a problem in my case.
Edit :
Here's the chrome requests when it don't work.
| Name | Url | Method | Status | Protocol |type | initiator | size | time
|--|--|--|--|--|--|--|--|--|
557 | http://10.1.12.2/api/stream/557 | GET | 206 | http/1.1 | media | Other | 32.6 kB | 5.24 s | 50883753
557 | http://10.1.12.2/api/stream/557 | GET | 206 | http/1.1 | media | Other | 28.1 kB | 365 ms | 27817
557 | http://10.1.12.2/api/stream/557 | GET | (canceled) | | media | Other | 0 B | 1 ms
| 1medium
|
Title: import RandomOrder
Body: ## Describe the bug
RandomOrder is not in [ composition.\_\_all\_\_](https://github.com/albumentations-team/albumentations/blob/526187b98bb8f66b77601e9cb32e2aa24d8a76a3/albumentations/core/composition.py#L27) therefore it is not possible to import it like any other transform
### To Reproduce
Steps to reproduce the behavior:
1. Try this sample:
```
import albumentations as A
t = A.SomeOf(...) # this works
t = A.RandomOrder(...) # doesn't work
```
### Expected behavior
RandomOrder is available when importing albumentations.
### Actual behavior
RandomOrder is not available when importing albumentations.
| 1medium
|
Title: skipif mark can't utilize global python variables or vars returned by fixtures
Body: Hi, I believe this is a feature request for the `skipif` mark.
### **Issue**
I'm trying out the `skipif` mark (see three code examples below), but the `eval()` function is only able to access vars stored in tavern.util.dict_util (ie. system environment variables and perhaps variables included in `!include` .yaml files). I tried `skipif: "global_python_var is True"` which uses a global var created in the conftest.py (also tried `skipif: "global_python_var in globals()"`). Additionally, I tried accessing variables returned from fixtures (also defined in the conftest.py) using the `skipif: '{var_name}'` format, but get the following error:
**ERROR:tavern.util.dict_util:Key(s) not found in format: url**, with this output (I set all env_values to None):
```
{'tavern':
{'env_vars':
{'NVM_INC': None, 'LDFLAGS': None, 'TERM_PROGRAM': None, 'PYENV_ROOT': None, 'NVM_CD_FLAGS': None, 'TERM': None, 'SHELL': None, 'CPPFLAGS': None, 'TMPDIR': None, 'GOOGLE_APPLICATION_CREDENTIALS': None, 'VAULT_ADDR': None, 'TERM_PROGRAM_VERSION': None, 'TERM_SESSION_ID': None, 'PYENV_VERSION': None, 'NVM_DIR': None, 'USER': None, 'SSH_AUTH_SOCK': None, 'PYENV_DIR': None, 'VIRTUAL_ENV': None, 'PATH': None, 'LaunchInstanceID': None, 'PWD': None, 'LANG': None, 'PYENV_HOOK_PATH': None, 'XPC_FLAGS': None, 'XPC_SERVICE_NAME': None, 'HOME': None, 'SHLVL': None, 'PYTHONPATH': None, 'LOGNAME': None, 'NVM_BIN': None, 'SECURITYSESSIONID': None, '__CF_USER_TEXT_ENCODING': None }
}
}
```
### **Request**
Could the eval function called by `skipif` access information just like the test that it is marking **and** the python global namespace? Additionally, utilizing skipif with external functions (ie. getting a function to return either "True" or "False", would also be a good alternative). My overall goal is to skip all tests if my basic health-check test failed following these steps:
### _My intended usage and test examples_
1. run healthcheck/base test
2. verify response with external function which will either create a global, or change an existing global created in conftest.py (returns True or False based on response)
3. Other tests are skipped if the `skipif eval()` finds that the global var == False. (Alternatively, skips if external function called in eval() returns `"False"`)
Here are the example code snippets I tried (located in test_name.tavern.yaml file):
```
marks:
- skipif: "'healthcheck_failed' in globals()"
```
```
marks:
- skipif: "'{autouse_session_fixture_returned_from_conftest}' is True"
```
```
marks:
- skipif:
- $ext:
- function: "utils:return_true"
``` | 2hard
|
Title: Weird window size
Body: Even with the example code, the window is small. If I make it fullscreen, the rest of the window is blank | 1medium
|
Title: Getting a KeyError when using IndicatorFactory.run()
Body: Hello, I am trying to play around with some simple strategies to learn about the library, so I started with this :
```import vectorbt as vbt
import numpy as np
import pandas as pd
import pytz import talib
data = vbt.BinanceData.download('ETHUSDT',
start = datetime.datetime(2017, 1, 2,tzinfo=pytz.timezone('UTC')),
end = datetime.datetime(2018, 1, 1, tzinfo=pytz.timezone('UTC'))).get(['Close'])
def dummy_strat(Close, fast_ema, slow_ema):
ema1 = vbt.talib('EMA').run(Close, fast_ema).real.to_numpy()
ema2 = vbt.talib('EMA').run(Close, slow_ema).real.to_numpy()
stoch_rsi = vbt.talib('STOCHRSI').run(Close).fastk.to_numpy()
entries = (ema1 >ema2) & (stoch_rsi <80)
exits = (ema1 <ema2) & (stoch_rsi > 20)
#print(help(ema1))
return entries, exits
DummyStrat = vbt.IndicatorFactory(
class_name= 'TrueStrat',
short_name = 'TS',
input_names = ["Close"] ,
param_names = ["fast_ema", "slow_ema"],
output_names= ["entries", _"exits"]
).from_apply_func(dummy_strat )
```
When I run
```
fast_ema = 10
slow_ema = 20
entries, exits = true_strat(data, fast_ema, slow_ema)
pf = vbt.Portfolio.from_signals(data, entries, exits, freq = '1H')
returns = pf.total_return()
```
it works as expected. But when I try this :
`entries, exits = TrueStrat.run(data,
fast_ema = np.arange(10, 50),
slow_ema = np.arange(30, 100),
param_product = True)`
I get a `KeyError: 0`
Can someone please help me and explain to me what I'm doing wrong?
Thanks | 1medium
|
Title: Hello everyone, please after training my model how can I fit it to accept a dataset without target column when I want to predict new values. The fact is that in Real life we do not know yet the value we seeking by prediction process
Body: | 1medium
|
Title: leafmap add_raster function can't work in windows
Body: <!-- Please search existing issues to avoid creating duplicates. -->
### Environment Information
- leafmap version:0.22.0
- Python version:3.9
- Operating System:windows 10
### Description
error:
1019
1020 if http_error_msg:
-> 1021 raise HTTPError(http_error_msg, response=self)
1022
1023 def close(self):
HTTPError: 400 Client Error: BAD REQUEST for url: http://localhost:62933/api/metadata?&filename=D%3A%5Ccode%5Cpy%5Cimages%5CImage10.tif
### What I Did
```
m = leafmap.Map(center=[30.33049401, 104.10887847], zoom=18, height="800px")
m.add_basemap("SATELLITE")
m
image = "D:\\code\\py\\images\\Image10.tif"
tms_to_geotiff(output=image, bbox=bbox, zoom=19, source="Satellite", overwrite=True)
m.layers[-1].visible = False
m.add_raster(image, layer_name="Image")
m
```
| 1medium
|
Title: Have new multi-process data loader put batches directly on the target device from workers
Body: | 2hard
|
Title: 方法 GetChildren() 的可靠性存疑
Body: GetChildren() 实现中用到了 IUIAutomationTreeWalker::GetNextSiblingElement() 这个win32 API 。看microsoft的官网文档( 链接 https://docs.microsoft.com/en-us/windows/win32/api/uiautomationclient/nf-uiautomationclient-iuiautomationtreewalker-getnextsiblingelement )说,“ The structure of the Microsoft UI Automation tree changes as the visible UI elements on the desktop change. It is not guaranteed that an element returned as the next sibling element will be returned as the next sibling on subsequent passes.”我的理解是这个API并不保证第2次遍历控件树会得到相同结果。
这个问题的背景是在使用uiautomation 过程中,发现有个别控件用下标访问时访问失败,原因是下标变了。
不知道我的理解对不对,请问有谁可以帮忙解释一下吗? | 2hard
|
Title: demo loading failed
Body: <img width="1063" alt="image" src="https://github.com/pydantic/FastUI/assets/4550421/8c4fdabf-0dd2-494b-a904-88322f0c4e29">
| 1medium
|
Title: How to solve 'utf8' can't decode,because of string:högskolan
Body: if there is a string: högskolan in database,then there well be a error:
{
"errors": [
{
"message": "'utf8' codec can't decode byte 0xf6 in position 34: invalid start byte",
"locations": [
{
"column": 3,
"line": 2
}
]
}
],
"data": {
"allDegreess": null
}
} | 1medium
|
Title: Support SQLAlchemy v2
Body: ### Checklist
- [X] There are no similar issues or pull requests for this yet.
### Is your feature related to a problem? Please describe.
A few days ago I started using SQLAlchemy for the first time - specifically, v2.0.0rc2 (released 2023-Jan-9). Today I decided to try setting up an admin UI, and after determining the Flask-Admin is broken and unmaintained, I decided to try `sqladmin` - but couldn't install it because your `pyproject.toml` specifies version `<1.5`.
### Describe the solution you would like.
Given that SQLAlchemy v2 is expected to come out in the next few weeks, now seems like the time to make sure sqladmin works with it, and then loosen the version specifier.
### Describe alternatives you considered
I don't see an alternative. I want to stay with SQLAlchemy v2, and sqladmin directly interacts with the models, so the backend and admin have to at least share the model code, which means they might as well be in the same project - which means they have to share the same list of package dependencies.
### Additional context
_No response_ | 1medium
|
Title: Request for a Binder example that combines Ploomber and Mlflow
Body: I'm using Mlflow, but Mlflow doesn't have pipeline functionality.
Therefore, I would like to use a combination of Mlflow and Ploomber.
Can I ask you to create the simple notebook example (with Mlflow+Ploomber) that can be reproduced in Binder? | 1medium
|
Title: 马斯克看腻了,加个选项是否显示example吧。或者自定example
Body: 马斯克看腻了,加个选项是否显示example吧。或者自定example | 0easy
|
Title: Timeout in seconds not applying
Body: ### Discussed in https://github.com/MilesCranmer/PySR/discussions/724
<div type='discussions-op-text'>
<sup>Originally posted by **usebi** September 25, 2024</sup>
I tried the timeout_in_seconds function of pysr regressor and set the timeout to 12 hours but after many hours from the limit the program is still working because I see the resources used but it seems stopped because it no longer writes anything new</div> | 1medium
|
Title: API: return value of `.values` for Series with the future string dtype (numpy array vs extension array)
Body: Historically, the `.values` attribute returned a numpy array (except for categoricals). When we added more ExtensionArrays, for certain dtypes (e.g. tz-aware timestamps, or periods, ..) the EA could more faithfully represent the underlying values instead of the lossy conversion to numpy (e.g for tz-aware timestamps we decided to return a numpy object dtype array instead of "datetime64[ns]" to not lose the timezone information). At that point, instead of "breaking" the behaviour of `.values`, we decided to add an `.array` attribute that then always returns the EA.
But for generic ExtensionArrays (external, or non-default EAs like the masked ones or the Arrow ones), the `.values` has always already directly returned the EA as well. So in those cases, there is no difference between `.values` and `.array`.
Now to the point: with the new default `StringDtype`, the current behaviour is indeed to also always return the EA for both `.values` and `.array`.
This means this is one of the breaking changes for users when upgrading to pandas 3.0, that for a column which is inferred as string data, the `.values` no longer returns a numpy array.
**Are we OK with this breaking change now?**
Or, we could also decide to keep `.values` return the numpy array with `.array` returning the EA.
Of course, when we would move to use EAs for all dtypes (which is being considered in the logical dtypes and missing values PDEP discussions), then we would have this breaking change as well (or at least need to make a decision about it). But, that could also be a reason to not yet do it for the string dtype now, if we would change it for all dtypes later.
cc @pandas-dev/pandas-core
| 1medium
|
Title: Interaction error when working with SAM-2
Body: ### Actions before raising this issue
- [X] I searched the existing issues and did not find anything similar.
- [X] I read/searched [the docs](https://docs.cvat.ai/docs/)
### Steps to Reproduce
1. Set-up CVAT with serverless functions.
2. Host SAM-2 model.
### Expected Behavior
_No response_
### Possible Solution
_No response_
### Context
When using SAM-2 model, the interface indicates its waiting for SAM processing but immediately gives an error :
Interaction error occured
Error: Request failed with status code 503. "HTTPConnectionPool(host='host.docker.internal', port=34361): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fb7905337c0>: Failed to establish a new connection: [Errno 111] Connection refused'))".

The logs from SAM2 container looks like :

The logs from cvat_server is giving the error :
2024-11-11 07:02:14,648 DEBG 'runserver' stderr output:
[Mon Nov 11 07:02:14.648184 2024] [wsgi:error] [pid 141:tid 140427000612608] [remote 172.18.0.3:37396] [2024-11-11 07:02:14,648] ERROR django.request: Service Unavailable: /api/lambda/functions/pth-facebookresearch-sam2-vit-h
2024-11-11 07:02:14,648 DEBG 'runserver' stderr output:
[Mon Nov 11 07:02:14.648325 2024] [wsgi:error] [pid 141:tid 140427000612608] [remote 172.18.0.3:37396] ERROR:django.request:Service Unavailable: /api/lambda/functions/pth-facebookresearch-sam2-vit-h

### Environment
```Markdown
- Operating System and version (e.g. Linux, Windows, MacOS) --> Ubuntu 20.04.6
- Are you using Docker Swarm or Kubernetes? --> Docker
```
| 1medium
|
Title: Python function not callable from tavern script for saving
Body: Hi, I am calling a save function after getting response from my api, now in the response received i need to format string and save only few elements present,
```
response:
status_code: 200
save:
headers:
res_key:
$ext:
function: testing_utils:extract_sessid
extra_kwargs:
head: headers
```
however, my tavern yaml is unable to call extract_string method in testing_utils file,
But other functions written in testing_utils are working fine with following syntax
```
verify_response_with:
- function: testing_utils:check_jsonpath_value
```
Please help, basically in above way mentioned, the testing_utils file is not accessible ( inside save function) but in same tavern script existing test cases are able to access the same ( with verify_response_with).
| 1medium
|
Title: TypeError: set_parent() takes 3 positional arguments but 4 were given
Body: When trying the First script example on the Quickstart of the docs, it works correctly when executed on Jupyter notebook, but it won't work as a script directly executed via solara executable.
When doing:
**solara run .\first_script.py**
the server starts but then it keeps logging the following error:
ERROR: Exception in ASGI application
Traceback (most recent call last):
File "c:\users\jicas\anaconda3\envs\ml\lib\site-packages\uvicorn\protocols\websockets\websockets_impl.py", line 254, in run_asgi
result = await self.app(self.scope, self.asgi_receive, self.asgi_send)
File "c:\users\jicas\anaconda3\envs\ml\lib\site-packages\uvicorn\middleware\proxy_headers.py", line 78, in __call__
return await self.app(scope, receive, send)
File "c:\users\jicas\anaconda3\envs\ml\lib\site-packages\starlette\applications.py", line 122, in __call__
await self.middleware_stack(scope, receive, send)
File "c:\users\jicas\anaconda3\envs\ml\lib\site-packages\starlette\middleware\errors.py", line 149, in __call__
await self.app(scope, receive, send)
File "c:\users\jicas\anaconda3\envs\ml\lib\site-packages\starlette\middleware\gzip.py", line 26, in __call__
await self.app(scope, receive, send)
File "c:\users\jicas\anaconda3\envs\ml\lib\site-packages\starlette\middleware\exceptions.py", line 79, in __call__
raise exc
File "c:\users\jicas\anaconda3\envs\ml\lib\site-packages\starlette\middleware\exceptions.py", line 68, in __call__
await self.app(scope, receive, sender)
File "c:\users\jicas\anaconda3\envs\ml\lib\site-packages\starlette\routing.py", line 718, in __call__
await route.handle(scope, receive, send)
File "c:\users\jicas\anaconda3\envs\ml\lib\site-packages\starlette\routing.py", line 341, in handle
await self.app(scope, receive, send)
File "c:\users\jicas\anaconda3\envs\ml\lib\site-packages\starlette\routing.py", line 82, in app
await func(session)
File "c:\users\jicas\anaconda3\envs\ml\lib\site-packages\solara\server\starlette.py", line 197, in kernel_connection
await thread_return
File "c:\users\jicas\anaconda3\envs\ml\lib\site-packages\anyio\to_thread.py", line 34, in run_sync
func, *args, cancellable=cancellable, limiter=limiter
File "c:\users\jicas\anaconda3\envs\ml\lib\site-packages\anyio\_backends\_asyncio.py", line 877, in run_sync_in_worker_thread
return await future
File "c:\users\jicas\anaconda3\envs\ml\lib\site-packages\anyio\_backends\_asyncio.py", line 807, in run
result = context.run(func, *args)
File "c:\users\jicas\anaconda3\envs\ml\lib\site-packages\solara\server\starlette.py", line 190, in websocket_thread_runner
anyio.run(run)
File "c:\users\jicas\anaconda3\envs\ml\lib\site-packages\anyio\_core\_eventloop.py", line 68, in run
return asynclib.run(func, *args, **backend_options)
File "c:\users\jicas\anaconda3\envs\ml\lib\site-packages\anyio\_backends\_asyncio.py", line 204, in run
return native_run(wrapper(), debug=debug)
File "c:\users\jicas\anaconda3\envs\ml\lib\asyncio\runners.py", line 43, in run
return loop.run_until_complete(main)
File "c:\users\jicas\anaconda3\envs\ml\lib\asyncio\base_events.py", line 587, in run_until_complete
return future.result()
File "c:\users\jicas\anaconda3\envs\ml\lib\site-packages\anyio\_backends\_asyncio.py", line 199, in wrapper
return await func(*args)
File "c:\users\jicas\anaconda3\envs\ml\lib\site-packages\solara\server\starlette.py", line 182, in run
await server.app_loop(ws_wrapper, session_id, connection_id, user)
File "c:\users\jicas\anaconda3\envs\ml\lib\site-packages\solara\server\server.py", line 148, in app_loop
process_kernel_messages(kernel, msg)
File "c:\users\jicas\anaconda3\envs\ml\lib\site-packages\solara\server\server.py", line 179, in process_kernel_messages
kernel.set_parent(None, msg)
File "c:\users\jicas\anaconda3\envs\ml\lib\site-packages\solara\server\kernel.py", line 294, in set_parent
super().set_parent(ident, parent, channel)
TypeError: set_parent() takes 3 positional arguments but 4 were given
Is there anything I can do to avoid this error?
Thanks in advance. | 1medium
|
Title: Unexpected "down" after sending ping
Body: I have a test check setup on healthchecks.io, configured with
Cron Expression | `* 9 * * *`
-- | --
Time Zone | America/Los_Angeles
Grace Time | 30 minutes
This triggers at 9:30AM local time (as expected), and I send a ping to put it back the "up" state. ~30 minutes after the ping, the check goes back to "down".
Here's a screenshot of the details page, with the unexpected transitions highlighted:

Chronologically (with my comments):
```
May 21 | 09:30 | Status: up ➔ down. # expected, that's 30 minutes after the cron time.
May 21 | 09:34 | OK | HTTPS POST from x.x.x.x - python-requests/2.31.0 # manual ping
May 21 | 09:34 | Status: down ➔ up. # expected after ping
May 21 | 10:05 | Status: up ➔ down. # unexpected! suspiciously at "grace time" after the last ping.
May 21 | 10:21 | OK | HTTPS POST from x.x.x.x - python-requests/2.31.0 # manual ping to shut it up
May 21 | 10:21 | Status: down ➔ up. # expected after ping
```
```
May 22 | 09:30 | Status: up ➔ down. # expected, that's 30 minutes after the cron time.
May 22 | 09:41 | OK | HTTPS POST from x.x.x.x - Mozilla/5.0 ... # manual ping from UI
May 22 | 09:41 | Status: down ➔ up. # expected after ping
May 22 | 10:12 | Status: up ➔ down. # unexpected!
May 22 | 10:13 | OK | HTTPS POST from x.x.x.x - Mozilla/5.0 … # manual ping to shut it up
May 22 | 10:13 | Status: down ➔ up. # expected after ping
```
Is my expectation of how this should work incorrect? Could there be something funny going on due to the non-UTC timezone? | 1medium
|
Title: [Bug] AttributeError: 'int' object has no attribute 'device'
Body: ### Describe the bug
example code gives error when saving.
### To Reproduce
```
import os
import time
import torch
import torchaudio
from TTS.tts.configs.xtts_config import XttsConfig
from TTS.tts.models.xtts import Xtts
print("Loading model...")
config = XttsConfig()
config.load_json("/path/to/xtts/config.json")
model = Xtts.init_from_config(config)
model.load_checkpoint(config, checkpoint_dir="/path/to/xtts/", use_deepspeed=True)
model.cuda()
print("Computing speaker latents...")
gpt_cond_latent, speaker_embedding = model.get_conditioning_latents(audio_path=["reference.wav"])
print("Inference...")
t0 = time.time()
chunks = model.inference_stream(
"It took me quite a long time to develop a voice and now that I have it I am not going to be silent.",
"en",
gpt_cond_latent,
speaker_embedding
)
wav_chuncks = []
for i, chunk in enumerate(chunks):
if i == 0:
print(f"Time to first chunck: {time.time() - t0}")
print(f"Received chunk {i} of audio length {chunk.shape[-1]}")
wav_chuncks.append(chunk)
wav = torch.cat(wav_chuncks, dim=0)
torchaudio.save("xtts_streaming.wav", wav.squeeze().unsqueeze(0).cpu(), 24000)
```
### Expected behavior
expect it to save a wav file
### Logs
Traceback (most recent call last):
```
if elements.device.type == "mps" and not is_torch_greater_or_equal_than_2_4:
AttributeError: 'int' object has no attribute 'device'
```
### Environment
```shell
{
"CUDA": {
"GPU": [
"NVIDIA GeForce RTX 3080",
"NVIDIA GeForce RTX 3080"
],
"available": true,
"version": "12.4"
},
"Packages": {
"PyTorch_debug": false,
"PyTorch_version": "2.4.1+cu124",
"TTS": "0.22.0",
"numpy": "1.22.0"
},
"System": {
"OS": "Linux",
"architecture": [
"64bit",
"ELF"
],
"processor": "x86_64",
"python": "3.10.14",
"version": "#1 SMP Thu Jan 11 04:09:03 UTC 2024"
}
}
```
### Additional context
AttributeError: 'int' object has no attribute 'device' | 1medium
|
Title: decoder.yaml sha256 hash mismatch
Body: 修改webui代码parser = argparse.ArgumentParser(description="ChatTTS demo Launch")
parser.add_argument(
"--server_name", type=str, default="0.0.0.0", help="server name"
)
parser.add_argument("--server_port", type=int, default=8080, help="server port")
parser.add_argument("--root_path", type=str, default=None, help="root path")
parser.add_argument(
"--custom_path", type=str, default="D:\ChatTTS-Model", help="custom model path"
)
parser.add_argument(
"--coef", type=str, default=None, help="custom dvae coefficient"
)
args = parser.parse_args()
后执行报错[+0800 20240713 10:03:04] [INFO] ChatTTS | core | try to load from local: D:\liu\ChatTTS-Model
[+0800 20240713 10:03:04] [INFO] ChatTTS | dl | checking assets...
[+0800 20240713 10:03:30] [INFO] ChatTTS | dl | checking configs...
[+0800 20240713 10:03:30] [WARN] ChatTTS | dl | D:\ChatTTS-Model\config\decoder.yaml sha256 hash mismatch.
[+0800 20240713 10:03:30] [INFO] ChatTTS | dl | expected: 0890ab719716b0ad8abcb9eba0a9bf52c59c2e45ddedbbbb5ed514ff87bff369
[+0800 20240713 10:03:30] [INFO] ChatTTS | dl | real val: 952d65eed43fa126e4ae257d4d7868163b0b1af23ccbe120288c3b28d091dae1
[+0800 20240713 10:03:30] [ERRO] ChatTTS | core | check models in custom path D:\ChatTTS-Model failed.
[+0800 20240713 10:03:30] [ERRO] WebUI | webui | Models load failed. | 1medium
|
Title: Missing pre-build of the pydantic-core python package for musl lib on armv7.
Body: Would be good to have an pre-build of the pydantic-core python package for musl lib on armv7.
https://github.com/pydantic/pydantic-core/blob/e3eff5cb8a6dae8914e3831b00c690d9dee4b740/.github/workflows/ci.yml#L430-L436
Related, docker build for [alpine linux on armv7](https://github.com/searxng/searxng/issues/3887#issuecomment-2394990168):
- https://github.com/searxng/searxng/issues/3887 | 1medium
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.