Issues with release 1.2.1

When I checked its version with -version, the output is 1.2.0 instead of 1.2.1;
Please compile to statically linked binaries, refering to build.sh.

Sorry for that, I forgot to change the version number in the code.
Everything should work well except the version number printing.
For the link problem, it's a default behavior of gc compiler, I have recompiled the binaries with CGO_ENABLED=0 and uploaded again.
If you care about this, please redownload the binary files from the release page.
Thank you for the report.


on ios, dosent want to load a single file

you might already get it

also does not want to download from link

we don't handle iOS issues

iOS is hell to develop for

o


[Sim] Streamline how to plot in simulation

Done in:

predictoor.md: https://github.com/oceanprotocol/pdr-backend/commit/bae0a4727d3776ec20e97b3801887bb49645da9e
trader.md: https://github.com/oceanprotocol/pdr-backend/commit/928f4d1af1e250129d75a6ef45757b9f208a8b81


Type narrowing regression with switch + for in TypeScript 4.9

Bug Report
It is possible to generate a "Variable 'X' is used before being assigned." error on TypeScript 4.9 where it previously did not in TypeScript 4.8.  This seems to be when we have combination of switch statements and for loop.
🔎 Search Terms
switch
for
type check
🕗 Version & Regression Information

This changed between versions 4.8.4 and 4.9.3
This continues to error with nightly.

⏯ Playground Link
TypeScript 4.8.4 Playground Example
TypeScript 4.9.3 Playground Example
Nightly Playground Example
💻 Code
function functionA(): "A" | "B" {
	return "A";
}

function functionB(key: string): string {
	return key;
}

export function functionC(): void {
	let unionVal = functionA();
	switch (unionVal) {
		case "A": {
			break;
		}
		default: {
			return;
		}
	}

	for (let line = 1; line <= 10; line++) {
		let key: string;
		switch (unionVal) {
			case "A": {
				key = "AA";
				break;
			}
		}
		functionB(key);
	}
}

🙁 Actual behavior
Variable 'key' is used before being assigned.
🙂 Expected behavior
No error

bisected to #51095

Simpler repro:
declare function functionB(key: string): string;

function functionC(): void {
	let unionVal: "A" | "B" = "A";
	while (true) {
		let key: string;
		switch (unionVal) {
			case "A": {
				key = "AA";
				break;
			}
		}
		functionB(key);
	}
}


when we use in Expo project after detaching  getting Error(React/RCTBridgeModule.h not found )

After detaching from Expo, I’m trying to add the React Native Share Extension but getting below error. If someone can help would be very grateful.Please
Find the screenshot for referencing.

+1

Also getting this error, but not related to an Expokit project.

@sudeepagarwal24 Did you find a solution?

Does anybody know how to fix this?

Copy and paste the files into your ShareExtension folder.. next to the MyShareEx.m file you created.. it works there.

I am getting the same error in react-native 0.59 and react-native-share-extension 2.0.0 on xcode 11.1. @vstlouis What is meant by copy and past files to the ShareExtension folder? What are the files that you are referring to here?


#1390 Added runtimeModuleName cli variable, defaults to the previous value of handlebars.runtime

See https://github.com/wycats/handlebars.js/issues/1390.
I haven't added tests yet for this change as I could not see any existing ones for handlebarPath or namespace. Please can you advise if you would like these adding, and where I should do this?
Is there a separate repository for documentation I should update for this new CLI variable?

We can reopen this PR once there is a test. I will close it for now in order to clean up the PR list.


ngic_dataplane dropping >90% of transmitted and received packets from il_trafficgen

Hello,
I am testing for high traffic using ngic_dataplane and il_trafficgen as explained in il_trafficgen.
I am having 2 servers, 40 core 256 GB RAM with two 10GE NICs each.
I can see that il_trafficgen is working well and generating the required traffic towards ngic_dataplane but ngic_dataplane is dropping lots of packets as evident from stats below.
Please help me that how can I avoid suck huge > 90% packet drop.
./build/ngic_dataplane -l 0,2,4,8,10,12,14 -n 4 --file-prefix dp -w 0000:81:00.0 -w 0000:81:00.1 --socket-mem 10240,10240 -- --s1u_ip <IP_ADDRESS> --s1u_mask <IP_ADDRESS> --s1u_mac a0:36:9f:85:88:c8 --sgi_ip <IP_ADDRESS> --sgi_mask <IP_ADDRESS> --sgi_mac a0:36:9f:85:88:ca --num_workers 1 --log 0 --numa 1 --gtpu_seqnb_in 0 --gtpu_seqnb_out 0 --spgw_cfg 03 --ul_iface S1Udev --dl_iface SGIdev --kni_portmask 03 --cdr_path ./cdr --master_cdr ./cdr/master.csv
ngic_dataplane stats are pasted below:
************ DP Configured successfully ************
UPLINK                            ||                 DOWNLINK
IfMisPKTS    IfPKTS     UL-RX     UL-TX    UL-DFF   || IfMisPKTS    IfPKTS     DL-RX     DL-TX    DL-DFF
0         0         0         0         0   ||         0         0         0         0         0
0         0         0         0         0   ||         0         0         0         0         0
0         0         0         0         0   ||         0         0         0         0         0
0         0         0         0         0   ||         0         0         0         0         0
0   8978164   8978657    280000   8698657   ||         0         0         0         0         0
0  28959585  28960069    890000  28070069   ||         0         0         0         0         0
0  48938459  48938944   1500000  47438944   ||         0         0         0         0         0
0  68918624  68919178   2110000  66809178   ||         0  17119314    520001    520000         1
0  88897347  88897891   2720000  86177891   ||         0  37104761   1130001   1130000         1
0 108874554 108875101   3330000 105545101   ||         0  57087979   1740003   1740000         3
0 128853664 128854213   3940000 124914213   ||         0  77073746   2350000   2350000         0
0 148832771 148833313   4550000 144283313   ||         0  97059008   2960000   2960000         0
0 168812332 168812879   5160000 163652879   ||         0 117045465   3570002   3570000         2
0 188791040 188791589   5770000 183021589   ||         0 137030540   4180003   4180000         3
0 208770612 208771159   6380000 202391159   ||         0 157016224   4790000   4790000         0
0 228751517 228752063   6990000 221762063   ||         0 177003593   5400002   5400000         2
0 248730336 248730956   7600000 241130956   ||         0 196988458   6010000   6010000         0
0 268709408 268709954   8210000 260499954   ||         0 216973803   6620004   6620000         4
0 288689862 288690432   8814347 279876085   ||         0 236961280   7230002   7230000         2
0 308669131 308669684   9420000 299249684   ||         0 256946672   7840000   7840000         0
##NGCORE_SHRINK(RTC)
UPLINK                            ||                 DOWNLINK
IfMisPKTS    IfPKTS     UL-RX     UL-TX    UL-DFF   || IfMisPKTS    IfPKTS     DL-RX     DL-TX    DL-DFF
0 328646720 328647268  10030000 318617268   ||         0 276929856   8450002   8450000         2
0 348625792 348626348  10640000 337986348   ||         0 296915520   9060002   9060000         2
0 368604672 368605207  11250000 357355207   ||         0 316900140   9670000   9670000         0
0 388581758 388582306  11860000 376722306   ||         0 336883531  10280000  10280000         0
0 399575712 399575712  12200000 387375712   ||         0 356868536  10890003  10890000         3
Stats at il_trafficgen
********** Uplink Table **************
S1U_PktTx (Total Pkts) >>   AS_PktRx (Total Pkts)
399575712                    12200000
********** Downlink Table **************
S1u_PktRx (Total Pkts) <<   AS_PktTx (Total Pkts)
12200000                   799450912
UL Loss = S1u_PktTx - AS_PktRx = 387375712(pkts); 96.95(%)
DL Loss = AS_PktTx - S1u_PktRx = 787250912(pkts); 98.47(%)

@Ravi-t,
il_trafficgen only works when you run ngic-rtc in SIMU_CP mode (i.e. all sessions need to simulated/created within ngic-rtc). If you want to run ngic_dataplane against il_trafficgen, then please make sure that you have SIMU_CP as well as STATIC_ARP enabled in dp/Makefile.
Also, please make sure that the MAC addresses in config/static_arp.cfg match with il_trafficgen's user_input.cfg fields. The fields in config/simu_cp.cfg should also match the fields set in user_input.cfg.

Dear Ajam,
Thanks a lot for your recommendations.
But I already made sure that SIMU_CP and STATIC_ARP are enabled in Makefile and MAC addresses are also matching in all cfg files before I started testing. I have attached all the cfg files (OMEC NGIC.zip) and Makefile for your reference.
I am not seeing any error being reported by ngic dataplane while running in debug mode. Only in stats I can see that UL-DFF is non-zero and around 97% of total packets sent are dropped. Only 3% packets are processed successfully by app. The IfMisPKTS  for both uplink and downlink is 0.
Please let me know how to proceed.
grep Huge /proc/meminfo
AnonHugePages:     57344 kB
HugePages_Total:      48
HugePages_Free:       18
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:    1048576 kB
The output of cpu layout is as below.
Core and Socket Information (as reported by '/sys/devices/system/cpu')
cores =  [0, 1, 2, 3, 4, 8, 9, 10, 11, 12]
sockets =  [0, 1]
    Socket 0        Socket 1
    --------        --------

Core 0  [0, 20]         [1, 21]
Core 1  [2, 22]         [3, 23]
Core 2  [4, 24]         [5, 25]
Core 3  [6, 26]         [7, 27]
Core 4  [8, 28]         [9, 29]
Core 8  [10, 30]        [11, 31]
Core 9  [12, 32]        [13, 33]
Core 10 [14, 34]        [15, 35]
Core 11 [16, 36]        [17, 37]
Core 12 [18, 38]        [19, 39]
./build/ngic_dataplane -l 7-11 -n 4 --socket-mem 16000,16000 --file-prefix dp -w 0000:81:00.0 -w 0000:81:00.1 -- --s1u_ip <IP_ADDRESS> --s1u_mask <IP_ADDRESS> --s1u_mac a0:36:9f:85:88:c8 --sgi_ip <IP_ADDRESS> --sgi_mask <IP_ADDRESS> --sgi_mac a0:36:9f:85:88:ca --num_workers 1 --log 0 --numa 1 --gtpu_seqnb_in 0 --gtpu_seqnb_out 0 --spgw_cfg 03 --ul_iface S1Udev --dl_iface SGIdev --kni_portmask 03 --cdr_path ./cdr --master_cdr ./cdr/master.csv
OMEC NGIC.zip

Apologies for the delayed response. Can you please try re-running with less number of flows to begin with? Maybe with 100 subscribers (flows=100 argument in user_input.cfg file as well as the MAX_UE_SESS=100 argument in simu_cp.cfg file).
When one runs dp in SIMU_CP mode, it normally takes time to build sessions, and dp prints an acknowledgement that all simulated sessions have been created. I don't see that output in your log (you should probably wait for a few seconds on dp before you run il_trafficgen.

Thanks Ajam.
I would run again as recommended by you and let you know if I still face issues.

Thanks Ajam...It started working.

Hi @Ravi-t , I am also trying to run il_trafficgen against nigc-rtc data plane. Do I need to start ngic-rtc control plane(i.e. execute run.sh under ngic-rtc/cp)?
Thanks!

Hi @Ravi-t , I am also trying to run il_trafficgen against nigc-rtc data plane. Do I need to start ngic-rtc control plane(i.e. execute run.sh under ngic-rtc/cp)?
Thanks!

Hi @qzhang90
Control-plane is not needed to be started if you are using SIMU_CP mode, you can enable that through Makefile.
Regards

