TypeError: An op outside of the function building code is being passed

I have realized a code to take previous lstm outputs as current inputs as a sequence generator. But when I want to pass states of lstm cells to next batch by take states as a member of the generator class, it rise an exception "TypeError: An op outside of the function building code is being passed". When add @tf.function to main function in my code, the exception became "AttributeError: 'Tensor' object has no attribute '_numpy'". I suspect this is about the compute graph, but I can't understand the reason.
My tensorflow version is 2.0.0-rc1.
In [4]: tf.__version__
Out[4]: '2.0.0-rc1'

I don't know whether it is a bug or not. Thank you for your attention.
The code is:
import tensorflow as tf
from tensorflow import keras
import numpy as np

class RNNGenerator(keras.layers.Layer):
    def __init__(self, rnn_dim, rnn_layer_num, seq_len, seq_width, batch_size, **kwargs):
        self.rnn_dim = rnn_dim              # lstm hidden dim
        self.rnn_layer_num = rnn_layer_num  # number of lstm cell layers
        self.seq_len = seq_len              # length of squence
        self.seq_width = seq_width          # width of squence
        self.batch_size = batch_size

        self._cells = {}

        super().__init__(**kwargs)

    def build(self, input_shape):
        # input dense
        self._dense_in = keras.layers.Dense(self.rnn_dim)

        # many lstm cell layers
        for i in range(self.rnn_layer_num):
            cell = keras.layers.LSTMCell(units=self.rnn_dim)
            self._cells[i] = cell

        # output dense
        self._dens_out = keras.layers.Dense(self.seq_width, activation="sigmoid")

        super().build(input_shape)

    def call(self, inputs):
        inputs = tf.squeeze(inputs, 1)

        # init cells' states
        states = getattr(self, 'states', None)
        if states is None:
            states = {}
            for i, cell in self._cells.items():
                init_cell_states = [tf.random.uniform([self.batch_size, self.rnn_dim]),
                                    tf.random.uniform([self.batch_size, self.rnn_dim])]
                states[i] = init_cell_states

        # --- prev outputs as current inputs
        rand_prev = tf.random.uniform([self.batch_size, self.seq_width], dtype=tf.float32)
        prev_inputs = tf.concat([rand_prev, inputs], -1)
        outputs = []
        for _ in range(self.seq_len):
            cell_inputs = self._dense_in(prev_inputs)
            for i, cell in self._cells.items():
                cell_outputs, states[i] = cell(cell_inputs, states[i])
                cell_inputs = cell_outputs
            step_outputs = self._dens_out(cell_outputs)
            prev_inputs = tf.concat([step_outputs, inputs], -1)

            outputs.append(tf.expand_dims(step_outputs, 1))

        # reserve cells' state in current batch
        self.states = states

        return tf.concat(outputs, 1)

# @tf.function
def main():
    batch_size = 17
    seq_width = 4
    rand_input_dim = 3
    inputs = keras.layers.Input(shape=[1, rand_input_dim])
    outputs = RNNGenerator(rnn_dim=64, rnn_layer_num=2, seq_len=10, seq_width=seq_width, batch_size=batch_size)(inputs)
    outputs = keras.layers.Flatten()(outputs)
    outputs = keras.layers.Dense(1)(outputs)
    outputs = tf.nn.sigmoid(outputs)
    model = keras.models.Model(inputs=inputs, outputs=outputs)

    # model.summary()

    X = np.random.rand(batch_size, 1, rand_input_dim).astype(np.float32)
    y = np.zeros([batch_size, 1])

    model.compile(loss="sparse_categorical_crossentropy", optimizer="sgd", metrics=["accuracy"])
    model.fit(X, y, batch_size=32, epochs=10)

if __name__ == "__main__":
    main()

Running info without @tf.function before main:
2019-09-28 21:43:30.966344: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
2019-09-28 21:43:30.980391: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x7f88282a2f60 executing computations on platform Host. Devices:
2019-09-28 21:43:30.980415: I tensorflow/compiler/xla/service/service.cc:175]   StreamExecutor device (0): Host, Default Version
Train on 17 samples
Epoch 1/10
WARNING:tensorflow:From /Users/xxxxxx/anaconda3/envs/tf2/lib/python3.6/site-packages/tensorflow_core/python/ops/math_grad.py:1394: where (from tensorflow.python.ops.array_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Use tf.where in 2.0, which has the same broadcast rule as np.where
17/17 [==============================] - 2s 98ms/sample
Traceback (most recent call last):
  File "/Users/xxxxxx/Desktop/GAN-seq/test.py", line 85, in <module>
    main()
  File "/Users/xxxxxx/Desktop/GAN-seq/test.py", line 81, in main
    model.fit(X, y, batch_size=32, epochs=10)
  File "/Users/xxxxxx/anaconda3/envs/tf2/lib/python3.6/site-packages/tensorflow_core/python/keras/engine/training.py", line 728, in fit
    use_multiprocessing=use_multiprocessing)
  File "/Users/xxxxxx/anaconda3/envs/tf2/lib/python3.6/site-packages/tensorflow_core/python/keras/engine/training_v2.py", line 324, in fit
    total_epochs=epochs)
  File "/Users/xxxxxx/anaconda3/envs/tf2/lib/python3.6/site-packages/tensorflow_core/python/keras/engine/training_v2.py", line 123, in run_one_epoch
    batch_outs = execution_function(iterator)
  File "/Users/xxxxxx/anaconda3/envs/tf2/lib/python3.6/site-packages/tensorflow_core/python/keras/engine/training_v2_utils.py", line 86, in execution_function
    distributed_function(input_fn))
  File "/Users/xxxxxx/anaconda3/envs/tf2/lib/python3.6/site-packages/tensorflow_core/python/eager/def_function.py", line 457, in __call__
    result = self._call(*args, **kwds)
  File "/Users/xxxxxx/anaconda3/envs/tf2/lib/python3.6/site-packages/tensorflow_core/python/eager/def_function.py", line 520, in _call
    return self._stateless_fn(*args, **kwds)
  File "/Users/xxxxxx/anaconda3/envs/tf2/lib/python3.6/site-packages/tensorflow_core/python/eager/function.py", line 1823, in __call__
    return graph_function._filtered_call(args, kwargs)  # pylint: disable=protected-access
  File "/Users/xxxxxx/anaconda3/envs/tf2/lib/python3.6/site-packages/tensorflow_core/python/eager/function.py", line 1141, in _filtered_call
    self.captured_inputs)
  File "/Users/xxxxxx/anaconda3/envs/tf2/lib/python3.6/site-packages/tensorflow_core/python/eager/function.py", line 1224, in _call_flat
    ctx, args, cancellation_manager=cancellation_manager)
  File "/Users/xxxxxx/anaconda3/envs/tf2/lib/python3.6/site-packages/tensorflow_core/python/eager/function.py", line 511, in call
    ctx=ctx)
  File "/Users/xxxxxx/anaconda3/envs/tf2/lib/python3.6/site-packages/tensorflow_core/python/eager/execute.py", line 76, in quick_execute
    raise e
  File "/Users/xxxxxx/anaconda3/envs/tf2/lib/python3.6/site-packages/tensorflow_core/python/eager/execute.py", line 61, in quick_execute
    num_outputs)
TypeError: An op outside of the function building code is being passed
a "Graph" tensor. It is possible to have Graph tensors
leak out of the function building context by including a
tf.init_scope in your function building code.
For example, the following function will fail:
  @tf.function
  def has_init_scope():
    my_constant = tf.constant(1.)
    with tf.init_scope():
      added = my_constant * 2
The graph tensor has name: model/rnn_generator/lstm_cell_10/mul_2:0

Running info with @tf.function before main:
2019-09-28 21:48:39.227708: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
2019-09-28 21:48:39.242540: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x7fdda3d85620 executing computations on platform Host. Devices:
2019-09-28 21:48:39.242575: I tensorflow/compiler/xla/service/service.cc:175]   StreamExecutor device (0): Host, Default Version
WARNING:tensorflow:From /Users/xxxxxx/anaconda3/envs/tf2/lib/python3.6/site-packages/tensorflow_core/python/ops/math_grad.py:1424: where (from tensorflow.python.ops.array_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Use tf.where in 2.0, which has the same broadcast rule as np.where
Train on 17 samples
Epoch 1/10
Traceback (most recent call last):
  File "/Users/xxxxxx/Desktop/GAN-seq/test.py", line 85, in <module>
    main()
  File "/Users/xxxxxx/anaconda3/envs/tf2/lib/python3.6/site-packages/tensorflow_core/python/eager/def_function.py", line 457, in __call__
    result = self._call(*args, **kwds)
  File "/Users/xxxxxx/anaconda3/envs/tf2/lib/python3.6/site-packages/tensorflow_core/python/eager/def_function.py", line 503, in _call
    self._initialize(args, kwds, add_initializers_to=initializer_map)
  File "/Users/xxxxxx/anaconda3/envs/tf2/lib/python3.6/site-packages/tensorflow_core/python/eager/def_function.py", line 408, in _initialize
    *args, **kwds))
  File "/Users/xxxxxx/anaconda3/envs/tf2/lib/python3.6/site-packages/tensorflow_core/python/eager/function.py", line 1848, in _get_concrete_function_internal_garbage_collected
    graph_function, _, _ = self._maybe_define_function(args, kwargs)
  File "/Users/xxxxxx/anaconda3/envs/tf2/lib/python3.6/site-packages/tensorflow_core/python/eager/function.py", line 2150, in _maybe_define_function
    graph_function = self._create_graph_function(args, kwargs)
  File "/Users/xxxxxx/anaconda3/envs/tf2/lib/python3.6/site-packages/tensorflow_core/python/eager/function.py", line 2041, in _create_graph_function
    capture_by_value=self._capture_by_value),
  File "/Users/xxxxxx/anaconda3/envs/tf2/lib/python3.6/site-packages/tensorflow_core/python/framework/func_graph.py", line 915, in func_graph_from_py_func
    func_outputs = python_func(*func_args, **func_kwargs)
  File "/Users/xxxxxx/anaconda3/envs/tf2/lib/python3.6/site-packages/tensorflow_core/python/eager/def_function.py", line 358, in wrapped_fn
    return weak_wrapped_fn().__wrapped__(*args, **kwds)
  File "/Users/xxxxxx/anaconda3/envs/tf2/lib/python3.6/site-packages/tensorflow_core/python/framework/func_graph.py", line 905, in wrapper
    raise e.ag_error_metadata.to_exception(e)
AttributeError: in converted code:
    relative to /Users/xxxxxx:

    Desktop/GAN-seq/test.py:81 main  *
        model.fit(X, y, batch_size=32, epochs=10)
    anaconda3/envs/tf2/lib/python3.6/site-packages/tensorflow_core/python/keras/engine/training.py:728 fit
        use_multiprocessing=use_multiprocessing)
    anaconda3/envs/tf2/lib/python3.6/site-packages/tensorflow_core/python/keras/engine/training_arrays.py:674 fit
        steps_name='steps_per_epoch')
    anaconda3/envs/tf2/lib/python3.6/site-packages/tensorflow_core/python/keras/engine/training_arrays.py:393 model_iteration
        batch_outs = f(ins_batch)
    anaconda3/envs/tf2/lib/python3.6/site-packages/tensorflow_core/python/keras/backend.py:3635 __call__
        [x._numpy() for x in outputs],  # pylint: disable=protected-access
    anaconda3/envs/tf2/lib/python3.6/site-packages/tensorflow_core/python/keras/backend.py:3635 <listcomp>
        [x._numpy() for x in outputs],  # pylint: disable=protected-access

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

