Fail to import using Vite + Vue 3

When trying to import in a project which uses Vite and Vue 3, it fails.
    import { useShepherd } from 'vue-shepherd';
During runtime, it fails with an error:
Uncaught ReferenceError: process is not defined
Which leads to:
if ('false' === process.env.ES_BUILD) {
Here, process doesn't exit. We should use a different value as indicated in https://stackoverflow.com/questions/71083110/vue-uncaught-referenceerror-process-is-not-defined, but of course we cannot change it unless rebuilding the project
I was able to fix this by adding a statement in vite.config.js:

define: {
        'process.env': {}
    }

Is it possible to add support for Vite, or add some info in documentation regarding this?

Duplicate of several other issues. See https://github.com/shipshapecode/vue-shepherd/issues/174#issuecomment-1400512294


Is the install from source (via go) broken?

I have pulled down the golang docker container (https://hub.docker.com/_/golang/) and run the go command to get hub. But I keep getting errors :disappointed:  ...
root@e30ec5a27653:/go# go get github.com/github/hub
# github.com/github/hub/github
src/github.com/github/hub/github/client.go:157: too many arguments in call to api.Commits
src/github.com/github/hub/github/client.go:157: not enough arguments in call to api.Commits(client.requestURL(url)).Patch
src/github.com/github/hub/github/client.go:178: too many arguments in call to api.Gists
src/github.com/github/hub/github/client.go:178: not enough arguments in call to api.Gists(client.requestURL(url)).Raw
src/github.com/github/hub/github/client.go:199: too many arguments in call to api.Repositories
src/github.com/github/hub/github/client.go:199: not enough arguments in call to api.Repositories(client.requestURL(url)).One
src/github.com/github/hub/github/client.go:239: too many arguments in call to api.Repositories
src/github.com/github/hub/github/client.go:239: not enough arguments in call to api.Repositories(client.requestURL(url)).Create
src/github.com/github/hub/github/client.go:382: too many arguments in call to api.Repositories
src/github.com/github/hub/github/client.go:382: not enough arguments in call to api.Repositories(client.requestURL(url)).Create
src/github.com/github/hub/github/client.go:382: too many errors

Am I doing something obviously wrong?

I am getting the exact same errors.

I don't know what causes these exact errors, but we have recently switched to vendored dependencies within the project, making it incompatible with the standard go get method of install.
Instead, could you try cloning the project directly and using script/build to create the hub executable? You will need Go 1.5.

Yup. From the golang docker container I was able to follow the build steps in README.md to compile from source;
$ git clone https://github.com/github/hub.git
$ cd hub
$ ./script/build
$ cp hub YOUR_BIN_PATH

That all worked fine. I got the hub bin compiled.
However, in my team's project we're using CircleCI and have been relying on the $ go get github.com/github/hub command to add hub to our ubuntu docker container. It would be extremely convenient to be able to pull the hub binary without the need to clone the repo and compile. Is there an official PPA for the project?

It would be extremely convenient to be able to pull the hub binary without the need to clone the repo and compile.

Could you simply download the precompiled binaries?

Yes, of course. And it's totally awesome that the precompiled binaries are there, and even that this open source project exists. Many thanks for all of that - please don't think me ungrateful. But the advantage of a PPA, or the go get command, is that I'm pulling in the latest version of hub.

I don't know anything about PPAs, so you're welcome to contribute whatever needs to set up a PPA, or maintain one yourself!

Can I request a precompiled binary for an ARM server like one ran by scaleways? x86 and x64 don't seem to function for me and my use case and neither the go get nor the create from source are working for me.
http://dave.cheney.net/2012/09/08/an-introduction-to-cross-compilation-with-go
Is cross compilation something you might be able to add for linux/arm folks like myself?

Our cross-compilation matrix is here.
I guess we could add linux  arm  Linux ARM 32-bit and linux  arm64  Linux ARM 64-bit to it and that should work. Do you want to open a pull request for this?
You could checkout the "2.2-stable" branch, add the lines there, run script/cross-compile 2.2.3 and check if the resulting tarballs are valid on an ARM system.
I tried running this on OS X, but it doesn't let me cross-compile for linux ARM for some reason.

@mislav I have added a pull request with the updated code. Please review at your leisure.
Thank you for all your help!
Adding support for arm processors #1090

Can't install through go get too. That section should be removed from README probably.


recommend_from_interactions not working properly

Say, I use a toy data:
data = pd.DataFrame({"id" : [0,1,2], "names" : [["delhi","mumbai"],["delhi","pune"],["pune","bangalore"]],
                     "likes" : [["dhokla","fafda"],["pizza","burger"],["beer","pizza"]]})

Which is this:

I create the model like this:
m = tc.recommender.item_content_recommender.create(
    tc.SFrame(data),
    "id",
    max_item_neighborhood_size = 4,
    verbose=True
)

Then I get the recommendation like this:
m.recommend_from_interactions([1],k=2)
But I get these results , which I think are counter intuitive, as clearly 2 is the nearest to 1.

Hi @DeepakSaini119 -
1 is most similar to 0 because they both have "delhi" in the first position of their name list.
The occurrence of pizza in the likes list of both 1 and 2 does not matter because they are in different positions in the list.
Using the following values of data, with the name column removed and pizza in the same position, does results in 1 being most similar to 2:
pd.DataFrame({"id" : [0,1,2],
                     "likes" : [["dhokla","fafda"],["pizza","burger"],["pizza", "beer"]]})

I'm not sure the items content recommender is the right recommender for your use case. What are you trying to do?


add playground for toolbarMenu

Fixes 3529 .

Changes proposed in this Pull Request:

Playground for ToolbarMenu

Screenshots:

To Test:

/components/toolbar-menu/playground

looks good. Can we make toolbar Menu Items clickable to dismiss toolbar menu

not related to this PR but noticed this today on a fresh clone. Any idea why we are seeing this?

not related to this PR but noticed this today on a fresh clone. Any idea why we are seeing this?

This should fix the mentioned error. Will log an issue and raise PR.

looks good. I see other iconProps: any was cleaned up in other component playgrounds in this PR. Do we need to have an issue logged to revisit others?

I have tested those components working fine. But still, I log an issue to test.


[BUG] Discord Rich Presence Not Displaying Correctly

Acknowledgement of preliminary instructions

[X] I have read the preliminary instructions, and I am certain that my problem has not already been addressed.
[X] I have thoroughly looked through the available Wiki articles and could not find a solution to my problem.
[X] I am using the latest version of Bloxstrap.
[ ] I did not answer truthfully to all the above checkboxes.

What problem did you encounter?
After the recent Discord updates, Rich Presence doesn't work anymore. I have read other solved issues here and followed the steps instructed and the problem sill persists
Things I have tried so far:

Uninstalled and reinstalled Discord
Disabled the rich presence option and re-enabled in both Discord and Bloxstrap

Bloxstrap Log
N/A

I think that's the default Roblox rich presence.

I think that's the default Roblox rich presence.

Exactly. So why is Discord not using Bloxstrap rich presence?

Join a game and upload Bloxstrap's latest log file from %localappdata%\Bloxstrap\Logs please

Join a game and upload Bloxstrap's latest log file from %localappdata%\Bloxstrap\Logs please

There you go!
Bloxstrap_20240928T164522Z.log

Bloxstrap is working correctly. In fact, it's even able to connect to Discord RPC. Whatever issue you're having is on Discord's side. Could I have a quick look at your activity privacy settings? Also, are you using a custom Discord client or the stock one?

After sending you the log I viewed it myself and noticed it was trying to hook to my secondary Discord account (I have 2 logged in on my PC at all times - one from the Discord stock one and one from the beta version, also stock). Starting the desired account first > Bloxstrap > secondary account fixed the issue.
Now I'm facing a new issue. RPC is now displaying correctly with the game logo and everything, but once I refresh the client (CTRL+R) it reverts back to the default RPC posted in the first screenshot. Is there anything I can do to fix that? since I need to regularly refresh my client and every time I do so I have to restart Bloxstrap for the RPC to show back
Thanks in advance!

Is there anything I can do to fix that?

No. That's to be expected.


Add article about Mental Health and OSS

Add article from Information Age about Mental Health and Open Source Software

Let me know if this style is the preferred one, of if we should mention the author (which in this case is me)


Use component alpha label rather than slimmer

Use the new style component for the alpha label rather than the old
slimmer version. This will make it more obvious as to where the label is
coming from.
This needs this pull request to be merged and deployed first:
https://github.com/alphagov/static/pull/527

Static has now been merged and deployed to production so this should be good to merge.

:+1: This is a lovely change.


Fixes #2311, #2323: when elements are removed from their previous pos…

…ition when they are added elsewhere, make sure to remove them from composed, not logical parent.

LGTM :+1:


sigqueue not implemented

Please use the following bug reporting template to help produce actionable and reproducible issues. Please try to ensure that the reproduction is minimal so that the team can go through more bugs!

A brief description

When trying to make a sigqueue call to pass data to a signal the function returns -1 and perror prints Function not implemented

Expected results

sigqueue return 0 without error

Actual results (with terminal output if applicable)

zac@zbxps:.../part1$ gcc sigq.c
zac@zbxps:.../part1$ ./a.out
Sigqueue returns: -1
Sigqueue Error: : Function not implemented

Your Windows build number

16170

Steps / All commands required to reproduce the error from a brand new installation

Compile and run the following code in bash on windows:
#include <signal.h>
#include <error.h>
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <error.h>
#include <sys/types.h>
#include <sys/wait.h>

int main() {
  int pid = fork();
  if (pid == 0) { //child
    union sigval val;
    int ret = sigqueue(getppid(), SIGKILL, val);
    printf("Sigqueue returns: %i\n", ret);
    perror("Sigqueue Error: ");
    exit(0);
  }
  wait(NULL);
  exit(0);
}

Strace of the failing command

execve("./a.out", ["./a.out"], [/* 16 vars */]) = 0
brk(NULL)                               = 0xcd0000
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fdb252e0000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=57047, ...}) = 0
mmap(NULL, 57047, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fdb252d2000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P\t\2\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1864888, ...}) = 0
mmap(NULL, 3967392, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fdb24c30000
mprotect(0x7fdb24def000, 2097152, PROT_NONE) = 0
mmap(0x7fdb24fef000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1bf000) = 0x7fdb24fef000
mmap(0x7fdb24ff5000, 14752, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fdb24ff5000
close(3)                                = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fdb252d0000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fdb252c0000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fdb252b0000
arch_prctl(ARCH_SET_FS, 0x7fdb252c0700) = 0
mprotect(0x7fdb24fef000, 16384, PROT_READ) = 0
mprotect(0x600000, 4096, PROT_READ)     = 0
mprotect(0x7fdb25225000, 4096, PROT_READ) = 0
munmap(0x7fdb252d2000, 57047)           = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7fdb252c09d0) = 1808
wait4(-1, Sigqueue Error: : Function not implemented
NULL, 0, NULL)                = 1808
exit_group(0)                           = ?
+++ exited with 0 +++

Required packages and commands to install

gcc

See our contributing instructions for assistance.

Thanks for reporting the issue!  The rt_sigqueue* syscalls are not currently supported by WSL.  To help us prioritize can you please give us feedback on user voice - https://wpdev.uservoice.com/forums/266908-command-prompt-console-bash-on-ubuntu-on-windo/

Update from WSL 1 to WSL 2 worked for me


Improve Github Actions

Move all CI jobs that we want to run on every update to PR and main to one workflow yaml file.
Split out jobs appropriately
Remove redundancy between jobs

Additional:

removed unused workflows

LGTM

it's pretty quick 😄


multi-gpu training: tf.compat.v1.scatter_sub() operation throws exception

System information

Have I written custom code (as opposed to using a stock example script provided in TensorFlow):

Extended from the stock example
https://www.tensorflow.org/beta/tutorials/distribute/keras
Working example is attached to this bug report

OS Platform and Distribution

Linux Ubuntu 16.04

Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device:

No

TensorFlow installed from (source or binary):

Binary

TensorFlow version (use command below):

2.0.0-beta1

Python version:

Python 3.5.2

Bazel version (if compiling from source):

N/A (0.23.2)

GCC/Compiler version (if compiling from source):

N/A (5.4.0 20160609)

CUDA/cuDNN version:

10.0.130/7.4.1

GPU model and memory:

4x Titan Xp (12Gb) (Standalong, no SLI connections)

Describe the current behavior
tf.compat.v1.scatter_sub does not support multi-gpu training.

    AttributeError: 'Tensor' object has no attribute '_lazy_read'

    is thrown in the tf.compat.v1.scatter_sub() operation.

There is no equivalent scatter_* operations in tf.compat.v2 module.

Describe the expected behavior
tf.compat.v1.scatter_sub or equivalent scatter_* operations should support multi-gpu training.
Code to reproduce the issue

The script attached is used to train a model using multiple GPUs.

The code is modified from the stock example for quick experiment.

https://www.tensorflow.org/beta/tutorials/distribute/keras

Other info / logs
WARNING: Logging before flag parsing goes to stderr.
W0622 23:56:34.418763<PHONE_NUMBER>78432 cross_device_ops.py:1164] Some requested devices in `tf.distribute.Strategy` are not visible to TensorFlow: /job:localhost/replica:0/task:0/device:GPU:1,/job:localhost/replica:0/task:0/device:GPU:0
Number of devices: 2
Traceback (most recent call last):
  File "center_loss_mnist.py", line 326, in <module>
    run(0.0001)
  File "center_loss_mnist.py", line 259, in run
    final_output, side_output = my_model(main_input, aux_input)
  File "center_loss_mnist.py", line 119, in my_model
    side = CenterLossLayer(alpha=0.5, name='centerlosslayer')([x, labels])
  File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/keras/engine/base_layer.py", line 662, in __call__
    outputs = call_fn(inputs, *args, **kwargs)
  File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/autograph/impl/api.py", line 169, in wrapper
    raise e.ag_error_metadata.to_exception(type(e))
