please add more activation functions

@jvishnuvardhan @yongtang @seanpmorgan follow-up on the tf issue
System information

TensorFlow version (you are using): 2b1
TensorFlow Addons version: pip
Is it in the tf.contrib (if so, where): idk
Are you willing to contribute it (yes/no): yes
Are you willing to maintain it going forward? (yes/no): yes

Describe the feature and the current behavior/state.
activations are high-yield because they dramatically influence performance for little code
Will this change the current api? How?
just adds more activations
Who will benefit with this feature?
people doing hyperparameter search can benefit especially
Any Other info.
here is an updated python file with some activations (converted the if/elif stuff into a lookup table at the bottom)
from tensorflow_addons.activations import sparsemax
import tensorflow as tf

K = tf.keras

B, L = K.backend, K.layers

RRELU_MIN, RRELU_MAX = 0.123, 0.314
HARD_MIN, HARD_MAX = -1., 1.
SOFT_ARGMAX_BETA = 1e10
FN = 'lrelu'

def swish(x):
    """
    Searching for Activation Functions
    https://arxiv.org/abs/1710.05941
    """
    return (B.sigmoid(x) * x)

def soft_argmax(x, beta=SOFT_ARGMAX_BETA):
    """
    https://stackoverflow.com/questions/46926809/getting-around-tf-argmax-which-is-not-differentiable
    https://lucehe.github.io/differentiable-argmax/
    """
    x_range = tf.range(x.shape.as_list()[-1], dtype=x.dtype)
    return tf.math.reduce_sum(
        tf.nn.softmax(x * beta) * x_range, axis=-1)

def gaussian(x):
    return B.exp(-B.pow(x, 2))

def hard_tanh(x, min=HARD_MIN, max=HARD_MAX):
    if x > max:
        return max
    elif x < min:
        return min
    else:
        return x

def hard_lisht(x, min=HARD_MIN, max=HARD_MAX):
    if x < min or x > max:
        return max
    else:
        return tf.math.abs(x)

def lisht(x):
    """
    LiSHT: Non-Parametric Linearly Scaled Hyperbolic Tangent
    https://github.com/swalpa/LiSHT
    """
    return (B.tanh(x) * x)

def rrelu(x, min=RRELU_MIN, max=RRELU_MAX):
    return x if x >= 0 else tf.random.uniform(min, max) * x

def tanh_shrink(x):
    return x - B.tanh(x)

def hard_shrink(x, min=HARD_MIN, max=HARD_MAX):
    if x > max:
        return x
    elif x < min:
        return min
    else:
        return 0

FN_LOOKUP = {
    'soft_argmax': soft_argmax,
    'log_softmax': tf.nn.log_softmax,
    'sparsemax': sparsemax,
    'hard_lisht': hard_lisht,
    'hard_shrink': hard_shrink,
    'tanh_shrink': tanh_shrink,
    'hard_lisht': hard_lisht,
    'hard_tanh': hard_tanh,
    'gaussian': gaussian,
    'swish': swish,
    'lisht': lisht,
    'rrelu': rrelu,
    'lrelu': tf.nn.leaky_relu,
    'crelu': tf.nn.crelu,
    'relu6': tf.nn.relu6,
    'sin': tf.math.sin,
    'cos': tf.math.cos,
}

def clean_activation(activation):
    if callable(activation):
        return activation
    else:
        fn = FN_LOOKUP[activation]
    return fn

def use_fn(fn):
    if not fn:
        fn = FN
    fn = clean_activation(fn)
    return L.Activation(fn)

Thanks @bionicles! So happy to accept PRs for activations such as swish, lisht, etc. I'm less sold on the value of aliasing tf.math.sin and the other built in ops. Is the rationale just that users may not know they can utilize these ops as activations?

I guess one nice behavior is being able to reference activations as strings rather than functions, which is mostly a convenience but still useful for reducing boilerplate when doing hyperparameter tuning.

@seanpmorgan @kyleabeauchamp updated the code. yeah, for our architecture search project it's handy to just use strings, but i guess i could just directly pass those functions
import tensorflow as tf
K = tf.keras
B, L = K.backend, K.layers

LOWER_ASYMPTOTE = 0
UPPER_ASYMPTOTE_AKA_CARRYING_CAPACITY = 1.
GROWTH_RATE = 1.
LOCATION_OF_MAX_GROWTH = 1.
START_TIME = 0.
COEFFICIENT_OF_EXPONENTIAL_TERM = 1.
IS_RELATED_TO_VALUE_Y_ZERO = 1.
IS_ADDED_TO_EXPONENTIAL_TERM = 1.

def generalized_logistic(
        x,
        a=LOWER_ASYMPTOTE,
        k=UPPER_ASYMPTOTE_AKA_CARRYING_CAPACITY,
        b=GROWTH_RATE,
        q=IS_RELATED_TO_VALUE_Y_ZERO,
        c=IS_ADDED_TO_EXPONENTIAL_TERM,
        m=START_TIME,
        v=LOCATION_OF_MAX_GROWTH,
        ):
    numerator = k - a
    exponential_term = B.exp(-b * (x - m))
    denominator = (c + q * exponential_term ** (1/v))
    return a + numerator / denominator

class Logistic(L.Layer):
    def __init__(self):
        super(Logistic, self).__init__()

    def build(self, input_shape):
        self.lower_asymptote = tf.Variable(
            0., trainable=True)
        self.upper_asymptote_aka_carrying_capacity = tf.Variable(
            1., trainable=True)
        self.growth_rate = tf.Variable(
            1., trainable=True)
        self.is_related_to_value_y_zero = tf.Variable(
            1., trainable=True)
        self.is_added_to_exponential_term = tf.Variable(
            1., trainable=True)
        self.start_time = tf.Variable(
            1., trainable=True)
        self.location_of_max_growth = tf.Variable(
            1., trainable=True)

    def call(self, x):
        return generalized_logistic(
                x,
                a=self.lower_asymptote,
                k=self.upper_asymptote_aka_carrying_capacity,
                b=self.growth_rate,
                q=self.is_related_to_value_y_zero,
                c=self.is_added_to_exponential_term,
                m=self.start_time,
                v=self.location_of_max_growth)

It seems swish has been implemented in tensorflow.nn

Please assign rrelu to me and it seems swish has been implemented in tensorflow.nn module.@seanpmorgan

https://github.com/tensorflow/tensorflow/issues/32783
from math import pi
B = tf.keras.backend

SQRT_2_D_PI = B.sqrt(2 / pi)

@tf.function
def gelu(x):
    right = B.tanh(SQRT_2_D_PI * (x + 0.044715 * B.pow(x, 3)))
    return 0.5 * x * (1 + right)

import tensorflow as tf

from nature import L1L2

L = tf.keras.layers

class Linear(L.Layer):
    """ y = mx + b
    broadcast scalar weight and bias to all inputs (trainable)
    """

    def __init__(self):
        super(Linear, self).__init__()
        self.m = self.add_weight(
            initializer=tf.keras.initializers.ones(),
            regularizer=L1L2(), trainable=True)
        self.b = self.add_weight(
            initializer="glorot_normal",
            regularizer=L1L2(), trainable=True)

    @tf.function
    def call(self, x):
        return self.m * x + self.b

import tensorflow as tf

from nature import L1L2

init = tf.keras.initializers.TruncatedNormal

class Polynomial(tf.keras.layers.Layer):

    def __init__(self, power=4):
        super().__init__()
        self.powers = []
        for p in list(range(power)):
            coefficient = self.add_weight(
                initializer=init(), trainable=True, regularizer=L1L2())
            super().__setattr__(f"{p}", coefficient)
            self.powers.append((coefficient, p))
        self.built = True

    @tf.function
    def call(self, x):
        y = 0.
        for coefficient, power in self.powers:
            y = y + coefficient * tf.math.pow(x, power)
        return y

import tensorflow as tf

from nature import Polynomial, Logistic, Linear

L = tf.keras.layers

class PSwish(L.Layer):
    def __init__(self, layer_fn=Linear):
        super(PSwish, self).__init__()
        self.multiply = L.Multiply()
        self.logistic = Logistic()
        self.linear_or_polynomial = layer_fn()
        self.built = True

    @tf.function
    def call(self, x):
        one = self.linear_or_polynomial(x)
        two = self.logistic(x)
        return self.multiply([one, two])

def PolySwish():
    return PSwish(layer_fn=Polynomial)

also, here's Logistic Map, which is (if you believe wikipedia) the simplest function on the "Edge of Chaos"

The relative simplicity of the logistic map makes it a widely used point of entry into a consideration of the concept of chaos.[1] A rough description of chaos is that chaotic systems exhibit a great sensitivity to initial conditions—a property of the logistic map for most values of r between about 3.57 and 4 (as noted above).[2] A common source of such sensitivity to initial conditions is that the map represents a repeated folding and stretching of the space on which it is defined. In the case of the logistic map, the quadratic difference equation describing it may be thought of as a stretching-and-folding operation on the interval (0,1).[9]
https://en.wikipedia.org/wiki/Logistic_map

import tensorflow as tf
K, L = tf.keras, tf.keras.layers

class LogisticMap(L.Layer):

    def __init__(self):
        super(LogisticMap, self).__init__()
        self.r = tf.random.uniform((), minval=3.57, maxval=4.)
        self.built = True

    @tf.function
    def call(self, x):
        min = tf.math.reduce_min(x)
        x = (x - min) / (tf.math.reduce_max(x) - min)
        return self.r * x * (1. - x)

tensorflow/tensorflow#32783
from math import pi
B = tf.keras.backend

SQRT_2_D_PI = B.sqrt(2 / tf.convert_to_tensor(pi))

@tf.function
def gelu(x):
    right = B.tanh(SQRT_2_D_PI * (x + 0.044715 * B.pow(x, 3)))
    return 0.5 * x * (1 + right)

We have already had C++/CUDA kernel for gelu activation, which is much faster than pure Python operations.
https://github.com/tensorflow/addons/blob/master/tensorflow_addons/activations/gelu.py

@bionicles Thank you very much for all of these. I think a lot of these are now implemented or under review (gelu, mish, softshrink, hardshrink, rrelu, lisht, sparsemax, tanhshrink).
However, this issue format makes it very difficult for us to evaluate specific activations and determine who will be working on them. For that reason I'm going to close this issue...but feel free to open a single issue per missing activation that'd you would like to propose. Just a note I don't think we'll be accepting any of the alias'ed activations like (tf.sin). IMO if you're building architecture search you can quickly create a dictionary if you want string shortcuts.

From the original list we are tracking Soft-argmax at https://github.com/tensorflow/addons/issues/1364

@bionicles I actually quite interested in cahotic activation functions - https://github.com/tensorflow/addons/issues/437#issuecomment-535587510 - Logistic Map
Thanks you very much for this code sharing
I have couple of questions regarding this code snipset.

