add virtualenv support

ys.zsh-theme add python virtualenv support
before

after

A few small comments:

I believe [[ and ]] are usually preferred to [ and ]
I'm not a huge fan of forcing VIRTUAL_ENV_DISABLE_PROMPT to on - this means if a user loads this theme then loads a different theme, there will be no virtualenv in the prompt at all. The agnoster theme (as an example) adds VIRTUAL_ENV_DISABLE_PROMPT in its check for displaying the virtualenv.

checkout https://github.com/caiogondim/bullet-train.zsh#python-virtualenv-pyenv

@timfeirg nice!


Update adoption and base zuul jobs to CRC 2.39 - OCP 4.16

Jira: https://issues.redhat.com/browse/OSPRH-8665
As a pull request owner and reviewers, I checked that:

[ ] Appropriate testing is done and actually running
[ ] Appropriate documentation exists and/or is up-to-date:

[ ] README in the role
[ ] Content of the docs/source is reflecting the changes

recheck

/hold

change lgtm, but I've opened https://review.rdoproject.org/r/c/testproject/+/53815 to run the multinode jobs as well, since here we only run the standalone on in CI

/unhold

change lgtm, but I've opened https://review.rdoproject.org/r/c/testproject/+/53815 to run the multinode jobs as well, since here we only run the standalone on in CI

Hi @cescgina I actually tested this job already, it's posted in the description and here is the TP: https://review.rdoproject.org/r/c/testproject/+/53754

/approve

change lgtm, but I've opened https://review.rdoproject.org/r/c/testproject/+/53815 to run the multinode jobs as well, since here we only run the standalone on in CI

Hi @cescgina I actually tested this job already, it's posted in the description and here is the TP: https://review.rdoproject.org/r/c/testproject/+/53754

I meant the adoption multinode jobs :) they look good in the testproject, hitting a known dlrn api issue. CC @marios @frenzyfriday bumping crc version for adoption jobs

/lgtm


subscriber stuck at executing state, no async_calls records being added

topics
463 | top-tbdex-rfqsTopic-2lkruzsfvro94hbi                  | 2024-08-21 19:35:13.240665+00 |         7 | rfqsTopic               | tbdex.RfqEvent               | 6607

topic_subscriptions
883 | sub-tbdex-rfqs-57qux2tvtswj1020                       | 2024-09-13 00:29:19.805551+00 |      463 |         7 |          1043 | rfqs                    |   6602 | executing

async_calls : no new rows were written

still "stuck" even after running ftl pubsub subscription reset tbdex.rfqs --endpoint=https://tbd-ftl.tbd.sqprod.co/
relevant thread: https://sq-tbd.slack.com/archives/C06CW7P69EK/p1730133987466179

Cleaned up prod. We had multiple issues all at once (prod had not been pushed to for a long time) including decryption issues.


Add a label for "expenditure-type".

Should fix issue #1074.

okay the first commit doesn't pass the test. I'm fixing this.

Coverage remained the same at 100.0% when pulling 178f960742dda9a8bfad7c8fff5209ba2ab3be27 on cyberbikepunk:1074/fix/expenditure-type into 0f891e5db9234302a3d6d85c508e83107dae482d on openspending:master.

@akariv PR seems to be ready for a merge.

Other than one mistakenly committed file, looks good.

@cyberbikepunk this is waiting for you...

Coverage remained the same at 100.0% when pulling 679ef31144e27a6bdf9143cbfbda1c081999213e on cyberbikepunk:1074/fix/expenditure-type into 0f891e5db9234302a3d6d85c508e83107dae482d on openspending:master.


The percentage of the battery is always showing up

Just simple as that, the percentage of the battery is always present in the widget, not just when it is charging or low

@joelocandol could you please share your device information? I'm afraid the bug could depend on the model or the vendor.


Automatic adjustment of ZeRO's optimizer state partitioning with a new world size is not currently supported.

hi,
I have trained a LLM model with 4 nodes (8 gpus per node), but when I load the checkpoint with 16 nodes, I get the follows error:
deepspeed.runtime.zero.utils.ZeRORuntimeException: The checkpoint being loaded used a DP world size of 32 but the current world size is 128. Automatic adjustment of ZeRO's optimizer state partitioning with a new world size is not currently supported.

@stas00 Can you help to sovle this problem? Thanks

You're giving too little information to go about. You trained it how? I assume with ZeRO-3
And you're now trying to load the model using the deepspeed checkpoint? Unfortunately changing the topology after the training has started isn't yet supported by Deepspeed - please see this feature request https://github.com/microsoft/DeepSpeed/issues/2921
So meanwhile the only thing you can do is to extract the fp32 weights using zero_to_fp32.py that you will find in the checkpoint and start a new training (or inference) using this extracted checkpoint. So if you wanted to continue using the optimizer you can't.
You can add a comment in https://github.com/microsoft/DeepSpeed/issues/2921 and request that this will be implemented - the more users ask for it the higher are the chances it'll get implemented.

how to solve

raise ZeRORuntimeException("The checkpoint being loaded used a DP "
[rank5]: deepspeed.runtime.zero.utils.ZeRORuntimeException: The checkpoint being loaded used a DP world size of 8 but the current world size is 16. Automatic adjustment of ZeRO's optimizer state partitioning with a new world size is not currently supported.

@ArtificialZeng @hahchenchen  You can now resume training with different DP size (differnet Node size) via Universal Checkpointing.
You can find more examples in Megatron-DeepSpeed repo.

@tjruwase I believe this issue could be closed :).


Add noCache option.

Add option to prevent module caching. Super useful when used in continuous streams or with servers — no more restarting task or server to see updates to certain files.

Sorry folks, I've been unusually busy with both work and life for a sustained period of time now. I keep meaning to get to these PRs (and other projects), but don't find myself with the time + energy too often.
One thing I've done with another project is to invite one or two other people to be collaborators in the project and help maintain it. Anyone here interested in that?
I'd just ask that you be mindful of keeping this project focused, and not let it get too complex. E.g. I'm not 100% sure it's a good idea to accept all of the currently open PRs, but I haven't looked into them fully or thought deeply about it.
Apologies again for the delay, and thank you for understanding. =)

:+1: this feature

Hi there,
I'm sorry I haven't been timely in responding to these issues and PRs.
If you're interested in taking over the maintainer role for this project, please let me know.
More details: https://github.com/aseemk/requireDir/pull/31#issuecomment-255744987
Cheers,
Aseem

Needs tests and documentation, then I'll merge and publish ASAP.

ping @msfragala

Hey guys, is it possible to manually delete the cache? I would like to delete cache only on certain situations.

@max-ci require.cache is the node require cache object, you can delete entries from it however you want.


ImportError: cannot import name 'init_random_seed' from 'mmdet.apis' (/mmdetection/mmdet/apis/init.py)

ImportError: cannot import name 'init_random_seed' from 'mmdet.apis' (/mmdetection/mmdet/apis/init.py)

@kirkzZ Please re-install mmdet, it may be that the code is modified but not re-installed.

hi when i write command: from mmflow.apis import init_random_seed, set_random_seed, train_model google colab shows error message as:
ImportError: cannot import name 'init_random_seed' from 'mmflow.apis' (/usr/local/lib/python3.10/dist-packages/mmflow/apis/init.py)

Do you solve the problem?

I have the same problem, anyone solve it?

I also encountered the same problem


Thorium-AVX2: Add version 117.0.5938.157

Closes #12079

[x] I have read the Contributing Guide.

/verify

/verify

Just remembered Scoop/Versions, will copy PR over to there!

Closing.


fix: light-name-color -> color-name-light; added light variants if mi…

I found that some color names used a different naming scheme than other.
E.g. $light-cyan-color should be $cyan-color-light according to the other light and dark variants.
Also, I added light variants in case they were missing.

I don't think they are exactly light variants, some of them might be just a light cyan instead of a cyan for light mode, for example.
Also if you changed the color name check if it isn't used anywhere. If it is, you should also change it there. If it isn't, why does it even exist?

I don't think they are exactly light variants, some of them might be just a light cyan instead of a cyan for light mode, for example.

Oh, this is good to know. I did not know that the light variants are supposed to be cyan for light mode instead of light cyan. Thank you.
So this particular light-cyan-color is correctly named and used in a dark theme? Then we would need a light-cyan-color-light for the light theme?
Also, there are color names like green-color-bright, which sound to me like what this cyan should have been defined.
These namings are really confusing. 😃

