plugins: Allow to use shared modules with the import syntax

This will allow plugin writers to import React and other modules
without having to install them and without having webpack bundle them
as they will be available when importing the plugin's code in Headlamp.
TBD:

[x] Install the shared modules in @kinvolk/headlamp-plugin so they show up in its node_modules
[x] Make VSCode find the shared modules (in the @kinvolk/headlamp-plugin/node_modules), using a jsconfig.json file
[x] Share also the Headlamp's modules, not just npm shared modules (non-headlamp ones)
[x] Offer a better way to call registerPlugin

fixes #324
cc/ @illume , @ashu8912

This should be good to test now. It ships the shared modules we promote in Headlamp's plugins (@material-ui, react, etc.), type declarations for Headlamp's modules are shipped, js/tsconfig is configured to find the modules, webpack config will replace shared module imports by the respective globals.
I'd like to be sharing less type declarations than we are but they seem to be tied together as dependencies. Also we should check whether we need to ship the transpiled js files.

I was thinking how we could have a test for this so it keeps working...
How about running the type checker and linter on the example plugin? This would help us know this functionality keeps working.
The plugin test uses npm link and npx, so it works with the version of the plugin code that's checked in and not the version that's released. See headlamp/plugins/headlamp-plugin/test-headlamp-plugin.sh


Messaging namespace