I have tried on colab with TF version 2.0.0-rc1,2.0.0-rc2 and was able to reproduce the issue.Please, find the gist here.Thanks!

I am experiencing the exact same issue (just with different model) in TF version 2.0.0 and the error message is by no means suggestive of what may be done wrongly on the layer of abstraction I'm programming in to fix this (I'm using tf.keras Functional API to build the model and tf.data.Dataset to train with model.fit()).

I think this issue is very likely related to the self.states field  captured in the call() context, this leaked reference is used under multiple training context, which could cause the issue. Let me see how to walk around the issue.

Btw, you probably shouldn't annotation the main function with tf.function since keras.fit() already convert the model into graph execution under the hood. The tf.function annotation is only useful for training function that handles tensor inputs (your main function doesn't take any tensor as inputs).

Btw, you probably shouldn't annotation the main function with tf.function since keras.fit() already convert the model into graph execution under the hood. The tf.function annotation is only useful for training function that handles tensor inputs (your main function doesn't take any tensor as inputs).

Thank you very much. Your explanation is very useful to me. It would be grateful if the issue were solved.

So there are few issues in your code, which is bit hard to diagnose:

Creation of the state. Since the state is tracked and attached to the model, most likely you want to treat them like a data/eager tensor, rather than a symbolic tensor (graph tensor). Since the call() method is executed in the graph context, if you init the state in call(), they will just be graph tensor, and the final self.states = states will set the graph tensor as an attribute on the model, which will just causing issue in the when it proceed next batch. You will need to move the init of the state to build() method.

Record the states at end of the batch. Currently your are doing "self.states = states", which just assign the self.states to a dict with symbolic tensors. The correct way is actually assign the value of the states to the individual state in the self.states.

The changed code is like below, I have just applied the change to how the states is handled, and it works fine.
import tensorflow as tf
from tensorflow import keras
import numpy as np

class RNNGenerator(keras.layers.Layer):
  def __init__(self, rnn_dim, rnn_layer_num, seq_len, seq_width, batch_size, **kwargs):
    self.rnn_dim = rnn_dim              # lstm hidden dim
    self.rnn_layer_num = rnn_layer_num  # number of lstm cell layers
    self.seq_len = seq_len              # length of squence
    self.seq_width = seq_width          # width of squence
    self.batch_size = batch_size

    self._cells = {}

    super().__init__(**kwargs)

  def build(self, input_shape):
    # input dense
    self._dense_in = keras.layers.Dense(self.rnn_dim)

    # many lstm cell layers
    for i in range(self.rnn_layer_num):
      cell = keras.layers.LSTMCell(units=self.rnn_dim)
      self._cells[i] = cell

    # output dense
    self._dens_out = keras.layers.Dense(self.seq_width, activation="sigmoid")

    # init cells' states
    states = getattr(self, 'states', None)
    if states is None:
      states = {}
      for i, cell in self._cells.items():
        init_cell_states = [tf.random.uniform([self.batch_size, self.rnn_dim]),
                            tf.random.uniform([self.batch_size, self.rnn_dim])]
        states[i] = init_cell_states
      self.states = states

    super().build(input_shape)

  # @tf.function
  def call(self, inputs):
    inputs = tf.squeeze(inputs, 1)

    states = self.states.copy()

    # --- prev outputs as current inputs
    rand_prev = tf.random.uniform([self.batch_size, self.seq_width], dtype=tf.float32)
    prev_inputs = tf.concat([rand_prev, inputs], -1)
    outputs = []
    for _ in range(self.seq_len):
      cell_inputs = self._dense_in(prev_inputs)
      for i, cell in self._cells.items():
        cell_outputs, states[i] = cell(cell_inputs, states[i])
        cell_inputs = cell_outputs
      step_outputs = self._dens_out(cell_outputs)
      prev_inputs = tf.concat([step_outputs, inputs], -1)

      outputs.append(tf.expand_dims(step_outputs, 1))

    # reserve cells' state in current batch
    for state_, state in zip(tf.nest.flatten(self.states), tf.nest.flatten(states)):
      state_ = state

    return tf.concat(outputs, 1)

# @tf.function
def main():
  batch_size = 17
  seq_width = 4
  rand_input_dim = 3
  inputs = keras.layers.Input(shape=[1, rand_input_dim])
  outputs = RNNGenerator(rnn_dim=64, rnn_layer_num=2, seq_len=10, seq_width=seq_width, batch_size=batch_size)(inputs)
  outputs = keras.layers.Flatten()(outputs)
  outputs = keras.layers.Dense(1)(outputs)
  outputs = tf.nn.sigmoid(outputs)
  model = keras.models.Model(inputs=inputs, outputs=outputs)

  # model.summary()

  X = np.random.rand(batch_size, 1, rand_input_dim).astype(np.float32)
  y = np.zeros([batch_size, 1])

  model.compile(loss="sparse_categorical_crossentropy", optimizer="sgd", metrics=["accuracy"])
  model.fit(X, y, batch_size=32, epochs=10)

if __name__ == "__main__":
  main()

This method is very nice! My problem has been solved. Thanks very much! @qlzh727

Faced a similar issue. No more error raised using the solution given by @qlzh727. But my question is, how the below lines update the new state to self.states for the next batch? It looks like the self.states have never changed after initialized. Correct me if I'm wrong.
# reserve cells' state in current batch
for state_, state in zip(tf.nest.flatten(self.states), tf.nest.flatten(states)):
   state_ = state

@naturomics  these lines do it.
    # reserve cells' state in current batch
    for state_, state in zip(tf.nest.flatten(self.states), tf.nest.flatten(states)):
      state_ = state

from keras import backend as K
from keras.utils import conv_utils
from keras.engine import InputSpec
from keras.layers import Conv2D

class myPConv2D(Conv2D):

    def __init__(self, last_layer=False, *args,  **kwargs):
        print("-----args", args, kwargs)
        super().__init__(*args, **kwargs)
        self.last_layer = last_layer
        self.input_spec = [InputSpec(ndim=4), InputSpec(ndim=4)]

    def build(self, input_shape):
        """
        Adapted from original _Conv() layer of Keras.
        Parameters
            input_shape: list of dimensions for [img, mask].
        """
        assert isinstance(input_shape, list)
        assert self.data_format == 'channels_last', "data format should be `channels_last`"
        channel_axis = -1

        if input_shape[0][channel_axis] is None:
            raise ValueError('The channel dimension of the inputs should be defined. Found `None`.')

        self.input_dim = input_shape[0][channel_axis]

        # Image kernel:
        kernel_shape = self.kernel_size + (self.input_dim, self.filters)
        self.kernel  = self.add_weight(shape=kernel_shape,
                                      initializer=self.kernel_initializer,
                                      name='img_kernel',
                                      regularizer=self.kernel_regularizer,
                                      constraint=self.kernel_constraint)
        # Image bias:
        if self.use_bias:
            self.bias = self.add_weight(shape=(self.filters,),
                                        initializer=self.bias_initializer,
                                        name='bias',
                                        regularizer=self.bias_regularizer,
                                        constraint=self.bias_constraint)
        else:
            self.bias = None

        # Mask kernel:
        self.kernel_mask = K.ones(shape=self.kernel_size + (self.input_dim, self.filters))

        self.built = True

    def call(self, inputs):
        assert isinstance(inputs, list) and len(inputs) == 2
        #img, mask = inputs

        # Masked convolution:
        img_output = K.conv2d(inputs[0] * inputs[1],
                              self.kernel,
                              strides=self.strides,
                              padding=self.padding,
                              data_format=self.data_format)

        # Image scaling:
        sum_m = K.conv2d(inputs[1],
                         self.kernel_mask,
                         strides=self.strides,
                         padding=self.padding,
                         data_format=self.data_format)
        # Note, sum_1 does not need to be created via conv2d (as sum_m), it can be generated straight away:
        sum_1i = self.kernel_size[0] * self.kernel_size[1] * self.input_dim
        sum_1 = sum_1i * K.ones(K.shape(sum_m))
        # Prevent division by zero:
        sum_m_clip = K.clip(sum_m, 1., None)
        # Scale the image:
        img_output = img_output * (sum_1 / sum_m_clip)

        # Apply bias only to the image (if chosen to do so):
        if self.use_bias:
            img_output = K.bias_add(img_output,
                                    self.bias,
                                    data_format=self.data_format)

        # Apply activation if needed. Note, in the paper, activation is applied after BatchNormalization.
        if self.activation is not None:
            img_output = self.activation(img_output)

        if self.last_layer:
            return img_output

        # Update the mask:
        mask_output = K.clip(sum_m, 0., 1.)

        return [img_output, mask_output]

    def compute_output_shape(self, input_shape):
        assert isinstance(input_shape, list)
        assert self.data_format == 'channels_last'
        space = input_shape[0][1:-1]
        new_space = []
        for i in range(len(space)):
            new_dim = conv_utils.conv_output_length(
                space[i],
                self.kernel_size[i],
                padding=self.padding,
                stride=self.strides[i],
                dilation=self.dilation_rate[i])
            new_space.append(new_dim)
        new_shape = (input_shape[0][0],) + tuple(new_space) + (self.filters,)
        if self.last_layer:
            return new_shape
        return [new_shape, new_shape]

Same issue... Please help @qlzh727

"""Capsule Network Layers.
"""
import numpy as np
from keras.engine.base_layer import Layer
from keras.layers.convolutional import Convolution2D
from keras import backend as K
import tensorflow as tf
class CapsuleLayer(Layer):
def init(self,
capsules,
capsule_dim,
activation_caps,
kernel_initializer='glorot_uniform',
kernel_regularizer=None,
kernel_constraint=None,
**kwargs):
super().init(**kwargs)
self.kernel_initializer = kernel_initializer
self.kernel_regularizer = kernel_regularizer
self.kernel_constraint = kernel_constraint
    self.capsules = capsules
    self.capsule_dim = capsule_dim
    self.activation_caps = activation_caps

class PrimaryCaps(CapsuleLayer, Convolution2D):
"""PrimaryCaps layer as described in Hinton's paper"""
def init(self, capsules, capsule_dim, activation_caps, **kwargs):
super().init(capsules, capsule_dim, activation_caps, filters=capsules*capsule_dim, **kwargs)
def call(self, inputs):
    # Apply convolution
    outputs = Convolution2D.call(self, inputs)
    outputs_shape = outputs.shape

    # Reshape -> (None, -1, capsule_dim)
    outputs = K.reshape(outputs, (K.shape(outputs)[0], outputs_shape[1]*outputs_shape[2]*self.capsules, self.capsule_dim))

    if self.activation_caps:
        return self.activation_caps(outputs)

    return outputs

def compute_output_shape(self, input_shape):
    outputs_shape = Convolution2D.compute_output_shape(self, input_shape)
    return (input_shape[0], outputs_shape[1]*outputs_shape[2]*self.capsules, self.capsule_dim)