Also if you changed the color name check if it isn't used anywhere. If it is, you should also change it there. If it isn't, why does it even exist? So maybe we should delete it.

I checked it before creating this PR but I could not find any references.

There will be one day that one shall look at all our sass code and clean/organize it.

😀
TBH, I don't care too much about this particular PR.
If you don't like it, feel free to close/reject it.


test: more fast-timeouts.

Fixing it and fixing it forward by having a faster timeout which catches if we're waiting for the wrong thing.
Risk Level: n/a
Testing: passes locally at least =P
Docs Changes: n/a
Release Notes: n/a

lgtm

It is unexpected that waitForReset is triggered when stream ends normally for H2. I wonder if we should make it trigger on resets only or if it could break too many tests.

/wait


[DONT MERGE] Enabled ImportOrder check of Java code

What changes were proposed in this pull request?
This pr enabled ImportOrder check of Java code
Why are the changes needed?
Does this PR introduce any user-facing change?
No
How was this patch tested?
Pass GA

The example of following the ImportOrder check rule:
import java.io.IOException;
import java.nio.ByteBuffer;
import java.util.Arrays;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;

import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Sets;
import org.junit.Test;
import org.mockito.stubbing.Answer;
import org.mockito.stubbing.Stubber;

import org.apache.spark.network.buffer.ManagedBuffer;
import org.apache.spark.network.buffer.NioManagedBuffer;
import org.apache.spark.network.util.MapConfigProvider;
import org.apache.spark.network.util.TransportConf;

import static org.apache.spark.network.shuffle.RetryingBlockTransferor.BlockTransferStarter;
import static org.junit.Assert.*;
import static org.mockito.Mockito.*;

I think this is mostly too much noise to bother with. Most imports are nearly-correctly-ordered and it matters little anyway. If there is a weaker check we can enforce (e.g. are imports grouped, if not ordered, correctly) that might be OK to try to enforce

Set order to false can ignore the order check

@srowen for static imports, would you mind dividing them into separate groups?

So we can accept a weak rule similar to the following: imports are grouped and interior of each group can be disordered ?