AttributeError: in converted code:

    center_loss_mnist.py:179 call  *
        new_centers = tf.compat.v1.scatter_sub(self.centers, x[1], delta_centers)
    /usr/local/lib/python3.5/dist-packages/tensorflow/python/ops/state_ops.py:535 scatter_sub
        return ref._lazy_read(gen_resource_variable_ops.resource_scatter_sub(  # pylint: disable=protected-access
    /usr/local/lib/python3.5/dist-packages/tensorflow/python/distribute/values.py:381 __getattr__
        return getattr(self.get(), name)

    AttributeError: 'Tensor' object has no attribute '_lazy_read'

** Run the script using the following command
export CUDA_VISIBLE_DEVICES="0"
python3 center_loss_mnist.py

** Save the following script as "center_loss_mnist.py"

from datetime import datetime
from tensorflow.keras import backend as K
from tensorflow.keras import initializers
from tensorflow.keras import losses
from tensorflow.keras import optimizers
from tensorflow.keras.callbacks import TensorBoard
from tensorflow.keras.datasets import mnist
from tensorflow.keras.layers import Activation
from tensorflow.keras.layers import BatchNormalization
from tensorflow.keras.layers import Conv2D
from tensorflow.keras.layers import Dense
from tensorflow.keras.layers import Dropout
from tensorflow.keras.layers import Flatten
from tensorflow.keras.layers import Input
from tensorflow.keras.layers import Layer
from tensorflow.keras.layers import MaxPool2D
from tensorflow.keras.layers import PReLU
from tensorflow.keras.models import Model
from tensorflow.keras.regularizers import l2
import math
import numpy as np
import os
import shutil
import tensorflow as tf

### parameters
batch_size = 64
epochs = 10
weight_decay = 0.0005

def init_gpus(soft_device_placement=True, log_device_placement=False, create_virtual_devices=False, memory_limit=4096):

    tf.config.set_soft_device_placement(soft_device_placement)
    tf.debugging.set_log_device_placement(log_device_placement)

    gpus = tf.config.experimental.list_physical_devices('GPU')
    if gpus:
        # If there is only one GPU, create two logical virtual devices for developing
        # on a machine with only one GPU installed
        try:
            # Create 2 virtual GPUs on each physical GPU with the given memory_limit GPU memory
            if create_virtual_devices and len(gpus) == 1:
                tf.config.experimental.set_virtual_device_configuration(
                    gpus[0],
                    [tf.config.experimental.VirtualDeviceConfiguration(memory_limit=4096),
                     tf.config.experimental.VirtualDeviceConfiguration(memory_limit=4096)]
                )

            else:
                # Currently, memory growth needs to be the same across GPUs
                for gpu in gpus:
                    tf.config.experimental.set_memory_growth(gpu, True)

        except RuntimeError as e:
            # Memory growth must be set before GPUs have been initialized
            print(e)

        # print out physical and logical GPUs
        logical_gpus = tf.config.experimental.list_logical_devices('GPU')
        print(len(gpus), "Physical GPUs,", len(logical_gpus), "Logical GPUs")

    else:
        print("No visible GPU is detected...")

def prelu(x, name='default'):
    if name == 'default':
        return PReLU(alpha_initializer=initializers.Constant(value=0.25))(x)
    else:
        return PReLU(alpha_initializer=initializers.Constant(value=0.25), name=name)(x)

def center_loss(y_true, y_pred):
    """Center loss based on the paper "A Discriminative Feature Learning Approach for Deep Face Recognition"
       (http://ydwen.github.io/papers/WenECCV16.pdf)
       Lc = 1/2 sum(|| xi - ci||)
    """
    return 0.5 * K.sum(y_pred, axis=0)

### model
def my_model(x, labels):
    # x = BatchNormalization()(x)
    #
    x = Conv2D(filters=32, kernel_size=(5, 5), strides=(1, 1), padding='same', kernel_regularizer=l2(weight_decay))(x)
    x = BatchNormalization()(x)
    x = prelu(x)

    x = Conv2D(filters=32, kernel_size=(5, 5), strides=(1, 1), padding='same', kernel_regularizer=l2(weight_decay))(x)
    x = BatchNormalization()(x)
    x = prelu(x)

    x = MaxPool2D(pool_size=(2, 2), strides=(2, 2), padding='valid')(x)
    #
    x = Conv2D(filters=64, kernel_size=(5, 5), strides=(1, 1), padding='same', kernel_regularizer=l2(weight_decay))(x)
    x = BatchNormalization()(x)
    x = prelu(x)

    x = Conv2D(filters=64, kernel_size=(5, 5), strides=(1, 1), padding='same', kernel_regularizer=l2(weight_decay))(x)
    x = BatchNormalization()(x)
    x = prelu(x)

    x = MaxPool2D(pool_size=(2, 2), strides=(2, 2), padding='valid')(x)
    #
    x = Conv2D(filters=128, kernel_size=(5, 5), strides=(1, 1), padding='same', kernel_regularizer=l2(weight_decay))(x)
    x = BatchNormalization()(x)
    x = prelu(x)

    x = Conv2D(filters=128, kernel_size=(5, 5), strides=(1, 1), padding='same', kernel_regularizer=l2(weight_decay))(x)
    x = BatchNormalization()(x)
    x = prelu(x)

    x = MaxPool2D(pool_size=(2, 2), strides=(2, 2), padding='valid')(x)
    x = Dropout(0.25)(x)
    #
    x = Flatten()(x)
    x = Dense(2, kernel_regularizer=l2(weight_decay))(x)
    x = prelu(x, name='side_out')
    #
    main = Dense(10, activation='softmax', name='main_out', kernel_regularizer=l2(weight_decay))(x)
    side = CenterLossLayer(alpha=0.5, name='centerlosslayer')([x, labels])
    return main, side

# Function for decaying the learning rate.
# You can define any decay function you need.
def lr_schedule(epoch):
    if epoch <= 5:
        learning_rate = 1e-3

    elif epoch <= 10:
        learning_rate = 1e-4

    else:
        learning_rate = 1e-5

    tf.summary.scalar('learning_rate', data=learning_rate, step=epoch)
    return learning_rate

class CenterLossLayer(Layer):

    def __init__(self, alpha=0.5, **kwargs):
        super().__init__(**kwargs)
        self.alpha = alpha

    def build(self, input_shape):
        self.centers = self.add_weight(
            name='centers',
            shape=(10, 2),
            initializer='uniform',
            trainable=False
        )

        super().build(input_shape)

    def call(self, x):
        """This is where the layer's logic lives.
        Arguments:
            inputs: Input tensor, or list/tuple of input tensors.
            **kwargs: Additional keyword arguments.
        Returns:
            A tensor or list/tuple of tensors.
        """
        features = x[0]
        labels = K.reshape(x[1], [-1])

        # get the tensor as specified in the label
        # the centers might repeate depending on the label index
        centers_batch = K.gather(self.centers, labels)

        unique_label, unique_idx, unique_count = tf.unique_with_counts(labels)
        appear_times = K.gather(unique_count, unique_idx)
        appear_times = K.reshape(appear_times, [-1, 1])
        #
        # center_loss_alfa default 0.5
        delta_centers = centers_batch - features
        delta_centers = delta_centers / tf.cast((1 + appear_times), tf.float32)
        delta_centers = self.alpha * delta_centers

        # scatter_sub does not support multi-gpu training, there is no equivalent operation
        new_centers = tf.compat.v1.scatter_sub(self.centers, x[1], delta_centers)

        self.add_update((self.centers, new_centers), x)
        self.result = K.sum(K.square(features - centers_batch), axis=1, keepdims=True)
        return self.result

    def compute_output_shape(self, input_shape):
        return K.int_shape(self.result)

def empty_dir(folder):
    """
    Empty a folder recursively.
    """
    for file in os.listdir(folder):
        file_path = os.path.join(folder, file)
        if os.path.isfile(file_path):
            print("Remove file: {}".format(file_path))
            os.remove(file_path)
        else:
            empty_dir(file_path)
            print("Remove folder: {}".format(file_path))
            os.rmdir(file_path)

def build_empty_dir(folder, root_dir=os.getcwd()):
    base_dir = os.path.join(root_dir, folder)
    os.makedirs(base_dir, exist_ok=True)
    empty_dir(os.path.join(root_dir, folder))

    return base_dir

"""
unset CUDA_VISIBLE_DEVICES

export CUDA_VISIBLE_DEVICES="0"
python3 center_loss_mnist.py
"""

### run model
def run(lambda_centerloss):

    init_gpus(
        log_device_placement=False,
        create_virtual_devices=True
    )

    # strategy = tf.distribute.MirroredStrategy(cross_device_ops=tf.distribute.ReductionToOneDevice())
    # strategy = tf.distribute.MirroredStrategy(cross_device_ops=tf.distribute.HierarchicalCopyAllReduce())
    # strategy = tf.distribute.MirroredStrategy(cross_device_ops=tf.distribute.NcclAllReduce())
    strategy = tf.distribute.MirroredStrategy()
    print('Number of devices: {}'.format(strategy.num_replicas_in_sync))

    ### get data
    (x_train, y_train), (x_test, y_test) = mnist.load_data()
    # normalize to 0..1
    x_train, x_test = x_train/255, x_test/255
    x_train = np.float32(x_train);
    x_test  = np.float32(x_test)

    y_train = np.int32(y_train)
    y_test = np.int32(y_test)

    # reshape to matrix
    x_train = x_train.reshape((-1, 28, 28, 1))
    x_test = x_test.reshape((-1, 28, 28, 1))

    ### compile
    main_input = Input((28, 28, 1))
    aux_input = Input((), dtype='int32')

    # Training using Multi-GPUs
    #
    # tf.compat.v1.scatter_sub does not support multi-gpus training
    # with strategy.scope():
    #
    # The following exception with be thrown.
    #
    # AttributeError: 'Tensor' object has no attribute '_lazy_read'

    # comment out the following line for the training to run successfully
    with strategy.scope():
        final_output, side_output = my_model(main_input, aux_input)
        model = Model(inputs=[main_input, aux_input], outputs=[final_output, side_output])
        model.compile(
            optimizer='adam',
            loss=[losses.sparse_categorical_crossentropy, center_loss],
            metrics=['accuracy'],
            loss_weights=[1, lambda_centerloss]
        )
        model.summary()

    ### create the log directory
    log_dir = '/tmp/logs/' + datetime.strftime(datetime.now(), '%Y%m%d-%H%M%S')
    build_empty_dir(log_dir)

    # Initialize the file_writer for logging summary
    # create the file_writer to save events for Tensorboard
    summary_log_dir = log_dir + '/train'
    file_writer = tf.summary.create_file_writer(summary_log_dir)
    file_writer.set_as_default()

    tb_callback = TensorBoard(log_dir=log_dir)

    # https://www.tensorflow.org/versions/r2.0/api_docs/python/tf/keras/callbacks/LearningRateScheduler
    lr_callback = tf.keras.callbacks.LearningRateScheduler(lr_schedule)

    ### fit
    dummy1 = np.zeros((x_train.shape[0], 1), dtype=int)
    dummy2 = np.zeros((x_test.shape [0], 1), dtype=int)

    #
    print('model.input[0].shape = ', model.input[0].shape)
    print('model.get_layer(\'side_out\').output.shape = ', model.get_layer('side_out').output.shape)
    #
    model.fit(
        [x_train, y_train],     # inputs =[main_input, aux_input]
        [y_train, dummy1 ],     # outputs=[final_output, side_output]
        batch_size=batch_size,
        epochs=epochs,
        verbose=1,
        validation_data=([x_test, y_test], [y_test, dummy2]),
        callbacks=[tb_callback, lr_callback]
    )
    # validation
    reduced_model = Model(inputs=model.input[0], outputs=model.get_layer('main_out').output)
    reduced_model.compile(
        loss='sparse_categorical_crossentropy',
        optimizer=tf.keras.optimizers.Adam(),
        metrics=['accuracy']
    )
    # evaluate
    eval_loss, eval_acc = reduced_model.evaluate(
        x=x_test,
        y=y_test,
        batch_size=batch_size
    )
    print('\nEval loss: {}, Eval Accuracy: {}'.format(eval_loss, eval_acc))
    ### run training and val sets
    reduced_model = Model(inputs=model.input[0], outputs=model.get_layer('side_out').output)

    feats = reduced_model.predict(x_train)

    ### done
    K.clear_session()
    return

###
if __name__ == '__main__':
    run(0.0001)

The script will run successfully without using the "with stragety.scopt():" with the following changes:
Change from:
    with strategy.scope():
        final_output, side_output = my_model(main_input, aux_input)
        model = Model(inputs=[main_input, aux_input], outputs=[final_output, side_output])
        model.compile(
            optimizer='adam',
            loss=[losses.sparse_categorical_crossentropy, center_loss],
            metrics=['accuracy'],
            loss_weights=[1, lambda_centerloss]
        )
        model.summary()

To:
    # with strategy.scope():
    final_output, side_output = my_model(main_input, aux_input)
    model = Model(inputs=[main_input, aux_input], outputs=[final_output, side_output])
    model.compile(
        optimizer='adam',
        loss=[losses.sparse_categorical_crossentropy, center_loss],
        metrics=['accuracy'],
        loss_weights=[1, lambda_centerloss]
    )
    model.summary()

I have reproduced the issue in Colab using TF-GPU 2.0.0-beta1.Thanks!

FYI The same issue is present in tensorflow 1.14 as well. It comes from the usage of scatter_sub in multi-gpu MirroredStrategy.
While you guys fix the issue is there a workaround for this that we can use ?
Thanks

Is there a chance to resolve this in final release of 1.15 ?

This issue is still there, and will not be fixed in 1.15 since that has already been cut. One person had started working on it, but the fix got delayed due to some other issues.
You can try 2 workarounds:

if the tensors you're trying to subtract are not too big, you can try to convert them to dense and just subtract regularly using assign_sub etc. This may have some performance implications
You can implement this yourself using merge_call/reduce/update, something like this (this is exactly how we are going to implement this within mirrored variable as well)

def dist_scatter_sub(v, *args, **kwargs):
  def merge_fn(strategy, value, *other_args, **other_kwargs):
          agg_val = strategy.extended.reduce_to(distribute.ReduceOp.SUM, value, v)
          fn = lambda var, *a, **kw: var.scatter_sub(*a, **kw)
          return strategy.extended.update(
              v, f, args=(agg_val,) + other_args, kwargs=other_kwargs)

  return tf.distribute.get_replica_context().merge_call(merge_fn, args=args, kwargs=kwargs)

dist_scatter_sub(v, delta)

This issue should have been fixed in tf 2.2. You can just call the "scatter_*" method on the variable. tf.compat.v1.scatter_sub wouldn't work though.


supervisor can't fetch child process logs (because it doesn't keep them)

If I visit the supervisor web interface and try to view a process' logs by clicking on its name, I get:
ERROR: unexpected rpc fault [30] FAILED

The tail links also don't seem to work. It would be cool to be able to use that web interface to actually view and monitor the log files, but that seems impossible today.
I've had a look at the supervisord config file used here.
https://github.com/lloesche/valheim-server-docker/blob/7e9ac2961b29c7c3ea4370a37050579b5e4cc884/supervisord.conf#L26
https://github.com/lloesche/valheim-server-docker/blob/7e9ac2961b29c7c3ea4370a37050579b5e4cc884/supervisord.conf#L28
I think the way the _logfile parameters are configured means the child process output is stolen from supervisor's management and dumped to the terminal. This means the web interface can't produce the logs on demand because supervisor doesn't have them on disk. If I look into, childlogdir (/var/log/supervisor) in the container, there are no child logs there.
A fix for this is to change all the _logfile parameters to AUTO (or just delete them since they default to that). But I guess you're redirecting the output to /dev/stdout//dev/stderr for some reason. One thing you could do is add loglevel=debug to the [supervisord] section to get the child processes to again print to the terminal maybe?

See the README.

The logs are written to stdout/stderr because this is a container. You want the logs on your host not fill up the container space.

I bet there's a way to do this without breaking supervisor's ability to fetch historical logs. If you'd like to keep the log files out of the container's file system, then why not tell supervisor to store its the child logs in a docker mapped folder?
By the way,
https://github.com/lloesche/valheim-server-docker/blob/7e9ac2961b29c7c3ea4370a37050579b5e4cc884/supervisord.conf#L5
logs to the container's file system right now.

I bet there's a way to do this without breaking supervisor's ability to fetch historical logs

Sure, I can think of several workarounds. You could capture STDOUT_FILENO/STDERR_FILENO of each process you're interested in in /proc/<pid>/fd/ and write to stdout. Or tee the processes outputs to log files, or let supervisor write the logs and have another service tail those logs back to stdout/stderr. The only clean way is to patch supervisord and add an option to write logs to multiple locations so they can be written to /dev/stdout as well as a seekable file on disk.
I think the easiest way to cover your use case would be to just volume mount /usr/local/etc/supervisord.conf with your modifications. Or I can add you a PRE_SUPERVISOR_HOOK that will allow you to modify the supervisor config any which way you like without breaking existing user's setups.

supervisord.log logs to the container's file system right now

That's why I wrote you don't want it to fill up the container space. The supervisor log only logs service startup/restart events. I.e. it grows by few log line per day so hardly qualifying as "filling up the container". While all the other logs are growing much more frequently depending on your server's activity.
On our server supervisor.log grows around 2kb/day and stdout/stderr go into an elastic cluster at 80-100 MB/day. ValheimPlus used to be the biggest offender here as it logged its entire config every time a player connects. They fixed that in the latest release.
You can of course limit supervisor to truncate those logs at certain sizes but then you're losing those old logs. So I guess the ideal situation would be if there was in-container logs of few MB but also written to stdout. Like I mentioned the best place to do this cleanly is to submit a supervisord patch that allows to write multiple output files.

While looking over the supervisor sources I found another possible option here:
https://github.com/Supervisor/supervisor/blob/9f030973ec283d3d392bb2614733ecfae2dc4dcb/supervisor/rpcinterface.py#L584
It seems you can redirect all output to syslog. Which we've already got running inside of our container. I'm just not sure if it'll then still honor the file options. If that was the case we could write stdout/stderr to syslog as well as the logfiles and have supervisor truncate the logs. Then you would have the logs in the supervisor web UI and nobody else's setup would break.

Ok, it's looking promising, let's reopen this issue.

@greyltc see if lloesche/valheim-server:dev fixes your use case.

I'll test it shortly! Thanks!

fyi its merged to main. There's also a couple of new syslog and log filter hook options.

Seems pretty great to me! Supervisor is pretty cool


eventJSONPath doesn't result in a rule match

Apply this rule:
{
  "action": "label",
  "eventJSONPath"<EMAIL_ADDRESS>=~ /^feat.*?/)].title",
  "labels": "enhancement",
}