class Caps(CapsuleLayer):
"""Regular capsule layer. Input must be a PrimaryCaps layer. For example, see CapsDigit in original paper."""
def init(self, capsules, capsule_dim, routings, activation_caps, **kwargs):
super().init(capsules, capsule_dim, activation_caps, **kwargs)
    self.routings = routings

def build(self, input_shape):
    assert len(input_shape) >= 3, "The input Tensor (PrimaryCaps) should have shape=[None, num_capsules, dim_capsule]"
    self.input_capsule_dim = input_shape[-1]
    self.input_capsules = input_shape[-2]

    self.W = self.add_weight(shape=(self.capsules, self.input_capsules, self.capsule_dim, self.input_capsule_dim),
                              initializer=self.kernel_initializer,
                              name='W',
                              regularizer=self.kernel_regularizer,
                              constraint=self.kernel_constraint)

    self.built = True

def call(self, inputs):
    # Brodcast inputs to match capsules number
    # inputs.shape:     batch_size, input_capsules, input_capsule_dim
    # u.shape           batch_size, capsules, input_capsules, input_capsule_dim
    u = K.expand_dims(inputs, 1)
    u = K.tile(u, [1, self.capsules, 1, 1])

    # Matrix multiplication along the last axis of u
    # u_hat.shape:      batch_size, capsules, input_capsules, capsule_dim
    u_hat = K.map_fn(lambda x: K.batch_dot(x, self.W, [2, 3]), elems=u)

    # Routing algorithm
    # b.input_shape     batch_size, capsules, input_capsules
    b = K.zeros(shape=(K.shape(u_hat)[0], self.capsules, self.input_capsules))

    for r in range(self.routings):
        c = K.softmax(b, axis=1)

        # Weighted sum, and squash activation
        # s.shape       batch_size, capsules, dim_capsule
        s = K.batch_dot(c, u_hat, [2, 2])
        v = self.activation_caps(s)

        b += K.batch_dot(v, u_hat, axes=[2, 3])

    return v

def compute_output_shape(self, input_shape):
    return (input_shape[0], self.capsules, self.capsule_dim)

class CapsCNN(Convolution2D):
def init(self, capsule_dim, routings, activation_caps, **kwargs):
kwargs.setdefault("use_bias", False)
super().init(filters=capsule_dim, **kwargs)
    self.capsule_dim = capsule_dim
    self.activation_caps = activation_caps
    self.routings = routings

def call(self, inputs):
    KS = self.kernel_size[0]
    C = K.shape(inputs)[-1]
    x1, SO, x2, x3 = self.compute_output_shape(inputs.shape)

    x_cols = tf.image.extract_patches(inputs,
                                   sizes=[1, *self.kernel_size, 1],
                                   strides=[1, *self.strides, 1],
                                   rates=[1, *self.dilation_rate, 1],
                                   padding=self.padding.upper()
                                  )

    x_cols = K.reshape(x_cols, (-1, KS*KS, C))
    w = K.reshape(self.kernel, (KS*KS, C, self.capsule_dim))

    u_hat = K.local_conv1d(x_cols, w, [1], [1])
    u_hat = K.reshape(u_hat, (-1, SO, SO, KS*KS, self.capsule_dim))

    b = K.zeros(shape=(K.shape(u_hat)[0], SO, SO, KS*KS))
    #b = K.zeros(shape=(K.shape(u_hat)[0], self.capsule_dim, KS*KS))

    for r in range(self.routings):
        c = K.softmax(b, axis=-1)

        v = self.activation_caps(K.batch_dot(c, u_hat))

        if r < self.routings - 1:
            b += K.batch_dot(v, u_hat, [3, 4])

    return v

class ClassesCaps(Layer):
"""Output of a capsule network, compute the norm of each capsule"""
def init(self, **kwargs):
super().init(**kwargs)
def call(self, inputs):
    return K.sqrt(K.sum(K.square(inputs), axis=-1))

def compute_output_shape(self, input_shape):
    return input_shape[:-1]

class Mask(Layer):
"""Mask all but correct capsule. Use for training with a decoder."""
def __init__(self, **kwargs):
    super().__init__(**kwargs)

def call(self, inputs, y_true):
    mask = K.expand_dims(y_true, -1)

    return K.batch_flatten(inputs * mask)

def compute_output_shape(self, input_shape):
    return (input_shape[0], input_shape[1] * input_shape[2])

TypeError: in user code:
<ipython-input-38-fd7159b7e222>:134 call  *
    b = K.zeros(shape=(K.shape(u_hat)[0], SO, SO, KS*KS))
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/backend.py:1483 zeros  **
    v = array_ops.zeros(shape=shape, dtype=tf_dtype, name=name)
/usr/local/lib/python3.7/dist-packages/tensorflow/python/util/dispatch.py:201 wrapper
    return target(*args, **kwargs)
/usr/local/lib/python3.7/dist-packages/tensorflow/python/ops/array_ops.py:2819 wrapped
    tensor = fun(*args, **kwargs)
/usr/local/lib/python3.7/dist-packages/tensorflow/python/ops/array_ops.py:2877 zeros
    shape = ops.convert_to_tensor(shape, dtype=dtypes.int32)
/usr/local/lib/python3.7/dist-packages/tensorflow/python/profiler/trace.py:163 wrapped
    return func(*args, **kwargs)
/usr/local/lib/python3.7/dist-packages/tensorflow/python/framework/ops.py:1540 convert_to_tensor
    ret = conversion_func(value, dtype=dtype, name=name, as_ref=as_ref)
/usr/local/lib/python3.7/dist-packages/tensorflow/python/ops/array_ops.py:1525 _autopacking_conversion_function
    return _autopacking_helper(v, dtype, name or "packed")
/usr/local/lib/python3.7/dist-packages/tensorflow/python/ops/array_ops.py:1461 _autopacking_helper
    return gen_array_ops.pack(elems_as_tensors, name=scope)
/usr/local/lib/python3.7/dist-packages/tensorflow/python/ops/gen_array_ops.py:6385 pack
    values, axis=axis, name=name, ctx=_ctx)
/usr/local/lib/python3.7/dist-packages/tensorflow/python/ops/gen_array_ops.py:6425 pack_eager_fallback
    ctx=ctx, name=name)
/usr/local/lib/python3.7/dist-packages/tensorflow/python/eager/execute.py:75 quick_execute
    raise e
/usr/local/lib/python3.7/dist-packages/tensorflow/python/eager/execute.py:60 quick_execute
    inputs, attrs, num_outputs)

TypeError: An op outside of the function building code is being passed
a "Graph" tensor. It is possible to have Graph tensors
leak out of the function building context by including a
tf.init_scope in your function building code.
For example, the following function will fail:
  @tf.function
  def has_init_scope():
    my_constant = tf.constant(1.)
    with tf.init_scope():
      added = my_constant * 2
The graph tensor has name: ConvolutionalCaps/strided_slice_26:0

Issue @ :134 call  *
b = K.zeros(shape=(K.shape(u_hat)[0], SO, SO, KS*KS))

You may need to enable Eager mode. When you compile your model, add this parameter:
model.compile(..., run_eagerly=True, ...)

