Visualizing convnet filters can't get the results as expected

This issue occured when I learned the Visualizing convnet filters.
I tried the code as below but the grid didn't show the resluts as it said.
I get the table with margin but empty in each grid.
I tried to debug and thought the issue may happen when the initialization of the 'resullts' or when the 'filter_image' put into the 'resluts'. But I didn't found the root cause.
Can anyone give a hand to update it?
The pyhton codes are as below:
from keras.applications import VGG16
from keras import backend as K
import numpy as np
import matplotlib.pyplot as plt
model = VGG16(weights='imagenet',
include_top=False)
def deprocess_image(x):
x -= x.mean()
x /= (x.std()+1e-5)
x *= 0.1
x += 0.5
x = np.clip(x, 0, 1)
x *= 255
x = np.clip(x, 0, 255).astype('uint8')
return x
def generate_pattern(layer_name, filter_index, size=150):
layer_output = model.get_layer(layer_name).output
loss = K.mean(layer_output[:, :, :, filter_index])
grads = K.gradients(loss, model.input)[0]
grads /= (K.sqrt(K.mean(K.square(grads)))+1e-5)
interate = K.function([model.input], [loss, grads])
input_img_data = np.random.random((1, size, size, 3))20+128.
step = 1.
for i in range(40):
loss_value, grads_value = interate([input_img_data])
input_img_data += grads_valuestep
img = input_img_data[0]
return deprocess_image(img)
plt.imshow(generate_pattern('block3_conv1', 0))
plt.show()
for layer_name in ['block1_conv1', 'block2_conv1', 'block3_conv1', 'block4_conv1']:
size = 64
margin = 5
results = np.zeros((8size+7margin, 8size+7margin, 3))
for i in range(8):
for j in range(8):
filter_image = generate_pattern(layer_name, i+(j8), size=size)
horizontal_start = isize+imargin
horizontal_end = horizontal_start+size
vertical_start = jsize+j*margin
vertical_end = vertical_start+size
results[horizontal_start:horizontal_end, vertical_start:vertical_end, :] = filter_image
plt.figure(figsize=(20, 20))
plt.imshow(results)
plt.show()
The screenshot of the issue is as below:

Hi, allowed range of values for imshow parameter is [0..1] for floats or [0..255] for integers. Data type of variable result is float, but range of values is [0..255]. So you need to change data type to int, or divide by 255.
First solution:
plt.imshow(results.astype(np.uint8))
Second solution:
plt.imshow(results/255)

Hi Silva
^_^
Thank you very much for your time to answer my question and I checked the parameter and code as you suggested.  Then I found the key point you said and I tried your way to make this issue resolved. Thank you so much again and I can close the CNN Fillters Visualization successfully now with your strong help !
I will tell the people who is facing the same problem with me about how to resolve it, too.
Thanks and Best Regards
Cloud [Shuo Zhang]
Your Chinese Friend
------------------ 原始邮件 ------------------
发件人<EMAIL_ADDRESS>发送时间: 2020年4月5日(星期天) 晚上8:14
收件人<EMAIL_ADDRESS>抄送: "西伯利亚狼"<845605918<EMAIL_ADDRESS>主题: Re: [fchollet/deep-learning-with-python-notebooks] Visualizing convnet filters can't get the results as expected (#133)
Hi, allowed range of values for imshow parameter is [0..1] for floats or [0..255] for integers. Data type of variable result is float, but range of values is [0..255]. So you need to change data type to int, or divide by 255.
First solution:
plt.imshow(results.astype(np.uint8))
Second solution:
plt.imshow(results/255)
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

Yes, you could add the chapter number to the question title. I think this could help people who encounter the same problem find answer quickly.

Thanks @OndrejSliva


[Azure Driver] Using docker-machine with a wrong/nonexistent parameter name report an error message that is not very useful

Hi,
when invoking docker-machine using the azure driver providing a wrong/nonexistent parameter name, the error reported in the output is not very useful.
It's the same with or without the  --debug parameter.
Repro
Launch the command:
> docker-machine --debug create -d azure --azure-static-public-ips

Actual Output
Docker Machine Version:  0.8.0, build b85aac1
Found binary path at /usr/local/bin/docker-machine
Launching plugin server for driver azure
Plugin server listening at address <IP_ADDRESS>:36218
() Calling .GetVersion
Using API Version  1
() Calling .SetConfigRaw
() Calling .GetMachineName
(flag-lookup) Calling .GetMachineName
(flag-lookup) Calling .DriverName
(flag-lookup) Calling .GetCreateFlags
Incorrect Usage.

Expected Output
Docker Machine Version:  0.8.0, build b85aac1
Found binary path at /usr/local/bin/docker-machine
Launching plugin server for driver azure
Plugin server listening at address <IP_ADDRESS>:36218
() Calling .GetVersion
Using API Version  1
() Calling .SetConfigRaw
() Calling .GetMachineName
(flag-lookup) Calling .GetMachineName
(flag-lookup) Calling .DriverName
(flag-lookup) Calling .GetCreateFlags
Incorrect Usage.
Invalid parameter 'azure-static-public-ips'

Thanks.

@D3-LucaPiombino have you checked if this is azure only?

Also looks like a regression from 0.7.0 possibly. Here's what I get in 0.7.0:

output
```
➜  ~ docker-machine --debug create -d azure --azure-static-public-ips
Docker Machine Version:  0.8.0-rc2, build 4ca1b85
Found binary path at /usr/local/bin/docker-machine
Launching plugin server for driver azure
Plugin server listening at address <IP_ADDRESS>:58989
() Calling .GetVersion
Using API Version  1
() Calling .SetConfigRaw
() Calling .GetMachineName
(flag-lookup) Calling .GetMachineName
(flag-lookup) Calling .DriverName
(flag-lookup) Calling .GetCreateFlags
Incorrect Usage.
Usage: docker-machine create [OPTIONS] [arg...]
Create a machine
Description:
Run 'docker-machine create --driver name' to include the create flags for that driver in the help text.
Options:
--azure-availability-set "docker-machine"								Azure Availability Set to place the virtual machine into [$AZURE_AVAILABILITY_SET]
--azure-docker-port "2376"										Port number for Docker engine [$AZURE_DOCKER_PORT]
--azure-environment "AzurePublicCloud"								Azure environment (e.g. AzurePublicCloud, AzureChinaCloud) [$AZURE_ENVIRONMENT]
--azure-image "canonical:UbuntuServer:15.10:latest"							Azure virtual machine OS image [$AZURE_IMAGE]
--azure-location "westus"										Azure region to create the virtual machine [$AZURE_LOCATION]
--azure-no-public-ip											Do not create a public IP address for the machine
--azure-open-port [--azure-open-port option --azure-open-port option]				Make the specified port number accessible from the Internet
--azure-private-ip-address 										Specify a static private IP address for the machine
--azure-resource-group "docker-machine"								Azure Resource Group name (will be created if missing) [$AZURE_RESOURCE_GROUP]
--azure-size "Standard_A2"										Size for Azure Virtual Machine [$AZURE_SIZE]
--azure-ssh-user "docker-user"									Username for SSH login [$AZURE_SSH_USER]
--azure-static-public-ip										Assign a static public IP address to the machine
--azure-subnet "docker-machine"									Azure Subnet Name to be used within the Virtual Network [$AZURE_SUBNET]
--azure-subnet-prefix "<IP_ADDRESS>/16"								Private CIDR block to be used for the new subnet, should comply RFC 1918 [$AZURE_SUBNET_PREFIX]
--azure-subscription-id 										Azure Subscription ID [$AZURE_SUBSCRIPTION_ID]
--azure-use-private-ip										Use private IP address of the machine to connect
--azure-vnet "docker-machine-vnet"									Azure Virtual Network name to connect the virtual machine [$AZURE_VNET]
--driver, -d "none"											Driver to create machine with. [$MACHINE_DRIVER]
--engine-env [--engine-env option --engine-env option]						Specify environment variables to set in the engine
--engine-insecure-registry [--engine-insecure-registry option --engine-insecure-registry option]	Specify insecure registries to allow with the created engine
--engine-install-url "https://get.docker.com"							Custom URL to use for engine installation [$MACHINE_DOCKER_INSTALL_URL]
--engine-label [--engine-label option --engine-label option]						Specify labels for the created engine
--engine-opt [--engine-opt option --engine-opt option]						Specify arbitrary flags to include with the created engine in the form flag=value
--engine-registry-mirror [--engine-registry-mirror option --engine-registry-mirror option]		Specify registry mirrors to use [$ENGINE_REGISTRY_MIRROR]
--engine-storage-driver 										Specify a storage driver to use with the engine
--swarm												Configure Machine to join a Swarm cluster
--swarm-addr 											addr to advertise for Swarm (default: detect and use the machine IP)
--swarm-discovery 											Discovery service to use with Swarm
--swarm-experimental											Enable Swarm experimental features
--swarm-host "tcp://<IP_ADDRESS>:3376"									ip/socket to listen on for Swarm master
--swarm-image "swarm:latest"										Specify Docker image to use for Swarm [$MACHINE_SWARM_IMAGE]
--swarm-join-opt [--swarm-join-opt option --swarm-join-opt option]					Define arbitrary flags for Swarm join
--swarm-master											Configure Machine to be a Swarm master
--swarm-opt [--swarm-opt option --swarm-opt option]							Define arbitrary flags for Swarm master
--swarm-strategy "spread"										Define a default scheduling strategy for Swarm
--tls-san [--tls-san option --tls-san option]							Support extra SANs for TLS certs
flag provided but not defined: -azure-static-public-ips
</details>

@nathanleclaire PTAL

@D3-LucaPiombino I get a full --help output after Incorrect usage string. Are you missing this part? (0.8.0-rc2)

What's the issue/regression here?
It says at the bottom "flag provided but not defined: -azure-static-public-ips`.  I know it's not the prettiest ever but it gets the job done.
With 0.8.0:
$ docker-machine create -d azure --azure-static-public-ips
Incorrect Usage.

Usage: docker-machine create [OPTIONS] [arg...]

Create a machine

Description:
   Run '/usr/local/bin/docker-machine create --driver name' to include the create flags for that driver in the help text.