Hi @qzhang90
Control-plane is not needed to be started if you are using SIMU_CP mode, you can enable that through Makefile.
Regards

Thanks @Ravi-t . I followed the steps below, but was not successful. Can you please advise?

Enabled both CFLAGS += -DSIMU_CP and CFLAGS += -DSTATIC_ARPin ngic-rtc/dp/Makefile, and then built the dataplane by make
Started the dataplane by ./run.sh under ngic-rtc/dp. The output of the dataplane is attached as dataplane-output.txt
Went to 'il_trafficgen/pktgen' and ran ./il_nperf.sh -g. (The output is attached as output1.png)
Went to 'il_trafficgen/pktgen' and ran ./il_nperf.sh -r. (The output is attached as output2.png)
From the prompt of step 3, ran start 0

After this, as shown in output3.png, I can only see the data being transmitted, but nothing else on either the receiver side or the dataplane side.
Attachments.zip

Thanks @Ravi-t . I followed the steps below, but was not successful. Can you please advise?

Enabled both CFLAGS += -DSIMU_CP and CFLAGS += -DSTATIC_ARPin ngic-rtc/dp/Makefile, and then built the dataplane by make
Started the dataplane by ./run.sh under ngic-rtc/dp. The output of the dataplane is attached as dataplane-output.txt
Went to 'il_trafficgen/pktgen' and ran ./il_nperf.sh -g. (The output is attached as output1.png)
Went to 'il_trafficgen/pktgen' and ran ./il_nperf.sh -r. (The output is attached as output2.png)
From the prompt of step 3, ran start 0

After this, as shown in output3.png, I can only see the data being transmitted, but nothing else on either the receiver side or the dataplane side.
Attachments.zip

@Ravi-t @ajamshed do we need to configure sdf_rules.cfg, pcc_rules.cfg, and adc_rules.cfg to run dataplane with a simulated controlplane? Thanks!

@Ravi-t @ajamshed do we need to configure sdf_rules.cfg, pcc_rules.cfg, and adc_rules.cfg to run dataplane with a simulated controlplane? Thanks!

@qzhang90
No there is no need to configure such rules unless your test case needs them.
Before pumping data from il_nperf, please make sure that you sessions are established by simulated CP.
Only pump data after you see below logs
Please wait for DP configured message ....!!!

**************************
STATS ::
**************************
MAX_NUM_CS    : 100
MAX_NUM_MB    : 100
NUM_CS_SEND   : 100
NUM_MB_SEND   : 100
NUM_CS_FAILED : 0
NUM_MB_FAILED : 0
**************************

************ DP Configured successfully ************

@qzhang90
No there is no need to configure such rules unless your test case needs them.
Before pumping data from il_nperf, please make sure that you sessions are established by simulated CP.
Only pump data after you see below logs
Please wait for DP configured message ....!!!

**************************
STATS ::
**************************
MAX_NUM_CS    : 100
MAX_NUM_MB    : 100
NUM_CS_SEND   : 100
NUM_MB_SEND   : 100
NUM_CS_FAILED : 0
NUM_MB_FAILED : 0
**************************

************ DP Configured successfully ************

Thanks @Ravi-t ! Regarding to the other configurations, were you able to successfully run the dataplane with il_trafficgen by using the ones in OMEC NGIC.zip you attached?

Thanks @Ravi-t ! Regarding to the other configurations, were you able to successfully run the dataplane with il_trafficgen by using the ones in OMEC NGIC.zip you attached?


[rmodels] Loading GLB/GLTF fails to parse or render when running on a Big Endian system

Please, before submitting a new issue verify and check:

[ x] I tested it on latest raylib version from master branch
[ x] I checked there is no similar issue already reported
[ x] I checked the documentation on the wiki
[ x] My code has no errors or misuse of raylib

Issue description
glb files fails to load as cgltf.h uses endian-specific code.
gltf files are successfully parsed, but mesh vertices, normals, and indices are incorrectly loaded by  rmodels.c
Environment
I've been working on a homebrew PS3 port using the PSL1GHT SDK, using RSXGL which implements Opengl 3.1 core.
Code Example
Here cgltf.h copys bytes from glb data, which is stored as little-endian, but since the system is big-endian it stores GlbMagic as big-endian while interpreting glb bytes as a big-endian number, causing a mismatch.
//cgltf.h
static const uint32_t GlbMagic = 0x46546C67;
...
cgltf_result cgltf_parse(const cgltf_options* options, const void* data, cgltf_size size, cgltf_data** out_data)
{
...
        uint32_t tmp;
        // Magic
        memcpy(&tmp, data, 4);
        if (tmp != GlbMagic) {...}
...
}

After fixing cgltf.h with a bunch of __builtin_bswap32(), I could now load glb which behaved the same as gltf files, that is to say still broken. I found that in order for the model to be rendered correctly, I had to swap the bytes of Mesh positions, normals, and indices. I believe the errors comes from the LOAD_ATTRIBUTE_CAST macro function in LoadGLTF.
static Model LoadGLTF(const char *fileName)
{
...
//rmodels.c line 5234
    #define LOAD_ATTRIBUTE_CAST(accesor, numComp, srcType, dstPtr, dstType) \
    { \
        int n = 0; \
        srcType *buffer = (srcType *)accesor->buffer_view->buffer->data + accesor->buffer_view->offset/sizeof(srcType) + accesor->offset/sizeof(srcType); \
        for (unsigned int k = 0; k < accesor->count; k++) \
        {\
            for (int l = 0; l < numComp; l++) \
            {\
                dstPtr[numComp*k + l] = (dstType)buffer[n + l];\
            }\
            n += (int)(accesor->stride/sizeof(srcType));\
        }\
    }
...
}

I've managed to get glb/gltf files to render correctly by passing  __builtin_bswap32(), perhaps using le32toh() would be better, though my toolchain lack said function.

@nbe1233 raylib was not designed considering Big Endian systems so it could fail in multiple points in that regards... Still, lately some changes by @Peter0x44 where merged to add some BE support.
The reported issue also involves an external library, it should probably reported to https://github.com/jkuhlmann/cgltf
What additional changes are needed to support BE on raylib for gltf loading?

I didn't make any changes for that, but parts of the gltf loading code look rather suspicious, and probably assume LE byte order. Everything in a glb is LE.

there was a previous discussion about a ps3 port in discord here
I'm not sure if that is simply a BE quirk or the ps3 itself has something to do with it.
Testing powerpc linux with qemu might also help, but I am yet to set that up.

Currently, we looked into Wii/GameCube on the raylib Discord together, which is BE too. Does the PS3 give you the same results, similar to that, when you load a GLFT/GLB file?

Video: https://github.com/user-attachments/assets/7308d660-5246-499c-b7c4-f8bd0aab5a70

Yeah I had the same issue. I solved it by replacing LOAD_ATTRIBUTE_CAST() in rmodels.c with this

    #define LOAD_ATTRIBUTE_CAST(accesor, numComp, srcType, dstPtr, dstType) \
    { \
        int n = 0; \
        srcType *buffer = (srcType *)accesor->buffer_view->buffer->data + accesor->buffer_view->offset/sizeof(srcType) + accesor->offset/sizeof(srcType); \
        char *dst_type_str = #dstType; \
        bool is_dst_float = false;\
        bool is_dst_ushort = false;\
        if (strcmp(dst_type_str, "float") == 0 ) {is_dst_float = true;} \
        if (strcmp(dst_type_str, "unsigned short") == 0 ) {is_dst_ushort = true;} \
        for (unsigned int k = 0; k < accesor->count; k++) \
        {\
            for (int l = 0; l < numComp; l++) \
            {\
                dstPtr[numComp*k + l] = (dstType)buffer[n + l];\
                if (is_dst_float)\
                {\
                    union { uint32_t u; float f ;} x ;\
                    x.f = dstPtr[numComp*k + l];\
                    x.u = __builtin_bswap32(x.u);\
                    dstPtr[numComp*k + l] = x.f;\
                }\
                if (is_dst_ushort)\
                {\
                    dstPtr[numComp*k + l] = __builtin_bswap16(dstPtr[numComp*k + l]);\
                }\
            }\
            n += (int)(accesor->stride/sizeof(srcType));\
        }\
    }

These are the commits I used to get gltf rendering working
4efa33c
e254c1e


BUG: Expectation computation with vector mean fails

Describe your issue.
Many methods of scipy.stats.norm allow you to pass vectors for scale and loc. For example,
norm(loc=[1, 2, 3]).pdf(0.5)
# >>> array([0.35206533, 0.1295176 , 0.0175283 ])

I'd like to do the same for computing expectation, ie.
norm(loc=[1, 2, 3]).expect()
# Expected output: array([1, 2, 3])

The code instead errors (see below).
Reproducing Code Example
from scipy.stats import norm
import numpy as np

norm(loc=[1, 2, 3]).expect()
# TypeError: can only concatenate list (not "float") to list

norm(loc=np.array([1, 2, 3])).expect()
# ValueError: operands could not be broadcast together with shapes (3,) (2,)

Error message
For the first example:

File ~/tt_newsvendor/.venv/lib/python3.11/site-packages/scipy/stats/_distn_infrastructure.py:2896, in rv_continuous.expect(self, func, args, loc, scale, lb, ub, conditional, **kwds)
   2894         return func(x) * self.pdf(x, *args, **lockwds)
   2895 if lb is None:
-> 2896     lb = loc + _a * scale
   2897 if ub is None:
   2898     ub = loc + _b * scale

TypeError: can only concatenate list (not "float") to list

For the second example:
File ~/tt_newsvendor/.venv/lib/python3.11/site-packages/scipy/stats/_distn_infrastructure.py:534, in rv_frozen.expect(self, func, lb, ub, conditional, **kwds)
    532     return self.dist.expect(func, a, loc, lb, ub, conditional, **kwds)
    533 else:
--> 534     return self.dist.expect(func, a, loc, scale, lb, ub,
    535                             conditional, **kwds)

File ~/tt_newsvendor/.venv/lib/python3.11/site-packages/scipy/stats/_distn_infrastructure.py:2908, in rv_continuous.expect(self, func, args, loc, scale, lb, ub, conditional, **kwds)
   2906 alpha = 0.05  # split body from tails at probability mass `alpha`
   2907 inner_bounds = np.array([alpha, 1-alpha])
-> 2908 cdf_inner_bounds = cdf_bounds[0] + invfac * inner_bounds
   2909 c, d = loc + self._ppf(cdf_inner_bounds, *args) * scale
   2911 # Do not silence warnings from integration.

ValueError: operands could not be broadcast together with shapes (3,) (2,)

SciPy/NumPy/Python version and system information
1.11.3 1.26.0 sys.version_info(major=3, minor=11, micro=2, releaselevel='final', serial=0)
Build Dependencies:
  blas:
    detection method: pkgconfig
    found: true
    include directory: /opt/arm64-builds/include
    lib directory: /opt/arm64-builds/lib
    name: openblas
    openblas configuration: USE_64BITINT= DYNAMIC_ARCH=1 DYNAMIC_OLDER= NO_CBLAS=
      NO_LAPACK= NO_LAPACKE= NO_AFFINITY=1 USE_OPENMP= SANDYBRIDGE MAX_THREADS=3
    pc file directory: /opt/arm64-builds/lib/pkgconfig
    version: 0.3.21.dev
  lapack:
    detection method: pkgconfig
    found: true
    include directory: /opt/arm64-builds/include
    lib directory: /opt/arm64-builds/lib
    name: openblas
    openblas configuration: USE_64BITINT= DYNAMIC_ARCH=1 DYNAMIC_OLDER= NO_CBLAS=
      NO_LAPACK= NO_LAPACKE= NO_AFFINITY=1 USE_OPENMP= SANDYBRIDGE MAX_THREADS=3
    pc file directory: /opt/arm64-builds/lib/pkgconfig
    version: 0.3.21.dev
  pybind11:
    detection method: config-tool
    include directory: unknown
    name: pybind11
    version: 2.11.0