Hi, I have follow the idea of @qlzh727 but I have not been able to solve the issue:
Any ideas? Thanks in advance:
class AttentionAugmentation2D(Layer):

    def __init__(self, depth_k, depth_v, num_heads, relative=True, **kwargs):
        """
        Applies attention augmentation on a convolutional layer
        output.
        Args:
            depth_k: float or int. Number of filters for k.
            Computes the number of filters for `v`.
            If passed as float, computed as `filters * depth_k`.
        depth_v: float or int. Number of filters for v.
            Computes the number of filters for `k`.
            If passed as float, computed as `filters * depth_v`.
        num_heads: int. Number of attention heads.
            Must be set such that `depth_k // num_heads` is > 0.
        relative: bool, whether to use relative encodings.
        Raises:
            ValueError: if depth_v or depth_k is not divisible by
                num_heads.
        Returns:
            Output tensor of shape
            -   [Batch, Height, Width, Depth_V] if
                channels_last data format.
            -   [Batch, Depth_V, Height, Width] if
                channels_first data format.
        """
        super(AttentionAugmentation2D, self).__init__(**kwargs)

        if depth_k % num_heads != 0:
            raise ValueError('`depth_k` (%d) is not divisible by `num_heads` (%d)' % (
                depth_k, num_heads))

        if depth_v % num_heads != 0:
            raise ValueError('`depth_v` (%d) is not divisible by `num_heads` (%d)' % (
                depth_v, num_heads))

        if depth_k // num_heads < 1.:
            raise ValueError('depth_k / num_heads cannot be less than 1 ! '
                             'Given depth_k = %d, num_heads = %d' % (
                             depth_k, num_heads))

        if depth_v // num_heads < 1.:
            raise ValueError('depth_v / num_heads cannot be less than 1 ! '
                             'Given depth_v = %d, num_heads = %d' % (
                                 depth_v, num_heads))

        self.depth_k = depth_k
        self.depth_v = depth_v
        self.num_heads = num_heads
        self.relative = relative

        self.axis = 1 if K.image_data_format() == 'channels_first' else -1

    def build(self, input_shape):

        self._shape = input_shape

        # normalize the format of depth_v and depth_k
        self.depth_k, self.depth_v = _normalize_depth_vars(self.depth_k, self.depth_v,
                                                           input_shape)

        if self.axis == 1:
            _, channels, height, width = input_shape
        else:
            _, height, width, channels = input_shape

        if self.relative:
            dk_per_head = self.depth_k // self.num_heads

            if dk_per_head == 0:
                print('dk per head', dk_per_head)

            self.key_relative_w = self.add_weight('key_rel_w',
                                                  shape=[2 * width - 1, dk_per_head],
                                                  initializer=initializers.RandomNormal(
                                                      stddev=dk_per_head ** -0.5))

            self.key_relative_h = self.add_weight('key_rel_h',
                                                  shape=[2 * height - 1, dk_per_head],
                                                  initializer=initializers.RandomNormal(
                                                      stddev=dk_per_head ** -0.5))

        else:
            self.key_relative_w = None
            self.key_relative_h = None

    def call(self, inputs, **kwargs):
        if self.axis == 1:
            # If channels first, force it to be channels last for these ops
            inputs = K.permute_dimensions(inputs, [0, 2, 3, 1])

        q, k, v = tf.split(inputs, [self.depth_k, self.depth_k, self.depth_v], axis=-1)

        q = self.split_heads_2d(q)
        k = self.split_heads_2d(k)
        v = self.split_heads_2d(v)

        # scale query
        depth_k_heads = self.depth_k / self.num_heads
        q *= (depth_k_heads ** -0.5)

        # [Batch, num_heads, height * width, depth_k or depth_v] if axis == -1
        qk_shape = [self._batch, self.num_heads, self._height * self._width, self.depth_k // self.num_heads]
        v_shape = [self._batch, self.num_heads, self._height * self._width, self.depth_v // self.num_heads]
        flat_q = K.reshape(q, K.stack(qk_shape))
        flat_k = K.reshape(k, K.stack(qk_shape))
        flat_v = K.reshape(v, K.stack(v_shape))

        # [Batch, num_heads, HW, HW]
        logits = tf.matmul(flat_q, flat_k, transpose_b=True)

        # Apply relative encodings
        if self.relative:
            h_rel_logits, w_rel_logits = self.relative_logits(q)
            logits += h_rel_logits
            logits += w_rel_logits

        weights = K.softmax(logits, axis=-1)
        attn_out = tf.matmul(weights, flat_v)

        attn_out_shape = [self._batch, self.num_heads, self._height, self._width, self.depth_v // self.num_heads]
        attn_out_shape = K.stack(attn_out_shape)
        attn_out = K.reshape(attn_out, attn_out_shape)
        attn_out = self.combine_heads_2d(attn_out)
        # [batch, height, width, depth_v]

        if self.axis == 1:
            # return to [batch, depth_v, height, width] for channels first
            attn_out = K.permute_dimensions(attn_out, [0, 3, 1, 2])

        attn_out.set_shape(self.compute_output_shape(self._shape))

        return attn_out

    def compute_output_shape(self, input_shape):
        output_shape = list(input_shape)
        output_shape[self.axis] = self.depth_v
        return tuple(output_shape)

    def split_heads_2d(self, ip):
        tensor_shape = K.shape(ip)

        # batch, height, width, channels for axis = -1
        tensor_shape = [tensor_shape[i] for i in range(len(self._shape))]

        batch = tensor_shape[0]
        height = tensor_shape[1]
        width = tensor_shape[2]
        channels = tensor_shape[3]

        # Save the spatial tensor dimensions
        self._batch = batch
        self._height = height
        self._width = width

        ret_shape = K.stack([batch, height, width,  self.num_heads, channels // self.num_heads])
        split = K.reshape(ip, ret_shape)
        transpose_axes = (0, 3, 1, 2, 4)
        split = K.permute_dimensions(split, transpose_axes)

        return split

    def relative_logits(self, q):
        shape = K.shape(q)
        # [batch, num_heads, H, W, depth_v]
        shape = [shape[i] for i in range(5)]

        height = shape[2]
        width = shape[3]

        rel_logits_w = self.relative_logits_1d(q, self.key_relative_w, height, width,
                                               transpose_mask=[0, 1, 2, 4, 3, 5])

        rel_logits_h = self.relative_logits_1d(
            K.permute_dimensions(q, [0, 1, 3, 2, 4]),
            self.key_relative_h, width, height,
            transpose_mask=[0, 1, 4, 2, 5, 3])

        return rel_logits_h, rel_logits_w

    def relative_logits_1d(self, q, rel_k, H, W, transpose_mask):
        rel_logits = tf.einsum('bhxyd,md->bhxym', q, rel_k)
        rel_logits = K.reshape(rel_logits, [-1, self.num_heads * H, W, 2 * W - 1])
        rel_logits = self.rel_to_abs(rel_logits)
        rel_logits = K.reshape(rel_logits, [-1, self.num_heads, H, W, W])
        rel_logits = K.expand_dims(rel_logits, axis=3)
        rel_logits = K.tile(rel_logits, [1, 1, 1, H, 1, 1])
        rel_logits = K.permute_dimensions(rel_logits, transpose_mask)
        rel_logits = K.reshape(rel_logits, [-1, self.num_heads, H * W, H * W])
        return rel_logits

    def rel_to_abs(self, x):
        shape = K.shape(x)
        shape = [shape[i] for i in range(3)]
        B, Nh, L, = shape
        col_pad = K.zeros(K.stack([B, Nh, L, 1]))
        x = K.concatenate([x, col_pad], axis=3)
        flat_x = K.reshape(x, [B, Nh, L * 2 * L])
        flat_pad = K.zeros(K.stack([B, Nh, L - 1]))
        flat_x_padded = K.concatenate([flat_x, flat_pad], axis=2)
        final_x = K.reshape(flat_x_padded, [B, Nh, L + 1, 2 * L - 1])
        final_x = final_x[:, :, :L, L - 1:]
        return final_x

    def combine_heads_2d(self, inputs):
        # [batch, num_heads, height, width, depth_v // num_heads]
        transposed = K.permute_dimensions(inputs, [0, 2, 3, 1, 4])
        # [batch, height, width, num_heads, depth_v // num_heads]
        shape = K.shape(transposed)
        shape = [shape[i] for i in range(5)]

        a, b = shape[-2:]
        ret_shape = K.stack(shape[:-2] + [a * b])
        # [batch, height, width, depth_v]
        return K.reshape(transposed, ret_shape)

    def get_config(self):
        config = {
            'depth_k': self.depth_k,
            'depth_v': self.depth_v,
            'num_heads': self.num_heads,
            'relative': self.relative,
        }
        base_config = super(AttentionAugmentation2D, self).get_config()
        return dict(list(base_config.items()) + list(config.items()))


Add updating E2E tests to our standard process on changing/fixing webpages

Problem statement
To ensure we don't forget to update our E2E tests, we need to add this as standard process.
What you need to know

https://cdc.sharepoint.com/:w:/r/teams/USDSatCDC/_layouts/15/Doc.aspx?sourcedoc={18EED449-24D1-49D4-8EC3-8A9D8233C11E}&file=ReportStream Development Process.docx&action=default&mobileredirect=true

Acceptance criteria

[x] Review document, make note of anything that may be missing
[x] Add updating our E2E tests to the document about PR processes

There is a guide for things to look out when reviewing PRs

@victor-chaparro please verify


fix broken URLs

Fixed some broken links in the transit coverage

Docs Build status updates of commit de8aee2:
:x: Validation status: errors
Please follow instructions here which may help to resolve issue.

File
Status
Preview URL
Details

:x:Error

Details

[Error: PullRequestMergeConflict] Cannot sync git repo to specified state. Please make sure the pull request is mergeable.

For more details, please refer to the build report.
If you see build warnings/errors with permission issues, it might be due to single sign-on (SSO) enabled on Microsoft's GitHub organizations. Please follow instructions here to re-authorize your GitHub account to Docs Build.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
Note: Your PR may contain errors or warnings unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.
For any questions, please:Try searching the docs.microsoft.com contributor guidesPost your question in the Docs support channel

Docs Build status updates of commit 9fa600c:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

BingMaps/coverage/transit-coverage/asia-australia-pacific-islands.md
:bulb:Suggestion
View
Details

BingMaps/coverage/transit-coverage/europe.md
:bulb:Suggestion
View
Details

BingMaps/coverage/transit-coverage/north-america.md
:bulb:Suggestion
View
Details

BingMaps/coverage/transit-coverage/south-america.md
:bulb:Suggestion
View
Details

BingMaps/coverage/transit-coverage/asia-australia-pacific-islands.md

Line 2, Column 1: [Suggestion: description-missing - See documentation] Missing required attribute: 'description'.

BingMaps/coverage/transit-coverage/europe.md

Line 2, Column 1: [Suggestion: description-missing - See documentation] Missing required attribute: 'description'.

BingMaps/coverage/transit-coverage/north-america.md

Line 2, Column 1: [Suggestion: description-missing - See documentation] Missing required attribute: 'description'.

BingMaps/coverage/transit-coverage/south-america.md

Line 2, Column 1: [Suggestion: description-missing - See documentation] Missing required attribute: 'description'.

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching the docs.microsoft.com contributor guidesPost your question in the Docs support channel


chore(deps) bump grpcurl to 1.8.6

Summary
https://github.com/fullstorydev/grpcurl/releases/tag/v1.8.6

This change seems to introduce a breaking change in http -> grpc response code mapping. Since this is not required, let's close it for now.


Define the data required for our apollo-server schema

Is your feature request related to a problem? Please describe.
how do we use the github data, and act as an interface to the front, it's necessary to define which data we will use in this sprint
Describe the solution you'd like
I would like have a discussion to define this.
Describe alternatives you've considered
We could do the discussion in this issue, because then we can have all this saved, in slack we risk losing

From what I've studied from the Github v4 API, we'll need the information provided from the "RepositoryOwner" interface (which is implemented by "Organization" and "User" objects), as well as all the queries that return a RepositoryOwner object.

Hi, @LukeHxH, i think that is enough get Organization, it's already provides the basic infos about org, and your relationships like: teams, repos. And for this sprint, this is enough.

I agree with @fanny

@fanny @jadsonluan Don't you think that it's better to work with interfaces, like RepositoryOwner? Because if we need to change something about the query in the future, it'll be better to do it and will require a smaller time of work.
For example:
query getRepoOwner($login: String!){
    RepositoryOwner(login: $login) {
        ... on User {
            name
        }
        ... on Organization {
            name
        }
    }
}

This query can be used to find a organization or a user, and we won't need to make two queries like getUser or getRepository. That's why suggested RepositoryOwner. This interface is implemented by Organization and User.

Humm, sounds good for me!

Understood! You can go ahead.


Consider using https://github.com/markbates/pkger instead of tar if appropriate

Is your feature request related to a problem? Please describe.
We currently package text files into binary as tar string
Describe the solution you'd like
https://github.com/markbates/pkger might give a better interface
Describe alternatives you've considered
Using tar string

Might be better to use golang's embed feature https://blog.carlmjohnson.net/post/2021/how-to-use-go-embed/
instead of relying on a third party library.


Is youtube-dl exteremely slow for anyone else?

Youtube-dl downloads very slow or in realtime. I don't have this problem with . Is anyone else facing the same?

This question has been posted many times. Please do not post duplicate issues.

Sorry i will close this.


trigger when user is not logged in

Does someone knows is there a possibility do create tasks that will fire even when user is not logged in? There is such option in windows task scheduler, but i cant find it in the wrapper. Situation is, after server reboots (power issues or whatsoever), no user log in automatically.
Thanks in advance, btw awesome work with the wrapper
Originally posted: 2014-02-05T06:49:11

There a couple of ways: 1) You can define a BootTrigger using an account that has Administrator rights or SYSTEM. This will run every time the system is booted. 2) Use any trigger, but register with an account that provides a password or the SYSTEM account.
Originally posted: 2014-02-05T19:58:31

Thanks, it worked, i used
ts.GetFolder("ProgressDatabaseCleaner").RegisterTaskDefinition(@"ProgressDataBaseCleaner1",.RegisterTaskDefinition(@"ProgressDataBaseCleaner1",) td,TaskCreation.CreateOrUpdate, "SYSTEM", null, TaskLogonType.ServiceAccount);
Originally posted: 2014-02-06T04:52:37


Support TF 2.12, drop Python 3.7

Codecov Report

Merging #302 (5010a88) into master (32fc6af) will decrease coverage by 1.07%.
The diff coverage is 86.66%.

:exclamation: Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.
@@            Coverage Diff             @@
##           master     #302      +/-   ##
==========================================
- Coverage   98.52%   97.45%   -1.07%
==========================================
  Files           7        7
  Lines         744      748       +4
==========================================
- Hits          733      729       -4
- Misses         11       19       +8

Impacted Files
Coverage Δ

scikeras/utils/random_state.py
96.87% <ø> (ø)

scikeras/utils/transformers.py
100.00% <ø> (ø)

scikeras/wrappers.py
97.53% <ø> (ø)

scikeras/utils/__init__.py
93.33% <66.66%> (-6.67%)
:arrow_down:

scikeras/__init__.py
88.88% <100.00%> (-11.12%)
:arrow_down:

scikeras/_saving_utils.py
94.87% <100.00%> (-5.13%)
:arrow_down:

scikeras/_utils.py
100.00% <100.00%> (ø)

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more


make this module work nicely with wsgi-request-id

add the request uuid to the access log, if wsgi-request-id is used, otherwise ignore it.
some pep8 fixes in setup.py

hey, did you had a chance to review this?

Sorry, it took me so long to respond!
The problem with this pull request is that it changes what users expect from the Apache NCSA log format and it possibly breaks their log file analysis. That's not something that users expect.
Why not create a custom named "formatter" that includes this piece of information by adding it as a @staticmethod just as it's the case with format_with_response_time? In addition it should employ - as a placeholder, in case the REQUEST_ID is not found in the environ dictionary. This could make it a bit more compatible with the Apache conventions and the %L statement of Apache's mod_log_config custom logs format:
class ApacheFormatters(object):

    [...]

    @staticmethod
    def format_with_request_id(status_code, environ, content_length, **kwargs):
        """
        Log the WSGI REQUEST_ID too.
        The request id can be inserted with wsgi-request-id:
        https://pypi.python.org/pypi/wsgi-request-id/
        """
        log_line = ApacheFormatters.format_NCSA_log(status_code, environ, content_length)
        log_line += ' ' + environ.get('REQUEST_ID', '-')
        return  log_line

This formatter could then be used by initializing your logging in the appropriate way:
handlers = [ TimedRotatingFileHandler('access.log', 'd', 7) , ]
loggingapp = WSGILogger(application, handlers, ApacheFormatters.format_with_request_id)

This code is untested yet, but I think this is the way to go without breaking others' setups.
The open question to me is: Do you want the response time to be included in this new output format or not?
What do you think?

@pklaus yes, is was not thinking at others logfiles analyzers, you are right, the NSCA format should not be changed.
implementing this as an additional formatter sounds reasonable, so yes, sounds great. It would also be nice to have the response time, at least i am using it.
Thank You.


[RESOLVED] High ICMP ping response time

Problem started at 09:14:16 on 2023.07.27
Problem name: High ICMP ping response time
Host: ST-FG
Severity: Warning
Operational data: Value: 973ms
Original problem ID: 33145
Event details in Zabbix: http://<IP_ADDRESS>/tr_events.php?triggerid=23135&eventid=33145

Problem has been resolved in 6m 0s at 09:20:16 on 2023.07.27
Problem name: High ICMP ping response time
Host: ST-FG
Severity: Warning
Original problem ID: 33145


[RESOLVED] High ICMP ping response time

Problem started at 14:52:29 on 2023.08.08
Problem name: High ICMP ping response time
Host: HP_iLO
Severity: Warning
Operational data: Value: 13ms
Original problem ID: 35168
Event details in Zabbix: http://<IP_ADDRESS>/tr_events.php?triggerid=23268&eventid=35168

Problem has been resolved in 1m 0s at 14:53:29 on 2023.08.08
Problem name: High ICMP ping response time
Host: HP_iLO
Severity: Warning
Original problem ID: 35168


Help/Description entry for recording rules

Proposal
Today we have

HELP entry for metrics
Description and Summary for Alerting rules

But nothing for Recording rules, I think it will be beneficial to have/support a description entry for it
Example:
groups:
  - name: rules
    rules:
      - record: xxx:yyyy_yyy:zzzz
        expr: <PromQL expression>
        description: "foo bar"

This will help understanding the rule, generating automatic documentations etc

I know this is old as heck, but I'd also like to see a Help/Description/Annotations field be possible for Recording Rules. It would add helpful context when viewing the rules in the Prometheus UI, if nothing else.

Hello from the bug-scrub!
If someone wants to work on this, the data can be stored in existing Metadata structures, in-memory only.
We should probably add the TYPE.

Related to #11884 (which is about synthetic metrics).


Configurable output of 'level' field

Thank you for your awesome contributions to the tracing world in rust. Since I've entered reading your articles about tracing, I have also started using the bunyan formatter, not even knowing where it originated from. Meanwhile, I've filled this educational gap of mine, because I ran into an issue due to the log level conversion you do.
In the original bunyan repo it says

While using log level names is preferred, the actual level values are integers internally

and nothing more about the actual motivation behind it. My app is running in a landscape with kotlin apps and I'm a little exotic with my log output there, so the question came up, whether I can avoid the log levels being integers. From what I saw, there's currently no direct way to configure this, so I wanted to ask you, what would be your suggested way of achieving this. Or would you consider it reasonable to consider this a feature request? As far as I could see, you actively convert to integers at some point and would just need to avoid this procedure.

This is part of the bunyan spec for core fields: https://github.com/trentm/node-bunyan#core-fields
If you are not interested into the bunyan format specifically, you might want to check out tracing's JSON formatter.


obj*::get_value functions have unexpectedly differing signatures

In objint.rs we have:
pub fn get_value(obj: PyObjectRef) -> i32 {

but in objstr.rs we have:
pub fn get_value(obj: &PyObjectRef) -> String {

Obviously return types are going to be different, but having the same calling convention would be good.

Perhaps something like:
trait FromPyObject {
    fn from_pyobject(obj: &PyObjectRef) -> Self;
}

impl FromPyObject for i32 {
    fn from_pyobject(obj: &PyObjectRef) -> i32 {
        ...
    }
}

might do the trick; then:
let x = objint::getvalue(obj);

would become something like:
let x = i32::from_pyobject(obj)

Once TryFrom is stabilised (https://github.com/rust-lang/rust/issues/33417) we may also want to look at implementing that, so we can report errors out more nicely.

Okay, I'll go for FromPyObject trait!

I came across this when I realized that sometimes cloning a python object ref if overkill, and passing a reference is enough. This is such an example!

I stopped because I thought I was running in to problems with subclasses of types, but I think those problems were actually caused by #112 and I failed to appropriately diagnose them.

Now every get_value has same input signature using &PyObjectRef. How about change thi s issue to TryFrom or FromPyObject one or close this one and create a new one?

I also fixed get_value signature problem several weeks ago


Handle cancellation token if function is invoked before cancellation token

Issue describing the changes in this PR
resolves #2415
We had a design discussion about this issue and came to the conclusion that we will not use the cancellation token in the pipeline and instead invoke CancellationToken.None. That way the customer can still have their function be invoked and handle the cancellation token as they want within their code.
To test this out I did the following from guidance from Lilian:

use this sample for the worker app: sample

Updated the tsc here  to cancel the token after 5 seconds.

Invoked the HttpTriggerWithCancellation function, set a breakpoint after the token was cancelled, resumed function execution, and saw that a TaskCancelledException was invoked when the pipeline's cancellation token was passed in. With my changes, I saw that I was able to modify the function to handle the cancellation token as I wish.

Pull request checklist

[x] My changes do not require documentation changes

[ ] Otherwise: Documentation issue linked to PR

[x] My changes should not be added to the release notes for the next release

[ ] Otherwise: I've added my notes to release_notes.md

[x] My changes do not need to be backported to a previous version

[ ] Otherwise: Backport tracked by issue/PR #issue_or_pr

[x] I have added all required tests (Unit tests, E2E tests)

Additional information
Additional PR information

The build errors appear unrelated to your change, but I am unsure how they appeared in the first place.

Looks like none of the tests in DefaultModelBindingFeatureTests is using a valid cancellation token flow. Should we add/update test(s) to reflect that?

The build errors appear unrelated to your change, but I am unsure how they appeared in the first place.

We had some wildcard pattern used for nuget packages and one of the package had a patch version bump a week ago, which brought a new version of NuGet.Common package as a transitive dependency. Our tests files were pinned to a lower version of NuGet.Common package and that caused the error.
@aishwaryabh  Please rebase after #2549 is merged.

Added a unit test to handle the cancellation token


Clicking 'Preview' on edit template results in missing partial error

Clicking the 'preview' button on the edit template page results in a missing partial error
App 748 stdout: I, [2017-03-21T14:47:29.781491 #748]  INFO -- : Completed 500 Internal Server Error in 31ms (ActiveRecord: 8.2ms)
App 748 stdout: F, [2017-03-21T14:47:29.782672 #748] FATAL -- :
App 748 stdout: ActionView::Template::Error (Missing partial question/_preview_question with {:locale=>["en_US", :en_US, :en_GB, "en_GB"], :formats=>[:html], :variants=>[], :handlers=>[:erb, :builder, :raw, :ruby, :jbuilder, :caracal]}. Searched in:

This is likely related to #193

tested and working as expected


[BACKLOG-15721] small fix for folder area scrolling

@bmorrise

Build Completed
:white_check_mark: This pull request has passed all validations.
Build Commands
mvn -B -fn -f plugins/file-open-save/core/pom.xml clean install && mvn -B -f plugins/file-open-save/core/pom.xml site

Cleanup Commands
mvn -B -f plugins/file-open-save/core/pom.xml build-helper:remove-project-artifact

Changed files
  plugins/file-open-save/core/src/main/javascript/app/components/breadcrumb/breadcrumb.component.js
  plugins/file-open-save/core/src/main/javascript/app/components/folder/folder.component.js

Build Completed
:white_check_mark: This pull request has passed all validations.
Build Commands
mvn -B -fn -f plugins/file-open-save/core/pom.xml clean install && mvn -B -f plugins/file-open-save/core/pom.xml site

Cleanup Commands
mvn -B -f plugins/file-open-save/core/pom.xml build-helper:remove-project-artifact

Changed files
  plugins/file-open-save/core/src/main/javascript/app/components/breadcrumb/breadcrumb.component.js
  plugins/file-open-save/core/src/main/javascript/app/components/folder/folder.component.js


[BUG] Releases notes link is a dud

The link to the release notes from the About dialog on Tray opens a 404 page.
The link opened is https://access.redhat.com/documentation/en-us/red_hat_codeready_containers/1.38.0/html-single/release_notes_and_known_issues/index.  I think the version number 1.38.0 on the URL is causing the issue since the documentation site has it as 1.38 only.
General information

OS: macOS

CRC version
CodeReady Containers version: 1.38.0+659b2cbd
OpenShift version: 4.9.12 (bundle installed at /Applications/CodeReady Containers.app/Contents/Resources/crc_hyperkit_4.9.12.crcbundle)

This is a known issue and was resolved at some point. But this is an issue with the documentation site not being able to offer point release. It was fixed at some point, and then Robert got upset ... it was discussed, but it was never relayed they removed this.
We are not not going to fix this as the macOS client has stopped development for over 2 months now and is deprecated in the next release.


Add HyperTerm to apps list

Adding HyperTerm to apps list.

Awesome, HyperTerm rules! Just want to get @rauchg's OK though before we add it.

👌🙇

Thanks @Meadowcottage

No problem. No harm in adding it to the list. The more the merrier 😄

Awesome, thanks @rauchg ( 👋 ! ) and @Meadowcottage!


Text in popup border

Hi ! First of all thanks for this great plugin. I am using it for a project now using the Popup api and it generally works really nicely. But I cannot for the life of me get the border text to work. Below is an example - I should expect this to put the text "yo" in the top border, but I don't see it. Am I missing something?
Popup({
		enter = true,
		focusable = true,
		border = {
			style = "solid",
			highlight = "FloatBorder",
			text = {
				top = "yo",
				top_align = "center",
			},
		},
		position = "50%",
		size = {
			width = "80%",
			height = "80%",
		},
		buf_options = {
			modifiable = true,
			readonly = false,
			filetype = "supercollider",
		},
		win_options = {
			winblend = 5,
			winhighlight = "Normal:Normal",
		},
	})

I also tried using the set_text method: popup.border:set_text("top", "sc", "center") but still no luck. Am I doing something wrong here or is it a bug? Thanks a lot for your help!

Changing border.style to "rounded" also doesn't seem to make a difference

Hey @madskjeldgaard , I used the exact code above and got this:

Can you pull the latest version of nui.nvim and try again?

That's so strange.  I tried pulling again but no luck.
Are there any global options in nvim that might interfere with this? Here is a full but minimal example I just tried again with no luck:

function M.what()
	local popup = Popup({
		enter = true,
		focusable = true,
		order = {
			style = "solid",
			highlight = "FloatBorder",
			text = {
				top = "yooooooo",
				top_align = "center",
			},
		},
		position = "50%",
		size = {
			width = "80%",
			height = "60%",
		},
		buf_options = {
			modifiable = true,
			readonly = false,
		},
	})

	-- mount/open the component
	popup:mount()

	-- unmount component when cursor leaves buffer
	popup:on(event.BufLeave, function()
		popup:unmount()
	end)

	-- set content
	vim.api.nvim_buf_set_lines(popup.bufnr, 0, 1, false, { "Hello World" })
end

When calling this function, I get this:

and: thanks for the help!

That's so strange. I tried pulling again but no luck.
Are there any global options in nvim that might interfere with this? Here is a full but minimal example I just tried again with no luck:

function M.what()
	local popup = Popup({
		enter = true,
		focusable = true,
		order = {
			style = "solid",
			highlight = "FloatBorder",
			text = {
				top = "yooooooo",
				top_align = "center",
			},
		},
		position = "50%",
		size = {
			width = "80%",
			height = "60%",
		},
		buf_options = {
			modifiable = true,
			readonly = false,
		},
	})

	-- mount/open the component
	popup:mount()

	-- unmount component when cursor leaves buffer
	popup:on(event.BufLeave, function()
		popup:unmount()
	end)

	-- set content
	vim.api.nvim_buf_set_lines(popup.bufnr, 0, 1, false, { "Hello World" })
end

When calling this function, I get this:

Ah sorry, had a typo - order should be border of course.

I should mention:
nvim --version
NVIM v0.5.1
Build type: Release
LuaJIT 2.0.5
Compilation: /usr/bin/cc -D_FORTIFY_SOURCE=2 -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNVIM_TS_HAS_SET_MATCH_LIMIT -O2 -DNDEBUG -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=always -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -DMIN_LOG_LEVEL=3 -I/build/neovim/src/neovim-0.5.1/build/config -I/build/neovim/src/neovim-0.5.1/src -I/usr/include -I/build/neovim/src/neovim-0.5.1/build/src/nvim/auto -I/build/neovim/src/neovim-0.5.1/build/include
Kompileret af builduser

Features: +acl +iconv +tui
See ":help feature-compile"

    system vimrc-fil: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/share/nvim"

Run :checkhealth for more info

And running on Arch Linux.

Does the border appear if you don't use border.text?
    border = {
      style = "rounded",
      highlight = "FloatBorder",
    },

Does the border appear if you don't use border.text?
    border = {
      style = "rounded",
      highlight = "FloatBorder",
    },

Jep! curiusly though I can't tell the difference between rounded, single and double. They look the same here. Shadow and none work fine.

I wonder if this is a font issue 🤔 Which font are you using?
Can you try using one of the Nerd Fonts? https://aur.archlinux.org/packages/nerd-fonts-complete/

I wonder if this is a font issue thinking Which font are you using?
Can you try using one of the Nerd Fonts? https://aur.archlinux.org/packages/nerd-fonts-complete/

Ah that sounds correct! I am using Adobe Source Code Pro in Kitty.

Let me know if changing font fixes it, otherwise we'll need to investigate further to find the bug 😄

Let me know if changing font fixes it, otherwise we'll need to investigate further to find the bug smile

Thanks for the tip. I tried again with a nerd font set in Kitty, and it didn't do the trick. Also tried in Alacritty just to check and it doesnt work there either.

This works now it seems. Thanks!


Standard process to handle reload of web client after backend deployment

Describe the problem
We have clients that use our SvelteKit app 24/7 on a single PC, so we need to a solution to trigger a client reload after we have deployed a new app version to our backend.
Complication is that we can't just trigger a reload on a (git) version mismatch as our staged deployments take about 90 seconds and clients will be bounced by load balancers back and forth between new an old versions. They should only reload once.
Would like to see a best practice solution for SvelteKit.
Describe the proposed solution
Is it possible to access the JS filename tag that is generated during the building of a SvelteKit app?
Is that somehow ordered so a compare (">") on client side is possible?
Alternatives considered
No response
Importance
would make my life easier
Additional Information
The WhatsApp web client shows a small windows stating "Software was updated, click here to reload".

You should be able to use the updated store alongside version.pollInterval for this

Closing this since the ability to do it already exists to large degree. Further improvements are tracked in https://github.com/sveltejs/kit/issues/3666

A question regarding the version.pollInterval option.
From the docs:

SvelteKit solves this problem by falling back to traditional full-page navigation if it detects that a new version has been deployed, using the name specified here (which defaults to a timestamp of the build).

Does this mean that if I set the version.name and version.pollInterval, that SvelteKit will automatically disable the client side router and trigger a full reload on the next link click?
Is it not necessary for me to add my own subscription to the updated store to trigger a refresh?

If I read that correctly, then you don't even have to set a pollInterval; that is only to populate the updated store. All the logic about "falling back to traditional full-page navigation if it detects that a new version has been deployed" is purely based on the name parameter, which has a sensible default value.
And yet, the most common error in Sentry for my SvelteKit app is "Failed to fetch dynamically imported module".

If that's the case then it's definitely not working at the moment. I am also getting a lot of these and other errors that indicate that people are trying to navigate with an old version of the app.


Using the Quarkus extension of Java Operator SDK

I am playing with the Quarkus extension of the Java Operator SDK recently, for a talk I am preparing for and found it very promising in terms of development ease and small features they have + having the chance to run the operator natively.
https://github.com/quarkiverse/quarkus-operator-sdk
WDYT?
I guess our access operator is not that big and it would not be a huge deal to do the shift (needs some effort for sure).
Here is a good article series for the Quarkus extension: https://developers.redhat.com/articles/2022/02/15/write-kubernetes-java-java-operator-sdk
(and yes I am looking at these kinda stuff during my paternity leave🤦)

I think @katheris Intentionally wanted to avoid using the Quarkus extension for the time being.

I think @katheris Intentionally wanted to avoid using the Quarkus extension for the time being.

Oh, I see. Then let's wait for her to hear what she thought because I did not see any major problem with the extension except for using yet another library (or putting another layer between).
I especially liked the idea of being able to use the operator-sdk cli with it and having the benefits of using Quarkus, like native build.
I am pretty new in the java operators field so let's see what she says as she is more experienced with these. Thanks!

I especially liked the idea of being able to use the operator-sdk cli with it and having the benefits of using Quarkus, like native build.

FYI: The native build does not really work for us as it cannot do cross-platform compilation for the other platforms we support. So we had to abandon it for the projects using Quarkus such as Drain Cleaner.

@katheris any comments on this one? Why did we avoid using the one with Quarkus extension? To me it seems promising but I wonder what your concerns were.

Hey @mabulgu, there were a few reasons. Firstly, I am not very familiar with Quarkus, so it seemed sensible to only learn one new framework (i.e. Java Operator SDK), rather than needing to be familiar with two. Secondly it adds another set of dependencies that we rely on. So for example if a new version of JOSDK comes out we need to wait for the Quarkus plugin to also be updated before we can use it. Plus it adds another barrier to other Strimzi contributors to contribute to this component. Finally, when I reviewed the benefits of using Quarkus I wasn't convinced that they outweighed the other drawbacks I already listed. If you think that the benefits are worth it then I'm open to being convinced otherwise.

Hi @katheris. Some of the reasons that I think the Quarkus Operator SDK can be advantageous:
1- Being able to do DI
2- Native build possibilities (but AFAIU this is not an option, well at least for now)
3- Testing: The dev services makes it very easy to leverage testcontainers. For example: https://github.com/SystemCraftsman/java-operator-sdk-demo-javaday-ist-2023/blob/main/src/test/java/com/systemcraftsman/kubegame/test/OperatorFunctionalTest.java Thinking the Acecss operator needs some integration tests to be implemented, using Quarkus would make it too easy TBH. Testcontainers  can be leveraged without Quarkus of course, but this is a matter of making things "easy".
4- Easy integration with the supported libs/tools which is a quite good advantage for an operator.
5- Because of 1..4 ease of development experience
5- Quarkus is "kubernetes-native" already so why not:)) (j/k)
I hear you and get your point about keeping it more minimalistic and I agree that JOSDK is quite new already which both effects the learning curve and maintenance.
I just loved how those folks wrapped JOSDK and used it which is one of the reasons I thought it would not put much further risk, as the implementation is not that complex. But yeah things happen. So in the end this becomes yet another arch tradeoff:)
Closing this issue as I wanted to understand your thoughts on this.


update the installing doc

Ⅰ. Describe what this PR does
update the doc of installing fluid, such as upgrading to v0.5, the new CRDs, etc.
Ⅱ. Does this pull request fix one issue?

Ⅲ. List the added test cases (unit test/integration test) if any, please explain if no tests are needed.
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews

Codecov Report

Merging #630 (d2592db) into master (32f652d) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #630   +/-   ##
=======================================
  Coverage   17.69%   17.69%
=======================================
  Files          64       64
  Lines        2842     2842
=======================================
  Hits          503      503
  Misses       2289     2289
  Partials       50       50

Continue to review full report at Codecov.

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


split header into vue components + immense update to gfx

redesign of header

split header into components

responsive web design

changed few icons

checked with lint

closing in favor of cleanup version here -> https://github.com/egoist/codepan/pull/75


GraphQL error when making a PR comment in Codespaces

Saw this GraphQL error when making a comment in Codespaces:

Version: 1.63.2
Commit: 899d46d82c4c95423fb7e10e68eba52050e30ba3
Date: 2021-12-15T09:36:48.576Z
Browser: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4741.0 Safari/537.36 Edg/98.0.1100.3
ext version v0.34.2

The comment seems to have been made as it's visible on .com
Log:
[Info] /root/.ssh/config: ENOENT: no such file or directory, open '/root/.ssh/config'
[Info] Registering git provider
[Info] Looking for git repository
[Info] Found 1 repositories during activation
[Info] Git repository found, initializing review manager and pr tree view.
[Info] Review> Validate state in progress
[Info] Review> Validating state...
[Info] Found GitHub remote
[Info] Review> current branch pr/silamon/3546 is associated with pull request #3546
[Info] Review> Resolving pull request
[Info] Review> Fetching pull request data
[Info] Review> register comments provider
[Info] Review> display pull request status bar indicator and refresh pull request tree view.
[Info] Review> using focus mode = true.
[Info] Review> state validation silent = true.
[Info] Review> PR show should show = false.

I can't repro on a private non-org owned repo.

What is the repository this is happening in (is it org owned?)?
Is the PR coming from a fork?
Is the repo public?

@TylerLeonhardt FYI as this sounds like a scopes issue.

Here's the PR (yes, yes, yes) https://github.com/xtermjs/xterm.js/pull/3546

I can repro in that PR when I try to add a single comment. (Sorry about the spam in the PR!)
It seems to be related to the the SubmitReview mutation we do (https://github.com/microsoft/vscode-pull-request-github/blob/690e871223e56bbd74f82755b6db4a8dd8c00446/src/github/queries.gql#L565-L576)

Looks like an upstream issue since it works fine outside of Codespaces.

Probably wanna bring @jkeech into this? Maybe there's an issue tracked there?

The upstream Codespaces issue has been closed without a fix. Closing in favor of the upstream issue.


parallel/per-domain NURBS file support?

Is it possible to output an MFEM NURBS mesh (like the ball-nurbs.mesh example) that spans multiple files (e.g. one domain per file)? Support for such a capability would be ideal for a parallel application outputting meshes in this format. Thanks in advance for your input and guidance!

Unfortunately, the answer at the moment is no.

Thanks, @v-dobrev. We can get around this for the time being by funneling all of the data back to rank 0 and publishing the mesh to a single file, but it would be great to remove this reduction step when a parallel format is available in the future!


Indexing Q-A in workspace for RAG

Hi,
What is the best way/format to index a set of Questions and Answers into a workspace?
Also, can we add Q-A data into the same workspace alongside a set of PDFs? Or is it recommended to add them in separate workspaces only?
I tried together, and the RAG doesn't seem to pick up Q-A content while chatting. So, I'm trying to figure out if my indexing is correct or not.
Thank you.

Hi @charles-marion ,
That's very insightful. Only top 3 would definitely cause a limitation with a heterogenous mix of docs and Q-A, esp. on data with noise.
Yes, I will run some tests after looking into the ranking workflow. It was pulling up only the questions (and no answers) when I tested out via the Sematic search for some reason.
Good point, though I would be concerned with token limitations on the private instance route and token costs overall with that approach. Unless I'm mistaken in my understanding?
Thanks a lot for your valuable insights and suggestions. Appreciate it!


Query should be sign-able

Problem
Discussed in https://github.com/hashgraph/hedera-sdk-java/discussions/578

Originally posted by danielakhterov January 19, 2021
Currently queries and transactions are mostly distinct on the fact a transaction is sign-able, while a query is not. This doesn't make sense as a query has a payment transaction within it, and should allow those payment transactions to be signed by multiple keys if necessary.
Solution
If both transactions and queries are to now going to be sign-able, perhaps this code could be abstracted away into a new private type called Request, or we could shove this into Executable like we did for nodeAccountIds, but I'm not a big fan of  that.
This is what I have in mind
abstract class Request<SdkRequestT extends Request<SdkRequestT, ProtoRequestT, ResponseT, O>, ProtoRequestT, ResponseT, O>
    extends Executable<SdkRequestT, ProtoRequestT, ResponseT, O> {

    public abstract SdkRequestT freezeWith(@Nullable Client client);

    public SdkRequestT freeze() {
        ...
    }

    public final SdkRequestT sign(PrivateKey privateKey) {
        ...
    }

    public SdkRequestT signWith(PublicKey publicKey, Function<byte[], byte[]> transactionSigner) {
        ...
    }

    public SdkRequestT signWithOperator(Client client) {
        ...
    }

    public SdkRequestT addSignature(PublicKey publicKey, byte[] signature) {
        ...
    }

    public Map<AccountId, Map<PublicKey, byte[]>> getSignatures() {
        ...
    }
}

We could move most of the functionality from Transaction into this new Request type which would simply both Transaction and Query. For instance currently Transaction has these fields
    protected List<com.hedera.hashgraph.sdk.proto.Transaction> transactions = Collections.emptyList();
    protected List<com.hedera.hashgraph.sdk.proto.SignedTransaction.Builder> signedTransactions = Collections.emptyList();
    protected List<SignatureMap.Builder> signatures = Collections.emptyList();

If we move these fields into Request then Query can treat transactions as the payment transactions, while Transaction continues treating these fields as normally does.
Alternatives
No response

Closing in favor of https://github.com/hashgraph/hedera-sdk/issues/60


It let me input passphrase when I run match on a different machine

New Issue Checklist

[✅] Updated fastlane to the latest version
[✅] I have read the Contribution Guidelines

Issue Description
I run fastlane match ... in my personal Mac first, it completed. But I run it in my work Mac it will show follow block. I'm sure that my passphrase is right.
+-----------------------+----------------------------------------------------+
|                          Summary for match 2.28.9                          |
+-----------------------+----------------------------------------------------+
| type                  | adhoc                                              |
| app_identifier        | com.segcompany.client.test                       |
| readonly              | true                                               |
| git_url               | git@bkyard-git.segcompany.com:OMG/ios-cert.git |
| git_branch            | master                                             |
| username              |<EMAIL_ADDRESS>                             |
| keychain_name         | login.keychain                                     |
| team_id               | XXXXXXXX                                         |
| verbose               | false                                              |
| force                 | false                                              |
| skip_confirmation     | false                                              |
| shallow_clone         | false                                              |
| force_for_new_devices | false                                              |
| skip_docs             | false                                              |
| platform              | ios                                                |
+-----------------------+----------------------------------------------------+

[16:01:32]: Cloning remote git repo...
[16:01:33]: Enter the passphrase that should be used to encrypt/decrypt your certificates
[16:01:33]: This passphrase is specific per repository and will be stored in your local keychain
[16:01:33]: Make sure to remember the password, as you'll need it when you run match on a different machine
[16:01:33]: Passphrase for Git Repo: ************
[16:04:35]: Type passphrase again: ************
security: SecKeychainAddInternetPassword <NULL>: The user name or passphrase you entered is not correct.
[16:04:38]: Enter the passphrase that should be used to encrypt/decrypt your certificates
[16:04:38]: This passphrase is specific per repository and will be stored in your local keychain
[16:04:38]: Make sure to remember the password, as you'll need it when you run match on a different machine
[16:04:38]: Passphrase for Git Repo:

Environment
✅ fastlane environment ✅
Stack

Key
Value

OS
10.12.3

Ruby
2.3.1

Bundler?
false

Git
git version 2.11.0

Installation Source
~/.rvm/gems/ruby-2.3.1/bin/fastlane

Host
Mac OS X 10.12.3 (16D32)

Ruby Lib Dir
~/.rvm/rubies/ruby-2.3.1/lib

OpenSSL Version
OpenSSL 1.0.2j  26 Sep 2016

Is contained
false

Is homebrew
false

Is installed via Fabric.app
false

Xcode Path
/Applications/Xcode.app/Contents/Developer/

Xcode Version
8.2.1

System Locale

Variable
Value

LANG
zh_CN.UTF-8
✅

LC_ALL

LANGUAGE

fastlane files:
No Fastfile found
No Appfile found
fastlane gems

Gem
Version
Update-Status

fastlane
2.28.9
✅ Up-To-Date

Loaded fastlane plugins:
No plugins Loaded
Loaded gems

Gem
Version

did_you_mean
1.0.0

slack-notifier
1.5.1

CFPropertyList
2.3.4

claide
1.0.1

colored2
3.1.2

nanaimo
0.2.3

xcodeproj
1.4.4

rouge
1.11.1

xcpretty
0.2.4

terminal-notifier
1.7.1

terminal-table
1.4.5

plist
3.2.0

public_suffix
2.0.4

addressable
2.5.0

multipart-post
2.0.0

word_wrap
1.0.0

tty-screen
0.5.0

babosa
1.0.2

colored
1.2

highline
1.7.8

commander-fastlane
4.4.4

excon
0.54.0

faraday
0.10.0

unf_ext
<IP_ADDRESS>

unf
0.1.4

domain_name
0.5.20161129

http-cookie
1.0.3

faraday-cookie_jar
0.0.6

fastimage
1.6.8

gh_inspector
1.0.2

uber
0.0.15

representable
2.3.0

retriable
2.1.0

hurley
0.2

little-plugger
1.1.4

multi_json
1.12.1

logging
2.1.0

jwt
1.5.6

memoist
0.15.0

os
0.9.6

signet
0.7.3

googleauth
0.5.1

httpclient
<IP_ADDRESS>

google-api-client
0.9.20

mini_magick
4.5.1

multi_xml
0.6.0

rubyzip
1.1.7

security
0.1.3

xcpretty-travis-formatter
0.0.4

dotenv
2.1.1

bundler
1.13.6

faraday_middleware
0.10.1

json
2.0.3

io-console
0.4.5

generated on: 2017-05-08

You can read the password from your personal Mac by opening up the Keychain and searching for match 👍

@KrauseFx  Yes, I have read the password, but it still show me that is not correct. 💔

And if I create new git repo for match git_url, and run first in my work Mac, it show me a different infomation, like followed:
[15:38:53]: Verifying that the certificate and profile are still valid on the Dev Portal...
-------------------------------------------------------------------------------------
Please provide your Apple Developer Program account credentials
The login information you enter will be stored in your macOS Keychain
You can also pass the password using the `FASTLANE_PASSWORD` environment variable
More information about it on GitHub: https://github.com/fastlane/fastlane/tree/master/credentials_manager
-------------------------------------------------------------------------------------
Password (for ios@segcompany.com): *********
security: SecKeychainAddInternetPassword <NULL>: The user name or passphrase you entered is not correct.
Could not store password in keychain
[15:39:12]: Couldn't find a valid code signing identity in the git repo for development... creating one for you now

+---------------+------------------------------------------------------+
|                       Summary for cert 2.28.9                        |
+---------------+------------------------------------------------------+
| development   | true                                                 |
| force         | true                                                 |
| username      |<EMAIL_ADDRESS>                               |
| team_id       | XXXXXXXX                                           |
| keychain_path | /Users/geminiwen/Library/Keychains/login.keychain-db |
| platform      | ios                                                  |
+---------------+------------------------------------------------------+

[15:39:12]: Starting login with user<EMAIL_ADDRESS>

git_url "git@bkyard-git.segcompany.com:OMG/ios-cert.git"
-------------------------------------------------------------------------------------
Please provide your Apple Developer Program account credentials
The login information you enter will be stored in your macOS Keychain
You can also pass the password using the `FASTLANE_PASSWORD` environment variable
More information about it on GitHub: https://github.com/fastlane/fastlane/tree/master/credentials_manager
-------------------------------------------------------------------------------------
Password (for ios@segcompany.com): *********
security: SecKeychainAddInternetPassword <NULL>: The user name or passphrase you entered is not correct.
Could not store password in keychain
[15:39:21]: Successfully logged in

Looking for related GitHub issues on fastlane/fastlane...

➡  Using Match with already existing profiles and certificates
    https://github.com/fastlane/fastlane/issues/8591 [closed] 9 💬
    4 weeks ago

➡  match: Could not create another certificate, reached the maximum number of available certificates.
    https://github.com/fastlane/fastlane/issues/5765 [closed] 4 💬
    06 Dec 2016

➡  How can I reuse same signing certificates on different apps?
    https://github.com/fastlane/fastlane/issues/7021 [closed] 7 💬
    13 Feb 2017

and 16 more at: https://github.com/fastlane/fastlane/search?q=Could%20not%20create%20another%20Development%20certificate,%20reached%20the%20maximum%20number%20of%20available%20Development%20certificates.&type=Issues&utf8=✓

🔗  You can ⌘ + double-click on links to open them directly in your browser.

[!] Could not create another Development certificate, reached the maximum number of available Development certificates.

security: SecKeychainAddInternetPassword <NULL>: The user name or passphrase you entered is not correct.
Could not store password in keychain

Mh, that means fastlane doesn't have access to your Keychain, can you verify that

@dawnnnnn On a similar issue, I had to use the fastlane unlock_keychain action to allow passwords to to be saved. I had to unlock mine manually because macOS doesn't automatically unlock the keychain if you SSH in, or if the keychain password is different from your login password.
I passed it in as an environment variable and added this to my Fastfile:
  before_all do
    unlock_keychain(path: 'login') if ENV['FL_UNLOCK_KEYCHAIN_PASSWORD']
  end

Then you can test if this resolves your issue by setting the variable before your command. For example:
$ FL_UNLOCK_KEYCHAIN_PASSWORD="my_password" bundle exec fastlane certs

(If you have a lane called certs which calls match).


Add default console action named mailqueue to process mails

This change aims to add a default action that can be croned out.

A change to the composer.json to add the Bootstrap class
This class defines the new action and map it
The action class controller defines a simple process action that calls  \Yii::$app->mailqueue->process(); as described in the docs.

Interesting, thanks for the feature.

Welcome.
I was wondering about a mailqueue extension and found yours wich simply implements the feature I need.
Has added the command mapping quickly for my need but here are some limitations / enhencements sugestions :

Docs needs some update in the cron job section adding a describtion to this feature.
Background sending process should be safer in case this process() function was called multiple times (calling the batch action in the same time for instance).
I suggestion adding a new column to the queue table called 'status'. Once the process() function found some mails to be sent say 5, first thing to do is to update the status field of these 5 mails to 'S' for sending. Then process them one by one and after successfull sending or failure update the satus fields accordingly.
This way if another process tries to find out new mails for sending in the same time it will not send same mails as the first process.
The status for new mails will be 'N' for new, 'F' for failed and 'D' for done.
Suggesting also to add a new field for expiry date of mails; this might be useful if the mails you send will have no meaning of failed to be send in the hour or two..  for instance announcing an event.
The queue() call will have a new optional parameter to set the expiry duration in minutes, it will be calculated and added to the sent date


Saleor 1736 configuration channels

I want to merge this change because I created tests for channels

PR intended to be tested with API branch:
Screenshots

Pull Request Checklist

[ ] All visible strings are translated with proper context.
[ ] All data-formatting is locale-aware (dates, numbers, and so on).
[ ] Translated strings are extracted.
[ ] Number of API calls is optimized.
[ ] The changes are tested.
[ ] Data-test are added for new elements.
[ ] Type definitions are up to date.
[ ] Changes are mentioned in the changelog.

Test environment config

API_URI=https://master.staging.saleor.cloud/graphql/

view on LGTM.com

If this new Set actually always resolves to true then can we remove it?


Request: Firebase Analytics Support

I would like to add Firebase as a destination to Segment as per this documentation.
Seems like this has been in the making?
Maybe some others who would also like this can upvote the post.

Interested in this as well. I am curious how to add destinations and make them compatible to the flutter app. For example, how can I send push notifications (e.g. using Firebase FCM) based on the events tracked with Segment. Any help would be appreciated

I can help for this, I'll send you PR for this, soon

@geoox to integrate push with Firebase, go to the Firebase SDK implementation and docs, it is not related to this library.

@geoox to integrate push with Firebase, go to the Firebase SDK implementation and docs, it is not related to this library.

it's related btw, we need to integrate firebase sdk with segment.
@geoox you can use my branch if you need it here

Any updates on this one? Firebase Analytics support is something many people would want.

@Imgkl you can fork this plugin or use mine Firebae Integration, if you need it now.

@danielgomezrico  maybe can merge @ariefwijaya  implementation?
I was test this and works ok

@RicharC293 there are no PRs to merge, if you want you can use @ariefwijaya fork

I can create a PR for firebase analytics, but mine requires this PR https://github.com/la-haus/flutter-segment/pull/18
@RicharC293 @danielgomezrico

Then no becuase it can not be merged like that

@ariefwijaya, could you please introduce how you add configuration to Firebase as a destination for Segment on your fork? I wonder if it is necessary, for example, to add changes to build.gradle on your fork, or is it already configured? Second, how to invoke a configuration for a Segment so that Firebase is the destination?

@Mik77o  You can see my fork to compare, but here are the things:

as you can see here, Firebase Analytics only support device mode integration, it means we don't have any chance to use server-side integration. So we don't need to add firebase as destination for our segment admin dashboard.

In my fork, I've added some required dependencies state on this documentation. The most important part is we need to register the integration like this:

Then, segment will automatically distribute the tracking data to firebase destination in device mode.

@danielgomezrico I just created a PR to solve this issue. Hope it helps everyone, it is currently working fine in our app. Let me know what else I need to do to merge this into the master branch.

We need this integration for our atrribution events, +1 to getting the above merged ASAP  👀

@jeffkelsey if you need it now, you could use it from your project if you point to the branch

@danielgomezrico , which branch? It looks like the PR here has build errors for android.

@danielgomezrico  do you have any idea on the timeline for getting the proper firebase support into the flutter segment plugin? The business team is asking me about this since all our tracking is through flutter segment and we need to get our flutter events in place without having to track our events twice (once in segment, once with firebase  analytics sdk).

From our side, there are no plans to include it, our business does not require that, I don't ask you to open a PR  adding this because theres a blocker to merge this kind of PRs here:

https://github.com/la-haus/flutter-segment/issues/49

You could have a branch with the integration or fix the issues on the PR from thorgexyz too if you want to use it

@jeffkelsey I'm in the same situation right now, how did you handle this considering the attempts to add this integration were blocked?
Using a fork seems like a strange option to me... you would have to eternally merge with the main branch to get updates that might be useful and handle eventual conflicts, idk :/ seems like a bad solution

I de prioritized the firbase analytics work, Biz team was not happy

so basically still waiting for a solution? hahah, oh well here we go

so basically still waiting for a solution? hahah, oh well here we go

yeah, waiting for a better option 😴😴😴


Add rubocop

:heavy_plus_sign: rubocop gem
:heavy_plus_sign: rubocop and test in CI
:wrench: fixed SOME OF the offenses, disabled some
:information_source:
Still some offenses in .rubocop_todo.yml, mainly metrics

Thanks a lot for this work and sorry that late reply 🙏🏼
After some time of inactivity, we are doing some issue/pr gardening these days in order to keep this relevant project up to date. I'm going to close this one for now, there are a lot of conflicts (even deleted files) and it will be quite hard to rebase it.
On the other hand, we are not sure if we want a linter yet. Maybe we'll revisit this topic in the future. We can also analyze other options like standard and integration in our CI.
Thanks again!


payloads: document all variables with missing proper description

In the past, some variables where added with a generic description
as " is reserved for future use". This commit contains all
new proper descriptions for the variables. With this change we ensure
our documentation is aligned to the development standard guideline
ciao is following.
Fixes #397
Signed-off-by: Leoswaldo Macias<EMAIL_ADDRESS>

Coverage remained the same at 64.707% when pulling 4a68026df462a06a4ca6cf0f4af02e75b9e9b3e8 on leoswaldo:leoswaldo/topic/payloads-docs into dd98c8947fcf0431c4606760491c81c64576703e on 01org:master.

Coverage decreased (-0.007%) to 64.687% when pulling 640b2b8b50ed87c5aeeda6a917749c3e9fa15e80 on leoswaldo:leoswaldo/topic/payloads-docs into f857ab7eb1df2c5c62951317eaf4667b9ae83eb6 on 01org:master.

Coverage increased (+0.007%) to 64.701% when pulling 640b2b8b50ed87c5aeeda6a917749c3e9fa15e80 on leoswaldo:leoswaldo/topic/payloads-docs into f857ab7eb1df2c5c62951317eaf4667b9ae83eb6 on 01org:master.

Coverage increased (+0.01%) to 64.707% when pulling 2b5ec9f76d2ed1f7e6c4e643f8f91db2ae12acf8 on leoswaldo:leoswaldo/topic/payloads-docs into f857ab7eb1df2c5c62951317eaf4667b9ae83eb6 on 01org:master.


Suggest Widget: will not close on escape

Steps to Reproduce:

Open a javascript file
Input this code:

const str = 'Test test1 test2'
str.  // <= intellisense pops up string info
Esc will not close the suggestion widget.  Shift+Esc does close it.
Occurs in javascript files in Insider's Build - I have not seen it in my other languages (limited to css, html and json files) or Stable in any language.

Does this issue occur when all extensions are disabled?: Yes
Version: 1.51.0-insider (user setup)
Commit: 49696e87c64f478f97909a91d41ff2913df9bf71
Date: 2020-10-31T00:22:00.097Z
Electron: 9.3.3
Chrome: 83.0.4103.122
Node.js: 12.14.1
V8: <IP_ADDRESS>-electron.0
OS: Windows_NT x64 10.0.20246

This works for me. Please retry without extensions enabled. Select 'Extensions View > ... > Disable all Installed Extensions' and try again. Thanks.

Arg, sorry for the noise.  I had a keybinding I was testing some time back that was conflicting:
{
  "key": "escape",
  "command": "editor.action.triggerParameterHints",
  "when": "editorHasSignatureHelpProvider && editorTextFocus"
},

Disabled it and all is fine.  Sorry.

You can add !suggestWidgetVisible to that when-clause and things should be working for you


pull request for e2e test at 01/19/2017 00:56:14

:white_check_mark: Validation status: passed
For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.


Update service-admin-premium-multi-geo.md

As per the ICM here  Incident-281933629 Details - IcM (microsofticm.com) , we learnt that score cards are not supported. Please review and push the changes
CC:@KesemSharabi

@Chandrika311 : Thanks for your contribution! The author(s) have been notified to review your proposed change.

#label:"aq-pr-triaged"

Hi @Chandrika311,
I've asking the PM to confirm, and will then update the document.
Thanks,
Kesem

@KesemSharabi : Thanks for your contribution! The author(s) have been notified to review your proposed change.


API Product resource search and apiList  should only show Rest API lists

Current, search Results and API List in API Product Resources Page display all the APIs, products, API docs, Product Docs. It should be displayed in only for rest APIs.

Closed the issue as per above commit


snippets not work for html

snippets not work!i have create a snippets  for html in snippets /html.json("prefix": "aaaaaa",),now i create a new file save to demo.html and i write  "aaaaaa" in the first row , but i can not see the temple in my code!( "aaaaaa" + TAB is not work! )

please share the snippet and the file in which in you try this. please share the exact position at which you try this

please share the snippet and the file in which in you try this. please share the exact position at which you try this

hi，i have slove by myself.this issue cause by the Extension ！Thanks your reply！