[🐛 Bug]: Header alignment

VSCode Environment
Version: 1.67.2
Commit: c3511e6c69bb39013c4a4b7b9566ec1ca73fc4d5
Date: 2022-05-17T18:20:57.384Z (1 wk ago)
Electron: 17.4.1
Chromium: 98.0.4758.141
Node.js: 16.13.0
V8: <IP_ADDRESS>-electron.0
OS: Darwin x64 21.5.0
Marquee Version
v3.1.1653395108
Workspace Type
Local Workspace
What happened?
Totally cosmetic: Icons, and widget titles both in widgets and modals for icons and or close buttons don't align.

What is your expected behavior?
No response
Relevant Log Output
No response
Code of Conduct

[X] I agree to follow this project's Code of Conduct

Is there an existing issue for this?

[X] I have searched the existing issues

Fixed outlined misalignments for:

weather widget where we now shrink the location name rather than wrapping the container

Github settings dialog

general alignment differences between widgets


SHA256Digest.process return data not equal to hashlib(python) and other lib in many other languages

source text is '1d31dc56a882c686e5355f367d2ea8393ef8535f19896e38c83f025062837e901d0400551802c5533661aabc96135de5eb91a982fdb9ba3a876043b8e883ae50'
SHA256Digest.process returns:
[209, 176, 92, 12, 94, 11, 223, 105, 236, 152, 90, 14, 40, 177, 184, 200, 217, 84, 250, 223, 10, 57, 94, 148, 101, 239, 149, 235, 193, 91, 136, 188]
Python hashlib sha256 returns:
[107, 25, 91, 95, 40, 19, 177, 140, 73, 50, 217, 152, 219, 191, 24, 89, 72, 242, 227, 38, 197, 232, 11, 4, 206, 241, 52, 249, 79, 92, 62, 171]

How did you transform the source text? Might be an encoding issue as you need a Uint8List to hash a String.

source text is '1d31dc56a882c686e5355f367d2ea8393ef8535f19896e38c83f025062837e901d0400551802c5533661aabc96135de5eb91a982fdb9ba3a876043b8e883ae50'

Is that the actual text in UTF8? Or is that a hexadecimal representation of the source bytes? Could you briefly mention the code you used to get those hash values for both Dart and Python?
Sorry for the late response, not really keeping track on this project anymore.

Apparently the source text is an ASCII string to be converted to bytes as ASCII values, i.e. 0x31, 0x64, 0x33, 0x31, etc.
The following BC code produces the expected output:
  var sourceText =
      '1d31dc56a882c686e5355f367d2ea8393ef8535f19896e38c83f025062837e901d0400551802c5533661aabc96135de5eb91a982fdb9ba3a876043b8e883ae50';

  var bytes = Uint8List.fromList(sourceText.codeUnits);
  print(bytes.length);

  print(SHA256Digest().process(bytes));


Errors in the encoding of some bits

Hi,
I was checking the code behind the PubChem fingerprint generation.
I did some comparisons between fingerprints calculated with your code and those calculated with PyFingerprint which uses the cdk library and noticed some differences.
I noticed that for bits in the range 0-98, smarts are not used and therefore when carbons are counted for example, only aliphatic carbons are considered since the corresponding key is C.
As a result the counting and encoding are incorrect.
The second point concerns the bits in the range 115-231: in this case there are two conditions to be met such as bits 116 and 117 mention ">= 1 saturated or aromatic carbon-only ring size 3 " and ">= 1 saturated or aromatic nitrogen-containing ring size 3" respectively. In this case a cyclopropane ring should be detected by bit 116 but not by bit 117. Instead with your code it is encoded for both bits.
I hope the bugs I reported are corrected otherwise I would be glad to have an explanation of my mistake
Thank you for your helpfulness
Salvatore

I did some comparisons between fingerprints calculated with your code and those calculated with PyFingerprint which uses the cdk library and noticed some differences.

