text:
Add FS(Must)?(Byte|String) helper functions.

Hi Matt,
I like esc better than all the alternatives, and here are some helper functions to get assets directly.
Use case: storing more complex templates in external files that are going to be embedded, e.g.
pageTemplateStr := FSMustString(false, "/page.html")
pageTemplate = template.Must(template.New("page").Parse(pageTemplateStr))

If you don't like the names, feel free to change to whatever you think is best.

While I think your approach will work, I think it can be improved. The approach above would needlessly create io.Readers when we already have the raw []byte. I like the API, but I think it could access the underlying data itself, which would be faster.

Yes, that makes sense. Thanks for the feedback.
I will clean it up and resubmit.

Replaced with #8.

authors: mjibson victorkryukov

repo: mjibson/esc


text:
add TransportDirect transport

The TransportDirect transport allows to tweak outgoing SMTP connexions to remote servers. Currently, it only allows to select network IP family (ipv4, ipv6 or both).
For example, to disable ipv6 for all outgoing SMTP connexions:

add these lines in mox.conf to create a new transport named "disableipv6":

Transports:
  disableipv6:
    Direct:
      DisableIpv6: true

then add these lines in domains.conf to use this transport:

Routes:
  -
    Transport: disableipv6

fix #149

@mjl- this is my second attempt to fix #149. This time by adding a new transport for direct connexions as we talked https://github.com/mjl-/mox/issues/149#issuecomment-2041007381

source: gharchive/pull-request

repo: mjl-/mox

license: MIT

license_type: permissive

license_source: github-api


text:
Mjml head attributes/readme.md

mjml-head-attributes/README.md
changes responding to feedback

#2276 completes #2266

repo: mjmlio/mjml


text:
Degraded performance under heavy load

I am using JMXProxy for around 70 JVM to query full data (full=true) and it is load balanced between 2 JMXProxy instances.
I am hitting JMXProxy continuously with around 1 minute of sleep time. But after a point it gets really slow. It takes seconds (10s of seconds) to reply.
How many queries/load it is expected to handle?

This is different than #142 in that this is caused by serializing access to the global host map.  #142 is related, but really caused by lack of a proper connection timeout which sends the server into a blackhole while it's failing to connect.  Both issues will be fixed separately.

source: gharchive/issue

license: mit

license_source: bigquery


text:
LudumDare API Moved api.ldjam.com -> api.ludumdare.com

LudumDare API Moved api.ldjam.com -> api.ludumdare.com
https://twitter.com/mikekasprzak/status/877290908017983488

Thanks for sharing the news! I'll update the sources.

API moved back apparently, I just reversed the change.

authors: mkalam-alami zwrawr

repo: mkalam-alami/ludumdare-feedback-friends


text:
Execution problem after obfuscation - link to Visual Studio version ?

Since several days - I update Visual Studio to 16.2.4 version ? - my exe does not work anymore after obfuscation (it closes itself after the start phase). Warning messages during obfuscation are the same than before - I have tried the last version of ConfuserEx (1.3 alpha) but the problem is the same (with one warning less about my software resource). Before that, I used ConfuserEx 1.0 since 5 months without any problem. I have not change my project configuration :
<project outputDir="C:\Users\...\Confused" baseDir="C:\Users\...\bin" xmlns="http://confuser.codeplex.com">
  <module path="Appli_PDP_VCG.exe">
    <rule pattern="true" preset="normal" inherit="false">
      <protection id="anti ildasm" />
      <protection id="anti tamper" />
      <protection id="constants" />
      <protection id="ctrl flow" />
      <protection id="anti debug" />
      <protection id="invalid metadata" />
      <protection id="ref proxy" />
      <protection id="resources" />
      <protection id="anti dump" action="remove" />
      <protection id="rename" action="remove" />
    </rule>
  </module>
  <module path="EntityFramework.dll" />
  <module path="EntityFramework.SqlServer.dll" />
</project>

First of I strongly recommend to mark the two additional assemblies with external="true" to avoid them being excessively analysed.
That being said, without any indication what kind of error the application encounters, this is next to impossible to diagnose. You can launch your application with dnspy or you can checkout the event viewser of windows to find the exception your application encounters.

Thank you for your quick response Martin.
I will try with external = true and then track the error with dnspy.
I will come back to you soon.

The parameter external=true have the ability to exclude all existing warning during obfuscation but the problem is still there so I will investigate the exception error with dnspy

With the help of dnspy, I have shown my error = old version of a dll used by my software ! Thank you very much for your help

@mkaring DLLs and Framework versions seems to be an recurrent problem that's not an ConfuserEx fault. Is there any way that the analyzer could point out in the output some warnings/errors when obfuscating code with inconsistent versions (if there's a way of doing that)?

Inconsistent version is a testable delta between exe manifest which list all dll used by the software and each dll version

authors: MurariAlex OlivierCARRE-O2C mkaring

repo: mkaring/ConfuserEx


text:
[Remove Request] -  Blocking Amazon Cognito - cognito-identity.us-east-1.amazonaws.com

cognito-identity.us-east-1.amazonaws.com is a false positive
Amazon Cognito is required for some AWS apps.
For me, it is breaking SensorPush app.
"Amazon Cognito helps you create unique identifiers for your end users that are kept consistent across devices and platforms. Amazon Cognito lets you add user sign-up, sign-in, and access control to your web and mobile apps quickly and easily.

Thanks for reporting, it was blocked by https://raw.githubusercontent.com/blocklistproject/Lists/master/ads.txt. It's been added to the allowlist

I reported it upstream but they havent actioned it yet
https://github.com/blocklistproject/Lists/issues/437


text:
Add support for Django models

That's just basic support for now - supports blank and required attributes.
Looks like it works for my old university project (sorry for Polish verbose_names ;)

References: #39.

I've just fixed some minor issues, I think, that it's ready to be merged.
A few questions related to Django support:

Is it possible to make mkdocstrings ignore show_if_no_docstrings: true for Django's "Meta" class without changing anything in mkdocstrings?
It would like to add some more information, like the to argument of a ForeignKey field, is there some nice place for that?

Hey, thanks for your contribution @mRokita!

Is it possible to make mkdocstrings ignore show_if_no_docstrings: true for Django's "Meta" class without changing anything in mkdocstrings?

I guess it's possible if you override a template and check if the current class is called "Meta" and has a Django model as parent.

It would like to add some more information, like the to argument of a ForeignKey field, is there some nice place for that?

Currently, no, but the plan is to do what is described in this comment (which you already read): serialize arbitrary objects' values.

[...] the plan is to do what is described in this comment (which you already read): serialize arbitrary objects' values.

That would be a great improvement, any plans on splitting #64 into smaller tasks?
I would love to help, but I don't really know where to start.

Because of what I described here, I replaced _meta.fields with _meta.get_fields and a filter.

authors: mRokita pawamoy

repo: mkdocstrings/pytkdocs

license: ISC


text:
mod_wsgi and pyodbc

I've deployed a Django application using sqlalchemy and pyodbc in a virtual env. In development environments everything is ok, but when I use Apache + mod_wsgi, I allways get the same error, when sqlalchemy tries to "load" pyodbc connector, the error is: ImportError: No module named 'pyodbc'
The full text is here:
[Wed Mar 16 16:13:09.682686 2016] [mpm_event:notice] [pid 1755:tid 140690280609664] AH00489: Apache/2.4.12 (Ubuntu) mod_wsgi/4.3.0 Python/3.4.3+ configured -- resuming normal operations
[Wed Mar 16 16:13:09.682799 2016] [core:notice] [pid 1755:tid 140690280609664] AH00094: Command line: '/usr/sbin/apache2'
[Wed Mar 16 16:13:13.816692 2016] [wsgi:error] [pid 1758:tid 140690175645440] [remote 100.100.100.118:5122] mod_wsgi (pid=1758): Target WSGI script '/home/skull/historydata/historydata/historydata/wsgi.py' cannot be loaded as Python module.
[Wed Mar 16 16:13:13.816814 2016] [wsgi:error] [pid 1758:tid 140690175645440] [remote 100.100.100.118:5122] mod_wsgi (pid=1758): Exception occurred processing WSGI script '/home/skull/historydata/historydata/historydata/wsgi.py'.
[Wed Mar 16 16:13:13.816873 2016] [wsgi:error] [pid 1758:tid 140690175645440] [remote 100.100.100.118:5122] Traceback (most recent call last):
[Wed Mar 16 16:13:13.817122 2016] [wsgi:error] [pid 1758:tid 140690175645440] [remote 100.100.100.118:5122]   File "/home/skull/historydata/historydata/historydata/wsgi.py", line 15, in
[Wed Mar 16 16:13:13.817138 2016] [wsgi:error] [pid 1758:tid 140690175645440] [remote 100.100.100.118:5122]     application = get_wsgi_application()
[Wed Mar 16 16:13:13.817313 2016] [wsgi:error] [pid 1758:tid 140690175645440] [remote 100.100.100.118:5122]   File "/home/skull/historydata/historydata/historydataenv/lib/python3.5/site-packages/django/core/wsgi.py", line 13, in get_wsgi_application
[Wed Mar 16 16:13:13.817328 2016] [wsgi:error] [pid 1758:tid 140690175645440] [remote 100.100.100.118:5122]     django.setup()
[Wed Mar 16 16:13:13.817521 2016] [wsgi:error] [pid 1758:tid 140690175645440] [remote 100.100.100.118:5122]   File "/home/skull/historydata/historydata/historydataenv/lib/python3.5/site-packages/django/init.py", line 18, in setup
[Wed Mar 16 16:13:13.817537 2016] [wsgi:error] [pid 1758:tid 140690175645440] [remote 100.100.100.118:5122]     apps.populate(settings.INSTALLED_APPS)
[Wed Mar 16 16:13:13.817875 2016] [wsgi:error] [pid 1758:tid 140690175645440] [remote 100.100.100.118:5122]   File "/home/skull/historydata/historydata/historydataenv/lib/python3.5/site-packages/django/apps/registry.py", line 108, in populate
[Wed Mar 16 16:13:13.817892 2016] [wsgi:error] [pid 1758:tid 140690175645440] [remote 100.100.100.118:5122]     app_config.import_models(all_models)
[Wed Mar 16 16:13:13.818127 2016] [wsgi:error] [pid 1758:tid 140690175645440] [remote 100.100.100.118:5122]   File "/home/skull/historydata/historydata/historydataenv/lib/python3.5/site-packages/django/apps/config.py", line 202, in import_models
[Wed Mar 16 16:13:13.818144 2016] [wsgi:error] [pid 1758:tid 140690175645440] [remote 100.100.100.118:5122]     self.models_module = import_module(models_module_name)
[Wed Mar 16 16:13:13.818371 2016] [wsgi:error] [pid 1758:tid 140690175645440] [remote 100.100.100.118:5122]   File "/usr/lib/python3.4/importlib/init.py", line 109, in import_module
[Wed Mar 16 16:13:13.818387 2016] [wsgi:error] [pid 1758:tid 140690175645440] [remote 100.100.100.118:5122]     return _bootstrap._gcd_import(name[level:], package, level)
[Wed Mar 16 16:13:13.818421 2016] [wsgi:error] [pid 1758:tid 140690175645440] [remote 100.100.100.118:5122]   File "", line 2254, in _gcd_import
[Wed Mar 16 16:13:13.818454 2016] [wsgi:error] [pid 1758:tid 140690175645440] [remote 100.100.100.118:5122]   File "", line 2237, in _find_and_load
[Wed Mar 16 16:13:13.818486 2016] [wsgi:error] [pid 1758:tid 140690175645440] [remote 100.100.100.118:5122]   File "", line 2226, in _find_and_load_unlocked
[Wed Mar 16 16:13:13.818517 2016] [wsgi:error] [pid 1758:tid 140690175645440] [remote 100.100.100.118:5122]   File "", line 1200, in _load_unlocked
[Wed Mar 16 16:13:13.818548 2016] [wsgi:error] [pid 1758:tid 140690175645440] [remote 100.100.100.118:5122]   File "", line 1129, in _exec
[Wed Mar 16 16:13:13.818579 2016] [wsgi:error] [pid 1758:tid 140690175645440] [remote 100.100.100.118:5122]   File "", line 1471, in exec_module
[Wed Mar 16 16:13:13.818610 2016] [wsgi:error] [pid 1758:tid 140690175645440] [remote 100.100.100.118:5122]   File "", line 321, in _call_with_frames_removed
[Wed Mar 16 16:13:13.818841 2016] [wsgi:error] [pid 1758:tid 140690175645440] [remote 100.100.100.118:5122]   File "/home/skull/historydata/historydata/dataprovider/models.py", line 8, in
[Wed Mar 16 16:13:13.818856 2016] [wsgi:error] [pid 1758:tid 140690175645440] [remote 100.100.100.118:5122]     engine = create_engine(CNSTR_HD)
[Wed Mar 16 16:13:13.819151 2016] [wsgi:error] [pid 1758:tid 140690175645440] [remote 100.100.100.118:5122]   File "/home/skull/historydata/historydata/historydataenv/lib/python3.5/site-packages/sqlalchemy/engine/init.py", line 386, in create_engine
[Wed Mar 16 16:13:13.819167 2016] [wsgi:error] [pid 1758:tid 140690175645440] [remote 100.100.100.118:5122]     return strategy.create(*args, **kwargs)
[Wed Mar 16 16:13:13.819412 2016] [wsgi:error] [pid 1758:tid 140690175645440] [remote 100.100.100.118:5122]   File "/home/skull/historydata/historydata/historydataenv/lib/python3.5/site-packages/sqlalchemy/engine/strategies.py", line 75, in create
[Wed Mar 16 16:13:13.819427 2016] [wsgi:error] [pid 1758:tid 140690175645440] [remote 100.100.100.118:5122]     dbapi = dialect_cls.dbapi(**dbapi_args)
[Wed Mar 16 16:13:13.819656 2016] [wsgi:error] [pid 1758:tid 140690175645440] [remote 100.100.100.118:5122]   File "/home/skull/historydata/historydata/historydataenv/lib/python3.5/site-packages/sqlalchemy/connectors/pyodbc.py", line 51, in dbapi
[Wed Mar 16 16:13:13.819671 2016] [wsgi:error] [pid 1758:tid 140690175645440] [remote 100.100.100.118:5122]     return import('pyodbc')
[Wed Mar 16 16:13:13.819714 2016] [wsgi:error] [pid 1758:tid 140690175645440] [remote 100.100.100.118:5122] ImportError: No module named 'pyodbc'
[Wed Mar 16 16:13:13.928017 2016] [wsgi:error] [pid 1758:tid 140690058032896] [remote 100.100.100.118:28404] mod_wsgi (pid=1758): Target WSGI script '/home/skull/historydata/historydata/historydata/wsgi.py' cannot be loaded as Python module.
[Wed Mar 16 16:13:13.928093 2016] [wsgi:error] [pid 1758:tid 140690058032896] [remote 100.100.100.118:28404] mod_wsgi (pid=1758): Exception occurred processing WSGI script '/home/skull/historydata/historydata/historydata/wsgi.py'.
[Wed Mar 16 16:13:13.928148 2016] [wsgi:error] [pid 1758:tid 140690058032896] [remote 100.100.100.118:28404] Traceback (most recent call last):
[Wed Mar 16 16:13:13.928241 2016] [wsgi:error] [pid 1758:tid 140690058032896] [remote 100.100.100.118:28404]   File "/home/skull/historydata/historydata/historydata/wsgi.py", line 15, in
[Wed Mar 16 16:13:13.928263 2016] [wsgi:error] [pid 1758:tid 140690058032896] [remote 100.100.100.118:28404]     application = get_wsgi_application()
[Wed Mar 16 16:13:13.928316 2016] [wsgi:error] [pid 1758:tid 140690058032896] [remote 100.100.100.118:28404]   File "/home/skull/historydata/historydata/historydataenv/lib/python3.5/site-packages/django/core/wsgi.py", line 13, in get_wsgi_application
[Wed Mar 16 16:13:13.928329 2016] [wsgi:error] [pid 1758:tid 140690058032896] [remote 100.100.100.118:28404]     django.setup()
[Wed Mar 16 16:13:13.928377 2016] [wsgi:error] [pid 1758:tid 140690058032896] [remote 100.100.100.118:28404]   File "/home/skull/historydata/historydata/historydataenv/lib/python3.5/site-packages/django/init.py", line 18, in setup
[Wed Mar 16 16:13:13.928388 2016] [wsgi:error] [pid 1758:tid 140690058032896] [remote 100.100.100.118:28404]     apps.populate(settings.INSTALLED_APPS)
[Wed Mar 16 16:13:13.928436 2016] [wsgi:error] [pid 1758:tid 140690058032896] [remote 100.100.100.118:28404]   File "/home/skull/historydata/historydata/historydataenv/lib/python3.5/site-packages/django/apps/registry.py", line 78, in populate
[Wed Mar 16 16:13:13.928448 2016] [wsgi:error] [pid 1758:tid 140690058032896] [remote 100.100.100.118:28404]     raise RuntimeError("populate() isn't reentrant")
[Wed Mar 16 16:13:13.928486 2016] [wsgi:error] [pid 1758:tid 140690058032896] [remote 100.100.100.118:28404] RuntimeError: populate() isn't reentrant

