Could you add options to disable bots take cover, heal injured player

it's a bit annoying when they all come to injured player just because they want try to heal injured player

it's a bit annoying when they all come to injured player just because they want try to heal injured player

The bots can't tell if another bot is already healing a player right now. As for turning these off, it would be possible but kind of defeats the purpose of the bots. The bots take cover to reload and heal themselves as standing out in the open is usually not the best idea when doing so. I could add a ConVar to change this since most players who want to disable this will probably want an on-demand on-and-off switch.
I will note that this will be low priority since I have other issues from almost a year ago that I should probably fix and add first!

Also I would like to request those options, I forgot to request them before

How far will a bot look for heal targets
Bots can continue to wait at the same position again after respawning
Bot heals injured player only when the injured player is close to bot, just like old version

I will note that this will be low priority since I have other issues from almost a year ago that I should probably fix and add first!

Okay, I will wait :D

Also I would like to request those options, I forgot to request them before

How far will a bot look for heal targets
Bots can continue to wait at the same position again after respawning
Bot heals injured player only when the injured player is close to bot, just like old version

I will note that this will be low priority since I have other issues from almost a year ago that I should probably fix and add first!

Okay, I will wait :D
Here are my opinion on these:

Currently it's attached to the bot's follow distance, I can make it a separate value.
This isn't as easy due to how the bots are programmed, but it is possible.
This is the same as number 1 since if you set the bot's follow distance to 80 HU, it won't move to its heal target since they are already close enough to the player. This could be fixed by doing 1 as well.

Bots can continue to wait at the same position again after respawning

This will be better for defense maps since now bots will follow the owner after respawning and you have to tell them where to wait again


clean code

👍

Codecov Report

Merging #558 into master will not change coverage.
The diff coverage is 50%.


Cannot read property 'id' of undefined