I couldn't find this code in the repo eventually, can you mention the reasons? if this feasibility issues or bad return on investment?
I have read an article on cahotic activation functions and it mentions automatic derivation is not enough and you need to also provide it manually
https://ieeexplore.ieee.org/abstract/document/4634078?section=abstract
Do you agree, if so do you know how to implement it?
How call function will auto derivate?
Each time you are calling "call" function "x" is changed, how do gradient descent will know what to do?
Can I control the change of "x" to be every batch (in Keras)?

Thanks!
Idan


docs: Update README.md

Description
closes: #116

Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...

[x] included the correct type prefix in the PR title
[ ] added ! to the type prefix if API or client breaking change
[x] targeted the correct branch (see PR Targeting)
[ ] provided a link to the relevant issue or specification
[x] added a changelog entry to CHANGELOG.md
[ ] included comments for documenting Go code
[ ] updated the relevant documentation or specification
[ ] reviewed "Files changed" and left comments if necessary
[ ] confirmed all CI checks have passed

Reviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
I have...

[ ] confirmed the correct type prefix in the PR title
[ ] confirmed ! in the type prefix if API or client breaking change
[ ] confirmed all author checklist items have been addressed
[ ] reviewed state machine logic
[ ] reviewed API design and naming
[ ] reviewed documentation is accurate
[ ] reviewed tests and test coverage
[ ] manually tested (if applicable)

For one thing, it is not linked to from the readme.
The readme has directions, and they do not tell me what to do.

I'm OK with adding a link to the docs page in the README 👍


[Map] Hide add feature button when contributors have no layers they can add to

Fixes #801. @scolsen PTAL?

I spent nearly half the day trying to fix the broken test, but I can't get the instrumented tests to run in Android Studio 4.2.1. For some reason, instrumented tests don't appear to be recognized:

I tried cloning from origin and rerunning, as well as "Clean build" and "Invalidate caches and restart". @dturner Any ideas what I could be missing?

There is a test failing because the active project hasn't been loaded into HomeScreenViewModel.projectLoadingState yet when the view is initialized. @dturner, @shobhitagarwal1612, do you know if there's a way to get the view model and to block until LiveData  emits a specific value? Or should we be mocking out the ViewModel?

I finished setting up Android Studio on my new laptop. I'll try running the instrumentation tests

Update: I was able to run unit tests locally but not instrumentation tests. But they are running on remote builds successfully.
So, I started looking into the hilt gradle dependencies and found that there have been many changes in the library that'll require some work for migration.


testing --- don't accept this change please

@jaime-espinosa We're closing this PR because it appears to have only been a test. Please comment if we should reopen.


[HUDI-1105] Adding dedup support for Bulk Insert w/ Rows

What is the purpose of the pull request
Adding dedup support for Bulk Insert w/ Rows
Brief change log

Adding dedup support for Bulk Insert w/ Rows

Verify this pull request
This change added tests and can be verified as follows:

Added TestHoodieDatasetBulkInsertHelper to verify the change.

Committer checklist

[ ] Has a corresponding JIRA in PR title & commit

[ ] Commit message is descriptive of the change

[ ] CI is green

[ ] Necessary doc changes done or have another open PR

[ ] For large changes, please consider breaking it into sub-tasks under an umbrella JIRA.

@bvaradar @vinothchandar : patch is ready for review

Codecov Report

Merging #2206 (01e47cc) into master (6539813) will increase coverage by 6.97%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##             master    #2206      +/-   ##
============================================
+ Coverage     54.87%   61.85%   +6.97%
+ Complexity     3836      340    -3496
============================================
  Files           485       54     -431
  Lines         23439     2016   -21423
  Branches       2494      241    -2253
============================================
- Hits          12863     1247   -11616
+ Misses         9423      646    -8777
+ Partials       1153      123    -1030

Flag
Coverage Δ
Complexity Δ

hudicli
?
?

hudiclient
?
?

hudicommon
?
?

hudiflink
?
?

hudihadoopmr
?
?

hudisparkdatasource
?
?

hudisync
?
?

huditimelineservice
?
?

hudiutilities
61.85% <ø> (-7.79%)
340.00 <ø> (-39.00)

Flags with carried forward coverage won't be shown. Click here to find out more.


Multi stage transform using different modalities: --inital-moving-transform per metric

Hi,
i would like to apply a pretty standard multi stage registration (rigid, affine, SyN) but using a different modality for the SyN stage (i.e. T2) than for the initial stages (T1) due to better contrast in the relevant ROI.

This works nicely :) However, as the T1 and T2 can not be expected to be exactly aligned a priory, i had to apply a rigid registration of the T2 to the T1 space to be used in the last stage (i.e. creating a T2inT1 image), thus breaking the "only one interpolation" concept of ANTs.
To keep the "only one interpolation" concept a method to apply the previously determined rigid transform between the T2 and the T1 space on a per metric basis in the last stage would be needed.

If this is already possible in some way i would be very grateful for a hint :) Otherwise it would be great if you could consider it as a #wouldbenice
Thank you!
Best
Andy

Just call antsRegistration twice.   The first call uses the T1 to calculate the rigid + affine transform.  The second call uses the T2 the calculate SyN with the set of initial transforms being trans_t2_to_t1GenericAffine.mat and trans_from_first_call0GenericAffine.mat.

 Thanks a lot!

It's not totally obvious since antsRegistration is so flexible with the permutations of command-line options available.  One might save time with I/O by allowing what you suggested and everything associated with that change would be relatively straightforward except for parsing the command line arguments.  We'd have to allow for specifying an initial-transform for each registration stage and simply asking you to call antsRegistration twice is much easier than making those required code changes.

I am fine with the two calls solution. I was thinking a bit to much inside the box in the sense that multiple calls to antsRegistration would automatically break the "only one interpolation" idea, but that's obviously not the case when done properly. Thx again.


18943 Donita Bates

can not read the activity/ facility is abbreviated / unclear on the space being used

Which PDF?

@Dorshan01  please email applicant


Timezone & Elevation not working properly from CLI

geocode "45.15, -75.5" -p google -m timezone

Windows error
    self.location = Location(location).latlng
  File "C:\Python27\lib\site-packages\geocoder\location.py", line 96, in latlng
    condition1 = isinstance(self.lat, float)
 AttributeError: 'Location' object has no attribute 'lat'

Using 3.4 seems to work
$ geocode "45.15, -75.5" -p google -m timezone | jq .timeZoneName
"Eastern Daylight Time"


Remove dependency on SiteConfig (and admin)

We are currently building this module to be compatible with silverstripe/siteconfig in order to allow an admin to configure their site from the CMS - and with silverstripe/admin in regards to viewing a members MFA configuration - and allowing members to alter their configuration.
However as SilverStripe is usable without Admin (and thus without SiteConfig) I think it would be best to allow site wide MFA configuration from YAML, as technically it is still possible for Members to log in, even without the admin interface to log into.

To be honest, I don't think this has enough value to warrant the complexity that it would bring right now. Let's reopen in future if somebody really wants this.

This is necessary as our very first integration project requires it.

cc @silverstripeux - FYI we will need to make the "Enable MFA in the CMS" settings in the "Settings" section also configurable by developers in YAML

Integration project defines it as per group requirements, if I'm recalling correctly.
i.e. A user belongs to many groups, and if any of those groups require MFA, then they're required to authenticate with MFA (highest level of security is applied to the user).

Yeah that's true, we can raise a separate issue for that though - let's keep requirements separate

Yeah for sure, just providing a little more clarity on the level of abstraction/decoupling that needs to be present for that to be easy :)

"Group based MFA settings" can be treated separately, we won't be doing this issue though


head request seems to be waiting for body

head request takes ages.
I might be wrong, but I suppose that async_read is waiting for a body, which of course is not there.
Simple workaround might be using async_read_header... but in my opinion async_read should work anyway
Version of Beast
306
Steps necessary to reproduce the problem
#include <iostream>
#include <boost/beast/core.hpp>
#include <boost/beast/http.hpp>
#include <boost/beast/version.hpp>

int main()
{
	boost::asio::io_context ctx;
	boost::asio::ip::tcp::resolver resolver(ctx);
	boost::beast::tcp_stream stream(ctx);
	boost::beast::flat_buffer buffer_; // (Must persist between reads)
	boost::beast::http::request<boost::beast::http::empty_body> req_;
	boost::beast::http::response<boost::beast::http::string_body> res_;

	resolver.async_resolve("www.google.com", std::to_string(80).c_str(), [&](boost::system::error_code ec, boost::asio::ip::tcp::resolver::results_type results) {
		if (ec) {
			std::cerr <<ec << std::endl;
			return;
		}
		else {
			stream.async_connect(results, [&](boost::system::error_code ec, boost::asio::ip::tcp::resolver::results_type::endpoint_type endpoint) {
				if (ec) {
					std::cerr << ec << std::endl;
					return;
				}
				req_ = {};
				req_.method(boost::beast::http::verb::head);
				req_.target("/");
				req_.set(boost::beast::http::field::host, "www.google.com");
				req_.set(boost::beast::http::field::user_agent, BOOST_BEAST_VERSION_STRING);
				res_ = {};
				buffer_.clear();
				boost::beast::http::async_write(stream, req_, [&](boost::system::error_code ec, [[maybe_unused]] std::size_t bytes_transferred) {
					if (ec) {
						std::cerr << ec << std::endl;
						return;
					}
					boost::beast::http::async_read(stream, buffer_, res_, [&](boost::system::error_code ec, [[maybe_unused]] std::size_t bytes_transferred) {
						std::cerr << "done, transferred " << bytes_transferred << std::endl;
						});
					});
			});
		}
	});

	ctx.run();
}

All relevant compiler information
Visual Studio 2019, building in Debug / 32 bit. Yes. 32 bit.

You have to tell the library that you don't expect a body, this is explained here:
https://www.boost.org/doc/libs/1_77_0/libs/beast/doc/html/beast/more_examples/head_request_client.html
and here:
https://www.boost.org/doc/libs/1_77_0/libs/beast/doc/html/beast/ref/boost__beast__http__parser/skip/overload2.html

Hi Vinnie,
thanks for the quick reply.
IMHO it might ne more crearly stated here: beast/ref/boost__beast__http__async_read/overload2.html that the API is not compatible with HTTP requests which expose a "Content-Length", but have no body.
First case, is the HEAD method, second one is the 304 response.
This second case is a bit more tricky, as responses for revalidation requests (If-None-Match, If-Modified-Since,...) might be 2xx (body present) or 304 (no body), depending on revalidation outcome.
IMHO delegating this logic to boost beast's user does more harm than good, as the HTML spec is quite strict and stable as to body presence in the response.
Are custom exotheric method types the reason about this delegation? Does boost beast support custom methods not in http::verb?

the API is not compatible with HTTP requests which expose a "Content-Length", but have no body. First case, is the HEAD method, second one is the 304 response.