Options:

   --azure-availability-set "docker-machine"								Azure Availability Set to place the virtual machine into [$AZURE_AVAILABILITY_SET]
   --azure-docker-port "2376"										Port number for Docker engine [$AZURE_DOCKER_PORT]
   --azure-environment "AzurePublicCloud"								Azure environment (e.g. AzurePublicCloud, AzureChinaCloud) [$AZURE_ENVIRONMENT]
   --azure-image "canonical:UbuntuServer:15.10:latest"							Azure virtual machine OS image [$AZURE_IMAGE]
   --azure-location "westus"										Azure region to create the virtual machine [$AZURE_LOCATION]
   --azure-no-public-ip											Do not create a public IP address for the machine
   --azure-open-port [--azure-open-port option --azure-open-port option]				Make the specified port number accessible from the Internet
   --azure-private-ip-address 										Specify a static private IP address for the machine
   --azure-resource-group "docker-machine"								Azure Resource Group name (will be created if missing) [$AZURE_RESOURCE_GROUP]
   --azure-size "Standard_A2"										Size for Azure Virtual Machine [$AZURE_SIZE]
   --azure-ssh-user "docker-user"									Username for SSH login [$AZURE_SSH_USER]
   --azure-static-public-ip										Assign a static public IP address to the machine
   --azure-subnet "docker-machine"									Azure Subnet Name to be used within the Virtual Network [$AZURE_SUBNET]
   --azure-subnet-prefix "<IP_ADDRESS>/16"								Private CIDR block to be used for the new subnet, should comply RFC 1918 [$AZURE_SUBNET_PREFIX]
   --azure-subscription-id 										Azure Subscription ID [$AZURE_SUBSCRIPTION_ID]
   --azure-use-private-ip										Use private IP address of the machine to connect
   --azure-vnet "docker-machine-vnet"									Azure Virtual Network name to connect the virtual machine [$AZURE_VNET]
   --driver, -d "none"											Driver to create machine with. [$MACHINE_DRIVER]
   --engine-env [--engine-env option --engine-env option]						Specify environment variables to set in the engine
   --engine-insecure-registry [--engine-insecure-registry option --engine-insecure-registry option]	Specify insecure registries to allow with the created engine
   --engine-install-url "https://get.docker.com"							Custom URL to use for engine installation [$MACHINE_DOCKER_INSTALL_URL]
   --engine-label [--engine-label option --engine-label option]						Specify labels for the created engine
   --engine-opt [--engine-opt option --engine-opt option]						Specify arbitrary flags to include with the created engine in the form flag=value
   --engine-registry-mirror [--engine-registry-mirror option --engine-registry-mirror option]		Specify registry mirrors to use [$ENGINE_REGISTRY_MIRROR]
   --engine-storage-driver 										Specify a storage driver to use with the engine
   --swarm												Configure Machine to join a Swarm cluster
   --swarm-addr 											addr to advertise for Swarm (default: detect and use the machine IP)
   --swarm-discovery 											Discovery service to use with Swarm
   --swarm-experimental											Enable Swarm experimental features
   --swarm-host "tcp://<IP_ADDRESS>:3376"									ip/socket to listen on for Swarm master
   --swarm-image "swarm:latest"										Specify Docker image to use for Swarm [$MACHINE_SWARM_IMAGE]
   --swarm-join-opt [--swarm-join-opt option --swarm-join-opt option]					Define arbitrary flags for Swarm join
   --swarm-master											Configure Machine to be a Swarm master
   --swarm-opt [--swarm-opt option --swarm-opt option]							Define arbitrary flags for Swarm master
   --swarm-strategy "spread"										Define a default scheduling strategy for Swarm
   --tls-san [--tls-san option --tls-san option]							Support extra SANs for TLS certs
flag provided but not defined: -azure-static-public-ips

I'm not sure either, I believe @D3-LucaPiombino is not getting the --help output but I can't repro.

@D3-LucaPiombino What OS are you on?