Which versions of each stack component are you using? For example, it looks like "historydataenv" is set for Python 3.5, yet mod_wsgi is compiled against 3.4.3; these should match. Are you running pyodbc==3.0.10? What's your Django DATABASES settings? What versions of FreeTDS and unixODBC are you using? Thanks.

Hi Timothy,

historydataenv is a virtual env with Python 3.5.1 and pyodbc 3.0.10
(installed with pip inside the virtual env)
apache2 --> 2.4.12
mod_wsgi --> 4.3.0 (it seems it's running under Python 3.4.3+, how can
I compile it to run under Python 3.5.1??)
Django DATABASES = {

'default': {

'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR,'db.sqlite3'),
}
}

FreeTDS: 0.91-6.1
unixODBC: 2.3.1-3

Thank you!
On Wed, Mar 16, 2016 at 5:01 PM, Timothy Allen notifications@github.com
wrote:

Which versions of each stack component are you using? For example, it
looks like "historydataenv" is set for Python 3.5, yet mod_wsgi is compiled
against 3.4.3; these should match. Are you running pyodbc==3.0.10? What's
your Django DATABASES settings? What versions of FreeTDS and unixODBC are
you using? Thanks.
—
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
https://github.com/mkleehammer/pyodbc/issues/109#issuecomment-197397931

Here's an example for mod_wsgi 4.4.21 with Python 3.5 (the key line is "./configure..."):
wget -q "https://github.com/GrahamDumpleton/mod_wsgi/archive/4.4.21.tar.gz"
tar -xzf '4.4.21.tar.gz'
cd ./mod_wsgi-4.4.21
./configure --with-python=/usr/local/bin/python3.5
make
make install

One more thing, can you include your Apache config for the web site, and the wsgi.py file? I'm wondering if you're pointing Apache to the correct virtualenv. Thanks!

Hi again, find attached what you've asked.
Thank you Timothy!
On Wed, Mar 16, 2016 at 7:12 PM, Timothy Allen notifications@github.com
wrote:

Here's an example for mod_wsgi 4.4.21 with Python 3.5 (the key line is
"./configure..."):
wget -q "https://github.com/GrahamDumpleton/mod_wsgi/archive/4.4.21.tar.gz"
tar -xzf '4.4.21.tar.gz'
cd ./mod_wsgi-4.4.21
./configure --with-python=/usr/local/bin/python3.5
make
make install
One more thing, can you include your Apache config for the web site, and
the wsgi.py file? I'm wondering if you're pointing Apache to the correct
virtualenv. Thanks!
—
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
https://github.com/mkleehammer/pyodbc/issues/109#issuecomment-197464056

Up & running!!
Thanks Timothy!!
👏👏👏
On Fri, Mar 18, 2016 at 9:45 AM, Santiago Mate santihago@gmail.com wrote:

Hi again, find attached what you've asked.
Thank you Timothy!
On Wed, Mar 16, 2016 at 7:12 PM, Timothy Allen notifications@github.com
wrote:

Here's an example for mod_wsgi 4.4.21 with Python 3.5 (the key line is
"./configure..."):
wget -q "https://github.com/GrahamDumpleton/mod_wsgi/archive/4.4.21.tar.gz"
tar -xzf '4.4.21.tar.gz'
cd ./mod_wsgi-4.4.21
./configure --with-python=/usr/local/bin/python3.5
make
make install
One more thing, can you include your Apache config for the web site, and
the wsgi.py file? I'm wondering if you're pointing Apache to the correct
virtualenv. Thanks!
—
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
https://github.com/mkleehammer/pyodbc/issues/109#issuecomment-197464056

Fantastic! I'm glad it worked out for you.

authors: FlipperPA esemate

repo: mkleehammer/pyodbc


text:
package com.kscs.util.jaxb as runtime dependecy

Hi Mirko,
I just discovered that your plugin adds static code to the com.kscs.util.jaxb package within the generated-source folder. I see problems arising when multiple schemas are using your plugin. IMO the code schould be a runtime dependency or should be placed in the same package as the xjc generated code.

Hi cachescrubber,
you can switch off the generation of this static code with the „-generate-tools=n“ option. Then you can add the jar (if repository configured like in your description!) to the runtime classpath of your code.
Please note that since version 1.5.0 the command-line options must be given AFTER the corresponding plugin activation option. Each of the plugin classes has its own „generate-tools“ option…

Am 2015-02-17 um 14:18 schrieb cachescrubber notifications@github.com:
Hi Mirko,
I just discovered that your plugin adds static code to the com.kscs.util.jaxb package within the generated-source folder. I see problems arising when multiple schemas are using your plugin. IMO the code schould be a runtime dependency or should be placed in the same package as the xjc generated code.
—
Reply to this email directly or view it on GitHub.

Thanks Mirko,
generate-tools=n works as described. I should RTFM next time ;-)

authors: cachescrubber mklemm


text:
Scope issue about mlx.core.uint32

Describe the bug
numpy.uint32 supports a range of 0 to 4294967295, but the range represented by mlx.core.uint32 seems to be only 0 to 2147483647, which is the range represented by uint16. When 2147483648 appears in the array, the program crashes.
To Reproduce
Include code snippet
import mlx.core as mx
import numpy as np

x = np.array([0,4294967295], dtype=np.uint32)
print("numpy:", np.isposinf(x))

x = mx.array([0,2147483647], dtype=mx.uint32)
result = mx.isposinf(x)
print("mlx1:", result)

x = mx.array([0,2147483648], dtype=mx.uint32)
result = mx.isposinf(x)
print("mlx2:", result)

Expected behavior
mlx2: array([False, False], dtype=bool)
Desktop (please complete the following information):

OS Version: MacOS 14.2.1
Version 0.10.0

Can confirm, reproducible.

Thanks for finding fix in #501

repo: ml-explore/mlx


text:
Model  (model.ckpt) available?

Hello! The news announcement says that the VN-EGNN model is available now. Is this the model.ckpt model checkpoint file mentioned on the example command line: python predict.py -i protein.pdb -o output -c model.ckpt -d cuda:0?
If so, could you refer me to it? I can't seem to find it.
Many thanks!

OK, I found it: https://huggingface.co/fses91/VNEGNN-MODEL/blob/main/best_model.ckpt

repo: ml-jku/vnegnn


text:
[Alpha pipeline] Add captioning component

This PR adds a generic image captioning component.
Fixes #98

Do we actually need this component for the ControlNet pipeline? We already have captions from LAION, no?

authors: NielsRogge RobbeSneyders


text:
Make extra functions to support user supplied dialog titles

Signed-off-by: Len Remmerswaal len.mail1@xs4all.nl

Can you please merge this to add the option for users to provide their own dialog title/prompt.
I would like to use these dialogs launched by a window-less program, where the title provides an indication for what file or folder is supposed to be selected.

repo: mlabbe/nativefiledialog

license: Zlib


text:
Add shop demo

Closes #48

The changes look good :+1: .
I'm merging despite CI not passing. Unfortunately building the reference.json takes a very long time, and in CI it's even worse. I did manage to build the docs locally, though.

authors: danielfarrelly rmgaray

repo: mlabs-haskell/godot-cardano


text:
org.apache.tvm.Base$TVMError: InternalError: Check failed: (e == CL_SUCCESS) is false: OpenCL Error, code=-54: CL_INVALID_WORK_GROUP_SIZE [Bug]

🐛 Bug
Model initialised successfully and displayed "ready to chat" message. Getting issue on message send.
Stack trace:
File "/mlc-llm/3rdparty/tvm/src/runtime/opencl/opencl_module.cc", line 90
at org.apache.tvm.Base.checkCall(Base.java:173)
at org.apache.tvm.Function.invoke(Function.java:130)
at ai.mlc.mlcllm.ChatModule.prefill(ChatModule.java:54)
at ai.mlc.mlcchat.AppViewModel$ChatState$requestGenerate$1$1.invoke(AppViewModel.kt:666)
at ai.mlc.mlcchat.AppViewModel$ChatState$requestGenerate$1$1.invoke(AppViewModel.kt:666)
at ai.mlc.mlcchat.AppViewModel$ChatState.callBackend(AppViewModel.kt:548)
at ai.mlc.mlcchat.AppViewModel$ChatState.requestGenerate$lambda$4(AppViewModel.kt:666)
at ai.mlc.mlcchat.AppViewModel$ChatState.$r8$lambda$lluIrcsPALEW5nCb2tohZYadhTY(Unknown Source:0)
at ai.mlc.mlcchat.AppViewModel$ChatState$$ExternalSyntheticLambda3.run(Unknown Source:6)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:462)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:923)

Error message:
InternalError: Check failed: (e == CL_SUCCESS) is false: OpenCL Error, code=-54: CL_INVALID_WORK_GROUP_SIZE
Stack trace:
File "/mlc-llm/3rdparty/tvm/src/runtime/opencl/opencl_module.cc", line 90
Environment