But that's not correct. Beast understands perfectly that a 304 has no body:
https://github.com/boostorg/beast/blob/b7344b0d501f23f763a76488826dde8c31f34b5d/include/boost/beast/http/impl/basic_parser.ipp#L513
The problem with a response to HEAD is that Beast has no way to know that it is receiving a response to the HEAD request. The user has to inform the library - there is no other way around. All the other response codes should work, i.e. Beast will know that they do not have the body (see code above). You will note that every HTTP library is like this. For example, see here:
https://github.com/nodejs/http-parser/blob/ec8b5ee63f0e51191ea43bb0c6eac7bfbff3141d/http_parser.h#L75

We do have internal discussions on design improvements that could be made.
We’re not entirely happy with the relationship between parser and body_type, for example.
So the door is certainly open if you have design changes to explore.
Min response to the above, I think our view that setting a flag on the parser (I am not expecting a body) and asking the parser to skip the body after receiving the header, logically amount to the same thing.
Do we agree on that?

Hi madmongo,
I can talk as a user, and not as a library developer, which I'm not (I wish I were).
I understand that beast is more targeted to higher-level library writers, and not to the average developer, but the star count, (BTW, you have one more, right now) suggest that there are a lot of users which use it (as I do) for applications.
If you ask me, I would find it much more reasonable to have an "I do it all" API (read_async HEAD aware) and two lower level APIs read_header, read_body: it would be a bit more obvious that it is up to the user to skip the body.
Lastly, as I guess that 99% of people creates a "connection" class with a request, a response, a buffer, and a parser, I'd try to reduce headache and push more with "moves". Definitely for the request. Probably for the response. Not sure for the parser, as it is virtual (is it really needed?)
In my dreams I would code this:
http::read_async(std::move(request), [](error_code, response&& r) {
...
...
});
or for more elaborate use cases:
http::read_async(std::move(request), parser_options, [](error_code, response&& r) {
...
...
});
Again, I'm not a library writer, not a template guy, so it is really possible I'm talking complete nonsense.

None of this is nonsense. I think our view is that users would love an API that looks a lot like python’s requests library.
This is actually on my todo list.
A good start to informing that library is to have some good real-world use cases, such as yours.

Well my use case right now is opening a few connections and stress test media origin servers.
Good news... going 10Gbit and up is a breeze, and once you got acquainted with think-async... using beast is not that complicate. Definitely easier than baking your own asio based http library.
So what is missing... is what you know is missing: high level.

Simpler APIs, even if they add CPU overhead

And let me add:

HTTP Connection recycling

I suppose that taking inspiration from a python library is a good idea (I see that requests is the stanrdard-the facto): API friendliness is very typical over there.
Let me know if and how I can be any help.

I have some good news for you.

I've written all this stuff already (including connection recycling)
I do have it on my roadmap to produce such a library
You might just be the catalyst that gets this started.

If I published an absolutely minimal subject-to-change library that you could experiment with and provide feedback, would you be happy to act as a lab rat user?

Go ahead

OK, I'm actually on holiday at the moment, so I'll start while my wife isn't looking. She'll get mad with me if she catches me working ;-)

So what is missing... is what you know is missing: high level.

Yes you're right about that. Beast is intended to be the low level building block upon which these higher abstractions are written. A higher level library would handle the entire HEAD process from request to response for you, hiding the detail of knowing that the body is not expected.


Set up Android and iOS method channel unit tests infrastructure in flutter/plugins for webview_flutter.

Some code in webview_flutter could be benefit from having java/objc unit tests to test java/objc implementations. For example: https://github.com/flutter/plugins/pull/2895
As examples, we do have some plugins that contains method channel unit tests, such as https://github.com/flutter/plugins/blob/master/packages/image_picker/image_picker/ios/Tests/ImagePickerPluginTests.m
We need to at least set up the unit test infrastructure, so future PRs can simply add tests.

The Dart-first rewrite added a lot of test coverage, so I think this is probably resolved (especially since with the switch to Pigeon, we don't need tests of the channel part in particular).


New Project Fails to load /Script/RuntimeGeometryUtils.DynamicSDMCActor

Hello, I created a new project with the RuntimeGeometryUtils plugin included, and used the same settings in the uproject file (RuntimeGeometryUtils, ModelingToolsEditorMode, MeshModelingToolset) and Build.cs file.  Everything appears to work normally until I reference a DynamicSDMCActor (as a projectile like in your project) and get the following load errors in the editor:

I completely cleaned and rebuilt the project, but same issue.  I tried using some of your CoreRedirects in DefaultEngine.ini, but those don't seem to help.  Do you remember any special configuration in your project needed to use the DynamicSDMCActor's within the project?
Thanks for this repository, the code is very nice to work with, and your blog is fantastic.

May have just solved the issue, funny how posting sometimes does that :)
I set "LoadingPhase": "PreDefault" in RuntimeGeometryUtils.uplugin and that seems to have fixed it.


bundle protoc

close #427

I tried to package it locally, the size was 9.3MB, smaller than the size limit of crates.io, which was 10MB.

Merged to master, but not yet to stable.
Can you please do a couple of follow-ups? (if you agree with them)

After a call to which, store the result of which into Protoc object, not just string "protoc"
After bin_path computed, add an assertion that path exists
Add a script to update bundled files. This will be needed to update to the next version, but also to verify that these files are originally compiled by Google, and do not contain any backdoors

Also, something in the current behaviour seems inconsistent to me: we bundle protoc compilers, but we don't guarantee they are used: so protoc will never fail now, but usage will depend on system configuration. E. g. everything will work correctly, but if someone installs protoc system package, everything might start to fail, because the system installed version is very old.
Probably we should restore from_env_path function to the previous behaviour, and add another function:
// This is a sketch, better names and variants suggestions welcome
enum ProtocSearchConf {
    EnvPath, // from $PATH only, no bundled
    Bundled, // bundled only, not system fallback
    BundledThenEnvPath, // bundled with system fallback
    EnvPathThenBundled, // $PATH with bundled fallback
    Path(PathBuf), // use fixed path
}

impl Protoc {
  fn from_conf(where: ProtocSearchConf) -> Protoc { ... }

  // or just this use case which I believe would be the most popular:
  // bundled where supported, otherwise system
  fn bundled_or_env() -> Protoc { ... }
}

I'm also thinking:

ideally binaries should be in a separate crate with separate versioning because binaries need to be updated less frequently. But that is probably micro-optimization. But probably disk size on crates.io is not an issue.
ideally binaries per target should live in separate create to reduce the download size and protoc crate might have a "feature" to avoid downloading protoc at all. But this is again probably a micro-optimization

I agree, and will work on that later.

ideally binaries per target should live in separate create

Cross-compilation can be a problem if only download the crate that matches the target platform.


add ability of client to override default actions

Description
What changes are made in this PR? Is it a feature or a bug fix?
This allows clients to have their own implementation for certain actions. For example, permissionless has defined it's own sendTransaction function.
Additional Information
Before submitting this issue, please make sure you do the following.

[x] Read the contributing guide
[ ] Added documentation related to the changes made.
[ ] Added or updated tests (and snapshots) related to the changes made.

Closing in favor of https://github.com/wevm/wagmi/pull/3496


Media Library

Description
It would be nice to have a feature that allows browsing through previously uploaded images when adding a new one, alongside the option to upload a fresh file. This would save time and prevent redundancy, as I often find myself re-uploading the same image repeatedly. Although the system does seem to recognize and reuse identical images, it would streamline the workflow if there was a simple way to select from existing uploads rather than going through the entire upload process each time.

definitely good feedback, we've had the feature in mind for a few years now just haven't had a chance to fully flesh out the ux flow.

we can definitely start to pick this back up after our v2 release.


No analysis found with add_sub model

2021-07-31 02:57:26.573 INFO[server_docker.py:145] Stopping triton server.
2021-07-31 02:57:28.733 INFO[analyzer_state_manager.py:146] Saved checkpoint to ./checkpoints/0.ckpt.
2021-07-31 02:57:28.733 INFO[analyzer.py:115] Finished profiling. Obtained measurements for models: [].
2021-07-31 02:57:28.733 INFO[server_docker.py:145] Stopping triton server.
From above can see that when i run the model-analyzer analyze, I get empty and the data is not found for model add_sub.
How can i solve the errors and get all the metrics
First ,
docker run -it --rm --gpus all
-v /var/run/docker.sock:/var/run/docker.sock
-v {pwd}/model_analyzer/examples/quick-start:/quick_start_repository
-v {pwd}/model_analyzer:{pwd}/model_analyzer
-w {pwd}/model_analyzer
--net=host --name model-analyzer
model-analyzer /bin/bash
second,
model-analyzer profile -m /quick_start_repository/ --profile-models add_sub --override-output-model-repository --triton-launch-mode=docker --triton-docker-image nvcr.io/nvidia/tritonserver:21.02-py3
lastly and i get error ,
model-analyzer analyze --analysis-models add_sub -e analysis_results

Can you try a more recent version of the trition container? Maybe 21.06? Also could you share the output of model-analyzer profile

Closing due to lack of activity.


Injection: enable support for automatic detection of native sidecars

Fixes https://github.com/istio/istio/issues/48794

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

PR needs rebase.

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@howardjohn: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name
Commit
Details
Required
Rerun command

release-notes_istio
156fe230adddb2e96dabf5541ce325ffbb2033b8
link
true
/test release-notes

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@howardjohn: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name
Commit
Details
Required
Rerun command

release-notes_istio
156fe230adddb2e96dabf5541ce325ffbb2033b8
link
true
/test release-notes

lint_istio
156fe230adddb2e96dabf5541ce325ffbb2033b8
link
true
/test lint

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@howardjohn: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name
Commit
Details
Required
Rerun command

release-notes_istio
156fe230adddb2e96dabf5541ce325ffbb2033b8
link
true
/test release-notes

lint_istio
156fe230adddb2e96dabf5541ce325ffbb2033b8
link
true
/test lint

gencheck_istio
156fe230adddb2e96dabf5541ce325ffbb2033b8
link
true
/test gencheck

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@howardjohn: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name
Commit
Details
Required
Rerun command

release-notes_istio
156fe230adddb2e96dabf5541ce325ffbb2033b8
link
true
/test release-notes

lint_istio
156fe230adddb2e96dabf5541ce325ffbb2033b8
link
true
/test lint

gencheck_istio
156fe230adddb2e96dabf5541ce325ffbb2033b8
link
true
/test gencheck

unit-tests-arm64_istio
156fe230adddb2e96dabf5541ce325ffbb2033b8
link
true
/test unit-tests-arm64

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@howardjohn: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name
Commit
Details
Required
Rerun command

release-notes_istio
156fe230adddb2e96dabf5541ce325ffbb2033b8
link
true
/test release-notes

lint_istio
156fe230adddb2e96dabf5541ce325ffbb2033b8
link
true
/test lint

gencheck_istio
156fe230adddb2e96dabf5541ce325ffbb2033b8
link
true
/test gencheck

unit-tests-arm64_istio
156fe230adddb2e96dabf5541ce325ffbb2033b8
link
true
/test unit-tests-arm64