Compilers:
  c:
    commands: cc
    linker: ld64
    name: clang
    version: 14.0.0
  c++:
    commands: c++
    linker: ld64
    name: clang
    version: 14.0.0
  cython:
    commands: cython
    linker: cython
    name: cython
    version: 0.29.36
  fortran:
    commands: gfortran
    linker: ld64
    name: gcc
    version: 12.1.0
  pythran:
    include directory: ../../pip-build-env-iq776ekw/overlay/lib/python3.11/site-packages/pythran
    version: 0.14.0
Machine Information:
  build:
    cpu: aarch64
    endian: little
    family: aarch64
    system: darwin
  cross-compiled: false
  host:
    cpu: aarch64
    endian: little
    family: aarch64
    system: darwin
Python Information:
  path: /private/var/folders/76/zy5ktkns50v6gt5g8r0sf6sc0000gn/T/cibw-run-dp6he_rc/cp311-macosx_arm64/build/venv/bin/python
  version: '3.11'

@mart-mihkel thought I'd mention that gh-15928 is now being used as an RFC for the new infrastructure. I was not planning to implement expect there because it's a convenience function that doesn't offer much convenience (it does in one line something that would otherwise take one line). However, I have seen it obscure what's really going on from the user (numerical integration) and direct bug reports toward stats when there's not much to be done to improve such a generic function than to improve the underlying integrator, which is in integrate. (That's not entirely fair... I added this logic to help with gh-8928.)
In any case, you're welcome to commment there about it, and I'll go ahead and close this. Thanks!


Express + Pry is Laggy

Original Comment
Using express with pry causes it to be unresponsive and difficult to use.
import pry from 'pryjs'

// Ping
router.get('/ping', (req, res) => {
  eval(pry.it)
  res.json({ status:'UP' });
});

Hey @blainesch any movement on this issue?

No movement, feel free to take a stab at it. I don't have any leads as of yet.

@blainesch all good, after some digging here is what I have found. There are actually two issues I am seeing:

Laggy in express - I tested this on a small express project and there lag is not present. This leads me to believe it has to do with the large size of my project. Maybe there is somewhere that all files/lines are being looped over causing a latency after each keydown

The incorrect line number is being used so the whereami is incorrect. - The command.coffee file that finds the file and line number using the error stack @stack = new Error().stack and this is return a line number much higher than the actual. This is because I am using babel-watch. But the weird thing is the find_file returns the line number is from the compiled ES6 and file location/ file content from the uncompiled ES6 code.

The laggy behaviour seems to be improved when the line number is correct (tested by hard coding the line number). Any ideas on where to continue from here?

Interesting find. I wonder why it's not being triggered sometimes.


Rewind tutorial

Implement a feature so that users can swipe left to see a previous step ?

Totally doable, but I really don't have the time now.
If you feel like you can accomplish it I'm happy to review a PR :smile:


Detected blocking call to open inside the event loop

Checklist

[X] I have updated the integration to the latest version available
[X] I have checked if the problem is already reported

The problem
After a home assistant restart I receive the following warning:
Logger: homeassistant.util.loop
Source: util/loop.py:84
First occurred: 15:17:43 (652 occurrences)
Last logged: 15:18:18
Detected blocking call to open inside the event loop by custom integration 'valetudo_vacuum_camera' at custom_components/valetudo_vacuum_camera/utils/users_data.py, line 107: with open(file_path) as file: (offender: /config/custom_components/valetudo_vacuum_camera/utils/users_data.py, line 107: with open(file_path) as file:), please create a bug report at https://github.com/sca075/valetudo_vacuum_camera/issues Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/usr/src/homeassistant/homeassistant/main.py", line 223, in  sys.exit(main()) File "/usr/src/homeassistant/homeassistant/main.py", line 209, in main exit_code = runner.run(runtime_conf) File "/usr/src/homeassistant/homeassistant/runner.py", line 190, in run return loop.run_until_complete(setup_and_run_hass(runtime_config)) File "/usr/local/lib/python3.12/asyncio/base_events.py", line 672, in run_until_complete self.run_forever() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 639, in run_forever self._run_once() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1988, in _run_once handle._run() File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run self._context.run(self._callback, *self._args) File "/usr/src/homeassistant/homeassistant/config_entries.py", line 2055, in async_forward_entry_setup return await self._async_forward_entry_setup(entry, domain, True) File "/usr/src/homeassistant/homeassistant/config_entries.py", line 2081, in _async_forward_entry_setup await entry.async_setup(self.hass, integration=integration) File "/usr/src/homeassistant/homeassistant/config_entries.py", line 594, in async_setup result = await component.async_setup_entry(hass, self) File "/usr/src/homeassistant/homeassistant/components/camera/init.py", line 461, in async_setup_entry return await component.async_setup_entry(entry) File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 196, in async_setup_entry return await self._platforms[key].async_setup_entry(config_entry) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 333, in async_setup_entry return await self._async_setup_platform(async_create_setup_awaitable) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 363, in async_setup_platform awaitable = create_eager_task(awaitable, loop=hass.loop) File "/usr/src/homeassistant/homeassistant/util/async.py", line 37, in create_eager_task return Task(coro, loop=loop, name=name, eager_start=True) File "/config/custom_components/valetudo_vacuum_camera/camera.py", line 89, in async_setup_entry async_add_entities(camera, update_before_add=True) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 515, in async_schedule_add_entities_for_entry task = self.config_entry.async_create_task( File "/usr/src/homeassistant/homeassistant/config_entries.py", line 1134, in async_create_task task = hass.async_create_task_internal( File "/usr/src/homeassistant/homeassistant/core.py", line 828, in async_create_task_internal task = create_eager_task(target, name=name, loop=self.loop) File "/usr/src/homeassistant/homeassistant/util/async.py", line 37, in create_eager_task return Task(coro, loop=loop, name=name, eager_start=True) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 649, in async_add_entities await add_func(coros, entities, timeout) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 555, in async_add_and_update_entities tasks = [create_eager_task(coro, loop=self.hass.loop) for coro in coros] File "/usr/src/homeassistant/homeassistant/util/async.py", line 37, in create_eager_task return Task(coro, loop=loop, name=name, eager_start=True) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 729, in _async_add_entity await entity.async_device_update(warning=False) File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1289, in async_device_update await self.async_update() File "/config/custom_components/valetudo_vacuum_camera/camera.py", line 345, in async_update self._shared.user_language = await async_get_active_user_language(self.hass) File "/config/custom_components/valetudo_vacuum_camera/utils/users_data.py", line 149, in async_get_active_user_language active_user_id = await async_find_last_logged_in_user(hass) File "/config/custom_components/valetudo_vacuum_camera/utils/users_data.py", line 107, in async_find_last_logged_in_user with open(file_path) as file:
What version of an integration has described problem?
2024.06.2
What was the last working version of an integration?
No response
What vacuum model do you have problems with?
Roborock S50
Please firmware installed on your Vacuum.
2024.02.0
What type of platform you use?
Intel NUC (or generic x86_64)
What version of Home Assistant do you use?
core-2024.6.0
What type of installation are you running?
Home Assistant OS
Camera's settings.
No response
Logs or Errors shown in the HA snapshots (please enable the Debug Mode)
No response
Additional information
No response

I do not really understand why but again will be checking it.

@tomlut I think I figured where is the problem I need to go to work as soon I'm back will update you.

There's no rush. It is only a warning and the camera is still working. Thank you for the prompt response though.

The issue was closed automatically because of the pull request and release 2024.6.3b1, @tomlut  if you could test it and confirm that it work would really nice from use (HACS with the beta release enabled to download it).

Confirmed. b3 has fixed the issue.

Actually no it has not fixed it:
Logger: homeassistant.util.loop
Source: util/loop.py:84
First occurred: 07:41:19 (12 occurrences)
Last logged: 08:45:12

Detected blocking call to open inside the event loop by custom integration 'valetudo_vacuum_camera' at custom_components/valetudo_vacuum_camera/utils/users_data.py, line 155: with open(file_path) as file: (offender: /config/custom_components/valetudo_vacuum_camera/utils/users_data.py, line 155: with open(file_path) as file:), please create a bug report at https://github.com/sca075/valetudo_vacuum_camera/issues Traceback (most recent call last): File "<frozen runpy>", line 198, in _run_module_as_main File "<frozen runpy>", line 88, in _run_code File "/usr/src/homeassistant/homeassistant/__main__.py", line 223, in <module> sys.exit(main()) File "/usr/src/homeassistant/homeassistant/__main__.py", line 209, in main exit_code = runner.run(runtime_conf) File "/usr/src/homeassistant/homeassistant/runner.py", line 190, in run return loop.run_until_complete(setup_and_run_hass(runtime_config)) File "/usr/local/lib/python3.12/asyncio/base_events.py", line 672, in run_until_complete self.run_forever() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 639, in run_forever self._run_once() File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1988, in _run_once handle._run() File "/usr/local/lib/python3.12/asyncio/events.py", line 88, in _run self._context.run(self._callback, *self._args) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 680, in _async_handle_interval_callback self.config_entry.async_create_background_task( File "/usr/src/homeassistant/homeassistant/config_entries.py", line 1164, in async_create_background_task task = hass.async_create_background_task(target, name, eager_start) File "/usr/src/homeassistant/homeassistant/core.py", line 860, in async_create_background_task task = create_eager_task(target, name=name, loop=self.loop) File "/usr/src/homeassistant/homeassistant/util/async_.py", line 37, in create_eager_task return Task(coro, loop=loop, name=name, eager_start=True) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 1050, in _async_update_entity_states await entity.async_update_ha_state(True) File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 941, in async_update_ha_state await self.async_device_update() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1289, in async_device_update await self.async_update() File "/config/custom_components/valetudo_vacuum_camera/camera.py", line 345, in async_update self._shared.user_language = await async_get_active_user_language(self.hass) File "/config/custom_components/valetudo_vacuum_camera/utils/users_data.py", line 155, in async_get_active_user_language with open(file_path) as file:

Wow I think this is because we accessed the front end file with the user settings.. all of this is just for localization.. the user language is used in the status text translation... interesting I don't get such warnings with the OS for pi4. I'm sure (could not test it yet).. VM os isn't that sensible too.. very sensible HA.. for Intel there's for sure a difference.
Thank you @tomlut I will then try another approach, I think we need to create "our Keys" and store those data in a data class so that we access memory instead of disk this is why HassKey).. will be working on it..

@tomlut I was able to do some research and I think the problem is the name of the variable (HA is checking the files variables names).
As temporary (the change to data classes will be implemented gradually in the next versions) would release a new beta version tomorrow. As you are actually running the most "sensible" version of the OS could I count on you to test it and let's work together to fix those warnings 😉

Sure thing. If you need help with event loop blocking issues Nick Koston ( @bdraco ) is usually able to offer some advice.

Any place you are opening and reading files needs to be run in the executor to avoid blocking the event loop.
Nothing else in Home Assistant can run while the file is being opened and read because it blocks the main thread when you do I/O in the event loop.
Ex
https://github.com/sca075/valetudo_vacuum_camera/blob/ab59edb5a24057d8ee1e622c5813c20ebd8fb8d1/custom_components/valetudo_vacuum_camera/utils/users_data.py#L262
There are more places.  The above is only the first one I found.
To fix this, make a new function that opens and reads the file and returns the result, than use
data = await loop.run_in_executor(None, your_new_blocking_function)