I stumble upon the fact that every page I create seems to be created in the wrong namespace.
I found out that every page already in the template use the namespace Messaging regardless of the name of the application.
For example:
I create a new application using the template 10 template with the name example.
I open MainPage.xaml and the Page starts with:
<Page x:Class="Messaging.Views.MainPage"       xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"       xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"       xmlns:Core="using:Microsoft.Xaml.Interactions.Core"       xmlns:Interactivity="using:Microsoft.Xaml.Interactivity"       xmlns:controls="using:Template10.Controls"       xmlns:d="http://schemas.microsoft.com/expression/blend/2008"       xmlns:local="using:Messaging.Views"       xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"       mc:Ignorable="d">
If I create a second Page named MainPage1.xaml the page starts with:
`
Am I missing knowledge of a design patern here? Can someone please guide me into the right direction with this issue?
Thank you!

Please upgrade the T10 extension to version 1.7, and Nuget library to 1.1.3.


go/ast: CommentMap example does not compile

Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (go version)?
go version go1.8 darwin/amd64
What operating system and processor architecture are you using (go env)?
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/ritesh/code/go"
GORACE=""
GOROOT="/usr/local/Cellar/go/1.8/libexec"
GOTOOLDIR="/usr/local/Cellar/go/1.8/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/5x/m5n_f_wj6fngljvf9g7y3mp4qphpn9/T/go-build111820297=/tmp/go-build -gno-record-gcc-switches -fno-common"
CXX="clang++"
CGO_ENABLED="1"
PKG_CONFIG="pkg-config"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
What did you do?
Tried to run the example in https://golang.org/pkg/go/ast/#example_CommentMap. A link to the full program, with imports, is here:
https://play.golang.org/p/5DA91qtnm4
What did you expect to see?
Expected the example to run, without any errors.
What did you see instead?
tmp/sandbox659516205/main.go:44: undefined: removeFirstVarDecl

The example is not rendered as a runnable example (we have examples that cannot be ran in the playground and we render them without the run button) so IMHO you shouldn't expect it to actually be runnable.
The purpose of the example is to show how to use CommentMap and you can treat removeFirstVarDecl as a black box (that does what it says in the name) while reading the example's code.

Thanks for the quick response!
That's a fair point. However, I think there's some value in making this particular example close to runnable/runnable especially for a concept that's difficult to grasp for beginners like me.  Adding in the imports and removing the call to removeFirstValDecl is all that's needed to get it to run.

If we can make it runnable without losing clarity, I think we should do it.

I would like to claim this issue.


Game Save and Load Helper Utilities

Describe the extension
We've seen a lot of folks on the forums and discord asking about how to save. While I have a system that I figured out for the game I'm working on, some users don't understand the screenshots or instructions on how to deal with things like Storage vs Filesystem, Structure Variables, converting to/from JSON, etc.
This extension tries to simplify those concepts and automates some of them for the user.  While the long term goal is to add actions for both filesystem and storage saving, right now this extension allows for the following:

Adding string data to  "GameSave" data
Adding number value data to a "GameSave" data
Save all GameSave data to a user defined storage location
Load all GameSave data from a user defined storage location

Checklist

[X] Extension has a proper name and description.
[X] Extension has tags (for example: "platform, brick, breakable").
[X] All behaviors have a description.
[X] All functions (actions, conditions, expressions) have descriptions.
[X] I confirm that this extension can be intergrated to this GitHub repository, distributed and MIT licensed.

Extension file
Extension file: SaveLoadHelper.txt
JSON File saved as .txt due to GitHub limits.
Commented Example Project:
GameSaveUtilitiesExample.zip
Please let me know if people find this useful or not, as I consider this a "Version 0.5" right now, but didn't want to spend more time implementing the filesystem actions if it wasn't useful.

Hi, I am not sure if you are still looking to add this,
But still here are some suggestions,

In the function "AddIntegerToSave" ToNumber(GetArgumentAsString("Data")). but I think GetArgumentAsNumber("Data") will work fine

Adding expressions to get attributes might be better to avoid accidental changes done to the GameSave variable, and easier reading of attributes

An icon could be added

Having variables with _YourExtensionName might help reduce conflicts, http://wiki.compilgames.net/doku.php/gdevelop5/extensions/best-practices#variable_names

:)

I persist to think this extension is useful.
The basic idea of the app is precisely to have a level of abstraction on code.
The structures are not complicated when you understand them, but use this extension is simpler and that's the basic idea of GD, hide the difficulty and by domino effect the syntax.
So even if this extension is a simple wrapping I think it has its place.
This raises another problem at the root of all reviews on extensions: There is a concern to evaluate the relevance of an extension that is a simple envelope or an extension that is an envelope but that really simplifies.


fix pip to pip3

@trp07
pip will create a soft link to pip3 for people who only have python3 installed. IN this case it doesn't matter if pip or pip3 are used.
But for those who have both Py2 and Py3 installed it could be an issue if they use pip install vs pip3 install.
They may want to install packages for Py 3, but if they use pip install, they will install for Py 2.
It's small fix and can save trouble. SImilar for installation guide in Wiki.

Coverage remained the same at 99.315% when pulling 7a1e29bc05f16b67c9c85743d02eed2cb281449f on Mat001:pip3fix into f0c15c81a6dee0fc219fce3ee3b5adb581f78bcd on trp07:master.

Coverage remained the same at 99.315% when pulling 7a1e29bc05f16b67c9c85743d02eed2cb281449f on Mat001:pip3fix into f0c15c81a6dee0fc219fce3ee3b5adb581f78bcd on trp07:master.


indexing fusion final

single arange kernels work beautifully,

[x] kernels with multiple (distinct) aranges should pad
[ ] push through different views of the same LazyBuffer

Tomorrow:

TestIndexing.test_advancedindex and add more like it in test_schedule
Merge the inline const fix #5840 for argmax
Test fused arange children TestOps.test_interpolate_bilinear


Grammar?

It'd be great if one of the inputs for the compiler was the grammar? or at least making the grammar for the language more clear in terms of how it's ensured in the program.

Yeah, I've received the feedback that I need more examples of inputs/outputs.
I don't want to add any more complexity to the actual code though

@thejameskyle Great work though, it's super cool seeing stuff like this; reminds me of Uni


Android Dynamic Delivery confusion

What is the best way to deal with Android Dynamic Delivery?
The assumption here is that part of Android app (com.android.dynamic-feature module) will be downloaded latter at some point. Assuming this dynamic Android module contains Kodein module is there any way to dynamically add it to kodein dependency tree?
Current solution works fine when all modules are known at app start.
class MyCustomApplication : KodeinAware {
    override val kodein = Kodein.lazy {
        import(androidXModule(this@ShowcaseApplication))
        import(appModule)
    }
}

However with Android dynamic modules
class MyCustomApplication : KodeinAware {
    override val kodein = Kodein.lazy {
        import(androidXModule(this@ShowcaseApplication))
        import(appModule)
    }

	//...
	fun onFeatureAlbumModuleDownloaded() {
		// retrieve insatnce of kodein module from the
        // downloaded module via reflection

		//Add it somehow to "App level kodein"?
    }
}

Hello,
If you're sure the Kodein container won't be needed before downloading your module you could use a override lateinit var kodein: Kodein, and then define it like:
fun onFeatureAlbumModuleDownloaded() {
      // ...
        kodein = Kodein {
            import(androidXModule(this@DemoApplication))
            import(appModule)
            import(downloadedModule)
        }
      // ...
}

As its a var, you could also override it:
override lateinit var kodein: Kodein

init {
    kodein = Kodein {
        import(androidXModule(this@DemoApplication))
        import(appModule)
    }
}

fun onFeatureAlbumModuleDownloaded() {
    // ...
    kodein = Kodein {
        extend(kodein)
        import(downloadedModule)
    }
    // ...
}

but I wouldn't recommend it as mutability of the container is dangerous

This is the problem I am not sure, even more, I want to be able to fully utilize Android Dynamic Delivery, so modules will be downloaded only when actually needed.
This leads to the conclusion that we need a way to dynamically register module at any point of time sth. like:
rooKodein.registerNewModule(kodeinModule)
Above assumes that each Android dynamic module provides kodein module that can satisfy his dependencies (to be specific both kodein module stored in Android app module + kodein module stored in dynamic feature satisfy the dependencies).

Hi @igorwojda,
Have you taken a look at Configurable Kodein?
I believe it fits exactly your need.
https://kodein.org/Kodein-DI/?6.3/configurable

Thx for the suggestion.
So going through docs and code I still try to connect all the puzzlers together.
I think ConfigurableKodein maybe what I need indeed, but I would appreciate a bit more clarification.
1. Performance penalty
Note that every time a ConfigurableKodein is mutated, its cache is entirely flushed, meaning that it has a real impact on performance!
Considering these methods...
configurableKodein.addImport()
configurableKodein.addImport()
configurableKodein.addExtend()

Is the flushing entire cache happens every time one of these methods is called?
2. Add module without clearing cache
This is a bit connected to prev question. Is it possible to achieve such a solution without clearing cache all the time?
eg.
-appKodeinModule
---featureProfileKodeinModule
---featureFavouritesKodeinModule

Now I want to add another module from a dynamically downloaded feature. Can I "just add it" without clearing cache?
(I know am mutating Kodein tree here, but in reality, I am adding dependencies. Each class is prefixed with the feature module package name, so there are no conflicts. If some dependency would be duplicated this would be a dev bug due to incorrect package name, so a crash is welcome)
3. Android integration
What is the best way to integrate ConfigurableKodein withing the Android App?
Assuming Kodein.lazy is recommended starting point...
class ShowcaseApplication : SplitCompatApplication(), KodeinAware {
    override val kodein = Kodein.lazy {
        import(androidXModule(this@ShowcaseApplication))
        import(appModule)
    }
    ...
}

...should it be simply replaced with ConfigurableKodein like this?
class ShowcaseApplication : SplitCompatApplication(), KodeinAware {
    override val kodein = ConfigurableKodein().apply {
        addImport(androidXModule(this@ShowcaseApplication))
        addImport(appModule)
    }
    ...
}

4. External sources
I wonder why ConfigurableKodein does not support externalSources? Is there assumption that dependencies may be added so the fallback will never be needed? or there was no request for this feature?

Performance penalty

Nope, if I understand the configurable module, the container will be built at the first retrieval.
Thus, the cache might be cleared at first mutation.

Add module without clearing cache

I think that if there has been retrieval between mutations the cache will be cleared.
The Kodein container can't know in advance that your modules are not related, and that naming are different,
so the container will be refresh, thus the cache cleared.
Nevertheless, this could be featured, but not sure this would be done quickly as we have lot of stuff on the roadmap.

Android integration

Sure this is right. You could also retrieve the kodein container with the closesKodein() method :)

External sources

ConfigurableKodein is a Kodein object so, you can use external sources aswell.
override val kodein = ConfigurableKodein(mutable = true).apply {
    addConfig {
        externalSources += ExternalSource {
            //...
        }
    }
}

Hope @SalomonBrys could corroborate my remarks, or extend them.

Hi @igorwojda,
Did you still need help on this one ? Otherwise I will close the issue

I made it work with dependency inversion and a bit of reflection to dynamically retrieve KodeinModuleProvider. I am happy with the solution for now, so I will close this issue.
Here is a reference to my solution:
https://github.com/igorwojda/android-showcase/blob/master/app/src/main/java/com/igorwojda/showcase/app/feature/FeatureManager.kt


Add experimental sparse tensor functionality

[ ] Closes #2152
[ ] Tests added and passed if fixing a bug or adding a new feature
[ ] All code checks passed.
[ ] Added type annotations to new arguments/methods/functions.
[ ] Added an entry in the latest docs/release_notes/index.md file if fixing a bug or adding a new feature.
[ ] If the changes are patches for a version, I have added the on-merge: backport to x.x.x label.

@valentinwust This PR contains an initial implementation of your idea. I can tag you as co-author when it merges if that's ok with you!

@valentinwust This PR contains an initial implementation of your idea. I can tag you as co-author when it merges if that's ok with you!

Sounds good, the code looks fine. You are right that it only works for csr, but this is anyway the only sensible choice if you care about speed. Currently using something else anyway throws a warning, I don't really see the use case so it might be worth adding a forced conversion for the people who ignore warnings.

AnnData currently only supports csr and csc as sparse formats, so I think it's sensible to assume this in AnnTorchDataset and not force conversion.

Fair enough. The interfaces seem nicely consistent, so something like this should be sufficient to deal with both csr and csc properly:
to_sparse_tensor = sparse_csr_tensor if scipy.sparse.isspmatrix_csr(sliced_sparse) else sparse_csc_tensor
sliced_data = to_sparse_tensor(
                      as_tensor(sliced_sparse.indptr),
                      as_tensor(sliced_sparse.indices),
                      as_tensor(sliced_sparse.data),
                      size=sliced_sparse.shape,
                  )


A definition of the monads focusing on the side-effects

Indeed, I believe that the representation of side-effects is what the monads are the most used for.

This makes monads seem more confusing than the original. We're also using the fantasy-land terms by default. There's discussion about adding a wiki to this repo that would go into more detail on some of the more academic terms. Promise .then isn't the same ad the monad bind

There's discussion about adding a wiki to this repo that would go into more detail on some of the more academic terms.

:+1:

Promise .then isn't the same ad the monad bind

I am curious, why do you think the .then and the bind are not the same?

In any cases, I think a description of the monads should talk about the side-effects, since that what the monads are the most used for (from what I have seen).

If I have an array of numbers, I wouldn't say that arrays are about numbers. Similarly, I wouldn't say monads are about side-effects.
:-1:

Coincidentally arrays are monadic and have nothing to do with side-effects.

.then has a different api. It can act like bind if the passed function returns a promise, but it doesn't do so for all values. It's also a binary method with an optional second parameter. In short it doesn't follow the rules well enough.

.then and the bind aren't the same.

There's discussion about adding a wiki to this repo that would go into more detail on some of the more academic terms.

I guess, we must request more humans to join hands on this?

.then has a different api. It can act like bind if the passed function returns a promise, but it doesn't do so for all values.

Yes, the .then is more permissive than bind, but to me this is in the same way than the + operator doing implicit conversions on its arguments in JavaScript. Basically, the type of .then is:
(this: Promise<A>,  handler: (A -> Promise<B>)) -> Promise<B>

and other variants can be deduced from it.

It's also a binary method with an optional second parameter.

This is just about syntax, no?

If I have an array of numbers, I wouldn't say that arrays are about numbers. Similarly, I wouldn't say monads are about side-effects.

Yes, technically monads are not only about side-effects, but I think this is important to mention it since (to me) that is what they are the most used for. A presentation I like about monads: http://gallium.inria.fr/~xleroy/mpri/2-4/monads.2up.pdf

Coincidentally arrays are monadic and have nothing to do with side-effects.

The array monad can be related to side-effects as that it is the representation of the non-derminism effect.

To put it in a fun way, saying that monads are not about side-effects is like saying that keys are not about unlocking a door, since you can also use it to open your beer.

Saying monads are about side effects is like saying that screwdrivers are about picture frame hanging. Sure you may use a screw driver for that, but it's just a tool

As an introduction to functional programming, I think it is important to present realistic use cases. AFAIK, monads arrived in programming to handle side effects in Haskell. I have not encountered many other use cases, even if as you said it is just a tool so it is possible. But I do not see much constructive discussions in this thread. Still curious to understand why you do not classify promises as a monad though.

To say something is a monad is to say it satisfies the monad laws. If it
does, it's a monad; if it doesn't, it's not. I don't think .then satisfies
them quite correctly. Promise can be made into a monad easily though
On Wed, Jul 27, 2016, 10:17 AM Guillaume Claret<EMAIL_ADDRESS>wrote:

As an introduction to functional programming, I think it is important to
present realistic use cases. AFAIK, monads arrived in programming to handle
side effects in Haskell. I have not encountered many other use cases, even
if as you said it is just a tool so it is possible. But I do not see much
constructive discussions in this thread. Still curious to understand why
you do not classify promises as a monad though.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/hemanth/functional-programming-jargon/pull/71#issuecomment-235655382,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAB-4P8wotmexB6rrY5uFMTtYRhZ2RrKks5qZ5KTgaJpZM4JUgs5
.

To say something is a monad is to say it satisfies the monad laws. If it does, it's a monad.

Obviously.

I don't think .then satisfies them quite correctly.

To assert something, you should to be able to provide clear explanations of why. Else the effect may be the opposite, and could be interpreted as a lack of background? I do not see in this thread any explanations other than "that is what I think", thus closing this thread.


Applying a Basic Authentication policy against a reverse proxy to the management interface creates authentication loop

When you setup a reverse proxy to the NGINX Proxy Manager host IP, and enable an authentication policy, it loops through the authentication prompt never allowing you to access the management interface.
To Reproduce
Create a reverse proxy to the host IP on the NGINX Proxy Manager port and enable an authentication policy
Expected behavior
A Basic authentication prompt followed by the NGINX Proxy Manager login screen.
Operating System
Office Docker Container on Ubuntu 16.04

Same here, but with Oracle OS.

I resolved activating

I resolved activating

Unfortunately, this does not solve my issue.

I solved deleting all images , containers , volumes and configuration files and directory. I  mount all in docker compose like the new setup and now all is ok.

I solved deleting all images , containers , volumes and configuration files and directory. I mount all in docker compose like the new setup and now all is ok.

I tried this but get the same issue as OP.
Access List with:
Satisfy Any
Pass Auth to Host(on and off)
Auth with test:test and same username:password as admin account

I'm facing this issue as well. Not only does it not allow you to access the NPM login screen, it also keeps asking for login when trying to access any proxy host. For redirection hosts, it lets you login just fine for some reason.

Duplicate of https://github.com/jc21/nginx-proxy-manager/issues/334


Investigate using scipy.signal.sosfilt for more efficient filtering

SciPy has a Cython implementation of the filtering algorithm, which allows applying a single filter to a possibly multi-dimensional time-series. In modypy.blocks.filters.IIRFilter, we re-implement that algorithm in Python, working on a single time step of a multi-dimensional filter.
Using the code from SciPy instead of our own might improve maintainability by reducing code-duplication. We should investigate whether using the SciPy code - in a wrapper allowing the application to a multi-dimensional filter - could also help performance, and based on that evidence decide whether to use the SciPy code.

A simple benchmark seems to indicate that using sosfilt would not be much of an advantage:
"""Compare the runtime of our own IIR filter implementation and sosfilt"""
import numpy as np
from scipy import signal
from modypy.blocks import filters, discrete
from modypy import model, simulation
import timeit

class IIRFilter2(filters.IIRFilter):
    """Test implementation of IIRFilter using sosfilt

    This implementation derives from IIRFilter and overrides the _update_filter
    function to use scipy.signal.sosfilt instead of our own Python-only
    implementation"""

    def __init__(self, parent, source, filter_spec, *args, **kwargs):
        filters.IIRFilter.__init__(self, parent, source, filter_spec, *args, **kwargs)

    def _update_filter(self, system_state):
        """Update the filter state"""

        # Use the input as the input to the zeroth section
        u = self.source(system_state.prev)
        x_old = self.state(system_state.prev)

        out, x_new = signal.sosfilt(self.filter_spec, u.reshape((1, -1)), axis=0, zi=x_old)

        self.state.set_value(system_state, x_new)

@model.signal_function(shape=50)
def multidim_input(system_state):
    n = np.size(system_state.time)
    value = np.atleast_1d(np.sin(2 * 10 * np.pi * system_state.time) + np.sin(2 * 20 * np.pi * system_state.time))
    return np.lib.stride_tricks.as_strided(value, shape=(50, n), strides=(0, ) + value.strides)

def test_run(filter_class=filters.IIRFilter):
    # Create a system with a sampling clock at 1kHz
    system = model.System()
    clock = model.Clock(owner=system, period=1 / 1000.0)

    zoh = discrete.zero_order_hold(system, multidim_input, clock)

    # Create an order-10 Butterworth High-Pass filter with a limit frequency of
    # 15Hz and trigger it with the sampling clock.
    filter_spec = signal.butter(10, 15, "hp", fs=1000, output="sos")
    filter_block = filter_class(
        parent=system, source=zoh, filter_spec=filter_spec, filter_format="sos"
    )
    filter_block.trigger.connect(clock)

    def test_sim():
        # Run the simulation
        sim = simulation.Simulator(system=system, start_time=0)
        list(sim.run_until(time_boundary=1.0))

    print(f"filter_class={filter_class} time={timeit.timeit(test_sim, number=100)}")

test_run(filters.IIRFilter)
test_run(IIRFilter2)

gives the following results for me (Windows 10, Python 3.10.1 win32, Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz   1.99 GHz, numpy 1.22.0, scipy 1.7.3):
filter_class=<class 'modypy.blocks.filters.IIRFilter'> time=27.746765399992
filter_class=<class '__main__.IIRFilter2'> time=27.031498699987424

So, there seems to be a slight advantage, but nothing that would justify the effort of rewriting the code right now. Closing for now.


Request entity too large using loadSummarizationChain

Checked other resources

[X] I added a very descriptive title to this issue.
[X] I searched the LangChain.js documentation with the integrated search.
[X] I used the GitHub search to find a similar question and didn't find it.
[X] I am sure that this is a bug in LangChain.js rather than my code.
[X] The bug is not resolved by updating to the latest stable version of LangChain (or the specific integration package).

Example Code

const summarizeChain = loadSummarizationChain(this.llm, {
      type: 'refine',
      verbose: false,
      questionPrompt: PromptTemplate.fromTemplate(summaryTemplate),
      refinePrompt: PromptTemplate.fromTemplate(summaryRefineTemplate),
    });

await summarizeChain.run(splitDocs

Error Message and Stack Trace (if applicable)
Error: Failed to create run: 413 Request Entity Too Large
<title>413 Request Entity Too Large</title>

413 Request Entity Too Large

nginx

at raiseForStatus (..../node_modules/langsmith/dist/client.cjs:79:15)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at Client.createRun (..../node_modules/langsmith/dist/client.cjs:570:9)
at Client.batchIngestRuns (..../node_modules/langsmith/dist/client.cjs:619:17)
at Client.drainAutoBatchQueue (..../node_modules/langsmith/dist/client.cjs:480:17)

Description
I added these env variables.
LANGCHAIN_API_KEY=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
LANGCHAIN_ENDPOINT="https://eu.smith.langchain.com/"
LANGCHAIN_TRACING_V2="true"
LANGCHAIN_CALLBACKS_BACKGROUND="true"

the message is 200kb. I measure the text size.
System Info
<EMAIL_ADDRESS>| MIT | deps: 16 | versions: 284
dist
.tarball: https://registry.npmjs.org/langchain/-/langchain-0.2.12.tgz
.shasum: 3fac0b9519a070689b6dd679d5854abc57824dcf
.integrity: sha512-ZHtJrHUpridZ7IQu7N/wAQ6iMAAO7VLzkupHqKP79S6p+alrPbn1BjRnh+PeGm92YiY5DafTCuvchmujxx7bCQ==
.unpackedSize: 5.4 MB
dependencies:
@langchain/core: >=0.2.11 <0.3.0  js-tiktoken: ^1.0.12              langsmith: ~0.1.30                uuid: ^10.0.0
@langchain/openai: >=0.1.0 <0.3.0 js-yaml: ^4.1.0                   ml-distance: ^4.0.0               yaml: ^2.2.1
@langchain/textsplitters: ~0.0.0  jsonpointer: ^5.0.1               openapi-types: ^12.1.3            zod-to-json-schema: ^3.22.3
binary-extensions: ^2.2.0         langchainhub: ~0.0.8              p-retry: 4                        zod: ^3.22.4
dist-tags:
latest: 0.2.12    next: 0.2.3-rc.0
published 3 days ago by basproul<EMAIL_ADDRESS>

Hi there, is anyone still working on this? If not our team would love to investigate.


Add legacy code post

Closes #3.

The bulk of the post has been added, but we still need to add the case studies and further reading/links.

I've also linked to Jonathan H's UDA post. Are we happy to merge in time for my talk tomorrow?


Parse GET from Classes by ID Not Working inside Actions

YellowBox.js:69 Possible Unhandled Promise Rejection (id: 0): Cannot read property 'getScrollableNode' of undefined TypeError: Cannot read property 'getScrollableNode' of undefined     at AnimatedComponent._detachNativeEvents (http://localhost:8081/index.ios.bundle?platform=ios&dev=true&minify=false&hot=true:54506:24)     at AnimatedComponent.componentWillUnmount (http://localhost:8081/index.ios.bundle?platform=ios&dev=true&minify=false&hot=true:54467:6)     at http://localhost:8081/index.ios.bundle?platform=ios&dev=true&minify=false&hot=true:23355:13     at measureLifeCyclePerf (http://localhost:8081/index.ios.bundle?platform=ios&dev=true&minify=false&hot=true:23021:8)     at ReactCompositeComponentWrapper.unmountComponent (http://localhost:8081/index.ios.bundle?platform=ios&dev=true&minify=false&hot=true:23354:1)     at Object.unmountComponent (http://localhost:8081/index.ios.bundle?platform=ios&dev=true&minify=false&hot=true:21620:18)     at ReactCompositeComponentWrapper.unmountComponent (http://localhost:8081/index.ios.bundle?platform=ios&dev=true&minify=false&hot=true:23364:17)     at Object.unmountComponent (http://localhost:8081/index.ios.bundle?platform=ios&dev=true&minify=false&hot=true:21620:18)     at ReactCompositeComponentWrapper.unmountComponent (http://localhost:8081/index.ios.bundle?platform=ios&dev=true&minify=false&hot=true:23364:17)     at Object.unmountComponent (http://localhost:8081/index.ios.bundle?platform=ios&dev=true&minify=false&hot=true:21620:18)console.warn @ YellowBox.js:69onUnhandled @ Promise.js:25onUnhandled @ rejection-tracking.js:71(anonymous function) @ JSTimers.js:78callTimer @ JSTimersExecution.js:99callTimers @ JSTimersExecution.js:140__callFunction @ MessageQueue.js:234(anonymous function) @ MessageQueue.js:105guard @ MessageQueue.js:45callFunctionReturnFlushedQueue @ MessageQueue.js:104onmessage @ debuggerWorker.js:44
What am I doing wrong? I'm trying to use GET from /classes//
Where should I be making these calls or how as no examples are included anywhere so I'm just spinning my wheels keep getting this error.

Inside Parse.js this is what my code looks like
async getHost (hostId) {      return await this._fetch({        method: 'GET',        url: '/classes/hosts/' + hostId      })      .then((response) => {        return response.json().then(function (res) {          if ((response.status === 200 || response.status === 201)) {            return res          } else {            throw (res)          }        })      })       .catch((error) => {         throw (error)       })    }

From here: http://parseplatform.github.io/docs/rest/guide/#objects it looks like the URL should be /1/classes/hosts/hostId but you have /classes/hosts/hostId, ie, maybe you need the prefix /1/?

well the endpoint is actually... '/classes/Hosts/'+hostId (correct & tested)
I'm just trying to get data other than the user profile and having a hard time as I'm coming from using sub/unsub/etc so this structure makes no sense to me since my GET call doesn't seem to work either. Is there no guide or example of using Parse in snowflake as far as data?

All of Parse calls are in that Parse.js  but there should be examples in
Github just need to search, i guess.
On Thu, Nov 17, 2016 at 3:42 PM, iSamuelBarney<EMAIL_ADDRESS>wrote:

well the endpoint is actually... '/classes/Hosts/'+hostId (correct &
tested)
I'm just trying to get data other than the user profile and having a hard
time as I'm coming from using sub/unsub/etc so this structure makes no
sense to me since my GET call doesn't seem to work either. Is there no
guide or example of using Parse in snowflake as far as data?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/bartonhammond/snowflake/issues/168#issuecomment-261378760,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABORPARJBIlATvJ7z5uiWtZ2-7yuhQooks5q_MpMgaJpZM4K1t8B
.

I've modified everything a bit with but now I only get a promise back not the data... hmm

But no more errors...

looking @ reducers maybe thats what I'm needing...

Maybe @wookiem can help, I really haven't done any development w/ the Parse
open source server but he has, I believe.
On Thu, Nov 17, 2016 at 3:53 PM, iSamuelBarney<EMAIL_ADDRESS>wrote:

I've modified everything a bit with but now I only get a promise back not
the data... hmm
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/bartonhammond/snowflake/issues/168#issuecomment-261381574,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABORPMXQjWFiLC_0as59Elg-g0hx_WQ1ks5q_MzXgaJpZM4K1t8B
.

Well I'll keep tinkering & hope @wookiem has time to help. Should figure this out hopefully soon lol

I use the JavaScript API for the main part of my application and it's very straightforward.

could you expand on that a bit?

do you just use the session token to call from inside the component that renders then & import parse/react-native?

Do you have any example code you can share?

@wookiem I get a promise object back with no data when I use the actions/reducers which might be done wrong and probably is. There has to be a simple way to just grab the data once logged in as that's working fine, just can't get anything else.

nvm @wookiem & @bartonhammond so sorry the issue was with setting the REST key & not a JS key...lol lesson learned

Good for you.
It happens to all of us, i was looking for my glasses everywhere this
morning before I realized I was wearing them...
On Nov 17, 2016 5:43 PM, "iSamuelBarney"<EMAIL_ADDRESS>wrote:

nvm @wookiem https://github.com/wookiem & @bartonhammond
https://github.com/bartonhammond so sorry the issue was with setting
the REST key & not a JS key...lol lesson learned
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/bartonhammond/snowflake/issues/168#issuecomment-261405763,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABORPCD8t5xmg1Yv6AXD4ZPGTDJI6yb0ks5q_OaXgaJpZM4K1t8B
.

I am using a more recent version of Parse in package.json:
"dependencies": {
     "parse": "1.9.2",

I initialize Parse within src/snowflake.js:
import Parse from 'parse/react-native';
import CONFIG from '../lib/config';

Parse.initialize( CONFIG.PARSE.appId);
Parse.serverURL = (CONFIG.backend.parseLocal)
? CONFIG.PARSE.local.url
: CONFIG.PARSE.remote.url

I keep track of the currently logged in user and the sessionToken in a separate Redux state called "currentUser".  Here's its reducer (note how it ties in with existing snowflake redux states).
const {
  GET_PROFILE_SUCCESS,
  SIGNUP_SUCCESS,
  LOGIN_SUCCESS,
  SESSION_TOKEN_SUCCESS,

  LOGOUT_SUCCESS,
} = require('../../lib/constants').default;

export default function currentUser ( state = {}, action ) {
	let currentUser = null;

  switch (action.type) {
		case SIGNUP_SUCCESS:
			currentUser = action.payload;
			return Object.assign({}, {
					objectId: currentUser.objectId,
					sessionToken: currentUser.sessionToken,
					username: currentUser.firstName,
				});
		case LOGIN_SUCCESS:
			currentUser = action.payload;
			return Object.assign({}, {
					objectId: currentUser.objectId,
					sessionToken: currentUser.sessionToken,
					username: currentUser.firstName,
				});
		case SESSION_TOKEN_SUCCESS:
			currentUser = action.payload.sessionToken;
			return Object.assign({}, {
					objectId: currentUser.objectId,
					sessionToken: currentUser.sessionToken,
					username: currentUser.firstName,
				});
		case GET_PROFILE_SUCCESS:
			currentUser = action.payload;
			return Object.assign({}, {
					objectId: currentUser.objectId,
					sessionToken: currentUser.sessionToken,
					username: currentUser.firstName,
				});

		case LOGOUT_SUCCESS:
			return {};

		default:
			return state;
  }
}

Then, here's sample code for saving data to Parse.  A query example, follows the same pattern.  Note, "store" refers to the redux store.
import Parse from 'parse/react-native';

export function parseSaveProject( store, dispatch, projectId ) {
	var CurrentProject = Parse.Object.extend("CurrentProject");
	var currentProject = new CurrentProject();

	currentProject.set("projectId", project);

	let sessionToken = store.getState().currentUser.sessionToken;

	currentProject.save(null, {
		sessionToken: sessionToken,
		success: function(currentProject) {
			reduxUpdateParseProjectId(dispatch, currentProject.id);
		},
		error: function(currentProject, error) {
			console.log("Error: Parse did not update current project: ", project.id);
		}
	});
}

And here's a sample react-native component that would make the call to parseSaveCurrentProject:
class Projects extends Component {

	clickHandler(projectId) {
		var store = this.context.store;
		var dispatch = this.props.dispatch;

		parseSaveProject(store, dispatch, projectId);
	}

  render() {
     return (
      <View onClick={this.clickHandler.bind(this, projectId)}>
      	<Text>Click on current Project</Text>
			</View>
		);
  }
}

Projects.contextTypes = {
	store: React.PropTypes.object
}

const mapStateToProps = (state) => {
	return {
		currentUser: state.currentUser,
	};
};

const mapDispatchToProps = (dispatch) => {
	return { dispatch };
};

export default connect(
		mapStateToProps,
		mapDispatchToProps
)(Projects);

Looks to me that some of those case blocks could be merged as they are
identical?
On Nov 17, 2016 7:07 PM, "wookiem"<EMAIL_ADDRESS>wrote:

I am using a more recent version of Parse in package.json:
"dependencies": {
"parse": "1.9.2",
I initialize Parse within src/snowflake.js:
import Parse from 'parse/react-native';
import CONFIG from '../lib/config';
Parse.initialize( CONFIG.PARSE.appId);
Parse.serverURL = (CONFIG.backend.parseLocal)
? CONFIG.PARSE.local.url
: CONFIG.PARSE.remote.url
I keep track of the currently logged in user and the sessionToken in a
separate Redux state called "currentUser". Here's its reducer (note how it
ties in with existing snowflake redux states).
const {
GET_PROFILE_SUCCESS,
SIGNUP_SUCCESS,
LOGIN_SUCCESS,
SESSION_TOKEN_SUCCESS,
LOGOUT_SUCCESS,
} = require('../../lib/constants').default;
export default function currentUser ( state = {}, action ) {
let currentUser = null;
switch (action.type) {
case SIGNUP_SUCCESS:
currentUser = action.payload;
return Object.assign({}, {
objectId: currentUser.objectId,
sessionToken: currentUser.sessionToken,
username: currentUser.firstName,
});
case LOGIN_SUCCESS:
currentUser = action.payload;
return Object.assign({}, {
objectId: currentUser.objectId,
sessionToken: currentUser.sessionToken,
username: currentUser.firstName,
});
case SESSION_TOKEN_SUCCESS:
currentUser = action.payload.sessionToken;
return Object.assign({}, {
objectId: currentUser.objectId,
sessionToken: currentUser.sessionToken,
username: currentUser.firstName,
});
case GET_PROFILE_SUCCESS:
currentUser = action.payload;
return Object.assign({}, {
objectId: currentUser.objectId,
sessionToken: currentUser.sessionToken,
username: currentUser.firstName,
});
    case LOGOUT_SUCCESS:
        return {};

    default:
        return state;

}
}
Then, here's sample code for saving data to Parse. A query example,
follows the same pattern. Note, "store" refers to the redux store.
import Parse from 'parse/react-native';
export function parseSaveProject( store, dispatch, projectId ) {
var CurrentProject = Parse.Object.extend("CurrentProject");
var currentProject = new CurrentProject();
currentProject.set("projectId", project);

let sessionToken = store.getState().currentUser.sessionToken;

currentProject.save(null, {
    sessionToken: sessionToken,
    success: function(currentProject) {
        reduxUpdateParseProjectId(dispatch, currentProject.id);
    },
    error: function(currentProject, error) {
        console.log("Error: Parse did not update current project: ", project.id);
    }
});

}
And here's a sample react-native component that would make the call to
parseSaveCurrentProject:
class Projects extends Component {
clickHandler(projectId) {
    var store = this.context.store;
    var dispatch = this.props.dispatch;

    parseSaveProject(store, dispatch, projectId);
}

render() {
return (
<View onClick={this.clickHandler.bind(this, projectId)}>
Click on current Project

);
}
}
Projects.contextTypes = {
store: React.PropTypes.object
}
const mapStateToProps = (state) => {
return {
currentUser: state.currentUser,
};
};
const mapDispatchToProps = (dispatch) => {
return { dispatch };
};
export default connect(
mapStateToProps,
mapDispatchToProps
)(Projects);
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/bartonhammond/snowflake/issues/168#issuecomment-261419807,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABORPOFmnPwbxY1AulzgebxvRh6MYpC3ks5q_PpFgaJpZM4K1t8B
.

Yeah, that's a good point!

@wookiem do you have an example of a query? I'm just getting some issues when trying to use the Parse.js file here is my code: async getHost (hostId) {      return await this._fetch({        method: 'GET',        url: '/classes/Hosts/' + hostId,      })       .then((response) => {         return response.json().then(function (res) {           if ((response.status === 200 || response.status === 201)) {             return res           } else {             throw (res)           }         })       })        .catch((error) => {          throw (error)        })    }
Not sure what I'm doing wrong here

@wookiem getting Error: Permission denied for action get on class Hosts.

The error suggests that Parse class instance hasn't been initialized properly.  When you put a breakpoint on the return await this._fetch({  line, do you see that this._sessionToken,  this._applicationId and this._ApiBaseUrl are properly set?
If not, then you'll need to add getHost as another method using the pattern established in src/lib/Backend.js and src/lib/BackendFactory.js.
Then you should be able to initiate the promise chain with the following:
BackendFactory().getHost(hostId)
.then((res) {
	// process res
})
.catch((error) {
	// process error
})

Got it working!!!! Thanks all I had to do was add the global.currentUser with the token as an argument just like you suggested. Thanks!!

Thanks for all the help @wookiem one more quick question lol. How would I add relation query constraints like:
where={"phostId":{"__type":"Pointer","className":"Hosts","objectId":"17PKks51bl"}}
it shows in curl curl -X GET ...
-G
--data-urlencode "where={"phostId":{"__type":"Pointer","className":"Hosts","objectId":"17PKks51bl"}}"
.../classes/Residents
How do i add --data-urlencode into my request?
async getResidents (hostId) {      // where={"phostId":{"__type":"Pointer","className":"Hosts","objectId":"17PKks51bl"}}      return await this._fetch({        method: 'GET',        url: '/classes/Residents/' + hostId,      })       .then((response) => {         return response.json().then(function (res) {           if ((response.status === 200 || response.status === 201)) {             return res           } else {             throw (res)           }         })       })        .catch((error) => {          throw (error)        })    }

I'm not sure.  After logging in, I switch gears and use the Parse Javascript API for all of my Parse database interactions (i.e. I don't try to use the REST API).  I show how to make this switch in my sample code from a couple weeks ago (see above).  I find it a lot more intuitive than using the REST API...

Yea seems like I should do the same then.

I got it working!!
FYI if you wanted to see how below.
import qs from 'querystring' async getResidents (hostId) {       let query = qs.stringify({         where:{"phostId":{"__type":"Pointer","className":"Hosts","objectId":"${hostId}"}}      })       return await this._fetch({        method: 'GET',        url: '/classes/Residents?' + query,       })       .then((response) => {         return response.json().then(function (res) {           if ((response.status === 200 || response.status === 201)) {             return res           } else {             throw (res)           }         })       })        .catch((error) => {          throw (error)        })    }

Good job @iSamuelBarney


{Aladdin} Add v0 hook to AzCliCommandParser class.

Description of PR (Mandatory)
Add hook to notify Aladdin extensions of parser failure when telemetry is available.

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.:x: christopher-o-toole sign nowYou have signed the CLA already but the status is still pending? Let us recheck it.

add to S168


Fix line endings

Everytime I try to edit a file, git gets confused about the line endings. So I added a gitattributes file which should fix this.

Hello @Megasware128 - what line endings did it have before? If it is not already using core.crlf=false, I will be changing it to that once I start contributing to this repository.

According to the file utility from *nix it seems it was CRLF. Not sure if true. Used Git Bash which was included with msysgit.

In the repo, type git config core.autocrlf false Ensure this is in the repository.

This won't set your system configuration, you would need --global to make that change.

Ah okay. Thank you. That works 👍


Issue with v value for non EIP155 signatures

This closes issue #236

I am merging this into main after it has been validated that it works on the Attestation.id side.


stack create - is failing if roll back present

If previous stack create has rolled back then Stack is indeed created but it has been rolled back. Therefore stack resources are not present.
We need to auto-remove rolled back stack and install again.

to confirm:
stack create should not remove rolled back in the same run. in a lot of case we can't see full error, we need to go to aws and see the error in details of events
stack create should remove rolled back stack upon new run.

Fixed.


Question: are MVC view compiles deterministic ?

From @davidglassborow on June 12, 2017 14:21
Roslyn can do deterministic builds (https://github.com/dotnet/roslyn/issues/372), and I've recently added this to Visual F# (https://github.com/Microsoft/visualfsharp/pull/2954).
At my workplace, this means that the MVC view compilation is the only step left in our build processes that isn't deterministic. I was wondering if the new aspnetcore view compilation will be deterministic ?, or if that is a feature you would consider adding ?
Copied from original issue: aspnet/MvcPrecompilation#141

From @rynowak on June 12, 2017 19:22
No, they are not

We don't pass deterministic = true to the CSharpCompilerOptions - this is easy to fix
Each tag helper usage gets a unique identifier assigned to it, right now this isn't deterministic

From @davidglassborow on June 13, 2017 7:24
Is this something you would be happy to add ?  If so I'll have a look at a PR to do so (probably post core 2.0 release)

From @rynowak on June 14, 2017 0:0

Is this something you would be happy to add ? If so I'll have a look at a PR to do so (probably post core 2.0 release)

If it adds value for you, and you want to send us a PR then sure we'd be happy to take it for 2.1. We already have the capability to replace the 'id generator' for tests, we'd just have to figure out a way to generate stable ids.

Moving to Backlog, but we'd be open to a contribution for this.

@Eilon @rynowak

Each tag helper usage gets a unique identifier assigned to it, right now this isn't deterministic

Are you thinking about a new method public abstract string CodeRenderingContext.GetUniqueId()? And this method could be even used for other cases in the future.
And the default implementation could be something like:
var uniqueId = (string)Items[SuppressUniqueIds];
if (uniqueId != null)
{
   return uniqueId;
}
_nextId++;
return $"id_{_nextId}";

We're doing work to make Razor compilation on build support determinism. When we're done this will 'just work'


Error: Service Temporarily Unavaliable

After creating a new server I get "Install completed successfully." but as soon as I go onto the server control page I get a loading bar with the error "Error: Service Temporarily Unavaliable - The requested server is still completing the install process. Please check back in a few minutes, you should recieve an email as soon as this process is completed.".
Any idea on how to resolve this? I looked at docker ps on the scales server and the created server is not listed.. not sure why.
Cheers!

Check out the Scales logs in /srv/scales/logs and see what it says

Please open a thread on the community forums if you have further issues. Thanks!


Recognize Player Achievements via Machine Learning 🤖

Hey team,
We are currently looking into ways that the app can use machine learning algorithms to detect when a player completes a carbon mission. This should make missions easier for players to complete in the future!

Suggestions by Make School alum @RaymondDashWu:

"hmmm so my impressions from that photo are that users will be scored based on tasks they individually do to help them, which might be a bit difficult without a lot of data already since people's tasks and goals are individual... One thought I had would be to use a pretrained model that has been trained on the COCO dataset, which is a large repository of labeled, segmented images covering a lot of categories. That way it can be something like: recognize a recycling bin and give X points"

Suggestions by Make School Data Science Instructor @jcatanza:
"A more direct approach to this problem might be analyzing text (rather than images) in Twitter or Instagram feeds via methods of Natural Language Processing (NLP).  Though I am not sure whether this approach meets the goals of your industry partner.
It would be straightforward to train a basic sentiment classifier model to recognize tweets associated with (positive or neutral) environmental value. Though you would need to start by either creating or finding a large set of training data, i.e. ~thousands of labeled example tweets"

Original Question I asked:
"Hey team,
What are your favorite pre-trained models to use for image recognition? Our industry partner for SPD 2.2 is interested in building an image classifier for 'recognizing things people do that are good for the environment.'
Examples may include:

eating a plant-based meal for lunch
sorting your trash
installing LED light bulbs around the home

I’m trying to think of a way to use transfer learning to make building this more efficient. Alternatively, I might need to scope down the feature, since there are probably ways to do this feature w/o machine learning. Any thoughts?"

Ideas on Transfer Learning proposed by @RaymondDashWu:
"Resnet, VGG, or YOLO. If you need a mobile app maybe something like Mobilenet or convert your models to FP16"

The feature has been implemented in #124, so closing for now as the team moves on to the next sprint.


Add custom date provider to support "2001/01/21"

Thanks for the submission, but this is changing code in Duktape - not this project.  If we were to support a custom date formatter/parser, I'd rather it be configurable.  For example, have the user specify a DateFormat for the instance returned from Duktape.create().


2.5.1 labeled latest release at GitHub (rather than 2.6.0)?

Hi!
Looking at
https://github.com/kennethreitz/requests/releases
I need to click on "Show 3 newer tags" to see 2.6.0 uncovered.
2.5.1 is marked the latest release. Is that intended?
It's 2.6.0 on PyPI https://pypi.python.org/pypi/requests/ .
Best, Sebastian

We don't really have a consistent policy of updating GitHub's releases. For our release notes we strongly recommend looking at PyPI or our documentation.

So... no fix? 2.5.1 remains the latest on GitHub?

@hartwork as @Lukasa has already kindly explained, PyPI is the source of truth. Not GitHub. You might notice that there are several releases missing notes on GitHub.

My point are not the releases notes. My point is the fix potential user confusion. The release page up here raises more questions than it answers. If it's trouble to keep in sync, okay. If not, my vote to keep it synced, even just versions without release notes. That's all.

@hartwork it is not trivial.

Okay :)


Refactor "Horizontal Lines" into Rows component

Simplifies code around determining group you're clicking on.  Also sets the stage for making groups "drop targets" and better management of items in groups.

Question, will this eventually replace the existing plugin system with regards to being able to control the what & how the rows are rendered?

Yes and no.  This change was to simplify the codebase in regards to canvas click handlers and the like.  But this is also a part of a larger effort to change this library's API to be much more composable:

ability to provide a custom component for HorizontalRow.  So to your question, yes this is where you would be able to customize how the rows are rendered
ability to attach whatever handlers you want on rows

The plugin system is going to be removed in favor a compositional approach.


⚠ Bofrost.es has degraded performance

In d836be4, Bofrost.es (https://www.bofrost.es) experienced degraded performance:

HTTP code: 200
Response time: 1577 ms

Resolved: Bofrost.es performance has improved in 1f5720a after 8 minutes.


Upgrade to TF 2.2

TensorFlow 2.2.0 will be released 🔜 . This PR upgrades the TensorFlow dependency to point to the 2.2 release branch of TensorFlow. There've been quite a few changes between the two versions so this requires a thorough review.
TODO

[x] Get builds to pass
[x] Upgrade to TensorFlow 2.2.0 stable
[x] Speed up CI builds since this doubles build time for the converter and End2End tests #287
[x] Update ImageNet eval tool
[x] Benchmark models to ensure we don't have performance regressions
[x] Switch to new Ruy profiler https://github.com/tensorflow/tensorflow/commit/b0f057d1b4ef78f0bba7e8893debe6b4310711ee

Benchmarks
I ran some preliminary benchmarks on my personal phone for 500 runs with a QuickNet like model and didn't see any performance regressions:

branch
1 thread (ms)
4 threads (ms)

master
26.6 ± 0.3
17.5 ± 0.5

PR
26.5 ± 0.2
17.2 ± 0.8

TensorFlow made some changes to ruy which breaks our kernels. @arashb If you have time it would be cool if you could take a look at it at some point. This is definitely not urgent since TF 2.2 is not released yet.

TensorFlow made some changes to ruy which breaks our kernels. @arashb If you have time it would be cool if you could take a look at it at some point. This is definitely not urgent since TF 2.2 is not released yet.

ok, I will take a look. thanks for the headsup 👍

The build issues seem to be from this commit: https://github.com/tensorflow/tensorflow/commit/113a37348f295f4858df470f92e4ab49ac0fed23.
I've made https://github.com/larq/compute-engine/pull/286 (a PR into this PR branch) which fixes those errors.

This PR currently fails compiling XNNPACK when building the benchmark binary for Android on my machine:
ERROR: /private/var/tmp/_bazel_lukasgeiger/6f8dfd27496fbafbde3ef0aa730ae6bb/external/XNNPACK/BUILD.bazel:1643:1: C++ compilation of rule '@XNNPACK//:neonfp16arith_ukernels' failed (Exit 1)
external/XNNPACK/src/f16-spmm/gen/32x1-neonfp16arith-unroll2.c:62:26: warning: implicit declaration of function 'vfmaq_f16' is invalid in C99 [-Wimplicit-function-declaration]
        vacc01234567x0 = vfmaq_f16(vacc01234567x0, va01234567x0, vb0);
                         ^
external/XNNPACK/src/f16-spmm/gen/32x1-neonfp16arith-unroll2.c:62:24: error: assigning to 'float16x8_t' (vector of 8 'float16_t' values) from incompatible type 'int'

I am not sure if it is due to the fact that I am compiling on macOS or if it will be fixed with the stable release.

This PR currently fails compiling XNNPACK when building the benchmark binary for Android on my machine

This is fixed in f8beda0f8968c282d7b5be50b50448bb9d99fd04 and I ran a few sanity benchmarks to verify that this PR doesn't introduce performance regressions.

The error in compiling XNNPACK is due to old compiler. You need at least Android NDK r18b to build XNNPACK.

The error in compiling XNNPACK is due to old compiler. You need at least Android NDK r18b to build XNNPACK.

@Maratyszcza thanks for the help! Indeed we were able to fix it by upgrading the compiler in f8beda0f8968c282d7b5be50b50448bb9d99fd04 :+1:

Like start bonus

we are using and also the android SDK version, can you please run the benchmarks on both android and RPi and document the results to make sure no performance regression introduced due to this PR?

I benchmarked QNL on the Raspberry Pi and matched the numbers reported on docs.larq.dev.

I just upgraded the PR to 2.2.0 stable, this should be good to go from my side now 🚀

as soon as we have the benchmark results this can be merged right?

as soon as we have the benchmark results this can be merged right?

@AdamHillier ran benchmarks on the RPI yesterday and didn't see any regression: https://github.com/larq/compute-engine/pull/258#issuecomment-623993349
I ran preliminary benchmarks on my Android phone a while ago and couldn't find any regressions either. However I just reran them with a clean build just to be sure and it looks like there is a slight improvement:

branch
1 thread (ms)
2 threads (ms)

master
36.0 ± 0.3
26.4 ± 0.3

PR
35.6 ± 0.2
25.5 ± 0.3

PR (with XNNPack)
33.7 ± 0.3
24.6 ± 0.2

as soon as we have the benchmark results this can be merged right?

@AdamHillier ran benchmarks on the RPI yesterday and didn't see any regression: #258 (comment)
I ran preliminary benchmarks on my Android phone a while ago and couldn't find any regressions either. However I just reran them with a clean build just to be sure and it looks like there is a slight improvement:
branch	1 thread (ms)	2 threads (ms)
master	36.0 ± 0.3	26.4 ± 0.3
PR	35.6 ± 0.2	25.5 ± 0.3
PR (with XNNPack)	33.7 ± 0.3	24.6 ± 0.2

which model is this? Non of the quicknet models in our benchmark table are 36ms for single thread!

which model is this? Non of the quicknet models in our benchmark table are 36ms for single thread!

Sorry, this is QuicknetLarge on my personal phone.

which model is this? Non of the quicknet models in our benchmark table are 36ms for single thread!

Sorry, this is QuicknetLarge on my personal phone.

ok, thanks later I will run the benchmarks on my pixel phone as well.


feat: FastSubsingleton and FastIsEmpty to speed up congr!/convert

Introduces two typeclasses that are meant to quickly evaluate in common cases. Makes congr! use these typeclasses rather than Subsingleton.
Local Subsingleton/IsEmpty instances are included as Fast instances, so to get congr!/convert to reason about subsingleton types, you can add such instances to the local context.

!bench

Thanks, I think this great, since I've also noticed these tactics to be often slow.
bors merge


docs: add docker section in the Readme

Description
Add docker section in the Readme. Also update scripts.

@BOLT04 Thanks!

/rtm


Extend BitmapDescriptorFactory support with fromPath

When my app is generating images on the fly it stores to some location.
FEATURE REQUEST / SUGGESTION
Extend support to load image from path on both platforms
DETAILS
I was trying to use FromStream, but it does not work for me.
On Android I have Dependency injection where I create custom image, after that I convert it to memory stream it throws Java.Lang.NullPointerException: bitmap
I checked if content is returned correctly and it is.
    public Stream DrawTextToBitmap(string text)
    {
        //var sdCardPath = Application.Context.FilesDir.Path;
        //var filePath = System.IO.Path.Combine(sdCardPath, $"marker_{text}.png");

        Resources resources = Application.Context.Resources;
        float scale = resources.DisplayMetrics.Density;
        Bitmap bitmap = BitmapFactory.DecodeResource(resources, Resource.Drawable.marker);
        bitmap = bitmap.Copy(Bitmap.Config.Argb8888, true);

        Canvas canvas = new Canvas(bitmap);

        float x = (float) bitmap.Height / 2;
        float y = (float) bitmap.Width / 2;
        Paint paint = new Paint();

        paint.Color = Color.Green;
        paint.TextSize = 12 * scale;
        canvas.DrawText(text, 10, 25, paint);

        var stream = new MemoryStream();
        bitmap.Compress(Bitmap.CompressFormat.Png, 100, stream);
        return stream;
    }

PLATFORMS
which platform do you want?

[x] Android
[x] iOS
[?] UWP

We can use PCL Storage which provides cross-platform file access via Path(Also can get Stream from Path).
I think it's enough for this use case.

After some investigation Exception is occuring in PinLogic.cs
if (outerItem.Icon != null)
{
opts.SetIcon(outerItem.Icon.ToBitmapDescriptor());
}
var marker = NativeMap.AddMarker(opts);

Our app also get this error. We are getting our file from the PCL resources. On Android we randomly get the Java NullPointerException: bitmap, in iOS we haven't seen it.

I made sample for BitmapFactory.FromStream with local file using PCLStorage.
I can shown the "Xamagon" in Android and iOS.

This sample is in issue_240 branch.
// Read png from device local file
var folder = FileSystem.Current.LocalStorage;
var pngFile = await folder.GetFileAsync($"xamagon.png");
var pngStream = await pngFile.OpenAsync(FileAccess.Read);
_pinTokyo.Icon = BitmapDescriptorFactory.FromStream(pngStream);

Regarding fromStream in android I found solution https://forums.xamarin.com/discussion/21843/strange-imagesource-behavior-on-android-skimagedecoder-factory-returned-null
Trick is in Position = 0;


Migrate the codebase from Gatekeeper repository #516

In the past month, we discussed the idea of having a new home for Gatekeeper, based on that we decided to create a new
organization on GitHub and rename the project to Louketo Proxy.
This pull request refactors the codebase to the new name and should be merged only after the transfer
of the repository.
Some considerations

The documentation will be improved, but it's out of the scope for this pull-request
Migration of the Dockerfile after the transition, that also covers #541.
There's a lot of work to do this week, so please be patient :)

@stianst thanks for reviewing. Ready for another round.

Resolves #516


Restructure spinx folder

Suggestion:
Introduction
  index
Package
  Agents
   Person
View
  SimpleCodebook

Package and View are generated from drupal and other folders contain static documentation form bitbucket.

We don't create rst from lion anymore


Update create-deployment-pkg-zip-java.md

Being specific about Gradle use
Issue #, if available:
Description of changes:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Thanks!


More ARF samples and fix for Terra FBL

New samples.  Abusix and JunkMailFilter
Added Abusix support.
Fix for missing optional Original-Rcpt-To, like Terra FBL ( eg/maildir-as-a-sample/new/arf-cannot-detect-recipient-address.eml )

Coverage increased (+0.02%) when pulling e67f383f67e73cdc1eb3a7e72a53250990db998e on jcbf:master into 4c11b5fca58039c313590892e96356f5d26df7e8 on azumakuniyuki:master.

Happy New Year!

Hoping to be a great year !!


com.jayway.jsonpath version conflict with com.jayway.restassured

From<EMAIL_ADDRESS>on May 22, 2015 08:37:08
What steps will reproduce the problem? 1. I have built a own Selenium WebDriver Framework (can be shared across teams) that uses Chrome Tracing. For this I have com.jayway.jsonpath version 2.0.0
<dependency>
<groupId>com.jayway.jsonpath
<artifactId>json-path
<version>2.0.0
</dependency>

Then I have a project specific Test Project that has a dependency to the Selenium WebDriver Framework mentioned above. Additionally I would like to use rest-assured in this project. So I added

<dependency>
<groupId>com.jayway.restassured
<artifactId>rest-assured
<version>2.4.1
<scope>test
</dependency>

The problem now is that rest-assured has got something like

<dependency>
<groupId>com.jayway.restassured
<artifactId>json-path
<version>2.4.1
</dependency>
which seems to break my tests.
What is the difference between restassured json-path 2.4.1 and json-path 2.0.0?
Any feedback, hints etc. are much appreciated.
Thank you.
Original issue: http://code.google.com/p/rest-assured/issues/detail?id=403

From<EMAIL_ADDRESS>on May 26, 2015 02:15:10
In what way do they break your tests? The JsonPath implementation shipped with RA is a totally different implementation the "other" JsonPath. RA's JsonPath uses Groovy's GPath syntax and the other is using the Goessner syntax.

From<EMAIL_ADDRESS>on May 28, 2015 11:23:56
I have tried it again and it works. I can not tell what the problem was so I would suggest to close this thread/issue.
Thanks anyway.

From<EMAIL_ADDRESS>on May 28, 2015 11:29:40
Glad you managed to solve it
Status: Invalid


Documentation needs update

I was not able to run axiline using the documentation in the README. It would be good to explain how to install polymath from axiline since polymath appears to need its own venv separate from the axiline venv. I finally just installed native with python 3.10 and downloaded packages as needed.

axiline invokes mgdfg. However polymath has srdfg. I had to change those imports in multiple files.

the documentation in the README on the flags to axiline_compiler for -o and -op is backwards from the code. The code expects -o to be the output path and -op to be the onnx filepath.

Thanks for the comments. The documentation and polymath imports are updated.


types for  'passport-google-oidc'

Hello, congratulations on the passport project.
I'm testing the example 'todos-express-google' and currently converting everything to typescript. I would like to know if there are types of 'passport-google-oidc' in some repository.
Thanks!

Ok, thanks!

@524c Were types ever created for this project?

@524c Were types ever created for this project?

I'm using another solution, authjs.


If Prev/Next buttons are positioned at the top of the slider--- all responsive functionality breaks

When we enabled the dynamic-containers plugin, we noticed that as we changed window sizes, the functionality will completely break if the prev and next buttons are at the same height as the first element. This is due to the '$( this ).offset().top !== prev.offset().top'  being the same as the prev. and next buttons are within the same div.
Although I think this can be solved by CSS, this might not be desirable if the design wants the buttons to be up top. Could also be helpful to have the previous and next buttons outside of the container, and just have the first element be automatically added to the first container no matter what.

This issue can be replicated within the Dynamic responsive containers demo by changing the absolute positioning of .carousel-nav from bottom to top and resizing the viewport.
This results in Uncaught TypeError: Cannot read property 'push' of undefined on line 43 of responsive-carousel.dynamic-containers.js


Hello, I find your work very interesting and have a question for you!

how did you determine that the scaling factor is equal to 60? Does this have any significance?

Sorry for the delay. This is a good question, the scale of 60 is directly adopted from the previous paper, CounTR (example in this line).
Basically, it will scale up the gt by 60, and when calculating the metric the scale will be canceled out. Therefore, we believe it will not affect the performance as long as the same scale is applied for training and inference. However, we did not experiment with other scales and you may try how different scale may affect the model.


'Tree' object has no attribute 'flags'

When parsing my grammar file Lark throws an exception that the Tree object does not have the attribute flags.
Expected Behavior
Lark should either throw an error that the grammar file is incorrect or parse the grammar file and produce a parser.
Current Behavior
Lark throws an exception when parsing the grammar and it is unclear what is wrong. I do not immediately see how my grammar is wrong (it probably is since I'm new to Lark), but it seems like an internal error of Lark's.
When parsing my grammar
quipper.g.txt
I get the following exception:
>>> from lark import Lark
>>> with open('quipper.g') as grammar_file:
...     Lark(grammar_file.read())
...
Traceback (most recent call last):
  File "<stdin>", line 2, in <module>
  File "/Users/eddie/dev/quippy/.venv/lib/python3.6/site-packages/lark/lark.py", line 156, in __init__
    tokens, self.rules, self.ignore_tokens = self.grammar.compile(lexer=bool(lexer), start=self.options.start)
  File "/Users/eddie/dev/quippy/.venv/lib/python3.6/site-packages/lark/load_grammar.py", line 485, in compile
    for name, (token_tree, priority) in token_defs]
  File "/Users/eddie/dev/quippy/.venv/lib/python3.6/site-packages/lark/load_grammar.py", line 485, in <listcomp>
    for name, (token_tree, priority) in token_defs]
  File "/Users/eddie/dev/quippy/.venv/lib/python3.6/site-packages/lark/tree.py", line 139, in transform
    tree = t.transform(tree)
  File "/Users/eddie/dev/quippy/.venv/lib/python3.6/site-packages/lark/tree.py", line 113, in transform
    items.append(self.transform(c) if isinstance(c, Tree) else c)
  File "/Users/eddie/dev/quippy/.venv/lib/python3.6/site-packages/lark/tree.py", line 121, in transform
    return f(items)
  File "/Users/eddie/dev/quippy/.venv/lib/python3.6/site-packages/lark/load_grammar.py", line 387, in expansions
    if len({i.flags for i in exps}) > 1:
  File "/Users/eddie/dev/quippy/.venv/lib/python3.6/site-packages/lark/load_grammar.py", line 387, in <setcomp>
    if len({i.flags for i in exps}) > 1:
AttributeError: 'Tree' object has no attribute 'flags'

As you can see, the grammar is still incomplete, but I was working on debugging it.
Environment
OS: MacOS 10.13
Lark version: 0.5.4

Yes, at a first glance it seems that the error occurs because you are using aliases in terminals, which isn't allowed. You could solve this by turning the terminals to rules. For example:
SUB_CONTROL : "yes" -> yes

into
sub_control : "yes" -> yes

Having said that, you're absolutely right that I should put a better error message in place, as it's a very reasonable mistake to make.

Great, that seems to have resolved the exception. Thanks! I'll leave the issue open so that you can implement better error reporting for this kind of error.

Fixed.

It looks like you are trying to use the Lark parser, but there may be some confusion with the attribute names. It's possible that the parser_default_config attribute doesn't exist in the version of Lark you are using. It's recommended to check the documentation or the source code for the version of Lark you are using to ensure that you are using the correct attribute names.
If you need further assistance, feel free to provide more details about what you are trying to achieve, and I'd be happy to help! 🤖
svp besoin d'aide


Add cluster-state-entity-count-query

adds query to external sender to retrieve the state entity count
of the cluster, this information is organized by worker and by
entity key.

Testing
run the following to test:
 testing/tools/external_sender/external_sender -j -e <WORKER_EXTERNAL_ADDRESS> -t cluster-state-entity-count-query
The above should work in both single and multi-worker instances and should get the result from any worker in the multi-worker case.

closes #2899

Experimenting with this, I'm seeing that we are missing information.  _local_keys is a map from state entity group to keys, but actually what we want is a map from state entity group to a map of step_id to keys.  Unfortunately, this information doesn't currently exist anywhere in a centralized form.  The closest that exists is that we could add a method to StatePartitionRouter that takes a key and returns its target step RoutingId. We could then, for each state entity group routing id in the _local_keys map, iterate over the keys, use the new StatePartitionRouter method to get each one's RoutingId and build up a Map[RoutingId, Array[Key]] for each step routing group (i.e. RoutingId key in _local_keys).  This does what we want but seems rather inefficient.  My opinion is that since external queries are only currently going to be used rarely as a way of gauging key distributions for certain stateful apps, it's ok to start with this inefficient solution and improve from there after thinking more carefully about how we want to represent this kind of knowledge in the system.
Any thoughts @JONBRWN?  @slfritchie @aturley @SeanTAllen?

Note: part of the confusion here comes from the fact that _local_keys is a map from RoutingId to Array[Key], which is ambiguous between a map from step group id to keys on steps in that step group instead of a map from step id to keys on that step. This needs to be documented in a comment above this field.  I've also opened an issue to better document this distinction in general: https://github.com/WallarooLabs/wallaroo/issues/2973

I'm ok with inefficient. As long as it is noted in any documentation. Like "do not poll this constantly.".

@jtfmumm I've updated the functionality to match the expected results.
I've decided to keep a hold of _local_step_keys in addition to _local_keys and update/remove keys when we call register_key or unregister_key so that it isn't as inefficient as iterating through the _local_keys for each query.
I've also left the functionality for the previous query as well. If we believe there's value in maintaining both, I can add a new message type to the external sender.

@JONBRWN I left a couple of minor comments, but I tested it and it appears to work, so other than those minor suggestions, I think it's ready for merging.

@jtfmumm ok, I'll address those. So do we want to keep both types of queries or should I get rid of the cluster state entity by step group functionality that I left in?

Since we can derive the old counts from the new one, I think we should
remove it.  What do you think?
On Tue, Jul 30, 2019 at 3:17 PM JONBRWN<EMAIL_ADDRESS>wrote:

@jtfmumm https://github.com/jtfmumm ok, I'll address those. So do we
want to keep both types of queries or should I get rid of the cluster state
entity by step group functionality that I left in?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/WallarooLabs/wallaroo/pull/2972?email_source=notifications&email_token=ABEC3TEJEU5HICBSM2DIBMLQCA5ODA5CNFSM4IFAITE2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3D5XAQ#issuecomment-516414338,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABEC3TBYSTZMBEOUAFME4ELQCA5ODANCNFSM4IFAITEQ
.

agreed, I'll get rid of them


Consistent YAML indentation

Why:
YAML indent in the examples is inconsistent. While not strictly unparseable, some tools complain about the indent in the examples.

Closes [issue link]
What's being changed:
Change YAML indent to be consistent and follow YAML spec examples.

Check off the following:

[x] I have reviewed my changes in staging. (look for the deploy-to-heroku link in your pull request, then click View deployment)
[ ] For content changes, I have reviewed the localization checklist
[ ] For content changes, I have reviewed the Content style guide for GitHub Docs.

@janiceilene done.

S

Thanks so much @hoxu! I'll get this triaged for review ⚡


TypeError: argument of type 'method' is not iterable on install of mmdetection

Thanks for your error report and we appreciate it a lot.
Checklist

I have searched related issues but cannot get the expected help. - done
I have read the FAQ documentation but cannot get the expected help.
-- there is no FAQ page at this URL
The bug has not been fixed in the latest version. - not as far as I can tell

Describe the bug
I am following the installation instructions for mmyolo on: https://github.com/open-mmlab/mmyolo/blob/main/docs/en/tutorials/custom_installation.md
mim throws an error: TypeError: argument of type 'method' is not iterable
I had previously installled the following components successfully:
pip3 install openmim
mim install "mmengine>=0.6.0"
mim install "mmcv>=2.0.0rc4,<2.1.0"

Reproduction

What command or script did you run?

mim install "mmdet>=3.0.0rc6,<3.1.0"

Did you make any modifications on the code or config? Did you understand what you have modified?
What dataset did you use?

Environment

Please run python mmdet/utils/collect_env.py to collect necessary environment information and paste it here.
-- can't run this as mmdet fails to install

mim --version
mim, version 0.3.6

mmyolo git:(main) ✗ pip freeze
addict==2.4.0
certifi==2022.12.7
charset-normalizer==3.1.0
click==8.1.3
colorama==0.4.6
contourpy==1.0.7
cycler==0.11.0
filelock==3.10.0
fonttools==4.39.0
idna==3.4
Jinja2==3.1.2
kiwisolver==1.4.4
Markdown==3.4.1
markdown-it-py==2.2.0
MarkupSafe==2.1.2
matplotlib==3.7.1
mdurl==0.1.2
mmcv==2.0.0rc4
mmengine==0.6.0
model-index==0.1.11
mpmath==1.3.0
networkx==3.0
numpy==1.24.2
opencv-python==<IP_ADDRESS>
openmim==0.3.6
ordered-set==4.1.0
packaging==23.0
pandas==1.5.3
Pillow==9.4.0
Pygments==2.14.0
pyparsing==3.0.9
python-dateutil==2.8.2
pytz==2022.7.1
PyYAML==6.0
requests==2.28.2
rich==13.3.2
six==1.16.0
sympy==1.11.1
tabulate==0.9.0
termcolor==2.2.0
torch==2.0.0
torchvision==0.15.1
typing_extensions==4.5.0
urllib3==1.26.15
yapf==0.32.0

 mmyolo git:(main) ✗ conda list
# packages in environment at /Users/pmctaggart/opt/miniconda3:
#
# Name                    Version                   Build  Channel
blas                      1.0                    openblas
brotlipy                  0.7.0           py39h1a28f6b_1002
bzip2                     1.0.8                h620ffc9_4
ca-certificates           2023.01.10           hca03da5_0
certifi                   2022.12.7        py39hca03da5_0
cffi                      1.15.1           py39h80987f9_3
charset-normalizer        2.0.4              pyhd3eb1b0_0
conda                     23.1.0           py39hca03da5_0
conda-package-handling    1.9.0            py39h1a28f6b_1
cryptography              38.0.1           py39h834c97f_0
ffmpeg                    4.2.2                h04105a8_0
filelock                  3.9.0            py39hca03da5_0
flit-core                 3.6.0              pyhd3eb1b0_0
freetype                  2.12.1               h1192e45_0
gettext                   0.21.0               h826f4ad_0
giflib                    5.2.1                h80987f9_3
gmp                       6.2.1                hc377ac9_3
gmpy2                     2.1.2            py39h8c48613_0
gnutls                    3.6.15               h887c41c_0
icu                       68.1                 hc377ac9_0
idna                      3.4              py39hca03da5_0
jinja2                    3.1.2            py39hca03da5_0
jpeg                      9e                   h80987f9_1
lame                      3.100                h1a28f6b_0
lcms2                     2.12                 hba8e193_0
lerc                      3.0                  hc377ac9_0
libcxx                    14.0.6               h848a8c0_0
libdeflate                1.8                  h1a28f6b_5
libffi                    3.4.2                hca03da5_6
libgfortran               5.0.0           11_3_0_hca03da5_28
libgfortran5              11.3.0              h009349e_28
libiconv                  1.16                 h1a28f6b_2
libidn2                   2.3.1                h1a28f6b_0
libopenblas               0.3.21               h269037a_0
libopus                   1.3                  h1a28f6b_1
libpng                    1.6.39               h80987f9_0
libtasn1                  4.16.0               h1a28f6b_0
libtiff                   4.5.0                h2fd578a_0
libunistring              0.9.10               h1a28f6b_0
libvpx                    1.10.0               hc377ac9_0
libwebp                   1.2.4                ha3663a8_1
libwebp-base              1.2.4                h80987f9_1
libxml2                   2.9.14               h8c5e841_0
llvm-openmp               14.0.6               hc6e5704_0
lz4-c                     1.9.4                h313beb8_0
markupsafe                2.1.1            py39h1a28f6b_0
mpc                       1.1.0                h8c48613_1
mpfr                      4.0.2                h695f6f0_1
mpmath                    1.2.1            py39hca03da5_0
ncurses                   6.3                  h1a28f6b_3
nettle                    3.7.3                h84b5d62_1
networkx                  2.8.4            py39hca03da5_0
numpy                     1.23.5           py39h1398885_0
numpy-base                1.23.5           py39h90707a3_0
openh264                  1.8.0                h98b2900_0
openssl                   1.1.1t               h1a28f6b_0
pillow                    9.4.0            py39h313beb8_0
pluggy                    1.0.0            py39hca03da5_1
pycosat                   0.6.4            py39h1a28f6b_0
pycparser                 2.21               pyhd3eb1b0_0
pyopenssl                 22.0.0             pyhd3eb1b0_0
pysocks                   1.7.1            py39hca03da5_0
python                    3.9.12               hbdb9e5c_0
python.app                3                py39h1a28f6b_0
pytorch                   2.0.0                   py3.9_0    pytorch
readline                  8.2                  h1a28f6b_0
requests                  2.28.1           py39hca03da5_0
ruamel.yaml               0.17.21          py39h1a28f6b_0
ruamel.yaml.clib          0.2.6            py39h1a28f6b_1
setuptools                65.5.0           py39hca03da5_0
sqlite                    3.40.0               h7a7dc30_0
sympy                     1.11.1           py39hca03da5_0
tk                        8.6.12               hb8d0fd4_0
toolz                     0.12.0           py39hca03da5_0
torchvision               0.15.0                 py39_cpu    pytorch
tqdm                      4.64.1           py39hca03da5_0
typing_extensions         4.4.0            py39hca03da5_0
tzdata                    2022g                h04d1e81_0
urllib3                   1.26.13          py39hca03da5_0
x264                      1!152.20180806       h1a28f6b_0
xz                        5.2.8                h80987f9_0
zlib                      1.2.13               h5a0b063_0
zstd                      1.5.2                h8574219_0

You may add addition that may be helpful for locating the problem, such as

How you installed PyTorch : conda
Other environment variables that may be related (such as $PATH, $LD_LIBRARY_PATH, $PYTHONPATH, etc.)

Error traceback
If applicable, paste the error trackback here.
mmyolo git:(main) ✗ mim install "mmdet>=3.0.0rc6,<3.1.0"

Looking in links: https://download.openmmlab.com/mmcv/dist/cpu/torch2.0.0/index.html
Collecting mmdet<3.1.0,>=3.0.0rc6
  Using cached mmdet-3.0.0rc6-py3-none-any.whl (1.7 MB)
ERROR: Exception:
Traceback (most recent call last):
  File "/Users/pdmct/.local/share/virtualenvs/mmyolo-dGEsbyu_/lib/python3.11/site-packages/pip/_internal/cli/base_command.py", line 160, in exc_logging_wrapper
    status = run_func(*args)
             ^^^^^^^^^^^^^^^
  File "/Users/pdmct/.local/share/virtualenvs/mmyolo-dGEsbyu_/lib/python3.11/site-packages/pip/_internal/cli/req_command.py", line 247, in wrapper
    return func(self, options, args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/pdmct/.local/share/virtualenvs/mmyolo-dGEsbyu_/lib/python3.11/site-packages/pip/_internal/commands/install.py", line 419, in run
    requirement_set = resolver.resolve(
                      ^^^^^^^^^^^^^^^^^
  File "/Users/pdmct/.local/share/virtualenvs/mmyolo-dGEsbyu_/lib/python3.11/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 92, in resolve
    result = self._result = resolver.resolve(
                            ^^^^^^^^^^^^^^^^^
  File "/Users/pdmct/.local/share/virtualenvs/mmyolo-dGEsbyu_/lib/python3.11/site-packages/pip/_vendor/resolvelib/resolvers.py", line 481, in resolve
    state = resolution.resolve(requirements, max_rounds=max_rounds)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/pdmct/.local/share/virtualenvs/mmyolo-dGEsbyu_/lib/python3.11/site-packages/pip/_vendor/resolvelib/resolvers.py", line 373, in resolve
    failure_causes = self._attempt_to_pin_criterion(name)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/pdmct/.local/share/virtualenvs/mmyolo-dGEsbyu_/lib/python3.11/site-packages/pip/_vendor/resolvelib/resolvers.py", line 213, in _attempt_to_pin_criterion
    criteria = self._get_updated_criteria(candidate)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/pdmct/.local/share/virtualenvs/mmyolo-dGEsbyu_/lib/python3.11/site-packages/pip/_vendor/resolvelib/resolvers.py", line 203, in _get_updated_criteria
    for requirement in self._p.get_dependencies(candidate=candidate):
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/pdmct/.local/share/virtualenvs/mmyolo-dGEsbyu_/lib/python3.11/site-packages/pip/_internal/resolution/resolvelib/provider.py", line 237, in get_dependencies
    return [r for r in candidate.iter_dependencies(with_requires) if r is not None]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/pdmct/.local/share/virtualenvs/mmyolo-dGEsbyu_/lib/python3.11/site-packages/pip/_internal/resolution/resolvelib/provider.py", line 237, in <listcomp>
    return [r for r in candidate.iter_dependencies(with_requires) if r is not None]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/pdmct/.local/share/virtualenvs/mmyolo-dGEsbyu_/lib/python3.11/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 247, in iter_dependencies
    requires = self.dist.iter_dependencies() if with_requires else ()
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/pdmct/.local/share/virtualenvs/mmyolo-dGEsbyu_/lib/python3.11/site-packages/mim/commands/install.py", line 247, in patched_iter_dependencies
    if 'mim' in self.iter_provided_extras:
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: argument of type 'method' is not iterable

Bug fix
If you have already identified the reason, you can provide the information here. If you are willing to create a PR to fix it, please also leave a comment here and that would be much appreciated!

It was an issue with mismatched python versions.


Bug: iOS notifications sometimes received twice

I have a script that runs every day at 00:00, and will sometimes send a notification. This morning I saw two notifications on my phone - one at 00:00 and one at 00:07. On my (self-hosted) ntfy I only see a single notification in the web UI (at 00:00). In the ntfy ios app I also see a single notification for 00:00.
It seems like the popup notification was sent twice for some reason? I'll try and replicate it later today.

Do they show in the UI twice? I am pretty sure I have experienced this as well, but I thought I imagined it. Since I don't use an iOS device myself during day to day, it is much less likely to happen to me.
Try hard-killing the app and seeing if you see one or two notifications in the list.

Note to self: my guess is that this is another one of those Core Data inconsistencies across processes.

I made the mistake of clearing the notifications before taking a screenshot - I'm trying to replicate again and will grab one if I can.
The duplicate notifications just appeared in the notifications tray. Only a single one showed in the ntfy app.

It's potentially related to "do not disturb" mode. I just turned it on, sent 1 notification via the web ui and after a few minutes I turned off dnd mode.

That's a good lead, thank you. I'll investigate this when I get to it.
Here's my current hunch:
Every 20 minutes or so, the app polls for new messages from the server. If a message is not in the local database, it'll display it as a local notification. If the remote message eventually arrives via Firebase, there is no way for me to silence the notification. It's impossible without the "notification filtering entitlement", which Apple denied me when I requested it.
It could be that in DND mode, messages arrive neither via Firebase, nor is polling allowed to execute. Once you come out of DND, both run at the same time and race, and two notifications are displayed. That's just a guess though. I'd have to test it.

I got this overnight. I have a parrot tell me everything is still working at 4am.
Latest iOS app, Latest ntfy server via docker self hosted, it was during nightly fixed DND time for both notifications.  Screen shots if it's helpful.

Thanks. Definitely helpful to confirm it. I wish I could ask you for logs, but I haven't figured out how to write/persist them in iOS so you can share them (like I did in Android). That would make things so much easier.

I set up a cron job to send myself a notification at 1am every day (while quiet hours are on) and this morning the notifications had timestamps of 01:00 and 01:15.
Are more screenshots helpful at this point?
If you get a testflight build set up to try and pinpoint this I'm keen to run it.

It seems like what might be happening here is that the iOS instant notification is received and if there is no interaction with the phone or ntfy app, the non-instant version of the notification also eventually makes its way to the phone and you get the double notification.  This is only conjecture from my observations using the iOS app and not anything deeper than that.  (and I have not upgraded beyond 1.25.2 server yet)

I can also confirm duplicate notifications arriving 5-15 minutes later than the original. I will add that I do not use Do Not Disturb but I still experience the issue when I don't open the app to look at the notification. The correlation to Do Not Disturb may be a coincidence. The app itself does not show duplicate messages - the issue is only with notifications.
I've been loving this service and the new iOS app. Keep up the great work!

So my guess is that this is caused by two things:

The first message is received via Firebase/APNS and persisted to Core Data. Messages received via APNS run in the Notification Service Extension (NSE), not in the main app. They do, however, persist to the same Core Data database.
The second message is received from the polling mechanism: Every 20 minutes or so, the app receives a "poll all topics" message on the internal ~poll topic. That will instruct the main app to poll for new messages. To find out the last message it received, it uses the lastNotificationId field and then polls using /mytopic/json?since=$id. This ID is coming from Core Data.

The issue is this (this is a GUESS!): The Core Data database is not properly in sync between the main app and the NSE, which means the lastNotificationId is out of sync, so messages are delivered/displayed twice. This is bug https://github.com/binwiederhier/ntfy/issues/316.
This causes another bug too, where the UI does not reflect all messages all the time (this is: https://github.com/binwiederhier/ntfy/issues/337). It is annoying and it just shows that I don't know how Core Data works internally. It could also be a bug, but it's annoying.
Again, this is just a guess.
Debugging this is next to impossible, because

(a) You'll have to compile and run the iOS app yourself and hook it up to Firebase and APNS. It doesn't work in a Simulator because Firebase doesn't work in a simulator.
(b) Because the NSE is a separate process, the logs for it do not show up in the log console of Xcode. You have to manually attach a debugger and such. It is surpremely annoying.

Before you ask "what the heck": 90% of this is Apple's fault, of how the NSE and all that work. The problem with Core Data is obviously my fault, but I have no time currently to debug this or spend any time with it.

Seeing the same issue. Self hosted install. Notifications always seem to be 7 minutes apart.

I do use DND but pretty sure it's not always on when I receive the duplicate notifications, but mostly happens at night
Checked my script logs to make sure it only executed once around that time
Only one notification shows within the iOS app and web UI at the time of the original run (not the 7 minutes later)
upstream-base-url: "https://ntfy.sh" is set for instant notifications

Thanks for everything

I do believe this is fixed by #677/#509 -- If it still happens, please comment here and I'll re-open.


Yarn/Node version locking downstream issues

Caused by upstream CF packages.
See: https://github.com/counterfactual/monorepo/issues/2394
This issue is being opened largely to keep track of the problem in our own sprint workflow

This is only an issue because we are having trouble updating to CF version 0.2.83.

For reference: https://github.com/ConnextProject/indra/pull/466 updates CF to 0.3.0 so that should take care of this issue too

This should be fixed now.


on Windows/Linux custom soundset works strangely

@Milozzy reports https://github.com/airtoxin/Sublime-Sound/issues/12#issuecomment-217708541

Many many thanks for solving the other one, I'll follow this one and keep testing if needed.
Regards ;)

on linux, it is aplay command problem maybe.
I'm looking for workaround.

Great, let me know if you need testing ;)


Improved AudioScheduledSourceNode

Hey,
A first progress in improving AudioScheduledSourceNode performances
Mostly reviewed how output is created:

fill output channel by channel to access memory in an aligned way
uses more functional paradigms

This improves perf between 1.3 and 1.5 in benchmarks on my mac, which I think is really outside the noise
before

id
name
duration (ms)
Speedup vs. realtime
buffer.duration (s)

2
Simple source test without resampling (Mono)
147
816.3x
120

3
Simple source test without resampling (Stereo)
193
621.8x
120

4
Simple source test with resampling (Mono)
145
827.6x
120

5
Simple source test with resampling (Stereo)
195
615.4x
120

after

id
name
duration (ms)
Speedup vs. realtime
buffer.duration (s)

2
Simple source test without resampling (Mono)
98
1224.5x
120

3
Simple source test without resampling (Stereo)
141
851.1x
120

4
Simple source test with resampling (Mono)
98
1224.5x
120

5
Simple source test with resampling (Stereo)
140
857.1x
120

I would be interested if you see the same kind of changes on your side ?
In any case, do not merge yet, I would also like to try something else.
I think we could also apply that strategy to the delay node (which also would allow to remove set_channels_values_at fomr AudioRenderQuantum)
edit after 023e767

id
name
duration (ms)
Speedup vs. realtime
buffer.duration (s)

2
Simple source test without resampling (Mono)
90
1333.3x
120

3
Simple source test without resampling (Stereo)
108
1111.1x
120

4
Simple source test with resampling (Mono)
91
1318.7x
120

5
Simple source test with resampling (Stereo)
110
1090.9x
120

Hey nice, I'm seeing improvements too
- 2       | Simple source test without resampling (Mono)                             | 59            | 2033.9x               | 120
- 3       | Simple source test without resampling (Stereo)                           | 67            | 1791.0x               | 120
- 4       | Simple source test without resampling (Stereo and positionnal)           | 196           | 612.2x                | 120
- 5       | Simple source test with resampling (Mono)                                | 54            | 2222.2x               | 120
- 6       | Simple source test with resampling (Stereo)                              | 66            | 1818.2x               | 120
- 7       | Simple source test with resampling (Stereo and positionnal)              | 191           | 628.3x                | 120

Compared to current main
- 2       | Simple source test without resampling (Mono)                             | 61            | 1967.2x               | 120
- 3       | Simple source test without resampling (Stereo)                           | 82            | 1463.4x               | 120
- 4       | Simple source test without resampling (Stereo and positionnal)           | 203           | 591.1x                | 120
- 5       | Simple source test with resampling (Mono)                                | 57            | 2105.3x               | 120
- 6       | Simple source test with resampling (Stereo)                              | 83            | 1445.8x               | 120
- 7       | Simple source test with resampling (Stereo and positionnal)              | 209           | 574.2x                | 120

Exciting news - moreover when we can apply it to other nodes.
I have not looked into the code changes yet, will do tomorrow


Backport dependabot updates & #624 to 1.x

Description
Backports recent main changes to 1.x that could not be automatically backported due to CHANGELOG conflicts.

❗ SHOULD BE REBASE MERGED❗

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

Rebase-merged.