Platform (e.g. WebGPU/Vulkan/IOS/Android/CUDA): Android
Operating system (e.g. Ubuntu/Windows/MacOS/...): macos
Device (e.g. iPhone 12 Pro, PC+RTX 3090, ...) Realwear T21G (Android 11 (AOSP) + WearHF™ hands-free interface + Enterprise features.)
How you installed MLC-LLM (conda, source): conda
How you installed TVM-Unity (pip, source): pip
Python version (e.g. 3.10): python3
GPU driver version (if applicable):
CUDA/cuDNN version (if applicable):
TVM Unity Hash Tag (python -c "import tvm; print('\n'.join(f'{k}: {v}' for k, v in tvm.support.libinfo().items()))", applicable if you compile models):USE_NVTX: OFF
USE_GTEST: AUTO
SUMMARIZE: OFF
TVM_DEBUG_WITH_ABI_CHANGE: OFF
USE_IOS_RPC: OFF
USE_MSC: OFF
USE_ETHOSU:
CUDA_VERSION: NOT-FOUND
USE_LIBBACKTRACE: AUTO
DLPACK_PATH: 3rdparty/dlpack/include
USE_TENSORRT_CODEGEN: OFF
USE_THRUST: OFF
USE_TARGET_ONNX: OFF
USE_AOT_EXECUTOR: ON
BUILD_DUMMY_LIBTVM: OFF
USE_CUDNN: OFF
USE_TENSORRT_RUNTIME: OFF
USE_ARM_COMPUTE_LIB_GRAPH_EXECUTOR: OFF
USE_CCACHE: AUTO
USE_ARM_COMPUTE_LIB: OFF
USE_CPP_RTVM:
USE_OPENCL_GTEST: /path/to/opencl/gtest
USE_MKL: OFF
USE_PT_TVMDSOOP: OFF
MLIR_VERSION: NOT-FOUND
USE_CLML: OFF
USE_STACKVM_RUNTIME: OFF
USE_GRAPH_EXECUTOR_CUDA_GRAPH: OFF
ROCM_PATH: /opt/rocm
USE_DNNL: OFF
USE_VITIS_AI: OFF
USE_MLIR: OFF
USE_RCCL: OFF
USE_LLVM: llvm-config --link-static
USE_VERILATOR: OFF
USE_TF_TVMDSOOP: OFF
USE_THREADS: ON
USE_MSVC_MT: OFF
BACKTRACE_ON_SEGFAULT: OFF
USE_GRAPH_EXECUTOR: ON
USE_NCCL: OFF
USE_ROCBLAS: OFF
GIT_COMMIT_HASH: 4bdcf425f762080614a218b229b3e4c38828bca0
USE_VULKAN: OFF
USE_RUST_EXT: OFF
USE_CUTLASS: OFF
USE_CPP_RPC: OFF
USE_HEXAGON: OFF
USE_CUSTOM_LOGGING: OFF
USE_UMA: OFF
USE_FALLBACK_STL_MAP: OFF
USE_SORT: ON
USE_RTTI: ON
GIT_COMMIT_TIME: 2024-03-31 23:01:12 -0400
USE_HEXAGON_SDK: /path/to/sdk
USE_BLAS: none
USE_ETHOSN: OFF
USE_LIBTORCH: OFF
USE_RANDOM: ON
USE_CUDA: OFF
USE_COREML: OFF
USE_AMX: OFF
BUILD_STATIC_RUNTIME: OFF
USE_CMSISNN: OFF
USE_KHRONOS_SPIRV: OFF
USE_CLML_GRAPH_EXECUTOR: OFF
USE_TFLITE: OFF
USE_HEXAGON_GTEST: /path/to/hexagon/gtest
PICOJSON_PATH: 3rdparty/picojson
USE_OPENCL_ENABLE_HOST_PTR: OFF
INSTALL_DEV: OFF
USE_PROFILER: ON
USE_NNPACK: OFF
LLVM_VERSION: 18.1.2
USE_MRVL: OFF
USE_OPENCL: OFF
COMPILER_RT_PATH: 3rdparty/compiler-rt
RANG_PATH: 3rdparty/rang/include
USE_SPIRV_KHR_INTEGER_DOT_PRODUCT: OFF
USE_OPENMP: OFF
USE_BNNS: OFF
USE_FLASHINFER:
USE_CUBLAS: OFF
USE_METAL: ON
USE_MICRO_STANDALONE_RUNTIME: OFF
USE_HEXAGON_EXTERNAL_LIBS: OFF
USE_ALTERNATIVE_LINKER: AUTO
USE_BYODT_POSIT: OFF
USE_HEXAGON_RPC: OFF
USE_MICRO: OFF
DMLC_PATH: 3rdparty/dmlc-core/include
INDEX_DEFAULT_I64: ON
USE_RELAY_DEBUG: OFF
USE_RPC: ON
USE_TENSORFLOW_PATH: none
TVM_CLML_VERSION:
USE_MIOPEN: OFF
USE_ROCM: OFF
USE_PAPI: OFF
USE_CURAND: OFF
TVM_CXX_COMPILER_PATH: /Applications/Xcode_14.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
HIDE_PRIVATE_SYMBOLS: ON

I have tried following models non of these worked:

gemma-2b-it-q4f16_1-MLC
TinyLlama-1.1B-Chat-v0.4-q4f16_1-MLC
WizardMath-7B-V1.1-q4f16_1-MLC
gpt2-q4f16_1-MLC
Llama-2-7b-chat-hf-q4f16_1-MLC (Getting crash)
RedPajama-INCITE-Chat-3B-v1-q4f16_1-MLC
Mistral-7B-Instruct-v0.2-q4f16_1-MLC (Getting crash)
phi-2-q4f16_1-MLC

Which Soc do you use? And could you please check if it works on mobile phones?

Yes, I have tested it in mobile phones it is working but my priority is AOSP devices.
chipset device using :

Realwear T21G navigator : 2.0 GHz 8-core Qualcomm® Snapdragon™ 662 with Adreno 610 GPU - OpenGL® ES 3.2 & OpenCL™ 2.0
Realwear T1100G HMT : 2.0 GHz 8-core Qualcomm® Snapdragon™ 625 with Adreno 506 GPU – OpenGL ES 3.1 & OpenCL 2.0

likely we need to further restrict the group sizes and these device memory are too small for the llama style models

authors: Hzfengsy simranKa tqchen

repo: mlc-ai/mlc-llm


text:
[NEURIPS] .zip and .tar.gz archives are not supported for file uploading

.zip and .tar.gz archives are currently not supported for file uploading. What would be needed to implement this feature?

This appears related to https://github.com/mlcommons/croissant/issues/547, so I am closing this issue.

I am reopening this issue per the NeurIPS organizer's recommendation.

Hi, wanted to check what you mean by this. I have a FileObject with a content_url pointing to a publicly available .zip file and I have my encoding_format set to application/zip similar to coco2014 but I'm getting the following error:
GenerationError: An error occured during the streaming generation of the dataset, more specifically during the operation Extract(training_data).
Is this the same issue you're facing? I'm able to get it working if I don't upload a compressed .zip file.

Hi, @JovinLeong. I believe the issue for me is that I'm trying to point to a remote .zip/.tar.gz archive. Good to know that local paths work though!

Okay, then it seems like we're facing the same issue then - which seems odd since the coco2014 example uses a remote .zip. Though tbf it seems like coco2014 isn't working for me anyway

authors: JovinLeong amorehead

repo: mlcommons/croissant


text:
Make sure check pass when no --send-logs option is used

$ jq .results < out/power/client.json
{
  "power/client.log": "86ea663cbf3850fc62b91219e63abdc2fdccc2ea",
  "ranging/mlperf_log_accuracy.json": "855ca7e4e0c1c862e50b76ecfb4184cc39df46fe",
  "ranging/mlperf_log_detail.txt": "5fbe213c37a7a3039e1ec44c10c0a3525436fdfe",
  "ranging/mlperf_log_summary.txt": "0f620e3ffd0a3be62b1894a8ced15a37ac7477db",
  "ranging/mlperf_log_trace.json": "da39a3ee5e6b4b0d3255bfef95601890afd80709",
  "run_1/mlperf_log_accuracy.json": "855ca7e4e0c1c862e50b76ecfb4184cc39df46fe",
  "run_1/mlperf_log_detail.txt": "9615ad6c1fc3d98ca50687f7cddbbf0246769254",
  "run_1/mlperf_log_summary.txt": "ab4e5330b6f772ab8f811d859a744b0dd3d05e66",
  "run_1/mlperf_log_trace.json": "da39a3ee5e6b4b0d3255bfef95601890afd80709"
}

$ jq .results < out/power/server.json
{
  "power/client.json": "9a8875e794b9a20288257a6f6b675d875e40a569",
  "power/client.log": "86ea663cbf3850fc62b91219e63abdc2fdccc2ea",
  "power/ptd_logs.txt": "b440595b0a61987cae44d2c1c3a4a69c11bc8c46",
  "power/server.log": "cd1a0280e0a5a4554f01639ab33111f8adb10564",
  "ranging/spl.txt": "158618b2a6455a76510572a817e62800f6902644",
  "run_1/spl.txt": "c546727aada099fe0da6cb066db35168a24fadea"
}

$ find out -type f  | xargs sha1sum
b440595b0a61987cae44d2c1c3a4a69c11bc8c46  out/power/ptd_logs.txt
9a8875e794b9a20288257a6f6b675d875e40a569  out/power/client.json
f3980d40037baa9fdd880dc0af8a9132cac0034b  out/power/server.json
86ea663cbf3850fc62b91219e63abdc2fdccc2ea  out/power/client.log
cd1a0280e0a5a4554f01639ab33111f8adb10564  out/power/server.log
855ca7e4e0c1c862e50b76ecfb4184cc39df46fe  out/ranging/mlperf_log_accuracy.json
da39a3ee5e6b4b0d3255bfef95601890afd80709  out/ranging/mlperf_log_trace.json
0f620e3ffd0a3be62b1894a8ced15a37ac7477db  out/ranging/mlperf_log_summary.txt
158618b2a6455a76510572a817e62800f6902644  out/ranging/spl.txt
5fbe213c37a7a3039e1ec44c10c0a3525436fdfe  out/ranging/mlperf_log_detail.txt
855ca7e4e0c1c862e50b76ecfb4184cc39df46fe  out/run_1/mlperf_log_accuracy.json
da39a3ee5e6b4b0d3255bfef95601890afd80709  out/run_1/mlperf_log_trace.json
ab4e5330b6f772ab8f811d859a744b0dd3d05e66  out/run_1/mlperf_log_summary.txt
c546727aada099fe0da6cb066db35168a24fadea  out/run_1/spl.txt
9615ad6c1fc3d98ca50687f7cddbbf0246769254  out/run_1/mlperf_log_detail.txt

$ ~/dist/github.com/mlcommons/power/compliance/check.py out ~/dist/github.com/mlcommons/power/ptd_client_server
…
[ ] Check results checksum
	There are absent files 'ranging/mlperf_log_summary.txt, run_1/mlperf_log_summary.txt, run_1/mlperf_log_detail.txt, ranging/mlperf_log_detail.txt' in the results of out/power/server.json
…

In general, we need to make sure the checker pass in all of the following cases:

No --send-logs, and no --fetch-logs, files merged manually. (NVIDIA case, I guess)
Just --fetch-logs, check on the SUT. (Krai case)
Just --send-logs, check on the server.
Both --send-logs and --fetch-logs.

repo: mlcommons/power-dev


text:
Environment setup for Streaming WakeWord

I'm having issues setting up the environment for running the new streaming wakeword demo, and I was wondering if you would mind sending some instructions @jeremy-syn please? Even just something like pip freeze > requirements.txt would be great.
Also, thanks for all the work on the benchmark currently!

I use conda/mamba to manage my environment on my laptop (M1 Mac).  Here's my environment dump from that.  I'll try to put together a proper environment shortly.

name: jh_main
channels:
  - pytorch
  - defaults
  - conda-forge