unit-tests_istio
156fe230adddb2e96dabf5541ce325ffbb2033b8
link
true
/test unit-tests

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@howardjohn: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name
Commit
Details
Required
Rerun command

lint_istio
156fe230adddb2e96dabf5541ce325ffbb2033b8
link
true
/test lint

gencheck_istio
156fe230adddb2e96dabf5541ce325ffbb2033b8
link
true
/test gencheck

unit-tests-arm64_istio
156fe230adddb2e96dabf5541ce325ffbb2033b8
link
true
/test unit-tests-arm64

unit-tests_istio
156fe230adddb2e96dabf5541ce325ffbb2033b8
link
true
/test unit-tests

release-notes_istio
947ac7e3263f317d272bca4adecf22b6142dbb2e
link
true
/test release-notes

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@howardjohn: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name
Commit
Details
Required
Rerun command

gencheck_istio
156fe230adddb2e96dabf5541ce325ffbb2033b8
link
true
/test gencheck

unit-tests-arm64_istio
156fe230adddb2e96dabf5541ce325ffbb2033b8
link
true
/test unit-tests-arm64

unit-tests_istio
156fe230adddb2e96dabf5541ce325ffbb2033b8
link
true
/test unit-tests

release-notes_istio
947ac7e3263f317d272bca4adecf22b6142dbb2e
link
true
/test release-notes

lint_istio
947ac7e3263f317d272bca4adecf22b6142dbb2e
link
true
/test lint

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@howardjohn: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name
Commit
Details
Required
Rerun command

unit-tests-arm64_istio
156fe230adddb2e96dabf5541ce325ffbb2033b8
link
true
/test unit-tests-arm64

unit-tests_istio
156fe230adddb2e96dabf5541ce325ffbb2033b8
link
true
/test unit-tests

release-notes_istio
947ac7e3263f317d272bca4adecf22b6142dbb2e
link
true
/test release-notes

lint_istio
947ac7e3263f317d272bca4adecf22b6142dbb2e
link
true
/test lint

gencheck_istio
947ac7e3263f317d272bca4adecf22b6142dbb2e
link
true
/test gencheck

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@howardjohn: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name
Commit
Details
Required
Rerun command

unit-tests-arm64_istio
156fe230adddb2e96dabf5541ce325ffbb2033b8
link
true
/test unit-tests-arm64

release-notes_istio
947ac7e3263f317d272bca4adecf22b6142dbb2e
link
true
/test release-notes

lint_istio
947ac7e3263f317d272bca4adecf22b6142dbb2e
link
true
/test lint

gencheck_istio
947ac7e3263f317d272bca4adecf22b6142dbb2e
link
true
/test gencheck

unit-tests_istio
947ac7e3263f317d272bca4adecf22b6142dbb2e
link
true
/test unit-tests

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@howardjohn: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name
Commit
Details
Required
Rerun command

release-notes_istio
947ac7e3263f317d272bca4adecf22b6142dbb2e
link
true
/test release-notes

lint_istio
947ac7e3263f317d272bca4adecf22b6142dbb2e
link
true
/test lint

gencheck_istio
947ac7e3263f317d272bca4adecf22b6142dbb2e
link
true
/test gencheck

unit-tests_istio
947ac7e3263f317d272bca4adecf22b6142dbb2e
link
true
/test unit-tests

unit-tests-arm64_istio
947ac7e3263f317d272bca4adecf22b6142dbb2e
link
true
/test unit-tests-arm64

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@howardjohn: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name
Commit
Details
Required
Rerun command

lint_istio
947ac7e3263f317d272bca4adecf22b6142dbb2e
link
true
/test lint

gencheck_istio
947ac7e3263f317d272bca4adecf22b6142dbb2e
link
true
/test gencheck

unit-tests_istio
947ac7e3263f317d272bca4adecf22b6142dbb2e
link
true
/test unit-tests

unit-tests-arm64_istio
947ac7e3263f317d272bca4adecf22b6142dbb2e
link
true
/test unit-tests-arm64

release-notes_istio
145935a8c9968ae61db6998effa7ce77f769fc20
link
true
/test release-notes

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@howardjohn: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name
Commit
Details
Required
Rerun command

gencheck_istio
947ac7e3263f317d272bca4adecf22b6142dbb2e
link
true
/test gencheck

unit-tests_istio
947ac7e3263f317d272bca4adecf22b6142dbb2e
link
true
/test unit-tests

unit-tests-arm64_istio
947ac7e3263f317d272bca4adecf22b6142dbb2e
link
true
/test unit-tests-arm64

release-notes_istio
145935a8c9968ae61db6998effa7ce77f769fc20
link
true
/test release-notes

lint_istio
145935a8c9968ae61db6998effa7ce77f769fc20
link
true
/test lint

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.


How to predict joint parameters?

Hi! Congratulations on the cool work with RPMNet. The paper also mentions the Mobility-Net for predicting joint parameters but I am unable to find it in the code base. Can you please point me to where I can get that?
Thanks!

Hi,
Thanks for your interest! This repository is only for RPM-Net, thus we did not release the code for Mobility-Net. The parameters of Mobility-Net are provided in our supplementary material, which you can download from our project page.

Okay thanks.


Disable override on Windows.

@matajoh https://github.com/mjp41/Trieste/tree/backport can be used to test without moving rego forward.
I'll commit some checks into snmalloc for this, so it is not used incorrectly going forward.


Change wording in the log output

Is your feature request related to a problem? Please describe.
This line in the log "umapi_client.auth - auth token is missing or expired - refreshing now" is a support case generator. We've been asked a lot about it, and, although we can explain it, it's better if it did not raise questions in the first place
Describe the solution you'd like
Please rephrase this log line so that it just says something like "obtaining an access token" or similar.

What if we just made it debug level and not info? Would that suffice?

even with debug mode, Customers see the message when we deploy them to UST or assist them update from JWT to OAuth, and ask about it (we always use debug in these cases). Can you just remove the  "auth token is missing or expired" part?


License for com.russhwolf:multiplatform-settings:0.8 can't be retrieved

When using:
sourceSets.commonMain.dependencies {
  api "com.russhwolf:multiplatform-settings:0.8.0"
}

I'm getting:
com.russhwolf:multiplatform-settings:0.8
 - ERROR: Artifact declares no licenses!

Looking at the POM it's present.
I'm applying the module to my app, while the API is declared in a shared KMP module.

Same is true for kotlinx-serialization-core-iosx64: https://search.maven.org/artifact/org.jetbrains.kotlinx/kotlinx-serialization-core-iosx64/1.2.2/klib

Probably #30 or related

Confirmed it's the same.


Calling WithHandlers using more than 2 handlers disposes handlers immediately

Calling .WithHandlers(handlers) with more than 2 handlers (when using TokenCloudCredentials) causes them to be immediately disposed and then throw errors on use.
A workaround is to use .WithHandler multiple times (as the intermediate Clients are not disposed).
Test cases:
public class HttpClientHandlerDisposingTests
{
    [Fact]
    public void CreatingAClientShouldntDisposeHandlers()
    {
        // This could be any client which inherits from ServiceClient
        var client = new AuthorizationManagementClient(new TokenCloudCredentials("abc"));

        int disposedCount = 0;

        var handlers = Enumerable.Range(0, 5).Select(_ => new DisposableHandler(() => disposedCount++));

        client.WithHandlers(handlers);

        // Failing test. This is returning handlerCount - 2
        Assert.Equal(0, disposedCount);
    }

    [Fact]
    public void CreatingAClientWithCustomCredentialsShouldntDisposeHandlers()
    {
        var client = new AuthorizationManagementClient(new CustomTokenCloudCredentials("abc"));

        int disposedCount = 0;

        var handlers = Enumerable.Range(0, 5).Select(_ => new DisposableHandler(() => disposedCount++));

        client.WithHandlers(handlers);

        // Passing test due to custom cloud credentials workaround
        Assert.Equal(0, disposedCount);
    }

    // Workaround. Calling AddHandlerToPipeline prevents this behavior from occurring
    public class CustomTokenCloudCredentials : TokenCloudCredentials
    {
        public CustomTokenCloudCredentials(string token)
            : base(token)
        {

        }

        public override void InitializeServiceClient<T>(ServiceClient<T> client)
        {
            client.AddHandlerToPipeline(new DummyHandler());
            base.InitializeServiceClient(client);
        }
    }

    public class DummyHandler : DelegatingHandler
    {
    }

    public class DisposableHandler : DelegatingHandler
    {
        private readonly Action onDisposeAction;

        public DisposableHandler(Action onDisposeAction)
        {
            this.onDisposeAction = onDisposeAction;
        }

        protected override void Dispose(bool disposing)
        {
            base.Dispose(disposing);
            if (this.onDisposeAction != null)
            {
                this.onDisposeAction();
            }
        }
    }
}

@kiwidev Thanks for the report.  We will take a look.

@kwidev The new generated code no longer has this issue, please update to using the latest client.


Open API Docs #3

Signed-off-by: Piyush Singariya<EMAIL_ADDRESS>Description
This PR includes open API documentation for Grafana URLs and also these endpoints have been updated according to Meshery's endpoint excel
This PR fixes #3046
Signed commits

[x] Yes, I signed my commits.

@piyushsingariya how are we tracking the necessary changes to the mesheryctl and Meshery UI clients?

Hey @leecalcote Can you elaborate on what you're asking?

@piyushsingariya I think what @leecalcote mentioned was to update the changes made to the endpoints in the Meshery API endpoints spreadsheet so that we can track where the endpoints are being updated.

@dhruv0000 Could you please check the updated endpoints?

@piyushsingariya Could you fix the merge conflicts?

@navendu-pottekkat fixed conflicts!

@dhruv0000 Thank you for the review


wait for tcp port instead of log

As a bug of docker-maven-plugin, wait for the specified content output in log may occasionally failed. Because our http services listens on port 8080, we could monitor tcp port 8080  instead.

Coverage remained the same at 66.443% when pulling 00bd608e24a8746a61f4ce77e7321ba46fb93dbd on eric-lee-ltk:fixed_docker_plugin_failure into 7089fa5e64e167ad0792def73219fc1bbf093ec6 on WillemJiang:master.


latest tag 2.4.28 blocks updating behat/behat

Because of the dependency in v2.4.28 to behat/transliterator:1.1 I'm not able to update behat/behat to the latest code.
Could you please create another release of master because there it is fixed.

+1


How much GPU memory is needed for training?

Hi, thanks for the great work!
I'm curious about how much GPU memory is needed for training the models. I didn't find the relevant explanation in the paper. Thanks!

Curious about this as well. Struggling to train a scene on a 8GB graphics card without running into memory allocation failure. Just wondering what are the knobs we can play with to reduce memory requirements?

Was wondering if there if we could work on a multi-gpu mode / split the voxel training into parts. Most of the time the training fails at the upsampling step

Curious about this as well. Struggling to train a scene on a 8GB graphics card without running into memory allocation failure. Just wondering what are the knobs we can play with to reduce memory requirements?