Hi guys.
First of all, sorry for the late reply, but we are swamped at work and my mailbox is like a war zone and i missed all the comments above :(.
Second... sorry again:
I can't for the life of me reproduce this again.
I am sure that i copied the terminal output verbatim in the issue above.

Full story:
We had a couple (three) virtual machines on azure created using docker-machine (v0.8.0, build b85aac1),
At some point we realized that we needed the ips to be static, so we scrapped the machines and try to recreate them passing the --azure-static-public-ip (misspelled).
It took us a while to realize that we misspelled the parameter (we had a bunch of others) because we did not have the full usage output telling us what parameter was causing the problem (with or without --debug).
After realizing what was wrong, i created the repro reported above copying the output from the terminal.
Since we were working on a SPIKE, we opened the issue, destroyed the machines again and moved on.

Now when i try to repro this i always get the full output, and indeed the parameter is there at the end.
So, i think you can close this.
I apologize again for wasting your time.
L.P.

Lets close


Frontend : Syntactically Awesome StyleSheets - SASS

Description 📜
Added documentation on Syntactically Awesome StyleSheets - SASS
Fixes #6976

Type of change 📝

[x] Documentation (Content Creation in the form of codes or tutorials)

Domain of Contribution 📊

[x] Frontend Dev HTML/CSS/JS

Checklist ✅

[x] I follow Contributing Guidelines & Code of conduct of this project.
[x] I have performed a self-review of my own code or work.
[x] I have commented my code, particularly in hard-to-understand areas.
[x] My changes generates no new warnings.
[x] I'm GWOC'21 contributor

Screenshots / Gif (Optional) 📸

@2024-SANDHYA

@2024-SANDHYA

SASS is not part of our domain. Please check the road-map.


Cannot see the NavBar in light Mode

https://www.radix-ui.com/colors
when you opened the site after you scroll only the nav bar is visible at initial load the navbar isn't visible

Seems to be working fine now, any steps to reproduce?


Enable coverage of tests

I wish there were a better way to do this kind of thing, ... I have not yet found one other than line-by-line, file-by-file. I guess it makes sense for exceptions. It's just tough when like you are doing correcting for a technical debt. Then you get lots of editing. Cool operation in this PR, Matt (@mborland)

It's a little mind numbing but should be good now. I found at lease one test that was being completely skipped by too narrow constraints. I found that a lot of the boost libraries cover the test directory, and it seems like good practice.

should be good now

Indeed very good Great stuff @mborland


NonNullable does not preserve scoped union type of enums

TypeScript Version:  3.0.0-dev.201xxxxx
I was unable to try this. This is attempted on current playground version (2.8 or 2.9, the playground does not specify)

Search Terms:  NonNullable, union
Code
declare function test<T>(condition: T): NonNullable<T>;

enum A {
  ONE,
  TWO,
}

function thing(x: A.ONE) { // or a union type of some of the enum values.
  if (x === A.TWO) {
    // x cannot be A.TWO
  }

  const y = test(x);

  if (y === A.TWO) {
    // y can be A.TWO....
  }
}

Expected behavior:
y should not be assignable to A.TWO. y should remain A.ONE type.
Actual behavior:
y becomes type A instead of incoming A.ONE type.
Playground Link:
https://www.typescriptlang.org/play/#src=declare function test<T>(condition%3A T)%3A NonNullable<T>%3B

enum A {
  ONE%2C
  TWO%2C
}

function thing(x%3A A.ONE) {
  if (x %3D%3D%3D A.TWO) {
    %2F%2F x cannot be A.TWO
  }
  const y %3D test(x)%3B

  if (y %3D%3D%3D A.TWO) {
    %2F%2F y can be A.TWO....
  }
}

Related Issues: #23884 #23046
Thanks for taking a look!

Literal types are not inferred unless there is a "marker" for the compiler e.g. constraint that suggests literal types are allowed.. so the type of y is A and not A.One.
you can get the desired behavior by defining test as:
declare function test<T extends number>(condition: T): NonNullable<T>;


Add hyper-named-css-colors theme and hyper-fading-scrollbar plugin

Hey sorry, don't know what I did when I first made this PR but I must have been very tired... somehow I just copy-pasted a plugin entry (I think I had two tabs open and submitted the wrong one or sth 🤦🏻♂).
Anyway, it's all updated now and I also added a screenshot that's more similar to the ones you already have.
https://www.npmjs.com/package/hyper-named-css-colors

Hi! Thank you so much for the submission @simonhaenisch.
Just a few requests from me:

Would you be able to make the screenshot and gif @2x density so they display nicely on retina screens etc. The Hyper Store is all about the look!
If possible could you show the plugin in the gif without the theme active. Just so users can see what's different to vanilla Hyper
Thank you 🙏

@timothyis done, please review 🤓

@timothyis is this gonna take another 2 months to be accepted?

@timothyis no idea why that deployment failed (it failed immediately)


JEP: Allow finite difference method for non-jax differentiable functions

Motivation: Make JAX relevant to many more users
JAX provides a powerful general-purpose tool for automatic differentiation, but it usually requires that users write code that is JAX-traceable end-to-end.
Significant numbers of scientific and industrial applications involve large, legacy codebases where the lift to transfer the system to end-to-end JAX is prohibitively high. In other cases, users are tied into proprietary software, or the underlying software is not written in python, and also find themselves unable to readily convert the underlying code to JAX.
Without JAX, the standard method for performing optimization involves computing derivatives using finite difference methods. While these can be integrated into JAX using custom functions, the process is cumbersome, which significantly limits the set of users able to integrate JAX into their work.
This JEP proposes a simple method for computing numerical derivatives in JAX. I expect that this change would expand the potential user base of JAX substantially, and could drive adoption of JAX across both academia and industry.
Proposal: A decorator that computes JAX derivatives using finite differences
Let's start with an example.
from jax import grad
from jax import numpy as jnp
from jax.experimental.finite_difference import jax_finite_difference
import numpy as old_np  # Not jax-traceable

@jax_finite_difference
def rosenbach2(x, y):
    """Compute the Rosenbach function for two variables."""
    return old_np.pow(1-x, 2) + 100*old_np.pow(y-old_np.pow(x, 2), 2)

def rosenbach3(x, y, z):
    """Compute the Rosenbach function for three variables."""
    return rosenbach2(x, y) + rosenbach2(y, z)

value, grad = jax.value_and_grad(rosenbach3)(1., 2., 3.)

By wrapping the function rosenbach2 in jax_finite_difference, it will become completely compatible with JAX's automatic differentiation tooling, and works with other JAX primitives such as vmap.
Additional options will be available for power users who may want to specify the step size, or forward vs center vs backward mode.
This is feasible.
I have working, tested code that does the above for any function that accepts and returns JAX Arrays. If there is interest in this JEP, I will happily make a PR.
Limits of this JEP
This proposal will not support XLA out of the box
The initial proposal does not aim to support XLA for finite differences. While it should be possible to overcome this limitation using a JAX Foreign Function Interface (FFI) [Issue #12632, PR], it would be best to wait until the FFI is finalized before implementing XLA for finite differences.
The downsides of float32 increase with finite differences
Using single-precision (32-bit) floating point numbers in finite differences may lead to unacceptably large errors in many cases. While this is not a foregone conclusion—many functions can be differentiated just fine with 32-bit floating point—we probably want to plan for mitigation strategies, e.g.,

Warning the users if they are using less than double-precision; or
Making it easy to automatically convert to double-precision for the finite difference.

The second strategy would likely be more important when using FFI in conjunction with XLA in later work. At this stage a warning may be all that's needed.
Related JEPs
The proposed Foreign Function Interface [Issue #12632, PR] will provide a method that allows JAX code to call out to external code code in the course of derivative computation. However, it does not create a method for computing derivatives—those must still be defined by the user.
However, we expect that the FFI combined with our finite-difference method would enable "the dream": nearly-arbitrary user code fully-integrated with JAX using a single decorator.

Thanks for the proposal! We've discussed something along these lines amongst ourselves at various points. It's a good idea!
Do you have an idea for the API you'd propose? When this has come up before, our thought was to make it a convenience wrapper around jax.custom_jvp. That suggests an implementation using custom_jvp as well.

I actually implemented it using full-on custom primitives following this guide.
Since it seems like there's interest, I'll make the PR.

@mbmccoy any reason not to use a custom_jvp or custom_vjp? Those are a lot simpler than a custom primitive, and I think it'd be the preferred approach unless I'm missing something.

In particular custom_jvp would support both forward- and reverse-mode AD.

Hello,
for the context of API design, I have a small WIP library for finite difference, I implemented a finite difference version of jax.grad with couple of options
colab

import jax
from jax import numpy as jnp
import numpy as old_np  # Not jax-traceable
import finitediffx as fdx
import functools as ft
from jax.experimental import enable_x64

with enable_x64():

    @fdx.fgrad
    @fdx.fgrad
    def np_rosenbach2(x, y):
        """Compute the Rosenbach function for two variables."""
        return old_np.power(1-x, 2) + 100*old_np.power(y-old_np.power(x, 2), 2)

    @ft.partial(fdx.fgrad, derivative=2)
    def np2_rosenbach2(x, y):
        """Compute the Rosenbach function for two variables."""
        return old_np.power(1-x, 2) + 100*old_np.power(y-old_np.power(x, 2), 2)

    @jax.grad
    @jax.grad
    def jnp_rosenbach2(x, y):
        """Compute the Rosenbach function for two variables."""
        return jnp.power(1-x, 2) + 100*jnp.power(y-jnp.power(x, 2), 2)

    print(np_rosenbach2(1.,2.))
    print(np_rosenbach2(1.,2.))
    print(jnp_rosenbach2(1., 2.))

402.0000951997936
402.0000951997936
402.0

As far as I understand we can also use fdx.grad with custom_jvp and pure_callback  to make it work with jax

import functools as ft

import jax
import jax.numpy as jnp
import numpy as onp

import finitediffx as fdx

def wrap_pure_callback(func):
    @ft.wraps(func)
    def wrapper(*args, **kwargs):
        args = [jnp.asarray(arg) for arg in args]
        func_ = lambda *args, **kwargs: func(*args, **kwargs).astype(args[0].dtype)
        result_shape_dtype = jax.ShapeDtypeStruct(
            shape=jnp.broadcast_shapes(*[arg.shape for arg in args]),
            dtype=args[0].dtype,
        )
        return jax.pure_callback(
            func_, result_shape_dtype, *args, **kwargs, vectorized=True
        )

    return wrapper

def define_finitdiff_jvp(func):
    func = jax.custom_jvp(func)

    @func.defjvp
    def func_jvp(primals, tangents):
        primal_out = func(*primals)
        tangent_out = sum(
            fdx.fgrad(func, argnums=i)(*primals) * dot for i, dot in enumerate(tangents)
        )
        return jnp.array(primal_out), jnp.array(tangent_out)

    return func

@jax.jit
@define_finitdiff_jvp
@wrap_pure_callback
def np_rosenbach2(x, y):
    """Compute the Rosenbach function for two variables."""
    return onp.power(1 - x, 2) + 100 * onp.power(y - onp.power(x, 2), 2)

@jax.jit
def jnp_rosenbach2(x, y):
    """Compute the Rosenbach function for two variables."""
    return jnp.power(1 - x, 2) + 100 * jnp.power(y - jnp.power(x, 2), 2)

print(jax.value_and_grad(np_rosenbach2, argnums=0)(1.0, 2.0))
print(jax.value_and_grad(jnp_rosenbach2, argnums=0)(1.0, 2.0))

print(jax.value_and_grad(np_rosenbach2, argnums=1)(1.0, 2.0))
print(jax.value_and_grad(jnp_rosenbach2, argnums=1)(1.0, 2.0))

print(jax.vmap(jax.grad(np_rosenbach2), in_axes=(0, None))(jnp.array([1.0, 2.0, 3.0, 0.2]), 2.0))
print(jax.vmap(jax.grad(jnp_rosenbach2), in_axes=(0, None))(jnp.array([1.0, 2.0, 3.0, 0.2]), 2.0))

(Array(100., dtype=float32), Array(-399.9948, dtype=float32, weak_type=True))
(Array(100., dtype=float32, weak_type=True), Array(-400., dtype=float32, weak_type=True))
(Array(100., dtype=float32), Array(199.97772, dtype=float32, weak_type=True))
(Array(100., dtype=float32, weak_type=True), Array(200., dtype=float32, weak_type=True))
[-399.9948  1601.8411  8403.304   -158.45016]
[-400.      1602.      8404.      -158.40001]

As far as I understand

So understated! Seems like you've written a package that does most of the work here.
Given this, is an implementation of finite-differences in the core JAX package (e.g., under jax.experimental) desired? I'm inclined to think tha this would be a very valuable addition to the JAX ecosystem, either here or some sister project, because of how useful I'm finding the tool when using third party scientific libraries.
FYI, I'm happy to collaborate on a PR @ASEM000 if that's of interest. I'll try to get something up in the next day or so for more comment---I've had some busy days in the last week.
@mattjj I'll look into using custom_vjp and custom_jvp—I recall having a reason I didn't use those to start with, but it's possible that I just missed something.

To be concrete about the API @froystig, here are some guiding principles that I have in mind:

A reasonable name. Personally, I think a decorator named jaxify is appropriate because it gets at "what it means for most users", that is, make their existing code work with JAX. Other names like jax_finite_difference are also OK.
One-line decorator that "just works" for 80% of cases, and provides sensible error messages for the most common issues (e.g., not abiding by the API).
More powerful options for ~15-19% of the remaining cases. For example:

Step size control
Mode choice (e.g., central, forward, and backward modes)
Allowing different steps sizes or modes per argument.

Reasonably efficient, so that, e.g., forward mode uses significantly fewer function evaluations than central mode.
Consistent with the existing API. I like the idea that it has the same requirements as pure_callback (as @ASEM000 helpfully suggested).
It might be nice to warn users when the use of this decorator has kept them from having full hardware acceleration, though that may be best left as a feature for pure_callback. (Not sure if this is easy or hard.)
Well-documented, e.g., a notebook with documentation for use.

API Examples
The "80%" use case
Most use cases should start with a simple decorator:
import jax
from jax.experimental.jaxify import jaxify
from jax.experimental import enable_x64

@jaxify
def my_func(array1, array2):
   return some_complex_math(array1, array2)

print(jax.value_and_grad(my_func)(x, y))  # Warn about not using 64-bit math

with enable_x64():
    jax.value_and_grad(my_func)(x, y)  # No warning

Power use cases

# The user wants control over the step size
@jaxify(step_size=1e-9, mode="forward")
def my_func(array1, array2):
   return some_complex_math(array1, array2)

# The user wants per-argument control over the step size
@jaxify(step_size=(1e-9, 1e-3), mode=("forward", "center"))
def my_func(array1, array2):
   return some_complex_math(array1, array2)

Also worth mentioning jaxdf by @astanziola; maybe have some opinions?

@mbmccoy – Why bundle together (a) setting up a derivative rule based on FD with (b) setting up a pure_callback call?

There are two reasons I can think of to support FD for the same class of functions that pure_callback supports: equivalence and consistency.
Equivalence: The class of functions theoretically supportable by a generic FD technique are precisely those that are theoretically supportable by a pure_callback mechansim (that is, pure functions that accept and return numpy arrays).
Think about it: almost by definition, the functions we'd want to finite-difference are not supported directly within JAX's JIT, so computing their values during a generic finite-difference routine requires the use of some mechanism like pure_callback if we want them to interact well with JIT. If we miraculously write an FD routine supports more functions than pure_callback, we could backport them to pure_callback using, for example, the value part of jax.value_and_grad.
Conversely, it's pretty easy to see that—at least in principle—we can write a wrapper that will apply finite differences to pure functions that accept and return numpy arrays. That's, of course, the challenge I've set out for myself here.
Consistency: Given the close link between the sets of functions supportable by pure_callback and those supportable by a generic finite difference routine, we should probably just insist that they are the same and test for it. This will allow us to leverage pure_callback and keep the overall API complexity roughly constant.

I'd also be very interested in helping with this. I've done a similar thing using pure_callback and custom_jvp but I haven't been able to get it to support both forward and reverse mode.
If I define a custom_jvp for the pure_callback, forward mode stuff like jacfwd works fine. However, if I try to use jacrev I usually get an error
JaxStackTraceBeforeTransformation: ValueError: Pure callbacks do not support transpose. Please use `jax.custom_vjp` to use callbacks while taking gradients.
Using custom_vjp allows reverse mode to work, but since a function can't have both custom_jvp and custom_vjp defined (#3996), we're limited to one or the other.

@mbmccoy  I added a new functionality, define_fdjvp here, which satisfies most of the specs you defined. One note, forward, central and backward are replaced by offsets, so for $\sum A_i*f(x+a_i)/stepsize$, you only provide offsets=jnp.array([ai, ... ]) and $A_i$  will be calculated based on the other configs.


dart2js: fix how we treat private names in nsm forwarders

We have a bug that private names from different libraries are conflicting with each other. Because nsm forwarders may include library-private names, we added a workaround in 64553b68e96f04c6514be68bd417795757b2a091  to ignore those private names in other libraries.
The workaround is incorrect, as it wouldn't correctly handle this example:
a.dart:
import 'b.dart';

class A implements I {
  int _m() => 1;
  noSuchMethod(Invocation m) => 2;
}

class B implements I {
  noSuchMethod(Invocation m) => 3;
}

main() {
  print((new A()._m)()); // should print "1"
  foo(new B()); // should print "3"
}

b.dart:
abstract class I {
  int _m();
}

void foo(I i) {
  print("${(i._m)()}");
}

If we incorrectly ignore the forwarder, the call to foo(new B()) will cause a runtime error
Before our workaround, we used to print "3" twice. After the workaround, we print "1", and then have a runtime error on foo(new B()),  because the tearoff hits nSM and returns "3", which can't invoked.
Once we correctly handle private names in nsm-forwarder, the tearoff will be created correctly, and the call to foo should print "3".
More details can be found in the discussion here: https://github.com/dart-lang/sdk/issues/33665

Bump this post 2.1?


User Guide: Document using HDFS and S3

Is your feature request related to a problem or challenge? Please describe what you are trying to do.
Once https://github.com/apache/arrow-ballista/pull/290 and https://github.com/apache/arrow-ballista/pull/274 are merged, add a section on HDFS and S3.
Describe the solution you'd like
Describe alternatives you've considered
Additional context

Probably we need to also document using GCS and Azure, once #308 is merged.

@andygrove do you know if there is documentation anywhere on how to declare an object store (s3 or HDFS) in Ballista?

Is loading the data from S3 possible with a distributed setup right now? If so, can you provide a small example?


Pull Requests Required to Be Up to Date

Further to comments in #5086 it seems that GitHub is requiring that the branch be up to date which I think is configurable (see this and this. Is this desirable? Doesn't it put a hindrance on the pull request process i.e. requiring a rebase anytime a pull request is needed to be merged?

Also GitHub have now introduced the ability to squash merges  which might be helpful.

Thanks for creating this ticket @nicholas-l. I have disabled the requirement for a pull request branch to be up-to-date with master for now. We can revisit this any time if others think we should be less lenient.
Squash merges are also enabled for our repository. Should make life easier for first-time contributors and result in a cleaner history.

Thanks :+1:

for those PRs that are around for a while before being merged (because of discussions, or dependency on other pending changes, or whatever), it might be a good idea to at least rerun Travis. For example, new tests might have been added that an old PR would fail, but might not cause a merge conflict. Contributors can do this by rebasing or simply closing and reopening the PR.

I am also very happy with how it is right now! Thanks to everyone 👏


Fix the test resources

In Gradle plugin we're adding test resources if someone's using the intellij plugin. I guess we should be always be adding the generated tests to test resources regardless of the presence of the plugin.

@marcingrzejszczak would you consider changing this so that we add the test resources regardless of detecting IntelliJ? The current implementation looks for the presence of a .idea/ folder. I have a Gradle multi-project setup and my producer app is in a subdirectory, causing the generated tests not to be added to test resources, unless I manually add a .idea/ folder to the subdirectory. This makes setting up the project on multiple machines a little clumsy.

Hi! Afair we always add it. The idea thing is only to force intellij to see that.

Oh I get it. Maybe there's a better way to determine if IntelliJ is present since checking for .idea/ in the project directory doesn't always cover it. I'll see if I can come up with something.

Yeah definitely you're right. It needs to be fixed. I'll reopen the issue

I think that it's enough to check the root project if it has the .idea folder. WDYT?

I've fixed it in latest 1.1.2.BS - you can check out if it's working fine for you


[WIP] Update to Bootstrap4

Update to Bootstrap 4.2.

Include js/css files
remove Responsive
align left + right sidebar
correct text sizes
style search fields
style input fields
popover: allow html
use bootstrap4 dropdown
settings: fix double Modal window
settings: use bootstrap4 Tabs (in Your bots)
setttings: ^ make tab content look better  (css)
settings, your account: double Modal windows should grey-out background
settings: add this to all Label fields:  class="mr-sm-2"
right-column: User popup not showing content (add html: true and fix template: templates.render)
modal: Keyboard shortcuts: scrollbar missing (Replace with Bootstrap Modal ?)
alert: Whole page should move 40px  when there is a Alert message.
dropdown (top right): fix some styling: color, align icons, ...
remove class="small" from some buttons
composebox: correct styling of popover when mentioning a user

reason:  disinterest from the community.

@Alex-CodeLab I should note that the community is very much interested in this project, which is why I've put time into things like splitting out the bootstrap typeahead (which we've patched) into a separate module.
As I have mentioned in #checkins, I am the person who'd need to review this and have been heads down on getting the Zulip 2.0 release out and thus not spending time reviewing larger migrations for the last couple weeks.  I would love to collaborate with you on completing this upgrade.


Source Control ask for respository when Commiting/Pushing on a single highlighted repository

VS Code Version: 1.56.0 (Issue have existed at least 2 major versions)
OS Version: Windows 10

Steps to Reproduce:

Select a single repository in Source Control Repositories
Stage a change
2a. Click Commit icon in Source Control. (not Repositories)
or
2b. Click ... in Source Control (not Repositories) choose Push.

Does this issue occur when all extensions are disabled?: Yes
Longer description:
I have Workspace with 13 Git repositories.
To make the lower Source Control look a bit cleaner I select a single repository in Source Control Repositories.
When I click to Commit my staged changes in the lower Source Control (the v-icon) a list of repositories is displayed and I have to choose a repository to execute my commit.
The same happens when I push my commits using Push found in the (...) menu in the lower Source Control.
If I do the same commands in Source Control Repositories for the correct repository it execute without asking me for a repository.
I can get the lower Source Control to work as I like if a highlight more than one repository in Source Control Repositories.

This seems to work with VSCode version released at the date of this comment.


Navigate to nearest path line

Similar to https://github.com/kylecorry31/Trail-Sense/issues/1178, except the destination does not have to be a recorded point - it can be an intersection on a line between two path points.

[ ] Navigate to nearest part of path (intercept)
[ ] Let user choose to navigate to recorded point or closest line (maybe a checkbox 'recorded points only') - experimentation is needed around what works best
[ ] Occasionally update the destination as user moves (while on a navigation screen: Navigation, Path Overview, Maps)

An algorithm for this might be projecting onto the line and taking the projection with the shortest distance: https://github.com/osmandapp/OsmAnd/blob/ea810df7d656899c759d9fc1eeedf0929ec12ee0/OsmAnd-java/src/main/java/net/osmand/util/MapUtils.java#L128


[Snyk] Security upgrade alpine from 3.15 to 3.16

This PR was automatically created by Snyk using the credentials of a real user.Keeping your Docker base image up-to-date means you’ll benefit from security fixes in the latest version of your chosen image.
Changes included in this PR

cmd/katib-controller/v1beta1/Dockerfile

We recommend upgrading to alpine:3.16, as this image has only 1 known vulnerabilities. To do this, merge this pull request, then verify your application still works as expected.
Some of the most important vulnerabilities in your base image include:

Severity
Priority Score / 1000
Issue
Exploit Maturity

221
CVE-2023-0464 SNYK-ALPINE315-OPENSSL-3368753
No Known Exploit

221
CVE-2023-0464 SNYK-ALPINE315-OPENSSL-3368753
No Known Exploit

Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open fix PRs.
For more information:
🧐 View latest project report
🛠 Adjust project settings

Learn how to fix vulnerabilities with free interactive lessons:
🦉 Learn about vulnerability in an interactive lesson of Snyk Learn.

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+0.09%) to 72.951%

Totals

Change from base Build<PHONE_NUMBER>:
0.09%

Covered Lines:
3115

Relevant Lines:
4270

💛  - Coveralls


[Minor] Enhancements to Paillier class.

JavaDoc updates to public API constructors and methods.
Class now marked 'final'.
Minor tidy-up in generateKeys() for clarity.
Constructors throw IllegalArgumentException rather than PIRException.
No need to implement Cloneable.

+1


Make serverjs a module

Addresses issue #117

I assigned this pull request to you Riley, just so we that we get an extra pair of eyes on this. The server is now exported as a module. In app.js, we call makeServer from server.js and pass it an options object. The schemas are read and resolvers loaded and passed as part of this options object, rather being passed to the server as file references. This means that for the tests, we'll now be able to pass inline definitions of both GraphQL API schemas and resolver functions, which should really make things a lot easier.
The server is run using either node app.js or npm start (recommended), so we'll need to update the dockerfile entrypoint once we decide to merge this.
To be able to run client-tests.js with the most recent SPIRIT schemas you'll first need to run npm install in the test directory (either in the generated server or directly in graphql-server), comment out the union references used in the jobs schema file, and finally disable directives testing.
@rcapshaw @hartig

@rcapshaw, I've made a bunch of updates to the API tests and fixed some bugs. Could you have another look before the merge?

That's been a long time coming. Thanks for your effort!


Feature: Support for Workflow GET api for specific environment using workflowId and environmentId

🔖 Feature description
This feature will enhance the capability to clone workflow for specific environment. So in query parameters there should be an option to pass environment Id along with workflow Id and app Id.
🎤 Pitch
In my use-case i need to clone ci and cd both for a specific environment. Until now we could clone the the complete workflow. If source workflow had multiple cd pipelines then we could not select a specific env. So this feature is extended to get specific cd in order to clone workflow for specific environment.
✌ Solution
In existing workflow get api, we can fetch the workflow details by providing the workflow name. This fails when multiple workflows are having the same name. So there should a capability to fetch workflows via workflow Id as well. Apart from this capability to give env Id should be there in order to fetch the specific cd details.
🔄 Alternative
NA
👀 Have you spent some time to check if this issue has been raised before?

[X] I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

[X] I have read the Code of Conduct

AB#4391

@vikramdevtron There is a bug that we do not get ci pipeline overrides while trying to fetch workflow. For example docker registry might be overridden at ci pipeline level, but while trying to GET workflow we do not get the CI pipeline overrides.


Update reveal-focus.md

Capitalized the proper noun Reveal Focus.

@mijacobs   : PR passed acceptance checklist. Please evaluate further, and note the following:

Capitalization of "highlight", "reveal", and "focus": Style info not found for these terms. Capitalize or not?


Provide possibility to reuse Builder and Reader

As discussed in #25

I think this is one of the biggest wins for repeated building&reading - e.g. the builder has a bunch of properties that are objects and needs to be set up / allocated regardless of whether cache is in use - e.g.
    public var cache : [ObjectIdentifier : Offset] = [:]
    public var inProgress : Set<ObjectIdentifier> = []
    public var deferedBindings : [(object:Any, cursor:Int)] = []

Would be nice to add something like
    public static func fromReader(r : FlatBufferReader) -> FooBarContainer {
        let reader = r
        let objectOffset = reader.rootObjectOffset
        return create(reader, objectOffset : objectOffset)!
    }

and

    public func toByteArray (b :FlatBufferBuilder) -> [UInt8] {
        let builder = b
        let offset = addToByteArray(builder)
        performLateBindings(builder)
        return try! builder.finish(offset, fileIdentifier: nil)
    }

and corresponding reader&builder 'reset' methods.

A lazy instance would probably want to keep its reader-per-instance though (can't think of something decent there right now otherwise).

So just to keep track after #37 was merged to handle the builder path, codegen needs to be tweaked to:
public extension FooBarContainer {
    public func toByteArray (config : BinaryBuildConfig = BinaryBuildConfig()) -> [UInt8] {
-->        let builder = FlatBufferBuilder.create(config)
        let offset = addToByteArray(builder)
        performLateBindings(builder)
-->        let result = try! builder.finish(offset, fileIdentifier: nil)
-->        FlatBufferBuilder.reuse(builder)
-->        return result
    }
}

Addressed second half in #40 0 I think we can close this one after that one is integrated.


2.0/206 remove graph library

ℹWork for itssue #206

Removed Graph library, since there are no more usages of DirectedGraph
Removed unused usings

Changes look good, build is failing though


socket() always fails on WSL1 due to unsupported SOCK_CLOEXEC flag

I don't think it it s a very good design to silently add a flag that the caller even didn't passed, then miserably fails because of that.
If this library has to set SOCK_CLOEXEC flag, why don't you try socket(2) call again without it when it failed?

I don't think it it s a very good design to silently add a flag that the caller even didn't passed, then miserably fails because of that.

All file descriptor types in the standard library set the SOCK_CLOEXEC flag, it's expected of types outside of it as well.

If this library has to set SOCK_CLOEXEC flag, why don't you try socket(2) call again without it when it failed?

No, socket2 is a small wrapper around system calls, the caller is responsible for handling errors.
Also what is WSL1? I'm not even sure we support that platform. It would be nice if you explain what abbreviations are before using them.
Finally, have you tried Socket::new_raw? It's very clear from the Socket::new documentation what flags are set and it recommends Socket::new_raw in cases where those flags don't make sense.

the caller is responsible for handling errors.

Are you kidding? Because socket2 always forcibly adds SOCK_CLOSEXEC on Linux, the calling app has no way to retry without it.

Also what is WSL1?

https://learn.microsoft.com/en-us/windows/wsl/about

Are you kidding? Because socket2 always forcibly adds SOCK_CLOSEXEC on Linux, the calling app has no way to retry without it.

Did you read my comment? Socket::new_raw.

Also what is WSL1?

https://learn.microsoft.com/en-us/windows/wsl/about

We support Windows, why not use that? If WSL1 doesn't support SOCK_CLOSEXEC, something quite crucial to Unix, it's not Linux.

Setting CLOEXEC on file descriptors is standard for pretty much every single feature that opens a file descriptor.
The socket manpage does not even list a compatibility note when SOCK_CLOEXEC was introduced, so it must have been there for a very long time.
If WSL1 does not support it then that is on WSL. It's spotty syscall-compatibility is a known issue and the reason why microsoft abandoned this approach and built WSL2 instead.
You could perhaps file a bug on the WSL issue tracker.
Are you even sure that it's because of that socket option? That seems to be fairly surprising to me because we also use it in the standard library.

Did you read my comment? Socket::new_raw.

Oh, I missed that part. Sorry.

Are you even sure that it's because of that socket option?

I found socket(2) was failing with -1 by exactly running via strace at my office.
A call to socket() shouldn't usually fail, and only suspicious thing I found was a SOCK_CLOEXEC flag.
However, now at home, I cannot reproduce it now by a simple C program (on a different PC).
I should look into this more, but anyway I'm closing this for now.
Sorry to have disturbed you.


Request: Ability to support space between pages like UIPageView

I can't see any reference to a property supporting space between the page views within MXSegmentedPager and associated classes - apologies if I have missed it.
It would be nice to be able to support a 'gutter' between the page views like the UIPageView's UIPageViewControllerOptionInterPageSpacingKey option.

Yes you are right. I will check that. Thanks!


Question about testing ATSP

Thank you for the insightful work! I have questions when running the ATSP solver, i.e., the GLOP-empowered MatNet to evaluate more ATSP instances:
1. There seems mismatch between the output tour and cost of your random insertion algorithm. I replace the result with manually calculated cost from the tour (to my conventional understanding) and find them different (specifically the following printed cost1 and cost2 are different. Based on eval_atsp/test_glop.py), though the improved amount remain almost stable.
def calc_len(tour, dist):
    cost = 0
    tour = tour.tolist()
    tour.append(tour[0])
    assert sorted(tour[:-1]) == [i for i in range(len(dist))], tour
    for i in range(len(tour) - 1):
        cost += dist[tour[i], tour[i + 1]]
    return cost

def main(n):
    ...
    for inst in dataset:
        tour, cost = random_insertion_non_euclidean(inst, order)
        print(f'cost1: {cost}')

        cost = calc_len(tour, inst).item()
        print(f'cost2: {cost.item()}')

        original_costs.append(cost)
        improved_cost = revision(torch.tensor(tour.astype(np.int64)), inst, tester)
        revised_cost = cost - improved_cost
        revised_costs.append(revised_cost)
    ...

Here are the outputs on ATSP150 using the two different original costs, with all other setting and data identical to your instructions.
Using cost1 (which matches the reported results in Table 4 of your paper)
initial costs:  2.2909360318757233
revised costs:  1.8663635640717682
improvement:  0.4245724678039551

Using cost2
initial costs:  4.3610200643539425
revised costs:  3.966040094693502
improvement:  0.3949799696604406

I checked your Cpp code of RI algorithm and find it somewhat complicated with the part of calculating total distance, thus wondering if there's any important design that I miss in either your implementation or the paper that may cause the above discrepancy.
2. Could you please further explain the modelling scheme you implemented for equivalent ATSP of each ASHPP (Line 134-139 in  eval_atsp/test_glop.py)? Because I find the result changes as I adjust L. So, should I change the value of L for my customized evaluation on different problem sizes/distributions? And how can I get a complete revised tour upon the MatNet-solved sub-results, for better clarity and reliability of evaluation?
L = 1.5
for sub_inst in sub_insts: # equivalent ATSP of each ASHPP
    sub_inst[:, 0] += L
    sub_inst[:, -1] += L
    sub_inst[0, :] += L
    sub_inst[-1, :] += L
    sub_inst[0, 0] = sub_inst[0, -1] = sub_inst[-1, 0] = sub_inst[-1, -1] = 0

Thanks again! Looking forward to your reply.

Hi, @wzever! Thank you for your interest in our paper.
In terms of Q1, unfortunately it turned out to be a bug in my code for random insertion. (Sorry for the messy code. 😣) We are still evaluating its impact on the results reported in our paper. As for now, I'm sure that only the ATSP results (Table 4) can be affected by the bug.
I have just published a bugfix in the insertion-bugfix branch. You may recomplie the *.so file and try testing with the fixed version of our code. (I don't have the environment for compiling and testing yet, but I'll do it ASAP.) It won't be difficult to see what happened from the comparison here. I can also explain it later if you need.

Regarding the modeling scheme for the equivalent ATSP of each ASHPP.
We define the ATSP as follows:

The first node is the starting node of SHPP, and the last node is the terminating node of SHPP.
The starting and terminating nodes are (1) placed very far from the rest of the nodes and (2) placed very close to each other. This ensures that in any reasonable solution to the equivalent ATSP, the starting and terminating nodes are connected.
The optimal solution to the ATSP defined above is also the optimal solution to the original ASHPP.

You can also refer to how POPMUSIC utilizes the above modeling scheme to solve its subproblems [1].
In this case, L shouldn't influence the results as long as (1) L is large enough and (2) the neural model well generalizes.
[1] POPMUSIC for the travelling salesman problem

We are fixing the bug, and we anticipate better performance after that.

Thanks for your prompt response and helpful explanation. Anticipating your updates!

We have fixed the bug and now the function returns the complete revised tour. Thank you @wzever !


tinymist: 0.12.8 -> 0.12.10

Things done
Changelog: https://github.com/Myriad-Dreamin/tinymist/blob/v0.12.10/CHANGELOG.md
cc @LamprosPitsillos

Built on platform(s)

[ ] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[ ] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

nixpkgs-review result
Generated using nixpkgs-review.
Command: nixpkgs-review pr 362756

x86_64-linux

:white_check_mark: 3 packages built:

tinymist
vimPlugins.typst-preview-nvim
vscode-extensions.myriad-dreamin.tinymist

aarch64-linux

:white_check_mark: 3 packages built:

tinymist
vimPlugins.typst-preview-nvim
vscode-extensions.myriad-dreamin.tinymist

x86_64-darwin

:white_check_mark: 3 packages built:

tinymist
vimPlugins.typst-preview-nvim
vscode-extensions.myriad-dreamin.tinymist

aarch64-darwin

:white_check_mark: 3 packages built:

tinymist
vimPlugins.typst-preview-nvim
vscode-extensions.myriad-dreamin.tinymist


Add Makefile for dev purporse

This fixes #55. I couldn't find a nice solution that downloads the data with pip install -e . without too much hassle. So I figured, as I said yesterday that I would just add a Makefile and explain it in the README/docu.
I also added Makefile instructions for building docs and linting.
@Karinon

@Karinon ?

I haven't forgotten you. I am quite busy at the moment and will come to this later


Add new states to the database

Add the new states, as designed here , to the database.
Update either deploy_done or equivalent if #8189  is done.
We expect to write both new and old state, to the resource persistent state table.
This may affect the whole chain, from BaseResource.deploy up into the DB.

Hey team! Please add your planning poker estimate with Zenhub @arnaudsjs @hlloreda @Hugo-Inmanta @jptrindade


Submission stucked

Our submissions on competition 218 are blocked in 'submitted' or 'submitting' mode since approximately 24hours. Do you have any idea why?
Thank you very much!

@magrichard Hi Magali, does this problem repeat? If so, is it reproducible?

@magrichard Hi Magali, does this problem repeat? If so, is it reproducible?


More documentation, please

Thanks for the good presentation on the Scale 16x. Unfortunately it’s not enough  clear for me how to use this tool from the “client” side. What do I need to do to see that someone has changed a file inside of my instance, for example? Let’s consider that all IAM policies were configured and the Lambda is installed. What I need to install to an instance and how to configure it? Any useful examples are available or is there something production ready?

And can I do something more than just monitor file changes in instances?

Will work on some documentation for the advanced uses mentioned in the talk.

@KIVagant You have a link for the talk you mentioned?

@JohnVonNeumann it's within this video, the comment list the session times.  https://www.youtube.com/watch?v=ddeV3pESy3Y


SOLR-16840: Workaround HK2 DI bug

https://issues.apache.org/jira/browse/SOLR-16840
Description
Prior to this commit many v2 invocations would succeed but log scary looking stacktraces to Solr's console log.  This was because of a bug in how Jersey creates and cleans up "RequestScoped" objects.  (See Jersey#3503 for more details.)
Solution
This commit works around the bug by changing how several "factory" classes obtain a "ContainerRequestContext": switching away from DI and towards looking up the CRC more explicitly using a "ServiceLocator".
Tests
Manual testing to verify that the warning stacktraces no longer appear in Solr's console logging.  Automated tests continue to pass.
Checklist
Please review the following and check all that apply:

[x] I have reviewed the guidelines for How to Contribute and my code conforms to the standards described there to the best of my ability.
[x] I have created a Jira issue and added the issue ID to my pull request title.
[x] I have given Solr maintainers access to contribute to my PR branch. (optional but recommended)
[x] I have developed this patch against the main branch.
[x] I have run ./gradlew check.

So the Github Issue that Jason linked has been open for 6 years, and not closed. So definitely not an upgrade issue.
Yeah we can probably link the Issue url in a comment somewhere, so this is documented in the code. Good idea

are we behind on our version of Glassfish and HK2?

No, we're not behind on hk2 - it's just a long standing bug I guess.  I've added a comment as you guy suggested to we can use more conventional injection when the bug does eventually get fixed.


Fix style flash

Description
This PR fixes the style flash on initial load for fonts and Material UI.
Fixing the font flash also improves font loading by:

Self-hosting the Barlow font. This makes it cacheable by our own CDN and removes our dependency on Google Fonts.
Use the preload resource hint to tell the browser that the font should be loaded before rendering kicks in.

Ultimately, this allows the browser to load the font more efficiently and prevents the font from blocking rendering.
Demo
With style flash: https://napari-hub.org/
Without style flash: https://speed-up-hub-frontend.dev.imaging.cziscience.com
Before
https://user-images.githubusercontent.com/2176050/125697505-69b1b9b9-8a9d-497d-ba70-024c02cf230b.mp4
https://user-images.githubusercontent.com/2176050/125697495-45a47dfc-424f-4057-a282-89cf01170d85.mp4
After
https://user-images.githubusercontent.com/2176050/125697535-7bc28b8a-9c65-4c35-8bb0-7b1ca060144a.mp4
https://user-images.githubusercontent.com/2176050/125697533-7310c0ef-4573-4459-b96b-0ad7a314aa37.mp4
Follow Ups

The TOC flash is something I noticed while working on this. It's minor but doesn't seem trivial to fix since it only happens when deployed (can't reproduce locally for some reason).

@liaprins-czi If you're referring to the font flash, I read this article on preloading 😄
https://sia.codes/posts/making-google-fonts-faster/


Support for GDPR

Do you have any plans to support GDPR? or how we can support that using the current setup

I've been wondering about this too. An option to opt out the fields that are personal data when installing devise would be nice. i.e: rails generate devise:install --gdpr true would

remove the IP address field in the migration
remove the email address field in the migration and replace it with a username field (thus changing the signin process)

Devise is a generic authentication solution and has no plan or need to change to conform specific legislations of countries/states. That is under the responsibilities of the applications since it is their that have the context about which information is being stored.

GDPR is not a specific legislation of one or few countries/states. It concerns you as soon as you have users that are citizens of an European country (there are around 353 million internet users in Europe).
Even if you are in the US and have a little app, with one EU user, you are concerned by GDPR.
GDPR is complicated to understand, even more for junior developers/developers that build their first app. It would be a shame to have legal issues just because you left something like the tracking/registering of the user IP address in your app when installing devise.
Actually, I think we should build and have privacy-by-default tools, to build and have privacy-by-default apps.
Why not remove those sensitive fields (IP address, signin count ?) in the default devise generator (unlike what I said previously) ? If someone really needs them, they can add them via some option.
We can't just say "Oh, there's some new law that concerns everyone, it is very complicated and will change the way you develop applications. But we won't help you with that."

Why not remove those sensitive fields (IP address, signin count ?) in the default devise generator (unlike what I said previously) ?

I think that is a good compromise. If you want to do it please open a PR, but I don't think we should include an option and implement code specifically for gdpr.

It is important to include that in the future release and this should be soon. All service providers around the world started to align with GDPR. As @fakenine mentioned it is not like any specific legislation for a specific country.
I hope if you can reconsider this again.

I just did in the comment above and I'm asking for help to implement. Just to be clear, can someone send a PR with the required changes? We will make it the new default.

@rafaelfranca Thank you! I will look into this this week.

@fakenine Would this also require encrypting the email address?

Yes, and also hiding all personal data from logs and sessions, also a way to anonymize the user if the data is backed up. for example, if you take a backup from production to staging or development environment the users' data should be anonymized hashed for example.
Also, a method to export all data related to the user, and delete all users records as well

I think it should be done step by step, at least removing the IP address first as it is considered as sensitive/personal data, stored by default but not used by everyone.
I don't think Devise should encrypt the email by default. It could affect performance on most apps as you would need to decrypt the email field each time you need to read it (like in a User Profile page, or an Admin Dashboard listing users for instance). What do you think?

[...] and also hiding all personal data from logs and sessions, also a way to anonymize the user if the data is backed up. for example, if you take a backup from production to staging or development environment the users' data should be anonymized hashed for example.

I think we are out of the scope of devise for the first point. Rails already has a way to do that via Rails.application.config.filter_parameters and you can add as many fields as you want (password is present by default).
Same thing for the export. Devise does not handle exporting/importing data from the users table. This should be implemented by the app developer on their platform, regarding what they use to export/import (like a CSV export via ActiveAdmin for instance).

@fakenine I agree, part of this is out of device scope, but I think encrypting the email will be good to have at data model level but it can be default decrypted at views level. Also, this can be optional so if affects the performance you can disable it.

I think it is important to keep IP address for detecting the malicious attacks, and it can be used in other features.

it can be default decrypted at views level.

I think it is important to keep IP address for detecting the malicious attacks, and it can be used in other features.

I understand. What I meant was to remove the :trackable option from the default generator. That's the option that allows the app developer to track different things from the user (like sign in IP). I will submit a PR for this.

For the IP address, can't you anonymize the ip instead? Zero the last octet of ipv4 and keep the first half of ipv6 address?

Closed via #4857

If you still want to track sessions, but not IPs, the easiest way I've found is to simply override the IP related methods on your resource (e.g. User):
  def current_sign_in_ip; end
  def last_sign_in_ip=(_ip); end
  def current_sign_in_ip=(_ip); end

This will allow enabling the :trackable module without any IP being saved.

I like @metalelf0's idea here. Could trackable be modified to exclude IP, but keep the sign in count & date?


auro-datepicker: Datepicker dropdown should close when I click on a date.

Is your feature request related to a problem? Please describe.
When I click on a date in the datepicker dropdown, I have to click on another part of the screen to make the dropdown close.
Describe the solution you'd like
No response
Describe alternatives you've considered
No response
Additional context
No response
Exit criteria
No response

This is currently intended behavior.  We will discuss and see if it is something we want to revisit and change.


fix panic: duplicate metrics collector registration attempted

Which problem is this PR solving?
fix duplicate metrics collector registration attempted panic
Short description of the changes
use different names for counter and gauge metrics collector.

change lgtm. Please refer to CONTRIBUTING.md for instructions on getting the PR in shape to be merged (CI build, and DCO check).

And thanks for contributing!

Thanks, I have made some changes, PTAL:)

Thanks for your contribution. LGTM, but could you document what exactly is panicking in the PR?  (I'm assuming it's the prom reporter)

Prometheus doesn't allow initialization of the same name,tag combination.


Overflow menu is not (reasonably) navigable to screenreaders

Describe in detail the issue you're having. Is this a feature request (new component, new icon), a bug, or a general issue?

When the overflow menu is not the last element of the DOM, the overflow menu is not reasonably accessible. On the overflow menu codepen, it appears to be, as there are not other elements. On the DataTable codepen, this is apparent

Is this issue related to a specific component?

Overflow menu, more apparent in the DataTable overflow menu

What did you expect to happen? What happened instead? What would you like to see changed?

When a screen reader user selects the overflow menu, the options should be navigable next

What browser are you working in?

Safari with VoiceOver

What version of the Carbon Design System are you using?

carbondesignsystem.com current version
Steps to reproduce the issue

Go to https://codepen.io/team/carbon/full/MOEagV/
Navigate to the overflow menu of the first row
Select the overflow menu
Advance to the next element

The first element of the next row is read rather than the overflow menu itself.
This is because the menu is not in correct DOM order. Ideally, the menu would come directly after the toggle on the DOM.
I'm less sure on this next part, but I believe the button should also have aria-controls, aria-expanded, and aria-haspopup attributes. I could be mistaken on the attributes.
I'm by no means an expert at using a screenreader, so I may be mistaken, however, this seems like an issue.

Note that if instead of the first overflow menu, you toggle the last overflow menu, the UX seems reasonable, as you navigate to the menu after selecting the toggle button.

Ref: https://github.com/carbon-design-system/carbon-components-react/pull/518

I think the author of this issue meant https://codepen.io/team/carbon/pen/MOEwjp/ CodePen, and I see the problem has been fixed with <input class="bx--visually-hidden" type="text"> focus trap. Let us know if anybody still see a problem. Thanks!

No I specified the correct codepen -- unless the version of Carbon is out of date on the one I specified.
When navigating to the overflow menu button of the first view and selecting it, when you advance to the next focusable item, the actual menu is not the next item, it advances to the next row of the table.

I would recommend this issue be reopened unless the codepen I specified is out of date.

@hvlawren Updated
https://codepen.io/team/carbon/full/MOEagV/ - My apologies for naïvely assuming it’s just about data table.


Cannot compile WASM since preview 5 (Not sure on version)

Since version preview 5 I cannot compile WASM anymore. I get this error:
The return type 'FluentAvalonia.Interop.Win32.LRESULT' of pinvoke callback method 'FluentAvalonia.Interop.Win32.LRESULT WndProcStatic(FluentAvalonia.Interop.Win32.HWND, System.UInt32, FluentAvalonia.Interop.Win32.WPARAM, FluentAvalonia.Interop.Win32.LPARAM)' needs to be blittable.  AvaloniaApplication1.Browser  C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.WebAssembly.Sdk\7.0.4\Sdk\WasmApp.Native.targets  290
This just "happened" after the upgrade to FluentAvalonia and Avalonia. I cannot even compile the Avalonia Greetings template anymore.

I can confirm this. I removed private static LRESULT WndProcStatic(HWND hwnd, uint msg, WPARAM wParam, LPARAM lParam) for now, so WASM is up again.
I must say: it looks stunning in the browser!

It might be a result of the separate windowing package being pulled in to the main one.


Not being able to override styles

For a component <Image height={100} />
I expect the height to be 100px.
But due to this https://github.com/rebassjs/rebass/blob/34a20ab015a37c50ef8a51f4c9b437ce7aa23338/packages/rebass/src/index.js#L69
My custom style is overridden by the default

You can set the height to 100px through the sx prop:
<Image src="/example.png" sx={{height: 100}} />

Remember the jsx pragma and import:
/** @jsx jsx */
import { jsx } from 'theme-ui'

I realise this doesn't exactly resolve your issue but maybe it helps.
Cheers

Thanks, I use an older version without the sx prop. I am able to override my styles by extending the component.
But I really think that the default styles should come before passes style props so they can be overridden easily. Unless there's a reason for it to be like this
https://github.com/rebassjs/rebass/blob/34a20ab015a37c50ef8a51f4c9b437ce7aa23338/packages/rebass/src/index.js#L66-L70

For a component  I expect the height to be 100px.

This should work. Can you create a reproduction of the issue you're seeing?

@louissm-it FWIW, you don't need the Theme UI jsx to use the sx prop on Rebass components

Thanks for checking in jxnblk.
I found out the issue is from<EMAIL_ADDRESS>I changed my version to 3.1.1 to solve this problem.
See example. https://codesandbox.io/s/awesome-turing-eqqzg
Also Verified correct behaviour on the latest version. This issue can be closed.

@louissm-it FWIW, you don't need the Theme UI jsx to use the sx prop on Rebass components

Thank you. I thought it was needed because when removing the import I get:
 'jsx' must be in scope when using JSX  react/react-in-jsx-scope
However, when changing the import from '@rebass/emotion' to 'rebass' everything works as expected.
Thanks again👍

@louissm-it If you use a pragma comment, that function will need to be in scope. When using Rebass v4, the sx prop works with or without the Theme UI custom create element function, but it looks like you were maybe using an older version as well

@vigzmv thanks! Going to close this out since it's not an issue in the current version


Download and Install the Spacy model package as a part of the Pebblo install

Description:
Download and Install the Spacy model package as a part of the Pebblo install
Source of GitHub link:
The GitHub link used for installing is taken from the Spacy package that is installed with the Pebblo using the following command:
spacy info en_core_web_lg --url

Testing:
Tried building & installing Pebblo on my local. It shows the download step.

Reference: Spacy Docs

lgtm


Objects and Actions

The relationship between objects and sensible actions is a tenuous one.
One one hand, its hilarious that some things occur.
On the other hand, it doesn't make for very good reading past paragraph 2.
Proposal:
Objects should be a dictionary, along these lines:
self.objects = { "football": ["kiss","hate"]
}

Where the linked list are the actions that are banned from occurring with that object.

Implemented as of 94f709d9651f985bbfaecb73c272f8d69c4a9d7f
With the exception that self.objects has been replaced with self.objectsDict.


Handle errors in the PyFR sample.

If the generated kernel gives different results to the sparse kernel, the driver now returns 1.  This will be used in the future for unit testing of the routines.

Updated.  When running the examples I get a few failures.  This is not entirely unexpected (some of the kernels are larger than the default code buffer size).  What is perhaps more interesting is that we fail with a stack smashing attempt which implies somewhere we're not being as careful as we should be (I am unsure if this is in the sample code or libxsmm itself, if it is the latter we should probably fix the issue ASAP).


Automigration NOT NULL to DEFAULT NULL not working

GORM Playground Link

https://github.com/go-gorm/playground/pull/512
Description
It's not possible to change not nullable field to nullable.
type Test struct {
	gorm.Model
	SomeStr string `gorm:"type:VARCHAR(15);NOT NULL"`
}

After AutoMigrate is run, some_str field on DB is not nullable, then changing struct to this:
type Test struct {
	gorm.Model
	SomeStr string `gorm:"type:VARCHAR(15);default:NULL"`
}

and running AutoMigrate again, field remains not nullable.
I believe problem is here: https://github.com/go-gorm/gorm/blob/master/migrator/migrator.go#L439
both nullable (actual state on DB) and field.NotNull (new value) are false, meaning it's only possible to change from nullable to not nullable. I don't know if it's done on purpose.

It is a bug, are you interested in creating a PR to fix it?

This bug is still happening for me

https://github.com/go-gorm/gorm.io/pull/782


[registry-support] ./build_image.sh not working on linux

/kind bug

Which area this bug is related to?
/area registry
What versions of software are you using?
Operating System:
Linux
$yq --version
yq 2.14.0

$ jq --version
jq-1.6

Bug Summary
Describe the bug:
Unable to build registry index image. Due to incorrect yq commands in cache_samples.sh.
Also, note wanting about -maxdepth flag in  find command.
▶ ./build_image.sh ~/Code/registry/
Building index-generator tool
Successfully built the index-generator tool
find: warning: you have specified the global option -maxdepth after the argument (, but global options are not positional, i.e., -maxdepth affects tests specified before it as well as those specified after it.  Please specify global options before other arguments.
find: warning: you have specified the global option -maxdepth after the argument (, but global options are not positional, i.e., -maxdepth affects tests specified before it as well as those specified after it.  Please specify global options before other arguments.
find: warning: you have specified the global option -maxdepth after the argument (, but global options are not positional, i.e., -maxdepth affects tests specified before it as well as those specified after it.  Please specify global options before other arguments.
find: warning: you have specified the global option -maxdepth after the argument (, but global options are not positional, i.e., -maxdepth affects tests specified before it as well as those specified after it.  Please specify global options before other arguments.
find: warning: you have specified the global option -maxdepth after the argument (, but global options are not positional, i.e., -maxdepth affects tests specified before it as well as those specified after it.  Please specify global options before other arguments.
find: warning: you have specified the global option -maxdepth after the argument (, but global options are not positional, i.e., -maxdepth affects tests specified before it as well as those specified after it.  Please specify global options before other arguments.
find: warning: you have specified the global option -maxdepth after the argument (, but global options are not positional, i.e., -maxdepth affects tests specified before it as well as those specified after it.  Please specify global options before other arguments.
find: warning: you have specified the global option -maxdepth after the argument (, but global options are not positional, i.e., -maxdepth affects tests specified before it as well as those specified after it.  Please specify global options before other arguments.
find: warning: you have specified the global option -maxdepth after the argument (, but global options are not positional, i.e., -maxdepth affects tests specified before it as well as those specified after it.  Please specify global options before other arguments.
find: warning: you have specified the global option -maxdepth after the argument (, but global options are not positional, i.e., -maxdepth affects tests specified before it as well as those specified after it.  Please specify global options before other arguments.
find: warning: you have specified the global option -maxdepth after the argument (, but global options are not positional, i.e., -maxdepth affects tests specified before it as well as those specified after it.  Please specify global options before other arguments.
find: warning: you have specified the global option -maxdepth after the argument (, but global options are not positional, i.e., -maxdepth affects tests specified before it as well as those specified after it.  Please specify global options before other arguments.
find: warning: you have specified the global option -maxdepth after the argument (, but global options are not positional, i.e., -maxdepth affects tests specified before it as well as those specified after it.  Please specify global options before other arguments.
find: warning: you have specified the global option -maxdepth after the argument (, but global options are not positional, i.e., -maxdepth affects tests specified before it as well as those specified after it.  Please specify global options before other arguments.
find: warning: you have specified the global option -maxdepth after the argument (, but global options are not positional, i.e., -maxdepth affects tests specified before it as well as those specified after it.  Please specify global options before other arguments.
find: warning: you have specified the global option -maxdepth after the argument (, but global options are not positional, i.e., -maxdepth affects tests specified before it as well as those specified after it.  Please specify global options before other arguments.
find: warning: you have specified the global option -maxdepth after the argument (, but global options are not positional, i.e., -maxdepth affects tests specified before it as well as those specified after it.  Please specify global options before other arguments.
find: warning: you have specified the global option -maxdepth after the argument (, but global options are not positional, i.e., -maxdepth affects tests specified before it as well as those specified after it.  Please specify global options before other arguments.
find: warning: you have specified the global option -maxdepth after the argument (, but global options are not positional, i.e., -maxdepth affects tests specified before it as well as those specified after it.  Please specify global options before other arguments.
find: warning: you have specified the global option -maxdepth after the argument (, but global options are not positional, i.e., -maxdepth affects tests specified before it as well as those specified after it.  Please specify global options before other arguments.
find: warning: you have specified the global option -maxdepth after the argument (, but global options are not positional, i.e., -maxdepth affects tests specified before it as well as those specified after it.  Please specify global options before other arguments.
find: warning: you have specified the global option -maxdepth after the argument (, but global options are not positional, i.e., -maxdepth affects tests specified before it as well as those specified after it.  Please specify global options before other arguments.
find: warning: you have specified the global option -maxdepth after the argument (, but global options are not positional, i.e., -maxdepth affects tests specified before it as well as those specified after it.  Please specify global options before other arguments.
find: warning: you have specified the global option -maxdepth after the argument (, but global options are not positional, i.e., -maxdepth affects tests specified before it as well as those specified after it.  Please specify global options before other arguments.
usage: yq [-h] [--yaml-output] [--yaml-roundtrip] [--width WIDTH]
          [--indentless-lists] [--in-place] [--version]
          [jq_filter] [files ...]
yq: error: argument files: can't open '(.samples[].name)': [Errno 2] No such file or directory: '(.samples[].name)'
Generating the devfile registry index
the dotnet50 devfile has no provider mentioned
the dotnet60 devfile has no provider mentioned
the dotnetcore31 devfile has no provider mentioned
the go devfile has no provider mentioned
the java-maven devfile has no provider mentioned
the java-openliberty devfile has no provider mentioned
the java-openliberty-gradle devfile has no provider mentioned
the java-quarkus devfile has no provider mentioned
the java-springboot devfile has no provider mentioned
the java-vertx devfile has no provider mentioned
the java-websphereliberty devfile has no provider mentioned
the java-websphereliberty-gradle devfile has no provider mentioned
the java-wildfly devfile has no provider mentioned
the java-wildfly-bootable-jar devfile has no provider mentioned
the nodejs devfile has no provider mentioned
the nodejs-angular devfile has no provider mentioned
the nodejs-nextjs devfile has no provider mentioned
the nodejs-nuxtjs devfile has no provider mentioned
the nodejs-react devfile has no provider mentioned
the nodejs-svelte devfile has no provider mentioned
the nodejs-vue devfile has no provider mentioned
the php-laravel devfile has no provider mentioned
the python devfile has no provider mentioned
the python-django devfile has no provider mentioned
Error: failed to generate index struct: nodejs-basic devfile sample does not have a devfile.yaml: stat /tmp/tmp.qAYbQsKp3L/samples/nodejs-basic/devfile.yaml: no such file or directory
Failed to build the devfile registry index
Error building the devfile registry
Failed to build the devfile registry index

@kadel It looks like you have the other yq installed (https://github.com/kislyuk/yq).
The registry build script requires https://github.com/mikefarah/yq (specifically v4.x)

Closing as this issue seems to be an inconsistency between users version of yq and the version required by the script. In the readme on registry-support it outlines the correct version of yq to install.
https://github.com/devfile/registry-support/blob/5df13d41711d199719bd482f22b9a03ea3781110/build-tools/README.md?plain=1#L12


[Run Plugin Manager] Plugin Search

Summary of the Pull Request
What is this about:
Added search to launcher plugin manager settings page.

How does someone test / validate:
Search for plugins in plugin manger settings page.
Quality Checklist

[x] Linked issue: #9933
[ ] Communication: I've discussed this with core contributors in the issue.
[ ] Tests: Added/updated and all pass
[ ] Installer: Added/updated and all pass
[ ] Localization: All end user facing strings can be localized
[ ] Docs: Added/ updated
[x] Binaries: Any new files are added to WXS / YML

[x] No new binaries
[ ] YML for signing for new binaries
[ ] WXS for installer for new binaries

Contributor License Agreement (CLA)
A CLA must be signed. If not, go over here and sign the CLA.

@davidegiacometti
Does the search field filters by name and comment?

It's just searching by plugin name.


export the GitHubAPI interface

This PR exports the GitHubAPI Interface so that it may be used with typing the public properties of the Context class.

Can you elaborate a bit more what you mean with

so that it may be used with typing the public properties of the Context class.

I fear that by exporting it without adding tests or documentation, it is possible that it will be dropped next time we clean up / refactor the code

I fear that by exporting it without adding tests or documentation, it is possible that it will be dropped next time we clean up / refactor the code
understood.

The main reason for exporting this Interface is that it is currently difficult to type a class which takes in the github property of the Context class.
An example:
const owner: string = "test"
const repo: string = "test"

addIssueLabel(github: <type here>, issueNumber: number, label: string) {
  github.issues.addLabels({ owner: owner, repo: repo, issue_number: issueNumber, labels: [label]})
}

maybe I should be creating my own github type for this specific use case. I'm not actually sure.


ReplayInfo is not filled in by ReplayControlImp::GatherReplayInfo

Running the example program replay.cc fails.
The program finds the replay folder and verifies the game file. The data for the game file is present (based on the fact that I can watch the replay from the sc2 game itself).
But, the request to the protobuf for replay information is empty.  The return value and all existing tests in the code suggest that the request is successful (e.g. response->error_size() == 0 && has_replay_info() == true).
But, ResponseReplayInfo structure, which is entirely optional fields, has no data. That is, calls to has_fieldname() all return false.
Despite there being no overt error caught by the program. All is not well, because if I examine the response from protobuf (in ControlImp::WaitForResponse(), look at response.get().DebugString()), it says
 error: ParsingError
  error_details: "Could not open initData for the replay: C:/Replays/03032019 - GAME 1 - soO vs Stats - Z vs P - Automaton LE.SC2Replay"

What's also weird, is that normally the example will skip replays if the duration is too short. In this case, the error makes it appear to be 0 frames, but if I I force it to go on, the replay actually works, but then, the OnStep() function of the ReplayObserver are not called. Is it supposed to be?
Other example programs, like annoying helper, appear to work.

It seems that tis problem somehow related to the game cache and version. I encountered the same issue when tried to load replay from older version of the game.
One of possible workarounds here is https://github.com/narhen/pysc2-replay/issues/2
Unfortunately, even if I specify correct game version it fails with the same error.
Also, I can confirm that replay observing works with the replays from actual version of the game.

Prior to running replay. I set the process and data versions.
I have to get the build and data_versions from a python script (because it can read MPQ replay format) .  I then it on an entire directory of replays. The python output is a triplet of <build, data versions, replay_paths>, which I iterator over using something like this pseudo-code:
sc2::Coordinator coordinator;
std::string path = coordinator.GetExePath();
sc2::FindBaseExe(path, replay_build);
coordinator.SetProcessPath(path);
coordinator.SetDataVersion(replay_data_version);

while (coordinator.Update() )
    {;} //run a replay

Is there a way to get the sc2-api team to respond to this and a few other issues? The game itself is able to figure out which build and data version to use. Ideally, GatherReplayInfo() should return the results that introspection instead of an error.

Is there a way to get the sc2-api team to respond to this and a few other issues?

Unfortunately, no. So far the only way is to ask DeepMind people to ask somebody from Blizzard to take a look at some issues. But there is almost no progress as the API is not maintained. People might be busy with the new Diablo.

Also, they did some weird changes in the latest game client, so now not every path could be used to load a replay. AT least on my Catalina only /Users/alkurbatov/Library/Application Support/Blizzard/StarCraft II/Accounts/100504662/2-S2-2-16147/Replays/Multiplayer/ works.
Could be Catalina issue of course (e.g. lack of permissions). I added extended error reporting to the dev branch to catch such issues.


[5.2] Deprecated array_build

:+1:

Just curious... what is the reason to deprecate/remove this?

Reason #1916

Ah gotcha

Thanks


amplify add auth not adding anything according to CLI

Describe the bug
Amplify auth appears to not be added when using a fresh project after running amplify init
To Reproduce
Steps to reproduce the behavior:

Run amplify init
Run amplify add auth
Run amplify push
See this

amplify push
| Category | Resource name | Operation | Provider plugin |
| -------- | ------------- | --------- | --------------- |
? Are you sure you want to continue? true
√ All resources are updated in the cloud

Potentially related - running amplify status returns this:
amplify status
| Channel | Status   |
| ------- | -------- |
| APNS    | Disabled |
| FCM     | Disabled |
| Email   | Disabled |
| SMS     | Disabled |

I have not seen this before and it seems strange.
Expected behavior
There should be auth listed in the status.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):

OS: Windows 10

amplify -v
0.1.27

@mwarger This is a known issue and is tied to our underlying CLI framework - gluegun, and there is a fix provided for the same -> https://github.com/infinitered/gluegun/issues/384, but they haven't gotten a chance to publish a new version to NPM. Once they do so, we'll have this fixed. For the time being, you could use amplify auth push to push your auth resources or use WSL as recommended by us for the time being.

@kaustavghosh06 I posted on the other issue too, but could you try beta 12 and see if it fixes this issue on Windows?

@mwarger We published a new version of the CLI to npm, version -> 0.1.32 with fixes for windows. Feel free to re-open the issue if the problem still persists.


Integration won't initialize?

Hi,
This looks great, but I struggling to get it to initialize? Running latest HASS (2024.02.01). Integration installs OK and asks for API key - but then keeps saying "Failed Initialization - will retry".
I've deleted/reinstalled. Generated a new Ripple API key.
Anything else I can try?
Thanks.

Have you got a reservation with ripple for a project that hasn’t completed yet? I believe there is an issue when this is the case that I need to fix.

I've just released version 2024.2.1 please can you update to this version and try again. This should fix the issue however I'm only invested in Graig Fatha so can't confirm myself.

Thanks Ryan - all working :-)
I updated/restarted HA, added the integration and entered my API key. I got a "Device already configured" message, but this was because the integration was actually already there from my last attempt (I'd just disabled it). I re-enabled and all is good.
Thanks again 👍

Great thanks for confirming 😊