The PR in question has a title of feat: Adding a rule engine to add labels to PRs which matches the JSONPath (or should).
However, no match.
Here's the debug output for this rule:
2020-11-25T02:03:24.1013244Z 2020-11-25T02:03:23.850Z use-herald-action:rules validation: {
2020-11-25T02:03:24.1013929Z   rule: {
2020-11-25T02:03:24.1014596Z     action: 'label',
2020-11-25T02:03:24.1015460Z     eventJSONPath<EMAIL_ADDRESS>=~ /^feat.*?/)].title',
2020-11-25T02:03:24.1016344Z     labels: 'enhancement'
2020-11-25T02:03:24.1016879Z   },
2020-11-25T02:03:24.1017384Z   hasActors: true,
2020-11-25T02:03:24.1018046Z   hasValidActionValues: true,
2020-11-25T02:03:24.1018722Z   matchers: false
2020-11-25T02:03:24.1019207Z }
2020-11-25T02:03:24.1027614Z 2020-11-25T02:03:23.851Z use-herald-action:index loaded rules and locations {
2020-11-25T02:03:24.1028372Z   rules: [],
2020-11-25T02:03:24.1029573Z   dir: '/home/runner/work/auto-release-poc/auto-release-poc',
2020-11-25T02:03:24.1030669Z   rulesLocation: '.github/herald_rule_*.json'
2020-11-25T02:03:24.1031299Z }
2020-11-25T02:03:24.1032192Z 2020-11-25T02:03:24.089Z use-herald-action:index matchingRules: []
2020-11-25T02:03:24.1033315Z 2020-11-25T02:03:24.089Z use-herald-action:index not a dry Run