Finally got my model to train! Turns out the background layers take up alot of memory and shaving that down allowed me to train a model on limited memory.

Turns out the background layers take up alot of memory and shaving that down allowed me to train a model on limited memory.

Can you share where you made the changes?  I get about 5 epochs into training on a 3080 Ti with the sample Truck dataset and then it bombs out with this error:
RuntimeError: CUDA out of memory. Tried to allocate 1.55 GiB (GPU 0; 11.75 GiB total capacity; 6.67 GiB already allocated; 1.33 GiB free; 7.56 GiB reserved in total by PyTorch) If reserved memory is >> allocated memory try setting max_split_size_mb to avoid fragmentation.  See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF

I was getting out of memory when training lego_real_night_radial and started upsampling to 512 on 3080 with 11g mem. but thx to hint above i noticed there is on top of syn also syn_nv in config dir with bunch of different constants seems like low mem config . i provided --config configs/syn_nv.json and didnt crashed.training done used memory was in that dataset around 7.7g

Is that anyone in this project can give some suggestions for the question ?

I am also having out of memory errors, although, I am using a mobile GPU with only 4 GB of capacity for CUDA.  By reducing the settings in the config file (as mentioned by @neurall, @entmike, and @y22ma above), I was able to run Plenoxels, although the settings were so low, the output is unusable.

Hi guys.
At least for Cool Tank dataset minimum gpu mem for default 10 epochs as in config seems to be 32g ram and 16g gpu which are typically found only in cloud. So my 3080 is sitting idle. But I wanted to play with this so baad.... Plus given how hard it is to get hands on any gpu nowadays. I created colab
BEWARE for now. it will not work on Free colab. Reason being
As mentioned. svox2 currently needs 32g ram to train M60 Tank dataset and 16G gpu where it even then just barely fits
free colab has just 12g ram and 15g gpu.
https://colab.research.google.com/drive/1SODy_HiP_kkjL5E4IiBM1XZsD1HofElZ
I set colab as editable for anyone to make it better. so please be carefull to keep it working if you do changes.
I someone finds a way to tweak it to fit free colab and still have acceptably good output quality that would be great service to community.
Enjoy.
Ladislav
Sadly
Due

Curious about this as well. Struggling to train a scene on a 8GB graphics card without running into memory allocation failure. Just wondering what are the knobs we can play with to reduce memory requirements?

Finally got my model to train! Turns out the background layers take up alot of memory and shaving that down allowed me to train a model on limited memory.

I wonder which version of Driver & cuda did you use. I use GTX2060s ,driver 465, cuda 11.3, but i cant pip install .  right  follow the instruction.

It seems that 15.78 GiB can't satisfy the memory needed.
Traceback (most recent call last):
  File "opt.py", line 605, in <module>
    train_step()
  File "opt.py", line 595, in train_step
    grid.optim_sh_step(lr_sh, beta=args.rms_beta, optim=args.sh_optim)
  File "/home/macaoyuan/.local/lib/python3.8/site-packages/svox2/svox2.py", line 2024, in optim_sh_step
    self.sh_rms = torch.zeros_like(self.sh_data.data) # FIXME init?
RuntimeError: CUDA out of memory. Tried to allocate 1.53 GiB (GPU 0; 15.78 GiB total capacity; 10.66 GiB already allocated; 1.13 GiB free; 13.49 GiB reserved in total by PyTorch)

And when I set <GPU_id> "0,1" here (try to use 2 gpus) :
./launch.sh <exp_name> <GPU_id> <data_dir> -c <config>
It seems that only one gpu was used.
Traceback (most recent call last):
  File "opt.py", line 605, in <module>
    train_step()
  File "opt.py", line 595, in train_step
    grid.optim_sh_step(lr_sh, beta=args.rms_beta, optim=args.sh_optim)
  File "/home/macaoyuan/.local/lib/python3.8/site-packages/svox2/svox2.py", line 2024, in optim_sh_step
    self.sh_rms = torch.zeros_like(self.sh_data.data) # FIXME init?
RuntimeError: CUDA out of memory. Tried to allocate 1.55 GiB (GPU 0; 15.78 GiB total capacity; 10.69 GiB already allocated; 1.12 GiB free; 13.50 GiB reserved in total by PyTorch)

I want to know what is the correct way to use two gpu in this work. Is the reason for this phenomenon  that device = "cuda" if torch.cuda.is_available() else "cpu"?

meantime better alternative pupped up. nvidia just released alternative that trains in seconds instead of minutes and runs on pretty much any gpu https://github.com/NVlabs/instant-ngp


[Recommendation] Boundary condition issue with recommendation generation

Currently if kruize has exact 24 hrs of data it is not able to give out recommendations due to a boundary condition issue which was mentioned by @chandrams and @kusumachalasani .
@msvinaykumar found that the issue is with the way Recommendation engine is getting the start time.
Kruize is having the check for sum of duration minutes at the start  of iteration, so if the list has exact number of entries as it can't iterate more the check doesn't happen in the last iteration. Hence kruize is not generating the recommendation if it has exact entries for a duration.

Closing this as this is a duplicate of #770. Please update 770 with all your findings


how can I use multiple GPUs?

💯 May I ask the author, how can I use multiple GPUs, or specify a certain GPU for inference? : )

CUDA_VISIBLE_DEVICES=0,1 python app.py
Beyond that, a code change might be needed to perform load balancing across your multiple GPUs for inference specifically.
The HuggingFace accelerate framework has a way to do it automatically.

CUDA_VISIBLE_DEVICES=0,1 python app.py
Beyond that, a code change might be needed to perform load balancing across your multiple GPUs for inference specifically. The HuggingFace accelerate framework has a way to do it automatically.

As you said, I used the following code in the terminal:
CUDA_VISIBLE_DEVICES=0,1 python app.py
But did not call multiple GPUs to generate gif.


"Open in cartodb" does not accept spaces in provider name

http://oneclick.cartodb.com/?file=http://gstore.unm.edu/apps/rgis/datasets/3205beb6-3406-4293-adef-a59ff0575965/aquifrp025.derived.xls&provider=data.gov
Works, but
http://oneclick.cartodb.com/?file=http://gstore.unm.edu/apps/rgis/datasets/3205beb6-3406-4293-adef-a59ff0575965/aquifrp025.derived.xls&provider=data+gov
and
http://oneclick.cartodb.com/?file=http://gstore.unm.edu/apps/rgis/datasets/3205beb6-3406-4293-adef-a59ff0575965/aquifrp025.derived.xls&provider=data gov
both produce errors.

There has been no activity on this issue for more several months. We are closing it. If you think this still needs to be addressed please open a new issue.


Is there any way to call a Feign Client at runtime, after the application has just started?

I need to excecute a method right after my application has started. I've used @PostConstruct on my method to achieve this, the problem is that my method internally calls a feign client , and this makes it fail, somehow feign client cannot be called. Is there any configuration needed to enable my feign client to be called like this?

@erickgr2 Please sign the Contributor License Agreement!
Click here to manually synchronize the status of this Pull Request.
See the FAQ for frequently asked questions.

Codecov Report

:exclamation: No coverage uploaded for pull request base (1.0.0.M2@c4cf13a). Click here to learn what that means.
The diff coverage is 76%.

@@             Coverage Diff             @@
##             1.0.0.M2    #2373   +/-   ##
===========================================
  Coverage            ?   68.01%
===========================================
  Files               ?      231
  Lines               ?     8138
  Branches            ?     1013
===========================================
  Hits                ?     5535
  Misses              ?     2217
  Partials            ?      386

Impacted Files
Coverage Δ

...tflix/zuul/filters/post/LocationRewriteFilter.java
89.09% <ø> (ø)

.../netflix/zuul/filters/pre/PreDecorationFilter.java
88.69% <ø> (ø)

...oud/netflix/zuul/filters/post/SendErrorFilter.java
73.52% <ø> (ø)

...cloud/netflix/zuul/metrics/EmptyTracerFactory.java
100% <ø> (ø)

...ix/zuul/filters/route/SimpleHostRoutingFilter.java
89.54% <ø> (ø)

...rk/cloud/netflix/zuul/filters/pre/DebugFilter.java
57.14% <ø> (ø)

...s/support/ResettableServletInputStreamWrapper.java
66.66% <ø> (ø)

...netflix/zuul/util/RequestContentDataExtractor.java
88.63% <ø> (ø)

.../netflix/zuul/filters/support/FilterConstants.java
0% <ø> (ø)

...lters/route/okhttp/OkHttpRibbonCommandFactory.java
83.33% <ø> (ø)

... and 150 more

Continue to review full report at Codecov.

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

A pull request is not the right place to ask question

@erickgr2 Thank you for signing the Contributor License Agreement!


Path memoization is now done only on pandora index

Path memoization in LocalPRG::nodes_along_path method speeds up pandora index a lot at the cost of using more memory. pandora map and pandora compare are mostly limited by RAM usage than speed though.
This PR disables path memoization in all modules but pandora index.
This modification brings the RAM usage of pandora compare on the klebs PRG with 151 samples down to 17.1GB:

Runtime:

5h08min with memoization
5h21min without memoization

RAM usage:

24.5GB with memoization
17.1 GB without memoization

The path memoization speed-up in pandora compare is small (13 minutes faster in this example), while the RAM required for the memoization is ~7.5 GB. So, in pandora map and pandora compare it seems that it is better to disable path memoization.
Added unit tests to test both memoized and non-memoized versions of this method, and assured that pandora compare and pandora index are producing the same results as before in a real dataset. No real dataset tests were done with pandora map though...

Looks fine to me! I'll rebase and merge


octo.repos(OWNER, NAME) object is different than the result of user.repos.fetch()

How should repo.contents be used?  Any time I call repo.contents(), it always returns the files / folders from the root of the default branch.  How can I specify a different branch and / or path?

