text
stringlengths
20
57.3k
labels
class label
4 classes
Title: Optimizer file [/home/weidawang/.paddle/weights/BMN.pdopt] not exits Body: I got error when i am getting started with BMN: ``` (base) weidawang@weidawang-TUF-Gaming-FX506LU-FX506LU:~/Repo/PaddlePaddle/models/PaddleCV/video$ bash run.sh predict BMN ./configs/bmn.yaml predict BMN ./configs/bmn.yaml DALI is not installed, you can improve performance if use DALI [INFO: predict.py: 199]: Namespace(batch_size=1, config='./configs/bmn.yaml', filelist=None, infer_topk=20, log_interval=1, model_name='BMN', save_dir='data/predict_results', use_gpu=True, video_path='', weights=None) [INFO: config_utils.py: 70]: ---------------- Infer Arguments ---------------- [INFO: config_utils.py: 72]: MODEL: [INFO: config_utils.py: 74]: name:BMN [INFO: config_utils.py: 74]: tscale:100 [INFO: config_utils.py: 74]: dscale:100 [INFO: config_utils.py: 74]: feat_dim:400 [INFO: config_utils.py: 74]: prop_boundary_ratio:0.5 [INFO: config_utils.py: 74]: num_sample:32 [INFO: config_utils.py: 74]: num_sample_perbin:3 [INFO: config_utils.py: 74]: anno_file:data/dataset/bmn/activitynet_1.3_annotations.json [INFO: config_utils.py: 74]: feat_path:/media/weidawang/DATA/dataset/ActionLocalization/bmn_feat [INFO: config_utils.py: 72]: TRAIN: [INFO: config_utils.py: 74]: subset:train [INFO: config_utils.py: 74]: epoch:9 [INFO: config_utils.py: 74]: batch_size:16 [INFO: config_utils.py: 74]: num_threads:8 [INFO: config_utils.py: 74]: use_gpu:True [INFO: config_utils.py: 74]: num_gpus:4 [INFO: config_utils.py: 74]: learning_rate:0.001 [INFO: config_utils.py: 74]: learning_rate_decay:0.1 [INFO: config_utils.py: 74]: lr_decay_iter:4200 [INFO: config_utils.py: 74]: l2_weight_decay:0.0001 [INFO: config_utils.py: 72]: VALID: [INFO: config_utils.py: 74]: subset:validation [INFO: config_utils.py: 74]: batch_size:16 [INFO: config_utils.py: 74]: num_threads:8 [INFO: config_utils.py: 74]: use_gpu:True [INFO: config_utils.py: 74]: num_gpus:4 [INFO: config_utils.py: 72]: TEST: [INFO: config_utils.py: 74]: subset:validation [INFO: config_utils.py: 74]: batch_size:1 [INFO: config_utils.py: 74]: num_threads:1 [INFO: config_utils.py: 74]: snms_alpha:0.001 [INFO: config_utils.py: 74]: snms_t1:0.5 [INFO: config_utils.py: 74]: snms_t2:0.9 [INFO: config_utils.py: 74]: output_path:data/output/EVAL/BMN_results [INFO: config_utils.py: 74]: result_path:data/evaluate_results [INFO: config_utils.py: 72]: INFER: [INFO: config_utils.py: 74]: subset:test [INFO: config_utils.py: 74]: batch_size:1 [INFO: config_utils.py: 74]: num_threads:1 [INFO: config_utils.py: 74]: snms_alpha:0.4 [INFO: config_utils.py: 74]: snms_t1:0.5 [INFO: config_utils.py: 74]: snms_t2:0.9 [INFO: config_utils.py: 74]: filelist:data/dataset/bmn/infer.list [INFO: config_utils.py: 74]: output_path:data/output/INFER/BMN_results [INFO: config_utils.py: 74]: result_path:data/predict_results [INFO: config_utils.py: 75]: ------------------------------------------------- W1218 16:29:50.778240 31472 device_context.cc:338] Please NOTE: device: 0, CUDA Capability: 75, Driver API Version: 11.1, Runtime API Version: 10.2 W1218 16:29:50.779249 31472 device_context.cc:346] device: 0, cuDNN Version: 8.0. test subset video numbers: 5 Traceback (most recent call last): File "predict.py", line 201, in <module> infer(args) File "predict.py", line 132, in infer fluid.default_main_program(), place) File "/home/weidawang/Repo/PaddlePaddle/models/PaddleCV/video/models/model.py", line 158, in load_test_weights fluid.load(prog, weights, executor=exe, var_list=params_list) File "<decorator-gen-76>", line 2, in load File "/home/weidawang/miniconda3/lib/python3.7/site-packages/paddle/fluid/wrapped_decorator.py", line 25, in __impl__ return wrapped_func(*args, **kwargs) File "/home/weidawang/miniconda3/lib/python3.7/site-packages/paddle/fluid/framework.py", line 215, in __impl__ return func(*args, **kwargs) File "/home/weidawang/miniconda3/lib/python3.7/site-packages/paddle/fluid/io.py", line 1882, in load "Optimizer file [{}] not exits".format(opt_file_name) AssertionError: Optimizer file [/home/weidawang/.paddle/weights/BMN.pdopt] not exits ```
1medium
Title: Is there a better way to handle big data? Body: I have recently downloaded a big data file and was processing it. I successfully extracted required data and stored it in a .db file. I then proceeded to convert data from the .db file to a Yaml file. But I keep on getting errors when trying to train the bot. ``` Training train0.yml: [## ] 9% Failed to process ./trainfiles/train0.yml 'bool' object has no attribute 'strip' <class 'AttributeError'> Train.py 16 Training train1.yml: [# ] 3% Failed to process ./trainfiles/train1.yml 'bool' object has no attribute 'strip' <class 'AttributeError'> Train.py 16 Failed to process ./trainfiles/train2.yml unacceptable character #x007f: special characters are not allowed in "./trainfiles/train2.yml", position 676364 <class 'yaml.reader.ReaderError'> Train.py 16 Failed to process ./trainfiles/train3.yml unacceptable character #x007f: special characters are not allowed in "./trainfiles/train3.yml", position 260191 <class 'yaml.reader.ReaderError'> Train.py 16 Training train4.yml: [## ] 8% Failed to process ./trainfiles/train4.yml 'bool' object has no attribute 'strip' <class 'AttributeError'> Train.py 16 Training train5.yml: [##### ] 24% Failed to process ./trainfiles/train5.yml 'bool' object has no attribute 'strip' <class 'AttributeError'> Train.py 16 Training train6.yml: [ ] 2% Failed to process ./trainfiles/train6.yml 'bool' object has no attribute 'strip' <class 'AttributeError'> Train.py 16 Training train7.yml: [# ] 6% Failed to process ./trainfiles/train7.yml 'bool' object has no attribute 'strip' <class 'AttributeError'> Train.py 16 Training train8.yml: [# ] 7% Failed to process ./trainfiles/train8.yml 'bool' object has no attribute 'strip' <class 'AttributeError'> Train.py 16 Training train9.yml: [# ] 5% Failed to process ./trainfiles/train9.yml 'bool' object has no attribute 'strip' <class 'AttributeError'> Train.py 16 Failed to process ./trainfiles/train10.yml [Errno 2] No such file or directory: './trainfiles/train10.yml' <class 'FileNotFoundError'> Train.py 16 ``` The 1st set of errors was that the data started with a symbol. But I avoided that by removing each line containing such. Now I am not really sure what to do with errors >'bool' object has no attribute 'strip' and >unacceptable character #x007f: special characters are not allowed Any help on how to solve this or any advice to handle big data would be very much appreciated.
1medium
Title: Add support for running a job in BQ Body: **Is your feature request related to a problem? Please describe.** A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] Mage's internal BigQuery class only allows load() and export() but not to run a job in BQ without moving data from or to BQ. **Describe the solution you'd like** Add job creation to BigQuery class **Describe alternatives you've considered** Right now, as a workaround, it is possible to start an external BQ job by using a regular bigquery client (not Mage's internal one) but that does not allow to use Mage's with_config(). **Additional context** [Response from feature request in Slack channel](https://mageai.slack.com/archives/C03KW780J2F/p1715600352377749)
1medium
Title: Put user creation logic in a importable function Body: Following discussion in #375, I think it would be nice to have a user creation function with all the related logic instead of having it nested in register route.
1medium
Title: [Help]: 为何扩散模型生成的效果要远好於 sovits 的模型? Body: ### 请勾选下方的确认框。 - [X] 我已仔细阅读[README.md](https://github.com/svc-develop-team/so-vits-svc/blob/4.0/README_zh_CN.md)和[wiki中的Quick solution](https://github.com/svc-develop-team/so-vits-svc/wiki/Quick-solution)。 - [X] 我已通过各种搜索引擎排查问题,我要提出的问题并不常见。 - [X] 我未在使用由第三方用户提供的一键包/环境包。 ### 系统平台版本号 win 10 ### GPU 型号 3060 12g ### Python版本 3.10.6 ### PyTorch版本 2.0.1+cu118 ### sovits分支 4.0(默认) ### 数据集来源(用于判断数据集质量) 自行录制,一半是歌声 ### 出现问题的环节或执行的命令 训练 so-vits-svc 4.0 模型 ### 问题描述 我是新手,使用 so-vits-svc 4.0 推理 webUI,为何 diffusion 模型生成的效果要远好於 sovits 的模型? 一般使用30至45分钟的资料,使用预设 config,没有修改批次大小, sovits 模型训练约20万步,推理出来的歌声总是沙哑,或突然出现电流声音. 但是 diffusion 模型只训练了3万步,推理出来的歌声已很不错,虽还不够完美,但比 sovits 模型要好很多。 混合 sovits 模型和 diffusion 模型後,感觉比只用 diffusion 要差一些,但比只用sovits 模型要好。 为什麽会有这情况,是否训练不够多? ### 日志 ```python N/A ``` ### 截图`so-vits-svc`、`logs/44k`文件夹并粘贴到此处 ![image](https://github.com/svc-develop-team/so-vits-svc/assets/140532855/abf1fd68-1841-4e5c-ba47-665e2af7b1b1) ### 补充说明 _No response_
1medium
Title: Koalas read_json cannot read json when Pandas can Body: ``` import requests full_url_with_date = 'https://demo.matomo.org/index.php?module=API&method=Live.getLastVisitsDetails&format=json&period=day&filter_limit=99&date=2020-08-02&idSite=62' matomo_pull = requests.get(full_url_with_date).content import pandas as pd pdf = pd.read_json(matomo_pull) from databricks import koalas as ks ks.read_json(matomo_pull) ```
1medium
Title: [bug] One site doesnt work with price tracker Body: https://www.vitacost.com/method-stain-remover `Exception: float() argument must be a string or a real number, not 'list'`
1medium
Title: Edge case: callable alias with full capturing and redirect in the middle: `I/O operation on closed file` Body: Two ways for reproduce: ```xsh $XONSH_SHOW_TRACEBACK = True @aliases.register def _e(): echo -n O echo -n E 1>2 execx("echo -n O") execx("echo -n E 1>2") print("o") print("O", file=o) print("E", file=e) for i in range(5): p = !(e > /tmp/ttt) $[e > /tmp/ttt2] p.end() print(p) ``` ```xsh $XONSH_SHOW_TRACEBACK = True @aliases.register def _e(): echo -n O echo -n E 1>2 execx("echo -n O") execx("echo -n E 1>2") print("o") print("O", file=o) print("E", file=e) for i in range(5): print(!(e > /tmp/ttt), $[e > /tmp/ttt2]) ``` Exception: ```xsh Exonsh: To log full traceback to a file set: $XONSH_TRACEBACK_LOGFILE = <filename> Traceback (most recent call last): File "<stdin>", line 7, in <module> File "/Users/pc/git/xonsh/xonsh/procs/pipelines.py", line 217, in __str__ self.end() File "/Users/pc/git/xonsh/xonsh/procs/pipelines.py", line 478, in end self._end(tee_output=tee_output) File "/Users/pc/git/xonsh/xonsh/procs/pipelines.py", line 486, in _end for _ in self.tee_stdout(): File "/Users/pc/git/xonsh/xonsh/procs/pipelines.py", line 388, in tee_stdout for line in self.iterraw(): File "/Users/pc/git/xonsh/xonsh/procs/pipelines.py", line 260, in iterraw stdout = NonBlockingFDReader(stdout.fileno(), timeout=timeout) ^^^^^^^^^^^^^^^ ValueError: I/O operation on closed file ``` (Found in https://github.com/xonsh/xonsh/issues/5631#issuecomment-2266321712) ## For community ⬇️ **Please click the 👍 reaction instead of leaving a `+1` or 👍 comment**
2hard
Title: Faster R-CNN example bug report Body: On https://github.com/ppwwyyxx/tensorpack/blob/master/examples/FasterRCNN/train.py#L105 `decoded_boxes = decode_bbox_target(rpn_box_logits, fm_anchors) # fHxfWxNAx4, floatbox` the `decoded_boxes` is defined on the feature_map which is 1/16.0 scale smaller than original image, because `fm_anchors `is defined on feature_map but not the original image size. But in https://github.com/ppwwyyxx/tensorpack/blob/master/examples/FasterRCNN/train.py#L115 The `rcnn_sampled_boxes `is also come from `decoded_boxes `and not resize, so it should define already on 1/16.0 scale smaller feature map, you should not multiply 1/16.0
1medium
Title: [BUG] torch2trt assert(permutation[0] == 0) # cannot move batch dim Body: **Describe the bug** https://github.com/cszn/SCUNet/blob/main/models/network_scunet.py ``` File "C:\Program Files\Python310\lib\site-packages\einops\einops.py", line 487, in rearrange return reduce(tensor, pattern, reduction='rearrange', **axes_lengths) File "C:\Program Files\Python310\lib\site-packages\einops\einops.py", line 410, in reduce return _apply_recipe(recipe, tensor, reduction_type=reduction) File "C:\Program Files\Python310\lib\site-packages\einops\einops.py", line 236, in _apply_recipe tensor = backend.transpose(tensor, axes_reordering) File "C:\Program Files\Python310\lib\site-packages\einops\_backends.py", line 331, in transpose return x.permute(axes) File "C:\Program Files\Python310\lib\site-packages\torch2trt-0.4.0-py3.10.egg\torch2trt\torch2trt.py", line 307, in wrapper converter["converter"](ctx) File "C:\Program Files\Python310\lib\site-packages\torch2trt-0.4.0-py3.10.egg\torch2trt\converters\permute.py", line 17, in convert_permute assert(permutation[0] == 0) # cannot move batch dim ``` **Reproduction steps** ``` if __name__ == '__main__': from torch2trt import torch2trt device = 'cuda' net = SCUNet().eval().to(device) x = torch.randn((1, 3, 128, 128)).to(device) net = torch2trt(net, [x]) x = net(x) print(x.shape) ``` **Expected behavior** Maybe: https://github.com/NVIDIA-AI-IOT/torch2trt/issues/742#issuecomment-1170672478 **Your platform** ``` Win10 x64 Package Version ----------------------- -------------------- absl-py 1.2.0 addict 2.4.0 basicsr 1.4.2 cachetools 5.2.0 certifi 2022.9.14 charset-normalizer 2.1.1 colorama 0.4.5 contourpy 1.0.5 cycler 0.11.0 einops 0.4.1 fairscale 0.4.9 focal-frequency-loss 0.3.0 fonttools 4.37.3 future 0.18.2 google-auth 2.11.1 google-auth-oauthlib 0.4.6 graphsurgeon 0.4.6 grpcio 1.49.1 idna 3.4 imageio 2.22.0 kiwisolver 1.4.4 lmdb 1.3.0 lpips 0.1.4 Markdown 3.4.1 MarkupSafe 2.1.1 matplotlib 3.6.0 networkx 2.8.6 numpy 1.23.3 oauthlib 3.2.1 onnx 1.12.0 onnx-graphsurgeon 0.3.12 opencv-python 4.6.0.66 packaging 21.3 Pillow 9.2.0 pip 22.2.2 protobuf 3.20.1 pyasn1 0.4.8 pyasn1-modules 0.2.8 pyparsing 3.0.9 python-dateutil 2.8.2 PyWavelets 1.4.1 PyYAML 6.0 requests 2.28.1 requests-oauthlib 1.3.1 rsa 4.9 scikit-image 0.19.3 scipy 1.9.1 setuptools 63.2.0 six 1.16.0 tb-nightly 2.11.0a20220922 tensorboard-data-server 0.6.1 tensorboard-plugin-wit 1.8.1 tensorrt 8.4.3.1 thop 0.1.1.post2209072238 tifffile 2022.8.12 timm 0.6.7 torch 1.12.1+cu116 torch2trt 0.4.0 torchaudio 0.12.1+cu116 torchinfo 1.7.0 torchvision 0.13.1+cu116 tqdm 4.64.1 typing_extensions 4.3.0 uff 0.6.9 urllib3 1.26.12 Werkzeug 2.2.2 wheel 0.37.1 yapf 0.32.0 ```
2hard
Title: Implement urls domain, protocol and site name for frontend Body: If you're develop a backend and frontend in separate projects, cannot add `ACTIVATION_URL` in DJOSER settings like this ```python DJOSER = { "SEND_ACTIVATION_EMAIL": True, "SEND_CONFIRMATION_EMAIL": True, "USER_CREATE_PASSWORD_RETYPE": True, # specially this "ACTIVATION_URL": os.environ.get( "DJANGO_ACTIVATION_URL", "auth/users/activate/{uid}/{token}" ), } ``` because implicitly check inside the backend this path from example `localhost:8000`, and maybe the frontend project is in another repo and another host From documentation: ![image](https://github.com/sunscrapers/djoser/assets/78490028/dbe86144-c657-42af-b78a-0a06785fb1b0) This PR #729 by @n-borges allows this functionality Please check this out ❤️
1medium
Title: awswrangler.data_api.redshift.read_sql_query support query parameters Body: **Is your idea related to a problem? Please describe.** can't specify query parameters via awswrangler.data_api.redshift.read_sql_query AWS docs describe [underlying support](https://docs.aws.amazon.com/redshift/latest/mgmt/data-api.html#data-api-calling-considerations-parameters) for this, but seems it's not exposed via awswrangler. **Describe the solution you'd like** in the same way we can provide query parameters via `awswrangler.redshift.read_sql_query(sql, con, params='...')` we should be able to do the same via the awswrangler.data_api.redshift.read_sql_query awswrangler==3.11.0
1medium
Title: Add legend styling options Body: Introduce a `set_legend` option to style the legend. Maybe also legend-specific transforms, for example location?
1medium
Title: Pipeline for opentapioca not working Body: ### Discussed in https://github.com/explosion/spaCy/discussions/13678 <div type='discussions-op-text'> <sup>Originally posted by **piaschwarz** October 25, 2024</sup> I am using opentapioca for entity linking. The code worked before but now calling the opentapioca endpoint throws an error (happens with _and_ without the endpoint url in the config variable). Is it a problem on my side or is the endpoint not working? **Versions:** Python 3.10.6 spacy 3.3.1 spacy-transformers 1.1.7 spacyopentapioca 0.1.7 **My code**: ``` import spacy nlp_spacy_trf = spacy.load('de_dep_news_trf') dummy_text = "Christian Drosten arbeitet an der Charité in Berlin." nlp_spacy_trf.add_pipe('opentapioca', config={"url": "https://opentapioca.wordlift.io/api/annotate?lc=de"}) doc = nlp_spacy_trf(dummy_text) for span in doc.ents: print((span.text, span.kb_id_, span.label_, span._.description, span._.score)) ``` keeps throwing this **error**: ``` Traceback (most recent call last): File "/home/xxxxxxxx/.local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 703, in urlopen httplib_response = self._make_request( File "/home/xxxxxxxx/.local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 386, in _make_request self._validate_conn(conn) File "/home/xxxxxxxx/.local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 1042, in _validate_conn conn.connect() File "/home/xxxxxxxx/.local/lib/python3.10/site-packages/urllib3/connection.py", line 414, in connect self.sock = ssl_wrap_socket( File "/home/xxxxxxxx/.local/lib/python3.10/site-packages/urllib3/util/ssl_.py", line 449, in ssl_wrap_socket ssl_sock = _ssl_wrap_socket_impl( File "/home/xxxxxxxx/.local/lib/python3.10/site-packages/urllib3/util/ssl_.py", line 493, in _ssl_wrap_socket_impl return ssl_context.wrap_socket(sock, server_hostname=server_hostname) File "/usr/lib/python3.10/ssl.py", line 513, in wrap_socket return self.sslsocket_class._create( File "/usr/lib/python3.10/ssl.py", line 1071, in _create self.do_handshake() File "/usr/lib/python3.10/ssl.py", line 1342, in do_handshake self._sslobj.do_handshake() ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate (_ssl.c:997) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/xxxxxxxx/.local/lib/python3.10/site-packages/requests/adapters.py", line 489, in send resp = conn.urlopen( File "/home/xxxxxxxx/.local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 787, in urlopen retries = retries.increment( File "/home/xxxxxxxx/.local/lib/python3.10/site-packages/urllib3/util/retry.py", line 592, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='opentapioca.wordlift.io', port=443): Max retries exceeded with url: /api/annotate?lc=de (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate (_ssl.c:997)'))) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/mnt/c/Users/XXXXX/PycharmProjects/EntityLinking/experiments.py", line 10, in <module> doc = nlp_spacy_trf(dummy_text) File "/home/xxxxxxxx/.local/lib/python3.10/site-packages/spacy/language.py", line 1025, in __call__ error_handler(name, proc, [doc], e) File "/home/xxxxxxxx/.local/lib/python3.10/site-packages/spacy/util.py", line 1630, in raise_error raise e File "/home/xxxxxxxx/.local/lib/python3.10/site-packages/spacy/language.py", line 1020, in __call__ doc = proc(doc, **component_cfg.get(name, {})) # type: ignore[call-arg] File "/home/xxxxxxxx/.local/lib/python3.10/site-packages/spacyopentapioca/entity_linker.py", line 101, in __call__ r = self.make_request(doc) File "/home/xxxxxxxx/.local/lib/python3.10/site-packages/spacyopentapioca/entity_linker.py", line 93, in make_request return requests.post(url=self.url, File "/home/xxxxxxxx/.local/lib/python3.10/site-packages/requests/api.py", line 115, in post return request("post", url, data=data, json=json, **kwargs) File "/home/xxxxxxxx/.local/lib/python3.10/site-packages/requests/api.py", line 59, in request return session.request(method=method, url=url, **kwargs) File "/home/xxxxxxxx/.local/lib/python3.10/site-packages/requests/sessions.py", line 587, in request resp = self.send(prep, **send_kwargs) File "/home/xxxxxxxx/.local/lib/python3.10/site-packages/requests/sessions.py", line 701, in send r = adapter.send(request, **kwargs) File "/home/xxxxxxxx/.local/lib/python3.10/site-packages/requests/adapters.py", line 563, in send raise SSLError(e, request=request) requests.exceptions.SSLError: HTTPSConnectionPool(host='opentapioca.wordlift.io', port=443): Max retries exceeded with url: /api/annotate?lc=de (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate (_ssl.c:997)'))) ```</div>
1medium
Title: HaloAttention掩码问题 Body: # mask out padding (in the paper, they claim to not need masks, but what about padding?) mask = torch.ones(1, 1, h, w, device = device) mask = F.unfold(mask, kernel_size = block + (halo * 2), stride = block, padding = halo) mask = repeat(mask, '() j i -> (b i h) () j', b = b, h = heads) mask = mask.bool() max_neg_value = -torch.finfo(sim.dtype).max sim.masked_fill_(mask, max_neg_value) 代码似乎将所有非0值置为无穷小,根据注释似乎是想将padding位置 置为无穷小
1medium
Title: Bug: Type Mismatch in Dataset Mapping Body: # Issue: Type Mismatch in Dataset Mapping ## Description There is an issue with the `map` function in the `datasets` library where the mapped output does not reflect the expected type change. After applying a mapping function to convert an integer label to a string, the resulting type remains an integer instead of a string. ## Reproduction Code Below is a Python script that demonstrates the problem: ```python from datasets import Dataset # Original data data = { 'text': ['Hello', 'world', 'this', 'is', 'a', 'test'], 'label': [0, 1, 0, 1, 1, 0] } # Creating a Dataset object dataset = Dataset.from_dict(data) # Mapping function to convert label to string def add_one(example): example['label'] = str(example['label']) return example # Applying the mapping function dataset = dataset.map(add_one) # Iterating over the dataset to show results for item in dataset: print(item) print(type(item['label'])) ``` ## Expected Output After applying the mapping function, the expected output should have the `label` field as strings: ```plaintext {'text': 'Hello', 'label': '0'} <class 'str'> {'text': 'world', 'label': '1'} <class 'str'> {'text': 'this', 'label': '0'} <class 'str'> {'text': 'is', 'label': '1'} <class 'str'> {'text': 'a', 'label': '1'} <class 'str'> {'text': 'test', 'label': '0'} <class 'str'> ``` ## Actual Output The actual output still shows the `label` field values as integers: ```plaintext {'text': 'Hello', 'label': 0} <class 'int'> {'text': 'world', 'label': 1} <class 'int'> {'text': 'this', 'label': 0} <class 'int'> {'text': 'is', 'label': 1} <class 'int'> {'text': 'a', 'label': 1} <class 'int'> {'text': 'test', 'label': 0} <class 'int'> ``` ## Why necessary In the case of Image process we often need to convert PIL to tensor with same column name. Thank for every dev who review this issue. 🤗
1medium
Title: Examples involving skopt.callbacks Body: Right now, we have no examples illustrating callbacks. It would be great to have a number of examples illustrating at least 1. Usage of different types of callbacks. 2. How to write a custom callback.
1medium
Title: [BUG] -m gemini-pro-vision asking for OPENAI_API_KEY Body: Found a bug? Please fill out the sections below. 👍 ### Describe the bug Ran `operate -m gemini-pro-vision`, entered my gemini API key from google AIstudio, but when I request something I always get ``` [Self-Operating Computer | gemini-pro-vision] Hello, I can help you with anything. What would you like done? [User] turn on night mode [Self-Operating Computer][Operate] That did not work. Trying another method [Self-Operating Computer][Error] -> The api_key client option must be set either by passing api_key to the client or by setting the OPENAI_API_KEY environment variable ``` ### Steps to Reproduce 1. Install with pip 2. run `operate -m gemini-pro-vision` and enter API key 3. insert any prompt 4. also tried by setting up the GOOGLE_API_KEY env variable in a .env file as well as export GOOGLE_API_KEY=abc123 ### Expected Behavior The machine, self-operates ### Actual Behavior: Error in the console ### Environment - OS: Mac os sonomo 14.3 - Model Used (e.g., GPT-4v, Gemini Pro Vision): Gemini pro vision - Framework Version (optional): ### Screenshots <img width="857" alt="image" src="https://github.com/OthersideAI/self-operating-computer/assets/34170261/674aec9d-9f66-4d8b-b3fc-ce77fdb7c4a4"> ### Additional context Add any other context about the problem here.
1medium
Title: Incorrect validation from the e-mail when the user is not logged in. Body: ``` def validate(self, attrs): user = self.context["request"].user or self.user # why assert? There are ValidationError / fail everywhere assert user is not None ``` When the user is not logged in then AnonymousUser is always sent to the function` validate_password (attrs ["new_password"], user)` . If we have validation of the amount of password used, the validation will not be performed. change: ``` def validate(self, attrs): request_user = self.context["request"].user user = self.user if request_user.is_anonymous is True else request_user assert user is not None ```
1medium
Title: Lots of components on gradio.app component gallery are broken Body: ### Describe the bug Visit https://www.gradio.app/custom-components/gallery Click on logsview, popup, chatpdf, agentchatbot, etc... Observe this: ![image](https://github.com/user-attachments/assets/f6d6e432-4244-420b-b1c9-99ef7f3542ed) It says "Your space is in error, check its status on hf.co" ### Have you searched existing issues? 🔎 - [X] I have searched and found no existing issues ### Reproduction See above. ### Screenshot _No response_ ### Logs _No response_ ### System Info ```shell N/A ``` ### Severity I can work around it
1medium
Title: `vlines` (vertical lines, sharing x axis) on multiple panels Body: Hello Daniel, 👋 Thank you for your dedication in improving the MPF library ! 📈 I am looking for different options for the X_AXIS/GRID adjustments: - [1] : Drawing vertical line for all panels ( when passing ```**kwargs(vlines)``` to ```mpf.plot()``` it is not drawing on all panels) - [2] : Adjusting the ```grid``` for ```x_axis``` with MPF. I seen other examples where we have to use ```axes``` . Is there a more efficient way to do that with MPF? If i well understood what others did is, returning the ```axes``` and then calling the ```add_subplot``` method from MPL wich will force me to start again from scratch using only MPL. I guess I missed something, here is a part of my code: ``` df = 'pandas dataframe with datetime index and ohlcv and RSI values' vls = pd.date_range(df.index.min(), df.index.max(), freq='D').tolist() ap1 = [ mpf.make_addplot(df['RSI'], panel=1, color='royalblue') ] kwargs = dict(type='candle', vlines=dict(vlines=vls, linewidths=0.5, colors=('r'))) mpf.plot(df, addplot=ap1, **kwargs) ``` (If you prefer 2 different posts i can separate each request..)
1medium
Title: Unable to save chart image, or setting not to save chart will throw error "No such file or directory" Body: ### System Info OS version: win 10 22h2 Python version: 3.12.3 The current version of pandasai being used: 2.1.1 ### 🐛 Describe the bug Originally, these codes were working properly. But since I specified running parameters such as "open_charts" and "save_charts"<sup>*</sup>, I found that the parameters seemed to be ineffective. I kept throwing errors afterwards, even deleting all the parameters and deleting the "charts" and "exports" folders(The folder will be rebuilt), but it still didn't work properly. [car.csv](https://github.com/user-attachments/files/15781120/car.csv) ```python import pandas as pd from pandasai import SmartDataframe from os.path import dirname, join from os import environ from datetime import datetime api_key = environ.get('PANDASAI_API_KEY') if api_key is None: api_key = '' # todo environ.setdefault('PANDASAI_API_KEY', api_key) base_path = dirname(__file__) files_path = join(base_path, "files") csv_path = join(base_path, "car.csv") data = pd.read_csv(csv_path) ai_data = SmartDataframe(data) print('ok') respone = ai_data.chat('生成马力与油耗关系图?') # Generate a graph of the relationship between horsepower and fuel consumption? print(respone) ``` ``` Traceback (most recent call last): File "D:\anaconda3\envs\zyzs-ai\Lib\site-packages\pandasai\pipelines\chat\generate_chat_pipeline.py", line 310, in run ).run(input) ^^^^^^^^^^ File "D:\anaconda3\envs\zyzs-ai\Lib\site-packages\pandasai\pipelines\pipeline.py", line 137, in run raise e File "D:\anaconda3\envs\zyzs-ai\Lib\site-packages\pandasai\pipelines\pipeline.py", line 101, in run step_output = logic.execute( ^^^^^^^^^^^^^^ File "D:\anaconda3\envs\zyzs-ai\Lib\site-packages\pandasai\pipelines\chat\code_execution.py", line 133, in execute {"content_type": "response", "value": ResponseSerializer.serialize(result)}, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\anaconda3\envs\zyzs-ai\Lib\site-packages\pandasai\responses\response_serializer.py", line 35, in serialize with open(result["value"], "rb") as image_file: ^^^^^^^^^^^^^^^^^^^^^^^^^^^ FileNotFoundError: [Errno 2] No such file or directory: 'D:/Projects/zyzs-ai/exports/charts/temp_chart.png' Unfortunately, I was not able to answer your question, because of the following error: [Errno 2] No such file or directory: 'D:/Projects/zyzs-ai/exports/charts/temp_chart.png' ``` <sup>*</sup>Code marked with an asterisk: ```python ai_df = SmartDataframe(df, config={ 'open_charts': True, # or False 'save_charts': True, # or False 'save_charts_path': join(project_path, 'exports', 'charts', datetime.now().strftime('%Y-%m-%d')), 'enable_cache': False }) ```
1medium
Title: Uncaptured error raised when invalid HTML is stored in RichTestField and processed by `handle_endtag` in edit interface (throws 500 error) Body: ### Issue Summary When invalid HTML is imported programmatically into a `RichTextField` when viewing custom Wagtail Page model in the CMS interface an unhandled exception is thrown when using the default widget for this field type. ref: `wagtail/admin/rich_text/converters/html_to_contentstate.py` ### Steps to Reproduce 1. Start a new project with `wagtail start myproject` 2. Edit `models.py` to include new field as follows... 3. `example_field = RichTextField(blank=True)` 4. `FieldPanel('reviews'),` 5. import some invalid HTML into this field, sample invalid HTML below: `"<p><em>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</em>, 15 August 1897</p>\n<p><em>\n<p><em>Lorem ipsum, </em>12 August&nbsp;1926</p>\n<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>\n</em></p>\n<p>429, September 1906, pp. &nbsp;800-44&nbsp;<em>&nbsp;</em></p>\n<p>&nbsp;</p>\n<p>&nbsp;</p>"` 6. View page in the CMS edit interface 7. 500 error will be thrown, sample stacktrace below. ``` Environment: Request Method: GET Request URL: http://localhost:9000/cms/pages/266/edit/ Django Version: 4.2.15 Python Version: 3.12.4 Installed Applications: [..., 'wagtailmedia', 'wagtail.contrib.forms', 'wagtail.contrib.redirects', 'wagtail.embeds', 'wagtail.sites', 'wagtail.users', 'wagtail.snippets', 'wagtail.documents', 'wagtail.images', 'wagtail.search', 'wagtail.admin', 'wagtail', 'modelcluster', 'taggit', 'import_export', 'django.contrib.sitemaps', 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.gis', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'django.contrib.sites'] Installed Middleware: ['django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', 'wagtail.contrib.redirects.middleware.RedirectMiddleware'] Template error: In template /opt/venv/lib/python3.12/site-packages/wagtail/admin/templates/wagtailadmin/panels/object_list.html, error at line 9 End of block reached without closing inline style elements 1 : {% load wagtailadmin_tags %} 2 : 3 : <div class="w-form-width" {% include "wagtailadmin/shared/attrs.html" with attrs=self.attrs %}> 4 : {% if self.help_text %} 5 : {% help_block status="info" %}{{ self.help_text }}{% endhelp_block %} 6 : {% endif %} 7 : {% for child, identifier in self.visible_children_with_identifiers %} 8 : {% panel id_prefix=self.prefix id=identifier classname=child.classes|join:' ' attrs=child.attrs heading=child.heading heading_size="label" icon=child.icon id_for_label=child.id_for_label is_required=child.is_required %} 9 : {% component child %} 10 : {% endpanel %} 11 : {% endfor %} 12 : </div> 13 : Traceback (most recent call last): File "/opt/venv/lib/python3.12/site-packages/django/core/handlers/exception.py", line 55, in inner response = get_response(request) ^^^^^^^^^^^^^^^^^^^^^ File "/opt/venv/lib/python3.12/site-packages/django/core/handlers/base.py", line 220, in _get_response response = response.render() ^^^^^^^^^^^^^^^^^ File "/opt/venv/lib/python3.12/site-packages/wagtail/admin/auth.py", line 171, in overridden_render return render() ^^^^^^^^ File "/opt/venv/lib/python3.12/site-packages/django/template/response.py", line 114, in render self.content = self.rendered_content ^^^^^^^^^^^^^^^^^^^^^ File "/opt/venv/lib/python3.12/site-packages/django/template/response.py", line 92, in rendered_content return template.render(context, self._request) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/venv/lib/python3.12/site-packages/django/template/backends/django.py", line 61, in render return self.template.render(context) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/venv/lib/python3.12/site-packages/django/template/base.py", line 175, in render return self._render(context) ^^^^^^^^^^^^^^^^^^^^^ File "/opt/venv/lib/python3.12/site-packages/django/template/base.py", line 167, in _render return self.nodelist.render(context) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/venv/lib/python3.12/site-packages/django/template/base.py", line 1005, in render return SafeString("".join([node.render_annotated(context) for node in self])) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/venv/lib/python3.12/site-packages/django/template/base.py", line 966, in render_annotated return self.render(context) ^^^^^^^^^^^^^^^^^^^^ File "/opt/venv/lib/python3.12/site-packages/django/template/loader_tags.py", line 157, in render return compiled_parent._render(context) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/venv/lib/python3.12/site-packages/django/template/base.py", line 167, in _render return self.nodelist.render(context) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/venv/lib/python3.12/site-packages/django/template/base.py", line 1005, in render return SafeString("".join([node.render_annotated(context) for node in self])) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/venv/lib/python3.12/site-packages/django/template/base.py", line 966, in render_annotated return self.render(context) ^^^^^^^^^^^^^^^^^^^^ File "/opt/venv/lib/python3.12/site-packages/django/template/loader_tags.py", line 157, in render return compiled_parent._render(context) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/venv/lib/python3.12/site-packages/django/template/base.py", line 167, in _render return self.nodelist.render(context) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/venv/lib/python3.12/site-packages/django/template/base.py", line 1005, in render return SafeString("".join([node.render_annotated(context) for node in self])) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/venv/lib/python3.12/site-packages/django/template/base.py", line 966, in render_annotated return self.render(context) ^^^^^^^^^^^^^^^^^^^^ File "/opt/venv/lib/python3.12/site-packages/django/template/loader_tags.py", line 157, in render return compiled_parent._render(context) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/venv/lib/python3.12/site-packages/django/template/base.py", line 167, in _render return self.nodelist.render(context) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/venv/lib/python3.12/site-packages/django/template/base.py", line 1005, in render return SafeString("".join([node.render_annotated(context) for node in self])) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/venv/lib/python3.12/site-packages/django/template/base.py", line 966, in render_annotated return self.render(context) ^^^^^^^^^^^^^^^^^^^^ File "/opt/venv/lib/python3.12/site-packages/django/template/loader_tags.py", line 157, in render return compiled_parent._render(context) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/venv/lib/python3.12/site-packages/django/template/base.py", line 167, in _render return self.nodelist.render(context) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/venv/lib/python3.12/site-packages/django/template/base.py", line 1005, in render return SafeString("".join([node.render_annotated(context) for node in self])) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/venv/lib/python3.12/site-packages/django/template/base.py", line 966, in render_annotated return self.render(context) ^^^^^^^^^^^^^^^^^^^^ File "/opt/venv/lib/python3.12/site-packages/django/template/loader_tags.py", line 63, in render result = block.nodelist.render(context) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/venv/lib/python3.12/site-packages/django/template/base.py", line 1005, in render return SafeString("".join([node.render_annotated(context) for node in self])) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/venv/lib/python3.12/site-packages/django/template/base.py", line 966, in render_annotated return self.render(context) ^^^^^^^^^^^^^^^^^^^^ File "/opt/venv/lib/python3.12/site-packages/django/template/loader_tags.py", line 63, in render result = block.nodelist.render(context) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/venv/lib/python3.12/site-packages/django/template/base.py", line 1005, in render return SafeString("".join([node.render_annotated(context) for node in self])) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/venv/lib/python3.12/site-packages/django/template/base.py", line 966, in render_annotated return self.render(context) ^^^^^^^^^^^^^^^^^^^^ File "/opt/venv/lib/python3.12/site-packages/django/template/loader_tags.py", line 63, in render result = block.nodelist.render(context) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/venv/lib/python3.12/site-packages/django/template/base.py", line 1005, in render return SafeString("".join([node.render_annotated(context) for node in self])) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/venv/lib/python3.12/site-packages/django/template/base.py", line 966, in render_annotated return self.render(context) ^^^^^^^^^^^^^^^^^^^^ File "/opt/venv/lib/python3.12/site-packages/django/template/base.py", line 1064, in render output = self.filter_expression.resolve(context) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/venv/lib/python3.12/site-packages/django/template/base.py", line 715, in resolve obj = self.var.resolve(context) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/venv/lib/python3.12/site-packages/django/template/base.py", line 847, in resolve value = self._resolve_lookup(context) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/venv/lib/python3.12/site-packages/django/template/base.py", line 914, in _resolve_lookup current = current() ^^^^^^^^^ File "/opt/venv/lib/python3.12/site-packages/wagtail/admin/panels/base.py", line 317, in render_form_content return mark_safe(self.render_html() + self.render_missing_fields()) ^^^^^^^^^^^^^^^^^^ File "/opt/venv/lib/python3.12/site-packages/laces/components.py", line 55, in render_html return template.render(context_data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/venv/lib/python3.12/site-packages/django/template/backends/django.py", line 61, in render return self.template.render(context) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/venv/lib/python3.12/site-packages/django/template/base.py", line 175, in render return self._render(context) ^^^^^^^^^^^^^^^^^^^^^ File "/opt/venv/lib/python3.12/site-packages/django/template/base.py", line 167, in _render return self.nodelist.render(context) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/venv/lib/python3.12/site-packages/django/template/base.py", line 1005, in render return SafeString("".join([node.render_annotated(context) for node in self])) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/venv/lib/python3.12/site-packages/django/template/base.py", line 966, in render_annotated return self.render(context) ^^^^^^^^^^^^^^^^^^^^ File "/opt/venv/lib/python3.12/site-packages/django/template/defaulttags.py", line 238, in render nodelist.append(node.render_annotated(context)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/venv/lib/python3.12/site-packages/django/template/base.py", line 966, in render_annotated return self.render(context) ^^^^^^^^^^^^^^^^^^^^ File "/opt/venv/lib/python3.12/site-packages/django/template/defaulttags.py", line 321, in render return nodelist.render(context) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/venv/lib/python3.12/site-packages/django/template/base.py", line 1005, in render return SafeString("".join([node.render_annotated(context) for node in self])) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/venv/lib/python3.12/site-packages/django/template/base.py", line 966, in render_annotated return self.render(context) ^^^^^^^^^^^^^^^^^^^^ File "/opt/venv/lib/python3.12/site-packages/django/template/base.py", line 1064, in render output = self.filter_expression.resolve(context) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/venv/lib/python3.12/site-packages/django/template/base.py", line 715, in resolve obj = self.var.resolve(context) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/venv/lib/python3.12/site-packages/django/template/base.py", line 847, in resolve value = self._resolve_lookup(context) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/venv/lib/python3.12/site-packages/django/template/base.py", line 914, in _resolve_lookup current = current() ^^^^^^^^^ File "/opt/venv/lib/python3.12/site-packages/laces/components.py", line 55, in render_html return template.render(context_data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/venv/lib/python3.12/site-packages/django/template/backends/django.py", line 61, in render return self.template.render(context) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/venv/lib/python3.12/site-packages/django/template/base.py", line 175, in render return self._render(context) ^^^^^^^^^^^^^^^^^^^^^ File "/opt/venv/lib/python3.12/site-packages/django/template/base.py", line 167, in _render return self.nodelist.render(context) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/venv/lib/python3.12/site-packages/django/template/base.py", line 1005, in render return SafeString("".join([node.render_annotated(context) for node in self])) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/venv/lib/python3.12/site-packages/django/template/base.py", line 966, in render_annotated return self.render(context) ^^^^^^^^^^^^^^^^^^^^ File "/opt/venv/lib/python3.12/site-packages/django/template/defaulttags.py", line 238, in render nodelist.append(node.render_annotated(context)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/venv/lib/python3.12/site-packages/django/template/base.py", line 966, in render_annotated return self.render(context) ^^^^^^^^^^^^^^^^^^^^ File "/opt/venv/lib/python3.12/site-packages/wagtail/admin/templatetags/wagtailadmin_tags.py", line 1070, in render children = self.nodelist.render(context) if self.nodelist else "" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/venv/lib/python3.12/site-packages/django/template/base.py", line 1005, in render return SafeString("".join([node.render_annotated(context) for node in self])) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/venv/lib/python3.12/site-packages/django/template/base.py", line 966, in render_annotated return self.render(context) ^^^^^^^^^^^^^^^^^^^^ File "/opt/venv/lib/python3.12/site-packages/laces/templatetags/laces.py", line 81, in render html = component.render_html(context) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/venv/lib/python3.12/site-packages/laces/components.py", line 50, in render_html context_data = self.get_context_data(parent_context) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/venv/lib/python3.12/site-packages/wagtail/admin/panels/field_panel.py", line 273, in get_context_data context.update(self.get_editable_context_data()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/venv/lib/python3.12/site-packages/wagtail/admin/panels/field_panel.py", line 315, in get_editable_context_data rendered_field = self.bound_field.as_widget(attrs=widget_attrs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/venv/lib/python3.12/site-packages/django/forms/boundfield.py", line 107, in as_widget return widget.render( File "/opt/venv/lib/python3.12/site-packages/django/forms/widgets.py", line 280, in render context = self.get_context(name, value, attrs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/venv/lib/python3.12/site-packages/wagtail/admin/rich_text/editors/draftail/__init__.py", line 72, in get_context context = super().get_context(name, value, attrs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/venv/lib/python3.12/site-packages/django/forms/widgets.py", line 333, in get_context context = super().get_context(name, value, attrs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/venv/lib/python3.12/site-packages/django/forms/widgets.py", line 272, in get_context "value": self.format_value(value), ^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/venv/lib/python3.12/site-packages/wagtail/admin/rich_text/editors/draftail/__init__.py", line 69, in format_value return self.converter.from_database_format(value) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/venv/lib/python3.12/site-packages/wagtail/admin/rich_text/converters/contentstate.py", line 141, in from_database_format self.html_to_contentstate_handler.feed(html) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/html/parser.py", line 111, in feed self.goahead(0) ^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/html/parser.py", line 173, in goahead k = self.parse_endtag(i) ^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/html/parser.py", line 414, in parse_endtag self.handle_endtag(elem) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/venv/lib/python3.12/site-packages/wagtail/admin/rich_text/converters/html_to_contentstate.py", line 396, in handle_endtag element_handler.handle_endtag(name, self.state, self.contentstate) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/venv/lib/python3.12/site-packages/wagtail/admin/rich_text/converters/html_to_contentstate.py", line 125, in handle_endtag not state.current_inline_styles ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Exception Type: AssertionError at /cms/pages/266/edit/ Exception Value: End of block reached without closing inline style elements ``` Any other relevant information. For example, why do you consider this a bug and what did you expect to happen instead? I would have expected that the error would be captured and reported back to the end user in the CMS edit interface near the field(s) that had the problem data. Desirable features might include a report of the offending HTML so the field's contents can be amended manually, but I appreciate this is an edge use case. However, better error handling would be essential. Thanks. - I have confirmed that this issue can be reproduced as described on a fresh Wagtail project: (no) ### Technical details - Django Version: 4.2.15 - Python Version: 3.12.4 - wagtail 6.2 - Browser version: Chrome 127 ### Working on this Requires Python & Wagtail/Django knowledge of exception handling, may require some Wagtail admin template skills to ensure error message is relayed correctly to the end user. Anyone can contribute to this. View our [contributing guidelines](https://docs.wagtail.org/en/latest/contributing/index.html), add a comment to the issue once you’re ready to start.
1medium
Title: Pipeline Level success/failure callbacks Body: **Is your feature request related to a problem? Please describe.** There are times where I want to call a function when a pipeline fails, but having it be block level and applied to every block can lead to multiple calls when concurrent blocks fail at the same time. Having a pipeline-level callback feature would prevent this issue **Describe the solution you'd like** Similar to the block-level callbacks, there would be a pipeline-level callback where a failure/success function would be called depending on the status of the pipeline as a whole, as opposed to an individual block. **Describe alternatives you've considered** Having a sensor pipeline running adjacently to the main pipeline that detects for success/failure has been a decent solution, but the check_status function doesn't have great handling of failure, it simply throws an error on failure as opposed to an output like True or False.
1medium
Title: Switch from faiss-gpu to faiss-cpu Body: Given that GPU builds aren't being used and reported issues with macOS, switch to faiss-cpu package
1medium
Title: Example for quant Gpt-neox-20b Body: Hey guys, I am using `GPTQ` to quantize the `GPT-NeoX-20B` model. Previously, when quantizing the Llama Family model, I usually used `C4` as the example tokenizer. May I ask which dataset is suitable for `GPT-NeoX-20B`?
1medium
Title: Is JWT in Authorization header a standard? Body: Hi there, Great work on django-rest-framework-jwt so far. It is a perfect fit with DRF. I noticed that you are using JWT in your Authorization header, as in your example: $ curl -H "Authorization: JWT <your_token>" http://localhost:8000/protected-url/ Is it the recommended way in the current JWT draft? Other server side token framework often accept Bearer instead of JWT, which I think is very common. The reason I am asking because satellizer (an oauth2 token based javascript library for angularjs) does not work with your django-rest-framework-jwt. I suspect because of the JWT text in the Authorization header. Could you please have a look?
1medium
Title: Build from source on MacOS M1 failed Body: **Describe the issue**: I followed instructions from https://nni.readthedocs.io/zh/stable/notes/build_from_source.html, run command ```bash conda create --name my_env conda activate my_env git clone https://github.com/microsoft/nni.git cd nni pip install --upgrade setuptools pip wheel pip install jupyterlab==3.0.9 export NNI_RELEASE=2.0 python setup.py build_ts ``` I got error when running 'python setup.py build_ts', as shown below ``` running build_ts # Downloading node.js from https://nodejs.org/dist/v16.14.2/node-v16.14.2-darwin-arm64.tar.xz # Extracting node.js # Downloading yarn from https://github.com/yarnpkg/yarn/releases/download/v1.22.10/yarn-v1.22.10.tar.gz # Extracting yarn # Building NNI manager # yarn (path: ts/nni_manager) yarn install v1.22.10 [1/5] 🔍 Validating package.json... [2/5] 🔍 Resolving packages... [3/5] 🚚 Fetching packages... [4/5] 🔗 Linking dependencies... warning " > express-joi-validator@2.0.1" has incorrect peer dependency "joi@6.x.x". warning " > @typescript-eslint/eslint-plugin@2.34.0" has incorrect peer dependency "@typescript-eslint/parser@^2.0.0". warning " > @typescript-eslint/eslint-plugin@2.34.0" has incorrect peer dependency "eslint@^5.0.0 || ^6.0.0". warning Workspaces can only be enabled in private projects. [5/5] 🔨 Building fresh packages... [1/3] ⢀ sqlite3 [2/3] ⢀ cpu-features warning Error running install script for optional dependency: "/Users/shuffleofficial/nni/ts/nni_manager/node_modules/cpu-features: Command failed. Exit code: 1 Command: node-gyp rebuild Arguments: Directory: /Users/shuffleofficial/nni/ts/nni_manager/node_modules/cpu-features Output: gyp info it worked if it ends with ok gyp info using node-gyp@9.1.0 gyp info using node@16.14.2 | darwin | arm64 gyp info find Python using Python version 3.10.4 found at \"/Users/shuffleofficial/opt/anaconda3/envs/ds_wgan/bin/python3\" gyp info spawn /Users/shuffleofficial/opt/anaconda3/envs/ds_wgan/bin/python3 gyp info spawn args [ gyp info spawn args '/Users/shuffleofficial/.config/yarn/global/node_modules/node-gyp/gyp/gyp_main.py', gyp info spawn args 'binding.gyp', gyp info spawn args '-f', gyp info spawn args 'make', gyp info spawn args '-I', gyp info spawn args '/Users/shuffleofficial/nni/ts/nni_manager/node_modules/cpu-features/build/config.gypi', gyp info spawn args '-I', gyp info spawn args '/Users/shuffleofficial/.config/yarn/global/node_modules/node-gyp/addon.gypi', gyp info spawn args '-I', gyp info spawn args '/Users/shuffleofficial/Library/Caches/node-gyp/16.14.2/include/node/common.gypi', gyp info spawn args '-Dlibrary=shared_library', gyp info spawn args '-Dvisibility=default', gyp info spawn args '-Dnode_root_dir=/Users/shuffleofficial/Library/Caches/node-gyp/16.14.2', gyp info spawn args '-Dnode_gyp_dir=/Users/shuffleofficial/.config/yarn/global/node_modules/node-gyp', gyp info spawn args '-Dnode_lib_file=/Users/shuffleofficial/Library/Caches/node-gyp/16.14.2/<(target_arch)/node.lib', gyp info spawn args '-Dmodule_root_dir=/Users/shuffleofficial/nni/ts/nni_manager/node_modules/cpu-features', gyp info spawn args '-Dnode_engine=v8', gyp info spawn args '--depth=.', gyp info spawn args '--no-parallel', gyp info spawn args '--generator-output', gyp info spawn args 'build', gyp info spawn args '-Goutput_dir=.' gyp info spawn args ] gyp info spawn make gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ] ACTION Configuring dependencies /Users/shuffleofficial/nni/ts/nni_manager/node_modules/cpu-features/deps/cpu_features/build/Makefile -- The C compiler identification is AppleClang 14.0.0.14000029 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Looking for dlfcn.h -- Looking for dlfcn.h - found -- Looking for getauxval -- Looking for getauxval - not found -- Configuring done -- Generating done -- Build files have been written to: /Users/shuffleofficial/nni/ts/nni_manager/node_modules/cpu-features/deps/cpu_features/build TOUCH Release/obj.target/config_deps.stamp ACTION Building dependencies /Users/shuffleofficial/nni/ts/nni_manager/node_modules/cpu-features/deps/cpu_features/build/libcpu_features.a [ 11%] Building C object CMakeFiles/utils.dir/src/filesystem.c.o [ 22%] Building C object CMakeFiles/utils.dir/src/stack_line_reader.c.o [ 33%] Building C object CMakeFiles/utils.dir/src/string_view.c.o [ 33%] Built target utils [ 44%] Building C object CMakeFiles/unix_based_hardware_detection.dir/src/hwcaps.c.o [ 55%] Building C object CMakeFiles/unix_based_hardware_detection.dir/src/unix_features_aggregator.c.o [ 55%] Built target unix_based_hardware_detection [ 66%] Building C object CMakeFiles/cpu_features.dir/src/cpuinfo_arm.c.o In file included from /Users/shuffleofficial/nni/ts/nni_manager/node_modules/cpu-features/deps/cpu_features/src/cpuinfo_arm.c:15: /Users/shuffleofficial/nni/ts/nni_manager/node_modules/cpu-features/deps/cpu_features/include/cpuinfo_arm.h:118:2: error: \"Including cpuinfo_arm.h from a non-arm target.\" #error \"Including cpuinfo_arm.h from a non-arm target.\" ^ 1 error generated. make[3]: *** [CMakeFiles/cpu_features.dir/src/cpuinfo_arm.c.o] Error 1 make[2]: *** [CMakeFiles/cpu_features.dir/all] Error 2 make[1]: *** [all] Error 2 make: *** [/Users/shuffleofficial/nni/ts/nni_manager/node_modules/cpu-features/deps/cpu_features/build/libcpu_features.a] Error 2 gyp ERR! build error gyp ERR! stack Error: `make` failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/Users/shuffleofficial/.config/yarn/global/node_modules/node-gyp/lib/build.js:201:23) gyp ERR! stack at ChildProcess.emit (node:events:526:28) gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12) gyp ERR! System Darwin 21.6.0 gyp ERR! command \"/Users/shuffleofficial/nni/nni_node/node\" \"/Users/shuffleofficial/.yarn/bin/node-gyp\" \"rebuild\" gyp ERR! cwd /Users/shuffleofficial/nni/ts/nni_manager/node_modules/cpu-features gyp ERR! node -v v16.14.2 gyp ERR! node-gyp -v v9.1.0 ✨ Done in 39.75s. # yarn build (path: ts/nni_manager) yarn run v1.22.10 $ tsc /bin/sh: tsc: command not found error Command failed with exit code 127. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. Traceback (most recent call last): File "/Users/shuffleofficial/nni/setup.py", line 300, in <module> _setup() File "/Users/shuffleofficial/nni/setup.py", line 93, in _setup setuptools.setup( File "/Users/shuffleofficial/opt/anaconda3/envs/ds_wgan/lib/python3.10/site-packages/setuptools/__init__.py", line 87, in setup return distutils.core.setup(**attrs) File "/Users/shuffleofficial/opt/anaconda3/envs/ds_wgan/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 185, in setup return run_commands(dist) File "/Users/shuffleofficial/opt/anaconda3/envs/ds_wgan/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 201, in run_commands dist.run_commands() File "/Users/shuffleofficial/opt/anaconda3/envs/ds_wgan/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 968, in run_commands self.run_command(cmd) File "/Users/shuffleofficial/opt/anaconda3/envs/ds_wgan/lib/python3.10/site-packages/setuptools/dist.py", line 1217, in run_command super().run_command(command) File "/Users/shuffleofficial/opt/anaconda3/envs/ds_wgan/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 987, in run_command cmd_obj.run() File "/Users/shuffleofficial/nni/setup.py", line 224, in run setup_ts.build(release) File "/Users/shuffleofficial/nni/setup_ts.py", line 53, in build compile_ts(release) File "/Users/shuffleofficial/nni/setup_ts.py", line 173, in compile_ts _yarn('ts/nni_manager', 'build') File "/Users/shuffleofficial/nni/setup_ts.py", line 272, in _yarn subprocess.run([str(_yarn_path), *args], cwd=path, check=True, env=_yarn_env) File "/Users/shuffleofficial/opt/anaconda3/envs/ds_wgan/lib/python3.10/subprocess.py", line 524, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command '['/Users/shuffleofficial/nni/toolchain/yarn/bin/yarn', 'build']' returned non-zero exit status 127. ``` **Environment**: - NNI version: 2.0 - Training service (local|remote|pai|aml|etc): local - Client OS: MacOS 12.6 - Server OS (for remote mode only): - Python version: Python 3.10.4 (main, Mar 31 2022, 03:37:37) [Clang 12.0.0 ] on darwin - PyTorch/TensorFlow version: Not applicable - Is conda/virtualenv/venv used?: conda - Is running in Docker?: No **How to reproduce it?**: On a macos with M1 chip, run the terminal command above.
1medium
Title: Why there is no square root at area_temperature? Body: https://github.com/tensorflow/tensor2tensor/blob/5623deb79cfcd28f8f8c5463b58b5bd76a81fd0d/tensor2tensor/layers/area_attention.py#L415 In typical dot product attention, logit which is the input matrix of softmax supposed to be divided by square rooted temperature like the equation below. ![image](https://user-images.githubusercontent.com/63258184/140316988-7c87e78f-0ad8-415d-a860-8d751c124cb0.png) However, in this code, logit is just divided with temperature without a square root. Is it correct or wrong? If it is correct, could you explain why you didn't add square root?
1medium
Title: Is Vectorbt suitable for price-based aggregations? Body: Congratulations on an exciting project - a seriously impressive achievement in such a short timeframe! I'd be grateful if you could help me assess its suitability for our trading style. I'm a developer, but have never used Python. But I'd learn it to access Vectorbt provided you can reassure me that I'm not going to hit any show-stopping issues with price-based aggregations. Our trading style uses aggregations such as Renko, which as you know can form at any time. So bars in a portfolio test are not aligned by time as with conventional time-based candles. This means that a portfolio dataframe would normally have just a single value for each datetime-indexed row, with all the other instruments set to NaN. I'd be importing the data from CSV files in OHLCV format. Will this pose problems for analysis or visualisations? So many backtester projects seem to assume that data is aligned by time that it's proving challenging to find any serious tool for backtesting Renko. Thanks in advance for your advice!
1medium
Title: Django thread-local connection cleanup in multi threads Body: This issue illustrates a potential issues that may affect Django adapter users. Django's ORM establishes a database connection per thread. For the threads managed by Django (which are supposed to be used for directly handing web requests), Django ORM cleans the established connections up under the hood once the processing on the thread completes (= request_finished signal). On the other hand, in the case where Django ORM models are used in an unmanaged thread, Django does not handle the cleanup of the connections bound to the thread although the Django framework automatically associates a new connection to the thread. This half-heartedly maintained resource possibly may cause stale DB connection related issues. To learn more details of this Django behavior, checking the following ticket is helpful for understanding this: https://code.djangoproject.com/ticket/9878 As Bolt for Python utilizes threads for enabling developers to run `ack()` method asynchronously (as long as `process_before_response=False`, which is the default), this framework should have a special treatment for this possible issue with Django. As the solution for this issue (and possible similar needs), we'll introduce a new completion callback to the `ListenerRunner` mechanism. The handler will be quite similar to the `ListenerErrorHandler` callback but the given callback function is executed in the `finally` clause of listener runner invocation: https://github.com/slackapi/bolt-python/blob/v1.4.4/slack_bolt/listener/thread_runner.py#L99-L126 Also, for this Django specific issue, we'll add a custom lazy listener runner to the Django adapter module. I've already implemented the initial version of this. We can discuss its details in my upcoming pull request.
2hard
Title: Issue with write_url when internally referencing a sheet (with spaces) in the same book Body: Hi, I am trying to use XlsxWriter to create a table of contents that has hyperlinks that are linked to the various sheets within the book. The sheet names have spaces in them, so I follow the syntax guidelines of single-quoting the sheet: ``` import xlsxwriter workbook = xlsxwriter.Workbook('hello.xlsx') worksheet = workbook.add_worksheet() call = "internal:'Summary Figure 1'!A1" worksheet.write_url(5, 0, call, url_format, string = string + str(end_year)) ``` When I print the string 'call', I get "internal:'Summary Figure 1'!A1" out, but when I run the program and edit the hyperlink in the output xlsx file, it shows: %22internal:'Summary%20Figure%201'!A1%22 which breaks the link. I am using Python version 3.6 and XlsxWriter 1.0.4 and Excel version 2013. I believe this same problem was fixed for external references (https://github.com/jmcnamara/XlsxWriter/issues/350), but not for internal. Thanks
1medium
Title: Don't know how to convert the Django field class 'djongo.models.fields.ArrayField' Body: from djongo.models import Model, CharField, ObjectIdField, IntegerField, ArrayField from django.forms import ModelForm class Contact(Model): name = CharField(max_length=50) phone_number = IntegerField() class Meta: abstract = True class ContactForm(ModelForm): class Meta: model = Contact fields = ("name", "phone_number") class Organization(Model): _id = ObjectIdField() name = CharField(max_length=50, unique=True) desk_number = IntegerField() registered_address = CharField(max_length=256) communication_address = CharField(max_length=256) email_address = CharField(max_length=150) contacts = ArrayField(model_container=Contact, model_form_class=ContactForm, null=False) type = CharField(max_length=256) pan_number = CharField(max_length=15) gst_number = CharField(max_length=25) member_count = IntegerField() account_number = IntegerField() bank_name = CharField(70) ifsc_code = CharField(10) registration_year = CharField(4) class Meta: """ to set table name in database """ db_table = "organization" File "D:\miniconda\envs\deeplearning\lib\threading.py", line 932, in _bootstrap_inner self.run() File "D:\miniconda\envs\deeplearning\lib\threading.py", line 870, in run self._target(*self._args, **self._kwargs) File "D:\miniconda\envs\deeplearning\lib\site-packages\django\utils\autoreload.py", line 53, in wrapper fn(*args, **kwargs) File "D:\miniconda\envs\deeplearning\lib\site-packages\django\core\management\commands\runserver.py", line 117, in inner_run self.check(display_num_errors=True) File "D:\miniconda\envs\deeplearning\lib\site-packages\django\core\management\base.py", line 392, in check all_issues = self._run_checks( File "D:\miniconda\envs\deeplearning\lib\site-packages\django\core\management\base.py", line 382, in _run_checks return checks.run_checks(**kwargs) File "D:\miniconda\envs\deeplearning\lib\site-packages\django\core\checks\registry.py", line 72, in run_checks new_errors = check(app_configs=app_configs) File "D:\miniconda\envs\deeplearning\lib\site-packages\django\core\checks\urls.py", line 13, in check_url_config return check_resolver(resolver) File "D:\miniconda\envs\deeplearning\lib\site-packages\django\core\checks\urls.py", line 23, in check_resolver return check_method() File "D:\miniconda\envs\deeplearning\lib\site-packages\django\urls\resolvers.py", line 407, in check for pattern in self.url_patterns: File "D:\miniconda\envs\deeplearning\lib\site-packages\django\utils\functional.py", line 48, in __get__ res = instance.__dict__[self.name] = self.func(instance) File "D:\miniconda\envs\deeplearning\lib\site-packages\django\urls\resolvers.py", line 588, in url_patterns patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module) File "D:\miniconda\envs\deeplearning\lib\site-packages\django\utils\functional.py", line 48, in __get__ res = instance.__dict__[self.name] = self.func(instance) File "D:\miniconda\envs\deeplearning\lib\site-packages\django\urls\resolvers.py", line 581, in urlconf_module return import_module(self.urlconf_name) File "D:\miniconda\envs\deeplearning\lib\importlib\__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1014, in _gcd_import File "<frozen importlib._bootstrap>", line 991, in _find_and_load File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 671, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 783, in exec_module File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed File "D:\Work\datascience\deeplearning\main\urls.py", line 26, in <module> from .schema import schema File "D:\Work\datascience\deeplearning\main\schema.py", line 14, in <module> from api.organization.query import Query as QOrganization File "D:\Work\datascience\deeplearning\api\organization\query.py", line 15, in <module> class OrganizationType(DjangoObjectType): File "D:\miniconda\envs\deeplearning\lib\site-packages\graphene\utils\subclass_with_meta.py", line 52, in __init_subclass__ super_class.__init_subclass_with_meta__(**options) File "D:\miniconda\envs\deeplearning\lib\site-packages\graphene_django\types.py", line 227, in __init_subclass_with_meta__ construct_fields(model, registry, fields, exclude, convert_choices_to_enum), File "D:\miniconda\envs\deeplearning\lib\site-packages\graphene_django\types.py", line 63, in construct_fields converted = convert_django_field_with_choices( File "D:\miniconda\envs\deeplearning\lib\site-packages\graphene_django\converter.py", line 112, in convert_django_field_with_choices converted = convert_django_field(field, registry) File "D:\miniconda\envs\deeplearning\lib\functools.py", line 875, in wrapper return dispatch(args[0].__class__)(*args, **kw) File "D:\miniconda\envs\deeplearning\lib\site-packages\graphene_django\converter.py", line 120, in convert_django_field raise Exception( Exception: Don't know how to convert the Django field organization.Organization.contacts (<class 'djongo.models.fields.ArrayField'>)
1medium
Title: Automatic object type resolution does not trigger in reference resolvers Body: <!-- Provide a general summary of the bug in the title above. --> <!--- This template is entirely optional and can be removed, but is here to help both you and us. --> <!--- Anything on lines wrapped in comments like these will not show up in the final text. --> ## Describe the Bug <!-- A clear and concise description of what the bug is. --> This is a bit of a tricky one to explain, so do let me know if any further clarity is needed. TL;DR: Strawberry is unable to resolve federated types where the reference resolver does not explicitly return an object type, or where the type being federated defines inline field resolvers. It's easier to explain with an MRE. This system has two services, `groups` and `users`, each pertaining to group and user queries respectively. The `Group` type is federated, and the `users` service has two queries. `Users` contains `group` as a field. groups/app.py: ```py from types import SimpleNamespace from typing import Self import strawberry groups = { "1": SimpleNamespace(id="1", name="Hello", altname="Hey"), "2": SimpleNamespace(id="2", name="Strawberry"), "3": SimpleNamespace(id="3", name="World", altname="Earth"), } @strawberry.federation.type(keys=["id"]) class Group: id: strawberry.ID name: str altname: str = strawberry.field( resolver=lambda root: getattr(root, "altname", root.name), ) @classmethod def resolve_reference(cls, id: str) -> Self: return groups.get(id) schema = strawberry.federation.Schema( types=[Group], enable_federation_2=True, ) ``` users/app.py: ```py from types import SimpleNamespace import strawberry users = { "1": SimpleNamespace(id="1", group_id="1"), "2": SimpleNamespace(id="2", group_id="2"), "3": SimpleNamespace(id="3", group_id="3"), } @strawberry.federation.type(keys=["id"]) class Group: id: strawberry.ID @strawberry.type class User: id: int group: Group = strawberry.field( resolver=lambda root: Group(id=root.group_id), ) @strawberry.type class Query: @strawberry.field def users(self) -> list[User]: return list(users.values()) @strawberry.field def user(self) -> User: return users.get("1") schema = strawberry.federation.Schema( query=Query, enable_federation_2=True, ) ``` Posting the following query (`altname` is intentionally omitted for now): ```json {"query": "query { users { id group { id name } } }" ``` returns the following error in the `groups` service: ``` GraphQL request:1:37 1 | query($representations: [_Any!]!) { _entities(representations: $representations) { ... on Group { name } } } | ^ Traceback (most recent call last): File "/Users/ethanhenderson/Programs/Playground/strawberry_test/.venv/lib/python3.13/site-packages/graphql/execution/execute.py", line 728, in complete_list_value completed_item = self.complete_value( item_type, field_nodes, info, item_path, item ) File "/Users/ethanhenderson/Programs/Playground/strawberry_test/.venv/lib/python3.13/site-packages/graphql/execution/execute.py", line 646, in complete_value return self.complete_abstract_value( ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ cast(GraphQLAbstractType, return_type), field_nodes, info, path, result ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) ^ File "/Users/ethanhenderson/Programs/Playground/strawberry_test/.venv/lib/python3.13/site-packages/graphql/execution/execute.py", line 798, in complete_abstract_value runtime_type = resolve_type_fn(result, info, return_type) File "/Users/ethanhenderson/Programs/Playground/strawberry_test/.venv/lib/python3.13/site-packages/strawberry/types/union.py", line 185, in _resolve_union_type raise WrongReturnTypeForUnion(info.field_name, str(type(root))) strawberry.exceptions.WrongReturnTypeForUnion: The type "<class 'types.SimpleNamespace'>" cannot be resolved for the field "_entities" , are you using a strawberry.field? ``` This error can be resolved by explicitly returning a `Group` object type, like so: ```py @classmethod def resolve_reference(cls, id: str) -> Self: group = groups.get(id) return Group(id=group.id, name=group.name) ``` However, when querying `altname` as well, which uses an inline resolver: ```json {"query": "query { users { id group { id name altname } } }" ``` The `groups` service raises this error instead: ``` GraphQL request:1:104 1 | query($representations: [_Any!]!) { _entities(representations: $representations) { ... on Group { name altname } } } | ^ Traceback (most recent call last): File "/Users/ethanhenderson/Programs/Playground/strawberry_test/.venv/lib/python3.13/site-packages/graphql/execution/execute.py", line 542, in execute_field completed = self.complete_value( return_type, field_nodes, info, path, result ) File "/Users/ethanhenderson/Programs/Playground/strawberry_test/.venv/lib/python3.13/site-packages/graphql/execution/execute.py", line 614, in complete_value completed = self.complete_value( cast(GraphQLNonNull, return_type).of_type, ...<3 lines>... result, ) File "/Users/ethanhenderson/Programs/Playground/strawberry_test/.venv/lib/python3.13/site-packages/graphql/execution/execute.py", line 641, in complete_value return self.complete_leaf_value(cast(GraphQLLeafType, return_type), result) ~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/ethanhenderson/Programs/Playground/strawberry_test/.venv/lib/python3.13/site-packages/graphql/execution/execute.py", line 776, in complete_leaf_value serialized_result = return_type.serialize(result) File "/Users/ethanhenderson/Programs/Playground/strawberry_test/.venv/lib/python3.13/site-packages/graphql/type/scalars.py", line 177, in serialize_string raise GraphQLError("String cannot represent value: " + inspect(output_value)) graphql.error.graphql_error.GraphQLError: String cannot represent value: <method> ``` `altname` can't be passed as an argument to the constructor as it has an inline resolver, and it can't be resolved when being federated from another type as Strawberry doesn't perform the necessary resolution. This makes it very difficult to use inline resolvers in federated types. If there's another way of doing this I'm missing, do let me know. ## System Information - Operating system: MacOS 15.3.2 - Strawberry version (if applicable): 0.262.3 ## Additional Context The MRE is based on the setup in the [Federation v2 Guide](https://strawberry.rocks/docs/guides/federation#apollo-federation-2-guide) to try and make it simpler.
2hard
Title: Update embedded-devices example for the latest PyTorch and JetPack Body: ### Describe the type of feature and its functionality. Following @jafermarq's suggestion(#4381 , #4382 ), I am creating this new issue. How would you feel about providing guidelines for the build script? I’ve modified the build script (`build_jetson_flower_client.sh`) to use Flower (`flwr`) with JetPack 6.0 and successfully tested it. I believe it would be beneficial to provide guidelines for the build script. Utilizing the BASE_PYTORCH variable could simplify the process compared to reinstalling PyTorch from scratch. Currently, the [NVIDIA NGC Catalog](https://catalog.ngc.nvidia.com/orgs/nvidia/containers/l4t-pytorch) offers base images supporting up to PyTorch v2.0.0. Additionally, with a bit more searching, we can find [the dustynv base image](https://github.com/dusty-nv/jetson-containers) for PyTorch v2.2.0, which is compatible with JetPack 6.0. I have also confirmed on [the NVIDIA forums](https://forums.developer.nvidia.com/t/jetson-container-for-jetpack-6/292662/6) that the R36.2 container image is compatible with R36.3. Let me know if this approach aligns with your plans or if there's anything else I can assist with. I'm happy to help further, whether it's refining the build script guidelines or contributing in other ways! ### Describe step by step what files and adjustments are you planning to include. **`build_jetson_flower_client.sh`** `Update the build script to accept the BASE_PYTORCH and BASE_TF variables as input arguments. Ensure that the script defaults to a standard base image if no argument is provided. **`Dockerfile`** `In my experience using the dusty-nv base image, I encountered an issue where libsndfile1 was missing. To resolve this, I added the following command to the Dockerfile: ``` RUN apt-get update && \ apt-get install -y --no-install-recommends libsndfile1 && \ rm -rf /var/lib/apt/lists/* ``` **`README.md`** `Add a table that lists the available base images along with a brief description and reference links. ### Is there something else you want to add? _No response_
1medium
Title: Json definition in core.remote action command Body: ## SUMMARY I need to insert a workflow parameter inside a Json definition for my action. The first problem is that I can't even run the command with a Json definition in it (withou the parameter in the Json). ``` input: - parameter tasks: run: action: core.remote input: cmd: command --json= '{"key1": "someValeu", "key": "secondValue" }' ``` This results in the error: ``` result: errors: - message: "mapping values are not allowed here in "<unicode string>", line 16, column 78: ... command --json= '{ "key1": "someValeu", "key2": "secondValue" } ^" ``` The second problem is, assuming I can resolve the first one, as far as I saw in the examples and tested, `<% ctx().parameter %>` cannot be used inside single quotes, it only works when used inside double quotes. But the Json only works if I define it using single quotes. In the end I would like to have the workflow: ``` input: - parameter tasks: run: action: core.remote input: cmd: command --json= '{"key1": "someValeu", "key2": <% ctx().parameter %> }' ``` ### STACKSTORM VERSION st2 3.4dev (c422f0029), on Python 3.6.9 ##### OS, environment, install method Running on Kubenetes on k3os system. Deployed using stackstorm-ha ## Expected Results Is there a way to get around these problems?
2hard
Title: I consider redoing this for other languages, is this possible for a private person? Body: I would love to recrate this experiment in German and maybe also Esperanto and it looks easy enough, I bascially just have to adapt [prompt.txt](https://github.com/tatsu-lab/stanford_alpaca/blob/main/prompt.txt) to another language and follow the rest of the instructions, right? I am willing to invest arount 100€ into this, do you think it could be feasible? I don't care if the training is slow or if I need a few months for it. So do you see more ways to optimize the process? For example could I train it on Google Colab?
3misc
Title: 如何加载自己训练的模型 Body: 基于GFPGAN训练了自己的数据集,如何加载自己训练的模型?加载哪一个?
1medium
Title: is dlib Detector use gpu ? Body: Hello I have tried Face recognition using (Facenet512 and dlib) on 300 images it takes 8 min. And I have tried to install TensorFlow-GPU but the time is still 8 min. If use (Facenet512 and ssd )for example it uses GPU but with using (Facenet512 and dlib) it's now. ####### ``` python version 3.9.16 TensorFlow-GPU version 2.11.1 ``` ####### Any suggest for solving the problem ??
1medium
Title: Batch prediction Body: Hi! Is there any plan for batch inference or passing list of images/image path list in the `readtext` function? I see that `recognize` takes `batch_size` arg but `img_cv_grey` seem to be single image only. How do I infer on a batch of image? ```python def recognize(self, img_cv_grey, horizontal_list=None, free_list=None,\ decoder = 'greedy', beamWidth= 5, batch_size = 1,\ workers = 0, allowlist = None, blocklist = None, detail = 1,\ rotation_info = None,\ paragraph = False,\ contrast_ths = 0.1,adjust_contrast = 0.5, filter_ths = 0.003,\ reformat=True): ```
1medium
Title: __init__() got an unexpected keyword argument 'w_init' Body: I got this error when I try to create a instance with initializers. This error comes from **sonnet.nets.MLP** . Any solutions? thanks
1medium
Title: [Migrated] zappa deploy fails with import error even though the module is present in the package Body: Originally from: https://github.com/Miserlou/Zappa/issues/1687 by [wholeinsoul](https://github.com/wholeinsoul) ## Context I have django project that works locally and in elasticbeanstalk. Now I'm trying to deploy it to AWS lambda using zappa. But I'm getting the following error even though the module urllib3 is present in the package zip. ``` No module named urllib3: ImportError Traceback (most recent call last): File "/var/task/handler.py", line 580, in lambda_handler return LambdaHandler.lambda_handler(event, context) File "/var/task/handler.py", line 245, in lambda_handler handler = cls() File "/var/task/handler.py", line 151, in __init__ wsgi_app_function = get_django_wsgi(self.settings.DJANGO_SETTINGS) File "/var/task/zappa/ext/django_zappa.py", line 20, in get_django_wsgi return get_wsgi_application() File "/tmp/task/django/core/wsgi.py", line 14, in get_wsgi_application django.setup() File "/tmp/task/django/__init__.py", line 17, in setup configure_logging(settings.LOGGING_CONFIG, settings.LOGGING) File "/tmp/task/django/conf/__init__.py", line 48, in __getattr__ self._setup(name) File "/tmp/task/django/conf/__init__.py", line 44, in _setup self._wrapped = Settings(settings_module) File "/tmp/task/django/conf/__init__.py", line 92, in __init__ mod = importlib.import_module(self.SETTINGS_MODULE) File "/usr/lib64/python2.7/importlib/__init__.py", line 37, in import_module __import__(name) File "/var/task/api/settings/test.py", line 4, in <module> File "/tmp/task/elasticsearch/__init__.py", line 17, in <module> from .client import Elasticsearch File "/tmp/task/elasticsearch/client/__init__.py", line 5, in <module> from ..transport import Transport File "/tmp/task/elasticsearch/transport.py", line 5, in <module> from .connection import Urllib3HttpConnection File "/tmp/task/elasticsearch/connection/__init__.py", line 3, in <module> from .http_urllib3 import Urllib3HttpConnection File "/tmp/task/elasticsearch/connection/http_urllib3.py", line 2, in <module> import urllib3 ``` My project directory structure is: <project_name>/api --> this has all my django apps and code /manage.py /zappa_settings.json Environment zappa: 0.47.0 docker image built using https://github.com/danielwhatmuff/zappa python 2.7 venv)bash-4.2# pip freeze | grep url urllib3==1.20 zappa_settings.json: ``` { "dev": { "django_settings": "api.settings.test", "profile_name": null, "project_name": "server", "runtime": "python2.7", "s3_bucket": "zappa-server-localhost", "slim_handler": true, "exclude": [ "*.mp4", "*.ogv", "*.webm", "logs", "*.log", "media", "static_dirs", ".git", ".elasticbeanstalk", ".ropeproject" ], "environment_variables": { //removed } }, } ```
2hard
Title: Fast way to load multiple models from files? Body: I'm building a system for classifying images into multiple categories, and approaching the problem using multiple networks (all my networks have the same structure, and output `[0,1]` or `[1,0]` (Yes or No). There's (for the sake of the example) a network for dogs, another network for cats, the third network is for cars, and so and so... **My first question**: Is this kind of approach the popular one, or is there a different (and hopefully better) approach for classifying a LOT of different subjects? If I'm on the right path, I wondered if there a fast way to load the models from their files using TFLearn. Currently, I have a function to define my model structure: def define_network_model(category_id): """ Defines a network structure """` # Defining image augmentation # We want to create a stilted wider dataset aug = ImageAugmentation() aug.add_random_flip_leftright() aug.add_random_blur(sigma_max=3.) aug.add_random_rotation(max_angle=20.) T.reset_default_graph() # Input layer net = input_data(shape=[None, IMG_SIZE, IMG_SIZE, 1], name="input", \ data_augmentation=aug) # 2D Convolution layer net = conv_2d(net, 32, 5, activation='relu') net = max_pool_2d(net, 3) .... More layers .... # Output layer net = fully_connected(net, 2, activation='softmax') # Regression layer net = regression(net, optimizer='adam', learning_rate=LEARNING_RATE, \ loss='categorical_crossentropy', name='targets') # Creating a model model = tflearn.DNN(net, tensorboard_dir="tensorboard", \ best_checkpoint_path=os.path.join(CHECKPOINTS_DIR, category_id), \ best_val_accuracy=0.7) return model And when I want to load the models, I have a categories object I'm iterating through and loading all the categories: models = {} for id, cat in categories.items(): m = define_network_model(id) # Creating the structure m.load(os.path.join(MODELS_DIR, id)) # Loading the file models[id] = m # Appending to the models list for later evaluation Defining the network every iteration takes **a LOT** of time (>2sec for every iteration). **My second question**: Am I missing something here? Can the structure be cloned from a model to another in a faster way, or am I just on the wrong path?
2hard
Title: Add Structured Parsing Body: From a BaseModel class, we return the parsing of the file organized.
1medium
Title: Why mochi diffusers video output is worse than mochi official code? Body: ### Describe the bug The quality of video is worse. ### Reproduction Run the code with official prompt ### Logs _No response_ ### System Info diffusers@main ### Who can help? @a-r-r-o-w @yiyixuxu
2hard
Title: Using TensorFlow backend Body: I can't use my GPU. ============ System Information ============ encoding: cp936 git_branch: master git_commits: 2f15597 requirements.txt - typofix gpu_cuda: No global version found. Check Conda packages for Conda Cuda gpu_cudnn: No global version found. Check Conda packages for Conda cuDNN gpu_devices: GPU_0: GeForce RTX 2060 gpu_devices_active: GPU_0 gpu_driver: 436.30 gpu_vram: GPU_0: 6144MB os_machine: AMD64 os_platform: Windows-10-10.0.18362-SP0 os_release: 10 py_command: C:\Users\Administrator\faceswap/faceswap.py gui py_conda_version: conda 4.8.3 py_implementation: CPython py_version: 3.7.7 py_virtual_env: True sys_cores: 6 sys_processor: AMD64 Family 23 Model 113 Stepping 0, AuthenticAMD sys_ram: Total: 16333MB, Available: 8629MB, Used: 7704MB, Free: 8629MB =============== Pip Packages =============== absl-py==0.9.0 astor==0.8.0 blinker==1.4 brotlipy==0.7.0 cachetools==4.1.0 certifi==2020.6.20 cffi==1.14.0 chardet==3.0.4 click==7.1.2 cloudpickle @ file:///tmp/build/80754af9/cloudpickle_1594141588948/work cryptography==2.9.2 cycler==0.10.0 cytoolz==0.10.1 dask @ file:///tmp/build/80754af9/dask-core_1594156306305/work decorator==4.4.2 fastcluster==1.1.26 ffmpy==0.2.3 gast==0.2.2 google-auth @ file:///tmp/build/80754af9/google-auth_1594357566944/work google-auth-oauthlib==0.4.1 google-pasta==0.2.0 grpcio==1.27.2 h5py==2.10.0 idna @ file:///tmp/build/80754af9/idna_1593446292537/work imageio @ file:///tmp/build/80754af9/imageio_1594161405741/work imageio-ffmpeg @ file:///home/conda/feedstock_root/build_artifacts/imageio-ffmpeg_1589202782679/work joblib @ file:///tmp/build/80754af9/joblib_1594236160679/work Keras==2.2.4 Keras-Applications @ file:///tmp/build/80754af9/keras-applications_1594366238411/work Keras-Preprocessing==1.1.0 kiwisolver==1.2.0 Markdown==3.1.1 matplotlib @ file:///C:/ci/matplotlib-base_1592846084747/work mkl-fft==1.1.0 mkl-random==1.1.1 mkl-service==2.3.0 networkx @ file:///tmp/build/80754af9/networkx_1594377231366/work numpy==1.18.5 nvidia-ml-py3 @ git+https://github.com/deepfakes/nvidia-ml-py3.git@6fc29ac84b32bad877f078cb4a777c1548a00bf6 oauthlib==3.1.0 olefile==0.46 opencv-python==4.3.0.36 opt-einsum==3.1.0 Pillow @ file:///C:/ci/pillow_1594298234712/work protobuf==3.12.3 psutil==5.7.0 pyasn1==0.4.8 pyasn1-modules==0.2.7 pycparser @ file:///tmp/build/80754af9/pycparser_1594388511720/work PyJWT==1.7.1 pyOpenSSL @ file:///tmp/build/80754af9/pyopenssl_1594392929924/work pyparsing==2.4.7 pyreadline==2.1 PySocks @ file:///C:/ci/pysocks_1594394709107/work python-dateutil==2.8.1 PyWavelets==1.1.1 pywin32==227 PyYAML==5.3.1 requests @ file:///tmp/build/80754af9/requests_1592841827918/work requests-oauthlib==1.3.0 rsa==4.0 scikit-image==0.16.2 scikit-learn @ file:///C:/ci/scikit-learn_1592847564598/work scipy @ file:///C:/ci/scipy_1592916958183/work six==1.15.0 tensorboard==2.2.1 tensorboard-plugin-wit==1.6.0 tensorflow==1.15.0 tensorflow-estimator==1.15.1 termcolor==1.1.0 threadpoolctl @ file:///tmp/tmp9twdgx9k/threadpoolctl-2.1.0-py3-none-any.whl toolz==0.10.0 toposort==1.5 tornado==6.0.4 tqdm @ file:///tmp/build/80754af9/tqdm_1593446365756/work urllib3==1.25.9 Werkzeug==0.16.1 win-inet-pton==1.1.0 wincertstore==0.2 wrapt==1.12.1 ============== Conda Packages ============== # packages in environment at C:\Users\Administrator\MiniConda3\envs\faceswap: # # Name Version Build Channel _tflow_select 2.2.0 eigen absl-py 0.9.0 py37_0 astor 0.8.0 py37_0 blas 1.0 mkl blinker 1.4 py37_0 brotlipy 0.7.0 py37he774522_1000 ca-certificates 2020.6.24 0 cachetools 4.1.0 py_1 certifi 2020.6.20 py37_0 cffi 1.14.0 py37h7a1dbc1_0 chardet 3.0.4 py37_1003 click 7.1.2 py_0 cloudpickle 1.5.0 py_0 cryptography 2.9.2 py37h7a1dbc1_0 cycler 0.10.0 py37_0 cytoolz 0.10.1 py37he774522_0 dask-core 2.20.0 py_0 decorator 4.4.2 py_0 fastcluster 1.1.26 py37h9b59f54_1 conda-forge ffmpeg 4.3 ha925a31_0 conda-forge ffmpy 0.2.3 pypi_0 pypi freetype 2.10.2 hd328e21_0 gast 0.2.2 py37_0 git 2.23.0 h6bb4b03_0 google-auth 1.17.2 py_0 google-auth-oauthlib 0.4.1 py_2 google-pasta 0.2.0 py_0 grpcio 1.27.2 py37h351948d_0 h5py 2.10.0 py37h5e291fa_0 hdf5 1.10.4 h7ebc959_0 icc_rt 2019.0.0 h0cc432a_1 icu 58.2 ha925a31_3 idna 2.10 py_0 imageio 2.9.0 py_0 imageio-ffmpeg 0.4.2 py_0 conda-forge intel-openmp 2020.1 216 joblib 0.16.0 py_0 jpeg 9b hb83a4c4_2 keras 2.2.4 0 keras-applications 1.0.8 py_1 keras-base 2.2.4 py37_0 keras-preprocessing 1.1.0 py_1 kiwisolver 1.2.0 py37h74a9793_0 libpng 1.6.37 h2a8f88b_0 libprotobuf 3.12.3 h7bd577a_0 libtiff 4.1.0 h56a325e_1 lz4-c 1.9.2 h62dcd97_0 markdown 3.1.1 py37_0 matplotlib 3.2.2 0 matplotlib-base 3.2.2 py37h64f37c6_0 mkl 2020.1 216 mkl-service 2.3.0 py37hb782905_0 mkl_fft 1.1.0 py37h45dec08_0 mkl_random 1.1.1 py37h47e9c7a_0 networkx 2.4 py_1 numpy 1.18.5 py37h6530119_0 numpy-base 1.18.5 py37hc3f5095_0 nvidia-ml-py3 7.352.1 pypi_0 pypi oauthlib 3.1.0 py_0 olefile 0.46 py37_0 opencv-python 4.3.0.36 pypi_0 pypi openssl 1.1.1g he774522_0 opt_einsum 3.1.0 py_0 pathlib 1.0.1 py37_2 pillow 7.2.0 py37hcc1f983_0 pip 20.1.1 py37_1 protobuf 3.12.3 py37h33f27b4_0 psutil 5.7.0 py37he774522_0 pyasn1 0.4.8 py_0 pyasn1-modules 0.2.7 py_0 pycparser 2.20 py_2 pyjwt 1.7.1 py37_0 pyopenssl 19.1.0 py_1 pyparsing 2.4.7 py_0 pyqt 5.9.2 py37h6538335_2 pyreadline 2.1 py37_1 pysocks 1.7.1 py37_1 python 3.7.7 h81c818b_4 python-dateutil 2.8.1 py_0 python_abi 3.7 1_cp37m conda-forge pywavelets 1.1.1 py37he774522_0 pywin32 227 py37he774522_1 pyyaml 5.3.1 py37he774522_1 qt 5.9.7 vc14h73c81de_0 requests 2.24.0 py_0 requests-oauthlib 1.3.0 py_0 rsa 4.0 py_0 scikit-image 0.16.2 py37h47e9c7a_0 scikit-learn 0.23.1 py37h25d0782_0 scipy 1.5.0 py37h9439919_0 setuptools 49.2.0 py37_0 sip 4.19.8 py37h6538335_0 six 1.15.0 py_0 sqlite 3.32.3 h2a8f88b_0 tensorboard 2.2.1 pyh532a8cf_0 tensorboard-plugin-wit 1.6.0 py_0 tensorflow 1.15.0 eigen_py37h9f89a44_0 tensorflow-base 1.15.0 eigen_py37h07d2309_0 tensorflow-estimator 1.15.1 pyh2649769_0 termcolor 1.1.0 py37_1 threadpoolctl 2.1.0 pyh5ca1d4c_0 tk 8.6.10 he774522_0 toolz 0.10.0 py_0 toposort 1.5 py_3 conda-forge tornado 6.0.4 py37he774522_1 tqdm 4.47.0 py_0 urllib3 1.25.9 py_0 vc 14.1 h0510ff6_4 vs2015_runtime 14.16.27012 hf0eaf9b_3 werkzeug 0.16.1 py_0 wheel 0.34.2 py37_0 win_inet_pton 1.1.0 py37_0 wincertstore 0.2 py37_0 wrapt 1.12.1 py37he774522_1 xz 5.2.5 h62dcd97_0 yaml 0.2.5 he774522_0 zlib 1.2.11 h62dcd97_4 zstd 1.4.5 ha9fde0e_0 ================= Configs ================== --------- .faceswap --------- backend: nvidia --------- convert.ini --------- [color.color_transfer] clip: True preserve_paper: True [color.manual_balance] colorspace: HSV balance_1: 0.0 balance_2: 0.0 balance_3: 0.0 contrast: 0.0 brightness: 0.0 [color.match_hist] threshold: 99.0 [mask.box_blend] type: gaussian distance: 11.0 radius: 5.0 passes: 1 [mask.mask_blend] type: normalized kernel_size: 3 passes: 4 threshold: 4 erosion: 0.0 [scaling.sharpen] method: unsharp_mask amount: 150 radius: 0.3 threshold: 5.0 [writer.ffmpeg] container: mp4 codec: libx264 crf: 23 preset: medium tune: none profile: auto level: auto [writer.gif] fps: 25 loop: 0 palettesize: 256 subrectangles: False [writer.opencv] format: png draw_transparent: False jpg_quality: 75 png_compress_level: 3 [writer.pillow] format: png draw_transparent: False optimize: False gif_interlace: True jpg_quality: 75 png_compress_level: 3 tif_compression: tiff_deflate --------- extract.ini --------- [global] allow_growth: False [align.fan] batch-size: 12 [detect.cv2_dnn] confidence: 50 [detect.mtcnn] minsize: 20 threshold_1: 0.6 threshold_2: 0.7 threshold_3: 0.7 scalefactor: 0.709 batch-size: 8 [detect.s3fd] confidence: 70 batch-size: 4 [mask.unet_dfl] batch-size: 8 [mask.vgg_clear] batch-size: 6 [mask.vgg_obstructed] batch-size: 2 --------- gui.ini --------- [global] fullscreen: False tab: extract options_panel_width: 30 console_panel_height: 20 icon_size: 14 font: default font_size: 9 autosave_last_session: prompt timeout: 120 auto_load_model_stats: True --------- train.ini --------- [global] coverage: 68.75 mask_type: none mask_blur_kernel: 3 mask_threshold: 4 learn_mask: False icnr_init: False conv_aware_init: False reflect_padding: False penalized_mask_loss: True loss_function: mae learning_rate: 5e-05 [model.dfl_h128] lowmem: False [model.dfl_sae] input_size: 128 clipnorm: True architecture: df autoencoder_dims: 0 encoder_dims: 42 decoder_dims: 21 multiscale_decoder: False [model.dlight] features: best details: good output_size: 256 [model.original] lowmem: False [model.realface] input_size: 64 output_size: 128 dense_nodes: 1536 complexity_encoder: 128 complexity_decoder: 512 [model.unbalanced] input_size: 128 lowmem: False clipnorm: True nodes: 1024 complexity_encoder: 128 complexity_decoder_a: 384 complexity_decoder_b: 512 [model.villain] lowmem: False [trainer.original] preview_images: 14 zoom_amount: 5 rotation_range: 10 shift_range: 5 flip_chance: 50 color_lightness: 30 color_ab: 8 color_clahe_chance: 50 color_clahe_max_size: 4
2hard
Title: Change landmark color to digit ? Body: **Change landmark color to digit** I have 17 points that need to be labeled, but it is not easy to distinguish by color, I want to change the color to numbers. Is it possible?
1medium
Title: I cannot login DFL Google Colab Forum Body: I cannot login [mrdeepface.com](https://mrdeepfakes.com/forums/thread-sfw-guide-deepfacelab-google-colab-tutorial#) `DeepFaceLab with Google Colab - Tutorial` I logged in successfully (maybe) but reload and display same as previous page
3misc
Title: Bug: Extending middlewares or dependencies in the main application does not actually register them. Body: ### Description When I try to register middlewares or dependencies or even error_handlers from outside the main application, by extending them after creation rather than passing them directly, they appear to be in scope but are not actually present (or at least not recognized by Swagger, which requires them as path parameters). Interestingly, this issue does not occur with the Router, which is paradoxical. So, what i did wrong? ### URL to code causing the issue https://github.com/litestar-org/litestar/blob/main/litestar/app.py ### MCVE ```python def init_app(settings: Settings, *routers: Router) -> Litestar: log.info("Initialize Application") app = Litestar( [], path="/api", cors_config=CORSConfig( allow_origins=settings.server.origins, allow_methods=cast(list[Method | Literal["*"]], settings.server.methods), allow_headers=settings.server.headers, allow_credentials=True, ), csrf_config=( CSRFConfig(secret=settings.server.csrf_secret) if settings.server.csrf_secret else None ), openapi_config=( OpenAPIConfig( title=settings.server.title, version=settings.server.version, servers=[Server(url=settings.server.domain)], ) if settings.server.title else None ), debug=bool(settings.server.debug), middleware=get_current_common_middlewares(), exception_handlers=get_current_common_exception_handlers(), dependencies=deepcopy(proxy_app.dependencies), state=State(proxy_app.state), lifespan=[release_resources], ) for router in routers: app.register(router) setup_dependencies(proxy_app, settings) return app ``` ```py def setup_dependencies(app: Litestar, settings: Settings) -> None: log.info("Setup dependencies") engine = create_sa_engine( settings.db.url, pool_size=settings.db.connection_pool_size, max_overflow=settings.db.connection_max_overflow, pool_pre_ping=settings.db.connection_pool_pre_ping, ) app.state.engine = engine conn_factory = create_sa_connection_factory(engine) manager_factory = create_db_manager_factory(conn_factory) hasher = get_argon2_hasher() mediator = CommandMediator() setup_command_mediator( mediator=mediator, manager=manager_factory, hasher=hasher, ) app.dependencies["mediator"] = Provide( singleton(mediator), use_cache=True, sync_to_thread=False ) ``` And there how i fix it ```py def init_app(settings: Settings, *routers: Router) -> Litestar: log.info("Initialize Application") # NOTE It's frustrating to discover that extending or overriding the object to register dependencies or middlewares # does not actually register anything. What a mess! proxy_app = Litestar() setup_dependencies(proxy_app, settings) app = Litestar( [], path="/api", cors_config=CORSConfig( allow_origins=settings.server.origins, allow_methods=cast(list[Method | Literal["*"]], settings.server.methods), allow_headers=settings.server.headers, allow_credentials=True, ), csrf_config=( CSRFConfig(secret=settings.server.csrf_secret) if settings.server.csrf_secret else None ), openapi_config=( OpenAPIConfig( title=settings.server.title, version=settings.server.version, servers=[Server(url=settings.server.domain)], ) if settings.server.title else None ), debug=bool(settings.server.debug), middleware=get_current_common_middlewares(), exception_handlers=get_current_common_exception_handlers(), dependencies=deepcopy(proxy_app.dependencies), state=State(proxy_app.state), lifespan=[release_resources], ) del proxy_app for router in routers: app.register(router) return app ``` ### Steps to reproduce _No response_ ### Screenshots _No response_ ### Logs _No response_ ### Litestar Version 2.9.1 ### Platform - [ ] Linux - [X] Mac - [ ] Windows - [ ] Other (Please specify in the description above)
2hard
Title: add tests for doc build in circleci Body: Add automatic test for doc build as part of circleci checks
1medium
Title: transfer `call_scope` for assigned-to functions Body: E.g. if `foo` is a function and I do `bar = foo`, `bar` is currently missing the `call_scope`, because it wasn't created with `def bar(): ...`
1medium
Title: Enums should be nullable on input Body: Input fields deriving from Enum are not properly nullified. The resulting `str(mutation)` (prettified): ```graphql mutation { createUser( user: { firstName: "Jan" lastName: "Kowalski" middleName: null // <-- this is string field, nullified correctly idType: None // <-- BUG HERE: no value given to an enum should result in "null" instead idNumber: null // … snip } ) { // … snip } } ``` Relevant code: ```python class IDType(sgqlc.types.Enum): __schema__ = admin_schema __choices__ = ('IDCard', 'Passport') class UserInput(sgqlc.types.Input): __schema__ = admin_schema __field_names__ = ('first_name', 'middle_name', 'last_name', 'id_type', 'id_number', ...) first_name = sgqlc.types.Field(sgqlc.types.non_null(String), graphql_name='firstName') last_name = sgqlc.types.Field(sgqlc.types.non_null(String), graphql_name='lastName') middle_name = sgqlc.types.Field(String, graphql_name='middleName') id_type = sgqlc.types.Field(IDType, graphql_name='idType') id_number = sgqlc.types.Field(String, graphql_name='idNumber') # ... snip ``` Actual constructed values are `None`. It seems that the problem is in `sgqlc.types.EnumMeta.__to_graphql_input__` which should check `if value is None`. This change fixed the problem for me
1medium
Title: Why "Input being reprojected to EPSG:4326 CRS"? Body: I'm plotting multiple layers of a Map and I get a bunch of warning saying: `Input being reprojected to EPSG:4326 CRS` . Why is that warning showing up? I think a more explanatory message would be helpful.
1medium
Title: Confusing characters Body: For generated email aliases, it is difficult to differentiate between - capital i - small L This particularly becomes a problem when you manually need to write an email on a paper.
1medium
Title: BUG: free(): invalid pointer Body: **Describe the bug** I create a Session instance and use streaming responses. But after a while I get memory related errors, for example free(): invalid pointer. **Error message content** ``` free(): invalid pointer Fatal Python error: Aborted Current thread 0x0000007f8947e1c0 (most recent call first): File "/home/login/Projects/find_error/.venv/lib/python3.9/site-packages/curl_cffi/curl.py", line 324 in reset File "/home/login/Projects/find_error/.venv/lib/python3.9/site-packages/curl_cffi/requests/session.py", line 954 in cleanup File "/usr/lib/python3.9/concurrent/futures/_base.py", line 329 in _invoke_callbacks File "/usr/lib/python3.9/concurrent/futures/_base.py", line 531 in set_result File "/usr/lib/python3.9/concurrent/futures/thread.py", line 58 in run File "/usr/lib/python3.9/concurrent/futures/thread.py", line 77 in _worker File "/usr/lib/python3.9/threading.py", line 892 in run File "/usr/lib/python3.9/threading.py", line 954 in _bootstrap_inner File "/usr/lib/python3.9/threading.py", line 912 in _bootstrap Thread 0x0000007f89c7f1c0 (most recent call first): File "/usr/lib/python3.9/concurrent/futures/thread.py", line 75 in _worker File "/usr/lib/python3.9/threading.py", line 892 in run File "/usr/lib/python3.9/threading.py", line 954 in _bootstrap_inner File "/usr/lib/python3.9/threading.py", line 912 in _bootstrap Thread 0x0000007f8b11a040 (most recent call first): File "/home/login/Projects/find_error/error.py", line 17 in main File "/home/login/Projects/find_error/error.py", line 21 in <module> ``` **To Reproduce** ```py import curl_cffi.requests def read_stream(s, url): response = s.request('GET', url, stream=True) data = b''.join(chunk for chunk in response.iter_content()) response.close() return data def main(): s = curl_cffi.requests.Session() url = 'http://localhost:8000/200k' for _ in range(5000): read_stream(s, url) if __name__ == '__main__': main() ``` **Versions** - OS: linux arm64 - curl_cffi version 0.71 - `pip freeze` [freeze.txt](https://github.com/user-attachments/files/18353421/freeze.txt)
2hard
Title: Change select values typing Body: I'm not sure if I should have opened this issue in solara's repo since it seems to use reacton/ipyvuetify, but I would like to suggest changing the [Select](https://solara.dev/api/select) `values` parameter from `List[T]` to `Union[List[T], Dict[T, Any]]`. Allowing dict will enable users to display a good label for the user while using a good typing for the developer. Ipywidgets also allows dict usage in their select. In the next example the user will see the options `'unlabeled`, `label 01` and `label 02` and when iterating with this options the backend receives `None` or an integer `1` or `2` to work with it. ```python import ipywidgets as widgets select = widgets.Select(options={'unlabeled': None, 'label 01': 1, 'label 02': 2}, description='') select.observe(lambda x: print(x['new']), names='value') select ```
1medium
Title: Taking Derivatives of Candidate Expression Inside Custom Loss Function Body: Hi Miles, I'm working on a problem in which I would like to define a custom loss function that doesn't just use the predicted values of the candidate expression given the training data ( y_pred | X ), but instead evaluates the candidate expression and its derivatives at a number of new (necessarily unknown at the beginning) points while evaluating the loss function. To draw an analogy with neural networks, assume the NN loss function has its own copy of the entire network at each step of the optimization that it uses to make predictions and take derivatives at a number of inputs previously unseen in the training set. Do you have any thoughts on how easy or tricky it would be to make something like this work? If this sounds too vague/confusing, I'd be happy to connect with you over email to provide more details about the problem. Thanks!
2hard
Title: Bug: Attribute with `_` prefixed alias cannot be set on a factory class Body: ### Description When a model has an attribute, that is not private, but its alias is prefixed with an underscore (because of e.g. third party input data format), it is not generated by the model's factory, nor it can have a default set as a model attribute. ### URL to code causing the issue _No response_ ### MCVE ```python import uuid from polyfactory import Use from polyfactory.factories.pydantic_factory import ModelFactory from pydantic import BaseModel, Field class A(BaseModel): id_field: str = Field(..., alias="_id") class AFactory(ModelFactory[A]): __model__ = A _id = Use(lambda: str(uuid.uuid4())) # id_field = Use(... doesn't work either a = AFactory.build() ``` ### Steps to reproduce _No response_ ### Screenshots _No response_ ### Logs _No response_ ### Release Version 2.11.0 ### Platform - [X] Linux - [ ] Mac - [ ] Windows - [ ] Other (Please specify in the description above)
1medium
Title: How can improve my YOLOv5x-Seg model's precision? Body: ![confusion_matrix - Kopya](https://github.com/ultralytics/yolov5/assets/32833796/1b14cdcb-af36-4fcc-ad2f-3c2b4f6ef547) ### Search before asking - [X] I have searched the YOLOv5 [issues](https://github.com/ultralytics/yolov5/issues) and [discussions](https://github.com/ultralytics/yolov5/discussions) and found no similar questions. ### Question Hi, im working on a YOLOv5 model for months. I started with YOLOv4 but then i thought should use segmentation so i used YOLOv8 and YOLOv5 for my segmentation project. After tests i took best result from YOLOv5x-Seg, so currently working with it. My project about a thing that exist in sea surface and i have to detect from satellite images. So I made a dataset that include 1000 photos (taken from satellite hub by myself and manuel segment labeled and have only one class). Because of satellite images my objects little and scattered this is the problem i guess, maybe hard to detect? Then trained a YOLOv5 model it was really bad in the beginning but i change some settings and hypermeters now not bad. After that i tried many things but cant improved more. Besides this im getting weird confusion matrix that shows FP is one and TN is zero. Can you give me any advice how to improve like over %90's. Thanks. ![confusion_matrix - Kopya](https://github.com/ultralytics/yolov5/assets/32833796/d4857008-a072-4286-b522-da7601e56309) ![results (2)zz](https://github.com/ultralytics/yolov5/assets/32833796/a2b87dde-bd05-4dea-9498-b17bd36c0b16) ### Additional _No response_
1medium
Title: It is not correct to take the average of speed; tqdm needs to use two EMAs. Body: Average speed is not the average of speed measurements, it is the ratio of the average of units and the average of time. This fact means that tqdm.update calculates average speed incorrectly in many cases. Average speed is `(a + b)/(c + d)` and does not equal `((a/c)+(b/d))/2` in the general case. As an example, consider the following elementary school problem. Jack wants to travel from city A to city C through city B. The distance A->B is 10 miles and B->C is 100 miles. Jack walks 2mph A->B and then drives 50mph B->C. What is Jack's average speed? It is 15.7mph. tqdm would calclulate 3.84mph, which is (very) incorrect. The solution is to keep two running averages. One for distance and the other for time, and to take their ratio as the output. Here is a sample program demonstrating current behavior: ``` from tqdm import tqdm from time import sleep t = tqdm(unit='miles', total=110, smoothing=0.5, mininterval=0, miniters=0, ncols=60, postfix='\n') sleep(5) t.update(10) sleep(2) t.update(100) ``` It outputs: ``` 0%| | 0/110 [00:00<?, ?miles/s, 9%|█▍ | 10/110 [00:05<00:50, 2.00miles/s, 100%|███████████████| 110/110 [00:07<00:00, 3.84miles/s, 100%|███████████████| 110/110 [00:07<00:00, 15.70miles/s, ] ``` The second-to-last output is the incorrect average speed calculated in `update`, and the last output is the true average speed calculated over the entire run. Correct implementation would track two running averages. Average distance would be `10*0.5+100*0.5==55` and average time would be `5*0.5+2*0.5==3.5`. Their ratio is `55/3.5` which gives the correct `15.7`. The only case where tqdm currently works correctly is when `n` is always the same (eg, `1`) and the average is updated after every update (mininterval/miniters has no effect). In that case, because you're averaging `time/n` (which is *not* called the rate, it is the period) the denominator is constant and the average of the period works out to `1/(average speed)`.
2hard
Title: Fine-tuning for hindi Body: Hi @blue-fish , I am trying to fine-tune the model to clone voices of hindi speakers. I wanted to know the steps to follow for the same and also the amount of data I'd need for the model to work well. Edit - I shall use google colab for fine-tuning
1medium
Title: Memory leaks when using doc_topics in LdaSeqModel Body: <!-- **IMPORTANT**: - Use the [Gensim mailing list](https://groups.google.com/forum/#!forum/gensim) to ask general or usage questions. Github issues are only for bug reports. - Check [Recipes&FAQ](https://github.com/RaRe-Technologies/gensim/wiki/Recipes-&-FAQ) first for common answers. Github bug reports that do not include relevant information and context will be closed without an answer. Thanks! --> #### Problem description I trained a large LdaSeqModel with 53,000 documents, 30 topics, and 18 timeslices. I saved the model to disk because it ran for 7 days. When extracting topic probabilities for 53,000 documents, memory usage rises above 120GB. However, only extracting probabilities for 1,000 documents works flawlessly. #### Steps/code/corpus to reproduce 1. Train LdaSeqModel 2. Save LdaSeqModel 2. Load LdaSeqModel from disk 4. Extract document-topic probabilities with `doc_topics` ldaseq.corpus_len = 53,101 in the below MWE. ```python from gensim.models import LdaSeqModel ldaseq = LdaSeqModel.load("/ldaseq_model") prob = (ldaseq.doc_topics(x) for x in range(ldaseq.corpus_len)) df = pd.DataFrame(prob, columns=[f"topic_{i}" for i in range(30)]) ``` #### Versions macOS-10.16-x86_64-i386-64bit Python 3.8.8 | packaged by conda-forge | (default, Feb 20 2021, 16:12:38) [Clang 11.0.1 ] Bits 64 NumPy 1.20.1 SciPy 1.6.1 gensim 3.8.3 FAST_VERSION 1
2hard
Title: [ENH] Design improvement on `config` parameter for FM forecasters Body: **Is your feature request related to a problem? Please describe.** Currently the below list of forecasters, use the `config` parameter to pass in the model configs. - TinyTimeMixerForecaster ```python def __init__( self, model_path="ibm/TTM", revision="main", validation_split=0.2, config=None, # parameter in question ... ): ``` - HFTransformersForecaster ```python def __init__( self, model_path: str, fit_strategy="minimal", validation_split=0.2, config=None, # parameter in question. ... ): ``` - ChronosForecaster ```python def __init__( self, model_path: str, config: dict = None, # parameter in question. ... ): ``` This seems to be going against `sktime`/`sklearn` design compatibility of having parameters directly passed into the estimator during initialization. Using `get_params` also returns config as a single dictionary and `set_params` cannot be used to set individual config parameters, without passing the entire config dict again, which seems inefficent. **Describe the solution you'd like** Solution 1: Passing all the config parameters directly. If the "config" dictionary is required internally, it can be constructed from the parameters. Open to discussion on other possibilities to address this design issue. Solution 2: I believe an hybrid approach would be a good option. Commonly used parameters can be exposed while the rest can be passed in as a separate `config` parameter. This is especially useful when using TSFMs with several config parameters. If a case arises when a parameter passed in the proposed `config` parameter conflicts with the directly passed parameters, then the latter has higher priority. Solution 3: Overidding `get_params` and `set_params`. I am not sure about the feasibility of this.
1medium
Title: date left and total usage column in mysql Body: سلام خسته نباشید جای خالی ستون های Data_ left و total usage تو دیتابیس مرزبان احساس میشه. به نظرم بودنشون توی محاسبه دقیق تر حجم مصرفی ادمین ها کمک میکنه
1medium
Title: WARNING:absl:not exist in w2v model: 全脂奶粉 Body: # description lack of these words??? ## current WARNING:absl:not exist in w2v model: 全脂奶粉 WARNING:absl:not exist in w2v model: 原装 WARNING:absl:not exist in w2v model: 脱脂奶粉 WARNING:absl:not exist in w2v model: 原装 WARNING:absl:not exist in w2v model: 全脂奶粉 WARNING:absl:not exist in w2v model: 原装 WARNING:absl:not exist in w2v model: 包邮 WARNING:absl:not exist in w2v model: 原装 WARNING:absl:not exist in w2v model: mymy WARNING:absl:not exist in w2v model: 全脂 WARNING:absl:not exist in w2v model: 全脂奶粉 WARNING:absl:not exist in w2v model: 原装 WARNING:absl:not exist in w2v model: 原装 WARNING:absl:not exist in w2v model: 全脂奶粉 WARNING:absl:not exist in w2v model: 营养早餐 WARNING:absl:not exist in w2v model: 全脂奶粉 WARNING:absl:not exist in w2v model: 原装 WARNING:absl:not exist in w2v model: 全脂奶粉 WARNING:absl:not exist in w2v model: 醇香 WARNING:absl:not exist in w2v model: 全脂奶粉 WARNING:absl:not exist in w2v model: 原装 WARNING:absl:not exist in w2v model: 包邮 WARNING:absl:not exist in w2v model: 脱脂奶粉 WARNING:absl:not exist in w2v model: 全脂奶粉 WARNING:absl:not exist in w2v model: 原装 WARNING:absl:not exist in w2v model: 原装 WARNING:absl:not exist in w2v model: 全脂 WARNING:absl:not exist in w2v model: 速溶 WARNING:absl:not exist in w2v model: 59 WARNING:absl:not exist in w2v model: 包邮 WARNING:absl:not exist in w2v model: 全脂奶粉 WARNING:absl:not exist in w2v model: 原装 WARNING:absl:not exist in w2v model: 一袋 WARNING:absl:not exist in w2v model: 包邮 WARNING:absl:not exist in w2v model: 全脂奶粉 ## expected # solution # environment centos7 * version:3.10.2 The commit hash (`git rev-parse HEAD`)
1medium
Title: 请问 d(className="xxx")获取多个元素后,如何遍历这些元素 Body: 请问 d(className="xxx")获取多个元素后,如何遍历这些元素操作,比如: ```python element = d(className="xxx") print(element.count()) # 输出15 for i in range(element.count()): element_i = element # ???? 这里怎么填? element_i.screenshot(quality=60).save(str(i)+".png") ```
1medium
Title: Background callback polling request sends all callback inputs, states, outputs each time Body: **Describe your context** As far as I can tell this is a general issue I have reproduced it in Jupyterlab with Diskcache and also in a separately served app with Gunicorn and Celery. ``` dash 2.18.2 dash_ag_grid 31.2.0 dash-core-components 2.0.0 dash-html-components 2.0.0 dash-table 5.0.0 ``` **Describe the bug** When a dash background callback is executed there is one initial request which sends all of the related inputs and states to the server and then a series of polling requests that contain the caheKey identifying the background callback until it has completed. Looking at the request being sent, I think it is sending all of the callback data with each polling request instead of just sending it once with the first request and then using only the cacheKey on subsequent requests. The impact of this behaviour is that if there is a lot of input data the polling is very slow (for example uploading with dcc.Upload and then running a longer processing and saving in a background callback). Since the polling interval gets long due to all the uploading, progress and set_props updates can be missed entirely. **Expected behavior** It would be preferable to make the polling as fast as possible by dropping all of the callback inputs/states and just using the cacheKey to identify it.
1medium
Title: issue with notebook files with space in the name Body:
1medium
Title: [Bug] sgl.Engine(**dataclasses.asdict(server_args)) return_logprob=True error Body: ### Checklist - [x] 1. I have searched related issues but cannot get the expected help. - [ ] 2. The bug has not been fixed in the latest version. - [ ] 3. Please note that if the bug-related issue you submitted lacks corresponding environment info and a minimal reproducible demo, it will be challenging for us to reproduce and resolve the issue, reducing the likelihood of receiving feedback. - [ ] 4. If the issue you raised is not a bug but a question, please raise a discussion at https://github.com/sgl-project/sglang/discussions/new/choose Otherwise, it will be closed. - [ ] 5. Please use English, otherwise it will be closed. ### Describe the bug I use Sglang Engine to run offfine inference with qwen2-vl-2b, and I want to obtain the logprob of generated tokens, but when I run the code sampling_params = {"temperature": 0.8, "top_p": 0.95, "stop": ["<|endoftext|>", "</s>"], "max_new_tokens": 1} `vlm = sgl.Engine(**dataclasses.asdict(server_args)) outputs = await vlm.async_generate(prompts, sampling_params, return_logprob=[True]*len(prompts), image_data=image_datas)` and `vlm = sgl.Engine(**dataclasses.asdict(server_args)) outputs = await vlm.async_generate(prompts, sampling_params, return_logprob=True, image_data=image_datas)` the errors are the same as ` [2025-03-05 15:02:47 TP0] max_total_num_tokens=2303336, chunked_prefill_size=-1, max_prefill_tokens=16384, max_running_requests=4097, context_len=32768 [2025-03-05 15:02:52 TP0] Prefill batch. #new-seq: 1, #new-token: 282, #cached-token: 0, cache hit rate: 0.00%, token usage: 0.00, #running-req: 0, #queue-req: 0 [2025-03-05 15:02:52 TP0] Scheduler hit an exception: Traceback (most recent call last): File "/home/shuxin/miniconda3/envs/qwen-vl/lib/python3.10/site-packages/sglang/srt/managers/scheduler.py", line 1827, in run_scheduler_process scheduler.event_loop_normal() File "/home/shuxin/.local/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 116, in decorate_context return func(*args, **kwargs) File "/home/shuxin/miniconda3/envs/qwen-vl/lib/python3.10/site-packages/sglang/srt/managers/scheduler.py", line 478, in event_loop_normal result = self.run_batch(batch) File "/home/shuxin/miniconda3/envs/qwen-vl/lib/python3.10/site-packages/sglang/srt/managers/scheduler.py", line 1080, in run_batch logits_output, next_token_ids = self.tp_worker.forward_batch_generation( File "/home/shuxin/miniconda3/envs/qwen-vl/lib/python3.10/site-packages/sglang/srt/managers/tp_worker.py", line 164, in forward_batch_generation logits_output = self.model_runner.forward(forward_batch) File "/home/shuxin/miniconda3/envs/qwen-vl/lib/python3.10/site-packages/sglang/srt/model_executor/model_runner.py", line 796, in forward return self.forward_extend(forward_batch) File "/home/shuxin/miniconda3/envs/qwen-vl/lib/python3.10/site-packages/sglang/srt/model_executor/model_runner.py", line 761, in forward_extend return self.model.forward( File "/home/shuxin/miniconda3/envs/qwen-vl/lib/python3.10/site-packages/sglang/srt/models/qwen2_vl.py", line 571, in forward return self.logits_processor( File "/home/shuxin/.local/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1739, in _wrapped_call_impl return self._call_impl(*args, **kwargs) File "/home/shuxin/.local/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1750, in _call_impl return forward_call(*args, **kwargs) File "/home/shuxin/miniconda3/envs/qwen-vl/lib/python3.10/site-packages/sglang/srt/layers/logits_processor.py", line 164, in forward pruned_input_ids.append(input_ids[pt + start_len : pt + extend_len]) TypeError: 'NoneType' object is not subscriptable` [2025-03-05 15:02:52] Received sigquit from a child proces. It usually means the child failed. where is my set incorrect? ### Reproduction qwen2-vl-2b ### Environment linux PRETTY_NAME="Ubuntu 22.04.4 LTS" NAME="Ubuntu" VERSION_ID="22.04" VERSION="22.04.4 LTS (Jammy Jellyfish)" VERSION_CODENAME=jammy ID=ubuntu ID_LIKE=debian HOME_URL="https://www.ubuntu.com/" SUPPORT_URL="https://help.ubuntu.com/" BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/" sglang-0.4.3.post2
2hard
Title: Client Data Body: hi ... in the last part of the code im trying to get my account balance but its not working i dont know what is the problem i get an error info = Client.get_account() TypeError: get_account() missing 1 required positional argument: 'self' import websocket, json, pprint, talib, numpy from binance.client import Client from binance.enums import * import config RSI_PERIOD = 14 RSI_OVERBOUGHT = int(input(" Enter The Over Bought Value :")) RSI_OVERSOLD = int(input("Enter The Over Soled Value :")) TRADE_SYMBOL = input("The Pair U Want To Trade In Apper Case : ") TRADE_QUANTITY = 0.05 STOP_LOSS = 30 API_KEY = config.API_KEY API_SECRET = config.API_SECRET The_Socket_Data = input("Enter The Pair U Want To Trade in Lower Case: ") The_Frame = input("Enter The Time Frame U Want Trade In: ") SOCKET = "wss://stream.binance.com:9443/ws/"+The_Socket_Data+"@kline_"+The_Frame+"m" client = Client(API_KEY, API_SECRET) print(Client) info = Client.get_account() print(info)
1medium
Title: Resize Feature Statistics Widget Window Body: Hi all, After changing the colour of the distribution I can resize the window of the Feature Statistics widget because the legend is too long. On my Mac I cannot get to the bottom of the window. Do you have any suggestions? <img width="1507" alt="Image" src="https://github.com/user-attachments/assets/83ba3ac5-8697-45d5-bccd-61d106e46d45" />
1medium
Title: Split excel sheets to new workbooks fails Body: #### OS: WSL2/Linux #### Versions of xlwings and Python: 0.27.7 and Python 3.9 I am trying to create new workbooks from worksheets of a workbook. Eventually I want to integrate this step in a Lambda function that runs on AWS. Testing the minimal code below on WSL2 and AWS Lambda, I ran into the same error shown below. This function worked with no errors on MacOS Monterey (v12.2.1). ```python ERROR:root:'NoneType' object has no attribute 'apps' Traceback (most recent call last): File "/mnt/c/Users/kbuddika/Documents/Alamar_Repos/Benchling-Automation/test.py", line 33, in <module> sheet_names = split_excel_file(excel_file="sigTune_data_767dcc9fbaa91d83.xlsx") File "/mnt/c/Users/kbuddika/Documents/Alamar_Repos/Benchling-Automation/test.py", line 15, in split_excel_file with xw.App(visible=False) as app: File "/home/kbuddika/miniconda3/lib/python3.9/site-packages/xlwings/main.py", line 279, in __init__ self.impl = engines.active.apps.add( AttributeError: 'NoneType' object has no attribute 'apps' ``` Here is the code I am trying. ```python import xlwings as xw import logging def split_excel_file(excel_file: str) -> list: try: sheet_names = list() with xw.App(visible=False) as app: wb = app.books.open(excel_file) for sheet in wb.sheets: sheet_names.append(f"{sheet.name}.xlsx") wb_new = app.books.add() sheet.copy(after=wb_new.sheets[0]) wb_new.sheets[0].delete() wb_new.save(f"{sheet.name}.xlsx") wb_new.close() return sheet_names except Exception as error: logging.error(error) raise if __name__ == "__main__": sheet_names = split_excel_file(excel_file="myexcel_file.xlsx") print(sheet_names) ``` Can someone please let me know a potential solution to get this integrated on AWS Lambda?
1medium
Title: Feature request: browse GitHub repo branches Body: Currently it's possible to type in a GitHub username and browse their repositories. It's then possible to browse a repository to look for notebooks. In some cases I'd like to be able to access a notebook that is in a branch other than master. For instance, in many cases it would be particularly useful to access the gh-pages branch of a repository that stores a GitHub Pages site. So far as I can see there's no UI to access the branches of a repository, though it is possible to access a branch by manually altering the URL. It would be nice to be able to browse branches.
1medium
Title: Add script run time and exit code to Script Editor's script tester Body: Add these to script editor header ![2023-12-22_062756 - trmm script results](https://github.com/amidaware/tacticalrmm/assets/13395348/01346a46-6416-42dd-9f50-06383ba4abef)
1medium
Title: qlora使用fp16训练出现loss nan Body: ### 提交前必须检查以下项目 - [X] 请确保使用的是仓库最新代码(git pull),一些问题已被解决和修复。 - [X] 我已阅读[项目文档](https://github.com/ymcui/Chinese-LLaMA-Alpaca-2/wiki)和[FAQ章节](https://github.com/ymcui/Chinese-LLaMA-Alpaca-2/wiki/常见问题)并且已在Issue中对问题进行了搜索,没有找到相似问题和解决方案 - [x] 第三方插件问题:例如[llama.cpp](https://github.com/ggerganov/llama.cpp)、[text-generation-webui](https://github.com/oobabooga/text-generation-webui)等,同时建议到对应的项目中查找解决方案 ### 问题类型 模型训练与精调 ### 基础模型 LLaMA-2-7B ### 操作系统 Linux ### 详细描述问题 在chinese-llama-2-7b上lora sft时,用LlamaTokenizer会出现eval loss nan,但换成AutoTokenizer(fastTokenizer)之后不会nan,似乎与fastTokenizer中\</s\>的编码有关,请问预训练是用的是fastTokenizer吗? ### 依赖情况(代码类问题务必提供) ``` peft 0.4.0 torch 1.13.1 torchaudio 0.13.1 torchvision 0.14.1 transformers 4.31.0 ``` ### 运行日志或截图 ``` # 请在此处粘贴运行日志 ```
1medium
Title: add shown parameter to add_styled_vector Body: <!-- Please search existing issues to avoid creating duplicates. --> ### Description By default, a vector is activated in the geemap display. Could it be possible to add a shown parameter to be able to hide it when displayed? Thanks
1medium
Title: bug: Playwright template fails with default settings Body: Currently if there is `Playwright` actor created through crawlee cli and run in template generated dockerfile then it will fail with: `[pid=28][err] [0314/101922.720829:ERROR:zygote_host_impl_linux.cc(100)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.` Template default is chromium. Either add `--no-sandbox` argument to the Playwright crawler in the template or update the template dockerfile to allow running without it.
1medium
Title: How change to my ready custom network Body: Hello. I have trained a None-ResNet-BiLSTM-CTC network with the classes 0123456789abcdefghijklmnopqrstuvwxyzñ- in the original repo, using the data generator mentioned in this repository. How could i use my own .pth it in this repository? I am working on it but i cant get it
1medium
Title: Add txtai agents 🚀 Body: This will add agents to txtai. We'll build on the [Transformers Agents framework](https://huggingface.co/docs/transformers/en/agents) in combination with [txtai's LLM pipeline](https://neuml.github.io/txtai/pipeline/text/llm/). The goals of this framework are: - Easy-to-use - Integrate with pipelines, workflows and embeddings databases - Support all LLM backends (tranformers, llama.cpp, API integrations) - Support use cases like self-correcting RAG, multi-source RAG and real-time data integration The following issues cover this change. - [x] #808 - [x] #809 - [x] #810 - [x] #811
2hard
Title: Change `Screener.set_predefined_body` and `Screener.set_body` to respond with the class Body: I want to change `Screener.set_predefined_body` and `Screener.set_body` to respond with the class. This would reduce ```python s = yf.Screener() s.set_predefined_body("day_gainers") r=s.response ``` to ```python r = yf.Screener().set_predefined_body("day_gainers").response ``` or to be able to set it on initialisation ```python r = yf.Screener(body="day_gainers").response ``` which I think is cleaner and more concise. I would also suggest editing the docs of `predefined_bodies` as they come above `set_predefined_body` to include how to set the Screener to them
1medium
Title: Dependency sentence segmenter handles newlines inconsistently between languages Body: <!-- NOTE: For questions or install related issues, please open a Discussion instead. --> ## How to reproduce the behaviour [Colab notebook demonstrating problem](https://colab.research.google.com/drive/14FFYKqjRVRbN7aAVmHUYEao9CwahY0We?usp=sharing) When parsing a sentence that contains newlines, the Italian parser sometimes assigns the newline to a sentence by itself, for example: >Ma regolamenta solo un settore, a differenza dell’azione a largo raggio dell’Inflation Act. \nI tentativi di legiferare per stimolare l’industria non hanno avuto molto successo. Produces 3 sentences: ``` 'Ma regolamenta solo un settore, a differenza dell’azione a largo raggio dell’Inflation Act (dalla sanità all’industria pesante).' '\n' 'I tentativi di legiferare per stimolare l’industria non hanno avuto molto successo.' ``` There are various experiments with different combinations of punctuation in the notebook. Looking at the tokens and their `is_sent_start` property, it seems under some circumstances the `\n` and `I` tokens are both assigned as the start of a new sentence. I have not been able to cause this problem with `en_core_web_sm`, which always correctly identifies 2 sentences. Although I understand that sentence segmentation based on the dependency parser is probabilistic and not always correct, it seems there's some inconsistency between languages here, and I don't think it would ever be correct for a whitespace token to be assigned as the start of a sentence. ## Your Environment - **spaCy version:** 3.6.1 - **Platform:** Linux-5.15.120+-x86_64-with-glibc2.35 - **Python version:** 3.10.12 - **Pipelines:** it_core_news_sm (3.6.0), en_core_web_sm (3.6.0)
1medium
Title: ElementAmbiguousError when using backend win32 Body: Hi, I got and ElementAmbiguousError when i used backend win32. full traceback ``` Traceback (most recent call last): File "<pyshell#4>", line 1, in <module> appwindow.print_control_identifiers(filename='identifiers.txt') File "build\bdist.win-amd64\egg\pywinauto\application.py", line 584, in print_control_identifiers this_ctrl = self.__resolve_control(self.criteria)[-1] File "build\bdist.win-amd64\egg\pywinauto\application.py", line 245, in __resolve_control criteria) File "build\bdist.win-amd64\egg\pywinauto\timings.py", line 419, in wait_until_passes func_val = func(*args) File "build\bdist.win-amd64\egg\pywinauto\application.py", line 190, in __get_ctrl dialog = self.backend.generic_wrapper_class(findwindows.find_element(**criteria[0])) File "build\bdist.win-amd64\egg\pywinauto\findwindows.py", line 98, in find_element raise exception ElementAmbiguousError: There are 2 elements that match the criteria {'process': 6232, 'backend': u'win32'} ``` code that causes this error is very simple, it seems that it is the app being tested that causes this. My app that i'm testing is opening winform on top of winform and that's the reason. ``` import pywinauto app = pywinauto.Application() appconnect = app.connect(path='TestApp.exe') appwindow = appconnect.window() appwindow.print_control_identifiers(filename='identifiers.txt') ``` I was also able to fix this by editing findwindows.py, i commented one if statement out from find_element function. Lines 89 - 98 ``` def find_element(**kwargs): """ Call find_elements and ensure that only one element is returned Calls find_elements with exactly the same arguments as it is called with so please see :py:func:`find_elements` for the full parameters description. """ elements = find_elements(**kwargs) if not elements: raise ElementNotFoundError(kwargs) # if len(elements) > 1: # exception = ElementAmbiguousError( # "There are {0} elements that match the criteria {1}".format( # len(elements), # six.text_type(kwargs), # ) # ) # # exception.elements = elements # raise exception return elements[0] ``` so my question is that is this if statement necessary or should we comment this out also from master branch?
1medium
Title: Concurrency is not working properly, regardless of concurrency_limit Body: ### Describe the bug We are encountering an issue where Gradio's concurrency handling is not working as expected. Despite setting both `max_size` and `default_concurrency_limit`, the app does not scale beyond 2 concurrent sessions. ### Steps to Reproduce: 1. Launch the Gradio app with 4 instances. 2. Send a chat message to all 4 instances simultaneously. 3. Observe that only 2 instances process the messages while the other 2 are waiting, regardless of the settings for `max_size` and `default_concurrency_limit`. ### Expected Behavior: - All 4 instances should process the chat messages concurrently, with no queuing, as defined by the configuration. ### Actual Behavior: - Only some of the 4 instances process the messages concurrently. The others do not process the messages and are not queueing, they are just loading, even though the settings for `max_size` and `default_concurrency_limit` are in place. ### Additional Information: - Unfortunately, the issue is not always reproducible with the minimal example, but this behaviour always occurs in our production setup. - The issue occurs regardless of the number of devices used. We tested on 4 different devices to rule out browser-specific issues. - We noticed that using 4 private windows in a browser can make the concurrency work sometimes, but it fails when using 4 normal browser windows. - It seems like having the app open also consumes a "resource". We observed a behaviour where 1 instance was loading, and as soon as we closed another instance, the first one loaded successfully. ### Environment: - Gradio version: 5.13.1 - Python version: 3.12 - OS: macOS 14.4 and Ray - Browser: Tested on Safari and Firefox ### Have you searched existing issues? 🔎 - [x] I have searched and found no existing issues ### Reproduction ```python import time import gradio as gr def wait(_, __, a): time.sleep(15) return "done" with gr.Blocks() as demo: a = gr.State() gr.ChatInterface(fn=wait, additional_inputs=[a]) demo.queue(max_size=100, default_concurrency_limit=10).launch() ``` ### Screenshot _No response_ ### Logs ```shell ``` ### System Info ```shell Gradio Environment Information: ------------------------------ Operating System: Darwin gradio version: 5.13.1 gradio_client version: 1.6.0 ------------------------------------------------ gradio dependencies in your environment: aiofiles: 23.2.1 anyio: 4.8.0 audioop-lts is not installed. fastapi: 0.115.7 ffmpy: 0.5.0 gradio-client==1.6.0 is not installed. httpx: 0.28.1 huggingface-hub: 0.28.0 jinja2: 3.1.5 markupsafe: 2.1.5 numpy: 2.2.2 orjson: 3.10.15 packaging: 24.2 pandas: 2.2.3 pillow: 11.1.0 pydantic: 2.10.6 pydub: 0.25.1 python-multipart: 0.0.20 pyyaml: 6.0.2 ruff: 0.9.3 safehttpx: 0.1.6 semantic-version: 2.10.0 starlette: 0.45.3 tomlkit: 0.13.2 typer: 0.15.1 typing-extensions: 4.12.2 urllib3: 2.3.0 uvicorn: 0.34.0 authlib; extra == 'oauth' is not installed. itsdangerous; extra == 'oauth' is not installed. gradio_client dependencies in your environment: fsspec: 2024.12.0 httpx: 0.28.1 huggingface-hub: 0.28.0 packaging: 24.2 typing-extensions: 4.12.2 websockets: 14.2 ``` ### Severity Blocking usage of gradio
1medium
Title: Add a delete button query result history on the screen Body: **Describe the solution you'd like** Can you add a delete button query result history on the screen? Or remind me how to do it. I can also do it.
0easy
Title: Only 2 feature map size shrinkages in extra_layer Body: Hi, I print the layers in extra_layer. I think there should be 4 feature map shrinkages according to the paper, but found only 2 feature map shrinkages. ```bash [Conv2d(1024, 256, kernel_size=(1, 1), stride=(1, 1)), Conv2d(256, 512, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1)), Conv2d(512, 128, kernel_size=(1, 1), stride=(1, 1)), Conv2d(128, 256, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1)), Conv2d(256, 128, kernel_size=(1, 1), stride=(1, 1)), Conv2d(128, 256, kernel_size=(3, 3), stride=(1, 1)), ◀ Conv2d(256, 128, kernel_size=(1, 1), stride=(1, 1)), Conv2d(128, 256, kernel_size=(3, 3), stride=(1, 1)) ◀] ```
1medium
Title: make gRPC DocumentArrayProto in Java Body: I want to use the gRPC protocol with a language other than Python. so I follow the instruction (https://docs.jina.ai/fundamentals/client/third-party-client/): "Download the two proto definition files: jina.proto and docarray.proto from [github](https://github.com/jina-ai/jina/tree/master/jina/proto) (be sure to use the latest release branch) Compile them with [protoc](https://grpc.io/docs/protoc-installation/) and precise to which programming language you want to compile them. Add the generated files to your project and import them in your code. You should finally be able to communicate with your Flow using the gRPC protocol. You can find more information on the gRPC message and service that you can use to communicate in the [Protobuf documentation](https://docs.jina.ai/proto/docs/). " I generate the Java class with proto files. But It didn't say how to build the proto DocumentArrayProto! Docarray.DocumentArrayProto da = Docarray.DocumentArrayProto.parseFrom("byte array here") "byte array here" for what? what's the format of the string? Or I should use the builder? And how? Please show me some example on how to build the DocumentArrayProto with the given data like: text image tensor ... Thanks!
1medium
Title: The problem of style transfer Body: Hello, author. I want to use my own dataset to perform some style transfer tasks, such as converting land scenes into an underwater style. However, I only want to transfer the style. But when I was running my own dataset, I found that besides the style being transferred, the scenery in the pictures also changes (perhaps because the scenery in the land photos is different from that at the bottom of the water). How can I keep the scenery in the pictures unchanged while making the environment look like it's underwater?
2hard
Title: Add support for overwriting datasources Body: ## Problem <!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] --> Prisma supports dynamically overriding datasources: ```ts import { PrismaClient } from '@prisma/client' const prisma = new PrismaClient({ datasources: { db: { url: 'file:./dev_qa.db', }, }, }) ``` ## Suggested solution <!-- A clear and concise description of what you want to happen. --> We could make a slight improvement to this API by making it singular and removing the requirement to name the datasource. Prisma chose the above API for forwards compatibility, I am okay with having to make changes to this in the future. ```py from prisma import Client client = Client( datasource={ 'url': 'file:./dev_qa.db', }, ) ```
1medium
Title: s3boto I/O operation on closed file Body: This i have seen a very old issue in boto and i think the issue has been solved in codes but I am geeting the "I/O operation on closed file" error whenever I'm updating images in my django site. A new image is uploaded to s3 without any problem but the error occurs when i update existing images. The images are uploaded from a frontend form. ``` Request Method: | POST -- | -- https://nakulsharma.in/dashboard/home/ 3.0.3 ValueError I/O operation on closed file. /home2/nakulsha/virtualenv/portfolio_folder/3.7/lib/python3.7/site-packages/storages/backends/s3boto3.py in _save, line 546 /home2/nakulsha/virtualenv/portfolio_folder/3.7/bin/python3.7 3.7.3 ['', '/opt/alt/python37/bin', '/home2/nakulsha/portfolio_folder', '/home2/nakulsha/virtualenv/portfolio_folder/3.7/lib64/python37.zip', '/home2/nakulsha/virtualenv/portfolio_folder/3.7/lib64/python3.7', '/home2/nakulsha/virtualenv/portfolio_folder/3.7/lib64/python3.7/lib-dynload', '/opt/alt/python37/lib64/python3.7', '/opt/alt/python37/lib/python3.7', '/home2/nakulsha/virtualenv/portfolio_folder/3.7/lib/python3.7/site-packages'] Thu, 9 Apr 2020 11:37:35 +0000 ``` Any help??
1medium
Title: Change license to MIT Body: This will be re-licensed to use the MIT license from the next release.
0easy
Title: [BUG] DeepSpeed on pypi not compatible with latest `numpy` Body: **Describe the bug** Importing deepspeed on a python env with numpy>=2.0.0 fails: ```bash File "/miniconda3/envs/py39/lib/python3.9/site-packages/deepspeed/autotuning/scheduler.py", line 8, in <module> from numpy import BUFSIZE E cannot import name 'BUFSIZE' from 'numpy' (/miniconda3/envs/py39/lib/python3.9/site-packages/numpy/__init__.py) ``` **To Reproduce** `pip install deepspeed` on a env with python>=3.9 and import deepspeed
1medium
Title: How to increase NPairsLoss batch size. Body: This is more of a question: When using NPairsLoss, it's creating unique pairs before running the Cross Entropy Loss (just like in the paper). Is there a way to **increase the batch size** by adding more examples for each class? Or will the loss function only keep one example of each class? Are all the negative examples kept? For example, can I feed a representation tensor of size N * M * V, where N is the batch size, M the number of different examples for a single class and V the embedding size?
1medium
Title: No beneficial to run CPU-bound task at the same time with aiomultiprocess ? Body: ### Description I have a task which is kind of both CPU-bound and IO-bound, like the toy code below. When I ran it, I found that the CPU only run 100% on a single thread, not as many as the number of processes in the Pool. Is it that there is no beneficial to run CPU-bound task at the same time with aiomultiprocess, or I wrote the code wrong? ```python import asyncio from datetime import datetime from aiohttp import request from aiomultiprocess import Pool, Process def fib(x): """Recursive function of Fibonacci number""" if x==0: return 0 elif x==1: return 1 else: return fib(x-1)+fib(x-2) async def get(url): # async with request("GET", url) as response: # await asyncio.sleep(1) # return await response.text("utf-8") print('url ' + str(multiprocessing.current_process()) + ' ' + str(datetime.now())) await asyncio.sleep(5) fib(30) print('url ' + str(multiprocessing.current_process()) + ' ' + str(datetime.now())) async def main(): urls = ["https://jreese.sh", "https://www.baidu.com", "a", "b", "c", "d"] # p = Process(target=get, args=("https://jreese.sh", "https://www.baidu.com",)) # await p print(datetime.now()) async with Pool(4) as pool: result = await pool.map(get, urls) print(result) print(datetime.now()) # asyncio.set_event_loop_policy(uvloop.EventLoopPolicy()) asyncio.run(main()) ``` ### Details * OS: MacOS 10.13.6 / CentOS 7 * Python version: 3.7.2 * aiomultiprocess version: 0.5.0 * Can you repro on master? * Can you repro in a clean virtualenv?
1medium
Title: Failed to obtain model through view's queryset due to raised exception. Body: **Describe the bug** ``` Warning #1: BankAccountViewSet: Failed to obtain model through view's queryset due to raised exception. Prevent this either by setting "queryset = Model.objects.none()" on the view, checking for "getattr(self, "swagger_fake_view", False)" in get_queryset() or by simply using @extend_schema. (Exception: 'AnonymousUser' object has no attribute 'provider') ``` We've got code that looks a bit like this (omitted code marked by `[...]`: ```python class BankAccountViewSet([...]): serializer_class = BankAccountSerializer lookup_field = "public_id" def get_queryset(self) -> QuerySet[BankAccount]: if not self.request.user.provider: raise Exception(f"No provider set for user '{self.request.user}'") [...] ``` Since DRF Spectacular is using `AnonymousUser` which does not have a provider, we get an exception here when trying to access `self.request.user.provider`. I've tried to use `@extend_schema(responses=[BankAccountSerializer(many=True)])` here on the `get_queryset()` method, but that doesn't seem to help anything. **To Reproduce** Given the above code, running `python manage.py spectacular --file schema.yaml`. **Expected behavior** I understand why the error happens due to `AnonymousUser` not having a provider. But with the `@extend_schema(responses=[BankAccountSerializer(many=True)])` override, shouldn't this be resolved?
1medium
Title: sns.histplot has a mystery/ghost patch, new with update from 0.11.2--> 0.12.2 Body: the problem is outlined here in this colab notebook https://colab.research.google.com/drive/1i69qTX1SPSPKogUBa2tMUmjC3cHO_VPn?usp=sharing sns.__version__, mpl.__version__ ('0.11.2', '3.2.2') displot and histplot display correct patched when finding the patched plotted as a hist (used for key) <img width="446" alt="image" src="https://user-images.githubusercontent.com/19584564/216197437-d795dc89-93ab-48a1-b469-6c89e86171f7.png"> sns.__version__, mpl.__version__ ('0.12.2', '3.6.3') there is a blue patch somewhere only for histplot but not for displot <img width="435" alt="image" src="https://user-images.githubusercontent.com/19584564/216197516-74cfe9ec-eaf8-4640-996d-85c46fa1d505.png">
1medium
Title: Feature Suggestion: Add support for IFTTT Webhooks. Body: It would be great to add integration with IFTTT Webhooks to the functions, enabling us to automate a wider range of components. I use IFTTT in my hydroponic setup to easily connect with smart plugs and other devices from multiple manufacturers. Thank you!
1medium
Title: [Bug]: a lot of No module named 'scripts.xxx' Body: ### Checklist - [ ] The issue exists after disabling all extensions - [ ] The issue exists on a clean installation of webui - [ ] The issue is caused by an extension, but I believe it is caused by a bug in the webui - [ ] The issue exists in the current version of the webui - [ ] The issue has not been reported before recently - [ ] The issue has been reported before but has not been fixed yet ### What happened? when launching, a lot of similar error happen in extensions. They share the same pattern, for example, controlnet extension, we have ....../sd-webui-controlnet\internal_controlnet\args.py", line 12, in <module> from scripts.enums import ( ModuleNotFoundError: No module named 'scripts.enums' and as long as an extension use from scripts.xxx import yyy, error happens. ### Steps to reproduce the problem None ### What should have happened? None ### What browsers do you use to access the UI ? _No response_ ### Sysinfo None ### Console logs ```Shell None ``` ### Additional information _No response_
1medium
Title: Spider.logger not logging custom extra information Body: I noticed the implicit behavior of the Spider.logger: when logging with extra, extra ultimately do not end up in the log because they are overwritten by default `process` method of [LoggerAdapter](https://github.com/scrapy/scrapy/blob/master/scrapy/spiders/__init__.py#L47) Current logic: ```py >>> self.logger.info("test log", extra={"test": "very important information"}) {"message": "test log", "spider": "spider_name"} ``` Expected logic: ```py >>> self.logger.info("test log", extra={"test": "very important information"}) {"message": "test log", "spider": "spider_name", "test": "very important information"} ```
1medium
Title: Different behavior for `state: restarted` in the `ansible.builtin.service` module (FreeBSD) Body: ### Summary The `state: restarted` in the `ansible.builtin.service` module differs from the others (`started`, `stopped` and `reloaded`) of the implementation in FreeBSD: https://github.com/ansible/ansible/blob/09391f38f009ec58b5759dbd74df34fd281ef3ac/lib/ansible/modules/service.py#L1090-L1099 With the current implementation `started`, `stopped` and `reloaded` execute the corresponding action even if the service is disabled, only `restarted` will have no effect when the service is disabled. #### Option 1 Add the following part - to be consistent with the rest ``` if self.action == "restart": self.action = "onerestart" ``` #### Option 2 Omit the `start`/`stop` modification - to match the documentation _ I would prefer option 1 but that's just my opinion. ### Issue Type Bug Report ### Component Name ansible.builtin.service ### Ansible Version ```console $ ansible --version N/A ``` ### Configuration ```console # if using a version older than ansible-core 2.12 you should omit the '-t all' $ ansible-config dump --only-changed -t all N/A ``` ### OS / Environment FreeBSD ### Steps to Reproduce <!--- Paste example playbooks or commands between quotes below --> ```yaml (paste below) - name: Restart apache24 become: true ansible.builtin.service: name: "apache24" state: "restarted" ``` ### Expected Results N/A ### Actual Results ```console N/A ``` ### Code of Conduct - [x] I agree to follow the Ansible Code of Conduct
1medium
Title: Cannot notify/write to a characteristic Body: * bleak version: 0.15.1 * Python version: 3.8.0 * Operating System: Windows 11 * BlueZ version (`bluetoothctl -v`) in case of Linux: ### Description I would like to scan for a bluetooth device using `BleakClient`, notify and write to two different characteristics ### What I Did ```python import asyncio from bleak import BleakScanner, BleakClient from bleak.backends.winrt.client import BleakClientWinRT from bleak.backends.winrt.scanner import BleakScannerWinRT class BLDevice: async def scan(self): devices = await BleakScanner.discover() for d in devices: print(d) def __init__(self, mac_addr: str): self.mac_addr = mac_addr self.client = None async def connect(self): if not self.client: device = await BleakScannerWinRT.find_device_by_address(self.mac_addr, 20) self.client = BleakClientWinRT(address_or_ble_device=device) if not self.client.is_connected: await self.client.connect() async def write(self): def response_handler(sender, data): print("{}: {}".format(sender, data)) await self.connect() await self.client.write_gatt_char("0000xxxxx-xxxxx-xxxxx-xxxxx-xxxxxxxxxxxx", str.encode("hello world!")) async def get_sc(self): await self.connect() for svc in await self.client.get_services(): for ch in svc.characteristics: print(ch) if __name__ == '__main__': MAC_ADDR = "FF:FF:FF:FF:FF:FF" my_device = BLDevice(MAC_ADDR) loop = asyncio.get_event_loop() loop.run_until_complete(my_device.connect()) loop.run_until_complete(my_device.write()) ``` I rant the above code and the following error: ``` Traceback (most recent call last): File "C:/workstation/repos/bleak_demo/bleak_demo/run.py", line 32, in write await self.client.write_gatt_char("0000xxxxx-xxxxx-xxxxx-xxxxx-xxxxxxxxxxxx", str.encode("hello world!")) File "C:\Users\raghu\AppData\Local\pypoetry\Cache\virtualenvs\bleak-demo-xIb3w8Wb-py3.8\lib\site-packages\bleak\backends\winrt\client.py", line 665, in write_gatt_char _ensure_success( File "C:\Users\raghu\AppData\Local\pypoetry\Cache\virtualenvs\bleak-demo-xIb3w8Wb-py3.8\lib\site-packages\bleak\backends\winrt\client.py", line 107, in _ensure_success raise BleakError(f"{fail_msg}: Unreachable") bleak.exc.BleakError: Could not write value b'hello world!' to characteristic 000A: Unreachable ``` here is the output from Windows bluetooth virtual sniffer ``` 87 29.147761 TexasIns_ (XXXX-XXX) localhost () SMP 11 Rcvd Security Request: AuthReq: No Bonding ```
1medium