aarch64 AOT module fails to load on android

When trying to load an aarch64 AOT file on android, the module fails to load due to an overflow check failing, AOT module load failed: target address out of range..
Expected behaviour
aarch64 AOT module loads without error
Actual behaviour
aarch64 AOT module fails to load
Steps to reproduce
I've attached the example android studio project which reproduces the issue consistently on an arm64 emulator:
WasmAOT.zip
C++ code to load  the AOT module:
#include <android/asset_manager_jni.h>
#include <android/log.h>
#include <jni.h>

#include <cstring>
#include <string>
#include <vector>

#include "wasm_export.h"

extern "C" JNIEXPORT jstring JNICALL
Java_com_example_wasmaot_MainActivity_stringFromJNI(
        JNIEnv* env,
        jobject /* this */) {
    std::string hello = "Hello from wasm aot example";
    return env->NewStringUTF(hello.c_str());
}

extern "C" JNIEXPORT jint JNICALL
Java_com_example_wasmaot_MainActivity_loadWasmAOTModule(
        JNIEnv* env,
        jobject /* this */,
        jobject jasset_manager) {
    auto asset_manager = AAssetManager_fromJava(env, jasset_manager);

    auto aot_file_name = std::string("wamr_aot_test_") + AOT_FILE_SUFFIX + std::string(".aot");

    __android_log_print(ANDROID_LOG_INFO,"example.wasmaot", "%s", ("Loading AOT file " + aot_file_name).c_str());

    auto asset = AAssetManager_open(asset_manager, aot_file_name.c_str(), AASSET_MODE_BUFFER);

    if (!asset) {
        __android_log_print(ANDROID_LOG_ERROR,"example.wasmaot", "Failed to open AOT asset");
        return 1;
    }

    auto size = AAsset_getLength(asset);
    auto asset_buffer = AAsset_getBuffer(asset);

    std::vector<uint8_t> buf;
    buf.reserve(size);
    buf.assign(static_cast<const uint8_t*>(asset_buffer), static_cast<const uint8_t*>(asset_buffer) + size);

    AAsset_close(asset);

    wasm_runtime_init();

    char error_buf[128] = {};

    auto module = wasm_runtime_load(buf.data(), size, error_buf, sizeof(error_buf));

    if (module) {
        wasm_runtime_unload(module);
    } else {
        __android_log_print(ANDROID_LOG_ERROR,"example.wasmaot" ,"%s", error_buf);
        return 1;
    }

    wasm_runtime_destroy();

    return 0;
}

This is the rust code for the AOT module:
use std::os::raw::c_char;

#[no_mangle]
pub extern "C" fn main(_argv: *const *const c_char, _argc: i32) -> i32 {
    let mut a = 0;
    for i in 0..10 {
        a += i;
    }

    let mut buffer = Vec::new();

    buffer.extend([1, 2, 3]);

    println!("Hello world {:?}", buffer);
    println!("Hello world {:?}", a);

    0
}

which was compiled via cargo build --target=wasm32-wasi and
wamrc \
    --disable-simd \
    --target=aarch64 \
    --size-level=3 \
    -o "wamr_aot_test_aarch64.aot" \
    "hello_world.wasm"

The same rust code, when compiled for armv7 loads without issue on an armv7 android build.

Hi, could you try using --size-level=1 or --size-level=2 for wamrc?

Hi, thanks for the quick response. I get the following error when trying to compile with --size-level=1 or --size-level=2:
LLVM ERROR: Only small, tiny and large code models are allowed on AArch64.
However, passing --size-level=0 works and the resulting AOT file is successfully loaded. Is this expected?

Yes, it is expected, I have a test, LLVM AArch64 does not support code model medium (i.e. --size-level=1) and code model kernel (i.e. --size-level=2). Code model large (i.e. --size-level=0) is supported.

Sorry, I should have been more clear. I meant is it expected that the AOT module fails to load when size-level is set to 3? If so,

Also, is there any way to estimate how much the size of the AOT file would increase (relatively) changing the size-level from 3 to 0?

Thanks, that's good to know. I'm still a bit concerned that the AOT module fails when size-level=0, is there any possible explanation for this behaviour?