I can get it to work this way.
octo.repos('user', 'repo').contents('path?ref=branch').fetch().then(function () {console.log(arguments);});
How can I get it to work this way?
octo.me.fetch().then(function (user) {user.repos.fetch().then(function (repos) {repos[0].contents('path?ref=branch');

I believe the following should work:
repo.contents('README.md').fetch({ref: 'my-branch'}) ...

or, alternatively:
repo.contents.fetch({path: 'README.md', ref: 'my-branch'}) ...

(from https://developer.github.com/v3/repos/contents/#get-contents)

In this example, repos[0].contents.fetch is undefined;
octo.me.fetch().then(function (user) {user.repos.fetch().then(function (repos) {repos[0].contents.fetch;});

Yep, the octo.repos(OWNER, NAME) object is different than the result of user.repos.fetch().
Can you try something like the following:
octo.me.fetch().then(function (user) {
  user.repos.fetch().then(function (repos) {
    repo = repos[0];
    octo.repos(repo.owner.login, repo.name).contents(path).fetch({ref:'branch'}).then(function (contents) {
      ...

Yeah, I just thought of that workaround.  Shouldn't you get the same type of repo object either way?

Seems to me that the repo objects returned from either of these methods should be identical in functionality.

or just:
octo.me.repos.fetch().then(function (user) {
    repo = repos[0];
    octo.repos(repo.owner.login, repo.name).contents(PATH).fetch({ref:BRANCH_NAME}).then(function (contents) {
      ...

octo.repos(...) is constructed locally and the resulting repos object is constructed from the JSON (which looks similar to https://developer.github.com/v3/repos/#get) using URL Templates.
Every key ending in _url is converted to a fetch method so you can do repos[0].owner.organizations() but since there is no content_url: "https://api.github.com/repos/philschatz/octokat.js/contents{/path}" there is no .contents() on that object.

There is an OBJECT_MATCHER that attempts to provide the same operations on a Repo JSON fragment (which is what I think you were expecting).
What kind of error did you get originally? Did you get a BUG: Invalid Path. Error, undefined is not a function, or some other error?

Maybe you could special case this then.  I can use the workaround, but I think it should work either way.
Consider the logic of a web app using this library:

Login (user = result of octo.me)
List user repos (repos = result of user.repos)
Select a repo (repo = repos[SELECTED_REPO_INDEX])
List repo contents (repo.contents)

I'd submit a pull request for this myself, but I have no experience in CoffeeScript.

Ah, now i see. The following works but without the branch option:
octo.me.repos.fetch().then(function(repos) {
  repos[0].contents('README.md').then(function(x) {
    console.log(x);
  })
})

It's using the contents() from the Hypermedia URL. That could be a bug.
Thanks! I'll try to take a closer look over the weekend.

@philschatz Any update on this?

Unfortunately, not yet. I spent last weekend getting the Travis-CI tests running again. I might have some time Monday to take a look.

Thanks again; it should be fixed in<EMAIL_ADDRESS>


Finish TokenMarker RE, implement in Devise a Stratagem

Is it possible for strategic strike to work if you remove the roll option? Unfortunately the effect is set to auto remove, which means its gone when damage occurs.


Inline API documentation + ModuleType refactoring

Inline API documentation
NAME
utcnow - Package for formatting arbitrary timestamps as strict RFC 3339.
DESCRIPTION
Timestamps as RFC 3339 (Date & Time on the Internet) formatted strings with conversion functionality from other timestamp formats or for timestamps on other timezones. Additionally converts timestamps from datetime objects and other common date utilities.
# Transforms the input value to a timestamp string in RFC 3339 format.
utcnow.rfc3339_timestamp(value, modifier)

# Transforms the input value to a datetime object.
utcnow.as_datetime(value, modifier)

# Transforms the input value to a float value representing unixtime.
utcnow.as_unixtime(value, modifier)

# Transforms the input value to a google.protobuf.Timestamp message.
utcnow.as_protobuf(value, modifier)

value — A value representing a timestamp in any of the allowed input formats, or "now" if left unset.
modifier — An optional modifier to be added to the Unix timestamp of the value. Defaults to 0. Can be specified in seconds (int or float) or as string, for example "+10d" (10 days => 864000 seconds). Can also be set to a negative value, for example "-1h" (1 hour => -3600 seconds).
Examples:
A few examples of transforming an arbitrary timestamp value to a RFC 3339 timestamp string.
>>> import utcnow

>>> utcnow.rfc3339_timestamp("2023-09-07 02:18:00")
"2023-09-07T02:18:00.000000Z"

>>> utcnow.rfc3339_timestamp("2023-09-07 02:18:00", "+7d")
"2023-09-14T02:18:00.000000Z"

>>> utcnow.rfc3339_timestamp("2023-09-07 02:18:00+02:00")
"2023-09-07T00:18:00.000000Z"

>>> utcnow.rfc3339_timestamp(1693005993.285967)
"2023-08-25T23:26:33.285967Z"

>>> utcnow.rfc3339_timestamp()
"2023-09-07T01:04:38.091041Z"  # current time

Returned timestamps follow RFC 3339 (Date and Time on the Internet: Timestamps): https://tools.ietf.org/html/rfc3339.
Timestamps are converted to UTC timezone which we'll note in the timestamp with the "Z" syntax instead of the also accepted "+00:00". "Z" stands for UTC+0 or "Zulu time" and refers to the zone description of zero hours.
Timestamps are expressed as a date-time (not a Python datetime object), including the full date (the "T" between the date and the time is optional in RFC 3339 (but not in ISO 8601) and usually describes the beginning of the time part.
Timestamps are 27 characters long in the format: "YYYY-MM-DDTHH:mm:ss.ffffffZ". 4 digit year, 2 digit month, 2 digit days, "T", 2 digit hours, 2 digit minutes, 2 digit seconds, 6 fractional second digits (microseconds -> nanoseconds), followed by the timezone identifier for UTC: "Z".
The library is specified to return timestamps with 6 fractional second digits, which means timestamps down to the microsecond level. Having a six-digit fraction of a second is currently the most common way that timestamps are shown at this date.
See also:
# Transforms the input value to a string representing a date (YYYY-mm-dd) without timespec or indicated timezone.
# An optional `tz` argument can be used to return the date in the specific timezone.
utcnow.as_date_string(value, tz)

# Returns a string representing today's date (YYYY-mm-dd) without timespec or indicated timezone.
# An optional `tz` argument can be used to return today's date in the specific timezone.
utcnow.today(tz)

# Calculate the time difference between two timestamps.
utcnow.timediff(begin, end, unit)

Precision in modifier and utcnow.timediff
Added modifier and timediff support for milliseconds, microseconds and nanoseconds (although nanosecond precision will currently not use native nanoseconds, and will return microseconds * 1000).
Common modifier multipliers:

"s" (seconds)
"m" (minutes)
"h" (hours)
"d" (days)

Precision modifier multiplicers (new):

"ms" (milliseconds)
"us" (microseconds)
"ns" (nanoseconds)

Deprecation warnings
Added deprecation warnings to all other non-standard transformation functions (that will still work for the time being) – for example utcnow.as_str, utcnow.get_unixtime or utcnow.datetime, etc.

Refactoring
Major refactoring of the library to actually use a ModuleType instead of creating a class object (that was used as a faked module) when importing utcnow.
Previously
>>> import utcnow

>>> type(utcnow)
<class 'utcnow._module'>

>>> len(dir(utcnow))
197 (exported items from module / class)

After refactoring
>>> import utcnow

>>> type(utcnow)
<class 'module'>

>>> len(dir(utcnow))
23 (exported items from module)

Codecov Report
All modified lines are covered by tests :white_check_mark:

Comparison is base (dbd6977) 100.00% compared to head (f90e358) 100.00%.
Report is 4 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##            master      #133   +/-   ##
=========================================
  Coverage   100.00%   100.00%
=========================================
  Files            8         8
  Lines          549       568   +19
=========================================
+ Hits           549       568   +19

Files
Coverage Δ

utcnow/__init__.py
100.00% <100.00%> (ø)

utcnow/interface.py
100.00% <100.00%> (ø)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


sap.f.FlexibleColumnLayout: Navigating back to non-initial page causes error

URL (minimal example if possible): https://embed.plnkr.co/kJtj4g/
Steps to reproduce the problem:

Open the above example page
Open the browser console to be able to see the error later
Navigate to Detail (or DetailDetail) page
Navigate back by pressing the back button of the browser or press [Alt] + [Left arrow].

What is the expected result?
App navigates back successfully without error.
What happens instead?
App navigates back but then UI5 returns an error saying

Element sap.m.NavContainer#__component0---rootView--fcl-beginColumnNav: Cannot navigate backToPage('...') because target page was not found among the previous pages.

Any other information? (attach screenshot if possible)

When navigating from "master" (which was not an initial page) to ["master", "detail"] targets, the newly navigated view is not pushed to the _pageStack (which explains the back navigation error). Instead, the code exits earlier giving the following warning:

sap.m.NavContainer#__component0---rootView--fcl-...: Cannot navigate to page ... because this is the current page.

Somehow the oFromPage is already the target page even though I've never navigated to the target page before.

This also prevents invoking registered handlers for midColumnNavigate and endColumnNavigate events.
Only the handler for beginColumnNavigate gets invoked when navigating through.

Hello @boghyon,
Thank you for sharing this finding. I've created an internal incident<PHONE_NUMBER>. The status of the issue will be updated here in GitHub.
Regards,
Daniel

Hello, thank you for your report!
Let me give you some background: when you go back with the browser back button, the router navigates from your current route (let's say with 3 targets) to your previous one (with 2 targets) and since the views in the first 2 columns are the same, it navigates back to the same view (which used to produce the error in specific circumstances, namely when there is more than one page in the NavContainer stack). This had no side effects apart from the error in the console. Now the redundant back navigation is prevented in the first place.
Regards,
Vladislav


ReplaceOneBusinessKeyFilterStrategy (Avro-Schema) - compound keys do not seem to be working correctly

I created a schema that looks something like this
schema = {
    "type": "record",
    "name": "TestPricingData",
    "namespace": "com.runtitle.data.kafka.avro",
    "doc": "Test Pricing Record",
    "fields": [
        {"name": "source_system_id", "type": "string"},
	{"name": "source_record_id", "type": "string"},
        {"name": "indexes", "type": { "type": "array", "items": "string"}},
        {"name": "raw_acres", "type": "int"}
    ]
}

the first two fields source_system_id and source_record_id together form a BusinessKey. My mongo sink config looks like this
config = {
  "name": "mongo-sink-pricing-data",
  "config": {
    "topics": "pricing-data",
    "connector.class": "at.grahsl.kafka.connect.mongodb.MongoDbSinkConnector",
    "key.converter": "io.confluent.connect.avro.AvroConverter",
    "key.converter.schema.registry.url": "http://kafka.schema:8081",
    "value.converter": "io.confluent.connect.avro.AvroConverter",
    "value.converter.schema.registry.url": "http://kafka.schema:8081",
    "mongodb.connection.uri": "mongodb://docker.for.mac.localhost:27017/titletime?w=1&journal=true",
    "mongodb.document.id.strategy": "at.grahsl.kafka.connect.mongodb.processor.id.strategy.PartialValueStrategy",
    "mongodb.key.projection.list": "source_system_id, source_record_id",
    "mongodb.key.projection.type": "whitelist",
    "mongodb.collection": "pricingData",
    "mongodb.replace.one.strategy": "at.grahsl.kafka.connect.mongodb.writemodel.filter.strategy.ReplaceOneBusinessKeyFilterStrategy"
  }
}

However if I send two successive messages where I keep the same source_system_id and change the source_record_id, instead of creating a new record it updates the existing record. For e.g.
Message 1 - {source_system_id: "SYS1", source_record_id: "REC1"}
results in DB record
{_id: ObjectId("5ac704819b0241d8b69ad276"), source_system_id: "SYS1", source_record_id: "REC1"}
However if now i send
Message 2 - {source_system_id: "SYS1", source_record_id: "REC2"}
Instead of creating a new record, it updates the same record to
{_id: ObjectId("5ac704819b0241d8b69ad276"), source_system_id: "SYS1", source_record_id: "REC2"}
Recording the issue here, I will be looking into this at my end as well.

Thx @adamarla for reporting this. I'll look into it to see what could be wrong.

@adamarla I just tried your example and found what is wrong. A minor issue which should definitely be addressed with a fix but nothing to really worry about :) The problem you are facing is related to whitespaces for the field projection settings. There is a space before the second field in the key list which is not trimmed. In fact all K/V projections are affected by this so in the meantime please make sure not to have whitespaces in the config when defining the lists. For me writing the config like this works:
{"mongodb.key.projection.list": "source_system_id,source_record_id"}
Can you please verify it on your side and report back if it works?

Looks good. The behavior looks in accordance with the explanation.


MicroWin - Explorer.exe freezes when double clicking any drive.

I was playing with the MicroWin ISO modifier (no drivers added during the creation of the image ) to install Windows 11 Pro. The system is an AMD Ryzen 3600 CPU system with an Asus Strix B550 Gaming Wifi, Explorer.exe freezes when trying to access ANY drive listed.
Image Version: Win11_23H2_EnglishInternational_x64v2
Reinstalled twice from new images and installed the latest AMD chipset drivers, also used the Wintool System Corruption Scan and it did not fix the issue.
Everything else loaded and appeared to work as expected. Had to revert back to installing the unadulterated version Win11_23H2_EnglishInternational_x64v2.

someone provided a version of a fork with a supposed fix for this but it has since been removed, this is still a reocurring issue

I have experienced exactly the same behavior on my AMD Ryzen 5900x CPU on MSI B450 Tomahawk Max using the microwin.iso I created starting from latest 23h2. Had to reinstall one more time from scratch using the official image from Microsoft.
As I already explained into Discussion section, this microwin.iso file is kinda fine into virtual environment where I created a virtual machine from this iso. I am using Vmware workstation PRO v17. I haven't included any drivers when I created the microwin.iso either....
Any chances to repair this blocking issue?
Thanks.

I've found a temporary fix from #1276
Basically you need to start EventLog service and set it to Automatic.

Actually the issue is happening into my VM as well.
The temporary fix is working, just set Windows Event Log to Automatic and reboot, manually start doesn't help.
Thanks!

I've made a temporary workaround in MicroWin-Helper.ps1 that detects if the service is "EventLog" and skips it.
It's in PR #1346

Actually the issue is happening into my VM as well. The temporary fix is working, just set Windows Event Log to Automatic and reboot, manually start doesn't help. We need to wait some time until everything will be merged into the main branch. Thanks!

When you set it to automatic does explorer start working or it is still having issues? I'mm wondering if you are still seeing issues is it soemthing else and not the EventLog issue.


Solve NoMethodError for fog providers that do not provide the 'addresses' method to the 'server' object

see https://apidocs.joyent.com/cloudapi/#CreateMachine

Thanks for getting this!  The solution here is for this is to override the method in https://github.com/chef/chef-provisioning-fog/blob/master/lib/chef/provisioning/fog_driver/providers/joyent.rb:
def find_floating_ips(server)
  []
end

Terribly sorry for the late review, post-ChefConf madness destroyed my availability for a bit.

@jkeiser No problem. I made the change(s) in my repo, guess it may be merged now.

Associated with issue #118

LGTM.

@SIGUSR2 Seems odd that this works when the signature doesn't match the superclass method:
def find_floating_ips(server, action_handler)

But if it works, it works.

@randomcamel It probably does not. This PR was made when the method had only one argument. Fix added. Hope it will be merged before the method ends up having 3 or more arguments.

@SIGUSR2 Touché.

@randomcamel Thanks :)


Detect closed set of possible values and suggest an enum

This seems hard to detect, but there might be some good ways through spoon:

get all assignments of a variable and check if only literals of the same type are assigned to it (note: see redundant array lint for how to compare ctliterals, because short s = 0 is doing an implicit cast, so the rhs is of type int, which may be problematic for comparison)
in most cases the variable is read from stdin, so instead one could look for a closed set of possible values the program compares the variable to
this can be switching over all possible values (maybe with constants, so a constant resolver would be nice, see #22)
comparing it with an if would be another option

Example for obvious case:
private static final char[] VALID = {'R', 'x', 'X', '|', '\\', '/', '_', '*', ' '};

Potential false-positives
String weekday = "monday";
switch (weekday) {
  case "monday" -> return WeekDay.MONDAY,
  case "tuesday" -> return WeekDay.TUESDAY,
  case "wednesday" -> return WeekDay.Wednesday,
  // ...
  default -> throw new IllegalStateException(),
}

The potential false-positive is actually not a false positive. The string should be an associated attribute, so one can instead do:
for (WeekDay day : WeekDay.values()) {
    if (day.name().equals(weekday)) {
        return day;
    }
}

throw new IllegalStateException();


[camera] Use background method channel on iOS

Camera plugin maintains a dispatch_queue to manually dispatched all the method channel calls to the background thread:
https://github.com/flutter/plugins/blob/master/packages/camera/camera/ios/Classes/CameraPlugin.m#L1354-L1366
This introduce additional thread hops. It is also error-prone. See: https://github.com/flutter/flutter/issues/59124 and description in https://github.com/flutter/plugins/pull/4619
We should migrate this plugin to use the background method channel introduced in https://github.com/flutter/engine/pull/29665, which was unfortunately reverted in https://github.com/flutter/engine/pull/30289
Once a similar solution lands in engine, the camera plugin should utilize it so it doesn't need to maintain its own queue.
blocked by https://github.com/flutter/flutter/issues/95426
CC @gaaclarke @hellohuanlin

Dropping to P5, since the plan to fix the threading model turned out not to benefit much from background channels. It's still an nice to have to reduce thread hopping slightly though.

turned out not to benefit much from background channels

Just an asterisk.  The results were complex.  On iOS local testing microbenchmarks the serial channels were 40% faster, but on devicelab they were the same.  On android local testing the microbenchmarks for serial channels was slower ( can't recall the percentage ), but on devicelab they were faster.  Also on Android the results varied based on the OS throttling of the platform thread.
That's if you are using serial channels, if you use concurrent channels the performance gains are more clear.
There is also the macro perspective where many plugins using background platform channels will perform better since they are using a shared thread pool.  So, they are better citizens in that respect.
How should users interpret that?  They should use them when authoring new code.  When migrating old code, it is higher priority if you can take advantage of concurrent task queues, but everyone that can use them should eventually.

turned out not to benefit much from background channels

Just an asterisk. The results were complex.

This comment wasn't about performance, it was about the iOS implementation design overall (specifically "the camera plugin should utilize it so it doesn't need to maintain its own queue"). Camera turns out to need several queues for specific purposes, and because of their needs the design doesn't fundamentally change much when using background platform channels.


56 impllement searchbar

Added a search bar re-directing to any book titled link in Data.json

[Leaving a comment here to note that the group worked on this while in person and discussed the functionality offline]


Some minor fixes

Check the commit messages of:
Set ssh_extra_args to ssh_args by default
Try to handle ssh host key changes
hLinux workaround for python-selinux package install
Note that right now github is showing me a horrible mess for this PR even though I rebased. I'm not sure if this is something you can fix if/when you merge, or if I can somehow cleanup this PR?

As for the github mess, maybe it would be better if you did the PR from SoneraCloud/ansible-role-users/hlinux-workaround branch instead of SoneraCloud/ansible-role-users/master ?
At least if I do a compare like that:
https://github.com/CSC-IT-Center-for-Science/ansible-role-users/compare/master...SoneraCloud:hlinux-workaround
Then there's only three commits which are the same that you typed out in the PR above:

@peterjenkins1	Peter Jenkins + peterjenkins1	Set ssh_extra_args to ssh_args by default  …			ca11a12
@peterjenkins1	Peter Jenkins + peterjenkins1	Try to handle ssh host key changes  …			62e6951
Peter Jenkins	hLinux workaround for python-selinux package install			5f9edb5

I opened PR 29 to clean this up.


Reduce use of unsafe by using libc crate

I see that whoami used to depend on libc until commit 12d9910408e8, but the commit doesn't explain why. Are you open to a PR that adds back a dependency on libc to avoid unsafe and reimplementations of its functions?

The original reason was so that whoami has no dependencies outside of std.  Which admittedly may not be the best reason.  I am not super happy with the idea of adding libc as a dependency, since they don't have a policy for MSRV yet (although this is already a problem with the required dependencies on wasm):

The minimum supported Rust toolchain version is currently Rust 1.13.0. (libc does not currently have any policy regarding changes to the minimum supported Rust version; such policy is a work in progress.)

That said, I don't expect libc's MSRV to exceed 1.40.0 before I'll stop updating/supporting the 1.0.0 track (2018 edition) and only update the 2.0.0 track (2021 edition) in 2024.
Also, adding libc as a dependency would not get rid of unsafe.  That would require a dependency on nix, but that would have to be whoami version 2.0.0, since whoami doesn't upgrade MSRV without a major version bump.  I'm a bit hesitant to add that crate as well, since it would increase the amount of maintenance I have to do on this crate (for every minor version bump, and quickly for security vulnerabilities found in that crate/dependencies that require a minor version bump - which could bump MSRV).

Okay, it sounds like we'll have to live with the unsafe blocks then. Feel free to close.

Might revisit using nix in the future, but closing for now.


Panic on Deno.emit

I have this file which watches when src/View.tsx changes.
To recreate clone the repo, run src/build.ts and edit src/View.tsx.
thread 'main' panicked at 'Error 'Unable to output bundle during Graph::bundle().' contains boxed error of unknown type:
  Error { context: "Unable to output bundle during Graph::bundle().", source: load_transformed failed

Caused by:
    0: failed to analyze module
    1: failed to resolve https://esm.sh/react from <file:///home/luca/OneDrive/Skole/Programmering/RockPaperScissors/src/View.tsx>
    2: The graph is missing a dependency.
         Specifier: https://esm.sh/react from file:///home/luca/OneDrive/Skole/Programmering/RockPaperScissors/src/View.tsx }
  Error { context: "load_transformed failed", source: failed to analyze module

Caused by:
    0: failed to resolve https://esm.sh/react from <file:///home/luca/OneDrive/Skole/Programmering/RockPaperScissors/src/View.tsx>
    1: The graph is missing a dependency.
         Specifier: https://esm.sh/react from file:///home/luca/OneDrive/Skole/Programmering/RockPaperScissors/src/View.tsx }
  Error { context: "failed to analyze module", source: failed to resolve https://esm.sh/react from <file:///home/luca/OneDrive/Skole/Programmering/RockPaperScissors/src/View.tsx>

Caused by:
    The graph is missing a dependency.
      Specifier: https://esm.sh/react from file:///home/luca/OneDrive/Skole/Programmering/RockPaperScissors/src/View.tsx }
  Error { context: "failed to resolve https://esm.sh/react from <file:///home/luca/OneDrive/Skole/Programmering/RockPaperScissors/src/View.tsx>", source: The graph is missing a dependency.
  Specifier: https://esm.sh/react from file:///home/luca/OneDrive/Skole/Programmering/RockPaperScissors/src/View.tsx }
  MissingDependency(Url { scheme: "file", cannot_be_a_base: false, username: "", password: None, host: None, port: None, path: "/home/luca/OneDrive/Skole/Programmering/RockPaperScissors/src/View.tsx", query: None, fragment: None }, "https://esm.sh/react")', cli/errors.rs:32:7
stack backtrace:
   0:     0x559af2eaf860 - std::backtrace_rs::backtrace::libunwind::trace::h34055254b57d8e79
                               at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/std/src/../../backtrace/src/backtrace/libunwind.rs:90:5
   1:     0x559af2eaf860 - std::backtrace_rs::backtrace::trace_unsynchronized::h8f1e3fbd9afff6ec
                               at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x559af2eaf860 - std::sys_common::backtrace::_print_fmt::h3a99a796b770c360
                               at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/std/src/sys_common/backtrace.rs:67:5
   3:     0x559af2eaf860 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h32d1f94a80615d18
                               at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/std/src/sys_common/backtrace.rs:46:22
   4:     0x559af2eda76c - core::fmt::write::h306731c068f7162c
                               at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/core/src/fmt/mod.rs:1110:17
   5:     0x559af2ea6f65 - std::io::Write::write_fmt::hd2fa90334eee2a21
                               at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/std/src/io/mod.rs:1588:15
   6:     0x559af2eb206b - std::sys_common::backtrace::_print::h5abaa2601a852287
                               at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/std/src/sys_common/backtrace.rs:49:5
   7:     0x559af2eb206b - std::sys_common::backtrace::print::h8d81445442bb638f
                               at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/std/src/sys_common/backtrace.rs:36:9
   8:     0x559af2eb206b - std::panicking::default_hook::{{closure}}::hcfe804496a9fa747
                               at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/std/src/panicking.rs:208:50
   9:     0x559af2eb1b41 - std::panicking::default_hook::hbea8e3ccf2ba8901
                               at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/std/src/panicking.rs:225:9
  10:     0x559af2eb28a4 - std::panicking::rust_panic_with_hook::h7ee9e1a2d0f8975a
                               at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/std/src/panicking.rs:622:17
  11:     0x559af2eb2357 - std::panicking::begin_panic_handler::{{closure}}::h8ab3b4491718b2c7
                               at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/std/src/panicking.rs:519:13
  12:     0x559af2eafd5c - std::sys_common::backtrace::__rust_end_short_backtrace::hd489062ffa586a9f
                               at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/std/src/sys_common/backtrace.rs:141:18
  13:     0x559af2eb22b9 - rust_begin_unwind
                               at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/std/src/panicking.rs:515:5
  14:     0x559af2eb226b - std::panicking::begin_panic_fmt::h5479575e112541f8
                               at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/std/src/panicking.rs:457:5
  15:     0x559af3175d7f - deno::errors::get_error_class_name::{{closure}}::h555be96669dc0508
  16:     0x559af3175c65 - deno::errors::get_error_class_name::hc53a468b6a7e0056
  17:     0x559af3135b8c - deno_core::ops::serialize_op_result::ha3c91cca8892120d
  18:     0x559af31334d7 - <futures_util::future::future::Map<Fut,F> as core::future::future::Future>::poll::h4f9ac6385426b605
  19:     0x559af34b0ba1 - <futures_util::future::future::Inspect<Fut,F> as core::future::future::Future>::poll::h3afd9a55a48c9791
  20:     0x559af3dc972c - futures_util::stream::stream::StreamExt::poll_next_unpin::h6cddc911e30b59f8
  21:     0x559af3dfc613 - deno_core::runtime::JsRuntime::poll_event_loop::h56ad98eb21fe2a48
  22:     0x559af30f199c - <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::h70b464e1da7dba08
  23:     0x559af30ce0b8 - <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::h1867f44bc5d05bdf
  24:     0x559af321070a - deno::run_command::{{closure}}::h8bffcf42eeca1b16
  25:     0x559af30ec98a - <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::h66f6b40344212a88
  26:     0x559af312dbab - <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::hfc82e3dd74d84ae7
  27:     0x559af3214ac0 - deno::main::hdf4c5c410d3bcbba
  28:     0x559af2f6e808 - std::sys_common::backtrace::__rust_begin_short_backtrace::h201585956898e09e
  29:     0x559af2f7434a - std::rt::lang_start::{{closure}}::hb862bae09ce38319
  30:     0x559af2eb2ea9 - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::h2aabc384aab89b7b
                               at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/core/src/ops/function.rs:259:13
  31:     0x559af2eb2ea9 - std::panicking::try::do_call::hc5fcacb7a85fc7b1
                               at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/std/src/panicking.rs:401:40
  32:     0x559af2eb2ea9 - std::panicking::try::hb5d9603af3abbe3a
                               at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/std/src/panicking.rs:365:19
  33:     0x559af2eb2ea9 - std::panic::catch_unwind::h98fe6ac3925e64b4
                               at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/std/src/panic.rs:434:14
  34:     0x559af2eb2ea9 - std::rt::lang_start_internal::h22ac7383c516f93e
                               at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/std/src/rt.rs:34:21
  35:     0x559af322ae63 - main
  36:     0x7f130f3ffb25 - __libc_start_main
  37:     0x559af20b102a - _start
  38:                0x0 - <unknown>

I forked the repository and upgraded to the latest version of deno_emit, and I could not reproduce the issue.

Can confirm, seems like it's been fixed.
Thanks for looking into this @yacinehmito :D


Not working properly on mobile Safari?

Is there any special thing I need to do to make it work on iPhone Safari? Its not working properly.
It loads and the images change initially, but they change very jumpily not smooth like Desktop.
Then they stop after a few loops.
Desktop works fine, very smooth and continuous looping.
Thanks

if you are using [ data-shy="true" ] this seems to stop the images loading and running on a iPhone, if you remove it I have found the images work as expected.

Sorry should have added my code, its just copied from a demo page:

This works on iPhone and iPad...

Its strangely working on my original code now, but all I did was change images. The new images are more optimised, maybe its to do with that.
But its very jumpy on mobile. Its skipping images and not smooth.
See these videos (sorry bad quality I cant upload screen recordings here and so converted to gif, but you can see the difference, same code).

@amityweb any solution?

The above problem cleared up on its own for some reason. But the phone still is not the same as the Desktop, its much slower. And therefore you can see it jittering from frame to frame as its slow.
So no I dont have a solution to the problem that mobiles do it different sorry. I have an iPhone X and using Safari so its not like its an old phone or anything.

@amityweb Thank you! :")
so let's wait if anyone have the solution or a new update.

@amityweb
I just wanted to let you know that I can confirm it has to do with large images causing this. I had the same issue with images being way too large and it seems to crash this plugin. As soon as I optimized them I had no issues.


defParamToFutureAny failing with slow connection

I have this problem with both 0.10.x and 0.11.0 (haven't tried with any other versions) where future service response (nor error) is not received in controller code when simulating slow network using chrome browser.
in lift snippet using:
.defParamToFutureAny("getTickets", (fromDate:FromDate) => IssueService.getTickets(sessionUserId, fromDate))

where getTickets is defined as:
def getTickets(userId: FetcherObjectId, page: FromDate): Future[JValue] = { ... }

and in corresponding controller code calling service function:
postsService.getTickets(page).then(function(response) {
  console.log("response getOverview", response)
  ...
}, function(error) {
console.log("error", error)
})

If I instead wait for future completion using Await.result(getTickets) and return Box[JValue] as opposed to Future[JValue] then response is received and processed.
With no network throttling is works perfectly well.
I don't see any timeout messages or other errors.
Suggestions appreciated. Unless there is valid reason for not using defParamToFutureAny and rather defParamToAny I'd prefer working with futures.
Thanks
Colin

Interesting find, Colin! I'll take a look hopefully soon. As an FYI in case you have time to do more investigating: lift-ng's future support is implemented via comet pushes. So this could be more about the behavior of comets under your slow network simulation.

Thanks Joe, my suspect is comet. Got a little more else to do to demo system and then I will experiment for more. For now I am wrapping future response in Await so I can continue.
Always happy to help where I can. Sad thing this is a large project so hard to share code but will most probably create smaller project to mess around with.

Definitely set up a repo for a small Lift project to reproduce problems. That's what I made my lift-help repo for. I use it all the time.

I have created small repo demonstrating the problem. Haven't had a chance to dig in yet but demo shows the issue and demo's future call, sync call and delayed sync call.
https://github.com/colinbes/lift-3

Haven't had a chance to dig deeper into this yet, hopefully soon as project is nearing an end and I'd like to remove my Await wrappers.

Was wondering if you've had a chance to look into this yet?

I believe I recently discovered this same issue and fixed it. I ran your project against lift-ng 0.12.0-RC3 and was no longer able to reproduce the problem. Note that you will need to import AngularExecutionContext._ for your lift-ng service in place of the usual ExecutionContext.global import.

Sweet, I will give it a test drive!

I confirm that changes to 0.12.0-RC3 work!


Program to find second largest element in a list

@Dude-901 Pls review this PR.

@priyadarshan1995 please try to add more comments in the function part to make the code more understandable. I am adding it for now, but please try to update it soon :)

sure @Dude-901 , will do.


New crash with 0.3.3 UnexpectedTokenException

I have a test that just started throwing:
internal.UnexpectedTokenException: '\r' (L1)
On this data:
[[events]]
id = 1
order = 0
date = "Date 1"
content = """
Content 1"""

[[events]]
id = 2
order = 1
date = "Date 2"
content = """
Content 2"""

[[events]]
id = 3
order = 2
date = "Date 3"
content = """
Content 3"""

?? That's weird. It's definitely due to "\r\n" thing, which I did have tests for them.
Will fix it tomorrow.

That looks to have fixed it, thanks!


Documentation:  assert_ functions missing roxygen documenation

Please select a category the issue is focused on?
Function Documentation
Let us know where something needs a refresh or put your idea here!

These should have roxygen headers added to them

It seems that assert_list_of_formulas() is never used. Should we remove it?

Yes, no need to keep legay code.


With Requery is possible to apply migration?

Hi, i want to use this database in production app and that question is important to me ))
Thanks!

What kind of migration do you mean? Most types of migrations in production are done with sql scripts, there are some libraries like flyway that do just migrations. This project is more of a persistence framework although it does have a schema generator and some upgrade logic. Hope that answers your question.


Simplify thread blocking tests

Follow up from https://github.com/rust-lang/miri/pull/3939#discussion_r1855367789 to simplify the thread blocking test.

@rustbot ready

What about the other tests doing similar things?

tests/fail-dep/libc/eventfd_block_read_twice.rs
tests/fail-dep/libc/eventfd_block_write_twice.rs

@rustbot author

Looks good, thanks. :) Please squash.
@rustbot author

@rustbot ready