Native Cached Results

Description
I find myself using this pattern a lot
if not os.path.isfile("sample_selection_test_all.npy"):
    np.save(
        "sample_selection_test_all", data_sample_export(test_data, test_sample)
    )
    np.save(
        "sample_selection_train_all",
        data_sample_export(train_data, train_sample),
    )

exported_train = np.load("sample_selection_train_all")
exported_test = np.load("sample_selection_test_all")

I wonder if saving computations + saving outputs is on the roadmap.
(docs recommend functools memo, but I like to restart notebooks sometime)
Suggested solution
result = mo.saved(x)
execution unwraps result, saves it to file, or loads it.
or after cell execution could unwrap result
for stateless, could hash ref dag as file name. (hash concated cell contents)

mo.save(plt.gca()) # Last line
allows cell to have a default output. State ensured by the ref dag hash
Alternative
Tons of ways doing this, just provided a suggestion
Additional context
No response

It's something Myles and I have talked about, yes! We even considered using the same API name. So yes, we'll likely support something like this.

@akshayka @mscolnick Do you all have a road map for this? Here is a very rough outline
def save(callback : Callable[[], T],
         sign_and_verify : Union[None, str, tuple[Callable[[str], str], Callable[[str], bool]] = None,
         store_and_load : Union[None, str, tuple[Callable[[str], str], Callable[[str], bool]] = None,
         pin_marimo_lib=False,
         pin_sys_libs=False,
         pin_local_libs=True,
         save_path="outputs",
         *,
         name) -> T:
    """
    Save functionality.

    Save a function output under a hash of cell and ancestors, as such relevant changes to the
    compute graph will invalidate a saved value. For an external example of a similar procedure,
    see the NAR spec on how inputs can be used to hash and verify file compute results:
    https://edolstra.github.io/pubs/phd-thesis.pdf (5.2.2. Store paths, p.g 93) , and the relevant
    section motivating store paths.

    Args:
        callback (Callable[[], T]): The function to be executed and its result saved.
        sign_and_verify (Union[None, str, tuple[Callable[[str], str], Callable[[str], bool]]): Optional. Function or functions to sign and verify the output. If a string is provided, it is assumed to be the name of a known signing and verifying method.
        store_and_load (Union[None, str, tuple[Callable[[str], str], Callable[[str], bool]]): Optional. Function or functions to store and load the output. If a string is provided, it is assumed to be the name of a known storing and loading method.
        pin_marimo_lib (bool): If True, the marimo library version is used for cache invalidation. Default is False.
        pin_sys_libs (bool): If True, the system libraries versions are used for cache invalidation. Default is False.
        pin_local_libs (bool): If True, the local libraries, using the __version__ variable, are used for cache invalidation. Default is True.
        save_path (str): The path where the output will be saved. Default is "outputs".
        name (str): The name of the output file.

    Returns:
        T: The result of the callback function.

    Raises:
        Exception: If the output cannot be signed, stored, or loaded.
    """

    Args:
    """
    ...
    # Run traceback, get content for code up to function call, and compile
    # Hash ancestors
    # Create digest of combined ancestors and current code content
    # if {save_path}/{hash}/{name} doesn't exist
    #  - Run function
    #  - Run sign on outputs
    #  - Save in {save_path}/{hash}/{name}
    # else:
    #  - load data!

I have a stub I could flesh out, but I wanted to discuss it in more detail first. Will definitely be smaller than my last PR lol, but all the same

@dmadisetti — thanks for the design sketch. It's really cool!
We don't yet have a roadmap or design spec — yours is a great place to start.
Usage.
To check my understanding: Is this usage correct?
Cell 1:
x_value = 1
y_value = 2

Cell 2:
def add(x, y):
  return x + y

func = lambda: add(x_value, y_value)
x_plus_y = mo.save(func)

Decorator
Would it be possible to have an API that could be used as a decorator?
@mo.save
def add(x, y):
  return x + y

x_plus_y = mo.save(add)

or even

@mo.save
@functools.cache
def add(x, y):
  return x + y

x_plus_y = mo.save(add)

Signature.
The function has many arguments. Is sign_and_verify really necessary? What use case do you foresee for that?

@mo.save("name")
def add(x, y):
  return x + y

x_plus_y = add()

?
I think that's doable. The implementation I was thinking of uses the call frame to build call context.
If a function is "pure" then the result is dependent directly on the arguments and not necessarily the execution path, so maybe that needs to be decoupled from this spec. functools.cache is set up to capture these cases.
There's also a nix analog for this (idk if it's in the thesis) with content addressable storage, which checks the contents of the inputs and not the input paths (what's in my spec here).

Is sign_and_verify really necessary?

The NAR scheme gives you guarantees of the values that go into your computation, but there's no method of checking the "correctness" of the result.
Nix gets around this by making the "store" strictly read-only + caching results externally. That means that the result is essentially tamper proof. marimo doesn't have these guarantees baked in. I think an external cache is a bit much, and an RO file system is not easily enforceable (nix is pretty invasive in this regard). But we can use something like a pgp signature to verify a computation result. Probably a bit more academic than practical, but was still trying to think through the "correct" way of doing things. It could just be a set it up and forget it like GitHub signatures.
As for the other arguments, it's more to allow overriding of needed, with the expectation it'll mostly be default.

How about
@mo.save("name")
def add(x, y):
  return x + y

x_plus_y = add(1, 2)

as well as
@mo.save("name")
def add(x, y):
  return x + y + some_ref

x_plus_y = add(1, 2)

with mo.save() returning a callable whose signature matches the wrapped function? I understand that this doesn't match your spec (statically determined input paths). But otherwise (IIUC) users would need to rewrite this as
def add(x, y):
  return x + y

func = lambda: add(x_value, y_value)
x_plus_y = mo.save(func, "name")

which feels non-obvious.

If a function is "pure" then the result is dependent directly on the arguments and not necessarily the execution path,  so maybe that needs to be decoupled from this spec ... There's also a nix analog for this (idk if it's in the thesis) with content addressable storage, which checks the contents of the inputs and not the input paths (what's in my spec here).

It would be really nice to be able to use the same function — mo.save — regardless of whether the function was "pure" ("refless") or not. Especially sincefunctools.cache doesn't save to disk.
It's okay if this isn't possible ... you've thought about this much more than I have. Thoughts?

Probably a bit more academic than practical, but was still trying to think through the "correct" way of doing things. It could just be a set it up and forget it like GitHub signatures.

Okay, sounds good, makes sense.

As for the other arguments, it's more to allow overriding of needed, with the expectation it'll mostly be default.

Sounds good.

save could hide the details of hashing by content vs execution. A little naive, but the "primitive check" like in strict execution could be a way to determine "pure" functions. The pure case could kick in for the your first case example, and the execution path for the second, resolved by required_refs.
Keeping save results in memory like functools seems reasonable, execution saves could also invalidate the cache more meaningfully than functools too. I'm sure there's an edge case where it will eat up a users memory, but I think it's a premature optimization until someone complains.
For API
saved = mo.savable(foo, params)(a,b,c)

Or
with mo.saved_context(params):
    x = add(1, 2, 3)

The latter is tricky, but maybe possible with a bit of static analysis and swapping out the relevant functions, or hackily skipping the execution block and running it through an exec (which I think is less error prone for marimo, but might be harder for a user to debug)
Another option is saving on a cell level. Then you don't have to deal with passing in wrapped values, you can get a saved result through a flag.

Another option is saving on a cell level. Then you don't have to deal with passing in wrapped values, you can get a saved result through a flag.

Yea I thought about that -- that could be pretty nice. If enabled, notebooks could populate with outputs instantly on startup, which would be pretty great.

saved = mo.savable(foo, params)(a,b,c)

So this would be a different API than mo.save? What are params and how are they different from a, b, and c?
I guess fundamentally there are two different types of caching, which to the user may feel the same but whose implementations are different (content addressed vs path addressed) And I'm wondering if we can have the same API for both. It's okay if we can't, but we should just be clear on that.
By the way. For all of this -- mo.save acts like a cache, in that it can and will invalidate old entries and delete them from disk. Right? Which means that you shouldn't use mo.save if you want to permanently save an artifact to disk or elsewhere (eg a plot, a numpy array, etc) . If I got that right, maybe the API should be called mo.cache.

 So this would be a different API than mo.save? What are params and how are they different from a, b, and c?

params being the keywords like name and save_path. It's a little different. The with block is definitely possible though
I think it's doable, but it might be worth exposing the individual functions (execution_cache, function_cache) as well, because the behavior is going to be subtly different.
Right, so we haven't mentioned deleting at all- if runs are going to be invalidated then that's definitely worth documenting and renaming from save.
I think the execution path case has less of a reason to invalidate cache, but a function called many times may should likely be a "cache" over "save".

params being the keywords like name and save_path

Got it, makes sense.

I think it's doable, but it might be worth exposing the individual functions (execution_cache, function_cache) as well, because the behavior is going to be subtly different.

Ok, good point about the behavior being different — could be save for the execution path case, cache for the one based on runtime values, if we end up adopting the saving/caching behavior you suggest.

Right, so we haven't mentioned deleting at all- if runs are going to be invalidated then that's definitely worth documenting and renaming from save.

Ah — in your spec I assumed "invalidate" meant "delete", but you're right the "cache" can be invalidated without actually deleting values from disk.
To bring it all together, we've proposed ...

An API that saves to disk (and loads from disk) values based on ancestors + code, ie based on the execution path. I like your spec. When a saved value is "invalidated", we need to decide whether the saved artifact remains on disk.
Maybe an API for caching function values to disk.
Maybe overloading the API from 1 to handle 2 as well, but I see your point now why the two might be better separate.
An option to bake "saving" into the runtime on a cell level — could be controlled via an app config. In this case saved values would likely be deleted from disk upon invalidation.

How do you think we should proceed?

Here's a proposed rollout:
1.) Execution-path first with the with statement, to remove any ambiguity w.r.t. the types of caching (the "function" cache doesn't really make sense in this context)
with mo.experimental.cached_context(name="expensive_calls", ...):
    x = expensive_call()
    y = another_expensive_call(x)
# x and y are "cached", there's a python workaround that can just conditionally skip this block, and populate x y from load
...
def cached_context(
                  pin_marimo_lib : bool = False, # could also go by "major" | "minor" | "patch" | None; default minor here on the safe side
                  pin_sys_libs : bool = False, # major
                  pin_local_libs : bool = True, # patch
                  max_size=None,
                  save_path : str = ".marimo_outputs", # or just outputs
                  *,
                  name : str):
    """
    same as above, just reduced. I think the load and sign fns were premature optimization
    additionally "max_size=None" which will specify the max number of saves before LRU cleanup.
    """

2.a) This will unlock cell level save / cache (basically the same as wrapping the whole block in a with, but can have tighter integration + would need some UI work / a CellConfig attribute)
2.b Can be done concurrently or before 2.a) Function level calls, mo.persistent_cache as a drop-in replacement for functools.cache, uses the save to disk infrastructure that 1. lays down, and more sophisticated argument checking

Future

Get cache to work on wasm (load over HTTP vs from disk)
Consider sign and load

@dmadisetti , this looks good to me! We'd just need to make sure to get the naming right so that the difference between cached_context and persistent_cache was clear.
In my mind, down for starting work on 1) if you're still interested!

@akshayka I want to limit feature creep like my last feature. Sending you a notebook over discord (failed at feature creep because both content addressed and execution path are implemented).
Play around with it, and give me your thoughts
Known bugs:

AST is a little brritle, first line under width has to be a statement


Get-NavContainerSharedFolders returns error The length must not be less than 0 (zero).

Describe the issue
I added the following parameter while creating a bc container
-additionalParameters @('-v \.\pipe\docker_engine:\.\pipe\docker_engine')
This leads to the problem that Get-NavContainerSharedFolders stopped working correctly due to the following error message:
The length must not be less than 0 (zero).
Parameter name: length
Scripts used to create container and cause the issue
[string]$ContainerName = "CRONUS-BC18-01-DE"
[string]$artifactUrl  = "https://bcartifacts.azureedge.net/sandbox/18.1.24822.40616/de"

New-BcContainer `
    -accept_eula `
    -accept_outdated `
    -containerName $ContainerName `
    -artifactUrl $artifactUrl  `
    -memoryLimit 6G `
    -auth NavUserPassword `
    -Credential $cred `
    -updateHosts `
    -restart unless-stopped `
    -doNotCheckHealth `
    -shortcuts None `
    -PublishPorts @(80,443) `
    -isolation hyperv `
    -additionalParameters @('-v \\.\pipe\docker_engine:\\.\pipe\docker_engine')

Full output of scripts
BcContainerHelper is version 4.0.5
BcContainerHelper is running as administrator
Hyper-V is Enabled
UsePsSession is True
Host is Microsoft Windows 11 Pro - 21H2
Docker Client Version is 20.10.17
Docker Server Version is 20.10.17
Removing entries from hosts
Removing CRONUS-BC18-01-DE from container hosts file
Removing CRONUS-BC18-01-DE-* from container hosts file
Removing Desktop shortcuts
Removing C:\ProgramData\BcContainerHelper\Extensions\CRONUS-BC18-01-DE
Fetching all docker images
Fetching all docker volumes
Using image mcr.microsoft.com/businesscentral:10.0.20348.1249
Publishing port 80
Publishing port 443
Disabling Health Check (always report healthy)
Creating Container CRONUS-BC18-01-DE
Style: sandbox
Multitenant: Yes
Version: 18.1.24822.40616
Platform: 18.0.24800.40606
Generic Tag: <IP_ADDRESS>
Container OS Version: 10.0.20348.1249 (ltsc2022)
Host OS Version: 10.0.22000.675 (21H2)
Using hyperv isolation
Using locale de-DE
Disabling the standard eventlog dump to container log every 2 seconds (use -dumpEventLog to enable)
Additional Parameters:
-v \\.\pipe\docker_engine:\\.\pipe\docker_engine
-v c:\temp:c:\temp
Files in C:\ProgramData\BcContainerHelper\Extensions\CRONUS-BC18-01-DE\my:
- AdditionalOutput.ps1
- MainLoop.ps1
- SetupVariables.ps1
- updatehosts.ps1
Creating container CRONUS-BC18-01-DE from image mcr.microsoft.com/businesscentral:10.0.20348.1249
452d70b49923667ac7a27df3a381053a75dd79293204d72a2d68f0bc24ff8a0a
Waiting for container CRONUS-BC18-01-DE to be ready
Adding CRONUS-BC18-01- to hosts file
Using artifactUrl https://bcartifacts.azureedge.net/sandbox/18.1.24822.40616/de
Using installer from C:\Run\150-new
Installing Business Central
Installing from artifacts
Starting Local SQL Server
Starting Internet Information Server
Copying Service Tier Files
c:\dl\sandbox\18.1.24822.40616\platform\ServiceTier\Program Files
c:\dl\sandbox\18.1.24822.40616\platform\ServiceTier\System64Folder
Copying PowerShell Scripts
c:\dl\sandbox\18.1.24822.40616\platform\WindowsPowerShellScripts\Cloud\NAVAdministration
c:\dl\sandbox\18.1.24822.40616\platform\WindowsPowerShellScripts\WebSearch
Copying Web Client Files
c:\dl\sandbox\18.1.24822.40616\platform\WebClient\Microsoft Dynamics NAV
Copying Client Files
c:\dl\sandbox\18.1.24822.40616\platform\LegacyDlls\program files\Microsoft Dynamics NAV
c:\dl\sandbox\18.1.24822.40616\platform\LegacyDlls\program files\Microsoft Dynamics NAV
c:\dl\sandbox\18.1.24822.40616\platform\LegacyDlls\systemFolder
Copying ModernDev Files
c:\dl\sandbox\18.1.24822.40616\platform
c:\dl\sandbox\18.1.24822.40616\platform\ModernDev\program files\Microsoft Dynamics NAV
Copying additional files
Copying ConfigurationPackages
C:\dl\sandbox\18.1.24822.40616\platform\ConfigurationPackages
Copying Test Assemblies
C:\dl\sandbox\18.1.24822.40616\platform\Test Assemblies
Copying Extensions
C:\dl\sandbox\18.1.24822.40616\de\Extensions
Copying Applications
C:\dl\sandbox\18.1.24822.40616\platform\Applications
Copying Applications.DE
C:\dl\sandbox\18.1.24822.40616\de\Applications.DE
Copying dependencies
Copying ReportBuilder
Importing PowerShell Modules
Restoring CRONUS Demo Database
Setting CompatibilityLevel for tenant on localhost\SQLEXPRESS
Exporting Application to CRONUS
Removing Application from tenant
Modifying Business Central Service Tier Config File for Docker
Creating Business Central Service Tier
Installing SIP crypto provider: 'C:\Windows\System32\NavSip.dll'
Starting Business Central Service Tier
Importing license file
Copying Database on localhost\SQLEXPRESS from tenant to default
Taking database tenant offline
Copying database files
Attaching files as new Database default
Putting database tenant back online
Mounting tenant database
Mounting Database for default on server localhost\SQLEXPRESS with AllowAppDatabaseWrite = False
Sync'ing Tenant
Tenant is Operational
Stopping Business Central Service Tier
Installation took 152 seconds
Installation complete
Initializing...
Setting host.docker.internal to <IP_ADDRESS> in container hosts file (copy from host hosts file)
Setting gateway.docker.internal to <IP_ADDRESS> in container hosts file (copy from host hosts file)
Setting kubernetes.docker.internal to <IP_ADDRESS> in container hosts file (copy from host hosts file)
Setting host.containerhelper.internal to <IP_ADDRESS> in container hosts file
Starting Container
Hostname is CRONUS-BC18-01-DE
PublicDnsName is CRONUS-BC18-01-DE
WARNING: Container starts with TimeZone = MitteleuropÃ¤ische Zeit, which is not recognized in the list of TimeZones.
Using NavUserPassword Authentication
Creating Self Signed Certificate
Self Signed Certificate Thumbprint 55E587FF39132178000AE78085A584DCE751B21B
DNS identity CRONUS-BC18-01-DE
Modifying Service Tier Config File with Instance Specific Settings
Starting Service Tier
Registering event sources
Creating DotNetCore Web Server Instance
Using application pool name: BC
Using default container name: NavWebApplicationContainer
Copy files to WWW root C:\inetpub\wwwroot\BC
Create the application pool BC
Create website: NavWebApplicationContainer without SSL
Update configuration: navsettings.json
Done Configuring Web Client
Enabling Financials User Experience
Dismounting Tenant
Mounting Tenant
Mounting Database for default on server localhost\SQLEXPRESS with AllowAppDatabaseWrite = False
Sync'ing Tenant
Tenant is Operational
Creating http download site
Setting SA Password and enabling SA
Creating admin as SQL User and add to sysadmin
Creating SUPER user
WARNING: The password that you entered does not meet the minimum requirements.
It should be at least 8 characters long and contain at least one uppercase
letter, one lowercase letter, and one number.
Container IP Address: <IP_ADDRESS>
Container Hostname  : CRONUS-BC18-01-DE
Container Dns Name  : CRONUS-BC18-01-DE
Web Client          : http://CRONUS-BC18-01-DE/BC/?tenant=default
Dev. Server         : http://CRONUS-BC18-01-DE
Dev. ServerInstance : BC
Dev. Server Tenant  : default
Setting CRONUS-BC18-01-DE to <IP_ADDRESS> in host hosts file
Setting CRONUS-BC18-01-DE-default to <IP_ADDRESS> in host hosts file
Setting CRONUS-BC18-01-DE-default to <IP_ADDRESS> in container hosts file

Files:
http://CRONUS-BC18-01-DE:8080/ALLanguage.vsix

Container Total Physical Memory is 6.5Gb
Container Free Physical Memory is 4.1Gb

Initialization took 32 seconds
Ready for connections!
Reading CustomSettings.config from CRONUS-BC18-01-DE
Container CRONUS-BC18-01-DE successfully created

Get-BcContainerSharedFolders -containerName $ContainerName
Get-BcContainerSharedFolders Telemetry Correlation Id: 8511a82d-cd98-44be-886b-2ae0b978f30e
ForEach-Object : Ausnahme beim Aufrufen von "Substring" mit 2 Argument(en):  "Die Länge darf nicht kleiner als 0 (null) sein.
Parametername: length"
In C:\Users\svanduehren\Documents\WindowsPowerShell\Modules\BcContainerHelper\4.0.5\ContainerInfo\Get-NavContainerSharedFolders.ps1:28 Zeichen:37
+         $inspect.HostConfig.Binds | ForEach-Object {
+                                     ~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [ForEach-Object], MethodInvocationException
    + FullyQualifiedErrorId : ArgumentOutOfRangeException,Microsoft.PowerShell.Commands.ForEachObjectCommand

https://github.com/microsoft/navcontainerhelper/blob/master/ContainerInfo/Get-NavContainerSharedFolders.ps1
Maybe code could be changed like this:
$inspect = docker inspect $containerName | ConvertFrom-Json
$sharedFolders = @{}
if ($inspect.HostConfig.Binds) {
    $inspect.HostConfig.Binds | ForEach-Object {
        if ($_.StartsWith('\\')) {
            $idx = $_.IndexOf(':')
        }
        else {
            $idx = $_.IndexOf(':', $_.IndexOf(':') + 1)
        }
        $src = $_.Substring(0, $idx).TrimEnd('\')
        $dst = $_.SubString($idx+1)
        if ($dst.Contains(':')) {
            $idx = $dst.IndexOf(':', $_.IndexOf(':') + 1)
            if ($idx -gt 0) {
                $dst = $dst.SubString(0,$idx)
            }
        }
        $sharedFolders += @{ $src = $dst }
    }
}

There was actually another bug in that code, introduced in the fix for https://github.com/microsoft/navcontainerhelper/issues/929 but never found.
If anything, this code:
$idx = $dst.IndexOf(':', $_.IndexOf(':') + 1)
should have been
$idx = $dst.IndexOf(':', $dst.IndexOf(':') + 1)
But with the new fix, but are fixed.


[Feature]: Activation: Shorten the feature walkthrough delay time

Is there an existing issue for this?

[X] I have searched the existing issues

Summary

Set the delay time to 2 sec for before showing walkthrough to users.
reference

Why should this be worked on?
Activation.

Checked on latest prod with a new user, and the time delay has been reduced.


BUG: Fix devroye sampler from returning -NAN for proposal sample in corner cases

closes #83

Codecov Report

Merging #85 (f59c26c) into main (da31ac8) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##              main       #85   +/-   ##
=========================================
  Coverage   100.00%   100.00%
=========================================
  Files            2         2
  Lines          122       122
=========================================
  Hits           122       122

Continue to review full report at Codecov.

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

@martinjankowiak This PR fixes the issue you were having. I'd appreciate a review of these changes and maybe verifying on your side before I merge. See jupyter output below:
In [1]: import numpy as np
   ...: from polyagamma import random_polyagamma
   ...:
   ...: bad_state = {'bit_generator': 'PCG64', 'state': {'state':<PHONE_NUMBER>77372604878304246648472662937,
   ...:              'inc':<PHONE_NUMBER>7582989555478159403783844777}, 'has_uint32': 1, 'uinteger': 165759272}
   ...:
   ...: rng = np.random.default_rng(0)
   ...: rng.__setstate__(bad_state) # if this line is commented out the sampler returns as usual
   ...:
   ...: bad_z = np.array([-7.7159955279217645, -5.688383408336662, ..., -11.262049026248997, -1.0490965770517695])
   ...:
   ...: random_polyagamma(np.ones(bad_z.shape), bad_z, random_state=rng)
Out[1]:
array([0.06480045, 0.09556523, 0.03866176, 0.05635552, 0.05808285,
       0.10362004, 0.07145932, 0.06681459, 0.07606001, 0.03960328,
       0.09757399, 0.03384288, 0.08357525, 0.09744253, 0.14979175,
       0.15821123, 0.01561182, 0.1906274 , 0.08124902, 0.06887569,
       0.13828779, 0.12985848, 0.07560077, 0.02174524, 0.0656849 ,
       0.0326521 , 0.06262509, 0.08701867, 0.10914685, 0.08634814,
       0.12132461, 0.07285461, 0.08216356, 0.53011678, 0.04410328,
       0.08960637, 0.03237516, 0.02333878, 0.07034101, 0.12270179,
       0.05114739, 0.02470546, 0.09101826, 0.03753353, 0.43420199,
       0.31547854, 0.07434058, 0.08962173, 0.03122681, 0.06423907,
       0.09992103, 0.03889329, 0.40907573, 0.04972762, 0.08443332,
       0.0331861 , 0.07383895, 0.21156568, 0.02375437, 0.16064011,
       0.15511968, 0.05544921, 0.03468974, 0.09895899, 0.18999056,
       0.15786266, 0.03935569, 0.21828314, 0.2253067 , 0.09377626,
       0.06541529, 0.28789689, 0.10828346, 0.0487434 , 0.12612896,
       0.04882379, 0.24900166, 0.04549486, 0.10802875, 0.06287274,
       0.0783371 , 0.04884058, 0.08697378, 0.04352953, 0.10941918,
       0.08717974, 0.08622359, 0.05203451, 0.04079096, 0.16154658,
       0.03494318, 0.17084883, 0.06094518, 0.09289351, 0.20614002,
       0.43456235, 0.07274774, 0.19438151, 0.04266162, 0.03007659,
       0.08649423, 0.07162172, 0.10535403, 0.01571231, 0.05530639,
       0.27585844, 0.06137601, 0.03899531, 0.07158479, 0.38572719,
       0.1641808 , 0.01632364, 0.03640405, 0.45319565, 0.23438236,
       0.04480479, 0.17741932, 1.18523909, 0.19158178, 0.06913153,
       0.10806838, 0.03637171, 0.06321395, 0.10459718, 0.15511272,
       0.04364698, 0.22063289, 0.04432424, 0.10332783, 0.04631343,
       0.16360763, 0.05938432, 0.24682321, 0.09766731, 0.05088283,
       0.05141575, 0.07719655, 0.04185521, 0.21681528, 0.0276814 ,
       0.12514608, 0.04847786, 0.19478002, 0.04022334, 0.07697026,
       0.02180848, 0.04468513, 0.08002056, 0.06460919, 0.04519808,
       0.12822491, 0.16584231, 0.05484134, 0.04619014, 0.09149664,
       0.25533044, 0.07570376, 0.03042486, 0.11082696, 0.2055575 ,
       0.40679173, 0.05404726, 0.06486755, 0.12171584, 0.10538963,
       0.07476394, 0.0743287 , 0.04321462, 0.02469561, 0.16619639,
       0.08659504, 0.05697804, 0.06997582, 0.04547043, 0.29588109,
       0.04862183, 0.09912302, 0.06120085, 0.07990393, 0.05170703,
       0.01780162, 0.41052266, 0.09317197, 0.22416023, 0.17015127,
       0.03800913, 0.05038368, 0.06819091, 0.06116336, 0.16601597,
       0.03748188, 0.09875945, 0.41730249, 0.13839247, 0.05038348,
       0.03629958, 0.02237369, 0.06737085, 0.05921063, 0.13793648,
       0.52883132, 0.15287834, 0.06239574, 0.05290823, 0.07074641,
       0.0701263 , 0.03216004, 0.09009504, 0.08359783, 0.10717485,
       0.08460443, 0.02409278, 0.12143383, 0.05897423, 0.11761096,
       0.03055956, 0.07017743, 0.02960197, 0.02860937, 0.07035317,
       0.09792273, 0.10065746, 0.08530609, 0.2439539 , 0.08320937,
       0.0577314 , 0.06633372, 0.15290996, 0.04890648, 0.04719016,
       0.06262546, 0.11655502, 0.03733521, 0.03225868, 0.04927151,
       0.03184792, 0.2486868 , 0.04843895, 0.0613028 , 0.20990734,
       0.05536106, 0.15457448, 0.09154746, 0.04728982, 0.02914311,
       0.37280641, 0.05298227, 0.03926289, 0.05993699, 0.25425678,
       0.09065753, 0.0348825 , 0.1364469 , 0.10766854, 0.45706958,
       0.03098665, 0.0229615 , 0.29113927, 0.0718172 , 0.10470633,
       0.09373596, 0.21187842, 0.03916783, 0.06779375, 0.15833019,
       0.09612553, 0.04091125, 0.0593119 , 0.17069756, 0.04657598,
       0.12289571, 0.20407593, 0.07341975, 0.13903534, 0.06797372,
       0.01839591, 0.09225939, 0.21234158, 0.07139172, 0.125778  ,
       0.12381853, 0.1714896 , 0.07110502, 0.13338454, 0.21889546,
       0.11699899, 0.08997228, 0.15104015, 0.05182762, 0.03937113,
       0.18670464, 0.07845328, 0.05809031, 0.02735345, 0.05627254,
       0.04310017, 0.06371783, 0.09527529, 0.03784278, 0.1062358 ,
       0.12074054, 0.07026747, 0.07412658, 0.08999481, 0.10520449,
       0.25125677, 0.05037708, 0.08396454, 0.06115052, 0.04784642,
       0.04661972, 0.0676631 , 0.02300315, 0.03728655, 0.06750432,
       0.1154763 , 0.04593849, 0.03703   , 0.08701148, 0.07552391,
       0.19878586, 0.05271636, 0.19182191, 0.03011243, 0.17898338,
       0.10943263, 0.15688014, 0.0680296 , 0.08768696, 0.10552324,
       0.40117018, 0.04483716, 0.10158448, 0.0418921 , 0.22325162,
       0.20211339, 0.16484312, 0.18732399, 0.18330451, 0.04828012,
       0.09848161, 0.08120127, 0.1279053 , 0.04405975, 0.04106071,
       0.02620072, 0.026083  , 0.0464953 ])

@zoj613 thanks for the quick response! i'm not really sure how i can check this for you. if i clone this repo and checkout this branch will the C get compiled as needed? not really sure how that sort of thing works...

If you have poetry installed in your environment, then you can checkout this branch and then run poetry install  to install the Dev dependencies followed by make install to build and install the python library. Assuming that the repo directory is in your $PYTHONPATH then just a python REPL and test it using your original code.

great, thanks for the instructions. yup i can confirm that this PR eliminates the issue in the repro script 👍
unfortunately i can't speak to the specific numerical changes, as i've never taken the time to look into the details of PG sampling strategies

Thats good to hear. I am fairly confident that the source of the hang was the line changed here after doing some debugging on the C-side. The changes themselves involve an algebraic re-arrangement of the argument to the sqrt function so as to avoid taking the difference of two terms and instead use addition that guarantees positive sign. I explained the math in the last sentence of my comment in the corresponding issue.

thanks @martinjankowiak for the review and issue report!


instrumenting: add process_virtual_memory_max_bytes

Needs https://github.com/prometheus/client_golang/pull/440

lgtm


Child node to configure

I am getting this error, any idea to what it could be related to?
InvalidConfigurationException in ArrayNode.php line 240:
The child node "entity_class" at path "melifaro_booking" must be configured.

@pierloui
Add to your config.yml
melifaro_booking:
    entity_class: Vendor\Bundle\Entity\Concrete


Expand Home Remedies Section

I would like to propose adding more home remedies. This enhancement will provide users with a wider range of options and information on effective home treatments, enriching the platform's content and user experience.
Suggested Changes

Research and compile additional home remedies that are relevant to the project’s focus.
Ensure that the new remedies are presented with clear descriptions and usage instructions.
Consider categorizing remedies based on conditions or benefits for better navigation.

you can work on one issue at a time and same issue is also opened by another contributor


Chef-client unable to find Recipe

Description
I am getting an error Chef::Exceptions::RecipeNotFound when trying to run the chef-client on a node after uploading my cookbook with knife cookbook upload and updating the node's run-list to call the recipe. I used:
knife node run_list set wtatestuser "recipe[testingnecinit::necinit.rb]"
Chef Version
Chef Development Kit Version: 2.0.26
chef-client version: 13.2.20
delivery version: master
berks version: 6.2.0
kitchen version: 1.16.0
inspec version: 1.30.0
Platform Version
The chef server is running Ubuntu and my ChefDK machine is on Mac OSX Sierra (latest stable update).
Replication Case
First create a working server for chef, then successfully bootstrap the node that you wish to manage with knife bootstrap. Then, create a cookbook with multiple recipes, and upload to chef server with knife cookbook upload. Update the node's run-list with knife node run-list then use knife ssh to remotely run the chef client on the node. Then you should see this error.
Client Output
knife sudo password:
  Starting Chef Client, version 13.4.19
  resolving cookbooks for run list: ["testingnecinit::necinit.rb"]
  Synchronizing Cookbooks:
    - testingnecinit (0.1.1)
  Installing Cookbook Gems:
  Compiling Cookbooks...

  Recipe Compile Error

  Chef::Exceptions::RecipeNotFound

  could not find recipe necinit.rb for cookbook testingnecinit

  System Info:

  chef_version=13.4.19
  platform=mac_os_x
  platform_version=10.12.6
  ruby=ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-darwin14]
  program_name=chef-client worker: ppid=11209;start=09:43:17;
  executable=/opt/chef/bin/chef-client

  Running handlers:
  [2017-09-19T09:43:21-04:00] ERROR: Running exception handlers
  Running handlers complete
  [2017-09-19T09:43:21-04:00] ERROR: Exception handlers complete
  Chef Client failed. 0 resources updated in 03 seconds
  [2017-09-19T09:43:21-04:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
  [2017-09-19T09:43:21-04:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
  [2017-09-19T09:43:21-04:00] ERROR: could not find recipe necinit.rb for cookbook testingnecinit
  [2017-09-19T09:43:21-04:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)

## Stacktrace
Generated at 2017-09-19 09:43:21 -0400
Chef::Exceptions::RecipeNotFound: could not find recipe necinit.rb for cookbook testingnecinit
/opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.4.19/lib/chef/cookbook_version.rb:194:in `load_recipe'
/opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.4.19/lib/chef/run_context.rb:343:in `load_recipe'
/opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.4.19/lib/chef/run_context/cookbook_compiler.rb:163:in `block in compile_recipes'
/opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.4.19/lib/chef/run_context/cookbook_compiler.rb:160:in `each'
/opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.4.19/lib/chef/run_context/cookbook_compiler.rb:160:in `compile_recipes'
/opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.4.19/lib/chef/run_context/cookbook_compiler.rb:77:in `compile'
/opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.4.19/lib/chef/run_context.rb:192:in `load'
/opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.4.19/lib/chef/policy_builder/expand_node_object.rb:97:in `setup_run_context'
/opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.4.19/lib/chef/client.rb:513:in `setup_run_context'
/opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.4.19/lib/chef/client.rb:281:in `run'
/opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.4.19/lib/chef/application.rb:291:in `block in fork_chef_client'
/opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.4.19/lib/chef/application.rb:279:in `fork'
/opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.4.19/lib/chef/application.rb:279:in `fork_chef_client'
/opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.4.19/lib/chef/application.rb:244:in `block in run_chef_client'
/opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.4.19/lib/chef/local_mode.rb:44:in `with_server_connectivity'
/opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.4.19/lib/chef/application.rb:232:in `run_chef_client'
/opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.4.19/lib/chef/application/client.rb:469:in `sleep_then_run_chef_client'
/opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.4.19/lib/chef/application/client.rb:458:in `block in interval_run_chef_client'
/opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.4.19/lib/chef/application/client.rb:457:in `loop'
/opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.4.19/lib/chef/application/client.rb:457:in `interval_run_chef_client'
/opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.4.19/lib/chef/application/client.rb:441:in `run_application'
/opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.4.19/lib/chef/application.rb:59:in `run'
/opt/chef/embedded/lib/ruby/gems/2.4.0/gems/chef-13.4.19/bin/chef-client:26:in `<top (required)>'
/usr/local/bin/chef-client:58:in `load'
/usr/local/bin/chef-client:58:in `<main>'

Not really sure what I'm doing wrong. Any suggestions? I really don't want to have to rebuild this server again (already have like 4 times). It would help if there was better documentation on the non-web assisted version of chef.

That should be knife node run_list set wtatestuser "recipe[testingnecinit::necinit]", i.e. without the .rb.

I'm silly thank you.


Add a faster image reprojection implementation

A faster implementation for image reprojection which will be used by the bokeh interface. Here are some basic profiling results for the old (cartopy regrid) and new (resampling) implementation:

Going to merge this. Have tested it and tests are passing.


[SPARK-15664] [MLlib] Replace FileSystem.get(conf) with path.getFileSystem(conf) when removing CheckpointFile in MLlib

What changes were proposed in this pull request?
if sparkContext.set CheckpointDir to another Dir that is not default FileSystem, it will throw exception when removing CheckpointFile in MLlib.
So we should always get the FileSystem from Path to avoid wrong FS problem.
How was this patch tested?
N/A

Test build #59644 has started for PR 13408 at commit a403c15.

Test build #59644 has finished for PR 13408 at commit a403c15.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/59644/
Test PASSed.

Also LGTM

Merged to master/2.0


Unclear values for vmware_vm_cpu_usage_average metric

From @dannyk81 on February 10, 2018 1:53
I can't quite figure out the values of vmware_vm_cpu_usage_average metric, for example:
vmware_vm_cpu_usage_average{instance="<vcenter>",job="vmware-exporter",vm_name="xyz1"} | 202
vmware_vm_cpu_usage_average{instance="<vcenter>",job="vmware-exporter",vm_name="xyz2"} | 225
vmware_vm_cpu_usage_average{instance="<vcenter>",job="vmware-exporter",vm_name="xyz3"} | 4015
vmware_vm_cpu_usage_average{instance="<vcenter>",job="vmware-exporter",vm_name="xyz4"} | 207
vmware_vm_cpu_usage_average{instance="<vcenter>",job="vmware-exporter",vm_name="xyz5"} | 209

according to this https://www.vmware.com/support/developer/converter-sdk/conv61_apireference/cpu_counters.html
The description of this counter is Amount of actively used virtual CPU, as a percentage of total available CPU, but the values I'm seeing do not seem like percentages.
Any clues?
Copied from original issue: rverchere/vmware_exporter#29

@pryorda was this actually fixed in https://github.com/pryorda/vmware_exporter/pull/16?

If it it's suppose to be divided by 100 I don't think so.
Sent from ProtonMail mobile
-------- Original Message --------
On Oct 7, 2018, 12:49 PM, Danny Kulchinsky wrote:

@pryorda was this actually fixed in #16?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

@pryorda
Here's a sample:
# HELP vmware_vm_cpu_usage_average vmware_vm_cpu_usage_average
# TYPE vmware_vm_cpu_usage_average gauge
vmware_vm_cpu_usage_average{cluster_name="MAD-PROD",dc_name="MAD",host_name="esx-prod-4.foo.bar",vm_name="ELASTICDATA-03.PRD.MOVES.MAD"} 533.0
vmware_vm_cpu_usage_average{cluster_name="MAD-PROD",dc_name="MAD",host_name="esx-prod-4.foo.bar",vm_name="BLUE-KUBM-01.PRD.MOVES.MAD"} 774.0
vmware_vm_cpu_usage_average{cluster_name="MAD-PROD",dc_name="MAD",host_name="esx-prod-4.foo.bar",vm_name="PROMETHEUS-01.MAD"} 1474.0
vmware_vm_cpu_usage_average{cluster_name="MAD-PROD",dc_name="MAD",host_name="esx-prod-4.foo.bar",vm_name="BLUE-KUBW-01.PRD.MOVES.MAD"} 888.0
vmware_vm_cpu_usage_average{cluster_name="MAD-PROD",dc_name="MAD",host_name="esx-prod-4.foo.bar",vm_name="KAF-05.PRD.MOVES.MAD"} 175.0

Above should be percentages, only dividing them by 100 do I get a meaningful value.
Can you confirm it's the same in your case?

Being divided by 100 def looks better. I'll add a PR later tonight.

Ugh, never got around to this but based on the verbiage in here: https://www.vmware.com/support/developer/converter-sdk/conv61_apireference/cpu_counters.html
VM - Amount of actively used virtual CPU, as a percentage of total available CPU. This is the host's view of the CPU usage, not the guest operating system view. It is the average CPU utilization over all available virtual CPUs in the virtual machine. For example, if a virtual machine with one virtual CPU is running on a host that has four physical CPUs and the CPU usage is 100%, the virtual machine is using one physical CPU completely.
and
Memory usage as percentage of total configured or available memory
I'm wondering if we should create some kind of mapping to get the correct values?
Something like:
mem_usage == percent.
cpu_usage == percent.

if type ==  percent:
  value / 100

I don't get it, I have some values way over 1000 (6000+) for vmware_vm_cpu_usage_average so even by dividing them by 100 it isn't a acceptable value, over 100% CPU usage ?
Is there a way to get the cpu_usage_percentage ?
Thanks

According to this: https://www.vmware.com/support/developer/converter-sdk/conv61_apireference/cpu_counters.html
This is how it gets the value: virtual CPU usage = usagemhz / (# of virtual CPUs x core frequency)

Thanks for you reply ! However, this is what I get running a few tests.
Example for a VM :
Usagemhz : 18953
Number of virtual CPUs : 8
Core frequency : 2593.993 MHz
vmware_vm_cpu_usage_average = 18953 / (8*2593.993) = 0.9133
Then it is multiplied by 10 000 because the value I get in prometheus is 9133 so the correct formula is :
vmware_vm_cpu_usage_average = usagemhz / (# virtual CPUs * core frequency) * 10 000
Or I'm getting the wrong unit in core frequency, because 18953 / (8 * 0.2593993) = 9133

I'm not sure. I dont think we do any mangling of that, but I can double check. I "assume" its the second formula.

Has someone found a way to exploit this value ? Like how to convert it to %cpu used ?
I don't seem to get anything from it apart from a number that indicates a cpu workload without any real unit.
Would be helpful!

I usually just graph all the vms and find the outliers. I don't alert on cpu usage just load.

@jdelvecchio I use this metric in various dashboards and simply divide the value by 100.
running vmware_vm_cpu_usage_average /100>100 returns no data for all our deployments (~1000 VMs), so value is always 0~100.
I wonder if this has something to do with sockets/core? (though it shouldn't) in our case the cores per socket is always 1, how about you?

@dannyk81 running vmware_vm_cpu_usage_average /100>100 also returns no data for me.
I got my maths wrong, it seems to be %used. Thanks to both of you for the details and the help.
As for sockets/core it depends on the VM, we have a bit of both.

indeed, this metrics is average %used.
however the value returned does not have a decimal point, hence the need to divide by 100.


Improve Querydsl SQL docs

To me this looks good.

How about adding all elements to the snippet? Imports and everything?

Looks good.


declare parser attribute in mt when parsing ebml/mkv

When the FFV1 parser is used we have:
<block offset="720" name="Data" parser="FFV1" size="4530">
              <data offset="720" name="keyframe">Yes</data>
              <data offset="720" name="version">0</data>
              <data offset="720" name="coder_type">0</data>

can we get a parser="EBML" or a parser="Matroska" when this is used.

main issue is that we don't have a top level element for the full file, we have immediately block name="EBML", then block name="Segment"...
is it OK to put parser="Matroska" at the "media" element level? I guess the XSD need to be updated.

Could we add one conceptual block above EBML and Segment.
Such as:
<block offset="0" name="EBML Document" parser="Matroska" size="15257">
    <block offset="0" name="EBML" size="47">...</block>
    <block offset="47" name="Segment" size="15210">...</block>
</block>

It is not coherent, because the parser parses the bunch of top level elements:
<media ref="x">
    <block offset="0" name="EBML" parser="Matroska" size="47"></block>
    <block offset="47" name="Segment" size="126120"></block>
</media>

Putting it at the first element would mean that the parser parses the EBML element only.
Additionally, for other formats with e.g. raw frames, it would be even more weird:
<media ref="x">
    <block offset="0" name="Frame" parser="MPEG Audio" size="128"></block>
    <block offset="128" name="Frame" size="128"></block>
    <block offset="256" name="Frame" size="128"></block>
    <block offset="384" name="Frame" size="128"></block>
    <block offset="512" name="Frame" size="128"></block>
</media>

Does not make sense.
<media ref="x" parser="Matroska">
    <block offset="0" name="EBML" size="47"></block>
    <block offset="47" name="Segment" size="126120"></block>
</media>

makes more sense IMHO.

What about if mkv was within a larger file? MKV in MKV? Would the parser attribute go to the block parent of that?

Note that I should be able to have something coherent with another parser before the first block with main content.
Example:  I should be able to do something similar to:
<media ref="x" parser="MPEG Audio">
    <block offset="0" name="ID3v2 frame" parser="ID3v2" size="128"></block>
    <block offset="128" name="Frame" size="128"></block>
    <block offset="256" name="Frame" size="128"></block>
    <block offset="384" name="Frame" size="128"></block>
    <block offset="512" name="Frame" size="128"></block>
</media>

What about if mkv was within a larger file? MKV in MKV? Would the parser attribute go to the block parent of that?

Already handled (similar to FFV1, you see that the FFV1 parser info is at an upper element that the actual FFV1 content).

I think that works, so parser is the same on media and block and defines the parser of the content of that media or block.

Implemented, for most of the formats (e.g. AVI, MPEG-4/QuickTime, Matroska...) as it uses another feature.
Note that this is the MediaInfo internal name of the parser, so e.g. it is "Matroska" for both Matroska and WebM, "MPEG-4" for both MPEG-4 and QuickTime (with or without ftyp)...
https://github.com/MediaArea/MediaInfoLib/pull/173/commits/4a575fe40415ab425ed76b8391c681a69dbd8949


Improper comparison of floating point numbers

Running the test suite against cupy.array_api I'm seeing a lot of the following error:
self = <hypothesis.extra.array_api.ArrayStrategy object at 0x7fd585346f40>, val = 5.877471754111438e-39, val_0d = Array(0., dtype=float32)
strategy = floats(width=32)

    def check_set_value(self, val, val_0d, strategy):
        finite = self.builtin is bool or self.xp.isfinite(val_0d)
        if finite and self.builtin(val_0d) != val:
>           raise InvalidArgument(
                f"Generated array element {val!r} from strategy {strategy} "
                f"cannot be represented with dtype {self.dtype}. "
                f"Array module {self.xp.__name__} instead "
                f"represents the element as {val_0d}. "
                "Consider using a more precise elements strategy, "
                "for example passing the width argument to floats()."
            )
E           hypothesis.errors.InvalidArgument: Generated array element 5.877471754111438e-39 from strategy floats(width=32) cannot be represented with dtype float32. Array module cupy.array_api instead represents the element as 0.0. Consider using a more precise elements strategy, for example passing the width argument to floats().

I think the comparison self.builtin(val_0d) != val should be changed to isclose(val_0d, val).

@honno could you have a look at this?
@leofang can we move this issue to the https://github.com/data-apis/array-api-tests repo?

Will investigate, just noting this is actually a problem with Hypothesis.


Device Request - LoraTap 6 Button - TS0046 - 6 button wall remote

Prerequisites:

Before requesting a device addition, please ensure there is not already a request for the device among the open issues.
Make sure your Homey is upgraded to firmware v5 or higher.
You need a physical example of the device.

Device Information

Device Name: LoraTap 6 Button
Device Model: TS0046
Device Description: 6 Button wall remote
LoraTap ZigBee 3.0 Wireless 13 Types Push Button EU US Remote Controller Tuya Scene Automation Control Switch Smart Life App
Link to device image: https://www.aliexpress.com/item/1005007048362396.html?spm=a2g0o.order_list.order_list_main.77.21ef1802n3fBV5

Device Interview
{
    ["Paste the device interview information here"]
}

Property
Value

ID
929aa17c-1deb-475f-8dcc-2619922bf358

Name
Zigbee Device 6gang

Class
socket

Driver
homey:virtualdriverzigbee:driver

Ready
Yes

Available
Yes

Warning
No

Custom icon
No

Data

Key
Value

token
"b7b54b59-f262-4174-abc0-4fff4c8582d9"

Settings

Key
Value

zb_product_id
"TS0046"

zb_manufacturer_name
"_TZ3000_iszegwpd"

zb_receive_when_idle
"⨯"

zb_device_type
"enddevice"

zb_ieee_address
"a4:c1:38:03:92:c3:a1:b8"

zb_sw_build_id
""

zb_touchlink_group_ids
""

energy_alwayson
false

energy_value_off
null

energy_value_on
null

Additional Comments:

Note: Provide any other relevant information or requests related to the device. Link to where you bought the device can be of help

How to interview a device

Add the device as a generic Zigbee device in Homey
Navigate to https://developer.athom.com/tools/zigbee.
Interview the device, the button for this is to the right of the device in the list of Zigbee units.
Click the copy button/icon to capture the device information.
Paste the copied information above.

Note: To be able to add more devices to the Tuya Zigbee app, we rely on community members like you to provide interviews of the devices you want to be added. Thank you for your contribution!

I'll add this to the next update, please remote back how it works. I know it supports 1 and 2 click aswell as long press. Initially it will only support 1 and 2 clicks.

do I get a notification here when it's added?

@roxart in the test version now

not sure if you want feedback here or in the homey forum - however on a quick check with the flow below everything seems to trigger.
when I long press the 2 click triggers (I know you said it wont work at first just for you to know what happens)

also I want to add: the longpress is actually important for me, as I want to use some of these buttons to control blinds and longpress is to go up and stop on release
what is the problem, that those do not work?

Hi @roxart, no problem just work.. :)
This is what I see in the log when you press the buttons:
2024-10-07T21:27:23.247Z [log] [ManagerDrivers] [Driver:wall_remote_4_gang_3] [Device:72f144fa-4201-4cdc-ae33-0f42348505eb] endpointId: 4 , clusterId: 6 , frame: <Buffer 01 13 fd 00> , meta: { dstEndpoint: 1 }
2024-10-07T21:27:23.250Z [log] [ManagerDrivers] [Driver:wall_remote_4_gang_3] [Device:72f144fa-4201-4cdc-ae33-0f42348505eb] Frame JSON data: { type: 'Buffer', data: [ 1, 19, 253, 0 ] }
2024-10-07T21:27:23.258Z [log] [ManagerDrivers] [Driver:wall_remote_4_gang_3] [Device:72f144fa-4201-4cdc-ae33-0f42348505eb] Triggered 4 Gang Wall Remote, action=rightDown-oneClick
2024-10-07T21:27:24.257Z [log] [ManagerDrivers] [Driver:wall_remote_4_gang_3] [Device:72f144fa-4201-4cdc-ae33-0f42348505eb] endpointId: 4 , clusterId: 6 , frame: <Buffer 01 13 fd 00> , meta: { dstEndpoint: 1 }
2024-10-07T21:27:24.259Z [log] [ManagerDrivers] [Driver:wall_remote_4_gang_3] [Device:72f144fa-4201-4cdc-ae33-0f42348505eb] Frame JSON data: { type: 'Buffer', data: [ 1, 19, 253, 0 ] }
2024-10-07T21:27:24.266Z [log] [ManagerDrivers] [Driver:wall_remote_4_gang_3] [Device:72f144fa-4201-4cdc-ae33-0f42348505eb] Triggered 4 Gang Wall Remote, action=rightDown-oneClick
2024-10-07T21:27:35.131Z [log] [ManagerDrivers] [Driver:wall_remote_4_gang_3] [Device:72f144fa-4201-4cdc-ae33-0f42348505eb] endpointId: 1 , clusterId: 6 , frame: <Buffer 01 14 fd 00> , meta: { dstEndpoint: 1 }
2024-10-07T21:27:35.132Z [log] [ManagerDrivers] [Driver:wall_remote_4_gang_3] [Device:72f144fa-4201-4cdc-ae33-0f42348505eb] Frame JSON data: { type: 'Buffer', data: [ 1, 20, 253, 0 ] }
2024-10-07T21:27:35.335Z [log] [ManagerDrivers] [Driver:wall_remote_4_gang_3] [Device:72f144fa-4201-4cdc-ae33-0f42348505eb] Triggered 4 Gang Wall Remote, action=leftUp-oneClick
2024-10-07T21:27:36.121Z [log] [ManagerDrivers] [Driver:wall_remote_4_gang_3] [Device:72f144fa-4201-4cdc-ae33-0f42348505eb] endpointId: 1 , clusterId: 6 , frame: <Buffer 01 14 fd 00> , meta: { dstEndpoint: 1 }
2024-10-07T21:27:36.121Z [log] [ManagerDrivers] [Driver:wall_remote_4_gang_3] [Device:72f144fa-4201-4cdc-ae33-0f42348505eb] Frame JSON data: { type: 'Buffer', data: [ 1, 20, 253, 0 ] }
2024-10-07T21:27:36.298Z [log] [ManagerDrivers] [Driver:wall_remote_4_gang_3] [Device:72f144fa-4201-4cdc-ae33-0f42348505eb] Triggered 4 Gang Wall Remote, action=leftUp-oneClick
For me to know what button does what on your side it's important you use the buttons in the order of button 1 - 1 click, button 1 - 2 clicks, button 1 - long press and so forth. so that I can map the buttons to behaviour.
I'll add some extra logging too and give a notice when you can try and send a new diagnostic report.

ok I did what you asked for from button 1 to 6 always 1 click 2 click longpress
d3367203-408a-4681-aaa5-8dfc5dda050c

ok I did what you asked for from button 1 to 6 always 1 click 2 click longpress d3367203-408a-4681-aaa5-8dfc5dda050c

did this help @JohanBendz  or you need anything else?


The operartor-sdk init command fails for helm chart with bundled dependencies

Bug Report
What did you do?

Ran theoperator-sdk init command against a helm chart which has bundled sub-charts and the main Chart.yaml file has the dependencies entry specified with the file:// address resolver.
Command
operator-sdk init --plugins=helm \
  --helm-chart=/repo/helm/k10 \
  --project-name=k10-kasten-operator  \
  --domain=io --group=apik10.kasten \
  --version=v1alpha1 \
  --kind=K10

The /repo/helm/k10/Chart.yaml file
apiVersion: v2
description: Kasten’s K10 Data Management Platform
name: k10
version: v0.1.0-alpha
appVersion: v0.1.0-alpha
home: https://kasten.io/
maintainers:
  - email<EMAIL_ADDRESS>    name: kastenIO
icon: https://docs.kasten.io/_static/kasten.png
dependencies:
  - name: grafana
    version: 6.32.9
    repository: file://./charts/grafana
  - name: prometheus
    version: 15.8.5
    repository: file://./charts/prometheus

What did you expect to see?
Expected the operator-sdk init command to work successfully.
What did you see instead? Under which circumstances?

The operator-sdk init command failed.
It looks like the operator-sdk init command copies the bundled sub-charts as .tgz files under the generated helm-charts folder and the internally called operator-sdk create api command fails to pick up the sub-charts since the dependencies repository locations in the Chart.yaml file are no longer resolvable.
Complete logs...
operator-sdk init --project-name=k10-kasten-operator --plugins=helm --domain=io --group=apik10.kasten --version=v1alpha1 --kind=K10 --helm-chart=/repo/helm/k10
Writing kustomize manifests for you to edit...
Creating the API:
$ operator-sdk create api --group apik10.kasten --version v1alpha1 --kind K10 --helm-chart /repo/helm/k10
Writing kustomize manifests for you to edit...

Error: failed to create API: unable to scaffold with "base.helm.sdk.operatorframework.io/v1": failed to fetch chart dependencies: directory /repo/helm-charts/k10/charts/grafana not found
Usage:
  operator-sdk create api [flags]

Examples:
  $ operator-sdk create api \
      --group=apps --version=v1alpha1 \
      --kind=AppService

<cropped-the-examples-string>

Flags:
      --group string                resource Group
      --version string              resource Version
      --kind string                 resource Kind
      --helm-chart string           helm chart
      --helm-chart-repo string      helm chart repository
      --helm-chart-version string   helm chart version (default: latest)
  -h, --help                        help for api

Global Flags:
      --plugins strings   plugin keys to be used for this subcommand execution
      --verbose           Enable verbose logging

FATA[0000] failed to create API: unable to scaffold with "base.helm.sdk.operatorframework.io/v1": failed to fetch chart dependencies: directory /repo/helm-charts/k10/charts/grafana not found
Error: failed to initialize project: unable to run post-scaffold tasks of "base.helm.sdk.operatorframework.io/v1": exit status 1
Usage:
  operator-sdk init [flags]

Examples:
  $ operator-sdk init --plugins=base.helm.sdk.operatorframework.io/v1 \
      --domain=example.com \
      --group=apps \
      --version=v1alpha1 \
      --kind=AppService

<cropped-the-examples-string>

Flags:
      --project-version string      project version (default "3")
      --domain string               domain for groups (default "my.domain")
      --project-name string         name of this project
      --component-config            create a versioned ComponentConfig file, may be 'true' or 'false'
      --group string                resource Group
      --version string              resource Version
      --kind string                 resource Kind
      --helm-chart string           helm chart
      --helm-chart-repo string      helm chart repository
      --helm-chart-version string   helm chart version (default: latest)
  -h, --help                        help for init

Global Flags:
      --plugins strings   plugin keys to be used for this subcommand execution
      --verbose           Enable verbose logging

FATA[0001] failed to initialize project: unable to run post-scaffold tasks of "base.helm.sdk.operatorframework.io/v1": exit status 1

Environment
Operator type:
/language helm
Kubernetes cluster type:
OpenShift 4.10.17
$ operator-sdk version
operator-sdk version: "v1.24.1", commit: "1a1c56f7d0c7cfcc16e1ff2140caaa6d831b669b", kubernetes version: "1.24.2", go version: "go1.18.7", GOOS: "linux", GOARCH: "amd64"
$ go version (if language is Go)
go version go1.19.3 linux/amd64
$ kubectl version
{
  "clientVersion": {
    "major": "1",
    "minor": "24",
    "gitVersion": "v1.24.0",
    "gitCommit": "4ce5a8954017644c5420bae81d72b09b735c21f0",
    "gitTreeState": "clean",
    "buildDate": "2022-05-03T13:46:05Z",
    "goVersion": "go1.18.1",
    "compiler": "gc",
    "platform": "linux/amd64"
  },
  "kustomizeVersion": "v4.5.4",
  "serverVersion": {
    "major": "1",
    "minor": "23",
    "gitVersion": "v1.23.5+3afdacb",
    "gitCommit": "3c28e7a79b58e78b4c1dc1ab7e5f6c6c2d3aedd3",
    "gitTreeState": "clean",
    "buildDate": "2022-05-10T16:30:48Z",
    "goVersion": "go1.17.5",
    "compiler": "gc",
    "platform": "linux/amd64"
  }
}

Possible Solution

Additional context

Operator-sdk internally uses helm's helpers to load the chart directory with the dependent sub charts (https://github.com/operator-framework/operator-sdk/blob/b158b7e5a6625370a7e8dfe13fd27fdce53e0680/pkg/helm/release/manager_factory.go#L75-L78). Since the error says failed to fetch chart dependencies: directory /repo/helm-charts/k10/charts/grafana not found I'm not sure if this is an issue with the input. Can you try helm template command to check if it works locally (https://helm.sh/docs/helm/helm_template/)

The most common reason this happens is you need to have all the dependencies downloaded locally on disk. That might fix your problem, if it doesn't please let us know.

The problem is that the operator-sdk init command starts by copying the bundled sub-charts as .tgz files under the generated helm-charts folder and the subsequent operator-sdk create api command (invoked by the operator-sdk init command) fails to pick up the sub-charts since the dependencies repository locations in the Chart.yaml file are no longer resolvable.
The helm chart I am using has both the sub-charts in their directories. The chart is valid since I can install the product without any problem
helm install k10 ./helm/k10 -n kasten-io --create-namespace \
 --set image.repository=rich-access-174020 \
 --set image.tag=deploy.PASSED

You should be able to quickly reproduce this issue by running operator-sdk init command on any helm chart  which uses the file:// scheme for listing the dependency repository path
..
dependencies:
  - name: grafana
    version: 6.32.9
    repository: file://./charts/grafana          # this path will not be resolvable on the generated `helm-charts` folder since the `operator-sdk init` command zips the sub-chart as `grafana.tgz`
  - name: prometheus
    version: 15.8.5
    repository: file://./charts/prometheus       # this path will not be resolvable on the generated `helm-charts` folder since the `operator-sdk init` command zips the sub-chart as `prometheus.tgz`

same probelm， is there any progress

Can this issue be reopened? We are facing the same problem.


Jenkins jobs constantly throwing errors

In both environments, devel and prod, the way the jobs are being configured leads to constantly failing jobs. In both environments Spryker is expecting the code at different locations.

Fixed in release 2.32.1 (PR #35)


Fix message hash display

message hash was stored in a local variable, while summary_item_set_hash() saves a pointer to the hash to display it later. That led to a dangling pointer and wrong data displayed to the user. This PR introduces message_hash variable in the global state.

Nice catch, thanks


More typos...

Someone needs to proofread this page. Other typos found in the "important" box:
explictitly
identitied
additonally

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: cccdd91a-7f05-abd5-ed94-e82152b86914
Version Independent ID: 3532d0a8-119c-f7d0-0d4f-a865ad32570f
Content: Manage user access to Microsoft Teams - Microsoft Teams
Content Source: Teams/user-access.md
Service: msteams
GitHub Login: @LolaJacobsen
Microsoft Alias: lolaj

@MSFTEfeedback Thank you for submitting feedback and contributing to the docs. We are currently investigating this.

@MSFTEfeedback Thank you for submitting feedback. We understand that this issue has been resolved.
Please feel free to re-open this issue if there is a specific area of the docs that we can improve or make better. Thank you.


IntentDialog matches against FB quick_replies payload instead of FB message title

If you have a FB message that comes from a quick_reply, it seems like the IntentDialog matches against the "payload" instead of matching against the "title" text the user actually sees. Since it is a quick_reply, it's meant to be a shortcut to text that would be typed by the user anyway, so it should allow matching against that.

This is By Design... So this works the way it does to align with the way Keyboards work on other channels like Kik or Telegram.  On those other channels only the payload is sent. The label may be show to the user but never sent. We map the quick reply payload on Facebook to be the message.text for consistency purposes. These are essentially postBack actions for us which are always the payload.

Ah, got it. It's not a huge deal--I was using payload for additional info but I think I can munge it so it works.

You can bind them to actions if you use the dialogAction() method or just put "action?<action_name>=" for your payload. You can look at the facebook demo bot I posted yesterday for an example of this. This is how I bind persistent menu buttons to actions.
You can't easily bind buttons to a LUIS model although I'm planning to let you bind an action to an Intent and LuisRecognizer

action?<action_name>=<data>


build(ci): set --no-put to test command

Codecov Report

Merging #47 (a4b00f9) into master (9fbeba6) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##            master       #47   +/-   ##
=========================================
  Coverage   100.00%   100.00%
=========================================
  Files           96        96
  Lines          463       463
=========================================
  Hits           463       463

Continue to review full report at Codecov.

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

@rultor merge

@rultor merge

@rafamizes OK, I'll try to merge now. You can check the progress of the merge here

@rultor merge

@rafamizes Done! FYI, the full log is here (took me 2min)


how can I get box or TSR and TSSR when predict not eval？

I apologize for the late response.
The box is the content that should be given for inference. You can use the OCR information that exists in the dataset or use your own box.
As you can see in Instructions for proposed method in the readme, the inference code has the argument attention_vis. You can get TSR, and TSSR using this argument.
If you want to get something that is not synthesized with the image for visualization, you can use the model's seventh output, att_set
https://github.com/naver/garnet/blob/c5a7adb684979ecaa25603dd1aa71a8283d5dadb/CODE/inference.py#L106-L121
att_set[i][0]: TSR on the i-th layer
att_set[i][1]: TSSR on the i-th layer

thanks for your reply, I will try it.


Fixes bug when loading railtie within a rails app with action-mailer disabled

With a config/application.rb like so;
# NOTE: only require rails frameworks we need for an API
# require 'rails/all'
require 'rails'
require 'active_model/railtie'
require 'active_record/railtie'
require 'action_controller/railtie'

# NOTE: frameworks we are not including (see railties/all.rb)
# require 'action_mailer/railtie'
# require 'action_view/railtie'
# require 'sprockets/railtie'
# require 'rails/test_unit/railtie'

Booting the app / running tests results in
uninitialized constant Delayed::DelayMail (NameError)
/gems/ruby-2.2.5/gems/delayed_job-4.1.5/lib/delayed/railtie.rb:9:in `block (2 levels) in <class:Railtie>'
/gems/ruby-2.2.5/gems/activesupport-4.0.13/lib/active_support/lazy_load_hooks.rb:38:in `instance_eval'
/gems/ruby-2.2.5/gems/activesupport-4.0.13/lib/active_support/lazy_load_hooks.rb:38:in `execute_hook'
/gems/ruby-2.2.5/gems/activesupport-4.0.13/lib/active_support/lazy_load_hooks.rb:28:in `block in on_load'
/gems/ruby-2.2.5/gems/activesupport-4.0.13/lib/active_support/lazy_load_hooks.rb:27:in `each'
/gems/ruby-2.2.5/gems/activesupport-4.0.13/lib/active_support/lazy_load_hooks.rb:27:in `on_load'
/gems/ruby-2.2.5/gems/delayed_job-4.1.5/lib/delayed/railtie.rb:8:in `block in <class:Railtie>'
/gems/ruby-2.2.5/gems/railties-4.0.13/lib/rails/initializable.rb:30:in `instance_exec'
/gems/ruby-2.2.5/gems/railties-4.0.13/lib/rails/initializable.rb:30:in `run'
/gems/ruby-2.2.5/gems/railties-4.0.13/lib/rails/initializable.rb:55:in `block in run_initializers'
/rubies/ruby-2.2.5/lib/ruby/2.2.0/tsort.rb:226:in `block in tsort_each'
/rubies/ruby-2.2.5/lib/ruby/2.2.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component'
/rubies/ruby-2.2.5/lib/ruby/2.2.0/tsort.rb:429:in `each_strongly_connected_component_from'
/rubies/ruby-2.2.5/lib/ruby/2.2.0/tsort.rb:347:in `block in each_strongly_connected_component'
/rubies/ruby-2.2.5/lib/ruby/2.2.0/tsort.rb:345:in `each'
/rubies/ruby-2.2.5/lib/ruby/2.2.0/tsort.rb:345:in `call'
/rubies/ruby-2.2.5/lib/ruby/2.2.0/tsort.rb:345:in `each_strongly_connected_component'
/rubies/ruby-2.2.5/lib/ruby/2.2.0/tsort.rb:224:in `tsort_each'
/rubies/ruby-2.2.5/lib/ruby/2.2.0/tsort.rb:203:in `tsort_each'
/gems/ruby-2.2.5/gems/railties-4.0.13/lib/rails/initializable.rb:54:in `run_initializers'
/gems/ruby-2.2.5/gems/railties-4.0.13/lib/rails/application.rb:215:in `initialize!'
/gems/ruby-2.2.5/gems/cucumber-rails-1.4.5/lib/cucumber/rails/application.rb:15:in `initialize!'
/gems/ruby-2.2.5/gems/railties-4.0.13/lib/rails/railtie/configurable.rb:30:in `method_missing'
/app/config/environment.rb:5:in `<top (required)>'
/gems/ruby-2.2.5/gems/cucumber-rails-1.4.5/lib/cucumber/rails.rb:7:in `require'
/gems/ruby-2.2.5/gems/cucumber-rails-1.4.5/lib/cucumber/rails.rb:7:in `<top (required)>'
/app/features/support/env.rb:7:in `require'
/app/features/support/env.rb:7:in `<top (required)>'
/gems/ruby-2.2.5/gems/cucumber-2.4.0/lib/cucumber/rb_support/rb_language.rb:96:in `load'
/gems/ruby-2.2.5/gems/cucumber-2.4.0/lib/cucumber/rb_support/rb_language.rb:96:in `load_code_file'
/gems/ruby-2.2.5/gems/cucumber-2.4.0/lib/cucumber/runtime/support_code.rb:142:in `load_file'
/gems/ruby-2.2.5/gems/cucumber-2.4.0/lib/cucumber/runtime/support_code.rb:84:in `block in load_files!'
/gems/ruby-2.2.5/gems/cucumber-2.4.0/lib/cucumber/runtime/support_code.rb:83:in `each'
/gems/ruby-2.2.5/gems/cucumber-2.4.0/lib/cucumber/runtime/support_code.rb:83:in `load_files!'
/gems/ruby-2.2.5/gems/cucumber-2.4.0/lib/cucumber/runtime.rb:253:in `load_step_definitions'
/gems/ruby-2.2.5/gems/cucumber-2.4.0/lib/cucumber/runtime.rb:61:in `run!'
/gems/ruby-2.2.5/gems/cucumber-2.4.0/lib/cucumber/cli/main.rb:32:in `execute!'
/gems/ruby-2.2.5/gems/cucumber-2.4.0/bin/cucumber:8:in `<top (required)>'
/gems/ruby-2.2.5/bin/cucumber:23:in `load'
/gems/ruby-2.2.5/bin/cucumber:23:in `<top (required)>'
/rubies/ruby-2.2.5/lib/ruby/site_ruby/2.2.0/bundler/cli/exec.rb:75:in `load'
/rubies/ruby-2.2.5/lib/ruby/site_ruby/2.2.0/bundler/cli/exec.rb:75:in `kernel_load'
/rubies/ruby-2.2.5/lib/ruby/site_ruby/2.2.0/bundler/cli/exec.rb:28:in `run'
/rubies/ruby-2.2.5/lib/ruby/site_ruby/2.2.0/bundler/cli.rb:424:in `exec'
/rubies/ruby-2.2.5/lib/ruby/site_ruby/2.2.0/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/rubies/ruby-2.2.5/lib/ruby/site_ruby/2.2.0/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
/rubies/ruby-2.2.5/lib/ruby/site_ruby/2.2.0/bundler/vendor/thor/lib/thor.rb:387:in `dispatch'
/rubies/ruby-2.2.5/lib/ruby/site_ruby/2.2.0/bundler/cli.rb:27:in `dispatch'
/rubies/ruby-2.2.5/lib/ruby/site_ruby/2.2.0/bundler/vendor/thor/lib/thor/base.rb:466:in `start'
/rubies/ruby-2.2.5/lib/ruby/site_ruby/2.2.0/bundler/cli.rb:18:in `start'
/rubies/ruby-2.2.5/bin/bundle:30:in `block in <main>'
/rubies/ruby-2.2.5/lib/ruby/site_ruby/2.2.0/bundler/friendly_errors.rb:122:in `with_friendly_errors'
/rubies/ruby-2.2.5/bin/bundle:22:in `<main>'

This error is being triggered because your app is loading Action Mailer despite your request not to. Probably somewhere in one of your dependencies.
It does bring up that DJ needs to handle this differently, but this is not actually a fix as this solution has Action Mailer loaded but DJ is not properly hooked in.


Don't dismiss keyboard when tapping another text input

When using text inputs inside a ScrollView with keyboardShouldPersistTaps=false (default behavior) tapping another text input dismisses the keyboard instead of keeping it open and focusing the new text input which I think is the better and expected behavior.
See #10628 for more discussion about that. Note that this affects nothing but the behavior with text inputs unlike #10628.
cc @satya164 @MaxLap @ericvicenti

Sounds good to me!

Ok, this seems pretty non-controversial and desirable.
@facebook-github-bot shipit

That's another welcome change.
How does this behave with a <TextInput editable={false}/>? I'm not sure what would be ideal to be honest. Just raising the question.

@MaxLap That's a good point, I can probably check for this props and dismiss the keyboard in this case.

@ericvicenti Any idea why the import failed? Let me also update this to handle disabled inputs before shipping again.

@MaxLap @ericvicenti Tested with editable={false} input and it does actually work already since the textinput doesn't receive the touch event.

Oups that broken touchables in scrollviews, probably why the import failed, fixed it :)

I just tested this and it doesn't seem handle the editable={false} the way I expected.
From your commit, I edited the UIExplorerPage.js to keyboardShouldPersistTaps = false. Then I ran it and went to the TextInput page. There, I can tap on labels to show that keyboardShouldPersistTaps = false is dismissing the keyboard as it should. I can press other TextInputs and the keyboard stays up (very nice). However, when I tap on the editable=false that is somewhere in the middle of the page, the keyboard will remain open where I would have expected it to be dismissed.
I tested this on in the Android emulator.

@MaxLap Thanks for testing this, I did test on ios so the issue probably happens on android only. I guess touches are handled a bit differently for non-editable textinputs.

Touch target behavior was different on iOS and Android. I added a check if the view is disabled in the code that determines the touch target. That fixes the issue with disabled text inputs.
@astreet Could you sign off on this as the Android touch target stuff is more involved that originally planned. I checked which view uses setEnabled to make sure this won't cause any unexpected stuff. I wanted initially to just treat disabled views as not target-able but I stumbled on SwipeRefresh that uses enabled but still has target-able children. So what I did is treat the view as if it was had pointerEvents: BOX_NONE.

@astreet @gaearon Thanks for your suggestions, I changed the view target code to better handle pointer events when the view is disabled. This simple changes the pointer event to avoid making this code an if mess. This does AUTO -> BOX_NONE and BOX_ONLY -> NONE, this makes it so that view can never be the target if disabled but it's children can still be depending on what is sepecified in pointerEvents.
Also changed to use _currentElement.type as per @gaearon suggestion, I also had to add caching to requireNativeComponent like require does to have referential equality when requiring the same native component multiple times.

@astreet @gaearon Updated the JS part.

lgtm
@facebook-github-bot shipit


Set minimum word length

Is there a way to set the minimum word length to hyphenate? I'm trying to make my app as accessible as possible and supporting large text mode. I have some very short words that are supposed to fit in small spaces. I was hoping to still hyphenate small words so there wouldn't be any awkward trailing characters.

Could you give an example? I am not sure that I completely understand.
As a side note: I noticed that hyphen does not hyphenate words that are shorter than 5 characters if you use the German dictionary. But that is probably due to the matching patterns in the dictionary file. I looked at how MS Word does it and it behaves the same.
For example: You have the word "eine" which could be hyphenated as "ei-" and "ne". But it's not hyphenated by Word nor by hyphen. If you look at the German grammar and hyphenation rules, you will see that there are very specific rules and exceptions as to which words shorter than 5 letters are allowed to by hyphenated and which not.

I was originally thinking of forcing a hyphenation with some words. For example, "lea-ve". However, I think I'll just use the standard pattern provided and not hyphenate certain words.
However, I have a separate question. How come in the string "language & location" a soft hyphen is added to "language" but not "location"?

Well, that seems to be a bug then. Did you try hyphenating the words one by one? Does that make a difference? In our application I use hyphen only for the words that are located at the "edge" of a line.

For some reason, I don't see your last comment here on the thread....
But to answer your question, when I process the words individually they both get hyphenated. It's just when the whole string is hyphenated that only "language" is hyphenated. Since our application is supporting large font mode, we're hyphenating everything; not just edge cases.

You don't see my comment, because I decided to delete it and instead try your example for myself. :-)
This is my test page using the latest version 1.1.1 of hy-phen:
<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8" />
    <title>Test hy-phen</title>
  </head>

<body>

<script src="./en-gb.js"></script>
<script src="./hyphen.js"></script>

<script type="text/javascript">
  let hyphenateEnGb = createHyphenator(hyphenationPatternsEnGb, {debug: false, hyphenChar:'-'});

  let input = "language & location";
  let output = hyphenateEnGb(input);

  console.log(output);
</script>

</body></html>

The output I get in the console is:

lan-guage & loc-a-tion

Which is correct. Are you using the latest version? Try to create a minimal simple example on your side (like mine above) and see if the error is still there.

If anyone finds themselves in the same scenario:
/**
 * Hyphenate words with a minimum given length.
 *
 * @param {string} subject
 * @param {number} minWordLength
 * @return {string}
 */
hyphenate(subject, minWordLength = 20) {
    const words = subject.split(' ')

    return words.map(word => {
        if (word.length < minWordLength) {
            return word;
        }

        return hyphenateSync(word);
    }).join(' ');
}

Hi @Wiejeben , sorry for the late response.
For now, the minimum word length intended for hyphenation is 5 charachters long.
Accoding to your script, the minimum word length should be 20 characters.
As I understand, you want to hyphenate only very long words, is that correct?
If so, I can add an additional option to the constructor to cover your usecase. But keep in mind, that the minimum possible value of that option will still be 5 chars to sustain reasonable performance of the lib execution itself.

@ytiurin Having an option inside the library would be pretty useful, keeping default at 5 would obviously be no problem.

@jessamp @Wiejeben @krisztianb
I added an option minWordLength in version 1.6.0, hope this is useful :)
Thank you guys for your time and contribution!


Create a new entity Kind with no core modifications

If I add a new entity kind, I have to add it into the BuiltinKindsEntityProcessor.
Expected Behavior
Add new entity kinds with no core modifications.
Current Behavior
If you don't add your new entity kinds into the BuiltinKindsEntityProcessor class, validations will fail.
Possible Solution

Steps to Reproduce

Create a new entity kind class
Import an entity of the new kind from a YAML file

Context

Your Environment

NodeJS Version (v12): v14
Operating System and Version (e.g. Ubuntu 14.04): macOS Catalina 10.15.7
Browser Information: CLI

Hi!
The correct course of action is to create a new custom corresponding plugin of your own, and to add it to the catalog. The BuiltinKindsEntityProcessor continues to take care of the builtin kinds and yours takes care of the custom kinds.
You will have a file similar to this in your backend. The builder has an addProcessor method.

Hi!
The correct course of action is to create a new custom corresponding plugin of your own, and to add it to the catalog. The BuiltinKindsEntityProcessor continues to take care of the builtin kinds and yours takes care of the custom kinds.
You will have a file similar to this in your backend. The builder has an addProcessor method.

I'll close this one since I believe the use case is covered. Feel free to reopen the issue if you feel that this was in error!

I'll close this one since I believe the use case is covered. Feel free to reopen the issue if you feel that this was in error!


Transactions are successsful but I receive nothing!

I run dogecoind and dogecoin-cli in local network linux and also in cloud linux, everything looks working.
I can create wallets and I want to send doge into them I sent 1 doge to the local one and then I sent 0.2doge to the cloud one. And I didnt receive anything. the cloud one has open port to the public internet thats why I also used it. one of them has 75 confirmation and the other one has 15 confirmation but I got nothing why?
I sent doges from block.io website
txid for 1doge:
https://sochain.com/tx/DOGE/b8cb47685a71f26f33f4cdb822750826c8fa2f191e91f14debeee55a93ac0f7a
txid for 0.2doge:
https://sochain.com/tx/DOGE/d9be1cfc3aeefa5d11f3b8d6a882f7d03fe256bafcfda40ac5bd45b44e99234d
I am on the main network by:
dogecoin-cli getblockchaininfo

I see these transactions on my nodes. On the node with your wallet, could you please let us know:

dogecoin-cli getblockchaininfo and check the value for blocks to be > 5,123,502
dogecoin-cli getwalletinfo should give you a txcount of > 1
dogecoin-cli listunspent should list these
How do you query your balance?

hello, I think it is because of synchronizing, my node is not complete. I am new to it, i didnt know the reason before I open the issue. But now I have another issue, my dogecoin server keeps stoping after like 5 minutes. How do i publish the node without downloading all blockchain? I used pruning but it looks it still tries to download everything .
Here you may find some information:
root@c85teybxy2:~# free -h
total        used        free      shared  buff/cache   available
Mem:           1.9Gi       1.3Gi        69Mi       0.0Ki       530Mi       460Mi
Swap:             0B          0B          0B
root@c85teybxy2:~# dogecoin-cli getblockchaininfo
{
"chain": "main",
"blocks": 99531,
"headers": 4021995,
"bestblockhash": "d72a15c276f105f18d6b490fb426118050f8d91a679283aa004fc703a572c7c6",
"difficulty": 2005.936100016067,
"mediantime":<PHONE_NUMBER>,
"verificationprogress": 0.03029031921381798,
"initialblockdownload": true,
"chainwork": "00000000000000000000000000000000000000000000000003cf84a2fc082dcc",
"size_on_disk":<PHONE_NUMBER>,
"pruned": true,
"pruneheight": 0,
"automatic_pruning": true,
"prune_target_size":<PHONE_NUMBER>,
"softforks": [
{
"id": "bip34",
"version": 2,
"reject": {
"status": false
}
},
{
"id": "bip66",
"version": 3,
"reject": {
"status": false
}
},
{
"id": "bip65",
"version": 4,
"reject": {
"status": false
}
}
],
"bip9_softforks": {
"csv": {
"status": "defined",
"startTime":<PHONE_NUMBER>,
"timeout":<PHONE_NUMBER>,
"since": 0
}
},
"warnings": ""
}
root@c85teybxy2:~# dogecoin-cli getbalance ""
bash: dogecoin-calance: command not found
root@c85teybxy2:~# dogecoin-cli getbalance "*"
0.00000000
root@c85teybxy2:~#
And also my config file:
rpcuser=myusername
rpcpassword=mypasswd
dbcache=4
prune=2300
addnode=superfastdoge.ddns.net
addnode=us-1.wowsuchfast.com
addnode=us-2.wowsuchfast.com
addnode=dnf-1.gbf.re
addnode=dnf-2.gbf.re
addnode=dnf-3.gbf.re
addnode=dnf-4.gbf.re
addnode=dnf-beta.gbf.re
addnode=dnf-alpha.gbf.re
addnode=dnf-test.gbf.re
addnode=doge1-eu.langerhans.de
addnode=doge2-eu.langerhans.de
addnode=doge3-eu.langerhans.de
addnode=doge4-eu.langerhans.de
addnode=doge1-us-wa.hadamservices.com
addnode=doge2-us-wa.hadamservices.com
addnode=doge3-us-wa.hadamservices.com
addnode=doge4-us-wa.hadamservices.com
addnode=doge5-us-va.hadamservices.com
addnode=doge6-us-va.hadamservices.com
addnode=doge7-us-va.hadamservices.com
addnode=doge8-us-va.hadamservices.com
addnode=1.seed.dogecoin.gg
addnode=2.seed.dogecoin.gg
addnode=3.seed.dogecoin.gg
addnode=4.seed.dogecoin.gg
addnode=doge-node.com
addnode=dogenode.eu
addnode=dogenode.from-tx.com

But now I have another issue, my dogecoin server keeps stopping after like 5 minutes.

Could you check the bottom of debug.log after it's shut down? Should be:
tail -n 50 ~/.dogecoin/debug.log

"blocks": 99531,

this is why your balance is still zero, you're over 5 million blocks behind.

config
dbcache=4
..
addnode=[blah]

Why do you have a 4 mb cache?
Why do you have all these addnode?

5 million blocks, yeah as i said I understand it after opening the issue.
is that 4mb cache, wow i need to make it more! I Thought my vps server (2gb RAM) does not have enough ram when i see it fails in 5 minutes, and I searched somebody make dbcache 4 and said everything works fine. Then i did so.
Addnodes are for faster downloading the blockchain i think, again I saw it on the internet.

Thought my vps server (2gb RAM) does not have enough RAM.

I saw the 2GB. It's really low and your node may get killed for being out of memory, but per the above, I'd need to see the bottom of your log to help further investigate.

Addnodes are for faster downloading the blockchain i think

If everyone uses the same nodes, then the rest of the network is idle. Since even my newer Xeons cannot serve 125 peers with current network demand, it may be faster to not use addnode at all, or at least you'll have better chance of hitting an idle node instead of the subset of nodes multiple people are using.
Better to not add nodes because someone on the internet says so either, as it could help an attacker eclipse attack your node.

this is the error I get when the server is down:
root@c85teybxy2:~# dogecoin-cli getblockchaininfo
error: couldn't connect to server: unknown (code -1)
(make sure server is running and you are connecting to the correct RPC port)
do you know the reason?
These are the last lines of my debug.log:
2024-03-15 08:30:05 UpdateTip: new best=b7dc155c624f93ad3e546852491eea5bfe3a06984e1b27b00910bce1a02433e6 height=100297 version=0x00000001 log2_work=57.959054 tx=7532745 date='2014-02-14 09:15:01' progress=0.030406 cache=46.4MiB(136748tx)
2024-03-15 08:30:05 UpdateTip: new best=6301cde5d205c497db621829ec2f869ef2b55d8313e7400e84c1f7753b0f6151 height=100298 version=0x00000001 log2_work=57.959091 tx=7533015 date='2014-02-14 09:17:57' progress=0.030407 cache=46.5MiB(137037tx)
2024-03-15 08:30:05 UpdateTip: new best=e18a9fda9c006fe5ccb5e1d7ffb5b7217c38cac6e7e6fb6fb1c81738d51588f7 height=100299 version=0x00000002 log2_work=57.959129 tx=7533114 date='2014-02-14 09:19:07' progress=0.030408 cache=46.5MiB(137133tx)
2024-03-15 08:30:05 UpdateTip: new best=5e26550f3b2e1352564a36a4bd39311ec34dffee5109d1fc1625d1915ec86668 height=100300 version=0x00000002 log2_work=57.959167 tx=7533197 date='2014-02-14 09:20:25' progress=0.030408 cache=46.5MiB(137191tx)
2024-03-15 08:30:06 UpdateTip: new best=fab44c3ce4d4bae52f81e80b012a9da96fabb0cbe316e58f4de7af743410e615 height=100301 version=0x00000001 log2_work=57.959204 tx=7533451 date='2014-02-14 09:21:43' progress=0.030409 cache=46.6MiB(137467tx)
2024-03-15 08:30:06 Pre-allocating up to position 0x200000 in rev00017.dat

This could mean it gets OOM-killed (as there is no indication of a clean shutdown)
Try:
dmesg -T | grep killed

nothing is printed

hello, I created a new server with 4gb of ram and downloaded all the blockcahin pruning 50gb. I am now able to receive and sign transactions. perhaps the problem was pruning. because i started the core server without pruning then I restarted it with pruning, it caused failure. Now i learned that i need to delete all the blockchain and download all from scratch. I havent tried 2gb version yet. But i will try and we'll see. Since I found  my solution I will close the issue as solved. Also, thanks for your effort!

@RnoHach for the sake of lurking

hey @patricklodder  , it looks the problem is because of the limited ram. the issue remains for 2gb ram. it fails after some time. I also checked the used ram it goes almost 1.8gb/1.9gb. When it continues it increases up to 1.9/1.9 and goes out of ram. I also did some reducing ram steps and I think it was written by you, @patricklodder . It looks like it works at the begining but after some time it again runs out of ram and also very slow initialising. So I again created a 4gb ram vps server and i am downloading the blockchain.
"verificationprogress": 0.088
and ram usage= 2.4gb probably by dogecoin node.
You can check my node by clicking:
http://<IP_ADDRESS>/
and also for checking ram:
http://<IP_ADDRESS>/ram
it will be available until initialising finished.


Update dependencies to latest versions

Coverage increased (+5.2%) to 44.528% when pulling 478c9ba499d119b79c1023504af5433c462dfab5 on upgrade-a-bunch-of-stuff into bca5bc90501d104d2062d48228b504b8fe499945 on master.


Re-run workflow

Hrmm, maybe theres a bug in this schema validator that makes it only work on PR's?
Going to temporarily remove it from being ran on commit then.


mock_icd: Fix missing sync in vkFreeMemory

CI Vulkan-Tools build queued with queue ID 40098.

CI Vulkan-Tools build # 931 running.

CI Vulkan-Tools build # 931 passed.

CI Vulkan-Tools build queued with queue ID 40131.

CI Vulkan-Tools build # 932 running.

Verified this fixes the threading issue :+1:

CI Vulkan-Tools build # 932 passed.


Paragraph Explaining Radical Collaboration

Overview
Need to create a paragraph explaining radical collaboration so users can understand the significance of the inclusion of this feature on our site. In the Thursday morning meeting with Levi, Bonnie had said that she would write up this paragraph.
Action Items

[ ] Write paragraph explaining radical collaboration

Resources/Instructions
Radical Collaboration page

Thank you Bonnie !


Funny behaviour for "member .. interface with .. end" on the same line

Ok, this is about as low-priority as an issue can be. The only way I can imagine it ever being a problem would require, I don't know, a code generation tool that steadfastedly refused to use newlines.
I almost didn't want to open this issue, but I figure there's always a chance it could help as a clue to some other, actually significant problems with the lexer. Also, I find it interesting because of how bizarre it is.
Repro steps
This code compiles:
type I =
  abstract member M : int

type T0 = { F : string }
  with
    interface I with member __.M = 0 end
  end

This code does not compile, with squiggles under interface, the second member, and the second end:
type T1 = { F : string }
  with
    member x.M1 = 0 interface I with member __.M = 0 end
  end

FS0010 Unexpected keyword 'interface' in expression. Expected incomplete structured construct at or before this point or other token.
FS0010 Incomplete structured construct at or before this point in member definition. Expected 'member', 'override' or other token.
FS0010 Unexpected keyword 'end' in type definition. Expected incomplete structured construct at or before this point or other token.

Ok, so you can't put an interface implementation on the same line as a member? Nope! This code does compile:
type T2 = { F : string }
  with
    member x.M1 = 0 member x.M2 = 0 interface I with member __.M = 0 end
  end

But add a third member and the same compilation errors re-appear:
type T3 = { F : string }
  with
    member x.M1 = 0 member x.M2 = 0 member x.M3 = 0 interface I with member __.M = 0 end
  end

And so forth. interface after an even number of members = OK, after an odd number of members = error. (Tested up to n = 16.)
Note that only immediately preceding members on the same line matter. Adding members before or after the line has no effect on the above behaviour. For example, in this code, the first interface is fine but the second causes errors:
type T3a = { F : string }
  with
    member x.L = 0
    member x.M1 = 0 member x.M2 = 0 interface I with member __.M = 0 end member x.M3 = 0 interface I2 with member __.M2 = 1 end
    member x.N = 0
  end

Expected behavior
All of the above examples should compile.
Known workarounds

Don't commit crimes against basic coding standards
Put interface on its own line
Add #light "off"

Related information
I'm using the nightly release <IP_ADDRESS>91101 on VS2017, but the issue appears just as easily on DotNetFiddle: https://dotnetfiddle.net/wsbL0f

Haha this bug is funny :smile:
The workarounds also:

Don't commit crimes against basic coding standards

:joy:

@dsyme, I would argue that legal code that doesn't compile soulless typically be treated as a (serious) bug, not a feature or improvement request (and noticing the compiler seems to accept an even number of members and not an uneven number sets off some alarmbells with me, in that it may be a more serious bug than it seems). Fixing it might even result in other mysterious  compile behaviours to disappear and give users a stronger feeling of reliability.

Fixing it might even result in other mysterious compile behaviours to disappear and give users a stronger feeling of reliability.

Yes, but it might also create instability - given the workarounds I would be loathe to make a fix until a more serious customer-facing scenario was documented
But my initial categorization was based on reading just the first line of the issue, and the workarounds -
I've adjusted it :)


Added serialization/de-serialization to examples.tuplespace

I'd like to defer this to have more time integrating the distributed unordered_map with the tuple_space.

I'll go ahead and close this as obsolete. We'll keep the branch around for a while, though.