dependencies:
  - aiohttp=3.9.1=py311h05b510d_0
  - aiosignal=1.3.1=pyhd8ed1ab_0
  - anyio=4.2.0=pyhd8ed1ab_0
  - aom=3.7.1=h463b476_0
  - appnope=0.1.3=pyhd8ed1ab_0
  - argon2-cffi=23.1.0=pyhd8ed1ab_0
  - argon2-cffi-bindings=21.2.0=py311heffc1b2_4
  - arrow=1.3.0=pyhd8ed1ab_0
  - asttokens=2.4.1=pyhd8ed1ab_0
  - async-lru=2.0.4=pyhd8ed1ab_0
  - atk-1.0=2.38.0=hcb7b3dd_1
  - attrs=23.2.0=pyh71513ae_0
  - audioread=3.0.1=py311h267d04e_1
  - babel=2.14.0=pyhd8ed1ab_0
  - beautifulsoup4=4.12.3=pyha770c72_0
  - bleach=6.1.0=pyhd8ed1ab_0
  - blinker=1.7.0=pyhd8ed1ab_0
  - bokeh=3.3.3=pyhd8ed1ab_0
  - brotli=1.1.0=hb547adb_1
  - brotli-bin=1.1.0=hb547adb_1
  - brotli-python=1.1.0=py311ha891d26_1
  - bzip2=1.0.8=h93a5062_5
  - c-ares=1.25.0=h93a5062_0
  - ca-certificates=2023.11.17=hf0a4a13_0
  - cached-property=1.5.2=hd8ed1ab_1
  - cached_property=1.5.2=pyha770c72_1
  - cachetools=5.3.2=pyhd8ed1ab_0
  - cairo=1.18.0=hd1e100b_0
  - certifi=2023.11.17=pyhd8ed1ab_0
  - cffi=1.16.0=py311h4a08483_0
  - charset-normalizer=3.3.2=pyhd8ed1ab_0
  - click=8.1.7=unix_pyh707e725_0
  - colorama=0.4.6=pyhd8ed1ab_0
  - comm=0.2.1=pyhd8ed1ab_0
  - contourpy=1.2.0=py311hd03642b_0
  - cryptography=41.0.7=py311h08c85a6_1
  - cycler=0.12.1=pyhd8ed1ab_0
  - dav1d=1.2.1=hb547adb_0
  - debugpy=1.8.0=py311ha891d26_1
  - decorator=5.1.1=pyhd8ed1ab_0
  - defusedxml=0.7.1=pyhd8ed1ab_0
  - entrypoints=0.4=pyhd8ed1ab_0
  - exceptiongroup=1.2.0=pyhd8ed1ab_2
  - executing=2.0.1=pyhd8ed1ab_0
  - expat=2.5.0=hb7217d7_1
  - ffmpeg=6.1.1=gpl_ha63e52a_101
  - filelock=3.13.1=pyhd8ed1ab_0
  - font-ttf-dejavu-sans-mono=2.37=hab24e00_0
  - font-ttf-inconsolata=3.000=h77eed37_0
  - font-ttf-source-code-pro=2.038=h77eed37_0
  - font-ttf-ubuntu=0.83=h77eed37_1
  - fontconfig=2.14.2=h82840c6_0
  - fonts-conda-ecosystem=1=0
  - fonts-conda-forge=1=0
  - fonttools=4.47.2=py311h05b510d_0
  - fqdn=1.5.1=pyhd8ed1ab_0
  - freetype=2.12.1=hadb7bae_2
  - fribidi=1.0.10=h27ca646_0
  - frozenlist=1.4.1=py311h05b510d_0
  - fsspec=2023.12.2=pyhca7485f_0
  - gdk-pixbuf=2.42.10=h15fa40c_4
  - gdown=4.7.3=pyhd8ed1ab_0
  - gettext=0.21.1=h0186832_0
  - giflib=5.2.1=h1a8c8d9_3
  - gmp=6.3.0=h965bd2d_0
  - gmpy2=2.1.2=py311h2ba9262_1
  - gnutls=3.7.9=hd26332c_0
  - google-api-core=2.15.0=pyhd8ed1ab_0
  - google-api-python-client=2.114.0=pyhd8ed1ab_0
  - google-auth=2.26.2=pyhca7485f_0
  - google-auth-httplib2=0.2.0=pyhd8ed1ab_0
  - google-auth-oauthlib=1.2.0=pyhd8ed1ab_0
  - googleapis-common-protos=1.62.0=pyhd8ed1ab_0
  - graphite2=1.3.13=h9f76cd9_1001
  - graphviz=9.0.0=h3face73_1
  - gtk2=2.24.33=h7895bb2_3
  - gts=0.7.6=he42f4ea_4
  - harfbuzz=8.3.0=h8f0ba13_0
  - hdf5=1.14.3=nompi_h5bb55e9_100
  - httplib2=0.22.0=pyhd8ed1ab_0
  - icu=73.2=hc8870d7_0
  - idna=3.6=pyhd8ed1ab_0
  - imageio=2.33.1=pyh8c1a49c_0
  - importlib-metadata=7.0.1=pyha770c72_0
  - importlib_metadata=7.0.1=hd8ed1ab_0
  - importlib_resources=6.1.1=pyhd8ed1ab_0
  - ipykernel=6.29.0=pyh3cd1d5f_0
  - ipython=8.20.0=pyh707e725_0
  - isoduration=20.11.0=pyhd8ed1ab_0
  - jasper=4.1.2=h7c0e182_0
  - jedi=0.19.1=pyhd8ed1ab_0
  - jinja2=3.1.3=pyhd8ed1ab_0
  - joblib=1.3.2=pyhd8ed1ab_0
  - json5=0.9.14=pyhd8ed1ab_0
  - jsonpointer=2.4=py311h267d04e_3
  - jsonschema=4.21.0=pyhd8ed1ab_0
  - jsonschema-specifications=2023.12.1=pyhd8ed1ab_0
  - jsonschema-with-format-nongpl=4.21.0=pyhd8ed1ab_0
  - jupyter-lsp=2.2.2=pyhd8ed1ab_0
  - jupyter_client=8.6.0=pyhd8ed1ab_0
  - jupyter_core=5.7.1=py311h267d04e_0
  - jupyter_events=0.9.0=pyhd8ed1ab_0
  - jupyter_server=2.12.5=pyhd8ed1ab_0
  - jupyter_server_terminals=0.5.1=pyhd8ed1ab_0
  - jupyterlab=4.0.10=pyhd8ed1ab_0
  - jupyterlab_pygments=0.3.0=pyhd8ed1ab_0
  - jupyterlab_server=2.25.2=pyhd8ed1ab_0
  - kiwisolver=1.4.5=py311he4fd1f5_1
  - krb5=1.21.2=h92f50d5_0
  - lame=3.100=h1a8c8d9_1003
  - lazy_loader=0.3=pyhd8ed1ab_0
  - lcms2=2.16=ha0e7c42_0
  - lerc=4.0.0=h9a09cb3_0
  - libabseil=20230802.1=cxx17_h13dd4ca_0
  - libaec=1.1.2=h13dd4ca_1
  - libass=0.17.1=hf7da4fe_1
  - libblas=3.9.0=20_osxarm64_openblas
  - libbrotlicommon=1.1.0=hb547adb_1
  - libbrotlidec=1.1.0=hb547adb_1
  - libbrotlienc=1.1.0=hb547adb_1
  - libcblas=3.9.0=20_osxarm64_openblas
  - libcurl=8.5.0=h2d989ff_0
  - libcxx=16.0.6=h4653b0c_0
  - libdeflate=1.19=hb547adb_0
  - libedit=3.1.20191231=hc8eb9b7_2
  - libev=4.33=h93a5062_2
  - libexpat=2.5.0=hb7217d7_1
  - libffi=3.4.2=h3422bc3_5
  - libflac=1.4.3=hb765f3a_0
  - libgd=2.3.3=hfdf3952_9
  - libgfortran=5.0.0=13_2_0_hd922786_1
  - libgfortran5=13.2.0=hf226fd6_1
  - libglib=2.78.3=hb438215_0
  - libhwloc=2.9.3=default_h4394839_1009
  - libiconv=1.17=h0d3ecfb_2
  - libidn2=2.3.4=h1a8c8d9_0
  - libjpeg-turbo=3.0.0=hb547adb_1
  - liblapack=3.9.0=20_osxarm64_openblas
  - liblapacke=3.9.0=20_osxarm64_openblas
  - libllvm14=14.0.6=hd1a9a77_4
  - libnghttp2=1.58.0=ha4dd798_1
  - libogg=1.3.4=h27ca646_1
  - libopenblas=0.3.25=openmp_h6c19121_0
  - libopencv=4.9.0=py311h22734c1_5
  - libopenvino=2023.2.0=he6dadac_3
  - libopenvino-arm-cpu-plugin=2023.2.0=he6dadac_3
  - libopenvino-auto-batch-plugin=2023.2.0=hc9f00d9_3
  - libopenvino-auto-plugin=2023.2.0=hc9f00d9_3
  - libopenvino-hetero-plugin=2023.2.0=hf483cef_3
  - libopenvino-ir-frontend=2023.2.0=hf483cef_3
  - libopenvino-onnx-frontend=2023.2.0=h7939876_3
  - libopenvino-paddle-frontend=2023.2.0=h7939876_3
  - libopenvino-pytorch-frontend=2023.2.0=hebf3989_3
  - libopenvino-tensorflow-frontend=2023.2.0=he0d35a2_3
  - libopenvino-tensorflow-lite-frontend=2023.2.0=hebf3989_3
  - libopus=1.3.1=h27ca646_1
  - libpng=1.6.39=h76d750c_0
  - libprotobuf=4.24.4=hc9861d8_0
  - librosa=0.10.1=pyhd8ed1ab_0
  - librsvg=2.56.3=h55a2576_1
  - libsndfile=1.2.2=h9739721_1
  - libsodium=1.0.18=h27ca646_1
  - libsqlite=3.44.2=h091b4b1_0
  - libssh2=1.11.0=h7a5bd25_0
  - libtasn1=4.19.0=h1a8c8d9_0
  - libtiff=4.6.0=ha8a6c65_2
  - libtorch=2.1.0=cpu_generic_h51f0bcf_2
  - libunistring=0.9.10=h3422bc3_0
  - libuv=1.46.0=hb547adb_0
  - libvorbis=1.3.7=h9f76cd9_0
  - libvpx=1.13.1=hb765f3a_0
  - libwebp=1.3.2=hf30222e_1
  - libwebp-base=1.3.2=hb547adb_0
  - libxcb=1.15=hf346824_0
  - libxml2=2.12.4=h0d0cfa8_1
  - libzlib=1.2.13=h53f4e23_5
  - lightning-utilities=0.10.0=pyhd8ed1ab_0
  - llvm-openmp=17.0.6=hcd81f8e_0
  - llvmlite=0.41.1=py311hf5d242d_0
  - markupsafe=2.1.3=py311heffc1b2_1
  - matplotlib=3.8.2=py311ha1ab1f8_0
  - matplotlib-base=3.8.2=py311hfdba5f6_0
  - matplotlib-inline=0.1.6=pyhd8ed1ab_0
  - mistune=3.0.2=pyhd8ed1ab_0
  - mpc=1.3.1=h91ba8db_0
  - mpfr=4.2.1=h9546428_0
  - mpg123=1.32.4=hebf3989_0
  - mpmath=1.3.0=pyhd8ed1ab_0
  - msgpack-python=1.0.7=py311hd03642b_0
  - multidict=6.0.4=py311he2be06e_1
  - munkres=1.1.4=pyh9f0ad1d_0
  - nbclient=0.8.0=pyhd8ed1ab_0
  - nbconvert-core=7.14.2=pyhd8ed1ab_0
  - nbformat=5.9.2=pyhd8ed1ab_0
  - ncurses=6.4=h463b476_2
  - nest-asyncio=1.5.9=pyhd8ed1ab_0
  - nettle=3.9.1=h40ed0f5_0
  - networkx=3.2.1=pyhd8ed1ab_0
  - nomkl=1.0=h5ca1d4c_0
  - notebook-shim=0.2.3=pyhd8ed1ab_0
  - numba=0.58.1=py311h9ec4793_0
  - numpy=1.26.3=py311h7125741_0
  - oauthlib=3.2.2=pyhd8ed1ab_0
  - opencv=4.9.0=py311h24019a2_5
  - openh264=2.4.0=h965bd2d_0
  - openjpeg=2.5.0=h4c1507b_3
  - openssl=3.2.0=h0d3ecfb_1
  - overrides=7.4.0=pyhd8ed1ab_0
  - p11-kit=0.24.1=h29577a5_0
  - packaging=23.2=pyhd8ed1ab_0
  - pandas=2.1.4=py311h6e08293_0
  - pandocfilters=1.5.0=pyhd8ed1ab_0
  - pango=1.50.14=hcf40dda_2
  - parso=0.8.3=pyhd8ed1ab_0
  - patsy=0.5.6=pyhd8ed1ab_0
  - pcre2=10.42=h26f9a81_0
  - pexpect=4.8.0=pyh1a96a4e_2
  - pickleshare=0.7.5=py_1003
  - pillow=10.2.0=py311hb9c5795_0
  - pip=23.3.2=pyhd8ed1ab_0
  - pixman=0.43.0=hebf3989_0
  - pkgutil-resolve-name=1.3.10=pyhd8ed1ab_1
  - platformdirs=4.1.0=pyhd8ed1ab_0
  - pooch=1.8.0=pyhd8ed1ab_0
  - portaudio=19.6.0=h13dd4ca_9
  - prometheus_client=0.19.0=pyhd8ed1ab_0
  - prompt-toolkit=3.0.42=pyha770c72_0
  - psutil=5.9.7=py311h05b510d_0
  - pthread-stubs=0.4=h27ca646_1001
  - ptyprocess=0.7.0=pyhd3deb0d_0
  - pugixml=1.14=h13dd4ca_0
  - pure_eval=0.2.2=pyhd8ed1ab_0
  - py-opencv=4.9.0=py311hee96954_5
  - pyasn1=0.5.1=pyhd8ed1ab_0
  - pyasn1-modules=0.3.0=pyhd8ed1ab_0
  - pycparser=2.21=pyhd8ed1ab_0
  - pydot=2.0.0=py311h267d04e_0
  - pygments=2.17.2=pyhd8ed1ab_0
  - pyjwt=2.8.0=pyhd8ed1ab_0
  - pyobjc-core=10.1=py311h665608e_0
  - pyobjc-framework-cocoa=10.1=py311h665608e_0
  - pyopenssl=23.3.0=pyhd8ed1ab_0
  - pyparsing=3.1.1=pyhd8ed1ab_0
  - pysocks=1.7.1=pyha2e5f31_6
  - pysoundfile=0.12.1=pyhd8ed1ab_0
  - python=3.11.7=hdf0ec26_1_cpython
  - python-dateutil=2.8.2=pyhd8ed1ab_0
  - python-fastjsonschema=2.19.1=pyhd8ed1ab_0
  - python-json-logger=2.0.7=pyhd8ed1ab_0
  - python-sounddevice=0.4.6=pyhd8ed1ab_0
  - python-tzdata=2023.4=pyhd8ed1ab_0
  - python_abi=3.11=4_cp311
  - pytorch=2.1.0=cpu_generic_py311hf9c669c_2
  - pytorch-lightning=2.1.3=pyhd8ed1ab_0
  - pytz=2023.3.post1=pyhd8ed1ab_0
  - pyu2f=0.1.5=pyhd8ed1ab_0
  - pyyaml=6.0.1=py311heffc1b2_1
  - pyzmq=25.1.2=py311h6727e71_0
  - readline=8.2=h92ec313_1
  - referencing=0.32.1=pyhd8ed1ab_0
  - requests=2.31.0=pyhd8ed1ab_0
  - requests-oauthlib=1.3.1=pyhd8ed1ab_0
  - rfc3339-validator=0.1.4=pyhd8ed1ab_0
  - rfc3986-validator=0.1.1=pyh9f0ad1d_0
  - rpds-py=0.17.1=py311h94f323b_0
  - rsa=4.9=pyhd8ed1ab_0
  - scikit-learn=1.3.2=py311ha25ca4d_2
  - scipy=1.11.4=py311h2b215a9_0
  - seaborn=0.13.1=hd8ed1ab_0
  - seaborn-base=0.13.1=pyhd8ed1ab_0
  - send2trash=1.8.2=pyhd1c38e8_0
  - setuptools=69.0.3=pyhd8ed1ab_0
  - six=1.16.0=pyh6c4a22f_0
  - sleef=3.5.1=h156473d_2
  - snappy=1.1.10=h17c5cce_0
  - sniffio=1.3.0=pyhd8ed1ab_0
  - soupsieve=2.5=pyhd8ed1ab_1
  - soxr=0.1.3=h5008568_3
  - soxr-python=0.3.7=py311h9ea6feb_0
  - stack_data=0.6.2=pyhd8ed1ab_0
  - statsmodels=0.14.1=py311h9ea6feb_0
  - svt-av1=1.8.0=h463b476_0
  - sympy=1.12=pypyh9d50eac_103
  - tbb=2021.11.0=h6aa02a4_0
  - terminado=0.18.0=pyh31c8845_0
  - threadpoolctl=3.2.0=pyha21a80b_0
  - tinycss2=1.2.1=pyhd8ed1ab_0
  - tk=8.6.13=h5083fa2_1
  - tomli=2.0.1=pyhd8ed1ab_0
  - torchaudio=2.1.0=py311_cpu
  - torchmetrics=1.2.1=pyhd8ed1ab_0
  - torchvision=0.16.1=cpu_py311h92b70d4_2
  - tornado=6.3.3=py311heffc1b2_1
  - tqdm=4.66.1=pyhd8ed1ab_0
  - traitlets=5.14.1=pyhd8ed1ab_0
  - types-python-dateutil=2.8.19.20240106=pyhd8ed1ab_0
  - typing-extensions=4.9.0=hd8ed1ab_0
  - typing_extensions=4.9.0=pyha770c72_0
  - typing_utils=0.1.0=pyhd8ed1ab_0
  - tzdata=2023d=h0c530f3_0
  - uri-template=1.3.0=pyhd8ed1ab_0
  - uritemplate=4.1.1=pyhd8ed1ab_0
  - urllib3=2.1.0=pyhd8ed1ab_0
  - wcwidth=0.2.13=pyhd8ed1ab_0
  - webcolors=1.13=pyhd8ed1ab_0
  - webencodings=0.5.1=pyhd8ed1ab_2
  - websocket-client=1.7.0=pyhd8ed1ab_0
  - wheel=0.42.0=pyhd8ed1ab_0
  - x264=1!164.3095=h57fd34a_2
  - x265=3.5=hbc6ce65_3
  - xorg-libxau=1.0.11=hb547adb_0
  - xorg-libxdmcp=1.1.3=h27ca646_0
  - xyzservices=2023.10.1=pyhd8ed1ab_0
  - xz=5.2.6=h57fd34a_0
  - yaml=0.2.5=h3422bc3_2
  - yarl=1.9.4=py311h05b510d_0
  - zeromq=4.3.5=h965bd2d_0
  - zipp=3.17.0=pyhd8ed1ab_0
  - zlib=1.2.13=h53f4e23_5
  - zstd=1.5.5=h4f39d0f_0
  - pip:
    - absl-py==1.4.0
    - astor==0.8.1
    - astunparse==1.6.3
    - cleanlab==2.5.0
    - dm-tree==0.1.8
    - etils==1.6.0
    - flatbuffers==23.5.26
    - gast==0.5.4
    - gitdb==4.0.11
    - gitpython==3.1.41
    - google-pasta==0.2.0
    - grpcio==1.49.1
    - h5py==3.10.0
    - iniconfig==2.0.0
    - jupyter-server-mathjax==0.2.6
    - kagglehub==0.1.5
    - keras==2.15.0
    - keras-core==0.1.7
    - keras-cv==0.8.1
    - keras-tuner==1.4.6
    - kt-legacy==1.0.5
    - latexcodec==2.0.1
    - libclang==16.0.6
    - markdown==3.5.2
    - markdown-it-py==3.0.0
    - mdurl==0.1.2
    - ml-dtypes==0.2.0
    - namex==0.0.7
    - nbdime==4.0.1
    - opt-einsum==3.3.0
    - pluggy==1.3.0
    - promise==2.3
    - protobuf==3.20.3
    - pyaudio==0.2.14
    - pybtex==0.24.0
    - pydub==0.25.1
    - pytest==7.4.4
    - regex==2023.12.25
    - rich==13.7.0
    - scikeras==0.11.0
    - smmap==5.0.1
    - tensorboard==2.15.1
    - tensorboard-data-server==0.7.2
    - tensorflow==2.15.0
    - tensorflow-addons==0.23.0
    - tensorflow-datasets==4.9.4
    - tensorflow-docs==2024.1.17.4828
    - tensorflow-estimator==2.15.0
    - tensorflow-io-gcs-filesystem==0.34.0
    - tensorflow-macos==2.15.0
    - tensorflow-metadata==1.14.0
    - tensorflow-metal==1.1.0
    - tensorflow-model-optimization==0.7.5
    - termcolor==2.4.0
    - toml==0.10.2
    - torch==2.1.0.post2
    - typeguard==2.13.3
    - werkzeug==3.0.1
    - wrapt==1.14.1