It may be due to that size-level=3 generates some relocation types which require the address of target symbol is in range 0-2GB. Could you try the following patch:
diff --git a/core/iwasm/aot/aot_loader.c b/core/iwasm/aot/aot_loader.c
index 480a00b9..84d73497 100644
--- a/core/iwasm/aot/aot_loader.c
+++ b/core/iwasm/aot/aot_loader.c
@@ -1475,11 +1475,7 @@ load_object_data_sections(const uint8 **p_buf, const uint8 *buf_end,
     /* Create each data section */
     for (i = 0; i < module->data_section_count; i++) {
         int map_prot = MMAP_PROT_READ | MMAP_PROT_WRITE;
-#if defined(BUILD_TARGET_X86_64) || defined(BUILD_TARGET_AMD_64) \
-    || defined(BUILD_TARGET_RISCV64_LP64D)                       \
-    || defined(BUILD_TARGET_RISCV64_LP64)
-        /* aot code and data in x86_64 must be in range 0 to 2G due to
-           relocation for R_X86_64_32/32S/PC32 */
+#if UINTPTR_MAX == UINT64_MAX
         int map_flags = MMAP_MAP_32BIT;
 #else
         int map_flags = MMAP_MAP_NONE;
@@ -3021,11 +3017,7 @@ create_sections(AOTModule *module, const uint8 *buf, uint32 size,
                 if ((section_size > 0) && !module->is_indirect_mode) {
                     int map_prot =
                         MMAP_PROT_READ | MMAP_PROT_WRITE | MMAP_PROT_EXEC;
-#if defined(BUILD_TARGET_X86_64) || defined(BUILD_TARGET_AMD_64) \
-    || defined(BUILD_TARGET_RISCV64_LP64D)                       \
-    || defined(BUILD_TARGET_RISCV64_LP64)
-                    /* aot code and data in x86_64 must be in range 0 to 2G due
-                       to relocation for R_X86_64_32/32S/PC32 */
+#if UINTPTR_MAX == UINT64_MAX
                     int map_flags = MMAP_MAP_32BIT;
 #else
                     int map_flags = MMAP_MAP_NONE;

I'm still getting the same error AOT module load failed: target address out of range. I'll try to investigate further.

Im run into this issue too. In my case, there is an check in R_AARCH64_ADR_PREL_PG_HI21, because of aot_module->data_sections->dataandaot_module->code both mmaped memory and distance maybe larger than 4GB. Im trying to merge both mmap into one large mmap so their distance will small enough.

@zoraaver Would you do a test to see that fix your issue too or not?

@wenyongh i see the branch is mark as merged and my commit is totally lost in the final history
and issues also not mark as fixed
is that intent?
should i fire another pr to merge the final change?

@bianchui the code changes had been merged into main branch, but I chose the Squash and Merge mode when merging to main, so the commit logs are lost, please don't create another PR to merge again. I usually do that way because there may be lots of commit logs in the development branch (e.g. a lot of commits/fixes when developing a feature, merging them all to main makes main looks a little ugly), do you need to merge branch dev/merge_aot_data_text to main again to keep your commit log?
BTW, could you test this issue again? If it is fixed, maybe we can mark this issue as fixed and close it?

@bianchui I merged branch dev/merge_aot_data_text into main again without squash, now your commit can be found in the main branch:

please have a check, thanks.

BTW, could you test this issue again? If it is fixed, maybe we can mark this issue as fixed and close it?

@wenyongh fix this issue was the original reason for merging text and data
and i do the test, it has been fixed
the probability of failure before and after is 15% & 0% of nearly 1million devces.
and thank you for your reply and the merge

Welcome. And let's this issue as it is fixed.

Glad to know that WAMR is tested in nearly 1million devices, it is cool!


Cache the description meta tag

Before this change, we were doing two queries per request to get the count of users and repos to generate the description meta tag (see screenshot below). Presumably, we don't actually care that these numbers are super up-to-date, so we can cache it up to an hour (same as the similar text in the template's h2 tag).

Great job, thanks!


Header doesn't appear

Hi,
There is an issue with the library when I want to use header. If I don't put any view above the SortableTableView, the header never appears. Some examples with your sample :

Remove the toolbar in activity_main.xml
Replace RelativeLayout by a LinearLayout

I think it's an issue because we don't need RelativeLayout everytime. The only workaround I found is using a fakeView above the TableView:
<View
    android:id="@+id/fakeView"
    android:layout_width="match_parent"
    android:layout_height="1dp"
    android:background="?attr/colorPrimary"/>

<fr.fnac.connect.ui.component.SortableProductTableView
    android:id="@+id/comparison_table"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:layout_below="@id/fakeView"
    app:columnCount="4"
    app:headerColor="?attr/colorPrimary"
    app:headerElevation="10"/>

Julien

I just tested your scenario and it worked for me. I was using this layout file (modification of the activity-main.xml following your description):
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
                xmlns:tools="http://schemas.android.com/tools"
                xmlns:custom="http://schemas.android.com/apk/res-auto"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                tools:context="de.codecrafters.tableviewexample.MainActivity">

    <de.codecrafters.tableviewexample.SortableCarTableView
        android:id="@+id/tableView"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        custom:columnCount="4"
        custom:headerElevation="10"
        custom:headerColor="?attr/colorPrimary" />

</LinearLayout>

Can you ensure that the issue is caused by the layout the TableView is in? Or maybe the error is in a different place? Please tell me if you have some new knowledge. I will also do some investigations.

Hi, I was able to reproduce the issue by creating 1 activity : HomeActivity & 2 fragments : HomeFragment & TableFragment
HomeActivity has a FrameLayout container R.id.container
I have 2 scenarios :

Inside onCreate I add the HomeFragment then when I select the entry menu in my drawerlayout I replace the fragment by TableFragment : Header does not appear. The only way workaround I found is adding the fakeView as explained yesterday.
Inside onCreate I add the TableFragment : Header does appear

I really don't understand why the issue happens. Some informations about my project:
compileSdkVersion 22
buildToolsVersion "22.0.1"
minSdkVersion 21
targetSdkVersion 22
I use https://github.com/mikepenz/MaterialDrawer

I think that I fixed the issue.
Please try the version 0.9.4 and give some feedback if the issue is really fixed.

Sorry for the delay, it works fine :)
Thanks !

Hi, I have the same/similar problem with the latest version(2.4.1)- Header text does not appear when the SortableTableView is used in a fragment. The header is just a blank space. I can set the Header background color using the sortableTableView.setHeaderBackgroundColor(). No methods in the SimpleTableHeaderAdapter class seem to be working.
Note that if I use the older version- 0.9.4 the the header text does appear.
My code inside the onCreateView of the Fragment:
SimpleTableHeaderAdapter headerAdapter = new SimpleTableHeaderAdapter(mContext, "A", "B", "C", "D");
headerAdapter.setTextColor(Color.parseColor("#000000"));
    TableView<String[]> sortableTableView = (TableView<String[]>)        rootView.findViewById(R.id.tableView);
    sortableTableView.setDataAdapter(new SimpleTableDataAdapter(mContext, DATA_TO_SHOW));
    sortableTableView.setColumnCount(4);
    sortableTableView.setHeaderBackgroundColor(Color.parseColor("#FFFFFF"));
    sortableTableView.setHeaderElevation(10);
    sortableTableView.setHeaderAdapter(headerAdapter);

Layout:
<de.codecrafters.tableview.SortableTableView
android:id="@+id/tableView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="5dp"
android:background="#dafdea"
/>
Please let me know if I'm doing anything incorrectly.
Thanks,
Sujith

I'm afraid that I too see the exact same issue as well.
I did what is explained by  @CoolCommando . Check the screenshot please

Hi @Sineth-N,
could you please try your code with the new TableView version 2.4.3 and report if this issue is fixed?
Best regards,
Ingo

Hi @ISchwarz23 ,
It works now YAY!!!.. Awesome work done by you here, keep up the good work mate.... Cheers!!!

For me , getView() is not being hit....I have put breakpoints and they are not being hit.
Is this a known issue?


[DOCS] Create detailed documentation for dexios-core

This will need to be done once Dexios has split.
Documentation needs to be written regarding every function, struct, implementation and just everything within the crate. Go into as much detail as possible.
(I quite enjoy writing documentation, so this won't be an issue)

I believe this is done now. docs.rs has plenty, and the mdbook has been updated also.


Deterministically lock exclusive shards

Scope & Purpose
Make sure exclusive shards are not lazily locked

[x] :hankey: Bugfix
[x] :book: CHANGELOG entry made
[x] :computer: The behavior change can be verified via automatic tests

Backports:

[x] Backports required for: 3.6, 3.7

Testing & Verification
http://jenkins01.arangodb.biz:8080/job/arangodb-matrix-pr/12067/

[x] This change is already covered by existing tests, such as tests/js/client/shell/shell-transaction.js
[x] This PR adds tests that were used to verify all changes:

[x] Added Regression Tests
[x] Added new integration tests (i.e. in shell_server / shell_server_aql)

Documentation

[x] Added a Changelog Entry (referencing the corresponding public or internal issue number)
[x] Added a new section in the Manual
[x] Added a new section in the HTTP API

http://jenkins01.arangodb.biz:8080/job/arangodb-matrix-pr/12066/

http://jenkins01.arangodb.biz:8080/job/arangodb-matrix-pr/12067/

http://jenkins01.arangodb.biz:8080/job/arangodb-matrix-pr/12074/

Largely covered and obsoleted by PR https://github.com/arangodb/arangodb/pull/13207.
However, some small changes from this PR still need to be salvaged.

Largely covered and obsoleted by PR https://github.com/arangodb/arangodb/pull/13207.
However, some small changes from this PR still need to be salvaged.

Obsoleted by other PRs in devel, which addressed the same problem slightly differently.


Add unit test for pinot folder with coverage to 93.4%

What changed?
Added unit test for common/pinot folder

Why?
to reach a better code coverage

How did you test it?
unit test

Potential risks

Release notes

Documentation Changes

Pull Request Test Coverage Report for Build 018e1ba1-da71-48fe-ba1c-94a779d8e438
Details

0 of 0   changed or added relevant lines in 0 files are covered.
98 unchanged lines in 15 files lost coverage.
Overall coverage increased (+0.04%) to 63.444%

Files with Coverage Reduction
New Missed Lines
%

service/history/queue/timer_queue_processor_base.go
1
77.62%

common/task/weighted_round_robin_task_scheduler.go
2
89.05%

service/matching/db.go
2
73.23%

service/history/task/transfer_active_task_executor.go
2
72.51%

common/persistence/sql/sqlplugin/mysql/db.go
2
79.49%

common/persistence/sql/common.go
2
46.75%

common/persistence/sql/sql_task_store.go
2
54.32%

common/persistence/sql/sqlplugin/mysql/task.go
2
73.68%

service/history/task/fetcher.go
3
85.57%

common/log/tag/tags.go
3
50.18%

Totals

Change from base Build 018e1ba1-54d2-4d9d-9c86-3b41b0eb9f6f:
0.04%

Covered Lines:
93007

Relevant Lines:
146598

💛  - Coveralls


zlib and io_uring

hey,
we have a pretty large codebase so I'll try to pull out the most important parts
we essentially dropped in epoll support whereas before we used nio - no issue there.
we later deployed kernel 5 + io_uring with the io_uring module, and we started to have issues. we compress the network stream data with zlib (mostly implemented native to avoid copying bytebuf)
error flows from here: https://github.com/SpigotMC/BungeeCord/blob/master/native/src/main/c/NativeCompressImpl.cpp#L76
always errors showing -2. I would usually attribute this to a bug on our side, but the issue only surfaces when we put the "proxy" type server on io_uring, as epoll and nio work without issue. not sure what kind of logs you guys need but I can try to provide anything requested.

Can you show me how you call the code and the full stacktrace ? -2 is a valid error code (stream error)
Bye
Norman

these errors only originate when we use this in the pipeline:
	private final BungeeZlib zlib = CompressFactory.zlib.newInstance();

	@Override
	public void handlerAdded(ChannelHandlerContext ctx) throws Exception {
		zlib.init(true, Deflater.DEFAULT_COMPRESSION);
	}

	@Override
	public void handlerRemoved(ChannelHandlerContext ctx) throws Exception {
		zlib.free();
	}

	@Override
	protected void encode(ChannelHandlerContext ctx, ByteBuf msg, ByteBuf out) throws Exception {
		int origSize = msg.readableBytes();
		if (origSize < 256) {
			writeVarInt(0, out);
			out.writeBytes(msg);
		} else {
			writeVarInt(origSize, out);
			zlib.process(msg, out);
		}
	}

	public static void writeVarInt(int val, ByteBuf out) {
		while ((val & -128) != 0) {
			out.writeByte(val & 127 | 128);
			val >>>= 7;
		}

		out.writeByte(val);
	}

code from other side:
    private final int compressionThreshold;
    private final BungeeZlib zlib = CompressFactory.zlib.newInstance();

    @Override
    public void handlerAdded(ChannelHandlerContext ctx) throws Exception
    {
        zlib.init( false, 0 );
    }

    @Override
    public void handlerRemoved(ChannelHandlerContext ctx) throws Exception
    {
        zlib.free();
    }

    @Override
    protected void decode(ChannelHandlerContext ctx, ByteBuf in, List<Object> out) throws Exception
    {
        int size = DefinedPacket.readVarInt( in );
        if ( size == 0 )
        {
            out.add( in.slice().retain() );
            in.skipBytes( in.readableBytes() );
        } else
        {
            Preconditions.checkArgument( size >= compressionThreshold, "Decompressed size %s less than compression threshold %s", size, compressionThreshold);
            ByteBuf decompressed = ctx.alloc().directBuffer();

            try
            {
                zlib.process( in, decompressed );
                Preconditions.checkArgument( decompressed.readableBytes() == size, "Decompressed size %s is not equal to actual decompressed bytes", size, decompressed.readableBytes());

                out.add( decompressed );
                decompressed = null;
            } finally
            {
                if ( decompressed != null )
                {
                    decompressed.release();
                }
            }
        }
    }

apologies, error here is this one:
Preconditions.checkArgument( size >= compressionThreshold, "Decompressed size %s less than compression threshold %s", size, compressionThreshold);
I'd normally attribute this to an error of ours but it only occurs when we use io_uring - no issues using epoll or nio

when we remove the checkArgument, there we get the -2 on zlib decompression

I've done some test a time ago, and it appears that the decoded buffer has multiple nio buffers, so that's why you got the -2 on Zlib cause it can't decompress multiple buffers

I've done some test a time ago, and it appears that the decoded buffer has multiple nio buffers, so that's why you got the -2 on Zlib cause it can't decompress multiple buffers

so is this a limitation of zlib? or bug?

I've done some test a time ago, and it appears that the decoded buffer has multiple nio buffers, so that's why you got the -2 on Zlib cause it can't decompress multiple buffers

thinking about this some more, im not sure why the issue only appears on io_uring - on epoll and nio no issue.

Actually I've done some more test. I have a custom fork of BungeeCord https://github.com/SpigotMC/BungeeCord with IOUring and a custom fork of PaperSpigot (https://github.com/PaperMC/Paper) with IOUring on. I just try to launch the bungeecord server with io_uring on and the spigot with io_uring on and it's not working. I got this error from the Bungeecord logs
[21:35:32] [Netty io_uring Worker #0/INFO]: [HookWood_] disconnected with: Exception Connecting:DecoderException : net.md_5.bungee.jni.NativeCodeException: Unknown z_stream return code : -3 @ io.netty.handler.codec.MessageToMessageDecoder:98
When I launch the spigot server on Epoll, it works. So I don't know why and I'm going to search more things on it, but the zlib compression don't work with IOUring on BungeeCord and Spigot

Actually I've done some more test. I have a custom fork of BungeeCord https://github.com/SpigotMC/BungeeCord with IOUring and a custom fork of PaperSpigot (https://github.com/PaperMC/Paper) with IOUring on. I just try to launch the bungeecord server with io_uring on and the spigot with io_uring on and it's not working. I got this error from the Bungeecord logs
[21:35:32] [Netty io_uring Worker #0/INFO]: [HookWood_] disconnected with: Exception Connecting:DecoderException : net.md_5.bungee.jni.NativeCodeException: Unknown z_stream return code : -3 @ io.netty.handler.codec.MessageToMessageDecoder:98
When I launch the spigot server on Epoll, it works. So I don't know why and I'm going to search more things on it, but the zlib compression don't work with IOUring on BungeeCord and Spigot

@AlfieC @HookWoods ping

@AlfieC @HookWoods ping

OK I will set up that when I'm at home (in 3-4h)

OK I will set up that when I'm at home (in 3-4h)

I've done some test a time ago, and it appears that the decoded buffer has multiple nio buffers, so that's why you got the -2 on Zlib cause it can't decompress multiple buffers

While CompositeByteBuf exists in netty it only gives us a native address when it just has one component, else it errors. So that cannot be the problem.
It is not clear if this is a netty bug or a bug in bungeecord's zlib usage.
Bungee's native zlib got an overhaul since the last comment in here in bungeecord, so you should check it again as well.
I'd suggest to cloe this issue.

It sounds like the only variable between working and non-working systems is the io_uring transport, and in this case the error shows up as a corrupted (I guess) zlib stream. It could be that the io_uring transport doesn't set correct read- or write-offsets on the buffers in some cases, and it just happens to get caught by zlib because it sanity checks the data it gets.

This seems to still be an issue.

sorry to get back to this years later. we fixed it by enabling compression one tick after login

sorry to get back to this years later. we fixed it by enabling compression one tick after login

That is not a solution, thats at most a quirky workaround which just so happens to work for you by accident.

with said solution we were able to hit 1.1k players on an instance, 3k-ish per bungee

The reason it worked for him is because the first tick usually uses the most amount of packets, that's a per specific production for MINECRAFT, not any other software specifically aswell.

ah my bad! Was responding via email so thought this was the Bungee issue. apologies, yes, it was a workaround.


Add Material for MkDocs Plugins & minor fixes

Match footer icon names with Haveno website
Add privacy plugin & Automatic light / dark mode to mkdocs.yml

Some ideas shamelessly robbed from docs.getmonero.org ;-)
If the docu becomes more extensive and should remain clear, I can add Navigation tabs.
With sticky navigation tabs:
https://boldsuck.github.io/haveno-reto-docs


SG1 Prune Not Defined For Heavy Atoms

Here's a minimal reproducible example, with VV10 settings adapted from Narbe's demo code:
import pyscf

xyz = """ H    0    0    -1.403
Br   0    0    0.040"""

mol = pyscf.M(
    atom=xyz,
    basis={"H": "cc-pVTZ", "Br": "cc-pVTZ-PP"},
    ecp={"Br": "cc-pVTZ-PP"},
    charge=0,
    spin=0,
    symmetry=True
)

mf = pyscf.scf.KS(mol)
mf.xc = "wB97MV"

mf.nlc = "vv10"
mf.nlcgrids.atom_grid = (50, 194)
mf.nlcgrids.prune = pyscf.dft.gen_grid.sg1_prune

energy = mf.kernel()

This gives an error:
Traceback (most recent call last):
  File "/Users/cwagen/business_code/pyscf/ecp_atom_guess.py", line 23, in <module>
    energy = mf.kernel()
             ^^^^^^^^^^^
  File "<string>", line 2, in kernel
  File "/opt/miniconda3/envs/aimnet2/lib/python3.11/site-packages/pyscf/scf/hf.py", line 1779, in scf
    kernel(self, self.conv_tol, self.conv_tol_grad,
  File "/opt/miniconda3/envs/aimnet2/lib/python3.11/site-packages/pyscf/scf/hf.py", line 124, in kernel
    vhf = mf.get_veff(mol, dm)
          ^^^^^^^^^^^^^^^^^^^^
  File "/opt/miniconda3/envs/aimnet2/lib/python3.11/site-packages/pyscf/dft/rks.py", line 69, in get_veff
    ks.initialize_grids(mol, dm)
  File "/opt/miniconda3/envs/aimnet2/lib/python3.11/site-packages/pyscf/dft/rks.py", line 477, in initialize_grids
    self.nlcgrids.build(with_non0tab=True)
  File "/opt/miniconda3/envs/aimnet2/lib/python3.11/site-packages/pyscf/dft/gen_grid.py", line 548, in build
    atom_grids_tab = self.gen_atomic_grids(
                     ^^^^^^^^^^^^^^^^^^^^^^
  File "<string>", line 6, in gen_atomic_grids
  File "/opt/miniconda3/envs/aimnet2/lib/python3.11/site-packages/pyscf/dft/gen_grid.py", line 258, in gen_atomic_grids
    angs = prune(chg, rad, n_ang)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/miniconda3/envs/aimnet2/lib/python3.11/site-packages/pyscf/dft/gen_grid.py", line 116, in sg1_prune
    r_atom = radii[nuc] + 1e-200
             ~~~~~^^^^^
IndexError: index 35 is out of bounds for axis 0 with size 19

This makes some degree of sense, since SG1 doesn't mention atoms past Ar (cf. Table 4). But this is also somewhat frustrating behavior, since SG1 is the recommended grid for VV10 (cf. Mardirossian 2014) - it seems to be that a decent fallback behavior would just be to suppress pruning for heavier atoms, which is what SG2 and SG3 do (Herbert/Dasgupta JCC 2017 38 869–882). I imagine this is also what QChem does for SG1, although I'm not 100% sure?

There is a little pruning but not much. You probably need to consult the qchem team.

There is a little pruning but not much. You probably need to consult the qchem team.

I contacted someone at Q-Chem, but they said they couldn't divulge this because of their NDA. Sorry...


Add nim tools install step

Add a step to install that calls koch tools, installing the nimgrep, nimsuggest, and nimpretty tools that come bundled with vim.
Some editor plugins rely on nimsuggest being present for their autocomplete, and nimpretty for their code cleanup.

Looks reasonable. Not sure whether that was available back when I wrote this, or whether I just didn't know or care, or what. :-)
On which note, I don't really use nim much these days; if you wanted to ask the asdf folks to direct to your fork instead of here I'd add my support for it, so there'd be an active maintainer.  What do you think?

Let me go a step further and say that I notice it's failing the test builds and I don't have time to do anything about it, so if you're willing to take charge, I will gladly step aside.

I only currently use Nim as a toy project, but I'd happily take it on.

Hey @rfrancis, i know its been a year, but my interest in Nim is picking up again and I may be able to help you with this project again.
How would you feel about just moving this to be a wrapper around choosenim. I know this isn't the most asdf-ish approach, but it would solve most of the issues. Erlang's installer does something similar, by using kerl to handle its install.

My opinion is that whatever works best is right.  Since choosenim is what
the nim site suggests, I don't see any reason not to take this approach for
as long as it works.
On Fri, Jan 10, 2020 at 11:05 PM Jeff S<EMAIL_ADDRESS>wrote:

Hey @rfrancis https://github.com/rfrancis, i know its been a year, but
my interest in Nim is picking up again and I may be able to help you with
this project again.
How would you feel about just moving this to be a wrapper around
choosenim. I know this isn't the most asdf-ish approach, but it would solve
most of the issues. Erlang's installer does something similar, by using
kerl to handle its install.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/rfrancis/asdf-nim/pull/4?email_source=notifications&email_token=AAGZ2SJB3WEDHOEINKTJZALQ5FHRVA5CNFSM4GMYEXI2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIVZQJY#issuecomment-573282343,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAGZ2SNRNT26CIZDJ3JG4A3Q5FHRVANCNFSM4GMYEXIQ
.


Read from is not a property of the output event type

The field was passed in the wrong place and as the API is lenient, it
accepted the request without informing the calling application that it
was passing something in the wrong place.
I think we should review this lenience as it allows for typos to go undetected.

:+1:

👍


使用conda安装时报错 403 FORBIDDEN

您好，我在使用
conda env create -f HapHiC/conda_env/environment_py312.yml  为集群安装 HapHic 时出现了报错：
`Retrieving notices: ...working... done
Channels:

intel
conda-forge
defaults
http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/bioconda
Platform: linux-64
Collecting package metadata (repodata.json): failed

UnavailableInvalidChannel: HTTP 403 FORBIDDEN for channel intel https://conda.anaconda.org/intel
The channel is not accessible or is invalid.
You will need to adjust your conda configuration to proceed.
Use conda config --show channels to view your configuration's current state,
and use conda config --show-sources to view config file locations.
`
为了能够成功安装，我尝试了使用micromanba，以及添加 "https://software.repos.intel.com/python/conda" ，但是都会出现相似的403报错，直接使用 micromamba 搜索 HapHic 也没有找到。
请问我该如何解决这个问题呢？

It's an issue caused by intel. Please update HapHiC to the latest version, I have fixed this problem by updating the .yml files.

Thank you so much for such a quick reply!
I've successfully installed HapHic!
Also during the installation I encountered a situation where pip couldn't install pysam, but was able to find it with mamba, so I removed it from the yml file and installed pysam manually with mamba after successfully installing the rest of the parts. Will this have any impact? You didn't install directly with conda, which makes me wonder if there are other considerations.

You didn't install directly with conda, which makes me wonder if there are other considerations.

Because I want to control the versions of all packages to maintain HapHiC's reproducibility and provide timely updates for them at the same time.

Also during the installation I encountered a situation where pip couldn't install pysam, but was able to find it with mamba, so I removed it from the yml file and installed pysam manually with mamba after successfully installing the rest of the parts.

Could you please show me the error message?

Also during the installation I encountered a situation where pip couldn't install pysam, but was able to find it with mamba, so I removed it from the yml file and installed pysam manually with mamba after successfully installing the rest of the parts.

It seems the issue could be related to having a low GCC version. Consider installing the environment for Python 3.11 instead.

Of course, the error message is so long and mixed with other outputs, and the final part I think is an error message like this:
`            gcc -pthread -B /public/work/env/mamba/envs/haphic/compiler_compat -fno-strict-overflow -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /public/work/env/mamba/envs/haphic/include -fPIC -O2 -isystem /public/work/env/mamba/envs/haphic/include -fPIC -I/tmp/pip-install-jdeo9wc9/pysam_7bf34e81219f453cada20a7807dce25c/pysam -I/tmp/pip-install-jdeo9wc9/pysam_7bf34e81219f453cada20a7807dce25c/htslib -I/tmp/pip-install-jdeo9wc9/pysam_7bf34e81219f453cada20a7807dce25c/samtools -I/tmp/pip-install-jdeo9wc9/pysam_7bf34e81219f453cada20a7807dce25c/samtools/lz4 -I/tmp/pip-install-jdeo9wc9/pysam_7bf34e81219f453cada20a7807dce25c/bcftools -I/tmp/pip-install-jdeo9wc9/pysam_7bf34e81219f453cada20a7807dce25c -I/public/work/env/mamba/envs/haphic/include/python3.12 -c pysam/libchtslib.c -o build/temp.linux-x86_64-cpython-312/pysam/libchtslib.o -Wno-unused -Wno-strict-prototypes -Wno-sign-compare -Wno-error=declaration-after-statement
In file included from pysam/libchtslib.c:2154:0:
/public/work/env/mamba/envs/haphic/include/python3.12/internal/pycore_frame.h: In function ‘_PyFrame_Initialize’:
/public/work/env/mamba/envs/haphic/include/python3.12/internal/pycore_frame.h:134:5: error: ‘for’ loop initial declarations are only allowed in C99 mode
for (int i = null_locals_from; i < code->co_nlocalsplus; i++) {
^
/public/work/env/mamba/envs/haphic/include/python3.12/internal/pycore_frame.h:134:5: note: use option -std=c99 or -std=gnu99 to compile your code
error: command '/usr/bin/gcc' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for pysam
Failed to build pysam
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (pysam)
critical libmamba pip failed to install packages
`
I don't understand what this error message means, but it does seem to be related to GCC. I'll try to change the python version tomorrow.

Also during the installation I encountered a situation where pip couldn't install pysam, but was able to find it with mamba, so I removed it from the yml file and installed pysam manually with mamba after successfully installing the rest of the parts.

It seems the issue could be related to having a low GCC version. Consider installing the environment for Python 3.11 instead.

I'm sorry I was late in replying. After using python 3.11, the installation was successful, and no error was reported. Thanks again for your help!


improve error code in 0-Disk

The error code in 0-Disk is already better than it used to be. For example right now we already return error types or "constant" errors, where it makes sense, such that the callee can check if an error is of that type or is equal to that "constant".
Great, but there can still be improved upon the error code:

It is not uncommon that we want to do multiple things which all return errors. However we want to do all actions regardless if one or multiple of those actions return an error. The result is thus some kind of list. For now in all these scenarios we make some quick error type ourselves right now;
We often wrap errors in order to give more context, and while this is great it does make us lose the original error;

What we're trying to solve in this issue is not a unique problem.
A package like github.com/pkg/errors comes to mind, but there might be others. Perhaps we need one or perhaps we need multiple. Or perhaps we need to define some common primitives ourselves. Either way, it could use some improvement.

What we probably want is:

Be able to group non-related errors together into one error (as described above);
Be able to add context to another error (as described above), as a smarter way of wrapping around it;
Avoid the use of fmt.Errorf errors where possible, as we now use them way too much imho;
Add more "constant" errors where they make sense, as well as error types where those make sense;
All these features can be provided by using one or multiple dependencies, and/or providing our own github.com/zero-os/0-Disk/errors package for capabilities we want to share with the entire codebase;

A first good steps would probably be go through the entire codebase to see where and how we return errors at the moment, do error handling, and where we could use the improvements mentioned above (or not).
In order to avoid making this into too big of a PR at once, you could classify the improvements, such that you can do one thing at a time. Such that you can open one smaller PR at a time, where you fix one class of improvements at a time.
It's an issue that covers really a lot of ground, so feel free to DM me on telegram or ask more questions here before you start on it, or while you're working on it.

If you want a quick video-call about this, let me know and we can do it tomorrow if so.

@GlenDC , sure, let me know when you're available!


Unit Tests CI/CD integrations

To keep track of this, I created an issue.
We need unit tests and automated github actions.
Afet implementing the data models, the tests should be easy to implement. As for the github actions, one of them might/should be creating requirement.txt from the poetry requirements at each PR to make sure they are synchronized

I have created a GitHub action that runs the unit tests and created one dummy test that just tests module initialization. The install and pytest commands are both called using poetry to ensure the environment is correct.
The only wrinkle is that automated tests with Python 3.12 are not working; installation works fine but the buildbot complains that
import six.moves

is failing. I cannot reproduce this offline.


Drop support for omnisharp v1 server

As promised, this drops all the specialized support for v1 server and commands that relate to v1 endpoints.

+93 -750 ... Nice to clear out so much old code, thanks!


Change Parts to Ranges and Trees to MetaRanges

Codecov Report

Merging #1121 (da064ff) into master (e9bd73b) will decrease coverage by 0.01%.
The diff coverage is 58.09%.

@@            Coverage Diff             @@
##           master    #1121      +/-   ##
==========================================
- Coverage   47.00%   46.98%   -0.02%
==========================================
  Files         182      182
  Lines       14285    14301      +16
==========================================
+ Hits         6714     6719       +5
- Misses       6680     6687       +7
- Partials      891      895       +4

Impacted Files
Coverage Δ

graveler/committed/value.go
93.10% <ø> (ø)

graveler/sstable/batch.go
100.00% <ø> (ø)

graveler/sstable/cache.go
40.74% <ø> (ø)

graveler/sstable/iterator.go
100.00% <ø> (ø)

graveler/sstable/manager.go
54.54% <ø> (ø)

graveler/committed/range.go
35.71% <35.71%> (ø)

graveler/committed/committed.pb.go
43.10% <43.10%> (ø)

graveler/committed/apply.go
60.46% <55.55%> (ø)

graveler/committed/meta_range_writer.go
58.51% <58.51%> (ø)

graveler/graveler.go
35.81% <64.28%> (ø)

... and 12 more

Continue to review full report at Codecov.

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


copr: Add vectorize elt

Signed-off-by: taoyu<EMAIL_ADDRESS>PCP #5751

What have you changed?
Add vectorize elt
What is the type of the changes?

Improvement (a change which is an improvement to an existing feature)

How is the PR tested?

Unit test
Integration test

Does this PR affect documentation (docs) or should it be mentioned in the release notes?
No
Does this PR affect tidb-ansible?
No

/run-integration-copr-test copr-test=pr/91

/run-integration-copr-test copr-test=pr/91

/test

/run-integration-copr-test copr-test=pr/91

/run-integration-copr-test copr-test=pr/91

/run-integration-copr-test copr-test=pr/91

/merge

/test


Time-series UI - Range filter tags

Split from https://github.com/CartoDB/cartodb/issues/11588

Add selection tags above range filter limits.

The current behaviour is showing a text in the header section.

Perhaps we should tackle this before https://github.com/CartoDB/cartodb/issues/12178 to give space for the latter issue.
Please check the different behaviours in the design tickets, specially the comment about what to do when the two labels are very close -> https://github.com/CartoDB/design/issues/597#issuecomment-285003447
Different positions
Label above Play button

Label in the rightmost position

Label in the middle

Label in the leftmost position

Very close labels

Thoughts about this ticket:

Tipsy tooltip is available neither in DI nor in CARTO.js, we should create one to be used there (from cosecha propia IMHO, but you decide).
Be careful with the edges of the widget, tooltip will need to work properly :dancer:.

There's a tooltip view already, it's used, for instance, on the regular histogram.
Will do

@urbanphes On the screenshots above, the handles for the range selection are different from the ones we have right now. They are a big pill from top to bottom, without the line across it.
The full height actually works better for a tooltip, but should we change them for the regular histogram as well, or should they be different?

Leaving this here as a reminder, cause it's causing issues with the tooltips
https://github.com/d3/d3/issues/1604

Sorry for the delay 🙏.
Today I've been talking with @rjimenezda and the doubt is resolved.
This is the ticket, we are working now https://github.com/CartoDB/design/issues/597

Moved back to code review cause I added a lot of code to address the issues, sorry about that.

@CartoDB/design @noguerol going to deploy this soon™
Next step will be moving the play button & adapting more of the responsive changes. #12387
💋
PS: The ability to drag the selection and click to go to a certain point is almost finished too (#12180)


Does not run on 0.12.2

After npm install and require('libxmljs') I get following:
Error: /pathtoproject/node_modules/libxmljs/build/Release/xmljs.node: undefined symbol: _ZN2v82V837AdjustAmountOfExternalAllocatedMemoryEl
    at Error (native)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at bindings (/pathtoproject/node_modules/libxmljs/node_modules/bindings/bindings.js:76:44)
    at Object.<anonymous> (/pathtoproject/node_modules/libxmljs/lib/bindings.js:1:99)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)

Seems to be OK on 0.10.36.

Why don't you please share some things you tried to do to debug this?

remove the node_modules folder and re-run the npm install.

Nope. Still not working. I didn't really debug this. I have a script:
console.log('VER', process.version);
require('libxmljs');
console.log('OK');

and locally installed(npm version 2.10.1, which comes with node 12.x). Running the script with 12.x yields error, 10.x does not.
If you tell me that it works with your 12.x installation, the only reason I can see this happening is that install process does not play well with non-globally installed node binaries(node in my path is 10.x, to test 12.x I've separate binaries). I'm on debian linux.

Feeling about the build process seems to be right. Changing 12.x to be in my path instead of the 10.x did install and work correctly. Thanks.


Fix fractional part of gwTime in case of uplink received via LoRa Basics Station

Whenever an uplink is received via a LoRa Basics Station gateway which doesn't gave GPS time available, the fractional second of the receive time is missing in the reported gwTime of the rx_info element.
Example:

It seems the fractional part of the rxtime (as float) is not properly scaled to nanoseconds before it is cast to int64.
https://github.com/chirpstack/chirpstack-gateway-bridge/blob/6897fe56c2b8e631632fe2ed37e4d6dbd903f563/internal/backend/basicstation/structs/radio_meta_data.go#L80-L86
This PR fixes that.
Note: rxtime in Basics Station is the radio receive time (xtime) converted into UTC. This conversion is susceptible to UTC synchronization issues (e.g. NTP not functioning correctly, or large/asymmetric network latencies in case of LNS-based timesync) and therefore must be used with care by any consumer.

Thanks @beitler :+1:


Is there interest in having app.extend?

Sorry if this was asked before, but I didn't find anything.
app.set always replace the whole field.
app.set("foo", "bar");
app.set("foo", "lol");
app.get("foo"); // lol

Sometimes we might want to only update certain properties.
app.set("foo", { a: 1, b: 1 });
app.set("foo", { b: 2 });
app.get("foo"); // { b: 2 }

I would like the above snippet to act like:
app.set("foo", { a: 1, b: 1 });
app.set("foo", Object.assign({}, app.get("foo"), { b: 2 }));
app.get("foo"); // { a: 1, b: 2 }

Is there any interest in having a such utility exposed such as app.extend (or whatever else), so that it would be possible to write:
app.set("foo", { a: 1, b: 1 });
app.extend("foo", { b: 2 });
app.get("foo"); // { a: 1, b: 2 }

Eventually I could submit a PR.

Hi @brunoscopelliti currently the app settings mechanism is designed to be a single key to a single value store, and so things like app.extend are out of scope of the current design. That doesn't mean the design can't be changed, but it was a known stopping point when settings were made to not support that.
I'm going to leave this as the start of a discussion here on if this should actually be something supported.

What were the reasons behind that decision?
What would be the impacts of changing the design?

At it's core, it's not really much more than app.set('foo', Object.assign(app.get('foo') || {}, { foo: 'bar' })) but without the flexibility to perform your own merge strategies, it just seems more complexity into core than it's worth... This issue is stale at this point, so just closing as stale. Don't take that as a definite "no", but more like we're not going to focus on this in the near term.


Make package.json.scripts optional

Adds a check whether package.json.scripts exists.

package.scripts can't be optional because we need a way of knowing how to – at least – start the application. I'd rather just check for p.scripts.stop...

FYI @mik-jozef & @GochoMugo
This should satisfy most use cases. Start can't be optional, but stop must be.


Typo fix

Summary

Checklist

[ ] I have run nox and all the pipelines have passed.
[ ] I have made unittests according to the code I have added/modified/deleted.

Related issues

If with listener properly documented?

diff_4.txt

Have a section any the client where we mention stuff like hot reloading and the async cache

Add images to tanjun guide

Mention appcommand context in tanjun guide

@tanjun.with_cooldown("main_commands", follow_wrapped=True)
@tanjun.annotations.with_annotated_args(follow_wrapped=True)
@tanjun.as_message_command("name")
@tanjun.as_slash_command("name", "description")
@tanjun.as_user_menu("name")
async def user_command(ctx: tanjun.abc.Context, user: typing.Annotated[annotations.User, "A user"]) -> None:
    ...

simplify this usage guide example for cooldowns


Incognito icon is missing.

Hello.
v0.2.4 Mac OS - there is no incognioto icon while browsing in incognito mode.

Windows 10
Firefox Beta:
Not able to reproduce

@Excigma, but for that you have to have Firefox Account switcher icon in the toolbar. If you are not using it there will be no incognito icon.

That's intended per my suggestion on #48.
Moving static icons (e.g. the default one in Firefox) across toolbars is very hacky and likely looks wrong on many systems, while the profile icon replicates the features of Chrome and can be customized (moved, removed) by the user easily.

Yeah, basically, if you want to replicate Chrome, you should have the account button in your toolbar.  It's there by default in Firefox so you either need to have an older profile or manually remove it to end up in this situation.
I'll make as wontfix but if this really bothers you, maybe I can work something out - just open another issue.


move header descriptions into global section

per #585

LGTM

One more needed

@kibbles-n-bytes @n3wscott @zrob @tinygrasshopper one more needed


Complete homework 4 for chapter 1.

Completed Chapter 1, homework 4.
I did change one of the lines in the Lesson3Tests.cs file, though, because the wording was inconsistent between the first test and last one.
[InlineData(100, 0, "Height cannot be equal or less than zero, but was 0.")]
[InlineData(0, 50, "Weight cannot be equal or less than zero, but was 0.")]
[InlineData(-100, 50, "Weight cannot be equal or less than zero, but was -100.")]
[InlineData(0, 0, "Weight cannot be equal or less than zero, but was 0.Height cannot be less than zero, but was 0.")]
[InlineData(0, 0, "Weight cannot be equal or less than zero, but was 0.Height cannot be equal or less than zero, but was 0.")]

Completed Chapter 1, homework 4.
I did change one of the lines in the Lesson3Tests.cs file, though, because the wording was inconsistent between the first test and last one.
[InlineData(100, 0, "Height cannot be equal or less than zero, but was 0.")]
[InlineData(0, 50, "Weight cannot be equal or less than zero, but was 0.")]
[InlineData(-100, 50, "Weight cannot be equal or less than zero, but was -100.")]
~[InlineData(0, 0, "Weight cannot be equal or less than zero, but was 0.Height cannot be less than zero, but was 0.")]~
[InlineData(0, 0, "Weight cannot be equal or less than zero, but was 0.Height cannot be equal or less than zero, but was 0.")]

Yeah, it's a good choice and I am aware of inconsistencies- it annoy me as well. Never have the time to actually go and make the changes myself 😢
Well done for spotting it!

Thank you for the comments! I can submit a pull request with just the update to the InlineData where the comment is different, if that works for you.


UAT Fixes (Part 2)

Issue with building via docker first time after cloning from repo. To solve this issue you need to do:
cd ui
npm install
npm run build
npm run build

We need to investigate why this issue is happening, but it seems that the issue stems from the fact that the components.d.ts file is not included in git.

API not accessible by the UI:
IP-1647270241492.log

Issue with building via docker first time after cloning from repo. To solve this issue you need to do:
cd ui
npm install
npm run build
npm run build

We need to investigate why this issue is happening, but it seems that the issue stems from the fact that the components.d.ts file is not included in git.

API not accessible by the UI:
IP-1647270241492.log

Issue in Binance Smart Chain Monitoring:

15/03/2022 08:42:46 AM - ChainlinkContractsMonitor - DEBUG - Retrieved prometheus data from endpoint: https://<IP_ADDRESS>:2002/metrics
15/03/2022 08:42:46 AM - ChainlinkContractsMonitor - ERROR - Could not transact with/call contract function, is contract deployed correctly and chain synced?
Traceback (most recent call last):
  File "/root/.local/share/virtualenvs/alerter-GNVLrDHs/lib/python3.9/site-packages/web3/contract.py", line 1513, in call_contract_function
    output_data = web3.codec.decode_abi(output_types, return_data)
  File "/root/.local/share/virtualenvs/alerter-GNVLrDHs/lib/python3.9/site-packages/eth_abi/codec.py", line 181, in decode_abi
    return decoder(stream)
  File "/root/.local/share/virtualenvs/alerter-GNVLrDHs/lib/python3.9/site-packages/eth_abi/decoding.py", line 127, in __call__
    return self.decode(stream)
  File "/root/.local/share/virtualenvs/alerter-GNVLrDHs/lib/python3.9/site-packages/eth_utils/functional.py", line 45, in inner
    return callback(fn(*args, **kwargs))
  File "/root/.local/share/virtualenvs/alerter-GNVLrDHs/lib/python3.9/site-packages/eth_abi/decoding.py", line 173, in decode
    yield decoder(stream)
  File "/root/.local/share/virtualenvs/alerter-GNVLrDHs/lib/python3.9/site-packages/eth_abi/decoding.py", line 127, in __call__
    return self.decode(stream)
  File "/root/.local/share/virtualenvs/alerter-GNVLrDHs/lib/python3.9/site-packages/eth_abi/decoding.py", line 142, in decode
    start_pos = decode_uint_256(stream)
  File "/root/.local/share/virtualenvs/alerter-GNVLrDHs/lib/python3.9/site-packages/eth_abi/decoding.py", line 127, in __call__
    return self.decode(stream)
  File "/root/.local/share/virtualenvs/alerter-GNVLrDHs/lib/python3.9/site-packages/eth_abi/decoding.py", line 198, in decode
    raw_data = self.read_data_from_stream(stream)
  File "/root/.local/share/virtualenvs/alerter-GNVLrDHs/lib/python3.9/site-packages/eth_abi/decoding.py", line 305, in read_data_from_stream
    raise InsufficientDataBytes(
eth_abi.exceptions.InsufficientDataBytes: Tried to read 32 bytes.  Only got 0 bytes

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/panic/alerter/src/monitors/monitor.py", line 92, in start
    self._monitor()
  File "/opt/panic/alerter/src/monitors/contracts/chainlink.py", line 684, in _monitor
    node_contracts = self._filter_contracts_by_node(
  File "/opt/panic/alerter/src/monitors/contracts/chainlink.py", line 253, in _filter_contracts_by_node
    transmitters = aggregator_contract.functions.transmitters() \
  File "/root/.local/share/virtualenvs/alerter-GNVLrDHs/lib/python3.9/site-packages/web3/contract.py", line 957, in call
    return call_contract_function(
  File "/root/.local/share/virtualenvs/alerter-GNVLrDHs/lib/python3.9/site-packages/web3/contract.py", line 1530, in call_contract_function
    raise BadFunctionCallOutput(msg) from e
web3.exceptions.BadFunctionCallOutput: Could not transact with/call contract function, is contract deployed correctly and chain synced?


Make sure that there is alway a ruby binary on the path

In some cases it might be the only Ruby interpreter on the system is provided by Vagrant. Since we call ruby directly to start the DNS server process we need to make sure there is always a ruby executable on the path.

Merged via pull request #232


Texteditor add Link Overlay missing OK Button

Miss the OK Button on Link add in Texteditor

Chrome on Windows

This should be fixed with version 1.0.5 ... if not please reopen


ISPN-5635 Upgrade WildFly

ISPN-5635 Upgrade the server base to WildFly 9.0.1.Final
https://issues.jboss.org/browse/ISPN-5635

Those errors seems related: http://ci.infinispan.org/viewLog.html?buildId=28580&buildTypeId=bt9&guest=1
Could you please take a look at them?

Dropped the WildFly 10 upgrade since @gustavonalle is already taking care of that in https://github.com/infinispan/infinispan/pull/3568

Integrated, thanks @tristantarrant


Dependencies in cascade saves

Hey!
just started using Neo4j via your gem and I encountered some issue that I haven't seen answered here and maybe it would be of interest to consider.
(I am not including any code because this is more conceptual I believe)
I have a bunch of node objects: A, C and N and some relationships between them: A->C, A->N and C->N
The problem comes when persisting these objects (which in the end is a tree) and there is a dependence of some C nodes to the object N because of the way the model is implemented in memory and then persisted I believe.
Consider the following use case (note the order in which the listing happen as this sequence is what happens when running it in code) where nodes of each type are unique (I have an internal id that identifies each node within my application and makes them unique).
The semantics could be as follows: think of a root object N that is owned by another object A_1, the node N has C_{a|b|c} nodes attached to it and each of these C nodes are owned by one of the objects A_{1|2|3}. Particularly...
A_1 -> N
A_2 -> C_a ||| C_a -> N
A_3 -> C_b ||| C_b -> N
A_1 -> C_c ||| C_c -> N
The problem comes when saving this structure, in particular the situation where the node A_1 is related to two nodes: N and C_c. When saving, the library saves node N and then A_1, and then creates the relationship as by that time has the UUID of each of the objects within that relationship.
Then, when it is time to do something similar with A_1 and C_c, the library gives an error (RuntimeError: Unable to defer node persistence, could not save #<Graph::A uuid: nil>) because of the node A_1. This node is already persisted (from the relationship A_1->N) and so it has a proper UUID but the library tries to generate a new UUID for this last relationship as it is not aware of the existing UUID of A_1 and the constraint that A_1 is unique (recall the internal id in my scenario).
I have solved this by implementing the before_save method in the C nodes to make a query in the graph for the dependent A objects and whether updating the reference in case that it exists already or forcing it to be saved so that the relationship has a fresh version of the object.
My understanding was that this was all transparent to me (at least the cascade of 'saves' that happen when saving this structure is pretty much what I was expecting) but I was not expecting this last behavior (the error given is not precisely helping at all although the 'uuid:nil' part was the main hint).
I see this will happen in large tree-like cascades anyways where objects (nodes) can be reused later on the structure and since the nodes are re-used, then they have to be unique and the persistence logic should be aware of these nodes that have already been persisted but still being used in a structure that is not fully persisted yet.
I am happy to contribute with some PR if this is in fact some issue with the library although some hints on where to start would be very appreciated. I have plenty of testing scenarios :)
Runtime information:
Neo4j database version: 3.0.3
neo4j gem version: 7.0.13
neo4j-core gem version: 6.1.4

Firstly, I'm sorry for not responding sooner!
I'm not sure I understand the situation, so could you give a simple code example that I could run?
Regarding the "Unable to defer node persistence" error, that happens when one of your unpersisted nodes can't be saved (because of a validation error, for example).  I actually created issue #1238 as a reminder to improve that error message.


"UnboundError" with backslash-command without argument (\c)

I get an uncaught exception with backslash-commands that take arguments, like \c.
Consider the following interaction with a freshly installed database.
$ pgcli testdb
testdb> \c testdb
You are now connected to database "testdb" as user "<my_user>"
testdb>

From here, if I type \c without specifying which database I wish to connect to, I get an uncaught exception:
testdb> \c

Traceback (most recent call last):
  File "/home/<my_user>/.local/lib/python3.4/site-packages/pgcli/pgexecute.py", line 89, in run
    dbname = sql.split()[1]
IndexError: list index out of range

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/<my_user>/.local/lib/python3.4/site-packages/pgcli/main.py", line 104, in cli
    res = pgexecute.run(document.text)
  File "/home/<my_user>/.local/lib/python3.4/site-packages/pgcli/pgexecute.py", line 91, in run
    _logger.debug('Failed to switch. DB missing: %r', dbname)
UnboundLocalError: local variable 'dbname' referenced before assignment

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/<my_user>/.local/bin/pgcli", line 9, in <module>
    load_entry_point('pgcli==0.10.0', 'console_scripts', 'pgcli')()
  File "/home/<my_user>/.local/lib/python3.4/site-packages/click/core.py", line 610, in __call__
    return self.main(*args, **kwargs)
  File "/home/<my_user>/.local/lib/python3.4/site-packages/click/core.py", line 590, in main
    rv = self.invoke(ctx)
  File "/home/<my_user>/.local/lib/python3.4/site-packages/click/core.py", line 782, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/<my_user>/.local/lib/python3.4/site-packages/click/core.py", line 416, in invoke
    return callback(*args, **kwargs)
  File "/home/<my_user>/.local/lib/python3.4/site-packages/pgcli/main.py", line 116, in cli
    _logger.debug("sql: %r, error: %r", document.text, e.message)
AttributeError: 'UnboundLocalError' object has no attribute 'message'

A proper way of handling this is to inform the user that a database (or other argument for other backslash-commands) must be provided and return to the prompt gracefully.
System details:
OS: 3.17.6-1-ARCH
Python 3.4.2
postgres (PostgreSQL) 9.3.5
Latest pip-release of pgcli.

You're right. My bad. I'll fix this issue.

Gazing over the code, the fix (of an uncaught exception while handling an exception) should be easy:
Change line 91 of pgexecute.py from:
 _logger.debug('Failed to switch. DB missing: %r', dbname)

to
_logger.debug('Failed to switch. No DB specified.')

Maybe?

This issue is now fixed by PR #49, #50 and commit: eed1931b3f77d5f9b4553ea41ebeeb3188d2a769

Version 0.10.1 released to PyPI. https://pypi.python.org/pypi/pgcli/0.10.1


Add flag to toglle debug mode while creating Power VS Client

This PR contains the changes to add a new flag powerVSClientDebugMode to enable or disable the debug mode for Power VS Client

/cc: @mkumatag

@Karthik-K-N again same thing, please mention the jira ticket in the description.


Update drand documentation

Fix drand capitalisation (all lowercase)
Fix reference to Certificate Transparency Logs
Update documentation to mention G1/G2 swap and unchained randomness

updated following @lukevalenta 's comments

If y'all can't merge, let me know when this is ready to go.

@kodster28 This is ready to go.


"display-metrics-changed" event does not trigger when changing resolution

I just tried something simple like this:
var screen = require('screen');
screen.on('display-metrics-changed', function(ev, display){
  console.log(display);
});

And then changed the scaling on my retina screen (aka resolution):

The event is not triggered as expected

I don't know that changing the scaling factor counts as a metrics change at the moment, but it definitely should. Does plugging in a monitor fire it?

I don't know that changing the scaling factor counts as a metrics change at the moment, but it definitely should

Yup , these are the metrics being tracked.


DOI minting for the Data & Code Pathway

DOI minting is on the work settings page, but it might be nice to have the request for DOI minting be during the deposit process or be displayed as recommended just after publication. We also should require DOIs to be minted by ScholarSphere.

Open Questions:

How exactly should this behave?

I think an ideal set up would be to have data &code pathway users be redirected to the work settings page after successfully publishing and having the DOI field be recommended for this pathway.

WDLL
Another optional field at the final step of the work upload process for a user to opt in to have their DOI minted on submission.  Similar to the request curation, but in this case there will be a boolean form (maybe a checkbox).  This field could be right after the request curation field:

The actual minting of the DOI should not happen until the submission is published.  So, if they save it as a draft, the DOI should not be minted yet.

@Smullz622 Here is the help text:
A Digital Object Identifier (DOI) is a unique identifier that ensures your work can be easily cited and reliably located. We recommend minting a DOI unless your work already has one from another publisher or repository.
Note: It may take a few moments for the DOI to be minted after publication. Please refresh the page if it does not appear right away and do not request an additional one.


Allow config solver override in hybrid samplers

Constrain client type to hybrid, but propagate user-specified solver
definition (from config file/env/kwargs).
This is a hybrid analogue of #317 (where we applied the same fix to QPU samplers).
Note: partial user-supplied solver definition (patch) is not possible.
User-supplied solver mapping will not be updated to fix accepted
problems types (bqm/dqm) or version preference.
Closes #363.

Not sure why AppVeyor fails.

Alright, purging the cache on AppVeyor resolved that pip._internal error.
Interestingly, unlike CircleCI, AppVeyor provides a way to clear cache via an API. Probably the only +1 over Circle. :laughing:

That's a good idea! It will bridge the gap until we have https://github.com/dwavesystems/dwave-cloud-client/issues/426.

Codecov Report

Merging #422 (413c2fa) into master (d4d8399) will decrease coverage by 1.50%.
The diff coverage is 85.71%.

@@            Coverage Diff             @@
##           master     #422      +/-   ##
==========================================
- Coverage   91.87%   90.36%   -1.51%
==========================================
  Files          22       22
  Lines        1366     1360       -6
==========================================
- Hits         1255     1229      -26
- Misses        111      131      +20

Impacted Files
Coverage Δ

dwave/system/samplers/dwave_sampler.py
84.37% <ø> (-3.13%)
:arrow_down:

dwave/system/samplers/leap_hybrid_sampler.py
74.04% <85.71%> (-3.33%)
:arrow_down:

dwave/system/samplers/clique.py
77.35% <0.00%> (-6.29%)
:arrow_down:

dwave/system/composites/embedding.py
95.85% <0.00%> (-1.19%)
:arrow_down:

Continue to review full report at Codecov.

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


test: Validate nerserver availability before testing connectivity

Fixes: #7673

This change is

Coverage increased (+0.03%) to 41.609% when pulling 7a964756adc0186af9efb473c1b16d5481e3eac1 on pr/tgraf/netperf-readiness into ded1ba7ae849eee41816d94e214a610150294d02 on master.

test-me-please

Boot VMs stage timed out again: https://jenkins.cilium.io/job/Cilium-PR-Ginkgo-Tests-Validated/12021/

test-me-please

test-me-please

VM image download timed out

test-me-please


Add default values for order and to_show_state

Adds default values for order and to_show_state in function declarations for each sorting function, with the exception of radix_sort, which takes those arguments by reference. Fixes #136.

Thanks for helping out on this issue @alxmjo!

My pleasure. 🙂


How can I check whether a model is overfitting or not?

Mean AP, map_50, map_5095 are slightly decreased after a certain epoch.
I think it happens by overfitting.
Is there any way to stop training when a model starts to overfit?
Also, does "apex.amp.handle:140 - Gradient overflow.  Skipping step, loss scaler 0 reducing loss scale to 16384.0" mean overfitting?

Is there any way to stop training when a model starts to overfit
Just stop the training process.

Also, does "apex.amp.handle:140 - Gradient overflow. Skipping step, loss scaler 0 reducing loss scale to 16384.0" mean overfitting?
No.


MPU flash region for storage area

Currently there is possible to allow write to whole FLASH or not allow writing to FLASH at all (CONFIG_MPU_ALLOW_FLASH_WRITE).
It should be possibile to have option which will allow writing to flash area  which is specific for data Storage. Thanks to that e.g. program flash will be stil preserve while e.g. file system will might operate propellery.

cc @carlescufi

Downside, is that this will eat an MPU region index. But it's doable. Is this something still needed @nvlsianpu ?

So fare I didn't revived any request for this - this would be must have for critical devices which are not zephyr target today. Optionally for such protection we can use other SoC resource than MPU (on some targets).
For development purpose advantage of having that is help on identification of bugs caused by over/under-run  flash write., but situation is more complex as in the same time need to allow writes to DFU image-collection area/s.


Node-Red VS Code Extension Installs, won't open

Issue Type: Bug
Unable to open Node-Red VS Code Extension in VS Code.
Installs fine.
Extension Readme Says use "ctrl alt x" or  "F1 + 'Node-RED: Open'" to open extension -  there is no feedback (good or bad) upon using specified hotkeys.
Tried this on two separate Macbooks, two separate installs of VSCode.
Extension version: 0.2.0
VS Code version: Code 1.47.3 (91899dcef7b8110878ea59626991a18c8a6a1b3e, 2020-07-23T13:08:29.692Z)
OS version: Darwin x64 19.6.0

System Info

Item
Value

CPUs
Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz (16 x 2300)

GPU Status
2d_canvas: enabledflash_3d: enabledflash_stage3d: enabledflash_stage3d_baseline: enabledgpu_compositing: enabledmetal: disabled_offmultiple_raster_threads: enabled_onoop_rasterization: disabled_offprotected_video_decode: unavailable_offrasterization: enabledskia_renderer: disabled_off_okvideo_decode: enabledviz_display_compositor: enabled_onviz_hit_test_surface_layer: disabled_off_okwebgl: enabledwebgl2: enabled

Load (avg)
1, 2, 2

Memory (System)
32.00GB (0.04GB free)

Process Argv

Screen Reader
no

VM
0%

Hi, Robert did your issue with the extension resolved, I am having the same issue in a Windows 10 Pro -64 bit environment and the extension installs fine without any errors, nothing seems to happen after I click on the shortcut  "ctrl alt x" or "F1 + 'Node-RED: Open'", I have installed directly it in the machine and working on it would like to have it in VS CODE as I use it for other development activities.

The issue is that it is using a deprecated API (previewHTML).
See https://stackoverflow.com/questions/63069694/i-get-the-command-vscode-previewhtml-not-found-error-message-on-vscode
Since there hasn't been any updates in over 2 years, it may be time to fork or to otherwise attempt another Node-RED extension.

darn.  was looking forward to using this.

same issue for me

What do we need to pay to get an update to this extension?!


Update base image used in Dockerfile

The base image we are using in the Dockerfile is a little old now and we need to update it to the latest we have on quay: quay.io/yugabyte/connect-base-yb:0.4

Changing the title of the issue from Update base image used in Dockerfile to Remove dependency of Dockerfile on the custom base image


Added a catchall to set api server ip address in kubelet cmd params

@zmerlynn

LGTM. Merging <= 2h because this may break other providers.


Drop support for Spark 2.4

Spark 3 has been released in Dec 2020. All major platforms are supporting it now. Maybe it's time to drop support for Spark 2.4?

I'm in favour of dropping support for Spark 2.x.
Some of our users are already on the 3.x branch:
https://github.com/ldbc/ldbc_snb_datagen_spark/issues/324#issuecomment-918532634

The first step is moving to Spark 3.1 by default: #338

#336 removed Spark 2.4 support


populateMetadataMapFromConfig should allow classes

Provide a narrative description of what you are trying to accomplish.
Code to reproduce the issue
MetadataMap::class => [
    [
        '__class__' => RouteBasedResourceMetadata::class,
        'resource_class' => Post::class,
        'route' => 'blog.post',
        'extractor' => ClassMethods::class,
    ],
    new RouteBasedResourceMetadata(
        Post::class,
        'blog.post',
        ClassMethods::class
    ),
];

Expected results
Imho both of the above should work the same. The later is better as it's typed.
Actual results
The second config fails as only arrays are allowed.

There's a bit of an issue, however, when it comes to usage within Expressive: we cache configuration. As such, having actual instances in play could lead to errors.
The whole point of using configuration is to have a serialization format that we can then expand into objects. If it also includes actual object instances, why bother with configuration in the first place?
Additionally, if you want to use actual object instances, you can already do so by registering delegators for the MetadataMap service.
Closing, as this is not a feature we want to support at this time.


HTTP and HTTPS listeners don't work together

Describe the bug
I can't use HTTP and HTTPS listeners together without "redirect_cleartext_from".
To Reproduce
Add the below annotation in the ambassador service:
apiVersion: ambassador/v0
kind: Module
name: tls
config:
  server:
    enabled: True

Expected behavior
I want to create HTTP only services and HTTPS only services, but I can't. When I enable the TLS module, the HTTP port in the pods is closed. So, to have both listeners opened, I need to use the "redirect_cleartext_from", so all HTTP request are redirect to HTTPS.
Versions (please complete the following information):

Ambassador: 0.40.2
Kubernetes environment: Kubernetes
Version:
Client Version: version.Info{Major:"1", Minor:"12", GitVersion:"v1.12.2", GitCommit:"17c77c7898218073f14c8d573582e8d2313dc740", GitTreeState:"clean", BuildDate:"2018-10-24T06:54:59Z", GoVersion:"go1.10.4", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"10", GitVersion:"v1.10.10", GitCommit:"be1a908c6aa47e0ae1b1dc861a1de6ccfe963aa2", GitTreeState:"clean", BuildDate:"2018-11-13T11:33:04Z", GoVersion:"go1.9.3", Compiler:"gc", Platform:"linux/amd64"}

This is something we would like to support. Currently, as a work-around, you can run two deployments of ambassador. One for http and another for https traffic.

Ok, thanks!

+1 We have some legacy apps that still support non-TLS routes.  It would be a pain in the **** to setup the two different ambassador deployments.  What I really want to do is simply add a path in the mapping file and setup the ports in the service definition - I don't think that is currently possible?  Override on a per-mapping would be a bonus if we wanted to "turn off" defaults.

We have the same problem: we prefer Ambassador to be able to work with http and https, while Envoy allows it.

Community contributions for this are appreciated!

Could you please give some priority to this?

Today I ran into a problem with cert manager listeners because of this. Any updates on the issue?

cert-manager is not able to connect to http:// if tls is enabled in ambassador. Apparently disabling temporally tls via the module configuration doesn't seem to work as long as there is some tlscontext.
Working with 2 ambassadors instances (one on 80 which have to the acme mapping, and the other one on https which have the app mapping) doesn't help much.

You would need some port-forward reflexion on your router to be able to use the external ip from inside the cluster.

How do you redirect to https if the path is not the letsencrypt challenge ?

Using cert-manager HTTP01 with ambassador is everything but straightforward with ambassador.

Bad bot. Don't close.

@eburghar you are right, it is pain, however this information may help:
Reading from https://letsencrypt.org/docs/challenge-types/

Our implementation of the HTTP-01 challenge follows redirects, up to 10 redirects deep. It only accepts redirects to “http:” or “https:”, and only to ports 80 or 443. It does not accept redirects to IP addresses. When redirected to an HTTPS URL, it does not validate certificates (since this challenge is intended to bootstrap valid certificates, it may encounter self-signed or expired certificates along the way).

Meaning, the HTTP-01 challenge should work with HTTPS only ambassador. I have not tried it thou.

Bad bot. Don't close.


WSL2 Install error version GLIBC_2.33' not found`

I have the same error
$ curl -fsSL https://raw.githubusercontent.com/m1guelpf/plz-cli/main/install.sh | sh -
sh: 26: [[: not found
https://github.com/m1guelpf/plz-cli/releases/latest/download/plz-linux-x86_64
downloading latest binary
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 13.1M  100 13.1M    0     0   651k      0  0:00:20  0:00:20 --:--:--  917k
<EMAIL_ADDRESS>/lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by<EMAIL_ADDRESS><EMAIL_ADDRESS>/lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by<EMAIL_ADDRESS><EMAIL_ADDRESS>/lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by<EMAIL_ADDRESS>installed -

Same error on Ubuntu 20.04.

Same error here

I was having this issue as well on WSL2/Ubuntu 20 LTS. Upgrading to 22 LTS took care of the issue, as it was ultimately about the wrong C libraries. I think this could be solved during compilation, but not sure how.

So the install is trying to use a version higher than what you all have... had the same issue. If you download and install rust and then cargo build on your system it should work.
so

Install rust
clone repository
cargo build
cargo run

We've got to do this for each release?

We've got to do this for each release?

I am not too familiar with rust, but the best I can tell is that the file is compiled using a certain version of libc6. If your system is not using the same version then you need to do this. Once it is built you can just put the compiled binary in your PATH (this is most of what the first part of the install script is doing anyway) and it will work like normal from then on as far as I can tell. That worked for me.

So the install is trying to use a version higher than what you all have... had the same issue. If you download and install rust and then cargo build on your system it should work.
so

Install rust
clone repository
cargo build
cargo run

you can use cargo build --release command to build plz binary.

This should have been fixed by #19 and the new tagged release, could someone download the musl binary and confirm?

Can confirm, running the curl command now installs plz 🙂 I can now provide a OpenAI key.


Implement swap and crx as non-compiled gates in Lua

The gates swap and crx are currently built from other gates in Lua. As in Python, they should be implemented as fundamental gates.

closed by #15


Added Universal Module Definition

Added the feature discussed in the issue #144, the goal is to be able to publish outdated-browser on npmjs without affecting current way of doing things
Gulp for compilation
To minify and jshint file I created a gulp configuration with two tasks

default to minify js / css
server to serve the demo (localhost:3001/demo) and watch files (editing the js will minify it)

File structure
The goal is to make the directory easier to understand putting all the files needed in a dist directory.
├── demo/
│   └── index.html
├── dist/
│   └── outdatedbrowser.js
│   └── outdatedbrowser.css
│   └── lang/
├── src/
│   └── outdatedbrowser.js
│   └── outdatedbrowser.css

If you don't like this idea, you can tell me and I'll revert back to what it was
Added a new "force" option
I noticed in your demo that you had no way to force outdatedbrowser.js so I added a new option to force it. It can be usefull if some people willing to check custom with additional librairies (modernizr for instance)
In my opinion it could be interesting to add a new option to create a custom support method (just an idea)
Added module loader support
This was the main goal of this PR, I used umd (Universal Module Definition) to make outdatedbrowser loadable with requirejs or browserify.
I didn't published the plugin on npm cause you are the author (and maybe you want to keep the control), but I can do it if you want if this code is merged with master)
Sorry for my English :(

Someone else did a package for it (not needed anymore)


Update readme.md

Corrected all grammatical errors and updated the README
ISSUE NUMBER 703

[✔ ] ✅ My code follows the code style of this project.

[✔ ] 📝 My change requires a change to the documentation.

[✔ ] 🎀 I have updated the documentation accordingly.

[✔ ] 🌟 ed the repo

[✔ ] Bug fix

Please get assigned to the issue first and it's too easy issues can't assign

should I close the issue or is there any other way I can work upon it

now that the changes are approved kindly merge the PR


Not explicitly providing register_length argument in initialization of sparse FermionicOp results in incorrect expectation values

Environment

Qiskit Nature version: 0.3.1
Python version: 3.9.5
Operating system: MacOS 12.2.1

What is happening?
EDIT: Actually on second thoughts, it's not clear to me whether this is actually a bug or just user error, but I have left this up just in case this is not the intended functionality.
Suppose you initialize a sparse FermionicOp, but do not explicitly set register_length=num_qubits, then in general its expectation value (we're assuming that it's Hermitian here) with respect to a specified state will be incorrect. It's not totally clear to me whether this is a bug with FermionicOp or if this just exposes a bug in how Qiskit Terra's Op flow handles expectation values of PauliSumOps, but there is a bug somewhere.
How can we reproduce the issue?
The following code reproduces the bug:
from qiskit_nature.drivers import PySCFDriver
from qiskit_nature.problems.second_quantization import ElectronicStructureProblem
from qiskit_nature.converters.second_quantization import QubitConverter
from qiskit_nature.mappers.second_quantization import JordanWignerMapper
from qiskit_nature.circuit.library import HartreeFock
from qiskit_nature.operators.second_quantization import FermionicOp
from qiskit.utils import QuantumInstance
from qiskit.opflow import CircuitStateFn, AerPauliExpectation, StateFn, CircuitSampler
from qiskit.providers.aer import AerSimulator
from qiskit_nature.drivers import PySCFDriver, UnitsType, Molecule

import numpy as np

interatomic_distance =0.735
basis = 'sto3g'
backend = AerSimulator(method='statevector')
quantum_instance = QuantumInstance(backend=backend, seed_transpiler=1)
molecule = Molecule(geometry=[['H', [0., 0., 0.]],
                            ['H', [0., 0., interatomic_distance]]],
                    charge=0, multiplicity=1)
driver = PySCFDriver(molecule = molecule, unit=UnitsType.ANGSTROM, basis=basis)
q_molecule = driver.run()

qubit_converter = QubitConverter(JordanWignerMapper())
es_problem = ElectronicStructureProblem(driver=driver)
second_q_op = es_problem.second_q_ops()
qubit_op = qubit_converter.convert(second_q_op[0])

num_qubits = 2*q_molecule.num_molecular_orbitals

HF_state = HartreeFock(num_spin_orbitals=num_qubits,
                                                       num_particles=(q_molecule.num_alpha,q_molecule.num_beta),
                                                       qubit_converter=qubit_converter)

ansatz = HF_state
print(HF_state)

op_1 = qubit_converter.convert(FermionicOp(data='+_0 -_0'))
op_2 = qubit_converter.convert(FermionicOp(data='+_0 -_0', register_length=4))
op_3 = qubit_converter.convert(FermionicOp(data='N_0'))
op_4 = qubit_converter.convert(FermionicOp(data='NIII'))
op_5 = qubit_converter.convert(FermionicOp(data='N_0', register_length=4))
op_list = [op_1, op_2, op_3, op_4, op_5]

for op in op_list:
    expectation = AerPauliExpectation()
    observable_meas = expectation.convert(StateFn(op, is_measurement=True))
    ansatz_circuit_op = CircuitStateFn(ansatz)
    expect_op = observable_meas.compose(ansatz_circuit_op).reduce()

    sampled_expect_op = CircuitSampler(backend=backend).convert(expect_op)
    means = sampled_expect_op.eval()
    print(f'Evaluation of operator {op} is: {means}')
    print()

I print out the HartreeFock state just as a sanity check to see that the occupation number of orbital 0 in the Jordan Wigner encoding is 1. The output of the for-loop is:
Evaluation of operator 0.5 * I
- 0.5 * Z is: 0.0

Evaluation of operator 0.5 * IIII
- 0.5 * IIIZ is: 1.0

Evaluation of operator 0.5 * I
- 0.5 * Z is: 0.0

Evaluation of operator 0.5 * IIII
- 0.5 * IIIZ is: 1.0

Evaluation of operator 0.5 * IIII
- 0.5 * IIIZ is: 1.0

What should happen?
All of these FermionicOps are equivalent, so their expectation values with respect to the same state should be the same. In this case, the fix from a user's perspective is simple: explicitly set register_length, but this still should not happen and could be easily missed in more complicated code where the correct result is not so easily verified.
Any suggestions?
The issue is either with FermionicOp or how Opflow handles expectation values of PauliSumOps where the identity operator is implicit on some of the qubits.

The reason that you are seeing this discrepancy is because these operators are actually not identical.
Let me try to explain why.
FermionicOp("N_0")
# this results in the qubit operator
0.5 * (I - Z)
# whereas
FermionicOp("N_0", register_length=4)
# will result in
0.5 * ((I ^ I ^ I ^ I) - (I ^ I ^ I ^ Z))

If you evaluate the former qubit operator on a circuit with 4 qubit registers, it will get evaluated on the last qubit because Qiskit Terra treats operators as little endian. Thus, the following are actually equivalent in this setting:
0.5 * (I - Z)
# gets interpreted as
0.5 * ((I ^ I ^ I ^ I) - (Z ^ I ^ I ^ I))

The latter you would obtain from FermionicOp("N_3") because in Qiskit Nature we treat operators as big endian. The reason for this difference is the chemistry-user oriented approach taken by Qiskit Nature where big endian operators are the standard.
I hopes this answers your question. I suggest to avoid confusion that you always explicitly set register_length when using sparse labels.


bower: missing version added

I am sorry, but what is this good for? Bower can detect Git tags, right?

@vojtech-dobes This is actually for bowerphp bug, but I'll be switching to bower. So for me, this can be closed.


[Feat] UPF selection according to connected gNB

Issue Description
What's the version are you using
v3.0.5
Is your feature request related to a problem? Please describe.
SMF selects UPF by DNN and S-NSSAI, without considering the location of gNB.
IF UE connects to gNB in Area1, SMF should select UPF in Area1.

Describe the solution you'd like
Preparation

Locate AMF, SMF and UPF in each area.
Set same "locality" to amfcfg.yaml and smfcfg.yaml in each area.

Execution

SMF registers NF Profile with the locality
AMF selects SMF by Nnrf_NFDiscovery_Request including preferred-locality

Pull Request
Pull Request for the feature.

free5gc
amf
smf

Describe alternatives/workarounds you've considered
None
Additional context
None

Hi @mariakagi
I think it's very useful.
For example, is it possible to select UPF by adding the Cell_ID of gNB to the PFCP parameter instead of locality?
Best regards,
--Shigeru

Thank you @s5uishida.
At first, I considered the way to use "targetID" element in the CreateSMContext Request from AMF for SMF to know which gNB the UE connecting to.
For UPF selection in SMF using "targetID", change smfcfg.yaml:

Adding node_id which represents a gNB ID under up_node conf which is for an AN node.
The configurations for the node topology are the same as current.

  userplane_information:
    up_nodes:
      gNB1:
        type: AN
        node_id: 000102
...
links:
      - A: gNB1
        B: UPF1
...

In the above figure if gNB3 is added to Area1, node_id and links should be updated in the idea of using "targetID". But using "locality" no need to update configuration.
The idea of using "the Cell_ID of gNB" looks like  using "targetID", so I think using "locality" is better.

@mariakagi
Thanks for the PR!

Hi @mariakagi
I also thought that smfcfg.yaml needed to be modified to support Cell_ID.
At this time, I made a suggestion with reference to the following Open5GS smf.yaml.
https://github.com/open5gs/open5gs/blob/main/configs/open5gs/smf.yaml.in
#  <SMF Selection - 5G Core only>
...
#  o UPF selection by CellID(e_cell_id: 28bit, nr_cell_id: 36bit)
#    (either single enb_id or multiple enb_ids, HEX representation)
...

I think locality is also very useful.
Best regards,
--Shigeru


Adapt submission step 7 for unlisted addons (bug 1121242)

Fixes bug 1121242
This is how the new page looks like for unlisted addons (for listed addons, there's no change):

r+wc


Feat/index

allow using index with other unique indentifier, like
 {
      code: 'foo.map((baz, i) => <Foo key={i + baz.id} />)',
    },
    {
      code: 'foo.map((baz, i) => <Foo key={`${baz.id}${i}`} />)',
    },

also, I don't find the relevant code about MemberExpression  branch, is that a missing or intend to be

https://github.com/HomyeeKing/eslint-plugin-react/blob/151bb2b13892969bea17b334e882eb422152c30a/lib/rules/no-array-index-key.js#L133


Yann/bug/serial/sigio deinit on enable input false

Requirements

[ ] #1375

Get more information on why it is deinit


[feature] automated timer transaction

This one is a simple snative to implement i would think. Setting a timer for a transaction to be executed with a signature. Someone tell me what im missing in making this a reality?

To clarify this would be thought of as a scheduled contract execution based on time/date and should be accurate to within 2 seconds.

This does not sound to me like a a secure native function; rather with future work on the light-client, eris-worker, we can consider (time) triggered transaction (creation and broadcast). Snative functions are of no more help here than normal evm executions, in that they cannot pause or self-initiate.


[ISSUE] GitHub workflow test-integration-template handles the git-ref input incorrectly

Describe the issue:
GitHub workflow template test-integration-template accepts git-ref as an input parameter. But attempting to use it with a custom branch results in an error.
This seems to be caused by the fact that git-ref is confusingly used for two different purposes:

To check out the Helm charts repository: https://github.com/camunda/camunda-platform-helm/blob/51a2f641f86b8d4ca3f3ce56eb08f70f67d716d3/.github/workflows/test-integration-template.yaml#L101-L105
To create a deployment via the bobheadxi/deployments@v1  GHA: https://github.com/camunda/camunda-platform-helm/blob/51a2f641f86b8d4ca3f3ce56eb08f70f67d716d3/.github/workflows/test-integration-template.yaml#L151-L158

This is incorrect, as the first case uses git-ref as a ref in the Helm charts repository, while in the second case it is treated as a ref in the repository where the workflow is actually invoked.
See examples:

Failed workflow (branch exists in the Helm charts repo, but not in the repository where it's being used)
Successful workflow (branch exists in both repositories)

Actual behavior:
If the ref doesn't exist in the repository where the workflow is invoked, it fails with the following error:
Error: unexpected error encountered: HttpError: No ref found for: connectors-support-identity-config - see logs for more information
Expected behavior:
Different inputs should be used for different purposes, e.g. helm-git-ref for the Helm charts repo and git-ref for the host repo.
How to reproduce:

Create a GHA workflow in a custom repository that references test-integration-template
Pass a custom branch name as git-ref.

Example workflow: https://github.com/camunda/c8-cross-component-e2e-tests/blob/connectors-support-identity-config/.github/workflows/playwright_sm_manual.yml

@jessesimpson36 is that issue in progress?

This is done.


Check for all Dash bundle identifiers

@rizzatti Can you merge this when you get a chance? Dash 3 was released :)


Files inside public directory is not syncing

I added an html file yesterday, but it doesn't still appear today. My log ID is a9107cb5f3e030b9aa9ac31c.

This is a known bug on our end that happens sometimes after you reset your account.  I fixed it on our end, seems to be working now.  Please close this out if it seems fine to you.

It's working now. Thank you.


0.52.0 broke Astro integration

UnoCSS version
0.52.0
Describe the bug
Running astro dev in a project with UnoCSS v0.52.0 gives the error:
Failed to load url /uno.css?uno-with-astro-key (resolved id: /uno.css?uno-with-astro-key) in uno-astro. Does the file exist?
14:20:42 [vite] Error when evaluating SSR module uno-astro: failed to import "/uno.css?uno-with-astro-key"
|- Error: Failed to load url /uno.css?uno-with-astro-key (resolved id: /uno.css?uno-with-astro-key) in uno-astro. Does the file exist?
    at loadAndTransform (file://file:///home/projects/unocss-2646/node_modules/vite/dist/node/chunks/dep-4d3eff22.js:53428:21)

14:20:42 [vite] Error when evaluating SSR module astro:scripts/page-ssr.js: failed to import "uno-astro"
|- Error: Failed to load url /uno.css?uno-with-astro-key (resolved id: /uno.css?uno-with-astro-key) in uno-astro. Does the file exist?
    at loadAndTransform (file://file:///home/projects/unocss-2646/node_modules/vite/dist/node/chunks/dep-4d3eff22.js:53428:21)

14:20:42 [vite] Error when evaluating SSR module /home/projects/unocss-2646/src/pages/index.astro: failed to import "astro:scripts/page-ssr.js"
|- Error: Failed to load url /uno.css?uno-with-astro-key (resolved id: /uno.css?uno-with-astro-key) in uno-astro. Does the file exist?
    at loadAndTransform (file://file:///home/projects/unocss-2646/node_modules/vite/dist/node/chunks/dep-4d3eff22.js:53428:21)

 error   Could not import `/uno.css?uno-with-astro-key`.
  Hint:
    This is often caused by a typo in the import path. Please make sure the file exists.
  File:
    /home/projects/unocss-2646/file:/file:/home/projects/unocss-2646/node_modules/vite/dist/node/chunks/dep-4d3eff22.js:53428:21
  Stacktrace:
Error: Failed to load url /uno.css?uno-with-astro-key (resolved id: /uno.css?uno-with-astro-key) in uno-astro. Does the file exist?
    at loadAndTransform (file://file:///home/projects/unocss-2646/node_modules/vite/dist/node/chunks/dep-4d3eff22.js:53428:21)

 error   Could not import `/uno.css?uno-with-astro-key`.
  Hint:
    This is often caused by a typo in the import path. Please make sure the file exists.
  File:
    /home/projects/unocss-2646/file:/file:/home/projects/unocss-2646/node_modules/vite/dist/node/chunks/dep-4d3eff22.js:53428:21
  Stacktrace:
Error: Failed to load url /uno.css?uno-with-astro-key (resolved id: /uno.css?uno-with-astro-key) in uno-astro. Does the file exist?
    at loadAndTransform (file://file:///home/projects/unocss-2646/node_modules/vite/dist/node/chunks/dep-4d3eff22.js:53428:21)
 (x2)

v0.51.13 still works fine
Reproduction
https://stackblitz.com/edit/unocss-2646
System Info
Node 18.16.0
Chrome 113
Validations

[X] Read the Contributing Guidelines.
[X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
[X] Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
[X] The provided reproduction is a minimal reproducible example of the bug.

https://github.com/unocss/unocss/pull/2593, cc @Dunqing if you have any idea on this

Sorry guy, I have found the cause and fixed it.


fix #1201 remove processConditionalComments

removed this option for html-minifier, according to this issue it's not suited for our needs https://github.com/kangax/html-minifier/issues/838

We might need to do something with a standard regexp to remove extra space then I think ?