( @bdraco ) thanks a lot for the help, to follow the spec I will change this as follow:
Create a function that load a file x in the main loop.
In the second step Gathered the data will be written in data classes.
Basically I couldn't found any core exposed function that return the instance logged in user fronted language and also in discord at that time, the answer was nope.
@tomlut  thanks really much for this, really appreciated. Then we have a little more work to do on this ;)

If you are in the Home Assistant code you can use hass.async_add_executor_job instead of loop.run_in_executor
example: https://github.com/home-assistant/core/blob/e4be3d8435c37177ca206232e1c765b97977d2bb/homeassistant/components/logbook/rest_api.py#L120

More on executor usage in the asyncio dev docs:
https://docs.python.org/3/library/asyncio-dev.html#running-blocking-code

@bdraco conversion is in progress (working on it) as per the camera actually use also different threads I opted for the
loop.run_in_executor solution. I'm currently using this code for loading the files:
async def async_load_file(file_to_load: str) -> Any:
    """Asynchronously load JSON data from a file."""
    loop = asyncio.get_event_loop()
    try:
        with await loop.run_in_executor(None, open, file_to_load, 'r') as data_file:
            data = data_file.read()
            return data
    except Exception as e:
        _LOGGER.warning(f"Exception {e}")
        return None

The warning of course is actually for debug purpose will use a better warning description in the final version.
Still need to work on the data classes (but I think the best is to release a new version so that custom component can comply with the requirements and do not block the main thread) as soon I will use a safe way to save the data as temporally
Thank you really much for your time and help here.

The read call above is still happening in the event loop in your code above.  Read is a blocking call.   Home Assistant can only detect the open call though so when you get a warning on open you need to make sure all the IO that happens after the open call is also run in the executor.

so it should be something like..
def read_file():
        with open(file_path, 'r') as file:
            return file.read()

    try:
        data = await loop.run_in_executor(None, read_file)
        return data
    except Exception as e:

so it should be something like..
def read_file():
        with open(file_path, 'r') as file:
            return file.read()

    try:
        data = await loop.run_in_executor(None, read_file)
        return data
    except Exception as e:

Yes that would work.
You don't need data =  and could return await loop.run_in_executor(None, read_file)

@bdraco thank you really much appreciated 🥇 thanks also for the great work you are doing for HA

@tomlut thank you really much for the help, just published a new beta 2024.06.3b3, would you be so kind to test it?
In the final version I count to update also snapshot.py, so the final 2024.06.3 will have this first part remodelling implemented. The second part should arrive with 2024.06.4. @bdraco thanks once again.

Might be having trouble decoding battery messages:
Logger: homeassistant.components.mqtt.sensor
Source: components/mqtt/sensor.py:241
integration: MQTT (documentation, issues)
First occurred: 10:28:35 (8 occurrences)
Last logged: 11:56:02

Invalid undecoded state message 'b'99'' received from 'valetudo/roborock_upstairs/BatteryStateAttribute/level'
Invalid undecoded state message 'b'98'' received from 'valetudo/roborock_upstairs/BatteryStateAttribute/level'
Invalid undecoded state message 'b'100'' received from 'valetudo/roborock_upstairs/BatteryStateAttribute/level'

Thanks a lot for your time and test, we keep this open for the time be. Although I need to tanks especially you this conversation helped me not only technically nut motivationally.

Thank you for maintaining the Valetudo Vacuum Camera repository and actively addressing issues. It's wonderful to see how the open-source community thrives through efforts like yours. This spirit of collaboration is what makes Home Assistant such a strong and remarkable platform. Your dedication is truly appreciated!

Not sure if this is Valetudo or the camera generating these warnings:
Logger: homeassistant.components.mqtt.sensor
Source: components/mqtt/sensor.py:241
integration: MQTT (documentation, issues)
First occurred: 11:01:08 (59 occurrences)
Last logged: 12:07:10

Invalid undecoded state message 'b'96'' received from 'valetudo/roborock_downstairs/BatteryStateAttribute/level'
Invalid undecoded state message 'b'89'' received from 'valetudo/roborock_upstairs/BatteryStateAttribute/level'
Invalid undecoded state message 'b'95'' received from 'valetudo/roborock_downstairs/BatteryStateAttribute/level'
Invalid undecoded state message 'b'94'' received from 'valetudo/roborock_downstairs/BatteryStateAttribute/level'
Invalid undecoded state message 'b'93'' received from 'valetudo/roborock_downstairs/BatteryStateAttribute/level'

They appear to be happening while the battery is charging after a clean.

@tomlut it has something to do with Valetudo I guess, I did face the same error and reported in here #118629. Jan Bouwhuis (@jbouwh) is waiting for some MQTT Explorer log to better understand this phenomena. When we have the data probably we need to open an issue on Valetudo because sometime this value apparently is None and MQTT can't decode it.
Anyhow my vacuum didn't generated it probably because battery never went below 95, in this days, it was more evident during the beta of HA.
roborock_downstairs is an S5 (my one is and I do not know if it is a model related issue)? if not the firmware 2024.02.0 of the vacuum probably is having issues. We do not publish this value of course we just received it as MQTT did.
Will try to reproduce the same and keep MQTT Explorer connected to the instance where the vacuum is.

Setted the milestone 2024.08.0 to conclude the HASSKey transaction of multiple "un-required" I/O operation. Implementing a data class / model as done recently in the core environment is the goal just fixed.

Another async issue just popped up in 2024.7.1:
Detected code that calls async_forward_entry_setup for integration mqtt_vacuum_camera with title: robovac-upstairs Camera and entry_id: 09dafb383f5d229eac0dfb8613f6392f, during setup without awaiting async_forward_entry_setup, which can cause the setup lock to be released before the setup is done. This will stop working in Home Assistant 2025.1. Please report this issue.

@tomlut but the camera works right?

Sorry, yes. Everything is functioning well still. This is just an extra check for async misuse that was included in 2024.7 so that is why it is showing up now.

Well it's more than other a deprecation notice, of course it's really appreciated that you reported this. Will add it to the list of things to correct, we will see if we can close this one in the Next versions 😉. Thank you @tomlut

@tomlut I think I can fix the warning issue with the 2024.07.1 instead of async_forward_entry_setup will use async_forward_entry_setups this should solve the depreciation notice.

@tomlut 2024.07.1 just released, this should solve also the issue with the startup warning you kindly reported ;)

Indeed this issue is fixed. Unfortunately I have another to open.


Potentially increase protection level of public API elements

I'm documenting the public API. As I do this, Im using this issue to document situations where I think there is potential for increasing protection level of API elements.
The first I found is ContextTask.Reset()
https://github.com/neurogears/onix-refactor/blob/fb191f08a8377a189614541c6f648c2f2669457b/OpenEphys.Onix/OpenEphys.Onix/ContextTask.cs#L77
which only referenced by a function in the same class. It could be that we want external elements to force a reset in the future, e.g. in a GUI, but right now prototype GUIs have not performed hardware interaction.

Another potential target:
https://github.com/neurogears/onix-refactor/blob/fb191f08a8377a189614541c6f648c2f2669457b/OpenEphys.Onix/OpenEphys.Onix/ContextTask.cs#L102
GroupedFrames is used internally by StartAcqusition. I don't see a reason it should be public.

Another potential target:
https://github.com/neurogears/onix-refactor/blob/fb191f08a8377a189614541c6f648c2f2669457b/OpenEphys.Onix/OpenEphys.Onix/ContextTask.cs#L328
This is only used by ConfigureFMCLinkController which is, itself, internal. Further, its frankly a total hack and extremely specific to this version of ONIX.

Another potential target:
https://github.com/neurogears/onix-refactor/blob/fb191f08a8377a189614541c6f648c2f2669457b/OpenEphys.Onix/OpenEphys.Onix/ContextTask.cs#L315
Not used. This one is not going anywhere though (as far as liboni is concerned) so its fine to leave public if we want.

Another potential target:
https://github.com/neurogears/onix-refactor/blob/fb191f08a8377a189614541c6f648c2f2669457b/OpenEphys.Onix/OpenEphys.Onix/ContextTask.cs#L317C4-L317C8
This was specified in the original liboni API and has never been used. I would at least mark as internal.

Basically, a lot of ContextTasks public API should be removed. The summary of what i propose is here:

public Reset() -> private Reset()
public GroupedFrames -> private GroupedFrames
public HubState -> internal HubState
public HardwareAddress -> Remove
public ReadFrame() -> private ReadFrame()
public Write() -> internal Write()
public GetHub() -> internal GetHub() because information exposed via DeviceContext.Hub  in a more useful way since it knows its own address
public GetPassthroughDeviceAddress -> internal GetPassthroughDeviceAddress


Update action versions, adjust Node versions in the CI

Here is a set of changes to:

Update the actions versions to later ones, due to Node 14 being deprecated and the old actions still using that one.
Always run the linting step on the latest LTS version of Node, denoted by lts/*.
Run the tests on the latest LTS version of Node, three previous LTS versions (lts/-n), and the latest one.
Use the --frozen-lockfile flag when installing, to make sure the lockfile has been synced with the package dependencies when the CI runs, otherwise throws an error.

Any feedback is welcome. :slightly_smiling_face:

Ah, I guess this one needs to be merged before #20.
I do see some test failures atm.

I will combine this with #20 because the old dependencies seem to cause the CI to fail in Node 20.


[1.x] Merge branch 1.3 into 1.x

Description
Updates the 1.x branch to include all changes that have gone directly into 1.3 bypassing this branch.  Needed to keep CI build clean in downstream 1.x branches that are following this practice.
Related Issues

Blocking https://github.com/opensearch-project/security/pull/4207

Check List

[ ] ~New functionality includes testing.~

[ ] ~All tests pass~

[ ] ~New functionality has been documented.~

[ ] ~New functionality has javadoc added~

[X] Failing checks are inspected and point to the corresponding known issue(s) (See: Troubleshooting Failing Builds)
[X] Commits are signed per the DCO using --signoff
[X] Commit changes are listed out in CHANGELOG.md file (See: Changelog)
[ ] ~Public documentation issue/PR created~

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Thanks a lot @peternied !


results on partial fine tuning for PTB?

Thank you for sharing your great work!
The paper only reports the partial fine-tuning results on AD task. Does the author have results on PTB task as well?
I really appreciate any help you can provide. Thank you once again.

Hi, according to some preliminary tests, we observed that partial fine-tuning on the PTB dataset did not outperform the baselines. Since partial fine-tuning is less important, we spent little time parameter-tuning it and only tried to maintain good performance on full fine-tuning.
However, if your task necessitates partial fine-tuning, I suggest considering using baseline TS2Vec. Based on our experiences, TS2Vec has shown promising results in partial fine-tuning scenarios.

Thank you for sharing! I appreciate it :)


Add renovate bot for dependencies

It looks like renovate is compatible with pnpm!
Dependabot doesn't support pnpm see https://github.com/dependabot/dependabot-core/issues/1736

From Labs team - @jasonkuhrt
We chose renovate because its way more flexible, and better documented https://docs.renovatebot.com/configuration-options
Our config:
https://github.com/prisma-labs/renovate-config
One thing we didn't resolve yet is we want automerging of non-major dev deps https://github.com/prisma-labs/renovate-config/blob/master/default.json#L41-L50 but also having it visibly accumulate throughout the week https://github.com/prisma-labs/renovate-config/blob/master/default.json#L33-L40
I think this is not supported and so far auto-merging appears overruled by the other.

Done!


Aliases to functions when the alias is an object with a description

Related to #80 and #73
#80 allow function task in aliases.js. However, when the alias has a description, function task does not work.
#73 fix this problem but was closed in favor of #80 due to better test strategy.
Like #73, this PR supports function tasks with description using aliases.js
but follow the strategy of #80 for unit test.
Some comments are added to this part of the code.
// aliases.js
module.exports = {
  myAlias: {
    description: 'Description of myAlias.',
    tasks: function (target) {
      // Function tasks here...
    }
  }
};

thanks


Bump spanner max bound back to <4

This was causing test failures, so we added an upper bound. I tried removing the bound and it seems like tests are passing again; looks like there was a new version released, so I'm guessing that fixed the issue

Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

[ ] Mention the appropriate issue in your description (for example: addresses #123), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, comment fixes #<ISSUE NUMBER> instead.
[ ] Update CHANGES.md with noteworthy changes.
[ ] If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.
To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md
GitHub Actions Tests Status (on master branch)

See CI.md for more information about GitHub Actions CI or the workflows README to see a list of phrases to trigger workflows.

R: @Polber


How to log prompt?

I am doing an AI that takes as input a set of .md file and a question and tries to answer the question. I have a code like this:
from gpt_index import GPTSimpleVectorIndex, SimpleDirectoryReader

documents = SimpleDirectoryReader("docs").load_data()

index = GPTSimpleVectorIndex(documents)
response = index.query(question)

How to log the prompt that is given to GPT? In particular, I want to check that GPT receives the correct context.

You can probably log the full prompt args after it has been formatted by langchain
https://github.com/jerryjliu/gpt_index/blob/aa0092a14420a75e2e4251a2bd8aa1d5f9c28e29/gpt_index/langchain_helpers/chain_wrapper.py#L97

if you set the logging level to debug, you'll be able to trace the calls logged to openai https://gpt-index.readthedocs.io/en/latest/getting_started/starter_example.html#viewing-queries-and-events-using-logging

if you set the logging level to debug, you'll be able to trace the calls logged to openai https://gpt-index.readthedocs.io/en/latest/getting_started/starter_example.html#viewing-queries-and-events-using-logging

Thanks, that helps.
But it seems that the code only works in jupyter notebooks
import logging
import sys

logging.basicConfig(stream=sys.stdout, level=logging.DEBUG)
logging.getLogger().addHandler(logging.StreamHandler(stream=sys.stdout))

If I run the code in a .py file, nothing logged, any idea about the reason?

@lightondust not sure what your setup is, but maybe try https://stackoverflow.com/questions/13733552/logger-configuration-to-log-to-file-and-print-to-stdout

Set the environment variable OPENAI_LOG=debug and you'll see everything logged.

The above didn't work for me, but this one did:
import logging

logging.getLogger().setLevel(logging.DEBUG)


tsc 4.5 explicit eventual-extension-for-relative-imports policy breaks webpack's resolver logic

Bug Report
Related to https://github.com/TypeStrong/ts-loader/issues/1383
https://devblogs.microsoft.com/typescript/announcing-typescript-4-5-beta/#type-in-packagejson-and-new-extensions

This code works in CommonJS modules, but will fail in ES modules because relative import paths need to use extensions. As a result, it will have to be rewritten to use the extension of the output of foo.ts – so bar.ts will instead have to import from ./foo.js. ... This might feel a bit cumbersome at first, but TypeScript tooling like auto-imports and path completion will typically just do this for you.

(side note: I don't have nearly that much confidence in the consistency of the IDE tooling related to import autocompletion especially in monorepos)
🔎 Search Terms
mjs mts webpack extension tsc 4.5-dev
🕗 Version & Regression Information
tsc 4.5-dev
I was unable to test this on prior versions because the new extensions behavior is new.
⏯ Playground Link
N/A - involves relative path module resolution.
💻 Code
With webpack's module resolution,
import { foo } from "./misc" works as always
import { foo } from "./misc.ts" is wrong and gives TS2691: An import path cannot end with a '.ts' extension. Consider importing './misc.js' instead.
but
import { foo } from "./misc.js"; works with tsc but fails only in webpacking with Module not found: Error: Can't resolve './misc.js' in 'C:\example\src' resolve './misc.js'
🙁 Actual behavior
import { foo } from "./misc.js"; works with tsc but fails only in webpacking with Module not found: Error: Can't resolve './misc.js' in 'C:\example\src' resolve './misc.js'
🙂 Expected behavior
Webpack has no obvious way of overriding the resolved file extensions from ".js" to ".ts" or ".mjs" to ".mts".  resolve.extensions takes an array of suffixes, but doesn't seem to be able to express replacements and doesn't seem to take such an expressive function.
I know this policy of tsc not modifying non-type-annotations in the emit is long settled, but we at least could appreciate some guidance on this.  Is there a webpack compatible configuration for this?  Is a particular change in webpack recommended? What do we do?

This is still something we’re working out. I’m not convinced that node12/nodenext are appropriate module resolution modes if you’re writing for the browser or for a bundler. There is some discussion about this going on at https://github.com/microsoft/TypeScript/issues/37582 and I’d like to use that as the canonical issue to discuss this problem. For Webpack specifically, it looks like you should be able to use https://www.npmjs.com/package/resolve-typescript-plugin, though it will probably need an update for the mts file extension. But for now, I think my best recommendation would be not to use mts and/or node12/nodenext with Webpack and keep writing extensionless imports. Let’s move additional discussion to #37582.

Seen in a related issue: webpack just fixed this with resolve.extensionAlias, so you should be able to write a .js extension and make both tsc and webpack happy.


linalg.eigh precision is too small and backprop unstable

Dear Jax Developers,
I'm enjoying a lot your library and currently I try to develop a high precision simulation with your library. Unfortunately I encountered two problems.
First it seems, like the eigensolver routine for hermitian matrices is significantly less precise than the one provided by Numpy. I tried to reproduce the discrepancy in this example code
import jax.numpy as jp
from jax import ops as jops
import jax.numpy.linalg as la

U = 0.3
eps = -0.15
V = 0.1
dim = 4
aux_dim = 4

Lambda = 3.

elemaddedsite = jp.zeros((2,4,4))
elemaddedsite = jops.index_update(elemaddedsite,jops.index[0,0,3],1.)
elemaddedsite = jops.index_update(elemaddedsite,jops.index[0,1,2],-1.)
elemaddedsite = jops.index_update(elemaddedsite,jops.index[1,0,1],1.)
elemaddedsite = jops.index_update(elemaddedsite,jops.index[1,3,2],1.)
elemaddedsite_index = [[1,3,2],[1,0,1],[0,1,2],[0,0,3]]

alambda = (Lambda + 1.)/(Lambda - 1.)*jp.log(Lambda)/2. # this factor accounts for the discretation
eps /= Lambda
U /= Lambda

energies = jp.zeros(dim)
energies = jops.index_update(energies,[0,1,2,3],[0.,eps,(2.*eps + U),eps])

wilson_t = jp.sqrt(alambda/Lambda) * V # * we account for the descrete bath

elemlastsite = jp.zeros((2,aux_dim,aux_dim))
elemlastsite = jops.index_update(elemlastsite,0,jp.transpose(elemaddedsite[0]))
elemlastsite = jops.index_update(elemlastsite,1,jp.transpose(elemaddedsite[1]))

dim_new = dim

dim_new = dim_new*aux_dim

H = jp.zeros((dim_new,dim_new))

id = lambda x: dim*x

for i in jp.arange(4):
    H = jops.index_update(H,jops.index[id(i):id(i+1),id(i):id(i+1)], 0.5 * jp.diag(jp.sqrt(Lambda) * energies[0:dim]))

for idx in elemaddedsite_index:
    sign, k, kp = idx
    H = jops.index_update(H,jops.index[id(k):id(k+1),id(kp):id(kp+1)],wilson_t * elemlastsite[sign]*elemaddedsite[sign,k,kp] * (-1.)**(k))

H += H.T

import numpy as np
energies_np, eigs_np = np.linalg.eigh(H,'U')

energies_jp, eigs_jp = la.eigh(H,'U')

print(energies_np - energies_jp)

print("\n")

print(eigs_np-eigs_jp)

print("\n")

print(jp.matmul(eigs_jp.T,eigs_jp))

print("\n")

print(jp.matmul(eigs_np.T,eigs_np))

It doesn't look like much, but it causes strongly deviating results from what are known correct results I can reproduce with Numpy.
Second it seems like Jacobians that propagate through more than one eigensolver backwards are not stable and return nan.
I would be very happy if I could get feedback for these two issues. I apologize if all this can be solved by using float64, but I think that is not the problem.
Thanks, Jonas

Hi - from the residuals, it looks like you're using 32-bit arithmetic, which is currently Jax's default. See https://jax.readthedocs.io/en/latest/notebooks/Common_Gotchas_in_JAX.html#Double-(64bit)-precision for details.
If I run this at the start of the session and then run your code, the residuals look much better:
from jax.config import config
config.update("jax_enable_x64", True)

This x64 issue is a bit of a wart at the moment, and we're hoping to move soon to matching Numpy's use of 64-bit precision by default.

Thanks for the quick response.
That was it!


Windows Hotkeys not working.

Describe the bug
When cairo menu is enabled and you press the windows key + r (Example) the programs menu opens but not the hotkeys same with Windows key + i (Settings) and Windows key + e (Explorer)
and nothing opens
Steps to reproduce

Install Cairo as shell
try a windows key shortcut
it wont work

Expected behavior
Only the Programs menu to open and the hotkey, not work
System information:

Windows version: Windows 10 Home (1903)
Cairo version: 0.3.6842.0 - Pre-release
32-bit or 64-bit: 64-bit
In Cairo Settings > Advanced, is Cairo set as shell?: Yes

Additional context
It doesnt work
Screenshots
If applicable, add screenshots to help explain your problem.

This is fixed in the latest release.


install: Support generating vX.Y-dev charts

Step 1: Change VERSION file to contain X.Y-dev
Step 2: make -C install/kubernetes
Step 3: Generate helm templates
@aanm I'm not sure if this 100% lines up with how you've been generating the dev chart templates but this seems like a pretty straightforward way to do so.

This change is

Coverage increased (+0.01%) to 45.432% when pulling fc4fdf8dc6523f2e3c63fe3b8d2bf451a612520c on joestringer:submit/helm-dev-charts into 7a24487c0613e5e356105c3e5fa5c9bb21596f18 on cilium:master.


Changing &Event to Event in on_event().

I am aware that this breaks backwards compatibility, so this can be discussed whether this should be changed as brutally as it's done now. However, is there a reason new events are not passed to the handler by value instead ? Being an immutable reference leaves the handler unable to decompose any of the events.
This implies that I cannot do self.ids_to_nicks.insert(user.id, user.name) as I have to do self.ids_to_nicks.insert(user.id.clone(), user.name.copy()).
Since the actual event enum is only ever passed to the handler and never referenced, ever again, it has no reason to be passed to the handler as a read-only reference. The handler, whatever it may be, should be mature enough to take ownership of the event at that point.
I think it would be reasonable to change the interface of the library and increment the version number so no breakage ensues and users of the newer library can enjoy a more flexible interface.
https://github.com/slack-rs/slack-rs/blob/257770fc1541c5693d27fedcfbb21543dd307d49/src/lib.rs#L500
Of course, if there are any future plans to do something with the Event enum later on, feel free to disregard this pull request. But I'd love to hear what these future plans would be.

This looks like a good change to me, any thoughts  /cc @mthjones @jwilm ?
As far as future plans for Event, personally I'm pretty much in maintenance mode for this library but here in particular I did discuss possible changes to the internal structure of Event, our event processing is currently brittle and does not handle changes in slack's json very well (because we de-serialize it to expected structures).
If something like the above linked changes were made, clients could probably match on the "type" field instead.

Giving ownership to the event handler makes a lot of sense. The other changes to Event aren't really relevant to this discussion, but I do support moving to serde for more flexible decoding.

Ok. I will make this change for the next release then.
I'd be curious what you think is the best solution with regards to serde.
I would definitely like to implement more robust {de}serialization in the
future and I'm not sure what the best solution is. I've been considering
wrapping something like serde_json::Value so I wrote a small test library
that way for Telegram with methods like has_field() -> bool and
get_field() -> Option<T>. It seemed ok minus the performance penalty and
actually having to test for fields.
On Aug 23, 2016 12:30, "Joe Wilm"<EMAIL_ADDRESS>wrote:

Giving ownership to the event handler makes a lot of sense. The other
changes to Event aren't really relevant to this discussion, but I do
support moving to serde for more flexible decoding.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/slack-rs/slack-rs/pull/62#issuecomment-241792385, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AA4Bq4bi0Qe7ujVvyAEjkExQxXCLM3U_ks5qiyAcgaJpZM4Jl_BC
.

 The way I've done this with serde is to define structs that contain regular (non-optional) values for items that are guaranteed to be part of that type. For optional types, serde will happily default those fields to None. Additionally, serde can be set up to ignore unexpected fields in case the API adds them.

Ok, that all sounds handy. My main concern is that a struct full of
Option<T> isn't much better, like say:
https://github.com/slack-rs/slack-rs-api/blob/master/src/types.rs#L54 which
currently has ~34 Option<T> values! Perhaps we can break up the structs
into more sub-types.
 The way I've done this with serde
is to define structs that contain regular (non-optional) values for items
that are guaranteed to be part of that type. For optional types, serde will
happily default those fields to None. Additionally, serde can be set up
to ignore unexpected fields in case the API adds them.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/slack-rs/slack-rs/pull/62#issuecomment-241798409, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AA4Bq47d5-k0JbfYBW9c5W5KLks_17u5ks5qiyTygaJpZM4Jl_BC
.

It may not be pretty, but as the API isn't guaranteed to provide those fields, Option enforces that reality in the type system. :grin:
I think the best bet with the Event type is to match the slack RTM events as closely as possible so that detailed documentation for Event variants can be delegated to slack docs.

Makes sense. I'll open an issue for improving this.


[coinbasepro] Added support for "limit" parameter in trade history request

Added support for request parameter "limit" in trade history request to better support paging.
Also "fixed" a test which makes a live call and the response seems to have changed.

I know there are tests failing, but I don#t think I'm responsible. They fail in project 'latoken' which I haven't touched ...


Bias potential matrix

Hi,
I wanted to make sure that I understand the definition of the bias potential matrix correctly.
Assuming an umbrella sampling experiment with 4 windows A, B, C, D and 3 states 0, 1, 2. The restraining potential defined as k*(x-x0)^2. Should the cell A0 contain the following?
x=median value of bin 0,
x0=target value of window A

Hi @andt88 , sorry for the slow response,  I have been travelling.
Yes, you're right about the bias matrix. The cell A0 should contain:

k*(x-x0)^2. Should the cell A0 contain the following?
x=median value of bin 0,
x0=target value of window A

For umbrella sampling, the easiest thing is to define the bias energy of the bin/micro state via the center/median of the bin/micro state, as you have done . See also the following paragraph from the paper on DHAM (which preceded DHAMed) https://pubs.acs.org/doi/full/10.1021/ct500719p

In US, the unbiased potential surface is modified by applying a (typically harmonic) bias potential ui(k) in each window k. This bias is evaluated at the center of the ith bin in the kth simulation, which for a harmonic potential centered at x(k) would result ..

Does you bias matrix have 3 rows and 4 columns, for your 3 states and 4 windows? Do you get a sensible free energy profile?

Hi Lukas, thanks for your response. My matrix is actually larger. I am getting the following error for the following input:
traj= [0 0 0 ... 0 0 0]
n_states=10
line 22, in count_matrix
b[int(y), int(x)] = c
IndexError: index 1 is out of bounds for axis 0 with size 1

I am now running into a zero division error:
print(len(c_l)) gives me 46, which is the number of siulation windows
print(c_l[0].shape) gives me (10, 10). 10 is the number of bins I defined.
dhamed.py:20: RuntimeWarning: divide by zero encountered in log
og = run_dhamed(c_l, -np.log(v_ar), numerical_gradients=False, jit_gradient=True)
58
loglike-start nan
nan
Traceback (most recent call last):
File "dhamed.py", line 20, in
og = run_dhamed(c_l, -np.log(v_ar), numerical_gradients=False, jit_gradient=True)
File "/storage/home/local/andtos-loc/Dropbox_2/PhD/IFN/IFN_2018_20/DHAMed/pydhamed/optimize_dhamed.py", line 182, in run_dhamed
numerical_gradients=numerical_gradients, **kwargs)
File "/storage/home/local/andtos-loc/Dropbox_2/PhD/IFN/IFN_2018_20/DHAMed/pydhamed/optimize_dhamed.py", line 220, in min_dhamed_bfgs
fprime=fprime, **kwargs)
File "/usr/lib64/python2.7/site-packages/scipy/optimize/optimize.py", line 889, in fmin_bfgs
res = _minimize_bfgs(f, x0, args, fprime, callback=callback, **opts)
File "/usr/lib64/python2.7/site-packages/scipy/optimize/optimize.py", line 943, in _minimize_bfgs
gfk = myfprime(x0)
File "/usr/lib64/python2.7/site-packages/scipy/optimize/optimize.py", line 292, in function_wrapper
return function(*(wrapper_args + args))
File "/storage/home/local/andtos-loc/Dropbox_2/PhD/IFN/IFN_2018_20/DHAMed/pydhamed/optimize_dhamed.py", line 95, in grad_dhamed_likelihood_ref_0
grad = _loop_grad_dhamed_likelihood_0_jit(grad,g, ip, jp, ti, tj, vi, vj, nijp)
ZeroDivisionError: division by zero

Hi @andt88,
What are the units of your bias? You might not have to take the negative log of the bias array. Let me know whether that makes a difference :).

I am using Amber, so the unit of the force constant should be kcal/(mol*A²) and thus that of the potential kcal/mol.

Could you provide a minimum example which shows the division by zero error?  I'd love to get to the bottom of this and a minimum example for debugging would help a lot!

Hi Lukas, the error appears when I try to calculate the uncertainty. Here's a test case:
import numpy as np
import matplotlib.pyplot as plt
from pydhamed import count_matrix
from pydhamed import run_dhamed
import count_transitions as count_transitions
num_umbrella_windows=4
bin_list=[[25.79675, 26.041050000000002], [26.04105, 26.28535], [26.285349999999998, 26.52965], [26.52965, 26.773950000000003], [26.77395, 27.018250000000002], [27.01825, 27.26255], [27.262549999999997, 27.50685], [27.506849999999996, 27.75115], [27.75115, 27.99545], [27.995449999999998, 28.23975]]
n_states=10
bias_mat=[[2.00000000e+00 3.91720050e+00 6.47352162e+00 9.66856338e+00]
[1.14216498e+00 2.66897408e+00 4.83480608e+00 7.63935872e+00]
[5.23059920e-01 1.65947762e+00 3.43482050e+00 5.84888402e+00]
[1.42684820e-01 8.88711120e-01 2.27356488e+00 4.29713928e+00]
[1.03968000e-03 3.56674580e-01 1.35103922e+00 2.98412450e+00]
[9.81245000e-02 6.33680000e-02 6.67243520e-01 1.90983968e+00]
[4.33939280e-01 8.79138000e-03 2.22177780e-01 1.07428482e+00]
[1.00848402e+00 1.92944720e-01 1.58420000e-02 4.77459920e-01]
[1.82175872e+00 6.15828020e-01 4.82361800e-02 1.19364980e-01]
[2.87376338e+00 1.27744128e+00 3.19360320e-01 0.00000000e+00]]
states_list=[[2, 3, 2, 3, 3], [6, 6, 5, 8, 7], [8, 9, 9, 9], [9, 9, 8]]
c_l=[]
print(bin_list)
print(n_states)
print(bias_mat)
print(states_list)
for i in states_list:
traj=np.array(i)
c_ = count_matrix(traj,n_states=n_states)
c_l.append(c_)
v_ar=bias_mat.reshape(n_states,num_umbrella_windows)
og = run_dhamed(c_l, -np.log(v_ar), numerical_gradients=False, jit_gradient=True)
n_blocks = 3
bl_l = []
for bl in np.split(traj[1:],n_blocks):
c_l = [count_matrix(bl,n_states=9)]
bl_g = run_dhamed(c_l, -np.log(v_ar))
bl_l.append(np.exp(-bl_g) / np.sum(np.exp(-bl_g)))
bl_ar = np.column_stack((bl_l))
bl_ln_ar = np.log(bl_ar)
minmum and maximum values of the PMF (from the five reconstructions) to indicate the uncertainty.
min_pmf = np.min( bl_ln_ar - bl_ln_ar[-1], axis=1)
max_pmf = np.max( bl_ln_ar - bl_ln_ar[-1], axis=1)
bl_ar.shape
dh_log_err = np.std(-np.log(bl_ar), axis=1) / np.sqrt(n_blocks-1)
dh_log_err.shape
fig, ax = plt.subplots(figsize=(5,3))
error bar is barely visible
#plt.errorbar(rc, rna_pmf, yerr=dh_log_err, fmt=".", capthick=1,capsize=4
rc = np.arange(0,9)
rna_pmf = og*-1
rna_pmf -= rna_pmf[-1]
plt.plot(rc, rna_pmf, ".", label="US DHAMed")
plt.fill_between(rc, min_pmf, max_pmf, alpha=0.4, label=r"min-max PMF $\Delta t=10^4 , \mathrm{MC}$ ")
ax.set_xlabel("Distance")
ax.set_ylabel("PMF ($\mathrm{k_BT}$)")
ax.set_ylim(-1,13)
ax.set_xlim(-0.4,8.4)
ax.set_yticks([0,5,10])
ax.set_xticks([0,2,4,6,8])
ax.tick_params(direction='out')
plt.legend(borderaxespad=0.1)
plt.tight_layout()
plt.savefig("block_pmf.pdf")``

Fantastic, I'm looking into it right now :-)

Hey, I think the error comes from some frames lying outside of the most left and most right bin. I fixed this by changing the bin distribution.

         Current function value: 0.000000
         Iterations: 0
         Function evaluations: 1
         Gradient evaluations: 1
time elapsed 0.000334978103638 s
Traceback (most recent call last):
  File "dhamed_block.py", line 25, in <module>
    og = run_dhamed(c_l, -np.log(v_ar), numerical_gradients=False, jit_gradient=True)
  File "/storage/home/local/andtos-loc/Dropbox_2/PhD/IFN/IFN_2018_20/DHAMed/pydhamed/optimize_dhamed.py", line 162, in run_dhamed
    n_states, n_windows)
  File "/storage/home/local/andtos-loc/Dropbox_2/PhD/IFN/IFN_2018_20/DHAMed/pydhamed/prepare_dhamed.py", line 211, in generate_dhamed_input
    t= state_lifetimes_counts(c_l, n_states, n_win)
  File "/storage/home/local/andtos-loc/Dropbox_2/PhD/IFN/IFN_2018_20/DHAMed/pydhamed/prepare_dhamed.py", line 29, in state_lifetimes_counts
    t_ar[:, iwin] = np.sum(win, axis=0)
ValueError: could not broadcast input array from shape (10) into shape (9)

Thanks for the update!  Two questions

You are loop over your umbrella windows, right?

' for i in states_list:
traj=np.array(i)
c_ = count_matrix(traj,n_states=n_states)
c_l.append(c_) '
The list of the count matrices grows, while you're iterating. For umbrella sampling, I'd expect one list of count matrices, with one entry for each umbrella window, for instance, for the analysis of umbrella sampling of ion permeation through the GLIC channel, I had:
len(transition_count_l) # one transition count matrix for each of the 153 umbrella windows
See for reference https://github.com/bio-phys/PyDHAMed/blob/master/pydhamed/glic-ion-channel/glic_ion_channel_permeation.ipynb
I'd thus run the optimization once for all four umbrella windows, i.e., I'm not sure whether run_dhamed should be executed within the loop over states. Do let me know if I'm missing something here.

Are you sure you have to the take the log of your bias array. The RNA duplex formation example is a bit misleading in that respect. There the bias returned by the simulations was $w_i^{\alpha} = \exp(-\beta u_i^{alpha})$. Thus I have to take the log to get $u_i^{\alpha}= - \ln(w_i^\alpha) k_BT$. In the GLIC ion channel example, I can directly input the bias  $u_i^{\alpha}=k^\alpha*(x_i-x_0^{\alpha})^2$.

Thanks for your feedback!
You're right, executing run_dhamed within the loop is wrong.
Regarding the unit of v_ar, I wasn't sure which units run_dhamed actually requires. As I mentioned earlier, my v_ar is in kcal/mol.

I think you have to divide your bias array by RT to convert from kcal/mol to kBT. N.B., assuming that your temperature was 300 K and dividing by RT, lets run_dhamed finish, but I get non-sensical values.
Do you still get the division by zero error on your full data set?
Comparison to WHAM provides a quick test, whether your DHAMed results are sensible. You'd expect that many/some features of the WHAM PMF are reproduced by the DHAMed PMF.

I am currently running it on the full data set. I'll let you know once it's finished.

Hi Lukas I am still getting the division by zero error on the full data set.

I attached a file that contains:
bin_list
n_states
bias_mat
states_list
dhamed.txt

Hi Lukas, did the file work for you? Do you prefer another format?

The file is hard to parse for us. Could you please store the arrays using a native numpy function.
np.savez('dhamed.npz', bias_matrix=bias_matrix, bin_list=bin_list)

This is much easier for us to read again into a python process. The number of states is 1000, right?

Here it is. I had to label it txt but the format is npz. Thanks a lot!!
dhamed.npz.txt

Thanks a lot!  I can open your file and I'm trying to figure out what's going on right now.

I managed to get DHAMed to work for your data.  I made a trivial mistake in my code that affects the setup of calculations when there are empty bins/states. I'm fixing this right now and I will try to update the repository later today.

https://github.com/bio-phys/PyDHAMed/commit/d42f2a67a2650a0f8b09a798c2afe3b6d85aab08 should fix the problem- the problem was a trivial mistake in the handling of empty bins.
Have a look at the Jupyter notebook (had to rename it to .txt), whether the result makes sense to you.
handle_excluded_states-3.ipynb.txt

Thank you so much for fixing this! I am running it right now and will let you know then.

I'm still getting the same error. I downloaded the Master Branch yesterday. Did I get the wrong version?

Did you update your installation? Just in case you can run pip install . --user in the repository to force an update of the installation. Alternatively, a python interpreter started from the repository directly should also pick up the current checkout.

I'm not sure what it is I am doing wrong but I still get the error. I cloned the master branch and ran pip install . --user as you suggested, but I am still getting the zero division error. I am running this on the same npz file I sent to you.

I'll look into that :) Thanks a lot for letting me know!

Is there a possibility to check whether the correct version is installed and called?

You could use ?? to for instance on 'generate_dhamed_input()' to see whether you are calling the latest version.
For 'generate_dhamed_input()' you'd expect to see (towards the end):
  # Remove excluded counts from the total number of transitions out of state. nk = check_total_transition_counts(n_out, n_in, paired_ar, n_actual), which is new.

I checked thoroughly that I have the correct version.
         Current function value: 8850065.308126
         Iterations: 311
         Function evaluations: 428
         Gradient evaluations: 418
time elapsed<PHONE_NUMBER>3 s

I tried this in the jupyter notebook:
prepare_dhamed.generate_dhamed_input??```

which produces the desired output.

When running
```from pydhamed import prepare_dhamed```
I get
```Traceback (most recent call last):
  File "dhamed.py", line 10, in <module>
    inspect.prepare_dhamed.generate_dhamed_input()
AttributeError: 'module' object has no attribute 'prepare_dhamed'

running inspect.getfromsourceline(prepare_dhamed.generate_dhamed_input()):
# Remove excluded counts from the total number of transitions out of state.\n', '    nk = check_total_transition_counts(n_out, n_in, paired_ar, n_actual)\n'
Still I get the zero division when running dhamed from the command line. What is this number:  8851574.60815
I get inf here instead of a number.

I realized that I get the error when dividing the bias potential matrix by RT (0.0019). Can you reproduce the error?

I'll try to have a look at this tmr morning :)

Where is the 0.0019 coming from? If your energies are in kcal/mol, I'd expect something like 1.98x10^-3 kcal K^-1 mol^-1 x 300 K ~ 0.596 kcal/mol for the factor to divide the bias energies. Do tell me what, I'm missing.

Hi @andt88, can I close the issue or are there still problems?

Sorry I was on vacation until just now. It's working in principle but the PMF looks quite different from the one I get using a TI approach. I will have a closer look in the coming days and keep you posted. Thanks a lot for your help so far!!

Let me know how it goes :) One thing that would be interesting would be to compare the PMF from DHAMed to WHAM.
In our paper we write

In practical applications, DHAMed should be compared with (binless) WHAM. If the results differ significantly, this can mean that dynamics was relevant (and the DHAMed free energies improve over WHAM) or that the states are not kinetically meaningful (in which case neither DHAM nor WHAM free energies are likely to be accurate).

Hi Lukas, thanks for reopening this!
Attached you can fin the results from my TI calculation (accumulative work) and the DHAMed result from your method. Interestingly, DHAMed shows a lot of scattering at the borders, the overall shape of the curves is however quite similar, just slightly shifted across the x-axis.

That looks pretty good to me!
In recent (unpublished) work, I have also found scatter at the ends of DHAMed profiles. I found that  all the structures outside the studied range of the reaction coordinate/order parameter to the would be mapped to the structural states/bins with the smallest and largest value of the order parameter. To fix that I added one more state on either end of the PMF, included the state in the DHAMed or WHAM calculations, but left out the state in the final plot (plotting over just the range of interest).

Hm, I need to think about this in more detail. At the edge of your reaction coordinate you may have fewer events, which may be one reason for the scattering.

I made different plots as a function of the padding at the edges and the number of bins. This affects both the scattering and the shift along the x-axis.

Thank a lot for your update!  That looks very good :) It seems that the padding did not help in your case, which is interesting for the further development of DHAMed.

Thanks a lot to you and @kain88-de for your help!!

Hi there again :)
Before I try to implement it myself, I wanted to ask if pyDHAMed already includes a function to calculate kinetic rate constants and statistical uncertainties.
Regarding the statistical uncertainty, I already saw your blocking approach, but my understanding from the publication is that there's a way to calculate a covariance matrix from F.
I look forward to your response!

Hi, I'm sorry for the slow response. pyDHAMed does not include such functions yet, but I'm working on including them.

I will have quick look at calculating the covariance matrix from F next week #12.
Calculating kinetics from e.g., umbrella sampling is tricky. I will think about a strategy that might work for you and others and what functions should be included in the package.  #13.

Thanks a lot! Let me know if I can help with testing.


Add Hextris Game

PR Description 📜
Added Hextris Game
Please review the PR!
Fixes #1901

Mark the task you have completed ✅

[x] I follow CONTRIBUTING GUIDELINE & CODE OF CONDUCT of this project.
[x] I have performed a self-review of my own code or work.
[x] I have commented my code, particularly in hard-to-understand areas.
[x] My changes generates no new warnings.
[x] I have followed proper naming convention showed in CONTRIBUTING GUIDELINE
[x] I have added screenshot for website preview in assets/images
[x] I have added entries for my game in main README.md
[x] I have added README.md in my folder
[x] I have specified the respective issue number for which I have requested the new game.

Add your screenshots(Optional) 📸

Thank you soo much for contributing to our repository 💗

Thank you @kartikjoshi267 ,for creating the PR and contributing to our GameZone 💗
Review team will review the PR and will reach out to you soon! 😇
Make sure that you have marked all the tasks that you are done with ✅.
Thank you for your patience! 😀

Hello @kartikjoshi267, You need to make the following changes:

Please modify the main README.md file.
Please add an image to the assets/images directory.

Hoping that you will make those changes soon 🚀

@kunjgit I have already added an image to assets/image directory and also modified main README.md file. Please review the PR again.

@kunjgit Both completed

please make sure you are not adding game as before you also there are many games which are already accepted and it is pending to add so don't do that changes !!! 👀

please make sure you are not adding game as before you also there are many games which are already accepted and it is pending to add so don't do that changes !!! 👀

@kunjgit Please check now!

Thank you  @kartikjoshi267 , for your valuable time and contribution in our GameZone 💗.
It’s our GameZone, so Let’s build this GameZone altogether !!🤝
Hoping to see you soon with another PR again 😇
Wishing you all the best for your journey into Open Source🚀

Hey @kartikjoshi267,
You can't work on a closed issue 👀!
Follow the proper guideline and make a new PR again 😀.
Happy Hacking 💗


Remove broken link to missing blog post

Link doesn't work, and I couldn't find the article through search

Good catch @dcopeland, thanks!


Terms from unit ontology imported

We have terms from the unit ontology in the dpbo.
[Term]
id: UO:0000000
name: unit
namespace: unit.ontology
def: "A unit of measurement is a standardized quantity of a physical quality." [Wikipedia:Wikipedia]
created_by: george gkoutos

[Term]
id: UO:0000048
name: acceleration unit
namespace: unit.ontology
def: "A unit which is a standard measure of the rate of change of velocity in either speed or direction." [Wikipedia:Wikipedia]
subset: unit_group_slim
is_a: UO:0000000 ! unit
created_by: george gkoutos

There is, as far as i can see, no new information added with these terms (no new relationships) AND we already add the unit ontology in ext_ontologies.include. So these should be removed.
https://github.com/nfdi4plants/nfdi4plants_ontology/blob/a9031e12ecd682ce58ff41f93b4070912d9cd442/dpbo.obo#L2421

There are new relationships added under acceleration unit. The following DPBO terms are added as subclasses under unit>acceleration unit. I did this in order to add semantic context to the terms.
[Term]
id: DPBO:0000083
name: relative centrifugal force
def: "Relative centrifugal force (RCF) is the amount of force applied to a sample when using a centrifuge. It is dependant on the speed of the centrifuge rotation as well as the distance of the sample from the center of rotation." []
synonym: "RCF" EXACT []
is_a: UO:0000048 ! acceleration unit
equivalent_to: DPBO:0000084 ! g-force

[Term]
id: DPBO:0000084
name: g-force
def: "G-force is the force acting on an object as a result of acceleration or gravity." []
is_a: UO:0000048 ! acceleration unit

[Term]
id: DPBO:0000085
name: standard gravity
def: "The standard acceleration of an object in free fall at or near sea level equivalent to 9.807 m/s2." []
synonym: "g0" EXACT []
synonym: "standard acceleration due to gravity" EXACT []
synonym: "standard acceleration of free fall" EXACT []
is_a: UO:0000048 ! acceleration unit

What I suggest is removing UO:000048 (acceleration unit) for now as the likeliest Swate column heading for these terms would be 'unit'. I can always add it again later if we need it. Please let me know if this is an agreeable solution.

UO:000048 (acceleration unit) will not be removed as we include the whole unit ontology. Maybe ask @Brilator how to handle this case. I do not know if what users will expect when looking for this term.

Yes, UO is included in the SwateDB, so the term itself will not be removed from Swate. I was referring to removing the term from dpbo.obo, which will remove the is_a relationships between UO:000048 (acceleration unit) and dpbo child terms.


How to get InstallationDetails without using TeamId/EnterpriseId

When an app is installed via  "/slack/install" and completes via "/slack/oauth_redirect", I am wondering at that point, is there a way to access the InstallationService without any knowledge of the TeamId that installed it?
Of course, once slack app events are processed, we can know that information but what if we want to know all the InstallationService details at the time of successful installation? The API doesn't seem to allow it. But this doesn't prevent me (as Admin) to open the file:
-rw-r--r--  1 foo  staff   457B Jul 23 18:48 none-T11ABJJA39-U22G1MJHVA1-latest
-rw-r--r--  1 foo  staff   457B Jul 23 18:48 none-T11ABJJA39-U22G1MJHVA1-1690163325620
Is the only way to do this to just read the latest install file and parse the details?
I hope my question makes sense! Thank you!

Hi @tzuanw, thank you for asking the question.
I'm still not entirely sure what your goal here is, but the InstallationService is just an interface to implement, so you can add any additional operations in your code. The interface does not prevent you from implementing additional methods such as findAllInstallations(), findByWorkspaceDomain(String), or any other methods you may need.
Either way, for production-grade apps, you will use your own InstallationService backed by a database, not the default local file-based one used for local development.
I hope this helps.

Great, this answers my question, thank you so much @seratch :pray:


update README.md

fix typo
Issue #, if available:
change amplish to amplify
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Thanks!


Introduce the "Table Key" module

Summary
It has been shown that disabling keys (indexes) allows for faster mass deletion of records.
Introducing a new module that would allow AL code to disable indexes before mass deletion / insertion / modification of records in a table.
Work Item(s)
Fixes AB#494937

Tests? :)

Tests? :)

There is no way to test this in AL unfortunately, I verified that it works using SQL Server Management Studio


Add note about building custom classNameBindings

@elidupuis Thanks so much for this! 🤗 Even though I would be tottaly 👍 for using the multi line ternary in the code base, because it's for documentation, I think a standard "if else" conditional I think would be a little more strait forward and allow people of all skill levels to more easily see what's happening.

@webark Yep, my bad 😄 . Updated.

@elidupuis sweet! thanks 😄


Add sequential values test

This is a:

[ ] bug fix PR with no breaking changes — please ensure the base branch is master
[x] new functionality — please ensure the base branch is the latest dev/ branch
[x] (possibly) a breaking change — please ensure the base branch is the latest dev/ branch

Description & motivation
This macro builds on work done in #264, to add a general test that a column has sequential values (i.e. an arithmetic series)
It's a little different to the exact functionality of that test, but I think this one is more generally useful
🚨 Note: when getting the tests passing, I noticed that the date_add macro has some strange behavior on BigQuery — we use datetime_add, and cast to a datetime rather than a timestamp (thus losing any timezone info). I thought it would be preferential to use timestamp_add here instead, which meant I ended up touching some other files. @jtcohen6 — I'd really like your eyes on that part of the code
Checklist

[x] I have verified that these changes work locally on the following warehouses (Note: it's okay if you do not have access to all warehouses, this helps us understand what has been covered)

[ ] BigQuery
[ ] Postgres
[ ] Redshift
[ ] Snowflake

[x] I have updated the README.md (if applicable)
[x] I have added tests & descriptions to my models (and macros if applicable)
[ ] I have added an entry to CHANGELOG.md

huh, this works locally, and worked before I cleaned up this branch 🤔

huh, this works locally, and worked before I cleaned up this branch 🤔

:oof:
Database Error in model test_dateadd (models/cross_db_utils/test_dateadd.sql)
  TIMESTAMP_ADD does not support the MONTH date part at [36:9]

OK leaving this for now, it's chewing up too much time

:oof:
Database Error in model test_dateadd (models/cross_db_utils/test_dateadd.sql)
  TIMESTAMP_ADD does not support the MONTH date part at [36:9]

OK leaving this for now, it's chewing up too much time

Closing in favor of #327


grafana container permission denied

cloned the filesystem & issued command:
ADMIN_USER=admin ADMIN_PASSWORD=admin sudo docker-compose up -d
Errors with:
Recreating grafana ... error

ERROR: for grafana  Cannot start service grafana: OCI runtime create failed: container_linux.go:348: starting container process caused "exec: \"/setup.sh\": permission denied": unknown

ERROR: for grafana  Cannot start service grafana: OCI runtime create failed: container_linux.go:348: starting container process caused "exec: \"/setup.sh\": permission denied": unknown
ERROR: Encountered errors while bringing up the project.

I have retried after adding "user: root" inside the grafana service of the docker-compose.yml file. Same issue.

should be fixed by #97

I have the same problem. Tried user "104" / root

chmod 755 ./grafana/setup.sh fixed it 👍


Performance improvement for processing

A little new to adding to public, let me know.
I didn't add new tests for this, I ended up rewriting the logic and re-using some functionally that exists. I ran your existing tests on writer.py which passed. Looking over those tests they seem to cover logic that I would've tested for. Let me know!

@sritterginkgo Would you like to join our Slack or Discord ? I am creating a channel about litdata.

Sure!

@sritterginkgo  Congratulations on your first PR. Keep them coming :) Reach out if you need anything on Discord.

@sritterginkgo what's your username on Discord ? I would like to invite to the litdata channel.


The drive or UNC share you selected does not exist or is not accessible. Please select another. Error report.

This is the error that keeps on happening. I've installed Visual Studio Code before but the file corrupted and and I deleted it, leaving the shortcut there. I couldn't delete the shortcut so I left it there for a few months. Then I decided to reinstall this. Then this happened:
**

**

lol i found registry key to delete it


User isnt logged out if api returns 401 or 403

I think users should be transferred to the login screen if the api returns unauthorized or forbidden.

@melonmanchan Was this fixed already?


Add sandbox' shipping migrations

We discovered that the sandbox would break on PostgreSQL, because we forgot to
follow the Oscar instructions to fork an app, which includes copying
migrations across.
In an ideal world, we would somehow test that this doesn't happen again. But
as this only affects developers of django-oscar-paypal, and not general users,
and this is the first issue like this, I'm not bothering at this point.

Travis passed, merging.


Add community guides section to README

This PR introduces a new "Community Guides" section to the DINOv2 README in which projects made by the community showing DINOv2 or how to use it can be listed.
I worked on a few tutorials that show how to use DINOv2 earlier this year and I would love to get them in front of more people interested in using the technology. These are added in the PR. I love DINOv2 💜

Following up!


Add Node fields

Fixes #190

Migration code is necessary due to the alteration of the data structure in the database.


Turn banner into a link to the github page

Makes it easier to get to the official repo from old Gogs forks..

Rebase then lgtm

I can't see where this should be useful

@tboerger It's only useful when someone forks gitea and someone clicks on the header image.

But even than I don't see why it's useful. The fork will be anyway already displayed on the page

I'd just change it to ![](public/img/gitea-large-resize.png) instead (since otherwise it breaks when you're offline...)

@tboerger You're right, then we'll use @bkcsoft solution

Here's where it's useful:
https://github.com/strk/gogs/

Try to get from there to gitea (which is clearly the upstream, judging from the logo)

You have not forked from gitea, you have forked from Gogs

Exactly, long ago. Now in order not to waste time with dropping the fork, recreating it from gitea and then re-pushing all feature branches and re-open the then broken PRs to gitea and gogs... I think it would be much easier to just have a Gitea banner be a link to a Gitea website. Can be gitea.io if you don't like the github link

Please replace the link to the image with public/img/gitea-large-resize.png

Done

LGTM

LGTM


feat(events): Add support to Android

Description
Added support for the following events on Android

RNDeviceInfo_batteryLevelDidChange
RNDeviceInfo_batteryLevelIsLow
RNDeviceInfo_powerStateDidChange

Checklist

[X] I have tested this on a device/simulator for each compatible OS
[X] I added the documentation in README.md
[ ] I mentioned this change in CHANGELOG.md
[ ] I updated the typings files (deviceinfo.d.ts, deviceinfo.js.flow)
[ ] I updated the dummy web/test polyfill (default/index.js)
[ ] I added a sample use of the API (example/App.js)

One thing that I'd like to discuss, is that Android generally show battery low at 15%.
The documentation currently says the battery low event is triggered at 20%, so to keep it consistent with iOS, I am also triggering the event at 20%.
Should we update the code and documentation to say that Android will trigger at 15%?

This looks fantastic - I'm dreaming of presenting more information (exposing most of https://developer.android.com/reference/android/os/BatteryManager.html is possible) but this is a great parallel implementation to the original iOS PR. Let me look at it more closely and test it but on a first scan I don't see anything wrong :muscle:

I was tempted to add the rest, but feature parity and all.

I'm -1 on feature parity. I just don't see how it's possible when the APIs themselves diverge. I'm more interested in return value shape and something that is consumable easily but where return object members are optional and documented as such.
'device-info' to me means 'anything device-specific information we can expose', and I would rather give devs more information than try to pretend all platforms are the same. That's where I'm at currently philosophically anyway.
The location providers interface is an example based on that philosophy - it's just not available information on one of the platforms but why not expose it from the other so devs at least have a chance to behave differently based on it?

maybe worth mentioning I am also not completionist - if a PR exposes some information we did not have before, in a way that can expand (if possible) to hold more data from one platform than the other, but doesn't have everything? Sweet. Can get more later...

Not sure what needs to be added to the flow/typescript types and example, as getPowerState() already exists in all of these.

Not sure what needs to be added to the flow/typescript types and example, as getPowerState() already exists in all of these.

Realized that after I made the comment as I was dozing off for the night 🤦♂  :-) - but I didn't see the power state come in on my emulator in App.js at least so I need to look a bit more at the example
I see what you mean about the blank vs unknown for first trigger, I want it triggered at first too.
I'll scan through this again this morning. Thanks @Johan-dutoit !

I believe it didn't appear on android because I left out the ||  OS === 'android' bit 😅
if (OS === 'ios' || OS === 'android') {
    return RNDeviceInfo.getPowerState();	    return RNDeviceInfo.getPowerState();
  }	  }

Sweet - I checked this all and it worked for me. I noticed it didn't have a sync version and I don't see why it couldn't? So I hacked that in, what do you think? It's your branch so if you don't like it feel free to git reset --hard HEAD~1 and force push it back out. Either way I think it's good to merge now so after you choose, go for merge (and release if you want - feature so, 3.1.0)


[build] Fix #16912 - correct backoff ranges.

Problem
Fix #16912
Change overview
Correct backoff ranges (floor the min and ceiling the max).
Testing

Compared against reference spreadsheet
CI

@woody-apple @bzbarsky-apple