prefix: /Users/jeremy/miniforge3/envs/jh_main

Thanks for sharing! I think I was having issues with the tensorflow-model-optimization library, all sorted now. For reference, I've found the following packages are required:
matplotlib==3.8.2
tensorflow==2.15.0
tensorflow-model-optimization==0.7.5
notebook
seaborn==0.13.1
scipy==1.11.4

authors: AlexMontgomerie jeremy-syn

repo: mlcommons/tiny


text:
Added ValueDescription for std::array (MLDB-1881)

Trivial change to allow std::array to be used in ValueDescriptions.

+! with a small question

authors: jeremybarnes steadtler

repo: mldbai/mldb


text:
Self-use load

Hello,
recently I found a diag message "Self-use load light". In last month there was a different behaviour with my inverter (ET 8k) and from the statistic I see that the energy from battery is not fully used. Some minor power is still imported from grid even if battery is fully charged. Before I reached 98% self-sufficiency, now I reach maximum 80% on sunny days when nobody is home.
This behaviour started after I played a little bit with eco modes from current Goodwe integration in HA.

Obviously I change something, but I am not avare of what. Has anybody same experience and solved it somehow?

I am having some issues with SOC indication aswell since i started playing with eco mode to charge at night. @mletenay is that possible?

repo: mletenay/home-assistant-goodwe-inverter


text:
Any web demo?

Great work! Could you please provide a web demo?

Sorry for the very delayed response. We are currently looking into this and will update here when ready.

I just opened a demo here https://huggingface.co/spaces/jmercat/DCLM-demo

authors: MontaEllis afang-story jmercat

repo: mlfoundations/dclm


text:
Selection of SCARED dataset

Hello!
That's an excellent job, thanks for sharing.
The paper mentioned that 315 pictures of the SCARED data set were selected. I want to know how did you select them?
And have you noticed that the calibration parameters of the fourth and fifth data sets are incorrect?
The  interpolated depth and the video frame seem to be misaligned...

Hi @SuperAKK, thanks for reaching out.
I directly sampled the images every 50 frames to avoid double counting of similar scenes. I also excluded images that have fewer than 5% valid dispairties. Because the depth are interpolated from keyframes, therefore there are cases only few (e.g. 2 or 3) pixels have valid disparity. Then you get 100% or 0% for 3px error (because the samples are too few), which does not make sense to be included in the statistics.
And you are correct, the 4th and 5th data set are very off... I think the result from dataset 1,2,3 is more reliable since the calibration parameter is reasonable. Therefore, for a more proper comparison, you should leave those ones out. I hope this helps.


text:
Adjust Manage Users button to redirect to user list when edit-user component is loaded

Because it is a component, the Manage Users button doesn't adjust the page when on the edit user side of the page. This should reset back to the list

Btw, this should also apply to groups and test catalog.

authors: sebastian-echeverria sei-aderr

repo: mlte-team/mlte


text:
Bug with readthedocs integration

There is a bug with the readthedocs integration, since its yaml file is still pointing to the old requirements file that was removed from docs and merged into pyproject. Update yaml file to get dependencies from pyproject toml file.

Closed by #487


text:
Check Web site: http://mltsp.io/

It's currently down, so it might be worth considering backups or more reliable third party hosting such as ReadTheDocs.

Can you check again?  The website is hosted on GitHub, so it should be
very reliable.  The docs are already hosted on readthedocs.org.

... and it's back! I was getting an nginx error.

The problem seems to be back.  I'll investigate further.

Looks like a problem on the DNS provider side: I've notified them
of the issue.

fixed on DNS provider side.

authors: esafak profjsb stefanv

repo: mltsp/mltsp


text:
Migrated from the javax to the jakarta namespace

Hello,
First of all, thanks for providing and maintaining rescu!
In relation to #142 here's a pull request to use jakarta.ws.rs. The changes should be quite straightforward however this means that going forward rescu will not support javax.ws.rs anymore.
Maybe a javax maintenance branch could be created to keep publishing fix versions (e.g. if a security vulnerability is fixed)?

I'm on vacation, I'll have a look next week.

I guess I can release this as a new major version 3.0.0 as it is backwards-incompatible. How does that sound?

I agree that it should be a new major version, that's how most projects seem to be handling the javax/jakarta switch

Merged and released in rescu 3.0. @gtoison , thanks for the PR.

I noticed the new release is not compatible with Java 8 due to dependency upgrades, among others jakarta.ws.rs-api 3.1.0.
I see two options:

Keep using the newest versions of dependencies and stop supporting Java 8,
Downgrade some dependencies, e.g. jakarta.ws.rs-api to 3.0.0, and keep support for Java 8.

Any opinions?

Here are all the version changes necessary to support Java 8:

jakarta.ws.rs-api : from 3.1.0  to 3.0.0 (November 2020)
testng: from 7.7.1 to 7.5  (January 2022)
mockito-core: from 5.1.1. to 4.11.0 (December 2022)

Jakarta 10 requires Java 11 or above, so the intersection of projects looking to migrate to Jakarta while also remaining on Java 8 should rather small

Thanks. I'll drop support for Java 8.

I've also created a branch with latest dependency versions that support java 8:
https://github.com/mmazi/rescu/tree/java-8-support

authors: gtoison mmazi

repo: mmazi/rescu


text:
Wrong convertion from fahrenheit to celcius

if(to == "c" || to == "celsius") {
result = (value - 32) * 9/5; <-- should be 5/9
}

Tnx for info! Fixed!

authors: Alvin-Voo mmcarlsson

repo: mmcarlsson/convertis


text:
screenshots incorrectly attached to Allure report