I'm gonna test this rule and let you know. probably some oddity on the JSONPath internals.
have you tried removing the caret on the rule? /^feat.*?/ -> /feat.*?/ ?

In the underlying library, the =~ comparison doesn't work. but  it will work if you try $..[?(@.title.match(/^feat.*?/))].title instead.

No dice :(
2020-11-25T03:32:42.3965344Z 2020-11-25T03:32:42.392Z use-herald-action:rules validation: {
2020-11-25T03:32:42.3965915Z   rule: {
2020-11-25T03:32:42.3966460Z     action: 'label',
2020-11-25T03:32:42.3967220Z     eventJSONPath: '$..[?(@.title.match(/^feat.*?/))].title',
2020-11-25T03:32:42.3968014Z     labels: 'enhancement'
2020-11-25T03:32:42.3968423Z   },
2020-11-25T03:32:42.3968796Z   hasActors: true,
2020-11-25T03:32:42.3969389Z   hasValidActionValues: true,
2020-11-25T03:32:42.3969945Z   matchers: false
2020-11-25T03:32:42.3970338Z }
2020-11-25T03:32:42.3971522Z 2020-11-25T03:32:42.393Z use-herald-action:index loaded rules and locations {
2020-11-25T03:32:42.3972539Z   rules: [],
2020-11-25T03:32:42.3973436Z   dir: '/home/runner/work/auto-release-poc/auto-release-poc',
2020-11-25T03:32:42.3974399Z   rulesLocation: '.github/herald_rule_*.json'
2020-11-25T03:32:42.3974915Z }
2020-11-25T03:32:42.7018405Z 2020-11-25T03:32:42.701Z use-herald-action:index matchingRules: []
2020-11-25T03:32:42.7019485Z 2020-11-25T03:32:42.701Z use-herald-action:index not a dry Run

Rule tested:
{
  "action": "label",
  "eventJSONPath": "$..[?(@.title.match(/^feat.*?/))].title",
  "labels": "enhancement"
}

what I see odd here is that the process is telling us that the rule itself is not valid. so I don't think the problem is in the eventJSONPath.
2020-11-25T03:32:42.3969945Z   matchers: false keeps showing up. gonna do a bit more digging.

fun. the key should be eventJsonPath not eventJSONPath

2020-11-25T07:06:47.7118844Z 2020-11-25T07:06:47.170Z use-herald-action:rules validation: {
2020-11-25T07:06:47.7119606Z   rule: {
2020-11-25T07:06:47.7120316Z     action: 'label',
2020-11-25T07:06:47.7121372Z     eventJsonPath: '$..[?(@.title.match(/^feat.*?/))].title',
2020-11-25T07:06:47.7122257Z     labels: 'enhancement'
2020-11-25T07:06:47.7122833Z   },
2020-11-25T07:06:47.7123342Z   hasActors: true,
2020-11-25T07:06:47.7124021Z   hasValidActionValues: true,
2020-11-25T07:06:47.7124680Z   matchers: true
2020-11-25T07:06:47.7125194Z }
...
2020-11-25T07:06:47.7220711Z 2020-11-25T07:06:47.599Z use-herald-action:rules eventJsonPath [ '$..[?(@.title.match(/^feat.*?/))].title' ]
2020-11-25T07:06:47.7222044Z 2020-11-25T07:06:47.604Z use-herald-action:rules eventJSONPath matches: [ 'feat: Adding a rule engine to add labels to PRs' ]
2020-11-25T07:06:47.7223134Z 2020-11-25T07:06:47.604Z use-herald-action:rules isMatch: {
2020-11-25T07:06:47.7223695Z   rule: {
2020-11-25T07:06:47.7224407Z     name: 'herald_rule_label_pr_enhancement.json',
2020-11-25T07:06:47.7225114Z     action: 'label',
2020-11-25T07:06:47.7225894Z     eventJsonPath: [ '$..[?(@.title.match(/^feat.*?/))].title' ],
2020-11-25T07:06:47.7226649Z     labels: 'enhancement',
2020-11-25T07:06:47.7227137Z     users: [],
2020-11-25T07:06:47.7227541Z     teams: [],
2020-11-25T07:06:47.7227973Z     includes: [],
2020-11-25T07:06:47.7228414Z     excludes: [],
2020-11-25T07:06:47.7228907Z     includesInPatch: [],
2020-11-25T07:06:47.7230030Z     path: '/home/runner/work/auto-release-poc/auto-release-poc/.github/herald_rule_label_pr_enhancement.json'
2020-11-25T07:06:47.7230841Z   },
2020-11-25T07:06:47.7231277Z   matches: [ true ]
2020-11-25T07:06:47.7231682Z }
...
2020-11-25T07:06:47.7242837Z 2020-11-25T07:06:47.605Z use-herald-action:index groupNames [ 'label' ]
2020-11-25T07:06:47.7243787Z 2020-11-25T07:06:47.605Z use-herald-action:labels called with: [
2020-11-25T07:06:47.7244332Z   {
2020-11-25T07:06:47.7245104Z     name: 'herald_rule_label_pr_enhancement.json',
2020-11-25T07:06:47.7245829Z     action: 'label',
2020-11-25T07:06:47.7246770Z     eventJsonPath: [ '$..[?(@.title.match(/^feat.*?/))].title' ],
2020-11-25T07:06:47.7247706Z     labels: 'enhancement',
2020-11-25T07:06:47.7248176Z     users: [],
2020-11-25T07:06:47.7248585Z     teams: [],
2020-11-25T07:06:47.7249017Z     includes: [],
2020-11-25T07:06:47.7249656Z     excludes: [],
2020-11-25T07:06:47.7250200Z     includesInPatch: [],
2020-11-25T07:06:47.7251400Z     path: '/home/runner/work/auto-release-poc/auto-release-poc/.github/herald_rule_label_pr_enhancement.json',
2020-11-25T07:06:47.7252334Z     matched: true
2020-11-25T07:06:47.7252769Z   }
2020-11-25T07:06:47.7253161Z ]
2020-11-25T07:06:47.7254020Z 2020-11-25T07:06:47.605Z use-herald-action:labels labels [ 'enhancement' ]
2020-11-25T07:06:47.7255138Z 2020-11-25T07:06:47.605Z use-herald-action:labels result: Promise { <pending> }

I confirm the same!!!  Thanks much for your help!


[3.2] Added a note to ImmediateGeometry regarding it's buffer limit

Fixes #23444.
Same as #43203 but for 3.2.
Made PR directly to 3.2 branch since its not implemented in master yet.

Thanks!


Use swagger2 for data model

Closes #8.
This PR is incomplete, please do not merge yet.

K
Sent from my iPhone

On Dec 22, 2015, at 1:10 PM, Nickolay Kudasov<EMAIL_ADDRESS>wrote:
Closes #8.
This PR is incomplete, please do not merge yet.
You can view, comment on, or merge this pull request online at:
https://github.com/dmjio/servant-swagger/pull/9
Commit Summary
Add some commonly ignored files to .gitignore
Clear everything and add HasSwagger with instances for Post
Add HasSwagger instances for :<|> and :>
Add HasSwagger instance for Capture
Add HasSwagger instance for QueryParam
Add HasSwagger instance for QueryParams
Add HasSwagger instance for QueryFlag
Add HasSwagger instances for matrix params and flags
Add HasSwagger instance for Header
Add HasSwagger instance for ReqBody
Fix trailing slashes
Fix HasSwagger Raw instance
Allow HList in Headers as servant does
Add HasSwagger instance for Get
Add test suite with Todo API example
Add HasSwagger instances for the rest of servant methods
File Changes
M .gitignore (17)
M servant-swagger.cabal (40)
M src/Servant/Swagger.hs (108)
M src/Servant/Swagger/Internal.hs (1245)
A test/Servant/SwaggerSpec.hs (100)
A test/Spec.hs (1)
Patch Links:
https://github.com/dmjio/servant-swagger/pull/9.patch
https://github.com/dmjio/servant-swagger/pull/9.diff
—
Reply to this email directly or view it on GitHub.

Things to do before merge:

handle formData (probably with an instance for ReqBody '[FormUrlEncoded] a :> sub);
add/reuse ToSample for schema examples;
add helpers to annotate API with tags;
add helpers to add/remove responses;
add tons of tests/examples.

Okay, I think schema examples and form data should be addressed in swagger2 first (see GetShopTV/swagger2#30 and GetShopTV/swagger2#31).
For tags/responses and other sub API / endpoint manipulation subOperations should do the job (see Hackage API example).
I am going to write some more examples/tests now.


Issues with ; in requirements.txt

https://github.com/AcademySoftwareFoundation/OpenCue/blob/master/requirements.txt

https://gitter.im/getavalon/Lobby?at=5d08868c8e050f62aa3ef1ef

Fixed with #21


Onnx runtime in arm64 docker image

Describe the bug
When working with the arm64 image, I am having problems when trying to use onxxruntime to infer embeddings. In the screenshot section I show the error. This bug is originated in the onxxruntime library but it has been recently fixed in https://github.com/microsoft/onnxruntime/pull/12335
To Reproduce
Steps to reproduce the behavior:

Use BertBaseEmbedder in an arm64 environment

Expected behavior
It should load the onnxruntime correctly.
Screenshots

Environment:

OS: macOS M1
Infrastructure: self-hosted
Version: 12.5

Vespa version
I am using the version 8.31.22
Additional context
Add any other context about the problem here.

Thanks! https://github.com/vespa-engine/vespa/pull/23674
This will be available in 8.36, available Thursday if all goes normally.

@bratseth I have tried the new version of the docker image and I encountered the same error. I have been checking the directories and in /opt/vespa-deps/lib64 are located the onnxruntime libraries. I have copied those ones to /opt/vespa/lib64 and everything is working again!
I think the directory /opt/vespa-deps/lib64 should also be added to java.library.path

This didn't fully make it into 8.36 after all, you'll need 8.38. Sorry for the delay.


Jupyter notebook cell code folding and output view expanding request

Feature: Notebook Editor, Interactive Window, Python Editor cells

Description
This feature request is similar to microsoft/vscode-python#10503. I hope vscode jupyter notebook may allow the code cell to be folded as in .py code editor in VScode, and fold the output panel as in Jupyterlab (this is done when a user clicks left margin of the cell). It would be great if it adds an option to show code line number within the cell, but maybe it is not crucial.

On the other hand, output panel is forced to be viewed through scrolling if it is too big. I hoping that there's an option (possibly by right-click) to expand the output so that users can view the whole output handy.

Also a minor fix:
Please replace file icon on the tab to Jupyter icon.
(Edit : I'm currently using vscode-icons package from vscode teams. The icon disappears when it renders .ipynb)

Microsoft Data Science for VS Code Engineering Team: @rchiodo, @IanMatthewHuff, @DavidKutu, @DonJayamanne, @greazer

That page says nothing about code folding. How do I use it?

@peter-ch in the new notebook interface there are commands and keybindings to collapse both the input and output sections of any cells. Is that what you are looking for? Example of a collapsed code section (with expand icon) shown below.

I'm looking for the functionality to collapse code blocks. I can see on this page that it is present https://devblogs.microsoft.com/python/notebooks-are-getting-revamped/
but when I open a notebook I don't see those little buttons to collapse anything, they're just not there. Is there an option to turn this on? Do I use the "old" notebook interface for some reason and how do I turn the new on? Thanks.

@peter-ch If you are using VS Code - Insiders you should get the now notebook interface by default. In that interface I don't believe that there are actually buttons to do the collapse. There is instead a keybinding and a vscode command to collapse them. The button to expand back out only shows up after collapsing them.

Yes, thanks, I just realized I wasn't using the insiders build. It works.

Is there any info on when the new notebook interface will be pushed to the main VS Code build?

Is there any info on when the new notebook interface will be pushed to the main VS Code build?

This is amazing! Thanks for making JupyterNotebook cell and their input/output Collapseable.

Hi, when is this being added to VS Code?

This is awesome. When is it being added to the main build? The shortcut Ctrl-K Ctrl-C doesn't seem to work however.

This is awesome. When is it being added to the main build? The shortcut Ctrl-K Ctrl-C doesn't seem to work however.
Also, it would be great if there were a 'expand/collapse all cells' option up the top to keep things neat and tidy.

This is awesome. When is it being added to the main build?
It would be great if there were a 'expand/collapse all cells' option up the top to keep things neat and tidy.

We're working hard on that right now!
Unfortunately we don't have an exact date. I'll add that we are keeping up with this API. When that releases on stable, we'll follow suit as soon as possible.


Inconsistance tensor shape led to code can't execute properly

Issue type
Bug
Have you reproduced the bug with TensorFlow Nightly?
Yes
Source
binary
TensorFlow version
2.10.0
Custom code
No
OS platform and distribution
No response
Mobile device
No response
Python version
3.10.9
Bazel version
No response
GCC/compiler version
No response
CUDA/cuDNN version
No response
GPU model and memory
No response
Current behavior?
The code led to inconsistance tensor shape addition and can't run properly ,please help
Standalone code to reproduce the issue
code in jupyter notebook
file:///G:/Google%20Download/AMD%20bigram.html

Relevant log output
ValueError                                Traceback (most recent call last)
Cell In[171], line 138
    134     model_on_device = model
    137 context = tf.zeros(shape = (1,1) , dtype = tf.int64 )
--> 138 generated_chars = decode(model.generate(context , max_new_tokens=500)[0].numpy().tolist())
    139 print(generated_chars)

Cell In[171], line 121, in BigramLanguageModel.generate(self, index, max_new_tokens)
    118 def generate(self ,index ,max_new_tokens):
    120     for _ in range(max_new_tokens):
--> 121         logits , loss  = self.call(index)
    123         logits = logits[ : , -1 , : ]
    125         probs = tf.nn.softmax(logits , axis=-1)

Cell In[171], line 103, in BigramLanguageModel.call(self, index, targets)
    101 pos_emb = self.position_embedding_table(tf.range(T , dtype=tf.float32))
    102 x = tok_emb + pos_emb
--> 103 x = self.blocks(x) #decoder cycle
    104 x = self.ln_f(x) #normalize
    105 logits = self.lm_head(x) #linear transform

File E:\AMD venv for gpt\tensorflow\lib\site-packages\keras\utils\traceback_utils.py:70, in filter_traceback.<locals>.error_handler(*args, **kwargs)
     67     filtered_tb = _process_traceback_frames(e.__traceback__)
     68     # To get the full stack trace, call:
     69     # `tf.debugging.disable_traceback_filtering()`
---> 70     raise e.with_traceback(filtered_tb) from None
     71 finally:
     72     del filtered_tb

Cell In[171], line 70, in Block.call(self, x, training)
     68 y = self.sa(x)
     69 x = self.ln1(x + y)
---> 70 y = self.ffwd(x)
     71 x = self.ln2(x + y)
     72 return x

Cell In[171], line 55, in FeedForward.call(self, x)
     53 def call(self , x):
     54     ffwd_output = self.net(x)
---> 55     return self.net(ffwd_output)

ValueError: Exception encountered when calling layer "sequential_449" "                 f"(type Sequential).

Input 0 of layer "dense_5747" is incompatible with the layer: expected axis -1 of input shape to have value 2688, but received input with shape (1, 1536)

Call arguments received by layer "sequential_449" "                 f"(type Sequential):
  • inputs=tf.Tensor(shape=(1, 1536), dtype=float32)
  • training=True
  • mask=None

Hi @xsmilingtoast ,
Could you provide a proper link. You already provide one link but it is not opening. In order to expedite the trouble-shooting process, please provide a code snippet to reproduce the issue reported here.
And here you are using the old version, Try to update your version.
Thank you!


added effect in OUR SERVICES section

Description
added a tilting hover effect in OUR SERVICES section.
Reviewers
@tech-bash

ok.

Thanks! @yatigautam for this, hope you make more progress in this project.

Thanks! @yatigautam for this, hope you make more progress in this project.

thankyou, ofcourse.

add levels on this PR @tech-bash


Dwarf Haste is broken, and here's how to fix it

Describe the bug
Crash upon using haste on some blocks. Why? You're comparing a block against an item tag. Therefore minecraft crashes upon trying to load the tag as a block tag.
To Reproduce
Try break something like deepslate cobblestone
Expected behavior
It not to crash lol
Additional context
You can probably fix this by not using minecraft:stone_tool_materials in your apply_haste block condition
Edit: A fix for this issue is in PR #10 (the 1.17 update pr by will bl), so if you merge that you can close this issue too :)

Hopefully my time debugging this issue can help it be resolved in the mod as quickly as possible. Really great mod btw, :)

Just tested in a fork. It works.

#10 now has a couple commits that will fix this issue

Nice! Thanks for the fix.


Filter sensors&Switch

Please add filter (occupancy) sensors and filter reset switch 😉

Related to https://github.com/homebridge-xiaomi-roborock-vacuum/homebridge-xiaomi-roborock-vacuum/issues/111

Also related to #145
The sensors are already in place. But HomeKit simply hides the filters statuses and it understands Fans (the type of device we use to report this device) do not require filters.
They can be handled in the Eve app.
Additionally, I understand many of the features requested for automation purposes and, maybe, some useful Siri commands. However, sometimes I feel like we are simply trying to replicate all the features in the Xiaomi app to the Home app just for the sake of it... 🤔
Maybe it's me, that I'm missing the point and need further understanding of the use case. But these robots' APIs are highly undocumented. They require lots of testing and hacking around and the spare time I personally can pay to this module is fairly limited.
I try to quickly jump on fixing bugs and answering to Pull Requests and Issues. I don't want to be a blocker for anyone's ideas nor keep them waiting. But the more features we provide, the more likely we'll have bugs or opened issues to support them for other models or simply asking how these features work. That adds a lot of overhead to keeping a clean list of issues.
I, personally, use the homebridge-automation-switches plugin to automate any switches/sensors I may need based on other plugins values (i.e.: I only want the robot to clean once a day when I leave, so I set a switch when it starts cleaning and reset it every morning. Then check the state of that switch whenever I leave to trigger the full house cleaning or not).
That said, I'll leave this request open should anyone else wants to implement it.

@afharo You can use the global variables plugin, and not clog HomeKit with unnecessary devices:
Global Variable for HomeKit
I want to present you an easy plug-in for Homebridge, which will allow you to store and exchange data in JSON format between automation and other systems:
Install
sudo npm i -g homebridge-netrunner-http-db --unsafe-perm
This plugin will allow you to write complex logic for your automation, exchange data between automation, enable or disable other automation, as well as use the recorded data in other systems.
To add a new variable or overwrite an existing one, use a POST request from the Shortcuts component set - http://ip:15015/variablename
Data can also be sent as an attached file in dictionary format.
To update or add a key in a variable, use a request of type PUT
To get a variable, use a query like GET
Data is stored in JSON format (dictionary). The number of keys in a variable is unlimited.
To get a list of variables, use a GET request without specifying a variable name - http://ip:15015/
I also wrote a convenient editor for already created variables (please use it only for existing variables).
Be sure to change the URL to yours at the beginning of the command!
Have a good use!

As for filters, but now there is an opportunity to see the status, but there is no way to check it every time I start, for example, to notify me via telegram or push

Thank you for the plugin suggestion. I'll check it out.
Re the filters, the Xiaomi app already notifies you out of the box when any of the filter, brushes, sensors and even the dust bin needs any attention. That's why I can't see the need to add more switches and services to this plugin (that we have to maintain and also increases the number of switches in the Home app).
But, if you still want to react to any of those values, you can set any triggers and automation via the Eve app (no need for the Shortcuts app at this point). Also, please, check the version 0.10.0 which adds a unified Filter status, merging all filter + main and side brush + sensors statuses into one as explained in #203
Nevertheless, feel free to create a pull request adding that feature and I'll be happy to merge it.

Plugins mentioned here could go to https://github.com/homebridge-xiaomi-roborock-vacuum/homebridge-xiaomi-roborock-vacuum/issues/202 as well!

@afharo I understand how you would not want to add the filter, brushes and sensors as extra accessories, but is there a chance to have them 'alarm' as statuses on the accessories? For example how a temperature sensor has the status for a battery level (sorry if I am not using the right terminology) and it will put an alert or alarm condition on the accessory to say something is wrong with it. Can we not do that for these? Personally I turn off all notifications from the Xiaomi app as I do not want it to tell me every time it starts or finishing vacuuming, the only notifications I want are these ones for the maintenance. I find now I am always behind on maintaining my robot as I turned off the notifications...

They already exist registered as Filters.
HomeKit doesn't allow you to add more than 1 filter per accessory.
So there's a general one, showing the worse value assigned to the fan accessory:

And one individual one for each indicator.
The problems are:

HomeKit doesn't expect filters to be attached to fan accessories (that's why you may have noticed a few HAP Warning... Adding Anyway entries in the logs). So it doesn't allow you to build any automation via the Home/Shortcuts app.
The Home app doesn't show the additional Filter accessories.

You can use the Eve app to access those non-official indicators. You can set automations in that app and they'll work in the Home app. Personally, when I started in this, I was surprised how powerful the Homekit automations can be, but also how limited the Home app's UI is to set them. The Eve app is the solution for these issues 😉
More info: https://github.com/homebridge-xiaomi-roborock-vacuum/homebridge-xiaomi-roborock-vacuum/issues/145

Also, known missing piece re the Filters: https://github.com/homebridge-xiaomi-roborock-vacuum/homebridge-xiaomi-roborock-vacuum/issues/211

@afharo thanks for the info. I have avoided Eve for a long time as I have tried to keep all of the apps all my devices use to a minimum and would prefer Homekit to be the one place everything is controlled (at the cost of better automations by the looks haha). Maybe this screenshot better describes what I mean (except in the is particular case they have an issue where the battery fault appears whilst the battery level is not low; ignore that aspect). This shows that a warning ! or a status 'Battery Low' can be displayed based for these characteristics (filter, battery, etc) on the accessory; that is what I am asking if it is possible so that the accessory shows me that something needs attention.

I only have a quick skim read for now, but it looks like that is being touched on by netRunner0 in issue 145, where they point out these characteristics. But I am not sure if these ones have something like 'Status Fault' or not.

@mitch7391 I understand what you are saying.
But the reason it is shown in the screenshot you shared is that HomeKit officially supports the battery status in TemperatureSensors: in this piece of code, maintained in the library HAP-NodeJS by generating it from the Homekit specifications, you can see TemperatureSensor has the optional characteristic StatusLowBattery.
The Fan service though doesn't accept it. We report it anyway and (luckily) it is shown in the Home app. However, the Home app doesn't show it for notifications or automation rules.
You can use the Eve app to build any automation rules you may want and then uninstall it. You don't need it installed in order for them to work. You only need it because it has a more flexible UI to build automation rules and to see all the characteristics, both: officially supported and non-officially ones.

Ahh yep that makes more sense and a shame the fan service doesn’t cater for this; hopefully Apple will just give us a real robot vacuum accessory soon! Also I didn’t know you could do that with Eve, I’m going to have a look into it :)

hopefully Apple will just give us a real robot vacuum accessory soon!

Can't wait for that to happen!

Anyone still working on this? Now that the go-to-button works, I desperately want to know wether the dust bin is actually full... Right now I am sending my vacuum to the kitchen when I come home on Wednesdays 😜
@afharo I'd like to contribute, but my knowledge around TS is practically zero...

@luc-ass FWIW, all the maintenance indicators are reported to Homekit. And they show up in applications that are more pro than Apple's Home app. The reason is that Homekit doesn't consider a Fan should have any of those Filter indicators (which sort of makes sense), so the Home app simply ignores them.
My app of choice for low-level automations is Controller for Homekit. I used to like the Eve app, but they changed it and started hiding many non-officially-supported attributes (Services & Characteristics), and it lost most of the low-level access.
Here are some screenshots of the existing maintenance indicators showing up in that app:
Overall status:
Shows the worst state of the maintenance indicators (if any of them needs attention, this will show Needed and 0%):

This one shows up in the Home app, but it doesn't allow you to use it in automations because Apple being Apple:

Individual maintenance indicators:

You may notice the Main brush is 38%, so it should show up in the overall status. This is fixed and will be available in the next version.
Another reason for using 3rd-party tools for detailed automations is they are more accurate. For example, look at the Firmware version in the Home app vs. the Controller app. It is a standard and officially supported field, but apparently, Apple Home thinks the Firmware cannot change over time, so it doesn't react to updates in that field 🤦

One thing you may argue is that we don't have a switch to reset any of these maintenance indicators. PRs are welcomed if you think they'd be useful: my take on this one is that you should need to replace the brush once a year, so I'd rather have the reset button as an advanced setting in the Xiaomi app than a switch in Home that anyone (including my 2 y/o kid) can hit and reset without notifying anyone.

@luc-ass re your use case, I believe you are looking at the dust bin status, correct? I'm not sure there is a level for that, but instead, we'd need to react to an error code. IMO, we could react to the relevant code error and trigger an occupancy sensor to indicate it needs the dust bin to be emptied. You could then set an automation that reacts to that occupancy sensor and send the robot to your kitchen.
That'd be a dream unless it happens halfway through a cleaning session because it'd cancel the cleaning to go to your kitchen (and potentially run out of battery while waiting for you there until you come back home). If it's only used for notification purposes on your phone, I'd say the Xiaomi app already notifies about any errors, so it feels like overdoing at this stage.
What do you think?

You are right about the problem of canceling the cleaning process. My automation would be along the lines of:
Trigger:   First person comes home / me coming home
Condition: If Dust bin full (could be a switch, could be a sensor)
Execution: Turn "Go to the bin" on

An occupancy sensor would need to be reset somehow, no idea on how to implement that. A simple switch could be turned off by hand or some automation. It wouldn't interfere with anything else.
Man, it's really time Apple/Matter implement a Vacuum type 😆

BTW: For now I made an "Apple Shortcut" that executes when I come home and sends the vacuum to the kitchen when I arrive at home on Wednesdays. Not pretty but works:

By choosing a custom Date format as EEEE you can compare it to the full day name.

It should be solved in https://github.com/homebridge-xiaomi-roborock-vacuum/homebridge-xiaomi-roborock-vacuum/releases/tag/v0.26.0


[ggj][infra][3/5] feat: implement update golden bazel rules for dummy test

Find more details in design doc: go/java-micro-file-diff-infra

Added rules_bazel/java_diff_test.bzl where update_golden bazel rule is defined, including two parts: running JUnit test and overwritting goldens.
Added SingleJUnitTestRunner which helps us to manually trigger the JUnit test, it takes test_class_name as arg and emits test result if any failure is detected.
Added Utils.java in test/framework which helps to save the generated code from JUnit test to tmp file in folder $TEST_OUTPUT_HOME. System environment is set to interact with update golden bazel rules, the folder will get deleted once the bazel rules finish.
update_golden rule is called from BUILD.bazel in dummy test, and junit_runner_binary is defined for running the JUnit test when updating goldens.

How we use it (check out this branch and modify the dummy/goldens/*.golden)
> bazel test //...
Tests have failures: [classWithHeader(com.google.api.generator.gapic.dummy.FileDiffInfraDummyTest): Differences found:
--- golden
+++ codegen
@@ -17,3 +17,3 @@
 package com.google.showcase.v1beta1.stub;

-public class  {}
+public class EchoStubSettings {}]
//src/test/java/com/google/api/generator/gapic/dummy:FileDiffInfraDummyTest FAILED in 5.6s
  /private/var/tmp/_bazel_xiaozhenliu/27d546162d4fdfcb8b9c40b4c5bf4971/execroot/com_google_api_codegen/bazel-out/darwin-fastbuild/testlogs/src/test/java/com/google/api/generator/gapic/dummy/FileDiffInfraDummyTest/test.log

> bazel run //src/test/java/com/google/api/generator/gapic/dummy:FileDiffInfraDummyTest_update
> bazel test //...
.....
Executed 53 out of 66 tests: 66 tests pass.

Next step would be:

Move the existing expected class string to file-diff infra, including
(a)gapic/composer/*Test.
(b)engine/astIntegrationTest
Update developer doc to include this instruction for updating goldens.

From a clean client, I tried running this update command, and got the error below, plus lots of warnings. Seems that this isn't working and requires each incremental target to be built first, whereas it should all just work with bazel run. I'll fix these issues too.
bazel run //src/test/java/com/google/api/generator/gapic/dummy:FileDiffInfraDummyTest_update

Target //src/test/java/com/google/api/generator/gapic/dummy:FileDiffInfraDummyTest_update up-to-date:
  bazel-bin/src/test/java/com/google/api/generator/gapic/dummy/FileDiffInfraDummyTest_update.sh
INFO: Elapsed time: 8.211s, Critical Path: 0.06s
INFO: 0 processes.
INFO: Build completed successfully, 4 total actions
INFO: Build completed successfully, 4 total actions
unzip:  cannot find or open bazel-out/k8-fastbuild/bin/src/test/java/com/google/api/generator/gapic/dummy/FileDiffInfraDummyTest_update_output.zip, bazel-out/k8-fastbuild/bin/src/test/java/com/google/api/generator/gapic/dummy/FileDiffInfraDummyTest_update_output.zip.zip or bazel-out/k8-fastbuild/bin/src/test/java/com/google/api/generator/gapic/dummy/FileDiffInfraDummyTest_update_output.zip.ZIP.

Another one I found: In a clean client, I get this error, even though it updates fine:
Error occurs when reading golden file

Fixed all of these in #363.

This implementation was based on the prerequisites of users running bazel test  or bazel build  first before updating any goldens files. The usage was described in the description, but it does not support directly bazel run testTarget_update for updating goldens before any test run.
Error occurs when reading golden file only happens when not finding/reading the goldens files, I did not have chance to repro that error, but thanks for the refactor to allow the direct usage of update_goldens.


Multiple Elixir failing tests intermittently

After applying the fix for #1730, two Elixir tests are still failing in Windows.
Expected Behavior
make elixir should pass
Current Behavior
First failing test:
SecurityValidationTest
  * test Non-admin user cannot save a ddoc (140.0ms)
  * test Jerry can save a document normally (234.0ms)
  * test Force basic login (31.0ms)
  * test _session API (0.00ms)
  * test Ddoc writes with admin and replication contexts (235.0ms)
  * test Saving document using the wrong credentials (0.00ms)
  * test Author presence and user security (219.0ms)

  1) test Author presence and user security (SecurityValidationTest)
     test/security_validation_test.exs:136
     Assertion with == failed
     code:  assert resp.status_code() == 403
     left:  201
     right: 403
     stacktrace:
       test/security_validation_test.exs:147: (test)

Second failing test:
RevisionTest
  * test multiple updates with same _rev raise conflict errors (140.0ms)

  2) test multiple updates with same _rev raise conflict errors (RevisionTest)
     test/conflicts_test.exs:20
     Assertion with == failed
     code:  assert resp.status_code() == 409
     left:  202
     right: 409
     stacktrace:
       test/conflicts_test.exs:91: RevisionTest.assert_conflict/1
       test/conflicts_test.exs:25: (test)

Oddly, the test mentioned in https://github.com/apache/couchdb/pull/1726#issuecomment-437644518 isn't failing on Windows.
Steps to Reproduce (for bugs)
make elixir on a Windows box.
Context
Trying to get the test suite in shape for a 2.3.0 release.
/cc @jaydoane

On a subsequent run, a different test fails:
BulkDocsTest
  * test bulk docs supplies `id` if not provided in doc (125.0ms)
  * test bulk docs can create, update, & delete many docs per request (296.0ms)
  * test bulk docs raises error for invlaid `new_edits` parameter (141.0ms)
  * test bulk docs raises error for invlaid `docs` parameter (235.0ms)
  * test bulk docs raises error for missing `docs` parameter (140.0ms)
  * test bulk docs raises error for `all_or_nothing` option (266.0ms)
  * test bulk docs can detect conflicts (235.0ms)

  1) test bulk docs can detect conflicts (BulkDocsTest)
     test/bulk_docs_test.exs:45
     Expected 201 and the same number of response rows as in request, but got
     %HTTPotion.Response{
       body: [
         %{
           "accepted" => true,
           "id" => "1",
           "ok" => true,
           "rev" => "2-59422af42db146a6a87b76e5edbeeb44"
         },
         %{
           "id" => "2",
           "ok" => true,
           "rev" => "2-0450643c5eb507fee080a4298e102c9a"
         },
         %{
           "id" => "3",
           "ok" => true,
           "rev" => "2-7c9bd31172bbb3d4097fa45e3a6e2c85"
         },
         %{
           "id" => "4",
           "ok" => true,
           "rev" => "2-2fd866cc031a23ac8ccccb49952a2666"
         },
         %{
           "id" => "5",
           "ok" => true,
           "rev" => "2-3af34b0749ed8322340556d497581836"
         }
       ],
       headers: %HTTPotion.Headers{
         hdrs: %{
           "cache-control" => "must-revalidate",
           "content-length" => "338",
           "content-type" => "application/json",
           "date" => "Tue, 13 Nov 2018 17:49:03 GMT",
           "server" => "CouchDB/2.2.0-878866c1e (Erlang OTP/19)",
           "x-couch-request-id" => "b0a6f69516",
           "x-couchdb-body-time" => "0"
         }
       },
       status_code: 202
     }

     code: resp = bulk_post(docs, db)
     stacktrace:
       test/bulk_docs_test.exs:134: BulkDocsTest.bulk_post/2
       test/bulk_docs_test.exs:57: (test)

One more:
  * test multiple updates with same _rev raise conflict errors (187.0ms)

  1) test multiple updates with same _rev raise conflict errors (RevisionTest)
     test/conflicts_test.exs:20
     Assertion with == failed
     code:  assert resp.status_code() == 409
     left:  202
     right: 409
     stacktrace:
       test/conflicts_test.exs:91: RevisionTest.assert_conflict/1
       test/conflicts_test.exs:25: (test)

Starting to feel like the tests have some race conditions.

Unfortunately, I've also noticed numerous elixir tests failing intermittently on macos and linux as well. I think that in general, directly porting JS tests can expose or exacerbate latent races. One way I've been dealing with them is to wrap the success condition in the retry_until function.

From #1894:

Unfortunately we've got a lot of failures in Jenkins.
Ignoring the eunit failures, we have 2 types of Elixir failures:
One type is on the partition tests:
https://builds.apache.org/blue/organizations/jenkins/CouchDB/detail/jenkins-fix/1/pipeline/45#step-125-log-2576
https://builds.apache.org/blue/organizations/jenkins/CouchDB/detail/jenkins-fix/1/pipeline/46#step-123-log-2600
The other is the general test suite:
https://builds.apache.org/blue/organizations/jenkins/CouchDB/detail/jenkins-fix/1/pipeline/48#step-129-log-2659

@garrensmith I'm moving this issue over here off of the PR because I'm going to merge the PR. Thanks for your help when you have time.

Great. I’ll dive into it next week.

From: Joan Touzet<EMAIL_ADDRESS>Sent: Friday, February 1, 2019 6:54 PM
To: apache/couchdb
Cc: garren smith; Mention
Subject: Re: [apache/couchdb] Multiple Elixir failing tests intermittently (#1735)
From #1894https://github.com/apache/couchdb/pull/1894:
Unfortunately we've got a lot of failures in Jenkins.
Ignoring the eunit failures, we have 2 types of Elixir failures:
One type is on the partition tests:
https://builds.apache.org/blue/organizations/jenkins/CouchDB/detail/jenkins-fix/1/pipeline/45#step-125-log-2576
https://builds.apache.org/blue/organizations/jenkins/CouchDB/detail/jenkins-fix/1/pipeline/46#step-123-log-2600
The other is the general test suite:
https://builds.apache.org/blue/organizations/jenkins/CouchDB/detail/jenkins-fix/1/pipeline/48#step-129-log-2659
@garrensmithhttps://github.com/garrensmith I'm moving this issue over here off of the PR because I'm going to merge the PR. Thanks for your help when you have time.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/apache/couchdb/issues/1735#issuecomment-459789925, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AAK9AlsrxCxJrw554b8NCPcbxq7YcogOks5vJHFKgaJpZM4YcLPR.

More failures:
https://travis-ci.org/apache/couchdb/jobs/487532123
PartitionDDocTest
  * test PUT /dbname/_design/foo to update (113.0ms)
  * test DELETE /dbname/_design/foo (128.7ms)
  * test GET /dbname/_design_docs (71.8ms)
  1) test GET /dbname/_design_docs (PartitionDDocTest)
     test/partition_ddoc_test.exs:159
     Assertion with == failed
     code:  assert length(body["rows"]) == 1
     left:  0
     right: 1
     stacktrace:
       test/partition_ddoc_test.exs:168: (test)

https://travis-ci.org/apache/couchdb/jobs/487532122
DelayedCommitsTest
  * test delayed commit (15193.5ms)
  1) test delayed commit (DelayedCommitsTest)
     test/delayed_commits_test.exs:16
     Assertion with == failed
     code:  assert resp.status_code() == 200
     left:  500
     right: 200
     stacktrace:
       (elixir) lib/enum.ex:737: Enum."-each/2-lists^foreach/1-0-"/2
       (elixir) lib/enum.ex:737: Enum.each/2
       (ex_unit) lib/ex_unit/on_exit_handler.ex:140: ExUnit.OnExitHandler.exec_callback/1
       (ex_unit) lib/ex_unit/on_exit_handler.ex:126: ExUnit.OnExitHandler.on_exit_runner_loop/0

https://travis-ci.org/apache/couchdb/jobs/487532121
BulkDocsTest
  * test bulk docs supplies `id` if not provided in doc (497.0ms)
  * test bulk docs raises error for invlaid `new_edits` parameter (334.6ms)
  * test bulk docs raises error for invlaid `docs` parameter (238.1ms)
  * test bulk docs can create, update, & delete many docs per request (396.6ms)
  * test bulk docs emits conflict error for duplicate doc `_id`s (384.0ms)
  * test bulk docs raises conflict error for combined update & delete (471.8ms)
  * test bulk docs can detect conflicts (515.8ms)
  1) test bulk docs can detect conflicts (BulkDocsTest)
     test/bulk_docs_test.exs:47
     Expected 201 and the same number of response rows as in request, but got
     %HTTPotion.Response{
       body: [
         %{
           "accepted" => true,
           "id" => "1",
           "ok" => true,
           "rev" => "2-59422af42db146a6a87b76e5edbeeb44"
         },
         %{
           "id" => "2",
           "ok" => true,
           "rev" => "2-0450643c5eb507fee080a4298e102c9a"
         },
         %{
           "id" => "3",
           "ok" => true,
           "rev" => "2-7c9bd31172bbb3d4097fa45e3a6e2c85"
         },
         %{
           "id" => "4",
           "ok" => true,
           "rev" => "2-2fd866cc031a23ac8ccccb49952a2666"
         },
         %{
           "id" => "5",
           "ok" => true,
           "rev" => "2-3af34b0749ed8322340556d497581836"
         }
       ],
       headers: %HTTPotion.Headers{
         hdrs: %{
           "cache-control" => "must-revalidate",
           "content-length" => "338",
           "content-type" => "application/json",
           "date" => "Fri, 01 Feb 2019 17:40:04 GMT",
           "server" => "CouchDB/2.3.0-0843bd1 (Erlang OTP/21)",
           "x-couch-request-id" => "e75bb02703",
           "x-couchdb-body-time" => "0"
         }
       },
       status_code: 202
     }

     code: resp = bulk_post(docs, db)
     stacktrace:
       test/bulk_docs_test.exs:131: BulkDocsTest.bulk_post/2
       test/bulk_docs_test.exs:59: (test)

and one more:
* test Simple map functions (348.4ms)

  1) test Simple map functions (BasicsTest)
     test/basics_test.exs:141
     Assertion with == failed
     code:  assert Couch.get("/#{db_name}").body()["doc_count"] == 6
     left:  5
     right: 6
     stacktrace:
       test/basics_test.exs:155: (test)

Not seeing these now that we moved to n=1.


dexctl: Deprecating dexctl's --db-url flag

dexctl should not connecting directly db instead it should use admin APIs
Fixes #298

Thanks for the PR!
At first glance this looks like it's removing support rather than deprecating it though. I'd recommend we log a warning for a bit so we don't break compatibility with existing installations.

Thanks for the feedback.Let me fix it and re-send it

Tried to update the PR with suggested change but it did not work.Closing this PR and created a new one(https://github.com/coreos/dex/pull/578).


Feature Request: Add Batch option for add-credentials

Currently, add-credentials always asks credentials from the console.
In our buildsetup, we automatically configure configuration files for various build systems / tools like maven, gradle, npm, nuget all using the same user credentials.
We do this by reading the credentials from the user once and after that executing config commands of the tools in sequence (npm config auth, nuget source...)
However, Paket does not allow to specify username and password directly on the command line, which makes it a lot harder to automatically configure it using that system.
I suggest providing a --batch flag:
paket config add-credentials  --batch
alternatively:
paket config add-credentials  --username  --password

Yes this sounds doable.
I'm making this up-for-grabs
On Jun 14, 2016 15:35, "Stephan Pauxberger"<EMAIL_ADDRESS>wrote:

Currently, add-credentials always asks credentials from the console.
In our buildsetup, we automatically configure configuration files for
various build systems / tools like maven, gradle, npm, nuget all using the
same user credentials.
We do this by reading the credentials from the user once and after that
executing config commands of the tools in sequence (npm config auth, nuget
source...)
However, Paket does not allow to specify username and password directly on
the command line, which makes it a lot harder to automatically configure it
using that system.
I suggest providing a --batch flag:
paket config add-credentials --batch
alternatively:
paket config add-credentials --username --password
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/fsprojects/Paket/issues/1722, or mute the thread
https://github.com/notifications/unsubscribe/AADgNABeSIwoYHOInY_5IDMycuQxwRmvks5qLq4dgaJpZM4I1U70
.


Function request, can I add a method to fill in the box height higher than the background?

Can you add several background filling methods? The color difference between the solid color block and the original image border is obvious, and the transition of the depth map is not smooth.

You can use Lama node to solve it

good idea ,thanks


Add THFOL Banner to townhallproject.com

To go up at 12pm Pacific on Wed 9/25.
[THFOL Logo]
Read our How to Organize a Candidate Town Hall Guide
Submit a Candidate Town Hall
Take Action with more MFOL #TurnoutTuesday Events
NOTE: We don't have final URL for MFOL's #TurnoutTuesday page but I'll update when we get it.

Part two:
Pull down THFOL banner on 10/24


trailing empty field not included in output

Given file foo.csv containing:
color,size,shape
red,9,round
green,3,
blue,,square

When I run
(import csv)

(def aoa (csv/parse (slurp "foo.csv")))
(pp aoa)

I'm expecting:
@[@["color" "size" "shape"] @["red" "9" "round"] @["green" "3" ""] @["blue" "" "square"]]

(that is, expecting empty string after "green" "3" (like how it's there after "blue"))
but I get:
@[@["color" "size" "shape"] @["red" "9" "round"] @["green" "3"] @["blue" "" "square"]]

This is using Janet 1.15.3.

ah good catch :) CSV is so simple and yet it has far too many edge cases. I'll see if I get some time these days to look into it

Awesome! Thanks, Lorenzo.


Need a Chain that syncs only block headers

The existing Chain implementation assumes a synced database with all blocks/headers/state is available, but for the light client we'll need one that only syncs only block headers and fetches any extra data (blocks/receipts/contract-code/proofs) on demand.

So I've been thinking about something independently that may be a good fit for this.
What about a backend system for all of the functions that are used for retrieving and persisting chain data (blocks/headers/transactions/receipts).
class BaseChainDB:
    def get_block_by_hash(self, block_hash):
        pass

    def get_block_by_canonical_block_number(self, block_number):
        pass

    def persist_block(self, block):
        pass

    ...  # more methods for the other objects....

Benefits I see...

Moves logic out of the Chain class, making it a bit more of a pure interface
Allows for full client and light client Chain instances to use different strategies for retrieval of these objects.

In general, it seems like a healthy abstraction, thoughts?

I think that makes sense, so I went ahead and tried it at #114. Notice that moving get_transactions_from_db() to BaseChainDB would require some work, I think, but it's not really needed, so we might as well leave it out for now. What do you think?

I'm thinking that we want to move all db access to be inside this class.  I noted this in the other PR but that would include moving the VM.state_db API onto the ChainDB class.
This would enable things like fancy chain databases that pull information not available by the LES protocol over some alternative API (like infura or etherscan).

We now have a BaseChainDB and LightChain


Don't use setState for disabled KeyboardAvoidingView to avoid re-renders

Summary:

There are two reasons to apply these changes:

We don't need to re-render the KeyboardAvoidingView if it is disabled. It may be especially useful in combination with react-navigation where we could disable KeyboardAvoidingView for screens that are not focused
They fix the problem with the KeyboardAvoidingView wrapped inside the react-freeze component. Similarly, as above, it is useful when we want to freeze screens that are not visible for the user.

Changelog:
[GENERAL] [CHANGED] Don't use setState for disabled KeyboardAvoidingView to avoid re-renders

Test Plan:

Check if the KeyboardAvoidingView works as expected.

Looks like you've got flow test failing, can you take a look?

Is there anything else I should answer? @blakef @Pranav-yadav

Hi, what's the status on this PR? Is it ready to be merged?

given that checks are all passing, @cortinico maybe you can help find someone from Meta to get this in?

Hello @adamgrzybowski,
I'm having an error in my RN 0.73.2 project, only in production on iOS:
on press on an Input, after displaying the keyboard, my app freezes.
I upgraded all the dependencies and it did not fix it.
No error is sent on focus to Sentry although I asked for one to be sent onFocus and onChangeText. I can't add anything with the keyboard. Although, in some cases, I can type something with the keyboard but it freezes 2 or 3 seconds later... I can't see any difference between when it works and when it does not.


azure-mgmt-dataplane-analytics: update msrestazure (#4541)

azure-mgmt-dataplane-analytics: update acceptable range of dependency versions.

Update version.py

Adding release note changes.

Making issue reference a link

Fixing link syntax

Can one of the admins verify this patch?

Can one of the admins verify this patch?


mapbox doesn't render points on jupyter notebook running on Databricks.

I am running jupyter notebook on a Databricks cluster and attempting to render a map. I tried the example from the documentation to test and it doesn't plot the points.
python 3.9
mapboxgl  0.10.2
# Load data from sample csv
 data_url = 'https://raw.githubusercontent.com/mapbox/mapboxgl-jupyter/master/examples/data/points.csv'
 df = pd.read_csv(data_url)

 # Must be a public token, starting with `pk`
 token = mapbox_token

 # Create a geojson file export from a Pandas dataframe
 df_to_geojson(df, filename='points.geojson',
               properties=['Avg Medicare Payments', 'Avg Covered Charges', 'date'],
               lat='lat', lon='lon', precision=3)

 # Generate data breaks and color stops from colorBrewer
 color_breaks = [0,10,100,1000,10000]
 color_stops = create_color_stops(color_breaks, colors='YlGnBu')

 # Create the viz from the dataframe
 viz = CircleViz('points.geojson',
                 access_token=token,
                 height='400px',
                 color_property = "Avg Medicare Payments",
                 color_stops = color_stops,
                 center = (-95, 40),
                 zoom = 3,
                 below_layer = 'waterway-label'
               )
 viz.show()

I got the same results


proxy should try to wait on target endpoint

Overview
When a proxy is being created, attempt to wait for the target endpoint to be live before connecting the proxy. If it takes longer than 10 seconds, then go ahead — we'll get an error as before, and something is probably wrong in any case.
Owing to the placement of the proxy setup call for a real blockchain, there is hardly any delay before the proxy is available (a few ms, assuming nothing is wrong with the invocation of geth). For the simulator, it takes a few seconds.
Cool Spaceship Picture

I sometimes have this error happening:
Error: Invalid JSON RPC response: ""
    at Object.InvalidResponse (/Users/anthony/code/embark-framework/embark/node_modules/web3-core-helpers/src/errors.js:42:16)
    at XMLHttpRequest.request.onreadystatechange (/Users/anthony/code/embark-framework/embark/node_modules/web3-providers-http/src/index.js:75:32)
    at XMLHttpRequestEventTarget.dispatchEvent (/Users/anthony/code/embark-framework/embark/node_modules/xhr2-cookies/dist/xml-http-request-event-target.js:34:22)
    at XMLHttpRequest._setReadyState (/Users/anthony/code/embark-framework/embark/node_modules/xhr2-cookies/dist/xml-http-request.js:208:14)
    at XMLHttpRequest._onHttpRequestError (/Users/anthony/code/embark-framework/embark/node_modules/xhr2-cookies/dist/xml-http-request.js:349:14)
    at ClientRequest.<anonymous> (/Users/anthony/code/embark-framework/embark/node_modules/xhr2-cookies/dist/xml-http-request.js:252:61)
    at ClientRequest.emit (events.js:182:13)
    at Socket.socketErrorListener (_http_client.js:382:9)
    at Socket.emit (events.js:182:13)
    at emitErrorNT (internal/streams/destroy.js:82:8)
    at emitErrorAndCloseNT (internal/streams/destroy.js:50:3)
    at process._tickCallback (internal/process/next_tick.js:63:19)

I made another commit where the key part is in the proxy
return new Promise(resolve => {
  server.listen(listenPort, defaultHost, () => {
     resolve(server);
  });
});

To ensure to send ready only when the proxy is actually started
Also in case wsRPC is false, do not try to set it up


Zuul and UI Services

What is the best practice for UI services with Zuul.  One approach I have seen is adding some UI functionality to Zuul itself essentially providing a page with links to the other UI services.
The problem with this approach is that you end up with a UI and Zuul within the same application.  While this may not seem to be a big deal, it does create a scenario where a simple UI change now means you need to take the Zuul instances down to add the changes.
That being said, what is the accepted approach for Zuul only being the gateway and all UI being handled by UI services?
Do you add a simple controller with a forward to the "/" UI Index service?  Can this be handled only within yaml / properties?

@ccit-spence Not sure there is a best practice.  You can put a UI in the same process as zuul or not.
zuul.routes.myservice=/** works for forwarding everything to myservice.  I've done it a number of times (here and here, multiple ui's fronted by zuul).

@spencergibb Thanks for the quick response and the examples.


What is polymer's approach to performant DOM?

In your readme it says,

Polymer... tries to re-implement it's own way of "how do I update my dom nodes quickly" (virtual dom) when other more popular and suitable ways exist

Could you summarize the approach Polymer takes to performant DOM?  I always thought it was simply that it performs minimal changes to the actual DOM by getting the programmer to describe specific changes to component properties (using el.set(), el.splice(), el.push()).  This isn't really akin to virtual DOM from my point of view, so I imagine there's something else at play that I hadn't picked-up on.

To be honest, I don't know the deep details.  They have some observer system that underlies everything and connects observable attributes to parts of the dom.


Navigate between screens with Compose: Android Basics with Compose

@Composable
fun OrderSummaryScreen(
orderUiState: OrderUiState,
onCancelButtonClicked: () -> Unit = {},
onSendButtonClicked: (String, String) -> Unit = {},
modifier: Modifier = Modifier
){
...
}
This code seems a mistake to me:
onSendButtonClicked: (String, String) -> Unit = {}, does not work, because the two parameters are missing from the default value.
Could you help me with this issue?
Thank you!

Hi @TakacsOrsi
Thank you for reporting this issue.
The lesson is being updated to address it and will be republished in the near future.
Hope you are enjoying the course!
Regards.


For sealed round the banner blocks the primary navigation

Good catch! Could we make this alert behave the same as the archive alert? Reuse placement and styles?


populate_db: Set pointer as message_id of last user sent message.

This fixes the messages being marked read instantaneously under certain circumstances in dev environment.

Automated message from Dropbox CLA bot
@adnrs96, it looks like you've already signed the Dropbox CLA. Thanks!


Remove DELETE DATA workarounds

This PR removes the workarounds made due to the following bug (https://github.com/openlink/virtuoso-opensource/issues/1055) which is fixed in the latest Virtuoso release; the workaround mainly involved around performing DELETEs on a triple-by-triple basis, instead of bundling them all under one DELETE query.
The different flows have been tested with the exception of the one in https://github.com/lblod/lpdc-management-service/blob/development/lib/postProcessLdesConceptualService.js#L110 (specifically here: https://github.com/lblod/lpdc-management-service/blob/development/lib/postProcessLdesConceptualService.js#L140-L149).

@Riadabd thanks, i haven't reviewed in detail yet.
@gauquiebart this might remove a lot of clutter from the code since you will be working on a more recent version of virtuoso. So definitely something to consider after the cut-over.


Support for Azure EventHub

I believe this should be straightforward as it will be very similar to Service Bus.
I am willing to contribute if this feature is wanted.

@mladedav Azure Event hub support has been added in v0.21.0. You may use the commands plumber read azure-eventhub -h and plumber write azure-eventhub -h to view available flags. Examples have also been added to https://github.com/batchcorp/plumber/blob/master/EXAMPLES.md#azure-event-hub and https://github.com/batchcorp/plumber/blob/master/EXAMPLES.md#azure-event-hub-1
Let us know if you needed any additional functionality for this


Set value for the 'comments' option

Vim's default value for this option is s1:/*,mb:*,ex:*/,://,b:#,:%,:XCOMM,n:>,fb:-, which you just have to read :help 'comments' to make any sense of, but it's basically a "try to do the right thing for a wide range of possible file types" compromise. In particular, b:# means "hash is a comment if followed by whitespace, so not e.g. #define in a C-like". Another plugin I use (perhaps dubiously) got a little tripped up by this, thinking it was an indication that # is a valid comment leader in Scala.
This change sets the option to the same value as in the core c.vim runtime files, with one addition: the explicit start/middle/end trio for /**. Without this, it was wrapping text onto the /** opening line when formatting with gq.
In general this follows traditional Javadoc style. I know there are Scaladoc style suggestions about how the stars should align differently (heh), but I've never heard a convincing argument for that convention and have seen (unexplained) disagreement among people who get to publish those things, so that probably explains why most of the community seems to ignore it and stick to the Java way. Anyone who feels strongly about the blessed Scaladoc style can always tweak the setting with their own autocommand, after/ftplugin, project-local vimrc, or whatever.
The first start/middle/end trio keeps bulleted list items with dashes from getting munged together by gq formatting inside comments. It'd be cool if {{{ code blocks and even Scaladoc ordered list syntax could be supported this way too, but the comments option doesn't seem to be a sharp enough tool to handle those cleanly or at all.

Looks OK to me.  Thanks.


Add PlatformService API

You should add a minimal passthrough implementation, both for testing portability, but also to better see the data which is provided.


Template for sharing in Whatsapp

@harshakun
@Srivarsan09
A template needs to be created for sharing feature on WhatsApp.

updated in the issue_44_45_42 branch


Update check-state-pension.cy.yaml

gwirio-wladwriaeth-pensiwn is not a page

Forgot to change the commit message.  I'll do that.


is there a reason for delete permission denied ?

when trying to delete Beast_Bomber folder it denies permission any particular reason?

Hi. If you can't remove a folder, then most likely some program is using it, try restarting your PC and try deleting it again. Otherwise, you have some problems in your os, try to find the answer to your question on the internet.

Hey thanks for the reply i think you were right and it was just a glitch in the os because every file was throwing up the same error, sorted it by chmod 777 (Your pathway opt) then rm (your pathway opt again)


Support lib panel if released?

See: https://gitlab.gnome.org/chergert/libpanel
https://www.youtube.com/watch?v=NDrzUKSCOvU

I've been using libpanel in a few personal projects. Would be very nice to have +1


[AVM Question/Feedback]: avm/res/sql/server additional InteliSense for database options

Check for previous/existing GitHub issues

[X] I have checked for previous/existing GitHub issues

Description
Is it possible to add some InteliSense if you are adding a database to the server. Default it wil not show any option you can add, so you need to dive into the GitHub docs how to a database to a sql server. Also when you add a Standard S1 the to maximum disk storage is to high. Maybe it's possible to add some condition based on sku type?

@bryansan-msft, @Azure/avm-res-sql-server-module-owners-bicep, @Azure/avm-res-sql-server-module-contributors-bicep-bicep, this issue was just transferred from the AVM repo.

Hello @Ralph101, I have been internally discussing with the team how we can approach this, and I will be making the necessary changes to improve the user experience when specifying parameters for the module in the next days

Closing as #3582 is adding the UDTs and IntelliSense for the most important objects