If this, still 180 files need to be changed :(

So should we remove this TODO, It seems unlikely to have a chance to finish it ...

We could, I also don't care much about the TODO statement either

We could, I also don't care much about the TODO statement either

ok


scaled_he_image error

Hi,
Thank you for developing the amazing software bin2cell.
I am currently using bin2cell with my Visium HD 2µm data. While I successfully ran the pipeline on two samples, I encountered an error with my one liver sample during the “b2c.scaled_he_image(adata, mpp=mpp, save_path='stardist/he.tiff')” step. (Sell below)

The image appears normal (1.7 GB) and is the input used in Spaceranger (via --image). I’ve attempted to resolve the issue by adjusting the mpp (trying values of 0.3, 0.4, 0.5, 0.8, 1.0, 1.8, 2.0, etc.) and reducing the image size, but unfortunately, none of these solutions have worked.
I would greatly appreciate any guidance or suggestions you might have to help resolve this issue.
Thank you for your assistance!

Thank you for the quick response.
When i load the image by "b2c.load_image(source_image_path)"
it raise the same error.

You stumbled upon some strange cv2 error. I found this, not that it explicitly helps you.
import cv2
img = cv2.imread(source_image_path)
img.dtype

It's very strange that it loads but then explodes when attempting to reorder the channels.

I am unable to read the image using cv2 "cv2.imread(source_image_path)"—the same error occurs. It seems this issue is related to the H&E image itself. I will discuss this with my lab scientist to check the image.
Thank you for your help!

What happens when you try to cv2.imread()?

raise the same error

Ah, I see. Sorry, it's quite late here.
You could technically try experimenting with PIL:
from PIL import Image
img = np.array(Image.open(source_image_path))

If this whines about the image being too big run Image.MAX_IMAGE_PIXELS = None, but I think it should remember that from being set up within b2c.

This time works.

You can response me tomorrow.
Thank you

Interesting, why are there 4 channels in this thing? What happens if you try to load your other images that worked before, be it via cv2 or PIL?

Hi Krzysztof,
I used "cv2" to load my other images that worked previously, not use PIL.
Now, I’ve used PIL to load the two sample images that worked, and they both have 4 channels. Please see below:

These two samples worked and I was able to run bin2cell successfully following the tutorial.

Alright, some things are starting to come together. 21035 * 22993 * 4 =<PHONE_NUMBER>, which is one of the numbers mentioned in the error message. Another number mentioned in the error message is<PHONE_NUMBER>, which is 2^30, which is the default maximum pixel count cv2 works with. Thing is, I do os.environ["OPENCV_IO_MAX_IMAGE_PIXELS"] = str(2**40) to override this before loading cv2, and I've definitely loaded images far larger than yours. I was developing b2c on a gut BTF that's over 50,000 pixels in each dimension, and weighs almost 10GB.
I get a different, more sensible error when I try to load my image without flipping the setting (and everything loads fine once configured properly):
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
cv2.error: OpenCV(4.10.0) /io/opencv/modules/imgcodecs/src/loadsave.cpp:79: error: (-215:Assertion failed) pixels <= CV_IO_MAX_IMAGE_PIXELS in function 'validateInputImageSize'

The exact thing you're running into remains very arcane, I found this while trying to dig more stuff up. The fact you're seeing four channels when you PIL it in might be sending it to a different part of the cv2 library somehow where that setting has no power? What comes up when you identify the image via ImageMagick?
$ identify Visium_HD_Mouse_Brain_tissue_image.tif
Visium_HD_Mouse_Brain_tissue_image.tif TIFF 18872x23947 18872x23947+0+0 8-bit sRGB 137.865MiB 0.000u 0:00.033

As for proceeding, I think the most robust way would be for me to add an optional way to just pass the full resolution loaded image into the custom resolution functions.

Hi
Thank you for clarify, and set "os.environ["OPENCV_IO_MAX_IMAGE_PIXELS"] = str(2**40)" in bin2cell.
I’m unable to open all my images with ImageMagick, even the ones that previously worked. I receive an error stating that the width and height exceed the limit.

Actually, I successfully ran the entire bin2cell pipeline using two 10x Visium HD demo datasets (samples P1 and P3, available at https://www.10xgenomics.com/products/visium-hd-spatial-gene-expression/dataset-human-crc). The BTF images for those samples are much larger, at 12.6 GB (sample P1) and 10.4 GB (sample P3). The problematic sample image is only 1.7 GB, which is puzzling.
$ identify Visium_HD_Human_Colon_Normal_P3_tissue_image.btf
Visium_HD_Human_Colon_Normal_P3_tissue_image.btf[0] TIFF64 80562x42537 80562x42537+0+0 8-bit sRGB 9.72097GiB 0.000u 0:00.036
Visium_HD_Human_Colon_Normal_P3_tissue_image.btf[1] TIFF64 36x24 36x24+0+0 16-bit Grayscale Gray 0.000u 0:00.000
$ identify Visium_HD_Human_Colon_Cancer_P1_tissue_image.btf
Visium_HD_Human_Colon_Cancer_P1_tissue_image.btf[0] TIFF64 71106x58791 71106x58791+0+0 8-bit sRGB 11.7081GiB 0.000u 0:00.030
Visium_HD_Human_Colon_Cancer_P1_tissue_image.btf[1] TIFF64 32x32 32x32+0+0 16-bit Grayscale Gray 0.000u 0:00.000
Do you think I should try saving the image in BTF format to see if that resolves the issue?

Hi, thank you for your great suggestion, yes, i just notice that the image is not RGB.
It can not open in fiji, i use GIMP ([https://www.gimp.org]) to open it and export to a new tiff, now the pipeline works! Thank you so much for you and Krzysztof help!

Alright, some things are starting to come together. 21035 * 22993 * 4 =<PHONE_NUMBER>, which is one of the numbers mentioned in the error message. Another number mentioned in the error message is<PHONE_NUMBER>, which is 2^30, which is the default maximum pixel count cv2 works with. Thing is, I do os.environ["OPENCV_IO_MAX_IMAGE_PIXELS"] = str(2**40) to override this before loading cv2, and I've definitely loaded images far larger than yours. I was developing b2c on a BTF that's over 50,000 pixels in each dimension, and weighs almost 10GB.
I get a different, more sensible error when I try to load my image without flipping the setting (and everything loads fine once configured properly):
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
cv2.error: OpenCV(4.10.0) /io/opencv/modules/imgcodecs/src/loadsave.cpp:79: error: (-215:Assertion failed) pixels <= CV_IO_MAX_IMAGE_PIXELS in function 'validateInputImageSize'

The exact thing you're running into remains very arcane, I found this while trying to dig more stuff up. The fact you're seeing four channels when you PIL it in might be sending it to a different part of the cv2 library somehow where that setting has no power? What comes up when you identify the image via ImageMagick?
$ identify Visium_HD_Mouse_Brain_tissue_image.tif
Visium_HD_Mouse_Brain_tissue_image.tif TIFF 18872x23947 18872x23947+0+0 8-bit sRGB 137.865MiB 0.000u 0:00.033

As for proceeding, I think the most robust way would be for me to add an optional way to just pass the full resolution loaded image into the custom resolution functions.

Alright, some things are starting to come together. 21035 * 22993 * 4 =<PHONE_NUMBER>, which is one of the numbers mentioned in the error message. Another number mentioned in the error message is<PHONE_NUMBER>, which is 2^30, which is the default maximum pixel count cv2 works with. Thing is, I do os.environ["OPENCV_IO_MAX_IMAGE_PIXELS"] = str(2**40) to override this before loading cv2, and I've definitely loaded images far larger than yours. I was developing b2c on a BTF that's over 50,000 pixels in each dimension, and weighs almost 10GB.
I get a different, more sensible error when I try to load my image without flipping the setting (and everything loads fine once configured properly):
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
cv2.error: OpenCV(4.10.0) /io/opencv/modules/imgcodecs/src/loadsave.cpp:79: error: (-215:Assertion failed) pixels <= CV_IO_MAX_IMAGE_PIXELS in function 'validateInputImageSize'

The exact thing you're running into remains very arcane, I found this while trying to dig more stuff up. The fact you're seeing four channels when you PIL it in might be sending it to a different part of the cv2 library somehow where that setting has no power? What comes up when you identify the image via ImageMagick?
$ identify Visium_HD_Mouse_Brain_tissue_image.tif
Visium_HD_Mouse_Brain_tissue_image.tif TIFF 18872x23947 18872x23947+0+0 8-bit sRGB 137.865MiB 0.000u 0:00.033

As for proceeding, I think the most robust way would be for me to add an optional way to just pass the full resolution loaded image into the custom resolution functions.

Alright, some things are starting to come together. 21035 * 22993 * 4 =<PHONE_NUMBER>, which is one of the numbers mentioned in the error message. Another number mentioned in the error message is<PHONE_NUMBER>, which is 2^30, which is the default maximum pixel count cv2 works with. Thing is, I do os.environ["OPENCV_IO_MAX_IMAGE_PIXELS"] = str(2**40) to override this before loading cv2, and I've definitely loaded images far larger than yours. I was developing b2c on a BTF that's over 50,000 pixels in each dimension, and weighs almost 10GB.
I get a different, more sensible error when I try to load my image without flipping the setting (and everything loads fine once configured properly):
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
cv2.error: OpenCV(4.10.0) /io/opencv/modules/imgcodecs/src/loadsave.cpp:79: error: (-215:Assertion failed) pixels <= CV_IO_MAX_IMAGE_PIXELS in function 'validateInputImageSize'

The exact thing you're running into remains very arcane, I found this while trying to dig more stuff up. The fact you're seeing four channels when you PIL it in might be sending it to a different part of the cv2 library somehow where that setting has no power? What comes up when you identify the image via ImageMagick?
$ identify Visium_HD_Mouse_Brain_tissue_image.tif
Visium_HD_Mouse_Brain_tissue_image.tif TIFF 18872x23947 18872x23947+0+0 8-bit sRGB 137.865MiB 0.000u 0:00.033

As for proceeding, I think the most robust way would be for me to add an optional way to just pass the full resolution loaded image into the custom resolution functions.

Hi, I've encountered the same issue as well. Could you please advise on how to set the parameters?
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
cv2.error: OpenCV(4.10.0) /io/opencv/modules/imgcodecs/src/loadsave.cpp:79: error: (-215:Assertion failed) pixels <= CV_IO_MAX_IMAGE_PIXELS in function 'validateInputImageSize'

Alright, some things are starting to come together. 21035 * 22993 * 4 =<PHONE_NUMBER>, which is one of the numbers mentioned in the error message. Another number mentioned in the error message is<PHONE_NUMBER>, which is 2^30, which is the default maximum pixel count cv2 works with. Thing is, I do os.environ["OPENCV_IO_MAX_IMAGE_PIXELS"] = str(2**40) to override this before loading cv2, and I've definitely loaded images far larger than yours. I was developing b2c on a BTF that's over 50,000 pixels in each dimension, and weighs almost 10GB.
I get a different, more sensible error when I try to load my image without flipping the setting (and everything loads fine once configured properly):
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
cv2.error: OpenCV(4.10.0) /io/opencv/modules/imgcodecs/src/loadsave.cpp:79: error: (-215:Assertion failed) pixels <= CV_IO_MAX_IMAGE_PIXELS in function 'validateInputImageSize'

The exact thing you're running into remains very arcane, I found this while trying to dig more stuff up. The fact you're seeing four channels when you PIL it in might be sending it to a different part of the cv2 library somehow where that setting has no power? What comes up when you identify the image via ImageMagick?
$ identify Visium_HD_Mouse_Brain_tissue_image.tif
Visium_HD_Mouse_Brain_tissue_image.tif TIFF 18872x23947 18872x23947+0+0 8-bit sRGB 137.865MiB 0.000u 0:00.033

As for proceeding, I think the most robust way would be for me to add an optional way to just pass the full resolution loaded image into the custom resolution functions.

Hello, I've encountered the same issue as well. Could you please advise on how to set the parameters?
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
cv2.error: OpenCV(4.10.0) /io/opencv/modules/imgcodecs/src/loadsave.cpp:79: error: (-215:Assertion failed) pixels <= CV_IO_MAX_IMAGE_PIXELS in function 'validateInputImageSize'

Thank you for your response.

Alright, some things are starting to come together. 21035 * 22993 * 4 =<PHONE_NUMBER>, which is one of the numbers mentioned in the error message. Another number mentioned in the error message is<PHONE_NUMBER>, which is 2^30, which is the default maximum pixel count cv2 works with. Thing is, I do os.environ["OPENCV_IO_MAX_IMAGE_PIXELS"] = str(2**40) to override this before loading cv2, and I've definitely loaded images far larger than yours. I was developing b2c on a BTF that's over 50,000 pixels in each dimension, and weighs almost 10GB.
I get a different, more sensible error when I try to load my image without flipping the setting (and everything loads fine once configured properly):
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
cv2.error: OpenCV(4.10.0) /io/opencv/modules/imgcodecs/src/loadsave.cpp:79: error: (-215:Assertion failed) pixels <= CV_IO_MAX_IMAGE_PIXELS in function 'validateInputImageSize'

The exact thing you're running into remains very arcane, I found this while trying to dig more stuff up. The fact you're seeing four channels when you PIL it in might be sending it to a different part of the cv2 library somehow where that setting has no power? What comes up when you identify the image via ImageMagick?
$ identify Visium_HD_Mouse_Brain_tissue_image.tif
Visium_HD_Mouse_Brain_tissue_image.tif TIFF 18872x23947 18872x23947+0+0 8-bit sRGB 137.865MiB 0.000u 0:00.033

As for proceeding, I think the most robust way would be for me to add an optional way to just pass the full resolution loaded image into the custom resolution functions.

Hello, I've run into this issue too. Could you please tell me how to configure the parameters?
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
cv2.error: OpenCV(4.10.0) /io/opencv/modules/imgcodecs/src/loadsave.cpp:79: error: (-215:Assertion failed) pixels <= CV_IO_MAX_IMAGE_PIXELS in function 'validateInputImageSize'

Thank you for your response.

You've ran into a different issue, not the same one as OP.
I was illustrating a more common cv2 problem, and how to fix it. This fix is already worked into bin2cell.

Hi，I adjusted the loading order of the modules, placing cv2 at the front, and now it runs normally. Thank you so much for you help.

Hi，I adjusted the loading order of the modules, placing bin2cell at the front, and now it runs normally. Thank you so much for you help.


Use API Explorer based NSwag generator and middlewares

Upgrade NSwag (samples) and use new API Explorer based generators (the reflection based generators are deprecated soon)
Some text improvements
Change "Open API" to "OpenAPI" (correct name)
Use new Swagger UI 3 in samples

Internal Review Page

Thank you for the updates, @RSuter!


Merge redash changes to bcgov

New repository for redash: https://github.com/bcgov/redash/tree/MET


skaffold: 0.35.0 -> 0.36.0

Motivation for this change
skaffold: 0.35.0 -> 0.36.0
Things done

[x] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
Built on platform(s)

[x] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
[x] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[x] Ensured that relevant documentation is up to date
[x] Fits CONTRIBUTING.md.

Notify maintainers
cc @vdemeester

@GrahamcOfBorg build skaffold

@GrahamcOfBorg build skaffold


Supervision status page improvements

Changed the filtered health status to use an OrderedHealthAggregator to accurately represent the filtered result

Added ability to selectively include healths with names allowing nested selections.
For example, if curl http://localhost:8080/blossom/public/status answers:

{
  "status": "DOWN",
  "details": {
    "upSubRoot": {
      "status": "UP",
      "details": {
        "healthLeafUp": {
          "status": "UP"
        },
        "healthLeafStillUp": {
          "status": "UP"
        }
      }
    },
    "level2SubRoot": {
      "status": "DOWN",
      "details": {
        "upSubRoot": {
          "status": "UP",
          "details": {
            "healthLeafUp": {
              "status": "UP"
            },
            "healthLeafStillUp": {
              "status": "UP"
            }
          }
        },
        "downSubRoot": {
          "status": "DOWN",
          "details": {
            "healthLeafDown": {
              "status": "DOWN"
            },
            "healthLeafUp": {
              "status": "UP"
            }
          }
        }
      }
    }
  }
}

Then curl http://localhost:8080/blossom/public/status?include=level2SubRoot.downSubRoot.healthLeafUp returns:
{
  "status": "UP",
  "details": {
    "level2SubRoot": {
      "status": "UP",
      "details": {
        "downSubRoot": {
          "status": "UP",
          "details": {
            "healthLeafUp": {
              "status": "UP"
            }
          }
        }
      }
    }
  }
}

Coverage increased (+0.2%) to 53.069% when pulling bfb0e0eab398491e355fdac3e8ecf88e8f007b85 on RLejolivet:supervision into 5f916493fda194db54d42f09fc98e6d142de46a4 on blossom-project:master.


Fix framework stats service counting drafts twice for old declarations

Framework drafts query uses an outerjoin between Drafts and framework
declarations on supplier_id field, which creates duplicate Draft rows
for suppliers who have completed declarations for other frameworks.
Filtering out rows with incorrect SupplierFrameworks.framework_id fixes
the problem.
Modified stats test to create a single set of suppliers and two sets
of framework applications for two different frameworks to check that
data from other frameworks doesn't affect the stats.

Nice work - how did you spot the error? Anyway, :+1:


[Task]: Implement TestSchemas

What work does this Task describe?
This task's output submits a TestSchemas containing inner classes FlatFields, RepeatedFields, NestedFields, and RepeatedNestedFields with static generated Schemas and instantiation helper methods.
What value may result from this Task's output?
This task contributes to the standardization and benchmarking of a SchemaTransform quality assurance program.
Ready and Done Measures
Ready
No blockers
Done
AutoValue based Java classes, generated Schema's, and static create helper methods of:

[ ] the FlatFields class
[ ] the RepeatedFields class
[ ] the NestedFields class
[ ] the RepeatedNestedFields class

Issue Priority
Priority: 2 (default / most normal work should be filed as P2)
Issue Components

[ ] Component: Python SDK
[X] Component: Java SDK
[ ] Component: Go SDK
[ ] Component: Typescript SDK
[X] Component: IO connector
[ ] Component: Beam examples
[ ] Component: Beam playground
[ ] Component: Beam katas
[ ] Component: Website
[ ] Component: Spark Runner
[ ] Component: Flink Runner
[ ] Component: Samza Runner
[ ] Component: Twister2 Runner
[ ] Component: Hazelcast Jet Runner
[ ] Component: Google Cloud Dataflow Runner

@pabloem After some research, I found we already have sdks/java/core/src/test/java/org/apache/beam/sdk/schemas/utils/TestJavaBeans.java


Make temporary files hidden

The temporary files associated with the individual slides need to be in the same directory so that they can find the resources they need in the same way as the whole presentation.  (Or do they?  Maybe there's some TeX trick we can use here.)  To keep them out of the way, let's make them hidden files.

There is a TeX trick: We could use $TEXINPUTS to point to the main directory while putting all the slides in a (hidden) subdirectory.  This would make it slightly easier to clean up when something goes wrong and SlideDeX isn't able to clean up after itself, at the cost of tying SlideDeX somewhat more tightly to the implementation of TeX.


QuickStart example for pruning is not working properly !!

Describe the bug:
QuickStart Example provides Error at model SpeedUp.  AttributeError: 'NoneType' object has no attribute 'startswith'. I tried running the pruning example quick start code and all worked fine until the section of model speedup.
Environment:

NNI version: 3
Training service (local|remote|pai|aml|etc):
Python version: 3.10
PyTorch version: 2.2
Cpu or cuda version: CPU

Reproduce the problem

Code|Example:
from nni.compression.speedup import ModelSpeedup

ModelSpeedup(model, torch.rand(3, 1, 28, 28).to(device), masks).speedup_model()

How to reproduce:
AttributeError                            Traceback (most recent call last)
 in <cell line: 7>()
5 from nni.compression.speedup import ModelSpeedup
6
----> 7 ModelSpeedup(model, torch.rand(3, 1, 28, 28).to(device), masks).speedup_model()

2 frames
/usr/local/lib/python3.10/dist-packages/nni/common/concrete_trace_utils/concrete_tracer.py in trace(self, root, autowrap_modules, autowrap_leaf_function, autowrap_leaf_class, leaf_module, fake_middle_class, concrete_args, use_operator_patch, operator_patch_backlist, forward_function_name)
956                 elif func.name != func.qualname and func.qualname != 'boolean_dispatch..fn':
957                     # method
--> 958                     if func.module.startswith('_') and func.module != 'main':
959                         path = sys.modules[func.module[1:]]
960                     else:
AttributeError: 'NoneType' object has no attribute 'startswith'

Same problem here

same

using pytorch version 2.1. it works for me

!pip install torch  torchvision==0.16.0 torchaudio==2.1.0 pytorch-cuda==12.1
Downgrade the Python version to 2.1.0; it works.


🚀 Feature: Allow specifying multiple TS versions (node_modules/typescript paths)

Bug Report Checklist

[X] I have tried restarting my IDE and the issue persists.
[X] I have pulled the latest main branch of the repository.
[X] I have searched for related issues and found none that matched my issue.

Overview
Porting over from https://github.com/microsoft/DefinitelyTyped-tools/issues/858: @definitelytyped/expect has the ability to receive a versionsToTest option. That option contains an array of TS versions with paths to the node_modules. The plugin then runs roughly:
for (const version of versionsToTest) {
  const ts = require(version.path) as TSModule;
  const program = getProgram(tsconfigPath, ts, version.versionName, parserServices.program);

Let's port that feature over to eslint-plugin-expect-type. I think it can exist roughly as-is. Maybe some bikeshedding on the option name?
Additional Info
Edit: This would support https://github.com/react-native-community/discussions-and-proposals/issues/719#issuecomment-1769855005 too.
Edit: ...and https://github.com/microsoft/DefinitelyTyped-tools/issues/440

Related: https://github.com/microsoft/DefinitelyTyped-tools/pull/848
I'm not sure how much I like to have an API that accepts a path to require, however, doing this opens the door to us moving the copies somewhere else which is pretty helpful.

@nateshmbhat no, if there's an update you'll see it in this issue. I haven't had time to work on #123 this year yet. Since you're interested, feel free to send your own PR that builds on #123 to resolve the issue. 🙂


Add image file check

What does this PR do?
This small PR validates that the file uploaded is indeed an image file.
(Supporting these extensions: .png, .jpg, .jpeg, .jfif, .pjpeg, .pjp)
Anything Else?
If you have another common file extension that you think we should support, let me know!

LGTM! but this could be just a commit.

(Literally)
I thought it was going to be bigger.
I'm going to expand this PR with other solved TODOs, so will request another review.


Add copy button to code blocks

Enabled in config.toml. If unset, no JS will be loaded.

Excellent work on the code blocks! I could see some similarities with the one I used but your js accomplished the same thing in a lot less lines, I also like what you did with the header of the code blocks.
I pulled most of these changes into abridge: https://github.com/Jieiku/abridge/commit/bc671dc40827f65b25d35fa9546181ad4e0f1456


MCS Door sensor not reporting state

Describe the bug
Entity is in Home Assistant but reporting closed position, does not change with opening
Expected behavior
Expect to report open and close states
Screenshots
If applicable, add screenshots to help explain your problem.
Home Assistant Version
core-2021.12.1
Device info (please complete the following information, which can be found in log):
like this:
{
"active_time":<PHONE_NUMBER>,
"biz_type": 18,
"category": "cz",
"create_time":<PHONE_NUMBER>,
"icon": "smart/product_icon/cz.png",
"id": "aaaaaaaaaaa",
"ip": "xxxxxxxxxxxxxxxx",
"lat": "xxxxxxxxxx",
"local_key": "xxxxxxxxxxxxx",
"lon": "xxxxxxx",
"model": "",
"name": "Living Room Socket",
"online": false,
"owner_id": "34794909",
"product_id": "yfemiswbgjhddhcf",
"product_name": "Switch Product",
"status": [
{
"code": "switch",
"value": false
},
{
"code": "countdown_1",
"value": 0
},
{
"code": "cur_current",
"value": 0
},
{
"code": "cur_power",
"value": 0
},
{
"code": "cur_voltage",
"value": 2343
}
],
"sub": false,
"time_zone": "+08:00",
"uid": "xxxxxxxxxxxxxxxxxxx",
"update_time":<PHONE_NUMBER>,
"uuid": "xxxxxxxxxxxxxxxxxx"
}
Device specifications (please complete the following information, which can be found in log):
Same device's id, like this:
[2021-07-01 10:18:01,351] [tuya-openapi] Request: method = GET, url = https://openapi.tuyacn.com/v1.0/devices/aaaaaaaaaaa/specifications, params = None, body = None, headers = {'client_id': 'xxxxxxxxxxxx', 'sign': 'xxxxxxxxxxxx', 'sign_method': 'HMAC-SHA256', 'access_token': 'xxxxxxxxxxxxxxxx', 't': '1625105881351', 'lang': 'en'}
2021-07-01 10:18:01 DEBUG (SyncWorker_1) [tuya iot] Response: {
"result": {
"category": "cz",
"functions": [
{
"code": "countdown_1",
"type": "Integer",
"values": "{"unit":"s","min":0,"max":86400,"scale":0,"step":1}"
},
{
"code": "switch",
"type": "Boolean",
"values": "{}"
}
],
"status": [
{
"code": "cur_voltage",
"type": "Integer",
"values": "{"unit":"V","min":0,"max":2500,"scale":0,"step":1}"
},
{
"code": "cur_current",
"type": "Integer",
"values": "{"unit":"mA","min":0,"max":30000,"scale":0,"step":1}"
},
{
"code": "switch",
"type": "Boolean",
"values": "{}"
},
{
"code": "cur_power",
"type": "Integer",
"values": "{"unit":"W","min":0,"max":50000,"scale":0,"step":1}"
},
{
"code": "countdown_1",
"type": "Integer",
"values": "{"unit":"s","min":0,"max":86400,"scale":0,"step":1}"
}
]
},
"success": true,
"t":<PHONE_NUMBER>348
}
Additional context
Add any other context or logs about the problem here.

I have the same situation. It can be solved temporarily after restarting

Same problem here, applies to sensors and thermostats. It works more or less for an hour after restart, then stops reacting

wonder what happened....in the app the state is quite accurate and responsive...

It's related to other topic with Tuya integration that not refresh states.
Only with integration' reload is a partial solution.


Notification handler err issue

i push notification from firebase console When app is opening,so app crashes. When app is minimized or closed, it's ok. i found that: comment await someAsyncCall function inside  FCM.on() , error has gone but nothing happen too.
if(notif.local_notification){
       //this is a local notification
}
if(notif.opened_from_tray){
      //app is open/resumed because user clicked banner
}
//await someAsyncCall();
if(Platform.OS ==='ios'){

Does anyone know why?

react-native-cli: 2.0.1
react-native: 0.40.0
react-native-fcm": "^6.1.0",
I'm testing on Android device 5

I also have this issue

Same as above, any clues for that issue?

same problem here

Getting the same issue. Tried on emulator as well as device .

I think I figured it out. Platform needs to be imported.
import { Platform } from 'react-native'

I've found out, that basically if the code that you place for handling a notification is somehow broken, it ends up in a react-native-fcm try / catch that prompts this error, but it rarely means a bug in react-native-fcm itself

yes I make that try catch so that errors can be found immediately. May be I should be more clear about the error message?
@orphnahk please reopen if your issue is not resolved

@orphnahk I have the same issue. Please how did you fix it? Thanks

You have to delete both async from FCMEvent.Notification, async notif => { and someAsyncCall()  from the code.

What is the expected use case for someAsyncCall() if it's not implemented/necessary?

this.notificationListener2 = FCM.on(FCMEvent.Notification,(notif) => {
var data = notif;
var dataNotif = notif;
try {
if (Platform.OS === 'android') {
if (dataNotif.custom_notification) {
var data = dataNotif;
console.log('notificationListener new',JSON.stringify(data))
Alert.alert(
data.title,
data.body,
[
{text: 'Cancel', onPress: () => console.log('Cancel Pressed'),style: 'cancel',},
{text: 'View', onPress: () => this.openNotificationTargetWindow(data)},
],
{cancelable: false},
);
}
}
//someAsyncCall();
}catch(err){
//alert(err)
}
});


Adding MMS Feature to README.md

Coverage remained the same at 91.356% when pulling 2a2949b6609a9d66d4e8e23e9018c5f71ce2d555 on anilkumarbp:master into 674613f8e8d4f7c6bd5f8cd20235053d64c0983c on ringcentral:master.


Issue with Mailing address states and Military Mailing address codes

When importing data, I noticed an issue while trying to import some students who have Military mailing address codes for states as well as some other states such as Puerto Rico. You can find a list of the address codes in the "USPS" codes here:
https://en.wikipedia.org/wiki/List_of_U.S._state_abbreviations
Also this may be out of scope, but numeric two digit state codes for Japan are also an issue. Those codes can be found here:
https://en.wikipedia.org/wiki/ISO_3166-2:JP

**lurch: add

Tracking W-010486

Thanks for letting us know about this, @tjb328.

Hi @tjb328, thanks for the submission. Can you please clarify which field was having the issue? Was it:
Country of Origin
Citizenship
Thanks.

It is for the contacts "State" as part of the "mailing address". Though to correctly fix this, all places where there is a picklist of States, the picklist should include all of the USPS codes.

I'd like to ask a few more questions as it's not quite clear to me why you're seeing the error. The "State" field under "Mailing Address" is a free text field which takes any input, so an import in should not yield any errors. Country of Origin and Citizenship are pick-lists which could be problematic if the countries weren't listed, but I see Puerto Rico in the list. I don't believe we're performing any 2 character checks during import, but will have someone check just in case.

Would you be wiling to share an example of one record you had trouble importing?
What import method did you use? Was it the import feature under contacts?
What file format did you use to import?
Are you in Classic view or Lightning view?

As a longer term solution, we will support a broader range of address codes, but I want to make sure we understand the immediate cause of your error.
Thanks for your help.

Hi @tjb328,
One thought is that you can pre-create the entry using the following steps: https://help.salesforce.com/apex/HTViewHelpDoc?id=admin_state_country_picklists_edit_details.htm&language=en_US
Once the pick-list entires are present, the import should work. This appears to be more core functionality vs. HEDA specific, since we rely on core address functionality.
Please let us know if that works out for you.

@tjb328 ~ Just to clarify, do you have State and Country Picklists enabled? (https://help.salesforce.com/apex/HTViewHelpDoc?id=admin_state_country_picklists_overview.htm&language=en_US)

Sorry for not responding right away. I was testing this in a sandbox and the error occurred while I was trying to import our data using the Jitterbit Data Loader. I did have picklists enabled and at the time, those values were not present. I have not checked it recently.

No problem. Thanks for the clarification, @tjb328. Let us know how it goes with @wongmike's suggestions.

@tjb328, just closing the loop on this discussion. It seems like we've got the answer and we hope our suggestions will help improve your next import. Please feel free to reopen this if needed or you can open a new issue as needed.


Add RetroBridge

Solana users ape with SOL.
RetroBridge allows bridging from SOL (Solana) to ETH (Starknet) but fees are higher.

Solana users ape with SOL. RetroBridge allows bridging from SOL (Solana) to ETH (Starknet) but fees are higher.

Interesting. Good idea. Might adding it then


Publish a new version on NPM for Redis 5.0 commands please

Hi,
We would like to uses Redis 5.0 commands ( the final release is planned the 17th october, in 9 days). The current version 1.3.5 doesn't includes the last changes of your master branch, I don't see in the commands.json the XADD or BZPOPMIN/MAX commands.
I've opened an issue on ioredis but this seems to be a finally related to this package, could you please push a new version ? :)

Published v1.4.0.

Hello @luin , is it possible to update the commands list with the latests/newest additions, such as the LPOS command (Available since 6.0.6)?
Cheers

@xprudhomme Updated in v1.6.0


:checkhealth failed after upgrade module neovim to 0.3.1 (on python 3.7.1)

Expected result: :checkhealth all passed
Actual result:
## Python 3 provider (optional)
  - INFO: Using: g:python3_host_prog = "/usr/local/bin/python3"
  - INFO: Executable: /usr/local/bin/python3
  - ERROR: Command error (job=7): `'/usr/local/bin/python3' -c 'import sys; sys.path.remove(""); import neovim; print(neovim.__file__)'` (in '/Users/bruce/work/encoding-service')
    Output: Traceback (most recent call last):  File "<string>", line 1, in <module>ModuleNotFoundError: No module named 'neovim'
  - INFO: Python3 version: 3.7.1
  - INFO: python3-neovim version: unable to load neovim Python module
  - ERROR: Neovim Python client is not installed.
    Error: unable to load neovim Python module
    - ADVICE:
      - Run in shell: pip3 install neovim

Steps to reproduce:

pip3 install neovim==0.3.1

pip3 show neovim
Name: neovim
Version: 0.3.1
Summary: Transition packgage for pynvim
Home-page: http://github.com/neovim/python-client
Author: Thiago de Arruda
Author-email<EMAIL_ADDRESS>License: Apache
Location: /usr/local/lib/python3.7/site-packages
Requires: pynvim
Required-by:

pip3 show pynvim

Name: pynvim
Version: 0.3.1
Summary: Python client to neovim
Home-page: http://github.com/neovim/python-client
Author: Thiago de Arruda
Author-email<EMAIL_ADDRESS>License: Apache
Location: /usr/local/lib/python3.7/site-packages
Requires: msgpack, greenlet
Required-by: neovim

nvim +checkhealth

health#LanguageClient#check
========================================================================
  - OK: binary found: /Users/bruce/.config/nvim/plugged/LanguageClient-neovim/bin/languageclient
  - OK: languageclient 0.1.127 229df982b764502c4e03b524ad3c14eb0db8e273

health#nvim#check
========================================================================
## Configuration
  - OK: no issues found

## Performance
  - OK: Build type: Release

## Remote Plugins
  - OK: Up to date

## terminal
  - INFO: key_backspace (kbs) terminfo entry: key_backspace=\177
  - INFO: key_dc (kdch1) terminfo entry: key_dc=\E[3~
  - INFO: $TERM_PROGRAM='iTerm.app'
  - INFO: $COLORTERM='truecolor'

health#provider#check
========================================================================
## Clipboard (optional)
  - OK: Clipboard tool found: pbcopy

## Python 2 provider (optional)
  - WARNING: No Python interpreter was found with the neovim module.  Using the first available for diagnostics.
  - ERROR: Python provider error
    - ADVICE:
      - provider/pythonx: Could not load Python 2:
          /usr/local/bin/python2 does not have the "neovim" module. :help |provider-python|
          /usr/local/bin/python2.7 does not have the "neovim" module. :help |provider-python|
          python2.6 not found in search path or not executable.
          /usr/local/bin/python does not have the "neovim" module. :help |provider-python|
  - INFO: Executable: Not found

## Python 3 provider (optional)
  - INFO: Using: g:python3_host_prog = "/usr/local/bin/python3"
  - INFO: Executable: /usr/local/bin/python3
  - ERROR: Command error (job=7): `'/usr/local/bin/python3' -c 'import sys; sys.path.remove(""); import neovim; print(neovim.__file__)'` (in '/Users/bruce/work/encoding-service')
    Output: Traceback (most recent call last):  File "<string>", line 1, in <module>ModuleNotFoundError: No module named 'neovim'
  - INFO: Python3 version: 3.7.1
  - INFO: python3-neovim version: unable to load neovim Python module
  - ERROR: Neovim Python client is not installed.
    Error: unable to load neovim Python module
    - ADVICE:
      - Run in shell: pip3 install neovim

## Ruby provider (optional)
  - INFO: Ruby: ruby 2.5.3p105 (2018-10-18 revision 65156) [x86_64-darwin17]
  - INFO: Host: /usr/local/bin/neovim-ruby-host
  - OK: Latest "neovim" gem is installed: 0.7.1

## Node.js provider (optional)
  - INFO: Node.js: v11.2.0
  - INFO: Neovim node.js host: /usr/local/lib/node_modules/neovim/bin/cli.js
  - OK: Latest "neovim" npm/yarn package is installed: 4.2.1

Yeah, that's a bit unfortunate. After just upgrading the package, import neovim won't work anymore, but that's used by :checkhealth to check if there's any supported Python interpreter that can access that module.
Please read this: https://github.com/neovim/neovim/wiki/Following-HEAD#20181118
Removing pynvim and neovim and reinstalling pynvim afterwards should make import neovim work again and resolves the :checkhealth issue.

Following the steps in docs like:
pip3 uninstall neovim
pip3 uninstall pynvim
pip3 install pynvim

fixed it.
It would be good if the error messages mentioned https://github.com/neovim/neovim/wiki/Following-HEAD#20181118 though.

You didn't mention the Nvim version you're using, but master's :checkhealth is already checking for pynvim instead. It will be in the next release. :)

Sorry forgot the most important one 😋, my Neovim version is 0.3.1

I'm having related issues since upgrading Neovim, which it seems like is depending on the pynvim module now instead of the neovim module.
Even after uninstalling the pynvim and neovim modules and installing pynvim using both pip and pip3, the Python 2 provider seems unable to recognize pynvim as being installed:
(Note that the Python 3 provider seems to be working fine.)
## Python 2 provider (optional)
  - INFO: Using: g:python_host_prog = "/usr/bin/python"
  - INFO: Executable: /usr/bin/python
  - ERROR: Command error (job=9, exit code 1): `/usr/bin/python -c 'import sys; sys.path.remove(""); import pynvim; print(pynvim.__file__)'` (in '/home/dave/code/advent-of-code')
    Output: Traceback (most recent call last):  File "<string>", line 1, in <module>ImportError: No module named pynvim
    Stderr: Traceback (most recent call last):  File "<string>", line 1, in <module>ImportError: No module named pynvim
  - INFO: Python version: 2.7.12
  - INFO: pynvim version: unable to load pynvim Python module
  - ERROR: Importing "neovim" failed.
    - ADVICE:
      - Reinstall "pynvim" and optionally "neovim" packages.
          pip uninstall pynvim neovim
          pip install pynvim
          pip install neovim # only if needed by third-party software
  - ERROR: pynvim is not installed.
    Error: unable to load pynvim Python module
    - ADVICE:
      - Run in shell: pip install pynvim

## Python 3 provider (optional)
  - INFO: Using: g:python3_host_prog = "/usr/bin/python3"
  - INFO: Executable: /usr/bin/python3
  - INFO: Python version: 3.5.2
  - INFO: pynvim version: 0.3.1
  - OK: Latest pynvim is installed.

It seems like Python 2 itself is unable to import pynvim, despite the fact that I installed it apparently successfully:
$ pip show pynvim
Name: pynvim
Version: 0.3.1
Summary: Python client to neovim
Home-page: http://github.com/neovim/python-client
Author: Thiago de Arruda
Author-email<EMAIL_ADDRESS>License: Apache
Location: /usr/local/lib/python3.5/dist-packages
Requires: greenlet, msgpack
Required-by:

$ python
Python 2.7.12 (default, Nov 12 2018, 14:36:49)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import neovim
>>> import pynvim
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named pynvim
>>>

For comparison, note that I am able to import pynvim from python3:
$ python3
Python 3.5.2 (default, Nov 12 2018, 13:43:14)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import neovim
>>> import pynvim
>>>

I did notice that I do NOT have the neovim module installed anymore, yet I am able to import neovim, so could the issue be that the pynvim module is still named neovim in the sense that you have to do import neovim to import it? That might explain the ImportError: No module named pynvim error that happens when I run :checkhealth in Neovim.

$ pip show pynvim
...
Location: /usr/local/lib/python3.5/dist-packages

@daveyarwood your pip is managing python 3.5, not python 2. Try pip2 or figure out what "pip" tool on your system actually manages python 2 packages.

@justinmk Nice catch -- that was indeed the problem! Using pip2 to uninstall pynvim and neovim and then install pynvim did the trick.

Can we at least reference this on the Readme? I had to dig a little more than was necessary to find out the package had been renamed.

I got the same error in MacOS Ventura 13.2.1 (22D68) and I fixed it by running /opt/homebrew/bin/python3 -m pip install pynvim as suggested in the report:


[BUG] langchain-openai - max_tokens

Checked other resources

[X] I added a very descriptive title to this issue.
[X] I searched the LangChain documentation with the integrated search.
[X] I used the GitHub search to find a similar question and didn't find it.
[X] I am sure that this is a bug in LangChain rather than my code.
[X] The bug is not resolved by updating to the latest stable version of LangChain (or the specific integration package).

Example Code
import dotenv
from langchain_openai import ChatOpenAI
from langchain_core.messages import HumanMessage, SystemMessage
from langchain_core.prompts import ChatPromptTemplate, MessagesPlaceholder
from langchain_core.output_parsers import StrOutputParser

dotenv.load_dotenv()
llm = ChatOpenAI(
    model="gpt-4",
    temperature=0.2,

    # NOTE: setting max_tokens to "100" works. Setting to 8192 or something slightly lower does not.
    max_tokens=8160
)

output_parser = StrOutputParser()

prompt_template = ChatPromptTemplate.from_messages([
    ("system", "You are a helpful assistant. Answer all questions to the best of your ability."),
    MessagesPlaceholder(variable_name="messages"),
])

chain = prompt_template | llm | output_parser

response = chain.invoke({
    "messages": [
        HumanMessage(content="what llm are you 1? what llm are you 2? what llm are you 3? what llm are you 4? what llm are you 5? what llm are you 6?"),
    ],
})

print(response)

Error Message and Stack Trace (if applicable)
raise self._make_status_error_from_response(err.response) from None
openai.BadRequestError: Error code: 400 - {'error': {'message': "This model's maximum context length is 8192 tokens. However, you requested 8235 tokens (75 in the messages, 8160 in the completion). Please reduce the length of the messages or completion.", 'type': 'invalid_request_error', 'param': 'messages', 'code': 'context_length_exceeded'}}
Description
max_tokens is not correctly accounting for user prompt.
If you specify a max_tokens of 100 as an example, it "correctly accounts for it" (not really, but gives a result), by simply having the extra room in the context window to expand into. With any given prompt, it will produce the expected result.
However, If you specify a max_tokens (for GPT4 as an example of "8192" or "8100", etc. it does not.
This means max_tokens is effectively not implemented correctly.
System Info
langchain==0.1.20
langchain-aws==0.1.4
langchain-community==0.0.38
langchain-core==0.1.52
langchain-google-vertexai==1.0.3
langchain-openai==0.1.7
langchain-text-splitters==0.0.2
platform mac
Python 3.11.6

Howdy! Will keep this open to prevent cycling through reopens of the same issue, but could you read through the openai docs for the max_tokens param and see if this is different than when using OpenAI directly? https://platform.openai.com/docs/api-reference/chat/create#chat-create-max_tokens
Context windows limit the total number of tokens (input + generated), and the max_tokens parameter dictates the max generated tokens.
 Answer all questions to the best of your ability."

      }
    ]
  }'

Hi @efriis - thank you.
I understand why it was designed this way if the goal was to mimic the OpenAI API directly.
It makes sense with the API (imo at least), but I think with LangChain, given that it borders on a much more useful wrapper/framework, it seems almost as a missing feature/"bug".
If the goal is for max_tokens to mimic the API, I can see how "max_tokens" is mapped to the OpenAI max tokens.
Would it possibly make sense to add an additional parameter (ie: max_context, etc) that would auto calculate this?
I know the end user can calculate it (this is what we are doing currently, subtracting the system and user prompts, and accounting for the 11 tokens of metadata), but it just seems silly that you can't effectively give it a parameter that says "use as much tokens as you can". Maybe even making a "max_context" a boolean, and just defaulting it to False?
Ex:
import dotenv
from langchain_openai import ChatOpenAI
from langchain_core.messages import HumanMessage, SystemMessage
from langchain_core.prompts import ChatPromptTemplate, MessagesPlaceholder
from langchain_core.output_parsers import StrOutputParser
import tiktoken

dotenv.load_dotenv()

def calculate_tokens(messages, model="gpt-4"):
    enc = tiktoken.encoding_for_model(model)
    tokens = 0
    for message in messages:
        encoded_message = enc.encode(message.content)
        print(f"Message: {message.content}\nTokens: {encoded_message}\nToken Count: {len(encoded_message)}\n")
        tokens += len(encoded_message)
    return tokens

# Define the system message and human messages
system_message = SystemMessage(content="You are a helpful assistant. Answer all questions to the best of your ability.")
human_messages = [
    HumanMessage(content="what llm are you 1? what llm are you 2? what llm are you 3? what llm are you 4? what llm are you 5? what llm are you 6? what llm are you 7? what llm are you 8? what llm are you 9? what llm are you 10? what llm are you 11?"),
]

# Combine all messages
all_messages = [system_message] + human_messages

# Calculate tokens in all messages
message_tokens = calculate_tokens(all_messages)
print(f"Total Message Tokens: {message_tokens}")

max_context_length = 8192

# Calculate max_tokens to be passed to the model, by accounting for user messages and subtracting
# NOTE: There is a metadata/buffer of 11 tokens always added to all user+system prompts.
max_tokens = max_context_length - message_tokens - 11
print(f"Calculated Max Tokens: {max_tokens}")

# Initialize the ChatOpenAI model with the adjusted max_tokens
llm = ChatOpenAI(
    model="gpt-4",
    temperature=0.2,
    max_tokens=max_tokens
)

output_parser = StrOutputParser()

# Create the prompt template using the system message and placeholder for human messages
prompt_template = ChatPromptTemplate.from_messages([
    ("system", system_message.content),
    MessagesPlaceholder(variable_name="messages"),
])

chain = prompt_template | llm | output_parser

try:
    response = chain.invoke({
        "messages": human_messages
    })
    print(response)
except Exception as e:
    print(e)

What do you think?


refactor to use fs.promises

I really wish this was undone. I use this package in AWS Lambda which only supports up to node 8.10.
You can use mz or a similar package for asynchronous fs. Can we do this until support for node 10 gets better?

I created issue #50 with some suggestions on how to resolve my problem.


Bad Allocation Error

System Information (please complete the following information):

Model Builder Version (available in Manage Extensions dialog): <IP_ADDRESS>1902
Visual Studio Version

Describe the bug

On which step of the process did you run into an issue: While training a model.  It had trained many times before without issue.
Clear description of the problem:

To Reproduce
Steps to reproduce the behavior:

Go to '...'
Click on '....'
Scroll down to '....'
See error

Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
at Microsoft.ML.Trainers.LightGbm.LightGbmInterfaceUtils.Check(Int32 res)
at Microsoft.ML.Trainers.LightGbm.Booster.Update()
at Microsoft.ML.Trainers.LightGbm.WrappedLightGbmTraining.Train(IChannel ch, IProgressChannel pch, Dictionary2 parameters, Dataset dtrain, Dataset dvalid, Int32 numIteration, Boolean verboseEval, Int32 earlyStoppingRound)    at Microsoft.ML.Trainers.LightGbm.LightGbmTrainerBase4.TrainCore(IChannel ch, IProgressChannel pch, Dataset dtrain, CategoricalMetaData catMetaData, Dataset dvalid)
at Microsoft.ML.Trainers.LightGbm.LightGbmTrainerBase4.TrainModelCore(TrainContext context)    at Microsoft.ML.Trainers.TrainerEstimatorBase2.TrainTransformer(IDataView trainSet, IDataView validationSet, IPredictor initPredictor)
at Microsoft.ML.Data.EstimatorChain`1.Fit(IDataView input)
at Microsoft.ML.AutoML.BinaryClassificationTrainTestRunner.Run(TrialSettings settings, IServiceProvider provider)
at Microsoft.ML.AutoML.AutoMLExperiment.d__21.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.ML.ModelBuilder.AutoMLService.Experiments.BinaryClassificationExperiment.d__13.MoveNext() in //src/Microsoft.ML.ModelBuilder.AutoMLService/Experiments/BinaryClassificationExperiment.cs:line 101
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.ML.ModelBuilder.AutoMLEngine.d__21.MoveNext() in //src/Microsoft.ML.ModelBuilder.AutoMLService/AutoMLEngineService/AutoMLEngine.cs:line 161

Sorry you ran into this problem! Are you able to share more information about what you're doing?

Can you share your dataset?
Is this still happening? Did a machine restart fix subsequent training?

Any update on the above?

I'm unable to upload the data. Maybe someone else will run into this and can provide data.

Poking around it looks like this may be a problem with out of memory exception when trying to create the dataset. After restart does the problem still reproduce? Is it a large dataset?

Sorry you ran into this problem. If its still happening on our latest version let us know - https://marketplace.visualstudio.com/items?itemName=MLNET.ModelBuilder2022


Add more documentation on subjective billing

From EOSIO Developers Telegram:
Kevin Heifner, [19.04.21 21:13]

Subjective CPU billing is now with 2.0.12 disabled by default on all nodes. One would expect it to be enabled on public P2P and public API nodes to reduce abuse. One would expect it to be disabled on all private nodeos as you do not need to protect the node from yourself.
Subjective CPU works by keeping track of the amount of time spent running transactions that fail and time spent running transactions that succeed but are never seen making it into a block. This subjective CPU amount is subtracted from the accounts objective CPU amount. If the account does not have enough CPU after this calculation then the transaction fails the same as it would if it was out of objective CPU. The subjective billed amount decays over 24hrs just like the objective CPU amount.
Subjective CPU can also be disabled for specific accounts. So you can ask public API/P2P providers to add your account if you have a legitimate use case and you are not spamming their node.

Kevin Heifner, [19.04.21 21:17]

The 3 strike rule is only for block signing nodes when they are creating signed blocks. Any 3 transaction failures by an account causes all other transactions in the unapplied transaction queue by that account to be immediately dropped. The 3 strike rule does not apply to subjective billing because when a producer is producing a signed block it does not consider any subjective billing; even if subjective billing is enabled on that nodeos.

@matthewdarwin  for  the 3 strike rule, would you please drop me the code link of the implementation, would like to take a look,thanks


Replace EALREADY with EBUSY in udp_recv_start?

Hi! I'm going through some of your TODOs and found this one from @bnoordhuis in unix/udp.c#L847:
if (uv__io_active(&handle->io_watcher, UV__POLLIN))
  return -EALREADY;  /* FIXME(bnoordhuis) Should be -EBUSY. */

Guessing it would be a breaking change. Is this worth the effort changing or should the todo be removed?

It would be possible to change it for libuv v2.x but there is no ETA for that.  There are a few more places where EALREADY is returned where EUBUSY would be more appropriate, both in the UNIX code and the Windows code.

Thanks for answering quickly! Is it too early to open a PR for changes meant for v2.x?

No, you're welcome to file one.  I'll review it but it may be a while before we can land it.

:+1:


What are the FLOPs and parameters of your models?

Hi, sorry for the late reply. You can get all this information by running python tracking/profile_model.py. See the ReadMe for more details.
https://github.com/botaoye/OSTrack#test-flops-and-speed


Option to disable stereo panning in ABC playback in Maestro

Request from Splik (https://www.lotro.com/forums/showthread.php?522150-Maestro-MIDI-to-ABC-converter-for-LOTRO&p=7829640#post7829640)

The stereo in Maestro messes up our ability to properly tune the volumes, as its hard to hear the volume of instruments that are panned differently.
Hope you will consider a stereo toggle option for Maestro ala. ABCPlayer, remove stereo in Maestro or at least make the panning much less. That would increase our ability to tune the songs better.

I am still hoping for this.

How about having the panning amount as a slider or something so its configurable. (or for example configurable from a textfile)


disable GooglePubSubSender if pubsub cannot be reached

Adds a isHealthy() method to the EventSender interface that is used to
filter out any unhealthy senders at startup.
This logic is done in a new class named EventSenderFactory, which
extracts the identical logic for constructing Lists of EventSenders from
the MasterService and the AgentService. To make this common class
possible, also extracted a class for the common configuration fields
between AgentConfig and MasterConfig. This new CommonConfiguration class
is incomplete - more fields can be moved to this class to avoid
duplication, but I left that for future commits.
I created EventSenderFactory in hopes of writing a test for the logic
that unhealthy senders are removed from the List, but the nature of this
class makes this test to impractical - since the
List-of-EventSender-building involves constructing new instances of
KafkaProvider/GooglePubSubProvider/etc and calling methods on instances
that those instances return, which is not really feasible to be mocked
out in a test.

@davidxia @rohansingh @lndbrg @zalenski
this aims to avoid issues like https://github.com/GoogleCloudPlatform/google-cloud-java/issues/1432

Current coverage is 51.25% (diff: 40.81%)

Merging #1030 into master will increase coverage by 0.04%

@@             master      #1030   diff @@
==========================================
  Files           274        276     +2
  Lines         13132      13135     +3
  Methods           0          0
  Messages          0          0
  Branches       1700       1700
==========================================
+ Hits           6725       6733     +8
+ Misses         5903       5899     -4
+ Partials        504        503     -1

Powered by Codecov. Last update 8cd160e...f14c677

i believe it would be beneficial to have a cache of senders that expires after n minutes and retries connection, in case the targeted event bus is down intermittently.

I think there are two approaches we could take to improve this so that an intermittent network problem at startup does not cause the pubsub sender to be disabled for as long as the agent is up:

Add a periodic out-of-band check (similar to getTopic here) that checks connectivity, and enables/disables the sender based on the result.

Remove the healthcheck-at-startup added here and modify the failure listener in the FutureCallback added to the future returned by pubsub.publishAsync(..) to set a flag that disables sending for some configured period of time. When this time elapses, subsequent publish attempts would be made again.

I am leaning towards 1 as 2 would still cause publishing attempts if the agent had total unconnectivity to the pubsub service, and so the ThresholdBundler will still fill up with requests, but just at a slower rate.

1 sounds like a good idea.


feat!: fixed up configuration dependancy injection

Summary of Changes
Migrated all our old useConfiguration hooks to useServices instead. See container-impl.tsx for default configuration
Related Issues
N/A
Pull Request Checklist
Tick all boxes below to demonstrate that you have completed the respective task. If the item does not apply to your this PR check it anyway to make it apparent that there's nothing to do.

[x] All commits contain a DCO Signed-off-by line (we use the DCO GitHub app to enforce this);
[x] Updated LICENSE-3RD-PARTY.md for any added dependencies or vendored components;
[x] Updated documentation as needed for changed code and new or modified features;
[x] Added sufficient tests so that overall code coverage is not reduced.

If you have any questions to any of the points above, just submit and ask! This checklist is here to help you, not to deter you from contributing!
Pro Tip 🤓

Read our contribution guide at least once; it will save you a few review cycles!
Your PR will likely not be reviewed until all the above boxes are checked and all automated tests have passed.

PR template adapted from the Python attrs project.

Tested running. Works on existing installation and new install.