If this is your observation, consider to provide the data used to perform the
test to attempt a replication of your findings.  Then, the output by pubchempy
and pyfingerprint are easier to compare with each other (e.g., a diff view of
the corresponding logs) to resolve discrepancies and correct errors.
If rising an issue in GitHub, you may substantiate your findings by attaching
a file; to get familiar with this option, hoover the mouse at the lower rim of
the frame of the input mask.  This may be a text file, a log, or e.g., a python
script -- as long as it gets the file extension .txt, GitHub will permit it.
Especially if it is a larger file (e.g., a .sdf container-like file about many
molecular structures), or a collection of files, an often useful alternative
is a .zip archive.  Out of courtesy, include a brief descriptive readme (what
setup was used [OS, which version of Python, pubchempy and pyfingerprint
engaged, etc), too.


Use vitadb for psvita option

Someone raised me this option, I'll leave it registered here to remind me when I have time to do

With this implementation, this tool will be very usefull!!

Done!


Allow customizing pod hostname in pod yaml file

Allow customizing pod hostname in pod yaml file
Set hostname to pod name when creating pod with podman pod create

Fixes https://github.com/containers/libpod/issues/3732
Follow up PR of: https://github.com/containers/libpod/pull/3818
Signed-off-by: Chen Zhiwei<EMAIL_ADDRESS>

/assign @haircommander @mheon

LGTM
On Fri, Aug 16, 2019, 23:34 OpenShift CI Robot<EMAIL_ADDRESS>wrote:

[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: chenzhiwei
https://github.com/containers/libpod/pull/3836#
To complete the pull request process
https://git.k8s.io/community/contributors/guide/owners.md#the-code-review-process,
please assign mheon
You can assign the PR to them by writing /assign @mheon in a comment when
ready.
The full list of commands accepted by this bot can be found here
https://go.k8s.io/bot-commands?repo=containers%2Flibpod.
Needs approval from an approver in each of these files:

OWNERS https://github.com/containers/libpod/blob/master/OWNERS

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
https://github.com/containers/libpod/pull/3836?email_source=notifications&email_token=AB3AOCHZCMB6VXJIBA62WYTQE5WSRA5CNFSM4IMOBI6KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4QCNTI#issuecomment-522200781,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AB3AOCFABBB4KU7XIFMEV4LQE5WSRANCNFSM4IMOBI6A
.

/ok-to-test
Thanks @chenzhiwei for the PR.
Should we add an option to podman pod create --hostname foobar?
I have no idea on the question.  @haircommander @baude PTAL

@rhatdan good idea, will update this pr to add the --hostname.
Maybe need another PR to generate yaml with hostname.

Nice and clean PR. if possible i'd like a test added, and to drop host network for now, otherwise LGTM

Will update this PR to address all your comments.

If I add a container to a pod, should we block the ability to set the hostname in the container command IE
# podman create --pod foo --hostname bar
Error, pod has a hostname, and containers are not allowed to modify them...

I think uts=container should probably conflict with it already after what
@haircommander did for UTS namespaces
On Sun, Aug 18, 2019, 06:33 Daniel J Walsh<EMAIL_ADDRESS>wrote:

If I add a container to a pod, should we block the ability to set the
hostname in the container command IE
podman create --pod foo --hostname bar
Error, pod has a hostname, and containers are not allowed to modify them...
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/containers/libpod/pull/3836?email_source=notifications&email_token=AB3AOCCRULRS4HJWPZGOD43QFEQO5A5CNFSM4IMOBI6KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4Q5BOY#issuecomment-522309819,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AB3AOCA3YIIUB7XD4MPGMVDQFEQO5ANCNFSM4IMOBI6A
.

Can we simply make --pod and --hostname conflict? Which means we don't allow running these two flags together.
When adding a container to a pod, podman should not allow setting container hostname since all containers in a pod share the infra container hostname.

It is possible to cobfigure the pod to share different (or no) namespaces. We should not allow setting a hostname if the pod is set to share UTS

But for Kubernetes, seems there is no way to make the containers in a pod to use different hostnames.
https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.15/#podspec-v1-core

/approve
/lgtm
Lets handle the conflict in a different PR.  This one looks good.


Exploring Koka-like effects and terminology

I was reading about Koka's effect system:
fun sqr    : (int) -> total int       // total: mathematical total function
fun divide : (int,int) -> exn int     // exn: may raise an exception (partial)
fun turing : (tape) -> div int        // div: may not terminate (diverge)
fun print  : (string) -> console ()   // console: may write to the console
fun rand   : () -> ndet int           // ndet: non-deterministic

A function without any effect is called total and corresponds to mathematically total functions – a good place to be. Then we have effects for partial functions that can raise exceptions (exn), and potentially non-terminating functions as div (divergent). The combination of exn and  div is called pure as that corresponds to Haskell's notion of purity. On top of that we find mutability (as st) up to full non-deterministic side effects in io.

I think it could be interesting to provide such things and, even though we can't possibly cover the entirety of the Haskell language, provide ways to lift such functions to these Effects.
@arybczak @mmhat What do you think about this? Could we try and explore putting something like the Total, Divergent and Exception effects?

While this might make sense in Koka, in Haskell it doesn't, because anything can throw at any time. Also, any thread can receive asynchronous exception at any time.
Eff always has MonadThrow, MonadCatch and MonadMask available for that reason. You can think of it as an Exception effect that's always implicitly on.

Haha, I had forgotten about asynchronous exceptions! Thank you!

Similarly, in Haskell everything is Divergent and nothing is Total. So Haskell doesn't really fit this model 👻

I agree with @arybczak , but I think a Console effect might be a good thing to have. For example, when looking at the signatures of
foo1 :: Console :> es => Eff es ()
foo1 = Effectful.Console.putStrLn "Hello"

foo2 :: IOE :> es => Eff es ()
foo2 = liftIO $ putStrLn "Hello"

the first one is a bit more honest wrt. what it is actually doing. This effect might be something between a Logging and no output at all. Although it has a different purpose the Trace effect of polysemy might be similar.


Second note section's format is broken.

[Enter feedback here]
Second note section's format is broken.

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 2004e554-882e-932e-d55b-7b60b53bcc5b
Version Independent ID: 67dd746b-88a3-b114-68e2-622c18e95853
Content: Set up failover across multiple Azure CDN endpoints with Azure Traffic Manager
Content Source: articles/cdn/cdn-traffic-manager.md
Service: cdn
GitHub Login: @mdgattuso
Microsoft Alias: magattus

@3nyaww Thanks for your feedback! We will investigate and update as appropriate

@3nyaww This has been fixed!
We will now proceed to close this thread. If there are further questions regarding this matter, please tag me in your reply. We will gladly continue the discussion and we will reopen the issue.


Warning: Knockout groups not supported.

Attach (recommended) or Link to PDF file here:
Pdfpage-353221_1.pdf
Configuration:

Web browser and its version: Chrome ( 62.0.3202.94) Safari (11.0.2 )
Operating system and its version: macOS Sierra 10.12.6
PDF.js version: 1.8.254

Steps to reproduce the problem:

render pdf

What is the expected behavior? (add screenshot)

What went wrong? (add screenshot)

The pdf is only partly rendered and I get a warning ' Knockout groups not supported'

Closing as duplicate of e.g. issue #3136.


strange definition of CamelCase

Speller.isCamelCase() considers words like Waschmaschinen-Test to be camel case. If that's on purpose, it should be documented. For German, these are common words and I wouldn't consider them camel case.

Is this still valid?

The issue is still valid in 1.10 and I don't see any change in the source that addresses it in 2.0. But adding a sentence to the javadoc seems a good enough fix, like Note that German compounds with a dash (like "Waschmaschinen-Test") are also considered camel case by this method.

Can you provide a pull request for this, Daniel? I'll merge it in.

Closing, has been fixed (well, documented) long ago.


github: compliance: Disable KconfigHWMv2 check

Disable the KconfigHWMv2 check in the compliance workflow. This should work, but right now it seems broken in that it doesn't seem to recognize valid SoC Kconfig symbols in the zephyr-silabs soc directory.
This is (hopefully) just a temporary workaround, but it's better than having the compliance check fail and cause unnecessary noise for pull requests.

@jerome-pouiller btw, this having to disable some Kconfig compliance checks in a Zephyr module tree is not unique to us, e.g. Nordic is also doing it in their SDK tree: https://github.com/nrfconnect/sdk-nrf/blob/1f825c47121b3aae172fdbb612f0e466898945c9/.github/workflows/compliance.yml#L72
Of course the ideal situation is that the compliance script would be fixed to properly support module trees in all scenarios, but for now excluding specific checks seems to have become somewhat of an established practice.


Create sessionKey from each incoming HttpHeader in ApiListener

Describe the issue
Is it possible to store every incoming HttpHeader in an ApiListener as a separate sessionKey so they can be used in the adapter?
Reporter
Dirk-Jan

Info in available in the message context. It would be nice to have this info visible in the Ladybug

Example of retrieving context data:
<Param name="Charset" sessionKey="originalMessage" contextKey="Metadata.Charset" />
standard contextKeys that are often present:

Metadata.Charset
Metadata.Size
Metadata.ModificationTime
Metadata.Name
Metadata.Location
Metadata.MimeType

See also https://github.com/wearefrank/ladybug-frontend/issues/458

Wordt Ladybug user story 1083.


":verbose set opt?" should display a note when the value is different from where it was recorded to be changed

:verb set diff? might display:

diff
Last set from …/t.vim line 6

Although that line is: autocmd BufWinLeave * set nodiff
I.e. the line clearly has set it to nodiff, but :verb set reports it as diff.
This is due to it being changed internally (likely a bug), but it would be good if :verb set would display a warning/note in that case.
For this it might be required that the value is stored in set_option_sctx_idx and compared when being displayed with :verb set.

Daniel Hahler wrote:

:verb set diff? might display:

diff
Last set from …/t.vim line 6

Although that line is: autocmd BufWinLeave * set nodiff
I.e. the line clearly has set it to nodiff, but :verb set reports
it as diff.
This is due to it being changed internally (likely a bug), but it
would be good if :verb set would display a warning/note in that
case.
For this it might be required that the value is stored in
set_option_sctx_idx and compared when being displayed with :verb set.

So the last change that is reported was followed by another change,
which didn't update or reset the context.    What was that change then,
how can it be reproduced?

It happens when using set nodiff in a BufWinLeave autocommand, and then going back to the previous buffer in the same window (c-o).
It might be intentional though - IIRC it seems like some window-local options are copied from buffers when those are displayed in the window again.
Likely via https://github.com/vim/vim/blob/b1ba9abcb385b0a5355788a7eefef78ec68d2f65/src/buffer.c#L2967-L2972.
But even if this would be fixed to update the location (which is not really easy I think), there are still other places in the source that set options directly, and therefore it would make sense to display a note then - otherwise it is confusing (especially when setting is based on some condition etc, and it therefore is not obvious that the value has changed in some other way).


Packages missing compared to when running Pipenv outside of container

What happened?
The example repository at https://github.com/themodernlife/buildpack-issue runs fine when run using Homebrew installed toolchain on my Mac, but the docker container built using pack fails to run due to missing imports.

What were you attempting to do?

Here's the main Procfile
web: python -c 'from dateutil import tz'

And the Pipfile
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]
pandas = ">=0.25"

[dev-packages]

[requires]
python_version = "3.9"

Installing from a new pipenv (installed via Homebrew) from scratch and inspecting the dependencies
pipenv  --python 3.9.7
pipenv install 'pandas>=0.25'
pipenv run python -c 'from dateutil import tz'

Everything succeeds.  Reverse dependency tree is
numpy==1.22.0
  - pandas==1.3.5 [requires: numpy>=1.17.3]
pip==21.3.1
pytz==2021.3
  - pandas==1.3.5 [requires: pytz>=2017.3]
setuptools==60.2.0
six==1.16.0
  - python-dateutil==2.8.2 [requires: six>=1.5]
    - pandas==1.3.5 [requires: python-dateutil>=2.7.3]
wheel==0.37.1

But building with pack build buildpack-issue --buildpack gcr.io/paketo-buildpacks/python --builder
paketobuildpacks/builder:base

base: Pulling from paketobuildpacks/builder
Digest: sha256:870c31cc75ff074deaa32da58a8de150c9ba2cbef8a750dd8f0c6b1fd4aa7aaf
Status: Image is up to date for paketobuildpacks/builder:base
base-cnb: Pulling from paketobuildpacks/run
Digest: sha256:59aa1da9db6d979e21721e306b9ce99a7c4e3d1663c4c20f74f9b3876cce5192
Status: Image is up to date for paketobuildpacks/run:base-cnb
latest: Pulling from paketo-buildpacks/python
Digest: sha256:1805b6ff5f2b4ef38b40f132a16f571817d75f448c6a25ec0696bf3c9df230aa
Status: Image is up to date for gcr.io/paketo-buildpacks/python:latest
===> DETECTING
7 of 10 buildpacks participating
paketo-buildpacks/ca-certificates 2.4.2
paketo-buildpacks/cpython         0.7.3
paketo-buildpacks/pip             0.7.0
paketo-buildpacks/pipenv          0.2.1
paketo-buildpacks/pipenv-install  0.2.3
paketo-buildpacks/python-start    0.7.0
paketo-buildpacks/procfile        4.4.1
===> ANALYZING
Restoring metadata for "paketo-buildpacks/ca-certificates:helper" from app image
Restoring metadata for "paketo-buildpacks/cpython:cpython" from app image
Restoring metadata for "paketo-buildpacks/pip:pip" from cache
Restoring metadata for "paketo-buildpacks/pipenv:pipenv" from cache
Restoring metadata for "paketo-buildpacks/pipenv-install:packages" from app image
Restoring metadata for "paketo-buildpacks/pipenv-install:cache" from cache
===> RESTORING
Restoring data for "paketo-buildpacks/cpython:cpython" from cache
Restoring data for "paketo-buildpacks/pip:pip" from cache
Restoring data for "paketo-buildpacks/pipenv:pipenv" from cache
Restoring data for "paketo-buildpacks/pipenv-install:cache" from cache
Restoring data for "paketo-buildpacks/pipenv-install:packages" from cache
===> BUILDING

Paketo CA Certificates Buildpack 2.4.2
  https://github.com/paketo-buildpacks/ca-certificates
  Launch Helper: Reusing cached layer
Paketo CPython Buildpack 0.7.3
  Resolving CPython version
    Candidate version sources (in priority order):
      Pipfile.lock -> "3.9"
                   -> ""
      <unknown>    -> ""

    Selected CPython version (using Pipfile.lock): 3.9.7

  Reusing cached layer /layers/paketo-buildpacks_cpython/cpython

Paketo Pip Buildpack 0.7.0
  Resolving Pip version
    Candidate version sources (in priority order):
       -> ""

    Selected Pip version (using ): 21.3.1

  Reusing cached layer /layers/paketo-buildpacks_pip/pip
Paketo Pipenv Buildpack 0.2.1
  Resolving Pipenv version
    Candidate version sources (in priority order):
       -> ""

    Selected Pipenv version (using ): 2021.5.29

  Reusing cached layer /layers/paketo-buildpacks_pipenv/pipenv
Paketo Pipenv Install Buildpack 0.2.3
  Executing build process
    Running 'pipenv install --deploy'
    Running 'pipenv clean'
  Configuring environment
    PATH           -> "/layers/paketo-buildpacks_pipenv-install/packages/workspace-dqq3IVyd/bin:$PATH"
    PYTHONUSERBASE -> "/layers/paketo-buildpacks_pipenv-install/packages/workspace-dqq3IVyd"

      Completed in 6.033s

Paketo Python Start Buildpack 0.7.0
  Assigning launch process
    web: python

Paketo Procfile Buildpack 4.4.1
  https://github.com/paketo-buildpacks/procfile
  Process types:
    web: python -c 'from dateutil import tz'
===> EXPORTING
Reusing layer 'paketo-buildpacks/ca-certificates:helper'
Adding layer 'paketo-buildpacks/cpython:cpython'
Reusing layer 'paketo-buildpacks/pipenv-install:packages'
Reusing 1/1 app layer(s)
Reusing layer 'launcher'
Reusing layer 'config'
Reusing layer 'process-types'
Adding label 'io.buildpacks.lifecycle.metadata'
Adding label 'io.buildpacks.build.metadata'
Adding label 'io.buildpacks.project.metadata'
Setting default process type 'web'
Saving buildpack-issue...
*** Images (c8ace4a0c91e):
      buildpack-issue
Adding cache layer 'paketo-buildpacks/cpython:cpython'
Adding cache layer 'paketo-buildpacks/pip:pip'
Adding cache layer 'paketo-buildpacks/pipenv:pipenv'
Adding cache layer 'paketo-buildpacks/pipenv-install:cache'
Reusing cache layer 'paketo-buildpacks/pipenv-install:packages'
Successfully built image buildpack-issue

Running via docker run -it buildpack-issue fails
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/layers/paketo-buildpacks_pipenv-install/packages/workspace-dqq3IVyd/lib/python3.9/site-packages/dateutil/tz/__init__.py", line 2, in <module>
    from .tz import *
  File "/layers/paketo-buildpacks_pipenv-install/packages/workspace-dqq3IVyd/lib/python3.9/site-packages/dateutil/tz/tz.py", line 19, in <module>
    import six
ModuleNotFoundError: No module named 'six'

On my Mac, in the virtualenv, I have six.py
➜  buildpack-issue ls -alh /Users/ihummel/.local/share/virtualenvs/buildpack-issue-yEnhB5G3/lib/python3.9/site-packages
total 104
drwxr-xr-x  27 ihummel  staff   864B Jan 14 08:55 .
drwxr-xr-x   3 ihummel  staff    96B Jan 14 08:54 ..
drwxr-xr-x   3 ihummel  staff    96B Jan 14 08:54 __pycache__
drwxr-xr-x   4 ihummel  staff   128B Jan 14 08:54 _distutils_hack
-rw-r--r--   1 ihummel  staff    18B Jan 14 08:54 _virtualenv.pth
-rw-r--r--   1 ihummel  staff   5.5K Jan 14 08:54 _virtualenv.py
drwxr-xr-x  14 ihummel  staff   448B Jan 14 08:54 dateutil
-rw-r--r--   1 ihummel  staff   152B Jan 14 08:54 distutils-precedence.pth
drwxr-xr-x  39 ihummel  staff   1.2K Jan 14 08:55 numpy
drwxr-xr-x  10 ihummel  staff   320B Jan 14 08:55 numpy-1.22.0.dist-info
drwxr-xr-x  21 ihummel  staff   672B Jan 14 08:55 pandas
drwxr-xr-x  10 ihummel  staff   320B Jan 14 08:55 pandas-1.3.5.dist-info
drwxr-xr-x   7 ihummel  staff   224B Jan 14 08:54 pip
drwxr-xr-x   9 ihummel  staff   288B Jan 14 08:54 pip-21.3.1.dist-info
-rw-r--r--   1 ihummel  staff     0B Jan 14 08:54 pip-21.3.1.virtualenv
drwxr-xr-x   6 ihummel  staff   192B Jan 14 08:54 pkg_resources
drwxr-xr-x   9 ihummel  staff   288B Jan 14 08:54 python_dateutil-2.8.2.dist-info
drwxr-xr-x  10 ihummel  staff   320B Jan 14 08:54 pytz
drwxr-xr-x   9 ihummel  staff   288B Jan 14 08:54 pytz-2021.3.dist-info
drwxr-xr-x  40 ihummel  staff   1.3K Jan 14 08:54 setuptools
drwxr-xr-x   9 ihummel  staff   288B Jan 14 08:54 setuptools-59.6.0.dist-info
-rw-r--r--   1 ihummel  staff     0B Jan 14 08:54 setuptools-59.6.0.virtualenv
drwxr-xr-x   8 ihummel  staff   256B Jan 14 08:54 six-1.16.0.dist-info
-rw-r--r--   1 ihummel  staff    34K Jan 14 08:54 six.py
drwxr-xr-x  12 ihummel  staff   384B Jan 14 08:54 wheel
drwxr-xr-x   9 ihummel  staff   288B Jan 14 08:54 wheel-0.37.0.dist-info
-rw-r--r--   1 ihummel  staff     0B Jan 14 08:54 wheel-0.37.0.virtualenv

six.py module is not installed into the container
cnb@097fd68eee1c:/workspace$ ls -alh /layers/paketo-buildpacks_pipenv-install/packages/workspace-dqq3IVyd/lib/python3.9/site-packages/
total 92K
drwxr-xr-x 19 cnb cnb 4.0K Jan  1  1980 .
drwxr-xr-x  3 cnb cnb 4.0K Jan  1  1980 ..
drwxr-xr-x  2 cnb cnb 4.0K Jan  1  1980 _distutils_hack
-rw-r--r--  1 cnb cnb   18 Jan  1  1980 _virtualenv.pth
-rw-r--r--  1 cnb cnb 5.6K Jan  1  1980 _virtualenv.py
drwxr-xr-x  6 cnb cnb 4.0K Jan  1  1980 dateutil
-rw-r--r--  1 cnb cnb  151 Jan  1  1980 distutils-precedence.pth
drwxr-xr-x 19 cnb cnb 4.0K Jan  1  1980 numpy
drwxr-xr-x  2 cnb cnb 4.0K Jan  1  1980 numpy-1.22.0.dist-info
drwxr-xr-x  2 cnb cnb 4.0K Jan  1  1980 numpy.libs
drwxr-xr-x 16 cnb cnb 4.0K Jan  1  1980 pandas
drwxr-xr-x  2 cnb cnb 4.0K Jan  1  1980 pandas-1.3.5.dist-info
drwxr-xr-x  4 cnb cnb 4.0K Jan  1  1980 pip
drwxr-xr-x  2 cnb cnb 4.0K Jan  1  1980 pip-21.3.1.dist-info
-rw-r--r--  1 cnb cnb    0 Jan  1  1980 pip-21.3.1.virtualenv
drwxr-xr-x  5 cnb cnb 4.0K Jan  1  1980 pkg_resources
drwxr-xr-x  2 cnb cnb 4.0K Jan  1  1980 python_dateutil-2.8.2.dist-info
drwxr-xr-x  4 cnb cnb 4.0K Jan  1  1980 pytz
drwxr-xr-x  2 cnb cnb 4.0K Jan  1  1980 pytz-2021.3.dist-info
drwxr-xr-x  6 cnb cnb 4.0K Jan  1  1980 setuptools
drwxr-xr-x  2 cnb cnb 4.0K Jan  1  1980 setuptools-60.2.0.dist-info
-rw-r--r--  1 cnb cnb    0 Jan  1  1980 setuptools-60.2.0.virtualenv
drwxr-xr-x  4 cnb cnb 4.0K Jan  1  1980 wheel
drwxr-xr-x  2 cnb cnb 4.0K Jan  1  1980 wheel-0.37.1.dist-info
-rw-r--r--  1 cnb cnb    0 Jan  1  1980 wheel-0.37.1.virtualenv

What did you expect to happen?

The environments should be the same and the container should run.

What was the actual behavior? Please provide log output, if possible.

Container didn't run
Build Configuration

What platform (pack, kpack, tekton buildpacks plugin, etc.) are you
using? Please include a version.

➜  buildpack-issue git:(main) pack --version
0.23.0+git-0db2c77.build-3056

Installed via Homebrew on macOS 11.6.2

What buildpacks are you using? Please include versions.

see above

What builder are you using? If custom, can you provide the output from pack inspect-builder <builder>?

Using paketobuildpacks/builder:base

Can you provide a sample app or relevant configuration (buildpack.yml,
nginx.conf, etc.)?

see above
Checklist

[ x] I have included log output.
[ x] The log output includes an error message.
[ x] I have included steps for reproduction.

Will close and reopen under https://github.com/paketo-buildpacks/pipenv-install.  Sorry for the noise!


edit css

更改分页样式
提取mixin

Codecov Report

Merging #64 into master will not change coverage.
The diff coverage is 100%.

@@           Coverage Diff           @@
##           master      #64   +/-   ##
=======================================
  Coverage   38.23%   38.23%
=======================================
  Files          22       22
  Lines        1334     1334
=======================================
  Hits          510      510
  Misses        824      824

Impacted Files
Coverage Δ

src/js/Core.js
66.97% <100%> (ø)
:arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a011f8f...ceb50a9. Read the comment docs.


While loop statements & invariant

Dear @davidgiven, thank you for developing that language, that's very enjoyable and interesting!
Reading some code in, e.g. strings.coh, I noticed that you often use "loop+break" idioms, and rarely rely on "while loop invariants", for example:
sub StrLen(s: [uint8]): (size: intptr) is
       var p := s;
       loop
                var c := [p];
                if c == 0 then
                        break;
                end if;
                p := p + 1;
        end loop;
        size := p - s;
        end loop;
end sub;

could also be written as:
sub StrLen(s: [uint8]): (size: intptr) is
	var p := s;
        # invariant: forall x in [s..p[: [x] != 0
	while [p] != 0 loop
                # here we know that [s..p[ != 0 (invariant) and [p] != 0 (loop condition)
                # so it's safe to increase p and consider [s..p[ != 0 (invariant is restored)
		p := @next p;
	end loop;
	size := p - s;
end sub;

Maybe the underlying assembly is easier to generate with breaks?
Another thought is that some loop condition can be really terrible as with StrICmp (not sure about syntax errors, I'm just starting to learn the language):
sub StrICmp(s1: [uint8], s2: [uint8]): (res: int8) is
	while ((ToLower([s1]) - ToLower([s2])) == 0) and ([s1] != 0) loop
		s1 := @next s1;
		s2 := @next s2;
	end loop;
        # if [s1] = 0 we reached the end of the strings (second condition),
        # otherwise the strings are different (first condition)
	res := [s1] as int8;
end sub;

EDIT: the last res value is wrong here as s1 can be shorter than s2. Therefore another computation is needed and this is avoided with the "break template". Maybe that's a fair enough reason to keep breaks :)

When I read deeper into the code with this invariant loop construction in mind, I found some places where a do/while loop would be better than a classical while loop. Would it be a possible way, for me, to propose a PR that add such loop syntax or is there simply no need to go any further?

Thank you for the kind words!
Re strlen: probably that code was copied from another loop which actually used c. You're right, that could trivially be replaced with a while loop, and it'd be shorter code too, as c wouldn't get stored and the if..end if would be removed (there's no trivial basic block elision). I generally use mid-loop breaks whenever the logic gets even slightly complicated do improve readability.
There's no real reason why do..while isn't implemented other than laziness. Ada, which the Cowgol syntax is loosely based on, doesn't have this, and I'd have to think of a meaningful syntax; while can't be used to terminate a loop because the compiler couldn't distinguish this from starting a new loop. loop..until, maybe? I am, in fact, working (slowly) on a replacement parser which should be smaller and faster and allow this kind of thing to be easily added.

Thank you for the insight for the future of the language!
I understand that do..while can be an issue for the parser, and loop..until is a good replacement candidate :+1:
I'm only worried about the inversion of the nature of the loop condition (while wants a condition for continuing the loop, whereas until wants a condition for stopping the loop). But anyway, it will be easier to translate some loop .. if C then break; ... loops as the nature of C is the same in an loop .. until C; loop :)

Oh, yeah, I forgot to mention: I do also want to add break if ... (as the equivalent of Ada's exit when), which should make mid-loop exits both faster and much more convenient.

Speaking of naming, Pascal has repeat .. until :)


Dockerize app

Description
Explain a little about the changes at a high level.
Reviewer Notes
Is there anything you would like reviewers to give additional scrutiny?
Setup
Add any steps or code to run in this section to help others prepare to run your code:
echo "Code goes here"

Code Review Verification Steps

[ ] Request review from a member of a different team.
[ ] Have the Jira acceptance criteria been met for this change?

References

Jira story for this change.
This article explains more about the approach used.

Connection currently works but apparently this env var affects the JSON response: https://github.com/transcom/milmove_load_testing#load-testing-against-aws-experimental-environment


SupConLoss on non-image data (no augmentation)

Hi
Thanks for your great paper and code!
I wonder is this loss effective on non-image data?
I mean I can't produce augmented version of my data, but positive and negative pairs on each batch.

Hi, I have the same interest in applying this model to non-image data. Did you make any experiments?


[python-package] Objective parameter with custom loss

The documents say that the default objective  is regression. If I'm doing classification with a custom loss, do I need to change the objective to binary, or is it superseded? E.g. in
params['objective'] = 'binary'

model = lgbm.train(params,
                   dataset,
                   fobj=my_custom_objective_function)

do I need the params['objective'] = 'binary' part? Thanks!

Thanks for using LightGBM!
In the Python package, if you're using a custom objective function for binary classification, it's not necessary to pass "objective": "binary" through params.
Consider this minimal example:
import lightgbm as lgb
import numpy as np
from sklearn.datasets import load_breast_cancer

def logloss_obj(preds, train_data):
    y_true = train_data.get_label()
    y_pred = 1.0 / (1.0 + np.exp(-preds))
    grad = y_pred - y_true
    hess = y_pred * (1.0 - y_pred)
    return grad, hess

X, y = load_breast_cancer(return_X_y=True)
dtrain = lgb.Dataset(X, y)

bst = lgb.train(
    params={"objective": logloss_obj},
    train_set=dtrain
)

preds_raw = bst.predict(X, raw_score=True)
pred_class = (1.0 / (1.0 + np.exp(-preds_raw))) > 0.5
print(f"accuracy: {accuracy_score(y, pred_class.astype('int'))}")
# accuracy: 0.9613

This is because when the objective you pass into lightgbm.train() is callable, the parameter objective passed through to LightGBM's C++ code is set to the special value "none".
https://github.com/microsoft/LightGBM/blob/f0cfbff63f8a228784e52e033533e5cb3fa1b97b/python-package/lightgbm/engine.py#L137-L139

In the future, when you ask a question here please provide the information we've asked for, such as:

how you are using LightGBM (looks like the Python package but please say that explicitly)
version of LightGBM you are using
how you installed LightGBM

Understood, thanks a lot @jameslamb ! Yes it's a Python package, my bad, I will be sure to include the information in the future.


GPU errors during multiple Optuna trials

I keep getting XGB GPU errors after a few Optuna trials. I tried my code in Windows, Ubuntu, and on Paperspace Gradient, with various GPUs, and same results.
So I tried a public notebook on Kaggle that apparently worked in the past (and unrelated to my data), and it appears to trigger the same errors after a few trials:
https://www.kaggle.com/code/tunguz/tps-mar-2021-xgb-gpu-le-optuna

Could you please share the version of xgboost and optuna?

also, could you please share the error trace? I'm running the notebook right now, but haven't seen the error yet.

Ah, could you please limit the max_depth to 29?  With 1.6.2, this can be 30. Fixed in https://github.com/dmlc/xgboost/pull/8098 .


feat: cids support

Closes #648
The Feed CID is not returned for the Bee.createFeedManifest() as that would be breaking change. It is planned for the next breaking release.

Release v4.1.0 addresses this.


MINIFI-161: Provide command and arguments as attributes in ExecuteProcess

reviewing

changes look good.  will merge


Instances of nn.AdaptiveAvgPool2d are always decomposed into primitive floating-point operations

Description of the bug:
When converting CNN architectures, any instance of nn.AdaptiveAvgPool2d is decomposed into a sum and mul floating-point operator. Since these are common in CNNs, this leads to frequent dequantization/quantization steps inserted into the output graph which degrades performance on backends that rely on full quantization. At least for static dimensions, converting these to AvgPool2d operators should be trivial.
Minimal working example:
import torch
import ai_edge_torch
from torch.export import export_for_training
from ai_edge_torch.quantize.pt2e_quantizer import (
    PT2EQuantizer,
    get_symmetric_quantization_config,
)
from torch.ao.quantization.quantize_pt2e import convert_pt2e, prepare_pt2e
from ai_edge_torch.quantize.quant_config import QuantConfig

def aiet_export(model: torch.nn.Module, fname: str):
    sample_input = torch.rand((1, 8, 8, 3))
    model = ai_edge_torch.to_channel_last_io(model, args=[0], outputs=[0]).eval()
    model(sample_input)
    model = export_for_training(model, (sample_input,)).module()
    aiet_quantizer = PT2EQuantizer().set_global(
        get_symmetric_quantization_config(is_per_channel=False, is_dynamic=False)
    )
    model = prepare_pt2e(model, aiet_quantizer)
    with torch.no_grad():
        model(sample_input)
    model = convert_pt2e(model, fold_quantize=False)
    torch.ao.quantization.move_exported_model_to_eval(model)
    aiet_tc = ai_edge_torch.convert(
        model, (sample_input,), quant_config=QuantConfig(pt2e_quantizer=aiet_quantizer)
    )
    aiet_tc.export(fname)

class TinyPool1(EvalModule):
    def __init__(self):
        super().__init__()
        self.conv = torch.nn.Conv2d(3, 8, 3)
        self.pool = torch.nn.AdaptiveAvgPool2d((1, 1))

    def forward(self, x: torch.Tensor) -> torch.Tensor:
        y = self.conv(x)
        y = self.pool(y)
        return y

class TinyPool2(EvalModule):
    def __init__(self):
        super().__init__()
        self.conv = torch.nn.Conv2d(3, 8, 3)
        self.pool = torch.nn.AvgPool2d((6, 6))

    def forward(self, x: torch.Tensor) -> torch.Tensor:
        y = self.conv(x)
        y = self.pool(y)
        return y

tp1 = TinyPool1()
aiet_export(tp1, "tinypool1.tflite")

tp2 = TinyPool2()
aiet_export(tp2, "tinypool2.tflite")

Actual vs expected behavior:
Expected:
Fully-quantized graph for both operators
Actual
Suboptimal graph with Dequantize/Quantize nodes and float-operations inserted for TinyPool1

Fully-quantized graph for TinyPool2

Any other information you'd like to share?
A not very pretty workaround is to trace the input/output dimensions of nn.AdaptiveAvgPool2d using hooks before execution and replacing them with functionally equivalent nn.AvgPool2d instances before converting.
I wonder whether there is a cleaner way of doing this as part of the conversion, though.
The decomposition of the aten.avgpool2d node happens during the first canonicalization pass:
https://github.com/google-ai-edge/ai-edge-torch/blob/d4e358e15174c23b33026bd13659523f91d7a1e0/ai_edge_torch/fx_pass_base.py#L107-L109
Environment
AI Edge Torch: 0.3.0 (current head of main)
Python: 3.10.5
PyTorch: 2.5.0
TF: 2.19.0-dev20241127
OS: Ubuntu 24.04.1 LTS in WSL2

This is probably similar to #53

I tried tfl full int8 quantization to see if it would work better... it doesn't have the DQ/Q nodes but it still decomposes which I think will have the same issue you are seeing:
import tensorflow as tf
import torch
import ai_edge_torch
import numpy as np
from torch.export import export_for_training
from ai_edge_torch.quantize.pt2e_quantizer import (
    PT2EQuantizer,
    get_symmetric_quantization_config,
)
from torch.ao.quantization.quantize_pt2e import convert_pt2e, prepare_pt2e
from ai_edge_torch.quantize.quant_config import QuantConfig

def aiet_export(model: torch.nn.Module, fname: str):
    sample_input = torch.rand((1, 8, 8, 3))
    model = ai_edge_torch.to_channel_last_io(model, args=[0], outputs=[0]).eval()
    model(sample_input)
    model = export_for_training(model, (sample_input,)).module()
    aiet_quantizer = PT2EQuantizer().set_global(
        get_symmetric_quantization_config(is_per_channel=False, is_dynamic=False)
    )
    model = prepare_pt2e(model, aiet_quantizer)
    with torch.no_grad():
        model(sample_input)
    model = convert_pt2e(model, fold_quantize=False)
    torch.ao.quantization.move_exported_model_to_eval(model)
    aiet_tc = ai_edge_torch.convert(
        model, (sample_input,), quant_config=QuantConfig(pt2e_quantizer=aiet_quantizer)
    )
    aiet_tc.export(fname)

class TinyPool1(torch.nn.Module):
    def __init__(self):
        super().__init__()
        self.conv = torch.nn.Conv2d(3, 8, 3)
        self.pool = torch.nn.AdaptiveAvgPool2d((1, 1))

    def forward(self, x: torch.Tensor) -> torch.Tensor:
        y = self.conv(x)
        y = self.pool(y)
        return y

class TinyPool2(torch.nn.Module):
    def __init__(self):
        super().__init__()
        self.conv = torch.nn.Conv2d(3, 8, 3)
        self.pool = torch.nn.AvgPool2d((6, 6))

    def forward(self, x: torch.Tensor) -> torch.Tensor:
        y = self.conv(x)
        y = self.pool(y)
        return y

tp1 = TinyPool1()
aiet_export(tp1.eval(), "tinypool1.tflite")

tp2 = TinyPool2()
aiet_export(tp2.eval(), "tinypool2.tflite")

def representative_dataset():
    for _ in range(100):
        data = np.random.rand(1, 3, 32, 32)
        yield [data.astype(np.float32)]

sample_args = (torch.randn(1, 3, 32, 32),)

tfl_converter_flags = {
    'optimizations': [tf.lite.Optimize.DEFAULT],
    'representative_dataset': representative_dataset,
    'target_spec.supported_ops': [tf.lite.OpsSet.TFLITE_BUILTINS_INT8],
    'inference_input_type': tf.int8,
    'inference_output_type': tf.int8,
}

tfl_quant_model = ai_edge_torch.convert(
    tp1, sample_args, _ai_edge_converter_flags=tfl_converter_flags
)

tfl_quant_model.export("tinypool1_tflq.tflite")

Yes, the operations are already decomposed early on in the call to run_decompositions(), before they hit the TFlite conversion.
I will try to remove the average pooling from the decompositions table passed to PyTorch and see what happens.


Emotion recognition from speach

Hello, Thanks for the great work.
I want to know the pipeline.
Since it is not clear to me how to start the task for the new dataset?
What should I change in the data preparation code to use the models upstream and run the downstream task for a custom Arabic dataset?
I am a bit confused; I saw the two issues and am unsure which one will work correctly for the rest of the pipeline?
is this https://github.com/s3prl/s3prl/issues/28
or this https://github.com/s3prl/s3prl/issues/317

Hi,
Sorry that the current S3PRL codebase entangles the actual corpus together with the task, which is really a bad design... Hence, it is not naturally supported to run the same task with new data. We are trying to fix this by adding new task modules internally.  You would need to modify the dataset code to enable a new dataset.


Events are not sent

Here's some sample code
contract FundingHub {
    function createProject(address owner, uint goalAmount, uint deadline) {
        Debug();
    }
}

it.only('should create a project', function () {
        var fh = FundingHub.deployed();
        return fh.createProject(accounts[0], 100000, Math.floor(Date.now() / 1000))
            .then(function (tx) {
                console.log('[TEST][FundingHub]  createProject tx: ', tx);
                fh.Debug({}, {fromBlock: 0}).get(function (err, e) {
                    if (err) {
                        console.error(err);
                        return;
                    }
                    console.log(e);
                });
                return web3.eth.getTransactionReceiptMined(tx);
            })
            .then(function (txReceipt) {
                console.log(txReceipt);
            });
    });

Expected Behavior
log this
[TEST][FundingHub]  createProject tx:  0x794faeaaf785ca9bd3959f19828d7508d85ed53798a6a92cdfcc28542410d395
{ transactionHash: '0x794faeaaf785ca9bd3959f19828d7508d85ed53798a6a92cdfcc28542410d395',
  transactionIndex: 0,
  blockHash: '0xe9dd0b50b900469414a164e3232c9f52dafe0eaea90a0441733270c1b53d5d03',
  blockNumber: 6,
  cumulativeGasUsed: 23384,
  gasUsed: 23384,
  contractAddress: null,
  logs: [] }
[ { logIndex: 0,
    transactionIndex: 0,
    transactionHash: '0x95ec53e2fd87953f75d9d1fc3b2a2af1e8eda8e62edddb83a1c643197b239b87',
    blockHash: '0x7d96514bddee31236d8d5da41a3706cb43bd41f80bea813b0598ab2f6cae1def',
    blockNumber: 4,
    address: '0x94c1fe3974b772914e3267c3754b2f50335e39c0',
    type: 'mined',
    event: 'Debug',
    args: {} } ]

Current Behavior
Logs the following
[TEST][FundingHub]  createProject tx:  0x31305fc34778cbb575be20c5a9935bff804196e092e112c79da5c2d713d42dc6
{ transactionHash: '0x31305fc34778cbb575be20c5a9935bff804196e092e112c79da5c2d713d42dc6',
  transactionIndex: 0,
  blockHash: '0xfff02f901a56932a3054304577452639500c2265a13b02315668706347442eea',
  blockNumber: 40,
  gasUsed: 23384,
  cumulativeGasUsed: 23384,
  contractAddress: null,
  logs: [] }
[]

Your Environment

Version used<EMAIL_ADDRESS>and Truffle v2.0.7
Environment name and version :testrpc Linux version 4.4.0-24-generic (buildd@lgw01-12) (gcc version 5.3.1 20160413 (Ubuntu 5.3.1-14ubuntu2.1) )
truffle Windows 10

Check out this block of code here:
.then(function (tx) {
  console.log('[TEST][FundingHub]  createProject tx: ', tx);
  fh.Debug({}, {fromBlock: 0}).get(function (err, e) {
    if (err) {
      console.error(err);
      return;
    }
    console.log(e);
  });
  return web3.eth.getTransactionReceiptMined(tx);
})

fh.Debug(...).get() is asynchronous. That means, potentially, that return web3.eth.getTransactionReceiptMined(tx); and the rest of your test could finish before your events are returned. In which case you may not get the output you expect.
The following events within these tests do get triggered, and .get() does return the correct value: https://github.com/ethereumjs/testrpc/blob/master/test/events.js I'd recommend you restructure your test first to remove it's dual control flows before concluding events are not functioning properly.
That said, events in Web3 are a pain in the butt, and most bug reports involving events are a result of a misuse of the (in my opinion) hard to use API. As far as I can tell the way you've structure your events should work -- 👍  for using them correctly -- so I'd put my money on your test's control flow.
I'm going to close this ticket for now. Reopen with edited code if you're still running into an error. Also consider ethereumjs's or Truffle's gitter (Truffle users deal with this on a daily basis):
http://gitter.im/ethereum/ethereumjs-lib
http://gitter.im/consensys/truffle
Cheers!

This code works without issue in 2.0.7. I'll reinstall the latest and provide a snippet of the full test that doesn't execute.

For the posterity here's the full sample that doesn't work. I definitely agree the event api is clunky feeling. I'm reviewing the links provided of working events tests.
contract FundingHub {
    event NewProject(address project);

    mapping(address => uint) public projectsMap;
    address[] public projects;

    function createProject(address owner, uint goalAmount, uint deadline) {
        address p = address(new Project(owner, goalAmount, deadline));
        projectsMap[p] = projects.length;
        projects.push(p);
        NewProject(p);
    }
}

 it.only('should create a project', function (done) {
        var fh = FundingHub.deployed();
        var allEvents = fh.allEvents();
        allEvents.watch(function (err, e) {
            allEvents.stopWatching();
            if (err) {
                console.error('[TEST][FundingHub]  NewProject  ', JSON.stringify(err));
                done(err);
                return;
            }
            console.log('[TEST][FundingHub]  NewProject event: ', JSON.stringify(e));
            var p = Project.at(e.args.project);
            done();
        });

        return fh.createProject(accounts[0], 100000, Math.floor(Date.now() / 1000))
            .then(function (tx) {
                console.log('[TEST][FundingHub]  createProject tx: ', tx);
                return web3.eth.getTransactionReceiptMined(tx);
            })
            .then(function (txReceipt) {
                console.log(txReceipt);
                return fh.getProject.call(0);
            })
            .then(function (address) {
                console.log('[TEST][FundingHub]  project index 0: ', address);
                //assert fails though the same code path works in the migration
                //assert.equal(true, address != '0x');
            });
    });

outputs and hangs (done is never called)
[TEST][FundingHub]  createProject tx:  0xd7df3617677572653970e8a7322ae9340671a6ec5c0b722f1e5fa540e01277a4
{ transactionHash: '0xd7df3617677572653970e8a7322ae9340671a6ec5c0b722f1e5fa540e01277a4',
  transactionIndex: 0,
  blockHash: '0x778e17a220b46f3df326c7b346271c93d9854304e527a89be1b2ccf762fd68fa',
  blockNumber: 34,
  cumulativeGasUsed: 23384,
  gasUsed: 23384,
  contractAddress: null,
  logs: [] }
[TEST][FundingHub]  project index 0:  0x

You still have two control flows here. The .thens() will execute at a different time then the watch's callback, which may or may not be before done() gets called.  I'm not sure how mocha handles that.
Your test should instead be something like this so it has only one flow of execution:
it.only('should create a project', function (done) {
        var fh = FundingHub.deployed();
        var tx;

        var allEvents = fh.allEvents();
        allEvents.watch(function (err, e) {
            allEvents.stopWatching();

            if (err) {
                console.error('[TEST][FundingHub]  NewProject  ', JSON.stringify(err));
                return done(err);
            }

            console.log('[TEST][FundingHub]  createProject tx: ', tx);

            console.log('[TEST][FundingHub]  NewProject event: ', JSON.stringify(e));
            var p = Project.at(e.args.project);

            // This next line returns a promise? Where does this function come from?
            web3.eth.getTransactionReceiptMined(tx)
            .then(function (txReceipt) {
                console.log(txReceipt);
                return fh.getProject.call(0);
            })
            .then(function (address) {
                console.log('[TEST][FundingHub]  project index 0: ', address);
                //assert fails though the same code path works in the migration
                //assert.equal(true, address != '0x');
            }).then(done).callback(done);
        });

        // This triggers the event, which fires the callback above.
        fh.createProject(accounts[0], 100000, Math.floor(Date.now() / 1000)).then(function(tx_hash) {
          // This block *shouldn't* be a race condition since it's synchronous. Let's hope not.
          tx = tx_hash;
        });
    });

Note here that there's only one flow: fh.createProject() executes, tx gets saved, then event triggers, then further processing happens in nested promise chain, then done callback is called. As the comments mentioned, there might be a race condition with tx getting set in the then callback from fh.createProject(), but I doubt it since that is likely a synchronous action after processing the RPC response from the Ethereum client.

   // This next line returns a promise? Where does this function come from?

https://gist.github.com/xavierlepretre/88682e871f4ad07be4534ae560692ee6

You don't actually need that function in this context. Truffle uses ether-pudding under the hood to provide you with that .then() function on fh.createProject(), and it's already doing this for you. So by the time you get the tx hash, your transaction has already been mined, and you can just call web3.eth.getTransactionReceipt.
One thing I just realized, however, is that the code I provided could have a race condition if run against geth. To get around this, make this line:
fh.createProject(accounts[0], 100000, Math.floor(Date.now() / 1000)).then(function(tx_hash) {

into this:
fh.createProject.sendTransaction(accounts[0], 100000, Math.floor(Date.now() / 1000)).then(function(tx_hash) {

Will will return the tx hash immediately without waiting for it to be mined.
By the time your event fires, as well, the transaction will be mined, because otherwise the event will not have occurred, so that's another reason why getTransactionReceiptMined is unnecessary.

I'm using your version of the unit test with the sendTransaction change and still the test times out after 30s since no events are sent.
Note I'm running testrpc on a different host than my truffle test.

Can you try watching for the specific event?
Oh wait, does your contract even define the event?
contract FundingHub {
    function createProject(address owner, uint goalAmount, uint deadline) {
        Debug();
    }
}

Shouldn't you have event Debug(); in there somewhere?

Shouldn't you have event Debug(); in there somewhere?

That was my troubleshooting deleting every line from the original createProject. Then adding an event that didn't even return a parameter

So what does the code actually look like? Because the code above shouldn't compile.

FundingHub.sol
import "./Project.sol";

contract FundingHub {
    event NewProject(address project);

    mapping(address => uint) public projectsMap;
    address[] public projects;

    function createProject(address owner, uint goalAmount, uint deadline) {
        address p = address(new Project(owner, goalAmount, deadline));
        projectsMap[p] = projects.length;
        projects.push(p);
        NewProject(p);
    }

    function contribute(address project) {
        Project(project).fund.value(msg.value)();
    }

    function getProject(uint index) returns(address) {
        return projects[index];
    }
}

Project.sol
contract Project {

    struct ProjectDetails {
        address owner;
        uint goalAmount;
        uint deadline;
        uint amountFunded;
        bool refunded;
        bool paid;
    }

    struct Funder {
        address addr;
        uint amount;
    }

    ProjectDetails public details;

    mapping (uint => Funder) public funders;
    uint public numFunders = 0;

    function Project(address owner, uint goalAmount, uint deadline) {
        if (msg.value > 0) throw;
        if (goalAmount == 0) throw;
        //TODO enforce deadline is in the future
        details = ProjectDetails({
            owner: owner,
            goalAmount: goalAmount,
            deadline: deadline,
            amountFunded: 0,
            refunded: false,
            paid: false
        });
    }

    // Allows over funding of project if final funder's contribution will exceed the goal amount
    function fund() {
        if (details.refunded || details.paid) throw;
        if (details.deadline < now || details.amountFunded >= details.goalAmount) {
            if (!tx.origin.send(msg.value)) throw;
            if (details.amountFunded >= details.goalAmount) {
                payout();
            } else {
                refund();
            }
        } else {
        // funders can be duplicated here. not bothering with the complexity
        // added to ensure there are no duplicates senders in the array.
        // could be some gas saved for the refund method but cost
        // more gas to run fund
            funders[numFunders++] = Funder({addr: tx.origin, amount: msg.value});
            details.amountFunded += msg.value;
        }
    }

    bool payingOut = false;
    function payout() private {
        if (payingOut) throw;
        payingOut = true;
        if (!details.owner.send(this.balance)) throw;
        details.paid = true;
        payingOut = false;
    }

    bool refunding = false;
    function refund() private {
        if (refunding) throw;
        refunding = true;
        for (uint i; i < numFunders; i++) {
            var funder = funders[i];
            if (!funder.addr.send(funder.amount)) throw;
        }
        details.refunded = true;
        refunding = false;
    }
}


TAO API Integration

Created an API wrapper for the TAO REST API.
Added unit tests

@drobison00 @mdemoret-nv This PR's feedback improvements require testing in the TAO toolkit API environment (K8s). It will affect my local morpheus/mrc conda environments, docker setup and nvidia-drivers. When everything is ready for the Integrated Training and Feedback feature, I will take care of this.


SelfQueryRetriever: invalid operators/comparators

Hi,
I've been playing with the SelfQueryRetriever examples but am having a few issues with allowed operators and valid Comparator/s.
Example 2: This example only specifies a filter
retriever.get_relevant_documents("I want to watch a movie rated higher than 8.5")
This build the following query:
query=' ' filter=Comparison(comparator=<Comparator.GT: 'gt'>, attribute='rating', value=8.5)
But it fails with:
HTTP response body: {"code":3,"message":"$Comparator.GT is not a valid operator","details":[]}
For other examples, I see:
HTTP response body: {"code":3,"message":"only logical operators as $or and $and are allowed at top level, got $Operator.AND","details":[]}
I'm using the following on MacOS:

Python 3.11.3
langchain 0.0.152
lark 1.1.5

With a Pinecone index:

Environment: us-central1-gcp
Metric: cosine
Pod Type: p1.x1
Dimensions: 1536

This will be a killer search feature so, I'd be very grateful if anybody is able to shed some light on this
Thanks.

hm seems like an enum isn't properly being converted to a string. i can't reproduce locally with python 3.9, wonder if enum str conversion has changed. taking a closer look now

#3892 should fix but let me know if you still see issues (after next release)

I am using<EMAIL_ADDRESS>I am still see the same issue

Following up as well using langchain 0.0.320.

hi i m seeing similar problem for chroma vectorstore.
ValueError: Received disallowed comparator Comparator.IN. Allowed comparators are [<Comparator.EQ: 'eq'>, <Comparator.NE: 'ne'>, <Comparator.GT: 'gt'>, <Comparator.GTE: 'gte'>, <Comparator.LT: 'lt'>, <Comparator.LTE: 'lte'>]

I'm having the same issue, anyone managed to fix this?
ValueError: Received disallowed comparator Comparator.IN. Allowed comparators are [<Comparator.EQ: 'eq'>, <Comparator.NE: 'ne'>, <Comparator.GT: 'gt'>, <Comparator.GTE: 'gte'>, <Comparator.LT: 'lt'>, <Comparator.LTE: 'lte'>]

I'm having the same issue in ChromaDB, anyone managed to fix this?
ValueError: Received disallowed comparator Comparator.IN. Allowed comparators are [<Comparator.EQ: 'eq'>, <Comparator.NE: 'ne'>, <Comparator.GT: 'gt'>, <Comparator.GTE: 'gte'>, <Comparator.LT: 'lt'>, <Comparator.LTE: 'lte'>]

I started using elasticsearch that supports  Comparator.IN

Right, saw that ChromaDB doesn't allow the IN operator. For those who want to use ChromaDB regardless, you can still get the self-query to work by manually constructing your query constructor prompt. Instead of using SelfQueryRetriever.from_llm to construct your retriever, use the following code (you can find similar info here). Note that this code is for Pinecone, but switching it to ChromaDB is trivial, just make sure to use only the comparators that Chroma supports.
from langchain.chains.query_constructor.base import (
    StructuredQueryOutputParser,
    get_query_constructor_prompt,
)

document_content_description = "Brief summary of a movie"

# Define allowed comparators list
allowed_comparators = [
    "$eq",  # Equal to (number, string, boolean)
    "$ne",  # Not equal to (number, string, boolean)
    "$gt",  # Greater than (number)
    "$gte",  # Greater than or equal to (number)
    "$lt",  # Less than (number)
    "$lte",  # Less than or equal to (number)
    "$in",  # In array (string or number)
    "$nin",  # Not in array (string or number)
]

constructor_prompt = get_query_constructor_prompt(
    document_content_description,
    metadata_field_info,
    allowed_comparators=allowed_comparators,
)

query_model = ChatOpenAI(
    # model='gpt-3.5-turbo-0125',
    model='gpt-4-0125-preview',
    temperature=0,
    streaming=True,
)

output_parser = StructuredQueryOutputParser.from_components()
query_constructor = constructor_prompt | query_model | output_parser

from langchain.retrievers.self_query.pinecone import PineconeTranslator

retriever = SelfQueryRetriever(
    query_constructor=query_constructor,
    vectorstore=vectorstore,
    structured_query_translator=PineconeTranslator(),
)

Seems to me that the documentation should be updated to reflect the importance of the allowed comparators for different vector stores.

Just add this Do not use the word 'contains' or 'contain' as filters." in the document_content_description

In my case, just add this
"Do not use the words 'IN' or 'in' or 'Not IN' as filters."
in the document_content_description. It works like a charm!

contain also doesn't work


Utilize GitHub Releases

I might not be looking in the right place, but I don't see a good place to go that tells me what Issues are resolved in what Nuget release of Marten.
I really like how Npgsql does it.  They tag their release, utilizing the Release feature of GitHub.  I can see a brief description of the release notes and then, if I want, drill down and see all the issues resolved in that release.

Release Notes
Issues resolved in that release

Sorry Brady, but I'm just not gonna sign up to do this. We do track issues to GH milestones matching Nuget versions.


UserPage - Sorting by views is unordered

On the User Page, sorting by view count results in a strange order that does not appear to be by view count.
As reported at https://redd.it/qlh2hn

It appears that the view count - for Google brews, at least - the view count is being treated as a string, not a number. Thus 23 > 187.


Added missing quote marks in Powershell code

Q
A

content fix?
yes

New article?
no

Related issues?

What's in this Pull Request?
Powershell code has missing quotation marks around string value
Guidance
You can delete this section when you are submitting the pull request.

Please update this PR information accordingly. We'll use this as part of our release notes in monthly communications.
Please target your PR to 'master' branch. Released documents are in live branch.

:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

docs/declarative-customization/site-design-pnp-provisioning.md
:white_check_mark:Succeeded

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.

thx @leedale1981, appreciated.


Can you please do a release

Hey @hamnis, I find this library really useful, would you be willing to do another release which incorporates all your improvements?

0.5.0 is now in maven central https://github.com/hamnis/jsonschema/releases/tag/v0.5.0

Thank you so much 🙏


MyVariantInfo link in variant info box actually links to MyGeneInfo

Looks like this didn't get updated when using the MyGeneInfo code to create the MyVariantInfo box.

Fixed in 54871fff6bc25874a417e0738a99d281fad61e4a
Will go out in next deploy!


Simulator shows "My test app isn't responding right now. Try again soon" but works perfectly fine in Try it now

I have written a code to test this app which returns the same string in the request.
It has no errors in try it now.

But in simulator it shows : MalformedResponse 'final_response' must be set.

I've not enabled API v2.
In "try it now", my webhook is triggered successfully and gives me the response code 200 but in simulator, my webhook is never triggered.
I also tried to set an input hello in Default Welcome Intent with default responses without any webhooks but the result is always same.

Do you have a text response in your welcome intent regardless of using webhook fulfillment? If Yes, and you still see the error => Go to 2, otherwise there is an issue with the response you are sending from your webhook.
Check the Debug tab and see if the parameter "curlCommand" in the AoG simulator contains the same token value as the one "Client access token" in the Dialogflow project under API keys. If not you might need to re-link your AoG project with the DIalogflow one.

Ohh. My client access token in project setting and the token in curlCommand are different.
How to re-link this project?

In Dialogflow > Integrations > Google Assistant > Update Draft

I did that but that didn't work. I also tried to refresh the keys but in curlCommand it shows the same key every time even after updating the draft.

Make sure you click on TEST DRAFT again in the AoG Console

Yes I did that too and I also restart my browser. I cleared cookies and cache. but none of them worked.
this is my client access token: 577fffec1013406db87b8ca6149659b2
this is the curlCommand:
"curlCommand": "curl -v 'https://api.api.ai/api/integrations/google?token=16d1c6c808f04dce95cdedbc09dd3543' -H 'Content-Type: application/json;charset=UTF-8' -H 'Google-Actions-API-Version: 2' -H 'Authorization: eyJhbGciOiJSUzI1NiIsImtpZCI6Ijc5MWM0YjcxNWE1YzNiYTdhY2EyYmQzODgyMTE4MzFkZDMxNjZiNjIifQ.eyJhdWQiOiJ0ZXN0LWdhcy1zZXJ2ZXIiLCJpc3MiOiJodHRwczovL2FjY291bnRzLmdvb2dsZS5jb20iLCJqdGkiOiI5OWZiMzNlMzlkOThkYjMxM2FkNzZjMjE2NzY0OThlOGY4ZWFmZjFlIiwiaWF0IjoxNTEyOTgyOTY1LCJleHAiOjE1MTI5ODMwODUsIm5iZiI6MTUxMjk4MjY2NX0.s4NCy6nMJrMu5kaNJ18x-DkXA_rUcmPwS3JnBC_gtWSWYf3oSra0mONnr8drgtORzkYs0vF_9GotTkiPKe8bWqbDh3MMG9lk-5CCF0utuC3DHG3cLqLsWXOX8lp2IdifI2kOuY9iiKYmC5dxzRoGR5CTlaYCRpmLGx8BPmXt3ZCOvC5dKbfvdRpEVNrzvSB6QLnQF6dRxqix6CeI2OJoMd_wTpOy6Xz6Y0HEBnWma3Wj-ltU9O33wyVimWp2mjuOu_ik320PIug_WUEPzSE8iE08XOGoJ1fYOeKt2ACmT7xYan-bLZpR_Rx6l69XRj8LMSYAbw8Q237Phucvj9dCyQ'  -A 'Mozilla/5.0 (compatible; Google-Cloud-Functions/2.1; +http://www.google.com/bot.html)' -X POST -d '{\"user\":{\"userId\":\"ABwppHGZZMcTM7QsAv1aGAh3zOLDIzZYEU7yfEQtZyQIm12FlCFn2WRxRq2KdX9MTbF4csXJ1lrW0CUSoPt2\",\"locale\":\"en-US\",\"lastSeen\":\"2017-12-11T08:55:32Z\"},\"conversation\":{\"conversationId\":\"1512982965898\",\"type\":\"NEW\"},\"inputs\":[{\"intent\":\"actions.intent.MAIN\",\"rawInputs\":[{\"inputType\":\"KEYBOARD\",\"query\":\"Talk to my test app\"}]}],\"surface\":{\"capabilities\":[{\"name\":\"actions.capability.AUDIO_OUTPUT\"},{\"name\":\"actions.capability.SCREEN_OUTPUT\"}]},\"isInSandbox\":true,\"availableSurfaces\":[{\"capabilities\":[{\"name\":\"actions.capability.AUDIO_OUTPUT\"},{\"name\":\"actions.capability.SCREEN_OUTPUT\"}]}]}'"   }

In Dialogflow, make sure the Project ID is the same as the one you are using in the AoG console.
In Dialog flow, click on the "Refresh key" for the "Client access token" then redo the Integration > Google Assistant > Update Draft > Visit Console > Test Draft

I just delete this app, created a new one with different name and different google project but in simulator it shows the same token. I also deleted previous Google project and I am using correct Project in simulator

I don't know why but it is working now. I have done nothing.

Any working solution I can use? I'm getting this error as well

First delete all the google console projects and then just wait.

hi am also  face the same error right now.

I am also facing the same issue.
Overall I have to say, developing for Alexa is so much easier than the mess that is Dialogflow, Actions SDK and the Assistant Console. Too many settings spread over too many different services, after 1,5 days I still don't know what the best setup might be for an Action I already have on Alexa. It's ridicolously confusing and not pleasing to work with.

You might want to provide your feedback at their google plus community.
I second your feelings by the way

Sometimes the Intents -> Response -> Google Assistant tab -> Use response from the DEFAULT tab as the first response gets unselected, so I resolved this error after re-enabling that.

@chilno we are facing the same issue, and we use v2, and we can see that the DialogFlow Client Access Token i.e. the one defined in the Dialogflow dashboard differs from the one we can see from the API Response in the simulator i.e. the field accessToken in the json response.
Is that correct?

@loretoparisi Try relinking the Dialogflow Agent with the Actions Simulator: Go to Integrations > Google Action > Settings > Test.

I have furtherly debugged and I get internally this error: Failed to parse the dialog flow response into AppResponse because of empty speech response

Agreed, @warhost.

@davidalbertonogueira take a look at the referenced issue...the problem seems to be elsewhere.

I already fixed my problem. I was using a python library and I would get this error message when using their "card". Now I'm sending just the speech text and it works.

@loretoparisi like you said, that's what's happening. But if we return a promise from it, a response get's sent out. Now initially I tried with a simple text response and it worked for me on the simulator.
But it's giving me this error when I'm trying to send out a custom response as Payload.

@matthewayne , please help!

This issue happened to me today. I fixed it by adding "Google Assistant Welcome" to the "Default Welcome Intent" Events section.

I am facing same problem ,My welcome intent is working fine , but when I invoke my action its not working , It is deployed in firebase but when I test it on simulator . Its showing MalformedResponse 'final_response' must be set. I am giving you code (inedex.js). Please riview it.`'use strict'
const {dialogflow}=require('actions-on-google');
const functions = require('firebase-functions');
const d=require('date-and-time');
const app=dialogflow({debug : true });
let date = new Date();
app.intent('what should',(conv,{Work})=>{
console.log(Work);
if(Work === 'do'){
if(d.format(date,'ddd')==='Mon' && d.format(date,'hh:mm')==='09:00'){
conv.close("You have a class of Microprocessor in ICT 308 ,You can go a bit late.");
}
if(d.format(date,'ddd')==='Thu' && d.format(date,'hh:mm')==='09:00'){
conv.close("You have a class of Microprocessor in ICT 308 ,You can go a bit late.");
}
else {
conv.close("You should be sleeping now");
}
}
else{
conv.close("i could not understood");
}
// conv.close('good night');
});
exports.dialogflowFirebaseFulfillment = functions.https.onRequest(app);
//if (d.getDay()
// // Create and Deploy Your First Cloud Functions
// // https://firebase.google.com/docs/functions/write-firebase-functions
//
// exports.helloWorld = functions.https.onRequest((request, response) => {
//  response.send("Hello from Firebase!");
// });
`

Try to update your draft in simulator.

dialogflaw

For me, the solution was to set a name and use it instead of "my test app"


Correct name of init function.

@jpmedley Thanks for finding that oversight.

Cherry-picked for v2.2.7.  Thanks!


Update Threading Semantics

This commit makes a few changes related to the threading setup in ConsumerApi and ProducerApi.
It addresses unclean shutdown of the java.util.concurrent.ExecutorService as well as fixing a potential deadlock scenario.
Prior to this commit an ExecutorService with a single thread was created in ConsumerApi.BlockingContext. For blocking IO operations an unbounded thread pool is recommended (https://typelevel.org/cats-effect/concurrency/basics.html#choosing-thread-pool). Preventing unbounded resource usage is the responsibility for calling code running on a bounded thread pool.
This commit also updates the ThreadFactory so that if multiple pools happen to be created, they will be given globally unique names.
Two new methods are added to the companion object of ConsumerApi to allow for the caller to provider their own Blocker if so desired.
Also, the shutdown of the thread pool prior to this commit only called (es: ExecutorService).shutdown(). This is not sufficient to shutdown an ExecutorService. The full process is actually quite involved (https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/concurrent/ExecutorService.html). Thankfully cats-effect already provides this logic for us out of the box with Blocker.fromExecutorService.
Both the single threaded nature of the blocker and the shutdown semantics were issues. The impetus for this commit is that we were experiencing a deadlock around shutdown/restart of a fs2.Stream with Kafka4s related code. I strongly believe that one or both of these is the source of that issue, however even if it is not, these items should still be addressed.
This is a binary incompatible change.

@isomarcte Build failed:
The command "sbt ++$TRAVIS_SCALA_VERSION "scalafmtSbtCheck;scalafmtCheckAll"" exited with 1.

@isomarcte Is this still under development? There is now a conflict if we are still looking at this.

I think we are considering other approaches now. So I'll close this.