Hi,
I'm using the latest version of the plugin i.e. 0.15.2 and I've encountered a few issues when working with screenshots (taken using native cy.screenshot() )
ISSUE#1  Screenshots get readded to consecutive tests
As an example test structure, I have:

Test Suite 1
** Test 1
** Test 2
Test Suite 2
** Test 1

I also have a common method which is used across all tests and takes a screenshot of an element I captured with cy.get
The problem is that when this is called in Test Suite 1 / Test 1 and then in Test 2 and further in Test Suite 2 / Test 1, it's all pilled together and by the time it reaches the test in Test Suite 2, there are 3 identical screenshots attached to that test.
So in the end I have:

Test Suite 1
** Test 1 - screenshot.png
** Test 2 -  screenshot.png,  screenshot.png
Test Suite 2
** Test 1 -  screenshot.png,  screenshot.png,  screenshot.png

ISSUE#2 Screenshots are added to the bottom of steps list instead of under specific step
This would be great if there was an option to have screenshots under specific steps, i.e. if I have method() that has a step inside its body as well as screenshot(), that screenshot would appear under the step in Allure report.
Thanks in advance for any feedback!

@drsens hello!
It would be really helpful if you could add test/spec examples so I could understand the issues better.

@mmisty surething, I'll try to put some code snippets, though not able to share the full repo example at the minute. Hopefully the below explains it better though!
Regarding ISSUE#1:
I'm using Page Object Model so I have a few different files representing objects in my website. One of them is the login page and it has a method like:
submitLoginForm() {
        cy.allure().startStep('Submitting login form');
        this.SUBMIT_FORM().click();
        this.navigation.closeNavigation();
        cy.get('[aria-label="User profile"]').screenshot().should('be.visible');
        cy.allure().endStep();
}

Now in my test/spec files I have one that contains 3 tests, all of them calling the same method somewhere throughout the test:
it('test 1', () => {
        ...
        loginPage.submitLoginForm();
});

it('test 2', () => {
        ...
        loginPage.submitLoginForm();
});

it('test 3', () => {
        ...
        loginPage.submitLoginForm();
});

If I run the full suite with 3 tests, the outcome I see is:

test 1 has a single screenshot attached in allure report
test 2 has two screenshots attached in allure report
test 3 has three screenshots attached in allure report

The method with screenshot is only called ONCE per  each test so each test should only have ONE screenshot. What actually happens is that screenshots from previous tests also get added to the next tests, so each consecutive test has more and more screenshots if the method is called in next tests.
Regarding ISSUE#2
I'm using startStep/endStep like in submitLoginForm() method above, with screenshot taken inside the body. My expectation would be that this screenshot is attached under this specific step in Allure report (in this case 'Submitting login form'), but what happens is that all screenshots are at the very end of the report, under all steps.
I did some digging and testing and found out that it's most likely because in cypress-allure-adapter/tree/main/src/setup/screenshots.ts you are using:
Cypress.Allure.testFileAttachment(basename(path), path, getContentType(path));
and that is attaching all screenshots to the end of the steps list. Based on my tests, using:
Cypress.Allure.fileAttachment instead is correctly attaching screenshots under steps where these screenshots were taken.
I also looked at the "screenshot fix" Pull Request that you have and you've also switched to using Cypress.Allure.fileAttachment there :) seems like that's the culprit of the issue.
Let me know if something is still unclear, thanks!

@drsens
issue2: accepted. Yes, currently all screenshot attached to a test, not to a step. Will add setting to change that.
issue1: cannot reproduce:
test
describe('screenshot', () => {
  describe('screenshot @screen', () => {
    beforeEach(()=> {
      visitHtml();
    });

    it('test 1', () => {
      cy.allure().startStep('step 1');
      cy.screenshot();3
      cy.allure().endStep();
    });

    it('test 2', () => {
      cy.allure().startStep('step 1');
      cy.screenshot();
      cy.allure().endStep();
    });

    it('test 3', () => {
      cy.allure().startStep('step 1');
      cy.screenshot();
      cy.allure().endStep();
    });
  });
});

result:

@mmisty good to know regarding issue#2, it will definitely make the reports look nicer once it's available in the upcoming version of the plugin.
As for issue#1, I think I managed to get to the bottom of the problem. It appears that the duplication occurs when you assign a filename to the screenshots taken, for example in my case it would be:
cy.get('[aria-label="User profile"]').screenshot('nice screenshot').should('be.visible');

It's fine when the filenames are different, but since I'm reusing my single method in different tests, I get names like:
screenshot.png
screenshot (1).png
screenshot (2).png

In your example, try changing all your cy.screenshot() lines to cy.screenshot('customName') and rerun the tests. You should get 3 screenshots in your cypress/screenshots folder:
customName.png
customName (1).png
customName (2).png

but in allure-reports, you should get 6 screenshots instead of 3 and you should see the issue I was facing.
Please let me know when you'll have a moment to try and how that went :) many thanks!

@drsens Ok thank you for letting me know.
Now we know that there is workaround for the issue 1- you can add timestamp to screenshot names and it should be good.
Anyway I'll try to fix it.

@mmisty yeah that's exactly what I'm gonna do, I think I wanted to add timestamps to names anyways so it's okay 👍
in which case the "attach screenshots to steps" fix is the one I would be waiting for :D

@drsens both issues should be resolved in 0.16.0 version

authors: drsens mmisty

repo: mmisty/cypress-allure-adapter


text:
No error with a non-existing config file

When specify a non-existing file with "-c" option, no error occurs.  It should fail to execute.

With the current implementation (0.4.10), the default configuration values are used even if the specified file does not exist.  The original intention to provide the default configuration values is to enable to run without a configuration file.  The cause of this issue is not to distinguish the following cases:
a. configuration file does not exist without "-c" option,
b. configuration file does not exist with "-c" option.
The correct behavior would:

use the default values if and only if a configuration files is not specified and the default configuration file does not exist,
fail to execute if the specified configuration file (with "-c" option) does not exist.

repo: mnbi/rbnotes


text:
[Question / Bug?]:  warnings when interpolating channels

I get these warnings when I try to interpolate bad channels:
Computing interpolation matrix from 60 sensor positions
Interpolating 0 sensors
    Computing dot products for 291 coils...
    Computing cross products for coils 291 x 15 coils...
    Preparing the mapping matrix...
reproduce_proj.py:10: RuntimeWarning: Projection vector "PCA-v1" has magnitude 0.99 (should be unity), applying projector with 87/102 of the original channels available may be dangerous, consider recomputing and adding projection vectors for channels that are eventually used. If this is intentional, consider using info.normalize_proj()

Projection vector "PCA-v1" has magnitude 0.99 (should be unity), applying projector with 87/102 of the original channels available may be dangerous, consider recomputing and adding projection vectors for channels that are eventually used. If this is intentional, consider using info.normalize_proj()
reproduce_proj.py:10: RuntimeWarning: Projection vector "PCA-v2" has magnitude 0.96 (should be unity), applying projector with 87/102 of the original channels available may be dangerous, consider recomputing and adding projection vectors for channels that are eventually used. If this is intentional, consider using info.normalize_proj()

Projection vector "PCA-v2" has magnitude 0.96 (should be unity), applying projector with 87/102 of the original channels available may be dangerous, consider recomputing and adding projection vectors for channels that are eventually used. If this is intentional, consider using info.normalize_proj()
reproduce_proj.py:10: RuntimeWarning: Projection vector "PCA-v3" has magnitude 0.86 (should be unity), applying projector with 87/102 of the original channels available may be dangerous, consider recomputing and adding projection vectors for channels that are eventually used. If this is intentional, consider using info.normalize_proj()

Projection vector "PCA-v3" has magnitude 0.86 (should be unity), applying projector with 87/102 of the original channels available may be dangerous, consider recomputing and adding projection vectors for channels that are eventually used. If this is intentional, consider using info.normalize_proj()
    [Truncate at 79 missing 0.0001]

The code to reproduce is here:
from mne import io
from mne.datasets import sample

data_path = sample.data_path()
raw_fname = data_path + '/MEG/sample/sample_audvis_filt-0-40_raw.fif'
raw = io.read_raw_fif(raw_fname, preload=True)

raw.info['bads'] = raw.info['ch_names'][2:306:3][:15]

raw.interpolate_bads()

It appears to be somehow related to this: https://github.com/mne-tools/mne-python/blob/master/mne/forward/_field_interpolation.py#L64-L65 but I'm not super sure what's going on. Any clues @Eric89GXL or @agramfort ?

A protection operator is being applied using fewer channels than were
originally used to compute the projection vectors, which can be dangerous
in some circumstances, thus the warning. Can we make the message clearer
somehow?
In this case they are empty room / acquisition machine projection vectors,
so it is probably okay.

okay, but why do we need to apply the projection vectors here? this is not something we do with EEG interpolation. To me, the user should apply it before in the pipeline.

One reason is that we are creating a minimum norm solution, so we apply
proj when doing it just like we do in standard inversion. There could be
good mathematical reasons for always doing that but we'll have to ask Matti
if we're really curious. But I think the idea is that if the projectors are
there, we assume they should be applied during inversion.

okay, I see. I am really curious :) The reason I ask is that when you compute a mapping matrix for 306 x 306 channels vs 305 x 1, it seems intuitive that they should be exactly the same if you drop the diagonal elements. That is, the quantity printed in the last two lines of this code:
from mne import io, pick_info
from mne.datasets import sample
from mne.forward import _map_meg_channels

data_path = sample.data_path()
raw_fname = data_path + '/MEG/sample/sample_audvis_filt-0-40_raw.fif'
raw = io.read_raw_fif(raw_fname, preload=True)

raw.pick_types(meg=True, stim=False, exclude=[])

info_from = raw.info.copy()
info_to = raw.info.copy()

mapping = _map_meg_channels(info_from, info_to, 'accurate')

info_from = pick_info(info_from, range(1, 306))
info_to = pick_info(info_to, [0])

mapping_slice = _map_meg_channels(info_from, info_to, 'accurate')

print(mapping_slice[0, :5])
print(mapping[0, 1:6])

mapping_slice[0, :5] and mapping[0, 1:6] should exactly be the same. However, this is the case only when I disable the proj in the MNE code.

what do you suggest? improving the doc? better warning?

I suggest getting rid of the warning since it's not clear what the warning means in the context of channel interpolation. Further, if I try to do epoch-wise interpolation, I'm being flooded by these warnings.
Maybe something like this would work? I don't seem to see any qualitative difference in the interpolation if I remove the proj ...

If you want to go that route you'll have to ask Matti why the projections are used (maybe just for denoising?)
It's probably okay to silence the warnings with verbose='error', but it seems a bit risky

@jasmainak try removing the projs from the info and see if it affects your
results.
you can silence for you the warnings with verbose='error' indeed.

okay, sounds like doing verbose='error' could be a "fix". But it's not exposed for raw.interpolate_bads(). I want to suppress the warnings only for this method, not everywhere.

Pass verbose='error' param only within some call inside interpolate_bads,
probably make_projector or so

Actually a better fix is to call info.normalize_proj before passing it along

okay, so there is something to fix in MNE master? should I make a PR?

You could do it in your own code before calling the interpolation function
for now. Not sure if we want it in master or not. Maybe?

Up for a PR @jasmainak?

@Eric89GXL did you change your mind whether this needs to be in master? I also see the problem if I pick channels after making epochs and then do epochs.plot()

Were you able to fix it in your own code by calling the normalization function? If so I guess we don't need a PR.

I haven't looked into yet because I've been working with data without proj. If you keep it open, I might get around to it when I'm hacking on MNE code. No strong feelings either way.

I'll go ahead and close this one, feel free to reopen if it comes up again/often @jasmainak

authors: Eric89GXL agramfort jasmainak

repo: mne-tools/mne-python


text:
Doubts about pipeline and ICA

Dear MNErs, I've got several questions regarding the processing pipeline I'm trying to set up.
First of all, here's what I do for each participants (using mne 15) :
import neurokit as nk
import mne
import autoreject

...
# Reading raw and loading conditions list
...

print("    - Filtering")
raw.filter(1, 40, picks=None, filter_length='auto', l_trans_bandwidth='auto', h_trans_bandwidth='auto', n_jobs=1, method='fir', iir_params=None, phase='zero', fir_window='hamming', verbose=None, fir_design="firwin")

print("    - Epoching")
raw, events, event_id = nk.eeg_add_events(raw, events_channel="PHOTO", cut="lower", conditions=conditions)
epochs = mne.Epochs(raw, events, event_id, tmin=-0.25, tmax=3, baseline=(None, 0), reject=None, verbose=False, detrend=1, preload=True)
epochs.resample(200, npad="auto")

print("    - ICA")
reject = autoreject.compute_thresholds(epochs, picks=mne.pick_types(epochs.info, meg=False, eeg=True), verbose=False)
ica = mne.preprocessing.ICA(n_components=0.95, method='fastica', max_iter=500)
ica = ica.fit(epochs, picks=mne.pick_types(epochs.info, meg=False, eeg=True), decim=3, reject=reject)
# Note that this, for several participants, returns a RuntimeError: one PCA component captures most of the variance, please increase treshold. But it does that even if I set n_components to 0.999 :/
ica = ica.detect_artifacts(epochs, eog_ch=epochs.copy().pick_types( meg=False, eeg=False, eog=True).ch_names, eog_criterion=0.1, skew_criterion=-0.5, kurt_criterion=-0.5, var_criterion=0)
epochs = ica.apply(epochs)