Found this in my console:
"Cannot read property 'id' of undefined: TypeError: Cannot read property 'id' of undefined
    at DebugViewlet.ViewsViewlet.updateViewStateSize (file:///Users/bpasero/Development/Microsoft/monaco/out/vs/workbench/browser/parts/views/viewsViewlet.js:509:57)
    at DebugViewlet.ViewsViewlet.updateViews (file:///Users/bpasero/Development/Microsoft/monaco/out/vs/workbench/browser/parts/views/viewsViewlet.js:360:46)
    at DebugViewlet.ViewsViewlet.onContextChanged (file:///Users/bpasero/Development/Microsoft/monaco/out/vs/workbench/browser/parts/views/viewsViewlet.js:324:22)
    at file:///Users/bpasero/Development/Microsoft/monaco/out/vs/workbench/browser/parts/views/viewsViewlet.js:218:117
    at CallbackList.invoke (file:///Users/bpasero/Development/Microsoft/monaco/out/vs/base/common/callbackList.js:35:39)
    at Emitter.fire (file:///Users/bpasero/Development/Microsoft/monaco/out/vs/base/common/event.js:91:40)
    at file:///Users/bpasero/Development/Microsoft/monaco/out/vs/base/common/event.js:294:37", source: file:///Users/bpasero/Development/Microsoft/monaco/out/vs/workbench/electron-browser/shell.js (263)

@sandy081 This happens when the same view descriptor appears twice on the toDelete array. @bpasero can you try to repro in the debug viewlet?

Is it due to that debug scripts view is being registered multiple times with the same id?

I would be placing a guard in the registry to prevent registering views with same id. Also got the confirmation that @weinand updates this debug script views to have unique ids.

A guard doesn't really fix the issue... it would be great to have repro steps.

Was not this due to duplicate ids?

Could be, that's why I'm asking for repro steps, since we no longer have duplicate ids. Unless @bpasero saw this on an old version...?

Ok. I think guard for preventing duplicate ids is good to have. May be I will wait to push that until we get the confirmation so that it will not obstruct to reproduce.

Oh!!! Yes man, sorry, I didn't understand you meant the registry! I was thinking it was within the viewlet. Yeah we still need that. 👍

No worries. 👍

Reopening it, just to get confirmation from @bpasero

I can verify from home, I do not have that setup here at work.


add nodejs support for tracestate propagation with datadog header first

Description

Add Node.js support for tracestate propagation with datadog header first.
Motivation

Node.js now supports this feature.
Workflow

⚠⚠ Create your PR as draft
Follow the style guidelines of this project (See how to easily lint the code)
Work on you PR until the CI passes (if something not related to your task is failing, you can ignore it)
Mark it as ready for review

Once your PR is reviewed, you can merge it! :heart:
Reviewer checklist

[ ] Check what scenarios are modified. If needed, add the relevant label (run-parametric-scenario, run-profiling-scenario...). If this PR modifies any system-tests internal, then add the run-all-scenarios label (more info).
[ ] CI is green

[ ] If not, failing jobs are not related to this change (and you are 100% sure about this statement)

[ ] if any of build-some-image label is present

is the image labl have been updated ?
just before merging, locally build and push the image to hub.docker.com

[ ] if a scenario is added (or removed), add (or remove) it in system-test-dasboard nightly

Hi @rochdev , do you still plan to work on this ?


70 implement explainer page after landing page

Homepage for authenticated users added.

side note with regard to the commit history: There are two adjacent commits which correct a typo. One other way to do this is that when you notice a change that should have been done in your previous commit, you can add it to that previous commit by doing git commit --amend instead.
A window will pop up with the merge message. It can be closed by typing :wq or esc then :wq and it edits the local previous commit.
Then do git push origin head --force-with-lease to edit the remote previous commit too.

thanks! I need to get better at using git in the terminal - I've saved your instructions for future ref


feat: patterns for cache get and cache get!

This PR implements pattern arguments for cache get and cache get! as explained in the help menu:
'get' and 'get!' can process list of paths, allowing the user to be more
specific about what should be downloaded. For example, with automatic glob
expansion in shell, one can call:

$ lake exe cache get Mathlib/Algebra/Field/* Mathlib/Data/*

Which will download the cache for:
* Everything that starts with 'Mathlib/Algebra/Field/'
* Everything that starts with 'Mathlib/Data/'
* Everything that's needed for the above

No warning, but a warning could be added to the first case

Probably the word "patterns" should be removed from the PR title and description too.

bors r+

The description looks wrong. lake exe cache get Mathlib/Data/Set/* returns uncaught exception: No match for Mathlib/Data/Set/Accumulate.lean


extending amount of results returned on fake response

Is it possible pass query variable for 20 results, for example?

@idkjs I'm confused. Can you please provide more detail description.
Do you want to make arrays bigger or something else?

I guess should add and a (count:Int) variable to the Companies query and see what happens. I was just trying to get more than two results back from the default companies query

Duplicate of https://github.com/APIs-guru/graphql-faker/issues/12


Automation tests

The goal of Knil is always to make Universal Links testing easier. Since the beginning of this project I'm considering make it not only an app for manual testing, but also possibly an automation test tool. Things like XCUITest and snapshot testing are currently I'm looking at.
Please share your knowledge for these area. Thanks.

I'm aware of this technique. https://twitter.com/_eliperkins/status/869593822375882752 Might be useful.


@module-federation/nextjs-mf prevents use of remote shared dependency

Following these resources:

https://github.com/module-federation/module-federation-examples/issues/2311
https://twitter.com/ScriptedAlchemy/status/1553253872193310720

I'm trying to ensure that the remote version of a shared dependency is used. This line in next-mf seems to be overriding the shared[dep].version = '0' trick and always selects the host version.
if(o.from === '_N_E') {
  o.loaded = 1
}

in the next major release ill be able to kill off this whole promise new promise thing.
If you use the delegate modules beta (in readme) i believe you can work around it


Fix call indentation for chained functions

Chained function calls were throwing errors because the node location is the start of the parent call.  and this is what I was using to check whether the first argument was on a new line.
Example:
promise
   .then(function(res) {
      return something;
   });

Would throw an error because res is not on the same line as promise, so the parenthesis at the end would need to be on it's own line.
I fixed this by checking the position of node.callee.property, which in the above example is then, if it exists, and node.callee if it does not.

Coverage increased (+0.07%) to 74.966% when pulling 745da2a510a8a8b99fc4e2797bd513fc14a499f1 on jimjenkins5:fix_callIndentationChaining into 4b8f1cc8c7240cd8538bd1c52af4dcd3249507b9 on silvermine:master.

Coverage increased (+0.07%) to 74.966% when pulling afb7075f3e9046b3af5b27a7fdabb40bde3c114a on jimjenkins5:fix_callIndentationChaining into 4b8f1cc8c7240cd8538bd1c52af4dcd3249507b9 on silvermine:master.


categorise scheduler framework extension point latencies by plugin

What would you like to be added: The plugin_execution_duration_seconds metric samples plugin latency and also categorises data by extension point. This issue proposes labelling scheduler metrics data in perf-dash using this metric.
Why is this needed: While it discards some data, per-plugin latency could be very useful to determine which plugins are running in which workloads. I propose continuing to use framework_extension_point_duration_seconds for the total extension point latency and plugin_execution_duration_seconds for the per-plugin latency (and not rely on sum of plugin_execution_duration_seconds values for per-extension point latency due to unreliability from sampling).
/sig scheduling
/cc @ahg-g

/area clusterloader
/area perf-dash

/remove-lifecycle stale

/remove-lifecycle stale


Slow initial loading at first session from server starts

Expected Behavior
Initial loading should be fast (e.g., < 1 sec).
Actual Behavior
It takes about 7 seconds at first session from server starts and 2 seconds for later sessions.

Steps to Reproduce the Problem

Deploy hiromuhota/webspoon:<IP_ADDRESS>
Access htttp://ip-address:8080/spoon/spoon
Measure time until File menu becomes clickable

Specifications
Server

HW: 2.2 GHz Intel Core i7, 16 GB
OS: Mac OS X 10.12.6
Docker: 17.12.0-ce
webSpoon: <IP_ADDRESS>-full

Client

OS: selenium/standalone-chrome:3.10.0-argon
Browser: Google Chrome 64.0.3282.186

f5d1c0a792739bd68f26014b5057ab3c2ec05515 reduced the initial loading time down to 5.6 seconds.

d6307593 reduced the initial loading time of 2nd or later session.


node js

how to install node js???

I have solved this and also added the documentation, now it's pending a pull request.
You can use this: https://github.com/asifulmamun/contribution-laravel-sail-nginx-php-fpm

Spin up another docker container or run node on your local machine or modify the PHP-fpm Dockerfile to install node.


Calculate a unique identifier for every function

I performed some tests and it turns out that nasm's lexer is incapable of dealing with polish signs (hence some workarounds).

Global variables have just been merged to master, and that PR introduced label 'globals'. Please merge master into your branch and make sure that label won't conflict with e.g. function called 'globals'.

The identifiers for functions are now prefixed with fun, so it is impossible to end up with a globals identifier. I also added a couple of tests for that if we ever change the logic (or constants) behind unique identifiers.
I think that the translation of główna into main identifier is beyond the scope of this issue. I believe we will address this during the next class.


Title not coming during create Contact

Hi
Got this issue suddenly (earlier it was working fine without any changes).
While creating new Contact, title/full name is not reflected.
Any idea how to solve this?
Thanks

Sorted, someone has already patched from Dec 2 pull request.

Change create method in ContactFactory.php
$title = $doc->createElement('gd:name');
$title->setAttribute('fullName', $name);
$entry->appendChild($title);


Help adjusting network visualisation

Hi,
Thanks for this brilliant tool for Single cell analysis. I'm trying to generate a delta network that contains a lot of edges/nodes and I'm finding that because the network is so dense it's difficult to read the text or discern the significant edges in red or blue (see example below). Is there a way to generate the plots so specific elements appear above others? Like the text annotations and significant edges? Is it possible to hide edges/nodes if they're not significant?

Thanks again!

Has been addressed through emails.


Can the chef-apply retrieves own node object from a chef-server ?

Hi, I'd like to use node object which saved on the chef-server by the chef-apply.
I know,  download an object by knife download before running the chef-apply will resolve this issue. But, I hope to using client.rb to retrieve own node object from server by the chef-apply.

i'm pretty :-1: on turning chef-apply into chef-client.
this sounds like what you want to do is run chef-client with an override run list and to shortcut cookbook synchronization and pick up a cookbook out of a local directory.
and the next path down this road that i can see is going to be adding data bags and search and other client features to chef-apply, and that is just not what chef-apply is for, and chef-client already does all that correctly...

Also :-1: for the same reasons as @lamont-granquist

I just need node object.
I know that it's too much bother to do use all resources by chef-apply.
When we need data_bags, existing recipes and other several resources , everyone use chef-client obviously.

@lamont-granquist @coderanger
For example, there is node which was bootstraped with mynode. But it has another real hostname such as myhost.local.
When I'd like to run simple batch by chef-apply for such as test, check on node.
In this case chef-apply uses myhost.local instead of mynode because chef-apply doesn't load any configuration.
I know how to resolve this difference as below.

chef-shell -z -S SERVER_URL
put  via > node.to_json to node.json
chef-apply -j  node.json

or

echo '{ "name" : "mynode"}' > node.json
chef-apply -j  node.json

My purpose is to be omit this operations.

@sawanoboly The point is that you shouldn't use chef-apply for this at all. You probably want to use chef-client with an override run list.

I see. That's reasonable. Thanks.


Console log params

This PR adds string substitutions https://developer.mozilla.org/en-US/docs/Web/API/console#using_string_substitutions to the console.log polyfill, with the use of the fmt library: https://github.com/fmtlib/fmt. For now, the %o substitution (Objects) just prints [object Object], but this capability can be added later if needed.

sprintf_s is windows specific but snprintf is not https://cplusplus.com/reference/cstdio/snprintf/

This new algorithm is probably much slower than the original stringstream method. Is there a better way to handle this instead of using string replacement/concatenation which will result in multiple string allocations?

@bghgary At first I thought about just using the sprintf/snprintf/etc method, but that fails for some cases where console.log doesn't. For example, console.log("%s", 1) fails for sprintf, but works on JS. Because of this I'm checking each match individually to convert to a type that won't fail in the sprintf. Maybe we could first check if the console string doesn't have any substitutions on its first argument, and if so, fall back to the previous faster method?

This new algorithm is probably much slower than the original stringstream method. Is there a better way to handle this instead of using string replacement/concatenation which will result in multiple string allocations?

@bghgary At first I thought about just using the sprintf/snprintf/etc method, but that fails for some cases where console.log doesn't. For example, console.log("%s", 1) fails for sprintf, but works on JS. Because of this I'm checking each match individually to convert to a type that won't fail in the sprintf. Maybe we could first check if the console string doesn't have any substitutions on its first argument, and if so, fall back to the previous faster method?

I don't know what is meant by sprintf method. If this means passing the user input directly into sprintf, this is really bad in terms of security unless we do a lot of checking of the format string which probably negates the benefits of using it. Let's find some time to discuss offline with @CedricGuillemet.

I tried updating the algorithm to avoid using that vector and doing less allocations. I still had to create a string, but if there's a way to not do it then I'll change it 🙂


Request for procedures

Description
A shaping applies rules 'at compile time' whereas a procedure would apply the rules 'at runtime'.
Example
Disclaimer: This example assumes the usage of the 'all' strategy as described in #11, because I could not come up with a different example.
eq_f :: eq(bool(true), bool(false)) = bool(false)
eq_t :: eq(bool(A), bool(A)) = bool(true)

basic_comm :: B(X, Y) = B(Y, X)

# eq_resolve :: eq(bool(A), bool(B)) {
#     eq_t | all
#     eq_f | all
#     basic_comm | all
#     eq_f | all
# }
#
# result: eq(bool(A), bool(B))

proc eq_resolve :: eq(bool(A), bool(B)) {
    eq_t | all
    eq_f | all
    basic_comm | all
    eq_f | all
}

eq(bool(false), bool(true)) {
    eq_resolve | all
}

# expected result: bool(false)

I like the idea of reusable sequence of rule transformations. Not sure if I like it in a form you suggested, but I'll think about how I want to go about it. Thanks!


Type guard is broken if the block contains assignment to the guarded variable

Expected behavior
This function should compile succesfully
function testFunction(a: string | Object) {
  if (typeof a === "string") {
    if (a.indexOf(".") >= 0)
      a = a.substr(a.indexOf(".") + 1);
    ...
  }
}

Actual behavior
The function gives error about indexOf does not exist on type string | Object. If I omit the assignment to a then it works fine. I think the compiler should notice that I'm safely assigning another string to the string type-guarded variable. However, I understand that this behavior would be expected if I assigned a value which is not guaranteed to be a string.
TypeScript environment
Visual Studio 2015
TypeScript 1.8.4

This is being addressed by #8010 and has been filed a bunch of times already

Thank you, sorry for the duplicate. I wasn't searching for the correct keywords.


plugin: fix entity position/rotation

Oops, I thought I looked at this before the initial 6.3 release but apparently not.


Torch vs Tensorflow AGNP is different

I've been converting my code from tensorflow to pytorch and it's much easier to get it training faster. However, the performance after n epochs is worse in torch. After lots of digging, it seems like the model architectures come out different for AGNP? But it doesn't seem to be an issue for a GNP:
import neuralprocesses.torch as nps_torch
import neuralprocesses.tensorflow as nps_tf
import numpy as np

# Some helper functions
def check_length(list1, list2):
    # Check if the lists are the same length
    return len(list1) == len(list2)

def check_shapes(list1, list2):
    # Check if the shapes of the items are the same
    for item1, item2 in zip(list1, list2):
        # Try to transpose the items if they are not the same shape
        if item1.shape != item2.shape:
            item2 = np.transpose(item2)
            if item1.shape != item2.shape:
                return False
    return True

# %%
# Construct GNP models
model_tf = nps_tf.construct_gnp(
    dim_x=17,
    dim_y=9,
    dim_embedding=128,
    num_enc_layers=6,
    num_dec_layers=6,
    )

# Construct the model
model_torch = nps_torch.construct_gnp(
    dim_x=17,
    dim_y=9,
    dim_embedding=128,
    num_enc_layers=6,
    num_dec_layers=6,
    )

tf_weights = model_tf.get_weights()
shapes_tf = [layer.shape for layer in tf_weights]
torch_weights = [param.data.numpy() for param in model_torch.parameters()]
shapes_torch= [layer.shape for layer in torch_weights]

# %%
# Check GNP models
print("\nGNP models:")
if check_length(tf_weights,torch_weights):
    print("Both models have the same number of layers")
else:
    print("Both models do not have the same number of layers")
if check_shapes(tf_weights,torch_weights):
    print("The shapes of all the layers are the same")
else:
    print("The shapes of the layers are not all the same")

# %%
# Construct AGNP models
model_tf = nps_tf.construct_agnp(
    dim_x=17,
    dim_y=9,
    dim_embedding=128,
    num_enc_layers=6,
    num_dec_layers=6,
    )

# Construct the model
model_torch = nps_torch.construct_agnp(
    dim_x=17,
    dim_y=9,
    dim_embedding=128,
    num_enc_layers=6,
    num_dec_layers=6,
    )

tf_weights = model_tf.get_weights()
shapes_tf = [layer.shape for layer in tf_weights]
torch_weights = [param.data.numpy() for param in model_torch.parameters()]
shapes_torch= [layer.shape for layer in torch_weights]

# %%
# Check AGNP models
print("\nAGNP models:")
if check_length(tf_weights,torch_weights):
    print("Both models have the same number of layers")
else:
    print("Both models do not have the same number of layers")
if check_shapes(tf_weights,torch_weights):
    print("The shapes of all the layers are the same")
else:
    print("The shapes of the layers are not all the same")

Hey @DrJonnyT!
Hmmm, this is curious. I think you might be onto something here. I can tell that the difference in the encoder.
Will investigate and get back to you!

The discrepancy indeed is in the Attention module. That's concerning.

@DrJonnyT, actually, I'm thinking that things might be fine after all. Could you try running the following and seeing if you get OK too?
import neuralprocesses.torch as nps_torch
import neuralprocesses.tensorflow as nps_tf
import lab as B
import numpy as np
import tensorflow as tf
import torch

model_tf = nps_tf.construct_gnp(
    dim_x=17,
    dim_y=9,
    dim_embedding=128,
    num_enc_layers=6,
    num_dec_layers=6,
)

model_torch = nps_torch.construct_gnp(
    dim_x=17,
    dim_y=9,
    dim_embedding=128,
    num_enc_layers=6,
    num_dec_layers=6,
)

model_torch(
    B.randn(torch.float32, 16, 17, 10),
    B.randn(torch.float32, 16, 9, 10),
    B.randn(torch.float32, 16, 17, 10),
)

model_tf(
    B.randn(tf.float32, 16, 17, 10),
    B.randn(tf.float32, 16, 9, 10),
    B.randn(tf.float32, 16, 17, 10),
)

assert len(model_tf.get_weights()) == len(list(model_torch.parameters()))
for x, y in zip(model_tf.get_weights(), model_torch.parameters()):
    assert x.shape == y.shape or x.shape == (y.shape[1], y.shape[0])
print("Ok!")

Actually, @DrJonnyT, I'm thinking that things might be fine after all. Could you try running the following and seeing if you find that things are equal too?
import neuralprocesses.torch as nps_torch
import neuralprocesses.tensorflow as nps_tf
import lab as B
import numpy as np
import tensorflow as tf
import torch

model_tf = nps_tf.construct_gnp(
    dim_x=17,
    dim_y=9,
    dim_embedding=128,
    num_enc_layers=6,
    num_dec_layers=6,
)

model_torch = nps_torch.construct_gnp(
    dim_x=17,
    dim_y=9,
    dim_embedding=128,
    num_enc_layers=6,
    num_dec_layers=6,
)

model_torch(
    B.randn(torch.float32, 16, 17, 10),
    B.randn(torch.float32, 16, 9, 10),
    B.randn(torch.float32, 16, 17, 10),
)

model_tf(
    B.randn(tf.float32, 16, 17, 10),
    B.randn(tf.float32, 16, 9, 10),
    B.randn(tf.float32, 16, 17, 10),
)

assert len(model_tf.get_weights()) == len(list(model_torch.parameters()))
for x, y in zip(model_tf.get_weights(), model_torch.parameters()):
    assert x.shape == y.shape or x.shape == (y.shape[1], y.shape[0])
print("Ok!")

model_tf = nps_tf.construct_agnp(
    dim_x=17,
    dim_y=9,
    dim_embedding=128,
    num_enc_layers=6,
    num_dec_layers=6,
)

model_torch = nps_torch.construct_agnp(
    dim_x=17,
    dim_y=9,
    dim_embedding=128,
    num_enc_layers=6,
    num_dec_layers=6,
)

model_torch(
    B.randn(torch.float32, 16, 17, 10),
    B.randn(torch.float32, 16, 9, 10),
    B.randn(torch.float32, 16, 17, 10),
)

model_tf(
    B.randn(tf.float32, 16, 17, 10),
    B.randn(tf.float32, 16, 9, 10),
    B.randn(tf.float32, 16, 17, 10),
)

assert len(model_tf.get_weights()) == len(list(model_torch.parameters()))
for x, y in zip(model_tf.get_weights(), model_torch.parameters()):
    assert x.shape == y.shape or x.shape == (y.shape[1], y.shape[0])
print("Ok!")

However, the performance after n epochs is worse in torch.

Hmm, the performance may be sensitive to initialisation, which could be different between PyTorch and TF and the precise optimiser settings (how do learning rate and batch size interact?). Are you sure that those are equal?

@wesselb that script gives me OK for both gnp and agnp, so all good there
I've just been testing with this script below. Very variable results, with convgnp the performance is often comparable, but with gnp and agnp tensorflow always seems to win. However it also depends on your choice of optimizer exactly how fast they learn
import tensorflow as tf
import numpy as np

import neuralprocesses.torch as nps_torch
import neuralprocesses.tensorflow as nps_tf

def x_to_y(x):
    # Dummy function to make learnable y data from random x data
    shape = x.shape
    y = torch.randn(shape[0],2,shape[2])
    y[:, 0, :] *= 2
    y[:, 1, :] *= 3
    y = y + torch.randn_like(y)*0.1
    return y

# %%
num_batches = 32
xc_list_torch, yc_list_torch, xt_list_torch, yt_list_torch = [],[],[],[]

for batch in range(num_batches):
    xc = torch.randn(16, 1, 10)
    xt = torch.randn(16, 1, 15)
    xc_list_torch.append(xc)  # Context inputs
    xt_list_torch.append(xt)  # Target inputs
    yc_list_torch.append(x_to_y(xc))  # Context outputs
    yt_list_torch.append(x_to_y(xt))  # Target output

# Construct models
agnp_torch = nps_torch.construct_gnp(dim_x=1, dim_y=2, likelihood="het")
agnp_tf = nps_tf.construct_gnp(dim_x=1, dim_y=2, likelihood="het")

# Construct optimisers with low learning rate as the data are simple to learn
# I have tuned the learning rate so it doesn't plateau with Adam after 5 epochs
opt_torch = torch.optim.Adam(agnp_torch.parameters(), 5e-6)
opt_tf = tf.keras.optimizers.legacy.Adam(learning_rate=5e-6)

num_epochs = 5

# %%
# Training loop of 5 actual epochs, with one warmup epoch at the start to test
# the losses of the untrained models to check they are similar from the inital weights

epochs_loss_torch = []
epochs_loss_tf = []
for epoch in range(num_epochs+1):
    this_epoch_loss_torch = []
    this_epoch_loss_tf = []

    for batch in range(num_batches):

        # Torch version
        xc_torch = xc_list_torch[batch]
        yc_torch = yc_list_torch[batch]
        xt_torch = xt_list_torch[batch]
        yt_torch = yt_list_torch[batch]

        if epoch > 0:
            loss_torch = -torch.mean(nps_torch.loglik(agnp_torch, xc_torch, yc_torch, xt_torch, yt_torch, normalise=True))
            opt_torch.zero_grad(set_to_none=True)
            loss_torch.backward()
            opt_torch.step()
        this_epoch_loss_torch.append(loss_torch.detach().numpy())

        # Tensorflow version with the same data
        xc_tf = tf.convert_to_tensor(xc_torch.numpy())
        yc_tf = tf.convert_to_tensor(yc_torch.numpy())
        xt_tf = tf.convert_to_tensor(xt_torch.numpy())
        yt_tf = tf.convert_to_tensor(yt_torch.numpy())

        with tf.GradientTape() as tape:
            # Compute the loss
            loss_tf = -tf.reduce_mean(nps_tf.loglik(agnp_tf, xc_tf, yc_tf, xt_tf, yt_tf, normalise=True))
        if epoch > 0:
            gradients = tape.gradient(loss_tf, agnp_tf.trainable_variables)
            opt_tf.apply_gradients(zip(gradients, agnp_tf.trainable_variables))

        this_epoch_loss_tf.append(loss_tf.numpy())

    # Collate the losses per epoch
    epochs_loss_torch.append(np.mean(this_epoch_loss_torch).round(3))
    epochs_loss_tf.append(np.mean(this_epoch_loss_tf).round(3))

print(f"Torch losses:\n{epochs_loss_torch}")
print(f"TF losses:\n{epochs_loss_tf}")

@wesselb here's a messy chatgpt script to make 2 identical relu networks, just using pytorch and tensorflow. It seems to train much quicker in tensorflow so I think it's probably just a tensorflow vs torch thing rather than an issues with neuralprocesses? I would have thought that would be more well known though?
import torch
import torch.nn as nn
import torch.optim as optim
import numpy as np
import tensorflow as tf
from tensorflow.keras import layers

# Define the model
class Net(nn.Module):
    def __init__(self):
        super(Net, self).__init__()
        self.fc1 = nn.Linear(10, 10)
        self.fc2 = nn.Linear(10, 10)
        self.fc3 = nn.Linear(10, 10)
        self.fc4 = nn.Linear(10, 1)

    def forward(self, x):
        x = torch.relu(self.fc1(x))
        x = torch.relu(self.fc2(x))
        x = torch.relu(self.fc3(x))
        x = self.fc4(x)
        return x

# Create the model
model = Net()

# Create some data
x = torch.randn(100, 10) + 1
y = torch.mean(x.pow(2) + 10 + torch.randn(100, 10) * 0.1,axis=1)

# Define loss and optimizer
criterion = nn.MSELoss()
optimizer = optim.Adam(model.parameters(), lr=1e-2)

# Training loop
num_epochs = 5
torch_losses = []
for epoch in range(num_epochs):
    optimizer.zero_grad()
    outputs = model(x)
    loss = criterion(outputs.squeeze(), y)
    loss.backward()
    optimizer.step()
    torch_losses.append(loss.detach().numpy().round(3))

# Tensorflow starts here

# Define the model
model = tf.keras.Sequential([
    layers.Dense(10, activation='relu', input_shape=(10,)),
    layers.Dense(10, activation='relu'),
    layers.Dense(10, activation='relu'),
    layers.Dense(1)
])

# Create some data using the same data from PyTorch
# Convert PyTorch tensor to NumPy array
x_np = x.detach().numpy()
y_np = y.detach().numpy()
x = tf.convert_to_tensor(x_np, dtype=tf.float32)
y = tf.convert_to_tensor(y_np, dtype=tf.float32)

# Compile the model
opt = tf.keras.optimizers.legacy.Adam(learning_rate=1e-2)
model.compile(optimizer=opt, loss='mse')

# Training loop
history = model.fit(x, y, epochs=num_epochs,verbose=0)

print(f"Torch losses:\n{torch_losses}")
print(f"TF losses:\n{history.history['loss']}")

@DrJonnyT Your ReLU example is a good one. I would chase that down. It should be possible to configure things so that the convergence is exactly the same between TF and PyTorch.
Do PyTorch and TF initialise the weights in the same way? That could make a big difference.

This gets you pretty close! I get these losses for 5 epochs (the first data point is testing the untrained model).
Torch losses:
[5.579, 5.314, 4.832, 4.471, 4.173, 3.899]
TF losses:
[5.593, 5.328, 4.847, 4.49, 4.204, 3.96]

I suspect/hope that if you set the random seed the same it would come out exactly the same. I tried the optimizer in this configuration with some very basic tf/torch models and the loss was exactly the same. So I'm happy to close. Phew!
Script here:
import tensorflow as tf
import torch
import numpy as np

import neuralprocesses.torch as nps_torch
import neuralprocesses.tensorflow as nps_tf

def x_to_y(x):
    """Dummy function to make learnable y data from random x data"""
    shape = x.shape
    y = torch.randn(shape[0],2,shape[2])
    y[:, 0, :] *= 2
    y[:, 1, :] *= 3
    y = y + torch.randn_like(y)*0.1
    return y

def copy_weights_and_biases(model_torch, model_tf):
    """Copy weights from torch model to tf model"""
    weights_tf = model_tf.get_weights()
    weights_torch = [param.detach().numpy() for param in model_torch.parameters()]

    for i in range(len(weights_tf)):
        if weights_tf[i].shape == weights_torch[i].shape:
            weights_tf[i] = weights_torch[i]
        elif weights_tf[i].shape == (weights_torch[i].shape[1], weights_torch[i].shape[0]):
            weights_tf[i] = weights_torch[i].T

    model_tf.set_weights(weights_tf)
    print("Weights and biases copied successfully from PyTorch model to TensorFlow model")

def compare_models(model_torch, model_tf):
    """Check that the weights and biases in a tf and torch model are all the same"""

    # Convert PyTorch model to state_dict (dictionary object)
    pytorch_state_dict = model_torch.state_dict()

    # Get TensorFlow model variables
    tensorflow_variables = model_tf.trainable_variables

    # Check if the number of layers are the same
    if len(pytorch_state_dict) != len(tensorflow_variables):
        print("The models have a different number of layers.")
        return False

    # Iterate over PyTorch model parameters
    for item, ((name, param), tf_var) in enumerate(zip(pytorch_state_dict.items(), tensorflow_variables)):
        # Convert PyTorch tensor to numpy array
        pytorch_param = param.detach().numpy()

        # Get corresponding TensorFlow variable
        tensorflow_param = tf_var.numpy()

        # Check if the shapes are the same
        if pytorch_param.shape != tensorflow_param.shape:
            pytorch_param = pytorch_param.transpose()
        if pytorch_param.shape != tensorflow_param.shape:
            print(f'Difference found in layer: {name}. Different shapes.')
            return False

        # Check if the weights are the same
        if not np.allclose(pytorch_param, tensorflow_param, atol=1e-6):
            print(f'Difference found in layer: {name}. Weights are not the same.')
            return False

    print('All layers have the same shape and weights.')
    return True

# %%
# Make some data
num_batches = 8
xc_list_torch, yc_list_torch, xt_list_torch, yt_list_torch = [],[],[],[]

for batch in range(num_batches):
    xc = torch.randn(16, 1, 10)
    xt = torch.randn(16, 1, 15)
    xc_list_torch.append(xc)  # Context inputs
    xt_list_torch.append(xt)  # Target inputs
    yc_list_torch.append(x_to_y(xc))  # Context outputs
    yt_list_torch.append(x_to_y(xt))  # Target output

# Construct models
gnp_torch = nps_torch.construct_gnp(dim_x=1, dim_y=2, likelihood="het")
gnp_tf = nps_tf.construct_gnp(dim_x=1, dim_y=2, likelihood="het")

# SGD Optimizers that I have tested to be equivalent
opt_torch = torch.optim.SGD(gnp_torch.parameters(), lr=0.01, momentum=0, dampening=0, weight_decay=0, nesterov=False)
opt_tf = tf.keras.optimizers.SGD(learning_rate=0.01, momentum=0.0, nesterov=False)

# %%
# Copy weights and biases
copy_weights_and_biases(gnp_torch,gnp_tf)
assert compare_models(gnp_torch,gnp_tf)

# %%
# Training loop of 5 actual epochs, with one warmup epoch at the start to test
# the losses of the untrained models to check they are similar from the inital weights
num_epochs = 5
epochs_loss_torch = []
epochs_loss_tf = []
for epoch in range(num_epochs+1):
    this_epoch_loss_torch = []
    this_epoch_loss_tf = []

    for batch in range(num_batches):

        # Torch version
        xc_torch = xc_list_torch[batch]
        yc_torch = yc_list_torch[batch]
        xt_torch = xt_list_torch[batch]
        yt_torch = yt_list_torch[batch]

        loss_torch = -torch.mean(nps_torch.loglik(gnp_torch, xc_torch, yc_torch, xt_torch, yt_torch, normalise=True))
        if epoch > 0:
            opt_torch.zero_grad(set_to_none=True)
            loss_torch.backward()
            opt_torch.step()
        this_epoch_loss_torch.append(loss_torch.detach().numpy())

        # Tensorflow version with the same data
        xc_tf = tf.convert_to_tensor(xc_torch.numpy())
        yc_tf = tf.convert_to_tensor(yc_torch.numpy())
        xt_tf = tf.convert_to_tensor(xt_torch.numpy())
        yt_tf = tf.convert_to_tensor(yt_torch.numpy())

        with tf.GradientTape() as tape:
            # Compute the loss
            loss_tf = -tf.reduce_mean(nps_tf.loglik(gnp_tf, xc_tf, yc_tf, xt_tf, yt_tf, normalise=True))
        if epoch > 0:
            gradients = tape.gradient(loss_tf, gnp_tf.trainable_variables)
            opt_tf.apply_gradients(zip(gradients, gnp_tf.trainable_variables))

        this_epoch_loss_tf.append(loss_tf.numpy())

    # Collate the losses per epoch
    epochs_loss_torch.append(np.mean(this_epoch_loss_torch).round(3))
    epochs_loss_tf.append(np.mean(this_epoch_loss_tf).round(3))

print(f"Torch losses:\n{epochs_loss_torch}")
print(f"TF losses:\n{epochs_loss_tf}")

@DrJonnyT That's some impressive investigative work! :) Very nice!! Did you also check the attentive models? Perhaps its worthwhile to do that too?

@wesselb Here's a slightly updated version that works for gnp and agnp. I tried convgnp but the part where it checks if the weights are the same fails, but the training losses end up similar if you comment out the assert line.

@DrJonnyT That's amazing. This is a super good check. :)
I think the convolutional models do not line up exactly because TF adopts a channels-last convention whether PyTorch is channels-first, so you may need to reorder the convolutional weights to get equality.

@wesselb Cool, I've made a minor tweak to that gist and now it works for convgnp as well 👍

@DrJonnyT That's super good.
How would you like it if I were to link the gist from the documentation, because I think this is a super important check?
A more ambitious plan would be to turn it into a unit test for the library, but that might not be so simple

@wesselb Sounds good!

@DrJonnyT I've added a link to your Gist here. I think this issue can then finally be closed. Thanks again for your careful investigation!! :)


[REQ] Make app icon animal friendly

Dear Fritter team,
as free software enthusiast I am really glad that you created Fritter and put so much work in keeping it up to date.
There is one downside that comes to my mind every time I start the app. The app icon is showing a fried leg with the bone still sticking out. I am friend of the animals and it hurts to see the normalization of the cruel practice which is indicated by the icon.
To move away from animal cruelty pictures, one could for example take Fritter, the glacier (https://en.wikipedia.org/wiki/Fritter_Glacier) as new name patron and use a glacier icon :-). What do you think? Would a icon suggestion be welcomed?

I doubt many would share your opinion. But you can always change the app icon in your home screen to anything. I use Twitter icon for Fritter so it is easier to remember.
Technically, fritters can be vegetables. Vegetable tempura is a type of fritter. So that's an option.
However for Fritter icon itself, the chicken leg is more recognizable and relatable. Vegetable fritters are harder to recognize as an icon. And for Fritter Glacier, most people would not know how Fritter relates to a mountain as an icon.

I doubt many would share your opinion. But you can always change the app icon in your home screen to anything. I use Twitter icon for Fritter so it is easier to remember.
Technically, fritters can be vegetables. Vegetable tempura is a type of fritter. So that's an option.
However for Fritter icon itself, the chicken leg is more recognizable and relatable. Vegetable fritters are harder to recognize as an icon. And for Fritter Glacier, most people would not know how Fritter relates to a mountain as an icon.

Changing app icon is a part of custom launch screen. For example Samsung has no simple stock way to do this.
If an app wants to be taken seriously, joke icons should be avoided. They can be in the About screen but picturing a dead cooked bird when it is supposed to be a Twitter client can be indeed disturbing
Icon could change into a more abstract frying. Just crumbs and no bone

Thanks for your response.

But you can always change the app icon in your home screen to anything. I use Twitter icon for Fritter so it is easier to remember.

Thanks for the hint, but with my home screen this does not seem to be possible. Furthermore, the bird bone is also shown in the slash screen. Did the slash screen also change in your setup?

I doubt many would share your opinion.

In absolute numbers, there are indeed probably many people who share a similar opinion (e.g. all those who respect the life of animals in a way not to hurt them just for simple taste pleasure; in Germany alone over 1.000.000 individuals). I assume that changing the default icon is not a big deal compared to the suffering of those birds which are indicated in the current icon.

To add, the word "fritter" is very predisposed to English. If this is a word play on "free twitter", it is not an obvious one.
Propose to make the animal flesh more abstract, perhaps make it into anatomical wings, or reflect the "free" or libre nature of the app more graphically. Perhaps a flying bird, a dove set free?

The arguments that Fritter's icon associates the app with animal cruelty stand on very shaky legs (no pun intended) and come across as highly disingenuous, I'm sorry to say.
It would be like arguing that an app which uses skull-and-bones as a graphical resource somewhere (maybe a crash report screen), advocates or associates with murder and/or piracy.
I have nothing against a veggie fritter icon, however I concur it might be hard to make one that's instantly recognizable as such. Subsequently, and IMO, anybody suggesting one such icon to be used, should at least provide one.
If technically feasible and not too complicated, Fritter could offer an option to switch the icon (I think some apps allow that but I'm not 100% positive).
I also agree that the Fritter Glacier icon would be highly opaque. OTOH what's most important is for the icon to be recognizable in itself, rather than its association, and so the skill involved in making one might exceed the effect of an association.
Take Firefox, for instance: most folks assume the icon/art are of a flaming fox rather than the Red Panda (aka Firefox). While some might find this objectionable, what matters is that the user recognizes the icon as that of the browser Firefox and not mistake it for a different app.
At the end of the day, this issue made me realize that fritter's icon is actually not highly recognizable and could stand a redesign, but I do not have the skills to contribute a better one myself and I'm mostly okay with identifying the app by its name rather than icon.

It would be like arguing that an app which uses skull-and-bones as a graphical resource somewhere (maybe a crash report screen), advocates for or associates with murder and/or piracy.

That's such not an unreasonable thing to argue.

"skull and bones = advocating murder"
You must be trolling. The alternatives are even less desirable.

"skull and bones = advocating murder"

... or is associated with piracy. See the cassette and crossbones logo used by The Pirate Bay for an example.


RDK-30778 - Support similar easter eggs

https://jenkins.code.rdkcentral.com/job/github-triggered/5502/ started

https://jenkins.code.rdkcentral.com/job/build-component-rdk-next/24882/ started.

https://jenkins.cmf.code.rdkcentral.com/job/github-triggered/696/ started

https://jenkins.cmf.code.rdkcentral.com/job/build-component-rdk-next-platform/2787/ started.

build-rpi-mc-wpe-rdk-next Console Log uploaded to Gist URL: https://gist.github.com/9cd3a25571a16a279310604d33e4b4d8

build-rpi-hybrid-wpe-rdk-next Console Log uploaded to Gist URL: https://gist.github.com/c0dffe8e4e07a3b5253af8dc02406c40

https://jenkins.code.rdkcentral.com/job/github-triggered/5543/ started

https://jenkins.code.rdkcentral.com/job/build-component-rdk-next/24941/ started.

Smoke tests for ['build-rpi-hybrid-wpe-rdk-next'/'build-rpi-mc-wpe-rdk-next'] added.
https://jenkins.cmf.code.rdkcentral.com/job/test-components-flow/70742/

Smoke tests for ['build-rpi-hybrid-refapp-rdk-next'] added.
https://jenkins.cmf.code.rdkcentral.com/job/test-components-flow/70741/

Smoke tests for ['build-qemux86-hyb-rdk-next'/'build-qemux86-mc-rdk-next'] added.
https://jenkins.cmf.code.rdkcentral.com/job/test-components-flow/70740/

https://jenkins.code.rdkcentral.com/job/github-triggered/5723/ started

https://jenkins.code.rdkcentral.com/job/github-triggered/5723/ started

https://jenkins.code.rdkcentral.com/job/build-component-rdk-next/25385/ started.

https://jenkins.code.rdkcentral.com/job/build-component-rdk-next/25385/ started.

https://jenkins.cmf.code.rdkcentral.com/job/github-triggered/888/ started

https://jenkins.cmf.code.rdkcentral.com/job/github-triggered/888/ started

https://jenkins.cmf.code.rdkcentral.com/job/build-component-rdk-next-platform/3135/ started.

https://jenkins.cmf.code.rdkcentral.com/job/build-component-rdk-next-platform/3135/ started.

Smoke tests for ['build-qemux86-hyb-rdk-next'/'build-qemux86-mc-rdk-next'] added.
https://jenkins.cmf.code.rdkcentral.com/job/test-components-flow/71704/

Smoke tests for ['build-qemux86-hyb-rdk-next'/'build-qemux86-mc-rdk-next'] added.
https://jenkins.cmf.code.rdkcentral.com/job/test-components-flow/71704/

Smoke tests for ['build-rpi-hybrid-refapp-rdk-next'] added.
https://jenkins.cmf.code.rdkcentral.com/job/test-components-flow/71703/

Smoke tests for ['build-rpi-hybrid-refapp-rdk-next'] added.
https://jenkins.cmf.code.rdkcentral.com/job/test-components-flow/71703/

Smoke tests for ['build-rpi-hybrid-wpe-rdk-next'/'build-rpi-mc-wpe-rdk-next'] added.
https://jenkins.cmf.code.rdkcentral.com/job/test-components-flow/71705/

Smoke tests for ['build-rpi-hybrid-wpe-rdk-next'/'build-rpi-mc-wpe-rdk-next'] added.
https://jenkins.cmf.code.rdkcentral.com/job/test-components-flow/71705/

'['build-rpi-hybrid-wpe-rdk-next'/'build-rpi-hybrid-wpe-rdk-next']' Smoke test FAILURE, investigation pending.
Flash MC [SUCCESS]
Flash HYB [SUCCESS]
MC - Video Test [FAILURE]
Video HLS gst-launch [SUCCESS]
Video HLS rdkmediaplayer [SUCCESS]
Video Streaming using aamp-cli [SUCCESS]
Video local using gst-play-1.0 [SUCCESS]
Video Streaming using rmfApp [FAILURE]
RDKShell CI Tests [FAILURE]
checking thunder security
Thunder security is disabled
getClients : Failed - [clients:[residentapp],success:true]
getZOrder : Failed - [clients:[residentapp],success:true]
getClients : Failed - [clients:[testapp2,testapp1,testapp,residentapp],success:true]
getZOrder : Failed - [clients:[testapp2,testapp1,testapp,residentapp],success:true]
add key intercept test failed
add key listener test failed
getClientsAfterKill : Failed - [clients:[residentapp],success:true]
Number of success test - 33
Number of failed test - 7
Video Streaming using rmfApp [SUCCESS]
HYB - Video Test [FAILURE]
Video HLS gst-launch [SUCCESS]
Video HLS rdkmediaplayer [SUCCESS]
Video Streaming using aamp-cli [SUCCESS]
Video local using gst-play-1.0 [SUCCESS]
RDKShell CI Tests [FAILURE]
checking thunder security
Thunder security is disabled
getClients : Failed - [clients:[residentapp],success:true]
getZOrder : Failed - [clients:[residentapp],success:true]
getClients : Failed - [clients:[testapp2,testapp1,testapp,residentapp],success:true]
getZOrder : Failed - [clients:[testapp2,testapp1,testapp,residentapp],success:true]
add key intercept test failed
add key listener test failed
getClientsAfterKill : Failed - [clients:[residentapp],success:true]
Number of success test - 33
Number of failed test - 7
https://jenkins.cmf.code.rdkcentral.com/job/test-rdkv-raspberrypi-flow/21151/

'['build-rpi-hybrid-wpe-rdk-next'/'build-rpi-hybrid-wpe-rdk-next']' Smoke test FAILURE, investigation pending.
Flash MC [SUCCESS]
Flash HYB [SUCCESS]
MC - Video Test [FAILURE]
Video HLS gst-launch [SUCCESS]
Video HLS rdkmediaplayer [SUCCESS]
Video Streaming using aamp-cli [SUCCESS]
Video local using gst-play-1.0 [SUCCESS]
Video Streaming using rmfApp [FAILURE]
RDKShell CI Tests [FAILURE]
checking thunder security
Thunder security is disabled
getClients : Failed - [clients:[residentapp],success:true]
getZOrder : Failed - [clients:[residentapp],success:true]
getClients : Failed - [clients:[testapp2,testapp1,testapp,residentapp],success:true]
getZOrder : Failed - [clients:[testapp2,testapp1,testapp,residentapp],success:true]
add key intercept test failed
add key listener test failed
getClientsAfterKill : Failed - [clients:[residentapp],success:true]
Number of success test - 33
Number of failed test - 7
Video Streaming using rmfApp [SUCCESS]
HYB - Video Test [FAILURE]
Video HLS gst-launch [SUCCESS]
Video HLS rdkmediaplayer [SUCCESS]
Video Streaming using aamp-cli [SUCCESS]
Video local using gst-play-1.0 [SUCCESS]
RDKShell CI Tests [FAILURE]
checking thunder security
Thunder security is disabled
getClients : Failed - [clients:[residentapp],success:true]
getZOrder : Failed - [clients:[residentapp],success:true]
getClients : Failed - [clients:[testapp2,testapp1,testapp,residentapp],success:true]
getZOrder : Failed - [clients:[testapp2,testapp1,testapp,residentapp],success:true]
add key intercept test failed
add key listener test failed
getClientsAfterKill : Failed - [clients:[residentapp],success:true]
Number of success test - 33
Number of failed test - 7
https://jenkins.cmf.code.rdkcentral.com/job/test-rdkv-raspberrypi-flow/21151/

https://jenkins.code.rdkcentral.com/job/github-triggered/5744/ started

https://jenkins.code.rdkcentral.com/job/github-triggered/5744/ started

https://jenkins.cmf.code.rdkcentral.com/job/github-triggered/904/ started

https://jenkins.cmf.code.rdkcentral.com/job/github-triggered/904/ started

https://jenkins.code.rdkcentral.com/job/build-component-rdk-next/25408/ started.

https://jenkins.code.rdkcentral.com/job/build-component-rdk-next/25408/ started.

https://jenkins.cmf.code.rdkcentral.com/job/build-component-rdk-next-platform/3153/ started.

https://jenkins.cmf.code.rdkcentral.com/job/build-component-rdk-next-platform/3153/ started.

Smoke tests for ['build-qemux86-hyb-rdk-next'/'build-qemux86-mc-rdk-next'] added.
https://jenkins.cmf.code.rdkcentral.com/job/test-components-flow/71757/

Smoke tests for ['build-qemux86-hyb-rdk-next'/'build-qemux86-mc-rdk-next'] added.
https://jenkins.cmf.code.rdkcentral.com/job/test-components-flow/71757/

Smoke tests for ['build-rpi-hybrid-refapp-rdk-next'] added.
https://jenkins.cmf.code.rdkcentral.com/job/test-components-flow/71758/

Smoke tests for ['build-rpi-hybrid-refapp-rdk-next'] added.
https://jenkins.cmf.code.rdkcentral.com/job/test-components-flow/71758/

Smoke tests for ['build-rpi-hybrid-wpe-rdk-next'/'build-rpi-mc-wpe-rdk-next'] added.
https://jenkins.cmf.code.rdkcentral.com/job/test-components-flow/71759/

Smoke tests for ['build-rpi-hybrid-wpe-rdk-next'/'build-rpi-mc-wpe-rdk-next'] added.
https://jenkins.cmf.code.rdkcentral.com/job/test-components-flow/71759/

'['build-rpi-hybrid-wpe-rdk-next'/'build-rpi-hybrid-wpe-rdk-next']' Smoke test FAILURE, investigation pending.
Flash MC [SUCCESS]
Flash HYB [SUCCESS]
MC - Video Test [FAILURE]
Video HLS gst-launch [SUCCESS]
Video HLS rdkmediaplayer [SUCCESS]
Video Streaming using aamp-cli [SUCCESS]
Video local using gst-play-1.0 [SUCCESS]
Video Streaming using rmfApp [FAILURE]
RDKShell CI Tests [FAILURE]
checking thunder security
Thunder security is disabled
getClients : Failed - [clients:[residentapp],success:true]
getZOrder : Failed - [clients:[residentapp],success:true]
getClients : Failed - [clients:[testapp2,testapp1,testapp,residentapp],success:true]
getZOrder : Failed - [clients:[testapp2,testapp1,testapp,residentapp],success:true]
add key intercept test failed
add key listener test failed
getClientsAfterKill : Failed - [clients:[residentapp],success:true]
Number of success test - 33
Number of failed test - 7
Video Streaming using rmfApp [SUCCESS]
HYB - Video Test [FAILURE]
Video HLS gst-launch [SUCCESS]
Video HLS rdkmediaplayer [SUCCESS]
Video Streaming using aamp-cli [FAILURE]
Video local using gst-play-1.0 [SUCCESS]
RDKShell CI Tests [FAILURE]
checking thunder security
Thunder security is disabled
add key intercept test failed
add key listener test failed
getClientsAfterKill : Failed - [clients:[residentapp],success:true]
Number of success test - 37
Number of failed test - 3
Video Streaming using aamp-cli [SUCCESS]
https://jenkins.cmf.code.rdkcentral.com/job/test-rdkv-raspberrypi-flow/21169/

'['build-rpi-hybrid-wpe-rdk-next'/'build-rpi-hybrid-wpe-rdk-next']' Smoke test FAILURE, investigation pending.
Flash MC [SUCCESS]
Flash HYB [SUCCESS]
MC - Video Test [FAILURE]
Video HLS gst-launch [SUCCESS]
Video HLS rdkmediaplayer [SUCCESS]
Video Streaming using aamp-cli [SUCCESS]
Video local using gst-play-1.0 [SUCCESS]
Video Streaming using rmfApp [FAILURE]
RDKShell CI Tests [FAILURE]
checking thunder security
Thunder security is disabled
getClients : Failed - [clients:[residentapp],success:true]
getZOrder : Failed - [clients:[residentapp],success:true]
getClients : Failed - [clients:[testapp2,testapp1,testapp,residentapp],success:true]
getZOrder : Failed - [clients:[testapp2,testapp1,testapp,residentapp],success:true]
add key intercept test failed
add key listener test failed
getClientsAfterKill : Failed - [clients:[residentapp],success:true]
Number of success test - 33
Number of failed test - 7
Video Streaming using rmfApp [SUCCESS]
HYB - Video Test [FAILURE]
Video HLS gst-launch [SUCCESS]
Video HLS rdkmediaplayer [SUCCESS]
Video Streaming using aamp-cli [FAILURE]
Video local using gst-play-1.0 [SUCCESS]
RDKShell CI Tests [FAILURE]
checking thunder security
Thunder security is disabled
add key intercept test failed
add key listener test failed
getClientsAfterKill : Failed - [clients:[residentapp],success:true]
Number of success test - 37
Number of failed test - 3
Video Streaming using aamp-cli [SUCCESS]
https://jenkins.cmf.code.rdkcentral.com/job/test-rdkv-raspberrypi-flow/21169/


Optimization: CyclicFunctionRemover should remove maximal cycle

In CyclicFunctionRemover a random cycle is chosen and then eliminated. If a function appears in many cycles, this can lead to complicated generated code,like:
function cyc_cyc_cyc_cyc_error takes integer funcChoice, integer funcChoice_2, integer funcChoice_3, integer funcChoice_4, string msg, integer loglvl, string msg_2, player showTo, integer loglvl_2, string msg_3 returns nothing

It looks like this can be done better ;)

Maybe use binary search for the function choice for further optimization.

I don't get your suggestion. How does binary search help with finding a maximal cycle?
Do you want to help implementing this?

You got me wrong srry. For me it looks like sometimes a lot of functions get merged into one and afaik the right function is determinated by using simple if statments:
function cyclic(int func)
	if func == 1
		//func1
	else if func == 2
		//func2
    else if func == 3
		//func3
	else
		//func4

We could use binary search instead, just like for dynamic dispatch:
function cyclic(int func)
	if func <= 2
		if func == 1
			//func1
		else
			//func2
    else
		if func == 3
			//func3
		else
			//func4


There's an error ''Failed to run 'mvn' command'' when creating a JAVA function

Steps to reproduce
1.install .NET Core 2.0, Azure Function Core Tools, VS Code Debugger for Java, JDK 1.8+ and Maven 3.0+
2.Set Environment Variable
a) Check environment variable value:==> echo %JAVA_HOME% C:\Program Files\Java\jdk-9.0.4
b) Add JAVA_HOME to user variable with C:\Program Files\Java\jdk-9.0.4
c) Add the bin directory of apache-maven-3.5.2 to path environment variable(C:\Program   Files\Java\apache-maven-3.5.2\bin)
3.Restart testing machine.
4.Create New Java Project.
a) Click 'Create New project' and new one folder> Select Java
b) Click 'Yes' in the popped prompt to initialize the project
5.Click 'Create function app'>select the folder that created in Step1. Press Enter with all default settings.
6. Verify whether the function creates successfully.
Expected  behavior
The function creates successfully.
Actual behavior
There's an error 'Failed to run "mvn" command'.

More Info:
This issue also reproduces on Mac and Linux.

This is caused by the maven plugin not support jdk 9.0 now. Could you please check if the problem still occur if the jdk is set to ~1.8?

@jdneo if that's the case, please update the prerequisites section in the README with the supported jdk versions
https://github.com/Microsoft/vscode-azurefunctions#java

PR: https://github.com/Microsoft/vscode-azurefunctions/pull/290

Hello,
I have tried using JSDK1.8 today. We can create function successfully. Then F5 successfully for the first time. But there're 2 new issues. Please get details from below.
Issue1:
After F5 successfully for the first time, then F5 again.
Expect: F5 successfully;
Actual: No response.
Issue2:
After F5 successfully for the first time, deploy.
Expect: Deploy successfully;
Actual: Failed to deploy. You can see the screenshot below.

From the output, the failure happened when we are doing the clean lifecycle:

The function plugin will do nothing related with the clean lifecycle, so this is not a issue related with the function plugin.
The output says it is caused by some files cannot be deleted. In most cases, this is because the files are still be occupied by some process and not been released.

In the extension, when user hit F5, we're triggering the function cli command to start the function host. So please check:

Before doing a new 'F5', Is the previous function host stopped? (You can stop it by entering ctrl + C in the terminal panel)
If the host is stopped but the target folder still cannot be deleted (that is what clean lifecycle doing), I think that mightbe a problem related with the function-cli

Closing this as the original issue has been fixed by an update to the README
@v-flyuan please create separate issues for what you just reported and we can discuss potential improvements in each issue individually.


[Bug]: APIError: litellm.APIError: APIError: GroqException - You tried to pass a BaseModel class to chat.completions.create(); You must use beta.chat.completions.parse() instead during detecting Hallucination  using opik libaray

What component(s) are affected?

[X] Python SDK
[ ] Opik UI
[ ] Opik Server
[X] Documentation

Opik version

Opik version: 1.1.8

Describe the problem
Error Encountered :
APIError: litellm.APIError: APIError: GroqException - You tried to pass a BaseModel class to chat.completions.create(); You must use beta.chat.completions.parse() instead during detecting Hallucination  using opik libaray

06:41:19 - LiteLLM:WARNING: utils.py:290 - `litellm.set_verbose` is deprecated. Please set `os.environ['LITELLM_LOG'] = 'DEBUG'` for debug logs.
WARNING:LiteLLM:`litellm.set_verbose` is deprecated. Please set `os.environ['LITELLM_LOG'] = 'DEBUG'` for debug logs.

Request to litellm:
litellm.completion(model='groq/llama-3.1-70b-versatile', messages=[{'content': 'You are an expert judge tasked with evaluating the faithfulness of an AI-generated answer to the given context. Analyze the provided INPUT, CONTEXT, and OUTPUT to determine if the OUTPUT contains any hallucinations or unfaithful information.\n\nGuidelines:\n1. The OUTPUT must not introduce new information beyond what\'s provided in the CONTEXT.\n2. The OUTPUT must not contradict any information given in the CONTEXT.\n2. The OUTPUT should not contradict well-established facts or general knowledge.\n3. Ignore the INPUT when evaluating faithfulness; it\'s provided for context only.\n4. Consider partial hallucinations where some information is correct but other parts are not.\n5. Pay close attention to the subject of statements. Ensure that attributes, actions, or dates are correctly associated with the right entities (e.g., a person vs. a TV show they star in).\n6. Be vigilant for subtle misattributions or conflations of information, even if the date or other details are correct.\n7. Check that the OUTPUT doesn\'t oversimplify or generalize information in a way that changes its meaning or accuracy.\n\nAnalyze the text thoroughly and assign a hallucination score between 0 and 1, where:\n- 0.0: The OUTPUT is entirely faithful to the CONTEXT\n- 1.0: The OUTPUT is entirely unfaithful to the CONTEXT\n\n\n\nINPUT (for context only, not to be used for faithfulness evaluation):\nWhat is the capital of France?\n\nCONTEXT:\n[\'France is a country in Western Europe. Its capital is Paris, which is known for landmarks like the Eiffel Tower.\']\n\nOUTPUT:\nThe capital of France is Paris. It is famous for its iconic Eiffel Tower and rich cultural heritage.\n\nProvide your verdict in JSON format:\n{\n    "score": <your score between 0.0 and 1.0>,\n    "reason": [\n        <list your reasoning as bullet points>\n    ]\n}', 'role': 'user'}], response_format=<class 'opik.evaluation.metrics.llm_judges.hallucination.metric.HallucinationResponseFormat'>)

SYNC kwargs[caching]: False; litellm.cache: None; kwargs.get('cache')['no-cache']: False
Final returned optional params: {'response_format': <class 'opik.evaluation.metrics.llm_judges.hallucination.metric.HallucinationResponseFormat'>, 'extra_body': {}}

POST Request Sent from LiteLLM:
curl -X POST \
https://api.groq.com/openai/v1/ \
-d '{'model': 'llama-3.1-70b-versatile', 'messages': [{'content': 'You are an expert judge tasked with evaluating the faithfulness of an AI-generated answer to the given context. Analyze the provided INPUT, CONTEXT, and OUTPUT to determine if the OUTPUT contains any hallucinations or unfaithful information.\n\nGuidelines:\n1. The OUTPUT must not introduce new information beyond what\'s provided in the CONTEXT.\n2. The OUTPUT must not contradict any information given in the CONTEXT.\n2. The OUTPUT should not contradict well-established facts or general knowledge.\n3. Ignore the INPUT when evaluating faithfulness; it\'s provided for context only.\n4. Consider partial hallucinations where some information is correct but other parts are not.\n5. Pay close attention to the subject of statements. Ensure that attributes, actions, or dates are correctly associated with the right entities (e.g., a person vs. a TV show they star in).\n6. Be vigilant for subtle misattributions or conflations of information, even if the date or other details are correct.\n7. Check that the OUTPUT doesn\'t oversimplify or generalize information in a way that changes its meaning or accuracy.\n\nAnalyze the text thoroughly and assign a hallucination score between 0 and 1, where:\n- 0.0: The OUTPUT is entirely faithful to the CONTEXT\n- 1.0: The OUTPUT is entirely unfaithful to the CONTEXT\n\n\n\nINPUT (for context only, not to be used for faithfulness evaluation):\nWhat is the capital of France?\n\nCONTEXT:\n[\'France is a country in Western Europe. Its capital is Paris, which is known for landmarks like the Eiffel Tower.\']\n\nOUTPUT:\nThe capital of France is Paris. It is famous for its iconic Eiffel Tower and rich cultural heritage.\n\nProvide your verdict in JSON format:\n{\n    "score": <your score between 0.0 and 1.0>,\n    "reason": [\n        <list your reasoning as bullet points>\n    ]\n}', 'role': 'user'}], 'response_format': <class 'opik.evaluation.metrics.llm_judges.hallucination.metric.HallucinationResponseFormat'>, 'extra_body': {}}'

openai.py: Received openai error - You tried to pass a `BaseModel` class to `chat.completions.create()`; You must use `beta.chat.completions.parse()` instead

Give Feedback / Get Help: https://github.com/BerriAI/litellm/issues/new
LiteLLM.Info: If you need to debug this error, use `litellm.set_verbose=True'.

Provider List: https://docs.litellm.ai/docs/providers

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
[/usr/local/lib/python3.10/dist-packages/litellm/llms/OpenAI/openai.py](https://localhost:8080/#) in completion(self, model_response, timeout, optional_params, logging_obj, model, messages, print_verbose, api_key, api_base, acompletion, litellm_params, logger_fn, headers, custom_prompt_dict, client, organization, custom_llm_provider, drop_params)
    853                     else:
--> 854                         raise e
    855         except OpenAIError as e:

18 frames
TypeError: You tried to pass a `BaseModel` class to `chat.completions.create()`; You must use `beta.chat.completions.parse()` instead

During handling of the above exception, another exception occurred:

OpenAIError                               Traceback (most recent call last)
OpenAIError: You tried to pass a `BaseModel` class to `chat.completions.create()`; You must use `beta.chat.completions.parse()` instead

During handling of the above exception, another exception occurred:

APIError                                  Traceback (most recent call last)
[/usr/local/lib/python3.10/dist-packages/litellm/litellm_core_utils/exception_mapping_utils.py](https://localhost:8080/#) in exception_type(model, original_exception, custom_llm_provider, completion_kwargs, extra_kwargs)
    402                     else:
    403                         exception_mapping_worked = True
--> 404                         raise APIError(
    405                             status_code=original_exception.status_code,
    406                             message=f"APIError: {exception_provider} - {message}",

APIError: litellm.APIError: APIError: GroqException - You tried to pass a `BaseModel` class to `chat.completions.create()`; You must use `beta.chat.completions.parse()` instead

Reproduction steps
Code Implemented

from opik.evaluation.metrics import Hallucination
import litellm
litellm.set_verbose=True
metric = Hallucination(model='groq/llama-3.1-70b-versatile')

metric.score(
    input="What is the capital of France?",
    output="The capital of France is Paris. It is famous for its iconic Eiffel Tower and rich cultural heritage.",
    context=["France is a country in Western Europe. Its capital is Paris, which is known for landmarks like the Eiffel Tower."],
)

Hi @plaban1981! This bug is coming from the litellm package... I can see you've already opened a PR in their github (so as we :) ).
We are planning to make improvements on that front. If LiteLLM doesn't hanlde these issues, we'll probably make structured outputs optional(configurable on the user end) or keep our own list of providers that support them.

@plaban1981 the problem was solved after litellm fixed this bug on their side. Closing the issue.


Miss the "coco_flickr30k_googlecc_gqa_sbu_oi_x152c4big2exp168.yaml"???

Hi, thanks for your wonderful work and the open source. But how can we download the needed file "coco_flickr30k_googlecc_gqa_sbu_oi_x152c4big2exp168.yaml"??? It is needed for the pre-training process. Thanks.

https://biglmdiag.blob.core.windows.net/vinvl/pretrain_corpus/coco_flickr30k_googlecc_gqa_sbu_oi_x152c4big2exp168.yaml


[Identity] Default Azure Credential chain ordering and msal hotfix

Packages impacted by this PR
@azure/identity
Issues associated with this PR
@azure/identity
Describe the problem that is addressed by this PR

Bug fix from MSAL, upgrading versions of MSAL to fix this
Ordering of dev credentials changed, Azure Developer CLI Credential moved to the end

Checklists

[x] Added impacted package name to the issue description
[x] Added a changelog (if necessary)

/check-enforcer evaluate

API change check
API changes are not detected in this pull request.

\check-enforcer evaluate

/check-enforcer evaluate


Issue: ParseWithClaims() cannot unmarshal number into Go struct field Claims.sub of type  string

Issue: ParseWithClaims() cannot unmarshal number into Go struct field Claims.sub of type  string
I'm trying to parse claims ill show the code I'm attempting:
// ResponseEnum ...
type ResponseEnum int32

const (
	// RespSuccess - A Successful Response to auth.
	RespSuccess ResponseEnum = iota
	// RespErrCreds - A problem with the provided Credientials.
	RespErrCreds
	// RespErrUnAuthorised - A problem authorising the given Credentials.
	RespErrUnAuthorised
	// RespErrToken - A problem with the provided token.
	RespErrToken
	// RespErrBadRequest - The request was malformed.
	RespErrBadRequest
)

func (r ResponseEnum) String() string {
	return [...]string{"Success", "Error Credentials", "Error Unauthorised", "Error Failed Token", "Error failed auth request"}[r]
}

// Create the JWT key used to create the signature
var jwtKey = []byte("some sig") // actually a valid sig but edited here.

// Credentials ...
type Credentials struct {
	Token string `json:"token"`
}

// Claims ...
type Claims struct {
	User struct {
		ID       int    `json:"id"`
		UserType int    `json:"user_type"`
		Email    string `json:"email"`
	} `json:"user"`
	jwt.StandardClaims
}

// JWTAuth ...
type JWTAuth struct {
}

// Signin ...
func (JWTAuth) Signin(authStr *string) (ResponseEnum, *server.Account, error) {
	log.Println("Auth::Signin")
	claims := &Claims{}

	tkn, err := jwt.ParseWithClaims(*authStr, claims, func(token *jwt.Token) (interface{}, error) {
		return jwtKey, nil
	})
	log.Println("Auth::ParseWithClaims", tkn, err)

	log.Printf("Auth:: Token Valid: %+v", tkn.Valid)

	if err != nil {
		if err == jwt.ErrSignatureInvalid {
			log.Println(RespErrUnAuthorised.String())
		}
		log.Println(RespErrBadRequest.String())
		return RespErrBadRequest, nil, errors.New(RespErrBadRequest.String())
	}

	if !tkn.Valid {
		log.Println(RespErrUnAuthorised.String())
		return RespErrUnAuthorised, nil, errors.New(RespErrUnAuthorised.String())
	}
	// Auth success, this is the correct person.
	log.Println("Auth::Token Validated.")
	return RespSuccess, &server.Account{ID: claims.User.ID, Email: claims.User.Email, UserType: claims.User.UserType}, nil
}

The token has this in the payload
"user":{"id":1,"user_type":1,"email":"a valid email"}
the output to console is:
{{TOKEN STRING}} json: cannot unmarshal number into Go struct field Claims.sub of type
string
2021/01/19 18:07:33 Auth:: Token Valid: false
Im not sure the issue is with the implementation but I'm at an impasse on how to continue and I believe the reason its not valid is to do with that json unmarshal error.  Any ideas on how to fix this?

I also experienced something similiar with a token that was produced by the latest https://github.com/laravel/passport. For example "exp" had the value "1644948329.528239" which was a valid JSON number, but not float64 (or so I understood). So in the end I solved this with the code at the end of this issue.
What I did notice, is that when I was trying VerifyExpiresAt - https://github.com/dgrijalva/jwt-go/blob/master/map_claims.go#L23, the type was neither float64 nor json.Number, but instead string. I also created my own instance of the parser and defined "UseJSONNumber" to be true, but then my output was json.Number for those exps which were a valid float64 from before.
exp as valid float64 (or json.Number) -<PHONE_NUMBER>
exp as string -<PHONE_NUMBER>.528239

If I can provide more information then let me know please.
jwtParser := jwt.Parser{
     UseJSONNumber: true,
}

Before
// expire gets the expiration time for the token content
func expire(content string) (time.Time, error) {
	tkn, _ := jwt.Parse(content, func(token *jwt.Token) (interface{}, error) {
		// Ignore the secret key, which is the first return value of this function.
		// We are only interested in the expiry and not the validity of the token
		return nil, nil
	})

	claims, ok := tkn.Claims.(jwt.MapClaims)
	if !ok {
		return time.Time{}, errors.New("invalid claims type")
	}

	exp, ok := claims["exp"].(float64)
	if !ok {
		return time.Time{}, errors.Errorf(`invalid expiration type, expected float64 for "%v"`, exp)
	}
	return time.Unix(int64(exp), 0), nil
}

After
func expire(content string) (time.Time, error) {
	tkn, _ := jwt.Parse(content, func(token *jwt.Token) (interface{}, error) {
		// Ignore the secret key, which is the first return value of this function.
		// We are only interested in the expiry and not the validity of the token
		return nil, nil
	})

	claims, ok := tkn.Claims.(jwt.MapClaims)
	if !ok {
		return time.Time{}, errors.New("invalid claims type")
	}

	var expiry int64
	switch exp := claims["exp"].(type) {
	case float64:
		expiry = int64(exp)
	case string:
		v, err := strconv.ParseFloat(exp, 64)
		if err != nil {
			return time.Time{}, errors.Wrapf(err, `invalid expiration type, expected float64 for "%s"`, exp)
		}
		expiry = int64(v)
	default:
		return time.Time{}, errors.Errorf(`invalid expiration type, expected float64 or string for "%v"`, exp)
	}
	return time.Unix(expiry, 0), nil
}


 These aren't harmful, but eyre should certainly not be this shouty about it.
Luckily, new eyre is on its way, and will make it into the next release. Closing this as solved by that.


Will this work with my IoT toaster?

I need to automate my toaster to produce invisible toast, and nocode seems perfect for it. Any support for it?

Very good suggestion. No support as of now, but I'll get started on a PR. Now will that be white or whole wheat?

Yes


Segfault https://github.com/pcwalton/font-kit/blob/master/examples/list-fonts.rs

   Compiling font-kit v0.1.0 (/shareddata/share/Prog/Rust/font-kit)
    Finished dev [unoptimized + debuginfo] target(s) in 34.28s
     Running `target/debug/examples/list-fonts`
Loading fonts… 242 / 248 [====================================================================================>--] 97.58 % 142.13/s 0s zsh: segmentation fault (core dumped)  cargo run --example list-fonts

Cause by this line
Cell::new(&font.full_name()),

What OS?

Hi! Arch Linux x64 latest

I'm also running Arch x64, but can't reproduce this. Can you list your installed fonts?

Oh wow, this was a long time ago! I'm not sure if the bug is still present or not, but I will close this issue as it is really old and most likely fixed.

This is not fixed.
In my case it crashed with /usr/share/fonts/misc/decsess.pcf.gz
from xorg-fonts-misc on Arch.
#0  0x00007ffff7dbac95 in __strlen_avx2 () from /usr/lib/libc.so.6
#1  0x00005555555ff40a in std::ffi::c_str::CStr::from_ptr () at src/libstd/ffi/c_str.rs:963
#2  0x00005555555e7624 in font_kit::loaders::freetype::Font::family_name (self=0x7fffffffd260)
    at src/loaders/freetype.rs:350

(*self.freetype_face).family_name) is 0x0 so
 CStr::from_ptr((*self.freetype_face).family_name
is crashing.

@pcwalton please reopen if that's alright


AppStateObserver calling applicationState in background thread

Describe the bug
AppStateObserver calling code not on main thread. (See screenshot)
SDK Version
1.3.0
To Reproduce
Go to background to disconnect socket, or wait until socket disconnects from dapp
Expected behavior
The warning should not appear
Screenshots

Device (please complete the following information):

Device: Simulator
OS: iOS16.2

@DarthMike thanks for reporting this

hey @DarthMike the issue is fixed in 1.5.1


Electron 8 compitable for 'require' no found

Hi, RobinFr:
Great thanks for your boilerplate!
When i update the electron to 8.0.0, i found the render app will report error with "request not found" in webpack-dev-server\client. I google and found there should be a 'nodeIntegration' enabled at createWindow() function:
const createWindow = async () => {
....
win = new BrowserWindow({
width: 800, height: 600,
    // webpack-dev-server\client compatible with 'require'
    webPreferences: {
        nodeIntegration: true
  }
});

....
}
Best Regards.

Yes, if you want to use Electron 8, you will have to turn that on, also for testing. However, this template does not use Electron 8, as Spectron does not work that well with Electron 8. In fact, it does not work at all with nodeIntegration turned off, and you might not want to turn that on for security reasons.
Thank you for your comment tho, I appreciate you're using the template. I will close this issue tho as it does not apply to the current state of the template 😄


MYSQL

Hello
Today i have a great idea.... Ok i stop with this text :P
Do you can add a MySQL Support? Maybe with the rewrite for 1.13?
I don't find any issue about mysql. If i'm blind, so link me to an issue.

What would you use it for?

Maybe for required quests from another server.
Quests rows who is going around different servers
Questpoints who are on every server the same
It sound special and its special. I don‘t know if other people who has a network it needing too
Am 24.02.2018 um 23:37 schrieb FlyingPikachu <notifications<EMAIL_ADDRESS>What would you use it for?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/FlyingPikachu/Quests/issues/312#issuecomment-368265827, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AOpna7NuOHijzOfZsccIaSGN6pOHFfC9ks5tYI86gaJpZM4SRqLW.

I think that database support should be added that it transfer everything that is flat filed into the database. That way you can have the same quests cross servers and keep updating them. I feel like the reason for database has been increasing. Think about having a network with multiple servers that track the same goals. Cross-Server questing!

Please implement this ASAP, willing to pay for functionality.

Would love MySQL support especially since my rpg server will be running on shards.

A MySQL database Support would be realy usefull i would be glad to see it because i need it for a Server Network where we have a Towny World and a Farmworld and i need it to connect both for Quests

I am also looking for a Quest plugin with MySQL support. Please implement this feature! Would definitely pay for it or donate.

Looking for this too, pls update <3

Please add this!! its been 2 years since this request D:

MySQL support for player data has been implemented as of https://ci.codemc.io/job/PikaMug/job/Quests/166/
Backup your /Quests/data folder before use. Support for other types of data may be added at a later date. There is currently no way to convert existing YAML data to MySQL. Keep an eye on the Community Discord for updates.

@PikaMug
What exactly is possible with the mysql feature?
Possible to sync quests and playerdata between servers?
Is the sync fast enough to handle the server switch of the player? (is there a delay or something like that)
..

@Cerexus https://github.com/PikaMug/Quests/wiki/Expert-‐-Storage#mysql


Getting error on launching VSCode.

VSCode Version:
1.6
OS Version:
Windows 7

Steps to Reproduce:

Update VSCode.
Abort on error for opened application.
Now when you open VS Code, it gives error on opening.

Not able to upload error file screen shot so typing error main lines below:
Error:
Cannot find module 'C:\Program Files (x86)\Microsoft VS Code\resources\app\out\main'
at Module_resolveFileName(module.js455:15)

@mmmathur can you download VS Code 1.8 fresh and reinstall to see if that helps?


Feature request: display sleep/wake functions

I was trying to sleep/wake the device (to save the shiny parts) when not in use. My usual technique (on TFTs anyway) is to set display.brightness = 0 to turn off the backlight, but I discovered that the command told by the source (in circuitpython core) for this board for brightness is actually "contrast" according to the controller datasheet (oled -> no backlight), which explains why it got dimmer but did not turn off completely.
The standalone SH1107 driver has sleep() and wake() functions that use explicit sleep/wake commands: https://github.com/adafruit/Adafruit_CircuitPython_DisplayIO_SH1107/blob/main/adafruit_displayio_sh1107.py#L164  but this board's display support is built-in using C, and no such functions are there. I ended up just mangling a copy of that library to wrap an existing displayio display, which works, but is not awesome. (see https://gist.github.com/rpavlik/73d1de102038f85de051fc1b8cdd3009 )
Not sure if "sleep" and "wake" can be monkey-patched in from Python into the C displayio class, or if there's some other, better way to provide those functions, but I figured this would be the library to do them in.

I think it'd be fine if this library used send to implement this. I'm not sure we need it in the core.

That makes sense. I wasn't sure how best to implement it, which is why I filed an issue linking to my bodge, instead of submitting a pull request :)


How can I change the window color?

Hi,
How do I change color of the white window (not blue background)?
Thanks

@SzopeleQ
Go to ( frontend\dist\style.css ) and find class ( .card ) it should be in line 4213
When you change the color in ( background-color ) also make sure to modify text-color in ( body ) class to match the colors.
Sincerely.

@HaniALzubaidi will that be overwritten when the plugin is updated? If so, is there a way to prevent that from happening?


classify fix

use reshape over squeeze to that shape info is known

This fixes issue introduced by PR #19


Code lens run/debug test only works if the test is in the root folder of the test project

Environment data
dotnet --info output:
.NET Command Line Tools (1.0.0-preview1-002702)

Product Information:
 Version:     1.0.0-preview1-002702
 Commit Sha:  6cde21225e

Runtime Environment:
 OS Name:     Mac OS X
 OS Version:  10.11
 OS Platform: Darwin
 RID:         osx.10.11-x64

VS Code version:
Version 1.3.0-insider (1.3.0-insider) 93e65224d7598017bfa0b188a0d82b66a2ee9698
C# Extension version:
1.1.6
Steps to reproduce
Have a test project, with a test that isn't in the root of that project
Use the code lens run/debug test
Expected  behavior
Test either runs or debugs based on the choice
Actual behavior
The following exception is throw:
dotnet-test Error: 0 : System.InvalidOperationException: /Users/foo/code/foo.Tests/TestCaseFolder/project.json does not exist.
   at Microsoft.DotNet.Tools.Test.TestCommand.GetProjectPath(String projectPath)
   at Microsoft.DotNet.Tools.Test.TestCommand.DoRun(String[] args)

@troydai FYI

ah, yup. OmniSharp should move up the folder to find actual project root. It's a bug in OmniSharp-roslyn I will file an issue there to trace this problem.

I'll assign this to me and keep it open just in case if there is fix required on the C# extension side.

@eamodio thanks for filing this issue.

/cc @gregg-miskelly @DustinCampbell the issue on OmniSharp end is fixed in c27a0cbb6fdda17cf9c49acc56a724b120fd9528. Please integrate with latest OmniSharp,

@troydai -- let's get the last OmniSharp changes in and then we'll produce a new release that we can take into the extension.

@DustinCampbell yup

Assign to @DustinCampbell

This was fixed in 1.9.


CI Environment needs Cyclus and OpenMC

The CI testing environment needs to have Cyclus and OpenMC installed to ensure that all tests can be run.
Observations on why this doesn't exist right now:

Cyclus (installed from conda or source) needs python 3.6
OpenMC when installed from source requires at least python 3.7
OpenMC when installed from Mamba can use python 3.6, but if this is the case then it doesn't have the deplete method
When installing locally, these issues do not arise because when installing cyclus from source, it gets installed into ~/.local/ instead of in the conda environment. Therefore, cyclus can be installed in one conda environment (with python 3.6) then used in another one, independent of the python version.

Next steps:

Install Cyclus from source, then change the python version in the environment (previously tried but got an error that has since been fixed)

This issue is resolved by using a Docker image of Cyclus (cyclus/cycamore:latest)


exist autoclose option after of selected date?

Hello,
I've not found the option to autoclose the form after of selected date? Do it exist?
Thanks in advance :)

Hey, yes it does exist the option is
It's setted by default but just if you're selecting dates if in your format you have hours then it won't auto close, so for do it just set the format without hours like i.e
format: 'YYYY-MM-DD' ; In that way the picker will close automatically
format: 'YYYY-MM-DD hh:mm a', ; In this way the picker won't close automatically


Rancher Agent doesn't work with CentOS/RHEL 6

v0.25.0-rc1
Docker 1.6.2
CentOS/RHEL 6
Fresh install, rancher agent doesn't start.
There are no logs from the rancher agent containers.

+1

With Docker 1.8, Docker only supports CentOS 7 so Rancher will not be supporting CentOS 6.
https://docs.docker.com/installation/centos/
https://github.com/docker/docker/issues/14365


Provide version for contract backwards compatibilty

For post V1.0 versions we would need some way to track the wasmvm version the contract was deployed to.
Link: https://github.com/CosmWasm/wasmd/issues/547

I agree with the need for backwards compatibility.
I am a bit confused by your framing. Can you please clarify? (Also commented on the linked issue)

As discussed in a call, we can assume that all contracts will use the same interface version from 1.0 on. What we expose in addition is the required features of a contract. This allows chains to add functionality via features that are explicitly requested by the contract.


Method to trigger a lazysizes initiation?

Hi
Is there a method to load a lazysizes classed image on demand -- a way to load directly rather than onenterviewport or otherwise?

You have two possibilities:

Add the class lazypreload to the image. (i.e.: img.classList.add('lazypreload');).
Call the lazySizes.loader.unveil method: (i.e.: lazySizes.loader.unveil(DOMNode);).

The 1. option is recommended.

Yes and no.
I've set:
window.lazySizesConfig.loadMode = 0;
Basically, I have a lot of elements absolutely positioned to the top of a page and they fade in and out as the user scrolls. So I want to control the lazy load to coincide with fade in of an image.
It seems that the images are still all loading by default, however, because they're absolutely positioned to the top.
Is there a best practice you recommend here?

I will add that setting
window.lazySizesConfig.loadMode = 0;
Seems to still lazyload all images.

window.lazySizesConfig.loadMode is only for the time before the onload.
If you don't want to load any image, simply remove the class lazyload and as soon as it should be transformed add the class lazyload and lazypreload or invoke the lazySizes.loader.unveil(DOMNode); on the element.

I don't think this will work.  I want them to not load at all.

So I ended up modifying your library, which applies the class lazyloaded at the right time.
However, all images are loaded immediately on page load.
The images are added in React.js. So I init once the components mount and set init to false before the library loads.
Here is my mod if your library:
isNestedVisible is now like this:
var isNestedVisible = function(elem, elemExpand){
			var outerRect;
			var parent = elem;
			var visible = $(elem).parents('.item').css('visibility') != 'hidden';

CheckElements is now like this -- with the && on isNestedVisible:
if ((eLbottom = rect.bottom) >= elemNegativeExpand &&
						(eLtop = rect.top) <= elvH &&
						(eLright = rect.right) >= elemNegativeExpand * hFac &&
						(eLleft = rect.left) <= eLvW &&
						(eLbottom || eLright || eLleft || eLtop) &&
						((isCompleted && isLoading < 3 && !elemExpandVal && (loadMode < 3 || lowRuns < 4))) && isNestedVisible(lazyloadElems[i], elemExpand)){
							console.log('load')
						unveilElement(lazyloadElems[i]);
						loadedSomething = true;
						if(isLoading > 9){break;}
					} else if(!loadedSomething && isCompleted && !autoLoadElem &&
						isLoading < 4 && lowRuns < 4 && loadMode > 2 &&
						(preloadElems[0] || lazySizesConfig.preloadAfterLoad) &&
						(preloadElems[0] || (!elemExpandVal && ((eLbottom || eLright || eLleft || eLtop) || lazyloadElems[i].getAttribute(lazySizesConfig.sizesAttr) != 'auto')))){
						autoLoadElem = preloadElems[0] || lazyloadElems[i];
					}

Any chance you know why my images are loading on page load? They are in the viewport but visible returns false with my modification.

Any chance you know why my images are loading on page load?

No as long as I can't see your HTML/CSS, I can only guess.
But I can say, that your changes to lazysizes aren't needed.

Visibility check
Visibility is inherited, which means if an ancestor is hidden, the child is also hidden, unless you set it explicitly to visible again. -> You don't need to traverse up the DOM tree.

If you want that lazysizes always checks nested visiblity including visibilty hidden, give your image the data-expand="auto" attribute and it should always check.

Please give me a test case, otherwise I can't help you.

Ok, so here is the project, live: www.msnbc.com/globeisgone
It doesn't lazy load the images successfully. You can see the dom tree structure with .item as visible/opacity. But the images nonetheless load on load.

I will look into this tomorrow.

@petulla
Do the following two things:

add the attribute data-expand="auto" to your image elements.
Give those images or thier wrapper elements initially the style visibility: hidden. Currently they get this style only afterwards with the .fade-tran-out, but not initially. The class div.item uses the style visibility: none, which is invalid.


Ml/new control

ATM it's quite a mess.
It looks like you are trying to put too much things in one chunk of work and you got lost in your own balagan.

All that session stuff is not needed here.
Let's just add the Cluster + events handling, it seems that the control conn can be just Conn.
We would send queries to control from Cluster.
Please do think about exported vs not exported fields.
Please respect object boundaries!!

Im not sure whether it's worth to worry about blocking when putting response into cluster::events channel. I would assume that events are rarely received and the chance of blocking the channel is really small (we can set channel size to 1024 and then I would imagine that's pretty much impossible to block it in regular conditions).
But passing cluster::events down to connection and resigning from registering handler seems like a good idea and I will proceed with this approach (and with special event handling in connReader as well)

Currently we have to separate goroutines in cluster: loop and handleEvents, but for now handleEvents only delegates work to loop or does some minor changes in cluster so it does not seem like it's that important?
In the future we will need to request some metadata from the cluster (also connected to schema change event) and we would like to refresh this data in terms of error or encountering some unknown tables or keyspaces, but this task does not really fall under handleEvent jurisdiction.
My idea is to have another loop responsible for handling refresh metadata requests, just like the loop responsible for handling topology refresh requests. In this scenario handling events is done just by passing some function (which will make some minor changes in cluster or delegate work directly to one of those two loops) to register events.
Another general problem arises from the fact, that if we have two goroutines and each of them wants to reopen control connection in case of error, we have to synchronize it. I see three possible solutions:

some mutex guarding connection
making two connections, one for each loop
making one loop handle reopen control connection request (then one loop will be delegating this work to another)
the last one may seem a little out of place, but is also the least problematic one.

I will try to read more rust to have a better perspective, but I would like to hear your opinion on this approach.

@Michal-Leszczynski
Regarding the passing cluster::events

note that the issue of blocking exists and it needs to be sent with select
please do not make the buffer too deep

Regarding go routines, it is best to have just one (the loop) function and use select to read from many channels.
There is not need for any synchronization then, it's synchronized by message passing.

I had a look at the commit with the new approach.

You can use c.handleEvent as input, there is no need to necessarily return the new function
I like the idea with type of action because there is a single channel then - the code is easier
Yet still Conn and Cluster should communicate by message passing

Overall I think that many channels and single loop is more idiomatic and easier to maintain.

With many channels we can set their buff length to 1, so that multiples of the same request (like refresh topology) will be handled by just one refresh topology action.

That is correct.

Corrected, squashed and rebased onto main version is on ml/delete_evet_loop PR. Can we merge it from there?

Yes.


What version information is returned by client databases in queries?

When ICON queries IGSDB data based on the ICON central ID do they need to be able to specify version (for example, default is latest version) or does IGSDB always return all version information?

Currently, in the GraphQL API specification for databases, there is for example a query named data with a required parameter id (which is the identifier of the data itself that is managed by each database) and two optional parameters timestamp and locale. With a given timestamp the data as it was at that time should be returned. Without a timestamp the latest data should be returned. The queries return type is Data (which is not an array or list) so it's not possible to return multiple versions.
To fetch all data that match some criteria for some component identifier, there is the query allData that returns multiple results. It also has an optional timestamp parameter with the same meaning as above.
If we really want or need to be able to query all past versions is open for debate (also because it comes with some implementation difficulties). If only the latest version is required we could drop timestamp.


SWC-6613

Walk through bug with current SRC code.  Then load up the locally built SRC override (by bringing up the dev tools and refreshing the screen) to show that the bug is solved.  While the dev tools are open, the uncaught js exception from MUI (that I think is the root cause) is also caught by our handler:
https://github.com/Sage-Bionetworks/synapse-web-monorepo/assets/1864447/5d61c60a-ca5e-4cb5-a605-3e64cb0e340c

MuiDateTimePicker: {
      defaultProps: {
        TransitionComponent: TRANSITION_COMPONENT_OVERRIDE,
      },
    },

Tried, but it resulted in an error because MuiDateTimePicker is not in the list of components that can be styled in the theme.  Maybe this works in a later version?
Object literal may only specify known properties, and 'MuiDateTimePicker' does not exist in type 'Components<Omit<Theme, "components">>'.ts(2322)


Add data collection for SchUseStrongCrypto of the registry

Running into some odd issues where some applications use .NET TLS version by running this command:
[System.Net.ServicePointManager]::SecurityProtocol

In order to call this out a little better, throw a warning if the above contains TLS or TLS11 when we have them disabled.
https://docs.microsoft.com/en-us/dotnet/framework/network-programming/tls#schusestrongcrypto
https://techcommunity.microsoft.com/t5/exchange-team-blog/exchange-server-tls-guidance-part-3-turning-off-tls-1-0-1-1/ba-p/607898
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\.NETFramework\v2.0.50727]
"SystemDefaultTlsVersions"=dword:00000001
"SchUseStrongCrypto"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\.NETFramework\v4.0.30319]
"SystemDefaultTlsVersions"=dword:00000001
"SchUseStrongCrypto"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v2.0.50727]
"SystemDefaultTlsVersions"=dword:00000001
"SchUseStrongCrypto"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v4.0.30319]
"SystemDefaultTlsVersions"=dword:00000001
"SchUseStrongCrypto"=dword:00000001

Currently, additional information is being collected but [System.Net.ServicePointManager]::SecurityProtocol is still returning TLS, TLS11 when we have disabled them in the registry correctly when on Exchange 2019/Windows 2019. This needs to be looked into before we provide a warning.

Hello @dpaulson45 if this helps you I can provide a regkey or xml for these checks. Currently helping customers to get their TLS on 1.2 and save ciphers according to SSLLabs checks.
Your script is already doing great to check the config
[System.Net.ServicePointManager]::SecurityProtocol should be set to TLS 1.2 too, otherwise connections to public repo like github or downloads via Nuget are blocked
refer:
https://devblogs.microsoft.com/powershell/powershell-gallery-tls-support/


android navigation bar is hidden when launched from start screen

If LMS with material is launched from the start screen on android, the navigation bar (three buttons: Back, Home, switch app) is hidden, and any attempts at making it appear interferes with the currently playing app.
So there is no way to get out of the app/page.
The workaround is to go to the Settings page and touch the bottom of the display.  Then the navigation bar appears and home or switch app can be used to get out of the LMS page.
It would be nice if the navigation bar appears, or could be made to appear, under currently playing, at the bottom of the page.

Let me amend that: it is actually possible to get the android navigation bar by touching the display just below the currently playing.
But it can be hard to hit such as not to interfere with currently playing, so a little extra space below currently playing should to the trick (just enough to place a finger).

That is controlled by your browser, not the skin. If you mean the material webview wrapper - you can configure this in its settings.


ios 13.6 and the new wkwebview engine

Since I have updated my app to the wkwebview engine, my footer buttons on ionic no longer work and can be pushed down out of the safe zone of the app.
See also: https://stackoverflow.com/questions/63303752/ionic-cordova-ios-12-and-13-pushing-footer-buttons-beyond-safe-area/63343385#63343385
ionic info

Ionic:

   ionic (Ionic CLI) : 4.10.3 (C:\Users\User\node_modules\ionic)
   Ionic Framework   : ionic1 1.3.5
   @ionic/v1-toolkit : 1.0.22

Cordova:

   cordova (Cordova CLI) : 8.1.2<EMAIL_ADDRESS>   Cordova Platforms     : android 8.1.0, ios 6.1.0, browser 5.0.4, windows 4.4.3
   Cordova Plugins       : cordova-plugin-ionic-webview 4.1.3, (and 17 other plugins)

System:

   Android SDK Tools : 26.1.1 (C:\Users\User\Documents\Android\sdk)
   NodeJS            : v10.21.0 (C:\Program Files\nodejs\node.exe)
   npm               : 6.14.4
   OS                : Windows 10

Thanks a lot for your issue, however the issue template exists for a reason. 😊
It helps us to debug the issue further and to provide a solution much faster. With important information missing, we unfortunately can't help you.
Therefore, please edit this issue accordingly or close and create a new one and make sure to provide all the required information.

Besides that, it seems you are using the fork cordova-plugin-ionic-webview, so you need seek support with/from Ionic.