print("    - Autoreject")
ar =  autoreject.LocalAutoRejectCV(verbose=False, picks=mne.pick_types(epochs.info, meg=False, eeg=True))
epochs = ar.fit_transform(epochs)

print("    - Rereference")
epochs.set_eeg_reference(ref_channels=None, projection=False)

My goal is to do ERP analysis mainly, and especially looking at the late positive potentials (LPP) elicited by emotional pictures.
My questions are:

Where is the best place to rereference the signal? I did it at the end but maybe it's better at the beginning?
"average" reference seems to look somewhat better than ["TP9", "TP10"] (the reference that people told me to do). Is this normal? Are there any plans about implementing other types of referencing such as REST (See this or this paper)?
Is resampling done at this stage ok?
ICA seems to severely alter the signal, adding noise: Here's the plot, over a susbset of central electrodes, of the grand averages by conditions with ICA (picture above) and with the ICA block commented off (picture below).

Finally, do you have any general advices about how to enhance that pipeline?

Thanks a lot for any comments and suggestions!

Note that this, for several participants, returns a RuntimeError: one PCA component captures most of the variance, please increase treshold. But it does that even if I set n_components to 0.999 :/

You can avoid this problem by setting n_components to None.
Also I have never used ica.detect_artifacts(). Did you check what components were detected? I have suspicions that this may be the source of your problems ...

I've opted for the more classic approach:
reject = autoreject.compute_thresholds(epochs, picks=mne.pick_types(epochs.info, meg=False, eeg=True), verbose=False)
ica = mne.preprocessing.ICA(n_components=None, method='fastica', max_iter=500).fit(epochs)
# EOG
eog_epochs = mne.preprocessing.create_eog_epochs(raw)
eog_inds, scores = ica.find_bads_eog(eog_epochs)
eog_inds = eog_inds[:2]
ica.exclude += eog_inds
epochs = ica.apply(epochs)

And it does not alter the signal like the previous method. Also, setting n_components to None did work. Thanks!

Can this be closed?

Btw. Dominque, for purely usage related questions / support please use the
mailing list. Github is for development and maintenance of functionality.
On Wed, 30 Aug 2017 at 10:49, jona-sassenhagen notifications@github.com
wrote:

Can this be closed?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/mne-tools/mne-python/issues/4507#issuecomment-325926013,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AB0fiq0PrxuHnhLjtxwhzYbQTz2-DX5Hks5sdSH-gaJpZM4O9Q5v
.

@dengemann Noted!
@jona-sassenhagen yep

authors: DominiqueMakowski dengemann jasmainak jona-sassenhagen


text:
Interested to Contrbute to MNE-python

Hello Everyone, My name is Dinesh. I am third year undergraduate from IIT Bhubaneswar, India. At present I am working on Chaos signal analysis on EEG signals. I am also planning to participate in GSoc'19 with MNE. I have good knowledge in Python,C++ and am specialized in Machine Learning algorithms. I need help to get started with. Please assign me some task/sub goal to work along with you and contribute. Thankyou!

Can you take a look at issues marked easy?

Okay, I will look into them. Actually, I am new to open source contribution. I would be very happy if you could assign me some specific issue to work on so that I can get started. Thanks!

I have gone through them. Will start working to solve them. Thanks!

authors: larsoner msrdinesh


text:
DOC: glossary enhancements

This is for keeping track of needed improvements to the glossary.

[ ] new entries:

[ ] dSPM #6913
[x] beamformer #6864
[x] minimum-norm estimation #6865
[x] [es]LORETA #6883
[x] Digitization
[x] cHPI #6642
[x] global field power (GFP) #5804
[x] noise covariance #6875

[x] add links out to the API reference, throughout the glossary.  E.g., add a final sentence to the inverse operator entry that links out to mne.minimum_norm.apply_inverse
[ ] reflow text to a 79-char column

@mne-tools/contributors feel free to add to this list

closing; once #6913 is merged we'll have added all the terms!  Thanks @mohdsherif @klankinen @NataKozh!


text:
DOC: add crossrefs in the info docstring

We should add crossrefs in the info docstring to the various MNE functions/methods that can safely change info fields (e.g., inst.rename_channels etc)

Is there a list of these functions somewhere? If not, can we start collecting them here?

No list AFAIK, I would just start a PR with a few of them and people can push commits with others when they think of / find them

authors: cbrnr drammock larsoner


text:
Make an interactive ERP subplot for an ICA component

Describe the new feature or enhancement
Currently, when displaying the individual ICA component, the ERP subplot is not interactive. We want to make this subplot interactive .
Describe your proposed implementation
Implement a rectangle selector to zoom in and out for this plot.

@mdclarke

Sounds like this has been discussed with @drammock already, looking forward to a PR!


text:
MRG,DOC: convert references to bibtex

WIP, chipping away at bibtex updates.

In the interest of smallish diffs, I'm keeping these BibTeX PRs to a manageable number of files at a time / saving them for when I'm waiting for a long-running job to complete :)
This one is ready for review/merge; Style and Circle are happy and I checked all the examples that were touched and they render correctly.

Thanks @drammock

authors: drammock larsoner


text:
Add ERP/ERF images via Report.add_epochs()

I think this is a aseful addition!
Only downside is that we have to preload epochs now but I guess that's okay?

@agramfort See here:
https://36214-1301584-gh.circle-artifacts.com/0/dev/auto_tutorials/intro/70_report.html#adding-epochs

Maybe it can help spotting data quality issues.

Yes that was my idea :)


text:
first pass at ch-specific annot

pair-programmed with @scott-huberty
WIP, pending aesthetics discussion

@drammock I'm not sure that I have push privileges to this branch, I think you may need to grant me push privileges?
Note: it seems like the failing tests are MNE main tests. If it makes sense to touch those tests (to be confirmed), then I think the workflow will be to open and merge a companion PR to MNE-Python before merging this PR.

it's actually a bit tricky to grant you permissions. Can you open a new PR based on this branch, and we can close this one?

Closing for #202

authors: drammock larsoner scott-huberty

repo: mne-tools/mne-qt-browser


text:
How can I check if ANY value has been changed?

I see you have a new "setCheckBoxClick" method for checking whether a particular value has been changed. However, is there an easy way to check if ANY value in the dropdown has been changed?
I've tried different things but nothing seems to work. I figured out how to grab an array of the selected items, but I can't figure out a way to trigger an event to happen once any change in the selections is made.

Never mind, this seems to work:
If my function is called "updateList", I need to catch any change to checkboxes with class "multiselect-checkbox". Using jQuery:
$('input[class=multiselect-checkbox]').on('change', updateList);

repo: mneofit/multiselect


text:
Partial fill rules

A proposal to augment MCIP #31 to support "partial fill" atomic swap transactions
Rendered Proposal

The (current) proposal calls for adding InputRuleVerificationData separate from InputRules to TxIn. The idea is that InputRules is set by the originator and InputRuleVerificationData is set later by the counterparty who consumes the SCI. The InputRuleVerificationData is needed so that the counterparty has a place to put the amount shared secret for the "real" versions of each fractional input.
However, this has some drawbacks:

The real versions of each fractional input must have the same amount shared secret as each fractional input (otherwise the originator won't be able to view-key match these outputs properly)
Fortunately, these shared secrets already appear in the RevealedTxOut structure.
The enclave would have to check that the shared secrets appearing in the InputRules match the shared secrets appearing in the verification data.

It is simpler to not have to duplicate these shared secrets into the verification data, and not have the verification data at all.
In the latest POC work we have done this, and will update the proposal soon.

An open question:
In MCIP #31 we proposed a structure "UnmaskedAmount" which is a value, token id, and blinding factor for a TxOut. This is part of the signed contingent input, so that the counterparty to a swap can build a Tx using an SCI. These data are deleted before they get to the enclave.
In this MCIP we proposed a different way to reveal the amount of a TxOut, via the amount shared secret.
The amount shared secret was introduced because it has some advantages over unmasked amount.

The amount shared secret is verifiable, and we can confirm that the originator will be able to view-key match successfully. With the unmasked amount, it's possible that the counterparty can do something malicious and change the tx out shared secret used with the amount, so that it will still appear to unmask correctly, but the originator won't be able to decrypt it. This is critical for the partial fill application, and wasn't critical for the MCIP 31 application.
The amount shared secret is shorter, only 32 bytes.

Since UnmaskedAmount represents an additional concept that we possibly don't need, it might make sense to retcon MCIP #31 to use amount shared secret rather than UnmaskedAmount in the SCI schemas.

Rendered block-version-features registry

I think we need some kind of block version features.  The proposed block-version-features.md is a good approach.

As for latex, I think that suggestion was probably overkill for this specific PR. I was probably guilty of seeing a shiny new tool to play with.  Some downsides to latex:

The raw markup is not intuitive to understand
It leads to it's own debugging issues as it's more or less code in markdown

Especially for this PR the only benefit would have been nicer fractions and IFF that was desired it could be done in ascii art.
 partial_fill_change.value - fractional_change_output.value         fractional_output.value
------------------------------------------------------------  ==  ----------------------------
                  partial_fill_change.value                        partial_fill_output.value

Versus
$$ {\texttt{partial fill change.value} - \texttt{fractional change output.value} \over \texttt{partial fill change.value}} == {\texttt{fractional output.value} \over \texttt{partial fill output.value}}$$

While Latex is of questionable value, I think mermaid use is very valuable.
A diagram can communicate so much in so little.  Often it is one of the best mediums to communicate relationships between objects, components, etc.
Using ASCII art for diagrams is a big pain to write.  Updating ASCII art diagrams is just as much of a pain.

Yeah, I feel like, having a registry of the features can help give us a source of truth for all this stuff:
https://github.com/mobilecoinfoundation/mobilecoin/blob/631bdb443ca1338836431af0f01ea3c30f006ec1/transaction/types/src/block_version.rs#L79

authors: garbageslam nick-mobilecoin

repo: mobilecoinfoundation/mcips


text:
AttributeError: 'str' object has no attribute 'recv'

I am using Docker to build a central_system ocpp1.6, and I am encountering this issue.
the test scenario is that the Charge Point (CP) connects to the Central System (CS) and the issue occurs.
I don't know if there is any solution.
Docker version: 24.0.5, build 24.0.5-0ubuntu1~22.04.1
Docker Images :  python:3.12.0-slim-bullseye
ocpp version: 0.22
INFO:     Started server process [1]
INFO:     Waiting for application startup.
INFO:     Application startup complete.
INFO:websockets.server:server listening on 0.0.0.0:9000
INFO:root:Server Started listening to new connections...
INFO:websockets.server:connection open
INFO:root:Protocols Matched: ocpp1.6
ERROR:websockets.server:connection handler failed
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/websockets/legacy/server.py", line 236, in handler
    await self.ws_handler(self)
  File "/usr/local/lib/python3.12/site-packages/websockets/legacy/server.py", line 1175, in _ws_handler
    return await cast(
           ^^^^^^^^^^^
  File "/server/service/ocpp_server.py", line 163, in on_connect
    await asyncio.gather(cp.start(), self.register(cp))
  File "/usr/local/lib/python3.12/site-packages/ocpp/charge_point.py", line 160, in start
    message = await self._connection.recv()
                    ^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'str' object has no attribute 'recv'
INFO:websockets.server:connection closed

Additionally, the issue does not occur in the Windows 10 docker-desktop Docker Engine:v24.0.5 environment, which is strange.

This looks to be outside the scope of this library - the implementation of OCPP is up to the individual (for example this ocpp_server implementation, with docker). The purpose of this library gives only the building blocks, documentation and some simple demonstration.

authors: Jared-Newell-Mobility crepperman

repo: mobilityhouse/ocpp


text:
Add code generator for OCPP 2.1

This PR introduces support for OCPP 2.1. The code in ocpp/v21 is generated by the newly
introduced code generator.
I've created this draft to gather feedback on the generated code in ocpp/v21, not on the code generator itself.
The generator requires some clean up and tests.
Unfortunately, I'm not allowed to include the JSON schemas with this PR at the moment. The OCA
distributed these files to members only. I'm in touch with the OCA to see if they allow me to include
the schemas in this project.
Fixes: #452

I think we should remove from the PR the calls and calls results .json for now - maybe only include the generator components and then I can read in the schemas and compare the output results, then give feed back if it comes out correctly?

It is frustrating that the OCA doesn't allow these artefacts to be in the public domain! I know this isn't the place to discuss this, so I'll not go on for too long... 😁
It's the same for the OCPP docs. They're available in PDF, not HTML, which makes creating tools that link to specific sections tricky. You have to add a reference to, for example, 5.16. Set Charging Profile.
It'd be 🆒 to get these specifications in the public domain and reduce the friction for contribution and innovation.


text:
🛑 PizzaRiing Web is down

In 5c02ee1, PizzaRiing Web (https://pizzariing.uy) was down:

HTTP code: 0
Response time: 0 ms

Resolved: PizzaRiing Web is back up in 7cf6d50.

repo: mobilitysol/monitorweb


text:
🛑 Mobility Solutions Web is down

In 74f0e54, Mobility Solutions Web (https://mobilitysol.com) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Mobility Solutions Web is back up in b51338e.


text:
setFlag still not working?

Hello,
I replaced the previous library with version 1.0.8. Unfortunately, upon attempting to verify the Set_Flag example, I encounter the following:
Set_Flags:202:65: error: no matching function for call to 'ESP_Mail_Client::setFlag(IMAPSession&, int, const char [16], bool)'
if (MailClient.setFlag(imap, 100, "\Seen \Answered", false))
Not sure if I'm doing something incorrectly...
thank you.

Thanks for the issue.
Due to typo in this example, it should be
if (MailClient.setFlag(&imap, 100, "\\Seen \\Answered", false))

It worked, thank you very much!

repo: mobizt/ESP-Mail-Client


text:
warnings - export '_allowStateReadsStart' was not found in 'mobx

Hello everybody! I'm using yarn and trying to update the mobx-react version to the 6.1.8 in order to use a hooks approach in my project. I've also updated mobx version to 4.15.4.
But yarn gives me these several warnings:

mobxreact.esm.js imports these functions from mobx module:

And I see them in mobx.d.ts in mobx module:

I made sure that mobx 4.15.4 has _allowStateReadsStart low-level method, so now I'm confusing, what's wrong with it. I looked at other relevant issues in this repository and still have no idea what to do.
Any suggestions on how I can solve this problem?
Thanks!
Ivan

Are you able to reproduce that? Chances are you don't actually have mobx version you are saying you have. Looking here I can clearly see __allowStateReadsStart exported.
https://unpkg.com/browse/mobx@4.15.4/lib/mobx.js

@FredyC , I look through node_modules/mobx/mobx.js and I see this functionality is exported:

This is my package.json file before the update and after, previously versions were mobx 4, mobx-react ^5.3.1:

I don't even understand what's wrong.

Sorry, but without some reproduction, I cannot really help you. Obviously, it works for others.

Clear your node modules, run yarn why mobx if using yarn. Otherwise search
your entire node modules tree, maybe some other package is bringing in a
different version as transitive dependency.
On Sun, 31 May 2020, 15:11 Daniel K., notifications@github.com wrote:

Sorry, but without some reproduction, I cannot really help you. Obviously,
it works for others.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/mobxjs/mobx-react/issues/869#issuecomment-636476679,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAN4NBDZATVX4LTY4IHXSF3RUJQPRANCNFSM4NO5ODZQ
.

@FredyC @mweststrate , thank you guys.
I ran yarn cache clean, reinstalled node_modules and ran dll build in the project.
Seems my problem is fixed now.

authors: FredyC evankazadaiev mweststrate

repo: mobxjs/mobx-react


text:
How to make my event test fail using async/await

Description
I'm working on a library that throws errors using event emitter. I subscribe to receive the "error" event from my library and, when it happens, I want to make my tests fail. If no error is emitted, then I expect that the test is passed.
Code
// Imports and Globals
import {IListener} from "typescript.events";
import { expect } from 'chai';
import 'mocha';
import * as assert from "assert"

describe('Public functions', () => {

  describe('getMessage(error : string) : any', () => {

    let responseGiver;

    beforeEach(function() {
      responseGiver = require("../index");
      responseGiver.setLoggerLevel("none");
    });

    // 1
    it('should throw when the dictionary is not set', async () => {

      const handler : IListener = async function(e){
        await responseGiver.removeListener("error", handler);
        // This test should fail here
      };

      await responseGiver.on('error', handler);

      await responseGiver.getMessage("A");
    });

    // 2
    it('should throw when the dictionary is set, but there is not the key we are looking for', async () => {

      const handler : IListener = async function(e){
        await responseGiver.removeListener("error", handler);
        // This test should fail here
      };

      await responseGiver.on('error', handler);

      await responseGiver.setDictionary( { "A" : "B" } )
      await responseGiver.getMessage("C");
    });

  });
});

Is the code to be tested actually using both promises and an error-handling event? Either the one or the other would be more straightforward to test on its own:
it("tests a promise-returning library", async function() {
  const x = await getSomePromise()
  return x.someAdditionalOperation()
  // If x became rejected at any point, a rejected promise will be returned and Mocha treats that as failure.
})

it("tests an event-emitting library", function(done) {
  const x = getSomeEventEmitter()
  x.on("error", done) // Will pass the error to Mocha's `done`, which fails the test; if this emitter is going to hang around and needs you to clean up the event handler you can `x.on("error", function(error) { x.removeListener(done); done(error) })`
  x.on(<whatever is success>, function(successValue) {
    assert.stuff.about(successValue)
    done()
  })
})

It's the combination of two different asynchronous paradigms that makes things difficult. Mocha specifically disallows returning a promise (as async functions do behind the scenes) and using both the done callback in the same test, because we haven't figured out how to guarantee correct behavior. But you might be able to adapt the event emitter into a promise interface:

either by running it through some kind of event-emitter to promise system (like some tools out there for "promisifying" callback-based functions) that includes error handling, or
by doing something like this (disclaimer: I haven't tried it, but it should set you on the right path; take advantage of async/await's being syntactic sugar for promises and of promises turning returned promises into just another promise rather than a promise of a promise):

it("is really hacky, but should work", async function() {
  const x = getSomeEventEmitter()
  const potentialFailure = new Promise(function(resolve, reject) {
    x.on("error", reject)
  })
  await x.doWhatever()
  return potentialFailure
})

@ScottFreeCode , first of all, thanks for the brillian answer. It was super useful.
I would like to precise that my functions don't emit events when they succeed. I don't know if it's a good practise, but this shouldn't impede my tests. In the worst case, it times out.
I tried all your approaches, but I "fail" every time I try to call removeListener(). In fact, if I get "Error: done() called multiple times"
This is the result of my logs:
AAAAA
BBBBB
1
CCCCC
2
AAAAA
BBBBB
3
4
DDDDD
CCCCC
5

This is my code:
describe('Public functions', () => {

  describe('getMessage(error : string) : any', () => {

    let responseGiver;

    beforeEach(function() {
      console.log("AAAAA");
      responseGiver = require("../index");
      responseGiver.setLoggerLevel("none");
      console.log("BBBBB");
    });

    // 1
    it('should throw when the dictionary is not set', (done) => {

      const handler : IListener = function(error) {
        console.log("CCCCC")
        responseGiver.removeListener(handler);
        done()
      }

      responseGiver.on("error", handler)
      console.log(1);
      responseGiver.getMessage("A");
      console.log(2);

    });

    // 2
    it('should throw when the dictionary is set, but there is not the key we are looking for', (done) => {

      const handler = function(error) {
        console.log("DDDDD")
        responseGiver.removeListener(handler);
        done()
      }

      responseGiver.on("error", handler)
      console.log(3);

      responseGiver.setDictionary({"key" : "value"})
      console.log(4);

      responseGiver.getMessage("inexistantKey");
      console.log(5);

    });

  });
});

As you can see, when I execute responseGiver.setDictionary({"key" : "value"}), I shouldn't print both "CCCCC" and "DDDDD", but only "DDDDD".
I mean, I could remove all listeners all at once, but I think that I shouldn't expose a function like that.
Thanks again for the support.

Hmm. The test structure looks right, but removeListener isn't working? Maybe it needs to be removeListener("error", handler) instead of just removeListener(handler)? I sometimes forget which way that is supposed to work.

@ScottFreeCode , you're right. My bad. But it still doesn't work. I made some change to my code to understand where's the error. I also listen to node "removeListener" which, according to the docs:
The 'removeListener' event is emitted after the listener is removed.
But you know what? This event is never emitted. But in the end the function is called, since I log after I call removeListener().
These are my tests:
describe('Public functions', () => {

  describe('getMessage(error : string) : any', () => {

    let responseGiver;

    beforeEach(function() {
      console.log("AAAAA");
      responseGiver = require("../index");
      responseGiver.setLoggerLevel("none");
      responseGiver.on("removeListener", function() {
        console.log("ONE EVENT REMOVED")
      });
      console.log("BBBBB");
    });

    // 1
    it('should throw when the dictionary is not set', (done) => {

      const handler : IListener = function(error) {
        console.log("CCCCC")
        responseGiver.removeListener("error", handler);
        done()
      }

      responseGiver.on("error", handler)
      console.log(1);
      responseGiver.getMessage("A");
      console.log(2);

    });

    // 2
    it('should throw when the dictionary is set, but there is not the key we are looking for', (done) => {

      const handler = function(error) {
        console.log("DDDDD")
        responseGiver.removeListener("error", handler);
        done()
      }

      responseGiver.on("error", handler)
      console.log(3);

      responseGiver.setDictionary({"key" : "value"})
      console.log(4);

      responseGiver.getMessage("inexistantKey");
      console.log(5);

    });

  });
});

It seems that handler cannot "remove" itself.

I did another test: instead of using emitter.removeListener(eventName, listener), I used emitter.removeAllListeners([eventName]). It seems to be a problem with Typescript/Javascript. Can someone confirm me this?

I partially solved my problem. In a nutshell:

I couldn't explain why I wasn't able to not remove the listener. Maybe it could be because we try to detach handler inside handler itself. With a "middleware" function didn't work as well. However, I found out that excluding this specific use-case, it's impossible in general to remove a listener for some reason. This could be a bug on node.

But in the end, I adjusted my tests to make them work. Basically I asked myself: "if I require the module before each test, why are old events emitted anyway?". I figured out that, even if we do responseGiver = null; responseGiver = responseGiver = require("../index");, node cached the old module, so that if we tried to require two times the same module, we'll get an old module.

For those who could have a similar problem, here there is my working source code:
describe('Public functions', () => {

  describe('getMessage(error : string) : any', () => {

    let responseGiver;

    beforeEach(function() {

      // Require a fresh version of the module
      delete require.cache[require.resolve('../index')]
      responseGiver = require("../index");

      // Do not log
      responseGiver.setLoggerLevel("none");

    });

    // 1
    it('should throw when the dictionary is not set', (done) => {

      // If an error is thrown, then the test passes
      const handler : IListener = function(error) {
        done()
      }
      responseGiver.on("error", handler)

      // Cause a throw
      responseGiver.getMessage("A");

    });

    // 2
    it('should throw when the dictionary is set, but there is not the key we are looking for', (done) => {

      // If an error is thrown, then the test passes
      const handler = function(error) {
        done()
      }
      responseGiver.on("error", handler)

      // Cause a throw
      responseGiver.setDictionary({"key" : "value"})
      responseGiver.getMessage("inexistantKey");

    });

  });
});

Is it possible this particular EventEmitter is subclassed, monkey-patched or otherwise changed from the default EventEmitter behavior?

I almost mentioned this earlier -- in general, unless you really want one instance of a thing to exist in your entire Node process, you shouldn't make that thing your module export; instead, if you typically want to be able to create multiple instances of it or otherwise avoid sharing state between multiple other modules that import it, you'd want to export a constructor or factory that returns a new instance. So, for example, instead of something like this (dumb names in this example, just trying to show the difference between exporting an instance and exporting the non-state-retaining means of creating an instance):
// index.js
module.exports = new MyEventEmitterVariationOrUsage()
// other files
var emitter = require("./index.js")

...you'd do something like this:
// index.js
module.exports = MyEventEmitterVariationOrUsage
// or
module.exports = function() { return new MyEventEmitterVariationOrUsage() }
// other files
var makeEmitter = require("./index.js")
var emitter = makeEmitter()

I'm going to close this for now since you isolated the issue to module system usage patterns and the behavior of the remove listener methods (i.e. not Mocha issues), but feel free to continue discussion here; if we do find any problem in this situation that's directly Mocha-related we can always reopen!

If someone is still looking for a way to do that, I'm using:
it("test case", done => {
  (async () => {

      const successListener = msg => {
        done(); // wil pass
      };

      const errorListener = error => {
        done(error); // will fail
      };

      responseGiver.on("success", successListener);
      responseGiver.on("error", errorListener);

      try {
        responseGiver.willThrow();
      }
      catch(error) {
        done(error); // will fail
      }

  })();
});

authors: Giovarco ScottFreeCode marcelomorgado

repo: mochajs/mocha


text:
[Fix] Exclude not own properties when looping on options

It seems this was a regression as it was added before -- https://github.com/mochajs/mocha/pull/1586

the chances of this breaking somebody's setup are probably greater than it actually addressing any problems.  if there's a bug here, we can revisit.  thanks though!

It broke our setup on https://cdn.polyfill.io :-(

@JakeChampion Where was the check added?  How did your setup break?

@boneskull do you really think people are relying on setting mocha config options by extending the Object prototype?

authors: JakeChampion boneskull triblondon