Example of symbols enumeration

Can you provide a short example how to enumerate symbols from export table?
Can't imagine where to get all arguments to mk_string_table_enumerate_strings.

Right now I have a problem with mk_segment_t creation:
__block mk_memory_map_self_t memory_map;
mk_error_t err = mk_memory_map_self_init(NULL, &memory_map);
NSCAssert(err == MK_ESUCCESS, @"");

for (uint32_t i = 0; i < _dyld_image_count(); i++) {
    const char *image_name = _dyld_get_image_name(i);
    if ([[NSString stringWithCString:image_name encoding:NSUTF8StringEncoding] hasSuffix:@"/dyld_sim"]) {
        continue;
    }

    __block mk_macho_t macho;
    mk_vm_address_t headerAddress = (mk_vm_address_t)_dyld_get_image_header(i);
    intptr_t slide = _dyld_get_image_vmaddr_slide(i);
    mk_error_t err = mk_macho_init(NULL, image_name, slide, headerAddress, &memory_map, &macho);
    if (err != MK_ESUCCESS) {
        NSLog(@"Error parsiong MachO of %s", image_name);
        continue;
    }

    mk_macho_enumerate_commands(&macho, ^(struct load_command *load_command, uint32_t index, mk_vm_address_t host_address) {
        if (load_command->cmd != LC_SYMTAB && load_command->cmd != LC_DYSYMTAB) {
            return;
        }

        mk_load_command_t command_object;
        mk_error_t err = mk_load_command_init(&macho, load_command, &command_object);
        if (err != MK_ESUCCESS) {
            NSLog(@"Error creating MachO command");
            return;
        }

        mk_segment_t segment;
        err = mk_segment_init(&command_object, &segment); // <-- ERROR
        if (err != MK_ESUCCESS) {
            NSLog(@"Error creating MachO segment");
            return;
        }

        mk_symbol_table_t symbol_table;
        if (load_command->cmd == LC_SYMTAB) {
            mk_symbol_table_init(&segment, &command_object, NULL, &symbol_table);
        }
        else {
            mk_symbol_table_init(&segment, NULL, &command_object, &symbol_table);
        }

        mk_symbol_table_enumerate_mach_symbols(&symbol_table, 0, ^(const mk_mach_nlist symbol, uint32_t index, mk_vm_address_t host_address) {
            NSLog(@"");
        });
    });

    mk_macho_free(&macho);
}

My error is:
libMachO/libMachO/MachO_ABI/Segments/segment.c:61 The load_command used to initialize an mk_segment must be one of LC_SEGMENT or LC_SEGMENT64, got LC_SYMTAB

You get that error because you can only initialize an mk_segment_t with an LC_SEGMENT_64 or LC_SEGMENT load command.  I would use the mk_symbol_table_init_with_segment(...) convienience initializer for initializing the symbol table.  It requires only the LinkEdit segment (it will find the SYMTAB and DYSYMTAB load commands for you).
    mk_macho_enumerate_commands(&macho, ^(struct load_command *load_command, uint32_t index, mk_vm_address_t host_address) {
        if (load_command->cmd != LC_SEGMENT_64 && load_command->cmd != LC_SEGMENT) {
            return;
        }

        struct segment_command_64 *segment_command = (typeof(segment_command))load_command; // The choice between casting to segment_command_64 vs segment_command does not matter here

        if (strncmp(load_command->segname, SEG_LINKEDIT, 16) != 0) {
        	return;
        }

        mk_segment_t segment;
        err = mk_segment_init_with_mach_load_command(&macho, segment_command, &segment);
        if (err != MK_ESUCCESS) {
            NSLog(@"Error creating MachO segment");
            return;
        }

        mk_symbol_table_t symbol_table;
        err = mk_symbol_table_init_with_segment(&segment, &symbol_table);
        if (err != MK_ESUCCESS) {
            NSLog(@"Error creating MachO symbol table");
            return;
        }

        mk_symbol_table_enumerate_mach_symbols(&symbol_table, 0, ^(const mk_mach_nlist symbol, uint32_t index, mk_vm_address_t host_address) {
            NSLog(@"");
        });
    });

@DeVaukz thanks! Is it true I need to access string_table to get symbol chars?
__block mk_string_table_t string_table;
err = mk_string_table_init_with_segment(&segment, &string_table);
if (err != MK_ESUCCESS) {
    NSLog(@"Error creating MachO string table");
    return;
}

mk_symbol_table_enumerate_mach_symbols(&symbol_table, 0, ^(const mk_mach_nlist symbol, uint32_t index, mk_vm_address_t host_address) {
    uint32_t string_index = symbol.nlist_64->n_un.n_strx;
    const char *str = mk_string_table_get_string_at_offset(&string_table, string_index, &host_address);
    NSString *value = [NSString stringWithFormat:@"%s", str];
    STDMapInsert(dict, (void *)host_address, value);
});

And do I need to calculate mk_vm_address_t - base address + real module address to get real symbol address in memory? I am trying to create map of addresses to symbols, some kind of DSYM-less symbolication.

You need to initialize an mk_string_table_t and call mk_string_table_get_string_at_offset() to retrieve the symbol name.
For the address, assuming you are doing this in-process, add the result of mk_macho_get_slide() to the symbol n_value to get the in-process address.

@DeVaukz thanks! This code works fine for my purpose:
__block mk_string_table_t string_table;
err = mk_string_table_init_with_segment(&segment, &string_table);
if (err != MK_ESUCCESS) {
    NSLog(@"Error creating MachO string table");
    return;
}

mk_symbol_table_enumerate_mach_symbols(&symbol_table, 0, ^(const mk_mach_nlist symbol, uint32_t index, mk_vm_address_t host_address) {
    uint32_t string_index = symbol.nlist_64->n_un.n_strx;
#ifdef __LP64__
    uint64_t address = symbol.nlist_64->n_value + (uint64_t)slide;
#else
    uint64_t address = symbol.nlist->n_value + (uint64_t)slide;
#endif
    const char *str = mk_string_table_get_string_at_offset(&string_table, string_index, &host_address);
    if (strlen(str)) {
        NSLog(@"Symbol: %s address: %p", str, address);
    }
});

@DeVaukz thanks! Just published PuppyWatchdog pod with libMachO pod dependency: https://github.com/ML-Works/PuppyWatchdog


FusedBatchNorm with is_training = True is folded into unsupported ops

System information

OS Platform and Distribution (e.g., Linux Ubuntu 16.04):  Linux Ubuntu 16.04
TensorFlow installed from (source or binary): pip binary for 1.12
TensorFlow version (or github SHA if from source):  ('v1.12.0-0-ga6d8ffae09', '1.12.0')

Provide the text output from tflite_convert
RuntimeError: TOCO failed see console for info.
2018-12-20 11:50:10.890031: I tensorflow/contrib/lite/toco/import_tensorflow.cc:1080] Converting unsupported operation: Size
2018-12-20 11:50:10.890062: I tensorflow/contrib/lite/toco/import_tensorflow.cc:189] Unsupported data type in placeholder op: 2
2018-12-20 11:50:10.890069: I tensorflow/contrib/lite/toco/import_tensorflow.cc:189] Unsupported data type in placeholder op: 2
2018-12-20 11:50:10.890075: I tensorflow/contrib/lite/toco/import_tensorflow.cc:189] Unsupported data type in placeholder op: 2
2018-12-20 11:50:10.890241: I tensorflow/contrib/lite/toco/graph_transformations/graph_transformations.cc:39] Before Removing unused ops: 28 operators, 42 arrays (0 quantized)
2018-12-20 11:50:10.890357: I tensorflow/contrib/lite/toco/graph_transformations/graph_transformations.cc:39] Before general graph transformations: 28 operators, 42 arrays (0 quantized)
2018-12-20 11:50:10.890666: I tensorflow/contrib/lite/toco/graph_transformations/graph_transformations.cc:39] After general graph transformations pass 1: 20 operators, 31 arrays (1 quantized)
2018-12-20 11:50:10.890848: I tensorflow/contrib/lite/toco/graph_transformations/graph_transformations.cc:39] Before pre-quantization graph transformations: 20 operators, 31 arrays (1 quantized)
2018-12-20 11:50:10.890954: I tensorflow/contrib/lite/toco/graph_transformations/graph_transformations.cc:39] After pre-quantization graph transformations pass 1: 19 operators, 30 arrays (1 quantized)
2018-12-20 11:50:10.891050: I tensorflow/contrib/lite/toco/graph_transformations/graph_transformations.cc:39] Before default min-max range propagation graph transformations: 19 operators, 30 arrays (1 quantized)
2018-12-20 11:50:10.891093: I tensorflow/contrib/lite/toco/graph_transformations/graph_transformations.cc:39] After default min-max range propagation graph transformations pass 1: 19 operators, 30 arrays (1 quantized)
2018-12-20 11:50:10.891172: I tensorflow/contrib/lite/toco/graph_transformations/graph_transformations.cc:39] Before quantization graph transformations: 19 operators, 30 arrays (1 quantized)
2018-12-20 11:50:10.891194: W tensorflow/contrib/lite/toco/graph_transformations/quantize.cc:100] Constant array filter_0 lacks MinMax information. To make up for that, we will now compute the MinMax from actual array elements. That will result in quantization parameters that probably do not match whichever arithmetic was used during training, and thus will probably be a cause of poor inference accuracy.
2018-12-20 11:50:10.891217: F tensorflow/contrib/lite/toco/graph_transformations/quantize.cc:474] Unimplemented: this graph contains an operator of type (Unsupported TensorFlow op: Size) for which the quantized form is not yet implemented. Sorry, and patches welcome (that's a relatively fun patch to write, mostly providing the actual quantized arithmetic code for this op).
Aborted (core dumped)

Any other info / logs
When quantizing a FusedBatchNorm op with attribute is_training = True, this method in fold_batch_norms.py  performs a Bessel correction which adds currently unsupported Size and Cast operators to the graph.
""" Example of issue with TFLite support caused by FoldBatchNorms

    By applying a bessel correction to the graph using unsupported ops, the
    resulting graph cannot be exported as a UINT8, quantized, TFLite model
"""

import os
import tensorflow as tf
from tensorflow.python.tools import freeze_graph
from tensorflow.contrib.lite.python import lite_constants as constants
from foldbatchnorms import FoldBatchNorms
from tensorflow.contrib.quantize.python import quantize

# inits
CHECKPOINT_PATH = os.path.join('checkpoint', 'chkp')
QUANT_EVAL_GRAPH = 'model_quant_eval.pb'
FREEZE_GRAPH = 'model_quant_eval_freeze.pb'
TFLITE_PATH = 'model_quant_eval_freeze.tflite'

OUTPUT_NODE = 'out'
INPUT_NODE = 'input'
INPUT_STAT = {'input' : (0., 1.)}

# define a simple graph which includes a FusedBatchNorm operator
inp = tf.placeholder(shape=[None,299,299,3], dtype=tf.float32, name='input')
scale = tf.ones(shape=[32])
offset = tf.zeros(shape=[32])
_filter = tf.get_variable("filter", shape=[3,3,3,32],
                          initializer=tf.ones_initializer())

conv = tf.nn.conv2d(input=inp,
                    filter=_filter,
                    data_format='NHWC',
                    dilations=[1, 1, 1, 1],
                    strides=[1, 2, 2, 1],
                    padding='VALID')

y, _, _ = tf.nn.fused_batch_norm(x=conv,
                                 scale=scale,
                                 offset=offset,
                                 epsilon=0.0010000000474974513,
                                 is_training=True,
                                 data_format='NHWC')
tf.nn.relu(y, name='out')

with tf.Session() as sess:

    # quantize graph in-place using FakeQuant* ops (calls fold_batch_norms.py)
    tf.contrib.quantize.create_eval_graph()

    # init vars
    sess.run(tf.global_variables_initializer())

    # save metagraph .pb for converting to TFLite
    with open(QUANT_EVAL_GRAPH, 'w') as f:
        f.write(str(sess.graph.as_graph_def()))

    saver = tf.train.Saver()
    saver.save(sess, CHECKPOINT_PATH)

    # freeze the quantized (FakeQuant*) graph
    freeze_graph.freeze_graph(input_graph=QUANT_EVAL_GRAPH,
                              input_saver='',
                              input_binary=False,
                              input_checkpoint=CHECKPOINT_PATH,
                              output_node_names=OUTPUT_NODE,
                              restore_op_name="save/restore_all",
                              filename_tensor_name="save/Const:0",
                              output_graph=FREEZE_GRAPH,
                              clear_devices=False,
                              initializer_nodes='')

# convert frozen, quantized, eval graph to UINT8-quant TFLite model
converter = tf.contrib.lite.TFLiteConverter.from_frozen_graph(
                                        graph_def_file=FREEZE_GRAPH,
                                        input_arrays=[INPUT_NODE],
                                        output_arrays=[OUTPUT_NODE])

converter.inference_type = constants.QUANTIZED_UINT8
converter.inference_input_type = constants.QUANTIZED_UINT8
converter.quantized_input_stats = INPUT_STAT
converter.default_ranges_stats = (0,128) # <- bypass Conv2D missing Min/Max data
tflite_model = converter.convert() # <- this will fail

Pre-quantization graph containing FusedBatchNorm, Conv2D and Relu ops:

Post-quantization graph containing unsupported ops:

The TFLite converter expects an eval graph as input. This means a graph where all calls to batch norm are created with is_training=False.
So, you traing a float model with is_training=True and create_training_graph. Save the checkpoint.
Then you build the same model with is_training=False and create_eval_graph. This is the graph that the Tfliteconverter expects.

hi, I meet a problem during these days. I want get a tflite model using inference by uint8. my network include the batchnormalization layer. when I change the pb model to the tflite. there is always return a error message
"first_bn/FusedBatchNorm_mul_0, which is an input to the Add operator producing the output array kws_model/KWS_Model/tower_0/CNN_V1/Relu, is lacking min/max data, which is necessary for quantization. Either target a non-quantized output format, or change the input graph to contain min/max information, or pass --default_ranges_min= and --default_ranges_max= if you do not care about the accuracy of results.\nAborted (core dumped)"
if I add the "converter.default_ranges_stats=(0, 6)" or remove the bn layer  can fix the error , but I know its not the best method. please give me some suggestions. thanks.

Hi, I met the same problem @PaulMcInnis, did you solved it ?

Hi, I met the same problem @PaulMcInnis, did you solved it ?

The model you are using for inference should not have any batch normalization layers with is_training=True You need to make changes to your graph to set is_training=False prior to TFLite conversion.

Hi, I think my batch normalization layers are with is_trainging=False in the inference. Here is what I have done:
step 1. I train the model with quantized aware training, following the instruction in here.
step 2. I use an evaluation script to reload the model and freeze it. The code looks like this:
    with tf.Session(config=config) as sess:
        loader = tf.train.Saver()#net.restorable_variables())
        loader.restore(sess, pretrain_path)
        frozen_graph_def = graph_util.convert_variables_to_constants(
            sess, sess.graph_def, ['Openpose/concat_stage7'])
        eval_graph_file = base_dir + '/graph.pb'
        tf.train.write_graph(
            frozen_graph_def,
            os.path.dirname(eval_graph_file),
            os.path.basename(eval_graph_file),
            as_text=False)
        tf.logging.info('Saved frozen graph to %s', eval_graph_file)

step3. I use freeze_graph.py to freeze my code.
step4. tf.lite.TFLiteConverter.from_frozen_graph is utilized to convert the model to tflite file
step1-3 is working well. But I get the same error in step 4: unsupported op type cast. Here is the graph that related to the cast operation. Can you give me some clues? I checked the Internet, in the official google example of a quantized graph, there is no fuse batch norm. I don't know how to achieve that. Any suggestion.

@caiya55
have you solved this issue?


[WIP] ci/release: Use bazel to build binary bundles

Commit Message:
Additional Description:
Risk Level:
Testing:
Docs Changes:
Release Notes:
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Fixes commit #PR or SHA]
[Optional Deprecated:]
[Optional API Considerations:]

this is slightly slower in the RBE case as it has to zip/collate large files
adding a bazel pigz recipe would probably help, and is something i reckon could give us quite a few other speedups - ill experiment

this is slightly slower in the RBE case

not any longer, this is now significantly faster


Keras fails to combine predicted variable-sized sequences

System information

Have I written custom code (as opposed to using a stock example script provided in TensorFlow): No
OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Google Colab
Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device: No
TensorFlow installed from (source or binary): binary
TensorFlow version (use command below): v1.12.1-17764-gae26958 2.1.0-dev20191111
Python version: Google Colab py3
Bazel version (if compiling from source): No
GCC/Compiler version (if compiling from source): No
CUDA/cuDNN version: Google Colab
GPU model and memory: Google Colab

Describe the current behavior
Exception raised (from numpy concatenate) when predicting sequence labels with variable sequence length batches.
Describe the expected behavior
There should be no error, as in fit/evaluate methods work fine.
Code to reproduce the issue
https://colab.research.google.com/drive/1IPIkj5PlUWKCpuTm9NWM5BLO_suL5VI3
Other info / logs
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-23-e5e9890a3d75> in <module>()
----> 1 model.predict(get_dataset(labels=False))

5 frames
/usr/local/lib/python3.6/dist-packages/tensorflow_core/python/keras/engine/training.py in predict(self, x, batch_size, verbose, steps, callbacks, max_queue_size, workers, use_multiprocessing)
    972         max_queue_size=max_queue_size,
    973         workers=workers,
--> 974         use_multiprocessing=use_multiprocessing)
    975
    976   def reset_metrics(self):

/usr/local/lib/python3.6/dist-packages/tensorflow_core/python/keras/engine/training_v2.py in predict(self, model, x, batch_size, verbose, steps, callbacks, max_queue_size, workers, use_multiprocessing, **kwargs)
    496         model, ModeKeys.PREDICT, x=x, batch_size=batch_size, verbose=verbose,
    497         steps=steps, callbacks=callbacks, max_queue_size=max_queue_size,
--> 498         workers=workers, use_multiprocessing=use_multiprocessing, **kwargs)
    499
    500

/usr/local/lib/python3.6/dist-packages/tensorflow_core/python/keras/engine/training_v2.py in _model_iteration(self, model, mode, x, y, batch_size, verbose, sample_weight, steps, callbacks, max_queue_size, workers, use_multiprocessing, **kwargs)
    473               mode=mode,
    474               training_context=training_context,
--> 475               total_epochs=1)
    476           cbks.make_logs(model, epoch_logs, result, mode)
    477

/usr/local/lib/python3.6/dist-packages/tensorflow_core/python/keras/engine/training_v2.py in run_one_epoch(model, iterator, execution_function, dataset_size, batch_size, strategy, steps_per_epoch, num_samples, mode, training_context, total_epochs)
    185
    186   # End of an epoch.
--> 187   aggregator.finalize()
    188   return aggregator.results
    189

/usr/local/lib/python3.6/dist-packages/tensorflow_core/python/keras/engine/training_utils.py in finalize(self)
    349   def finalize(self):
    350     for result in self.results:
--> 351       result.finalize()
    352     self.results = [i.results for i in self.results]
    353     self.results = nest.pack_sequence_as(self._structure, self.results)

/usr/local/lib/python3.6/dist-packages/tensorflow_core/python/keras/engine/training_utils.py in finalize(self)
    187
    188     else:
--> 189       self.results = np.concatenate(self.results, axis=0)
    190
    191     if isinstance(self.results, ops.EagerTensor):

<__array_function__ internals> in concatenate(*args, **kwargs)

ValueError: all the input array dimensions for the concatenation axis must match exactly, but along dimension 1, the array at index 0 has size 7 and the array at index 1 has size 9

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

Issue still here with tf-nightly, but exception stack changed
---------------------------------------------------------------------------
InvalidArgumentError                      Traceback (most recent call last)
<ipython-input-16-e5e9890a3d75> in <module>()
----> 1 model.predict(get_dataset(labels=False))

11 frames
/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/training.py in _method_wrapper(self, *args, **kwargs)
     92       raise ValueError('{} is not supported in multi-worker mode.'.format(
     93           method.__name__))
---> 94     return method(self, *args, **kwargs)
     95
     96   return tf_decorator.make_decorator(

/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/training.py in predict(self, x, batch_size, verbose, steps, callbacks, max_queue_size, workers, use_multiprocessing)
   1394             callbacks.on_predict_batch_end(end_step, {'outputs': batch_outputs})
   1395       callbacks.on_predict_end()
-> 1396     all_outputs = nest.map_structure_up_to(batch_outputs, concat, outputs)
   1397     return tf_utils.to_numpy_or_python_type(all_outputs)
   1398

/usr/local/lib/python3.6/dist-packages/tensorflow/python/util/nest.py in map_structure_up_to(shallow_tree, func, *inputs, **kwargs)
   1129       lambda _, *values: func(*values),  # Discards the path arg.
   1130       *inputs,
-> 1131       **kwargs)
   1132
   1133

/usr/local/lib/python3.6/dist-packages/tensorflow/python/util/nest.py in map_structure_with_tuple_paths_up_to(shallow_tree, func, *inputs, **kwargs)
   1225                     in _yield_flat_up_to(shallow_tree, inputs[0], is_seq)]
   1226   results = [func(*args, **kwargs) for args in zip(flat_path_list,
-> 1227                                                    *flat_value_lists)]
   1228   return pack_sequence_as(structure=shallow_tree, flat_sequence=results,
   1229                           expand_composites=expand_composites)

/usr/local/lib/python3.6/dist-packages/tensorflow/python/util/nest.py in <listcomp>(.0)
   1224   flat_path_list = [path for path, _
   1225                     in _yield_flat_up_to(shallow_tree, inputs[0], is_seq)]
-> 1226   results = [func(*args, **kwargs) for args in zip(flat_path_list,
   1227                                                    *flat_value_lists)]
   1228   return pack_sequence_as(structure=shallow_tree, flat_sequence=results,

/usr/local/lib/python3.6/dist-packages/tensorflow/python/util/nest.py in <lambda>(_, *values)
   1127   return map_structure_with_tuple_paths_up_to(
   1128       shallow_tree,
-> 1129       lambda _, *values: func(*values),  # Discards the path arg.
   1130       *inputs,
   1131       **kwargs)

/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/training.py in concat(tensors, axis)
   1882   if isinstance(tensors[0], ragged_tensor.RaggedTensor):
   1883     return ragged_concat_ops.concat(tensors, axis=axis)
-> 1884   return array_ops.concat(tensors, axis=axis)
   1885
   1886

/usr/local/lib/python3.6/dist-packages/tensorflow/python/util/dispatch.py in wrapper(*args, **kwargs)
    178     """Call target, and fall back on dispatchers if there is a TypeError."""
    179     try:
--> 180       return target(*args, **kwargs)
    181     except (TypeError, ValueError):
    182       # Note: convert_to_eager_tensor currently raises a ValueError, not a

/usr/local/lib/python3.6/dist-packages/tensorflow/python/ops/array_ops.py in concat(values, axis, name)
   1628           dtype=dtypes.int32).get_shape().assert_has_rank(0)
   1629       return identity(values[0], name=name)
-> 1630   return gen_array_ops.concat_v2(values=values, axis=axis, name=name)
   1631
   1632

/usr/local/lib/python3.6/dist-packages/tensorflow/python/ops/gen_array_ops.py in concat_v2(values, axis, name)
   1196       return _result
   1197     except _core._NotOkStatusException as e:
-> 1198       _ops.raise_from_not_ok_status(e, name)
   1199     except _core._FallbackException:
   1200       pass

/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/ops.py in raise_from_not_ok_status(e, name)
   6810   message = e.message + (" name: " + name if name is not None else "")
   6811   # pylint: disable=protected-access
-> 6812   six.raise_from(core._status_to_exception(e.code, message), None)
   6813   # pylint: enable=protected-access
   6814

/usr/local/lib/python3.6/dist-packages/six.py in raise_from(value, from_value)

InvalidArgumentError: ConcatOp : Dimensions of inputs should match: shape[0] = [5,6,1] vs. shape[2] = [5,10,1] [Op:ConcatV2] name: concat

@shkarupa-alex,
Seems like the error has been fixed in TF v2.2. I was able to run the code without any issues with TF v2.2, please find the gist of it here. Thanks!

@shkarupa-alex,
Seems like the error has been fixed in stable version of TF v2.2. I was able to run the code without any issues with TF v2.2, please find the gist of it here. Thanks!

Nope.
Issue is still present in tf-nightly (see link to colab in issue head).

I have tried in colab with TF version 2.3, nightly version(2.4.0-dev20200728) and was able to reproduce the issue.Please, find the gist here.Thanks!

@shkarupa-alex Thanks for the issue! In order to combine Tensors of different shapes, your Model will need to output RaggedTensors. You can do this by adding a Layer at the end of your Model to convert each Tensor to a RaggedTensor. The Dense layer currently at the end of the Model is outputting regular Tensors, and to concat these for Model.predict, only the 0-axis can have different shapes

@shkarupa-alex Thanks for the issue! In order to combine Tensors of different shapes, your Model will need to output RaggedTensors. You can do this by adding a Layer at the end of your Model to convert each Tensor to a RaggedTensor. The Dense layer currently at the end of the Model is outputting regular Tensors, and to concat these for Model.predict, only the 0-axis can have different shapes

how do you output a ragged tensor from your dense layer with Keras Tensorflow?
ex. my last layer is:
model.add(TimeDistributed(Dense(2, activation='sigmoid')))
how do i specify this layer to output ragged?

Dense layers don't support ragged tensors.
So, i wrote a small wrapper
class MapFlat(layers.Wrapper):
    def __init__(self, layer, **kwargs):
        super().__init__(layer, **kwargs)
        self._supports_ragged_inputs = True

    def build(self, input_shape=None):
        super(MapFlat, self).build([None])

    def call(self, inputs, **kwargs):
        return tf.ragged.map_flat_values(self.layer, inputs)

    @shape_type_conversion
    def compute_output_shape(self, input_shape):
        return input_shape + self.layer.compute_output_shape([None])[1:]

Use it like so:
model.add(WithRagged(Dense(2, activation='sigmoid')))

Dense layers don't support ragged tensors. So, i wrote a small wrapper
class MapFlat(layers.Wrapper):
    def __init__(self, layer, **kwargs):
        super().__init__(layer, **kwargs)
        self._supports_ragged_inputs = True

    def build(self, input_shape=None):
        super(MapFlat, self).build([None])

    def call(self, inputs, **kwargs):
        return tf.ragged.map_flat_values(self.layer, inputs)

    @shape_type_conversion
    def compute_output_shape(self, input_shape):
        return input_shape + self.layer.compute_output_shape([None])[1:]

Use it like so:
model.add(WithRagged(Dense(2, activation='sigmoid')))

Thank you so much for creating this code example for me ! I really appreciate it.
Unfortunately it did not run, WithRagged is undefined in this example, did you mean to use MapFlat instead like this?
model.add(MapFlat(Dense(2, activation='sigmoid')))
if my model requires the use of TimeDistributed layer would this still work with a RaggedTensor?
def action_model():

    model = keras.Sequential()

    model.add(Bidirectional(LSTM(101,return_sequences=True),input_shape=(None,101)))
    model.add(Bidirectional(LSTM(25,return_sequences=True)))
    model.add(TimeDistributed(Dense(20,activation='relu')))
    model.add(Dropout(0.4))
    model.add(TimeDistributed(Dense(16,activation='relu')))
    model.add(Dropout(0.4))
    model.add(TimeDistributed((MapFlat(Dense(2, activation='sigmoid')))))

I tried to run this model but got the following error:
Traceback (most recent call last):
  File "rnn-tf.py", line 133, in <module>
    model = action_model()
  File "rnn-tf.py", line 128, in action_model
    model.add(MapFlat(Dense(2, activation='sigmoid')))
  File "/opt/anaconda3/envs/nnml38/lib/python3.8/site-packages/tensorflow/python/training/tracking/base.py", line 517, in _method_wrapper
    result = method(self, *args, **kwargs)
  File "/opt/anaconda3/envs/nnml38/lib/python3.8/site-packages/tensorflow/python/keras/engine/sequential.py", line 223, in add
    output_tensor = layer(self.outputs[0])
  File "/opt/anaconda3/envs/nnml38/lib/python3.8/site-packages/tensorflow/python/keras/engine/base_layer.py", line 951, in __call__
    return self._functional_construction_call(inputs, args, kwargs,
  File "/opt/anaconda3/envs/nnml38/lib/python3.8/site-packages/tensorflow/python/keras/engine/base_layer.py", line 1090, in _functional_construction_call
    outputs = self._keras_tensor_symbolic_call(
  File "/opt/anaconda3/envs/nnml38/lib/python3.8/site-packages/tensorflow/python/keras/engine/base_layer.py", line 822, in _keras_tensor_symbolic_call
    return self._infer_output_signature(inputs, args, kwargs, input_masks)
  File "/opt/anaconda3/envs/nnml38/lib/python3.8/site-packages/tensorflow/python/keras/engine/base_layer.py", line 862, in _infer_output_signature
    self._maybe_build(inputs)
  File "/opt/anaconda3/envs/nnml38/lib/python3.8/site-packages/tensorflow/python/keras/engine/base_layer.py", line 2710, in _maybe_build
    self.build(input_shapes)  # pylint:disable=not-callable
  File "rnn-tf.py", line 109, in build
    super(MapFlat, self).build([None])
  File "/opt/anaconda3/envs/nnml38/lib/python3.8/site-packages/tensorflow/python/keras/layers/wrappers.py", line 59, in build
    self.layer.build(input_shape)
  File "/opt/anaconda3/envs/nnml38/lib/python3.8/site-packages/tensorflow/python/keras/layers/core.py", line 1182, in build
    raise ValueError('The last dimension of the inputs to `Dense` '
ValueError: The last dimension of the inputs to `Dense` should be defined. Found `None`.

This whole issue is very bizarre because I am able to train my network using this model, with variable-sized sequences, but when it comes to model.predict there is a failure.

Sorry, seems i posted wrong class. Here it is correct one:
import tensorflow as tf
from keras import backend, layers
from keras.utils.generic_utils import has_arg, register_keras_serializable
from keras.utils.tf_utils import shape_type_conversion

class WithRagged(layers.Wrapper):
    """ Passes ragged tensor to layer that accepts only dense one.

    Arguments:
      layer: The `Layer` instance to be wrapped.
    """

    def __init__(self, layer, **kwargs):
        super(WithRagged, self).__init__(layer, **kwargs)
        self.input_spec = layer.input_spec
        self.supports_masking = layer.supports_masking
        self._supports_ragged_inputs = True

        if not isinstance(layer, layers.Layer):
            raise ValueError(
                'Please initialize `WithRagged` layer with a '
                '`Layer` instance. You passed: {input}'.format(input=layer))

    def build(self, input_shape=None):
        if not self.layer.built:
            self.layer.build(input_shape)

        self.input_spec = self.layer.input_spec

        zero = '' if self.layer.dtype == tf.string else 0
        self.masking_layer = layers.Masking(mask_value=zero)

        super(WithRagged, self).build()

    def call(self, inputs, **kwargs):
        layer_kwargs = {}
        for key in kwargs.keys():
            if has_arg(self.layer.call, key):
                layer_kwargs[key] = kwargs[key]

        inputs_dense, row_lengths = backend.convert_inputs_if_ragged(inputs)
        inputs_dense = self.masking_layer(inputs_dense)
        outputs_dense = self.layer.call(inputs_dense, **layer_kwargs)
        outputs = backend.maybe_convert_to_ragged(row_lengths is not None, outputs_dense, row_lengths)

        return outputs

    def compute_output_shape(self, input_shape):
        return self.layer.compute_output_shape(input_shape)

    def compute_mask(self, inputs, mask=None):
        return self.layer.compute_mask(inputs, mask)

    def get_config(self):
        return super(WithRagged, self).get_config()


Enable Sourcegraph

I want to use Sourcegraph for django-xadmin code search, browsing, and usage examples. Can an admin enable Sourcegraph for this repository? Just go to https://sourcegraph.com/github.com/sshwsfc/django-xadmin. (It should only take 30 seconds.)
Thank you!

duplicate #262


chore: Remove irrelevant comment

What this PR does / why we need it:
The tag for kubevirt.io/client-go was created.
Release note:
None

/lgtm
/approve

/approve


UserWarning: RNN module weights are not part of single contiguous chunk of memory. This means they need to be compacted at every call, possibly greately increasing memory usage. To compact weights again call flatten_parameters().

when i execute bash scripts/stn_att_rec.sh, i have the problem
UserWarning: RNN module weights are not part of single contiguous chunk of memory. This means they need to be compacted at every call, possibly greately increasing memory usage. To compact weights again call flatten_parameters().
could you tell me how to solve it? @ayumiymk

This is an issue of Pytorch. Please google it, and you will find the answers.


Deduplicate tag and attribute names.

I am not even sure this is serious as this massively trades off runtime (O(log n) search time and indirection behind Rc) for space.
It does reduce peak memory consumption from 7.8 GB to 5.5 GB for the document from #18 though (both of which include the 1.1 GB of reading the document itself though). Interestingly enough, doc.names has 17 entries in this case.
I think the search time could be reduced by using a hash table but that complicates no_std builds. Furthermore, both hash tables without keyed hashes and sorted slices are vulnerable to quadratic complexity DoS attacks (e.g. forcing insertion at the beginning for each parsed name).
Finally, the additional overhead of Rc would always be there for small documents and this opens up the additional question of using Rc versus Arc, i.e. whether Document: Send holds or not.
In any case, I wanted to post this for discussion even if I don't think this is really viable. But it does shed some light on the possible savings with regards to deduplication via indexes as proposed by @tomjw64 where &[Attribute] would have to become impl ExactSizeIterator<Item=Attribute> in the API.

Yes, I though about this, but I would assume performance penalty isn't worth it. Have you tried running the benchmarks?
Also, I'm not sure we even need Rc here. A simple index would be just fine.
As for the HashTable, it should be fine. roxmltree is no_std but it still uses alloc. So we have an access to HashTable.
To speed up the process we could use something like this:
fn string_hash(s: &str) -> u64 {
    let mut h = alloc::collections::hash_map::DefaultHasher::new();
    s.hash(&mut h);
    h.finish()
}

// and then

names: Vec<ExpandedNameOwned<'input>>, // stored
namesHashes: Vec<u64>, // only during parsing, sorted(?)

Basically a very specific kind of HashTable.
Or even uses a custom, faster hash method. One additional dependency should be fine.
Anyway, this is a good idea as long as the performance penalty isn't that bad.
As for Send - I don't really care.

As for the HashTable, it should be fine. roxmltree is no_std but it still uses alloc. So we have an access to HashTable.

As you can see at https://doc.rust-lang.org/stable/alloc/collections/index.html, the alloc crate does not contain a HashMap. This is most likely because DefaultHasher calls into the OS for entropy (e.g. via getrandom) which alloc cannot do. The hashbrown crate can be used on no_std though (without a runtime random key).

Also, I'm not sure we even need Rc here. A simple index would be just fine.

I think this is the route described by

But it does shed some light on the possible savings with regards to deduplication via indexes as proposed by @tomjw64 where &[Attribute] would have to become impl ExactSizeIterator<Item=Attribute> in the API.

meaning that e.g. an Attribute cannot produce its name without access to the Document so that it either needs a facade or the user has to manually pass &Document where the name is needed.

Basically a very specific kind of HashTable.

Of course, the snippet is missing how collisions are handled which is sort of the thing which makes the difference between a good and a bad hash table.

Anyway, this is a good idea as long as the performance penalty isn't that bad.

I think the index-based version would be nice since it does not open up the Send question and avoids the extra indirection in storing the ExpandedNameOwned structs and I would go down the benchmarks rabbit hole for that one but you seem pretty strongly opposed to that in https://github.com/RazrFalcon/roxmltree/pull/66#issuecomment-1294006135 and the following?

the alloc crate does not contain a HashMap

Wow, I didn't know that.

I think this is the route described by

Oh, my bad.

Of course, the snippet is missing how collisions are handled

Do you think we would be able to trigger a hash collision? I'm not an expert in this area.
I cannot see this happening on a typical file, but someone may construct a bad one...
From my understanding, a hash collision resolving would basically require a == call after comparing the hash, right?

I think the index-based version would be nice since

So an iterator type that stores &Document and produces Attribute? I guess we have no other choice...
Either way, the memory impact is too good to ignore, but performance is important as well.
We either use more memory or check every single element and attribute name for uniqueness, which seem like a performance nightmare to me.

Either way, the memory impact is too good to ignore, but performance is important as well.
We either use more memory or check every single element and attribute name for uniqueness, which seem like a performance nightmare to me.

Yes, the impact is significant and the index-based version does not come the caveats of the Rc-based one, so I think that one is worth a try.
I will hopefully be able to dive into it this weekend. Or maybe @tomjw64 can propose something while I take care of benchmarking #73 now that the

So an iterator type that stores &Document and produces Attribute? I guess we have no other choice...

is on the table again?

is on the table again?

For such a big improvement - sure.
And we could replace namespace() with an iterator as well then. Removing Rc completely.

Just for completeness, this is the parsing impact of the sorted-list reference-counting version presented here:
> cargo benchcmp master dedup-names
 name              master ns/iter  dedup-names ns/iter  diff ns/iter  diff %  speedup
 large_roxmltree   3,261,437       4,550,550               1,289,113  39.53%   x 0.72
 medium_roxmltree  769,474         1,027,545                 258,071  33.54%   x 0.75
 tiny_roxmltree    4,981           5,829                         848  17.02%   x 0.85

Pretty gruesome, I'd say. But I'd also hope that the index-based version fears better, especially if coupled with a hash table instead of a sorted list.

Yes, this is expected. roxmltree is tailored towards smaller files were the current logic works just fine. You cannot have both.
Hopefully there are ways to improve uniqueness check performance.


[TypeScript] Allow config.client to be non-client instance

TypeScript makes it very hard to get typescript to correctly check the instanceof Client part of the statement.
See: https://github.com/Microsoft/TypeScript/wiki/FAQ#why-doesnt-extending-built-ins-like-error-array-and-map-work

Thanks!

Released in 0.95.3.


Support an include mechanism for PDI config

In GitLab by @jbigot on Mar 23, 2018, 12:00

unassigned @ksiero

we should have a look at https://pypi.org/project/pyyaml-include/


Connecting to dinghy with no outgoing network connection? (offline)

Is there a way to take your machine offline and continue using dinghy?
Prepping for a camping trip, I tried disabling wifi to make sure I'd still be able to work against my local dinghy server. But my browsers (Chrome/FF/Safari) all refused to even try connecting to the server, complaining that my MacBook had no network connection. I've found the same thing happens if wifi is enabled but I'm not connected to any network (option+click on the network icon in the toolbar and the Disconnect option appears).
Is this a side-effect of the way dinghy integrates its DNS server into the MacOS host? Is there any kind of workaround or will MacOS just not even try to resolve names when it has no network?

Yeah I had a co-worker run into this once, OS X appears to not even try to use the resolvers defined in /etc/resolver/* if the computer doesn't have a network connection. We haven't come up with a solution, unfortunately.
Although, I did a quick search and pow, which uses the same mechanism, has a suggested workaround of creating an ad-hoc wifi network: https://github.com/basecamp/pow/wiki/Troubleshooting#cant-access-hosts-while-offline-on-os-x
Does that work for you?

Thanks for the quick reply, but unfortunately those workarounds don't work. From the discussion, it seems like the ad-hoc wifi network solution worked best before Mac OS Lion.
Guess I'll just use dinghy ip and adding those entries to /etc/hosts.

Ah, dang. I know that the powder utility for pow has a command to add all the hosts to /etc/hosts that was added at least partially in response to this problem. Something similar could be added for dinghy, but I sure wish OS X would release a fix.

Hm I just tried turning off wifi in macOS Sierra and I was still able to resolve *.docker using the command line, however safari and chrome still don't even try to connect.
I'm going to close this as there's not much we can do to fix that.


Chase garsee

great job this week, looking forward to the upcoming weeks and everything we will learn together


Failed to load in-memory CUBIN: CUDA_ERROR_NO_BINARY_FOR_GPU: no kernel image is available for execution on the device 	 [[node Generador/conv2d_4/Tanh] [Op:__inference_predict_function_1081]

Hi everyone,
I'm currently using tensorflow in order to use a GAN Network I coded myself (custom code). I am quite new when it comes to Linux and TF.
Relevant information

Version of TensorFlow: 2.4.1 (installed using pip install tensorflow-gpu)
OS:  Zorin OS 16.2 (Ubuntu 20.04)
Python version: 3.9.16
CUDA version: 12.1
GPU : NVIDIA RTX A2000 12GB
Nvidia driver version: 530.30.02
CUDNN version: 8.9.0

Problem
My model is created  and stored on the GPU memory correctly (with the following warnings)
2023-05-08 09:37:30.383063: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudart.so.10.1
2023-05-08 09:37:31.619864: I tensorflow/compiler/jit/xla_cpu_device.cc:41] Not creating XLA devices, tf_xla_enable_xla_devices not set
2023-05-08 09:37:31.630697: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcuda.so.1
2023-05-08 09:37:31.692075: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:941] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2023-05-08 09:37:31.692323: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1720] Found device 0 with properties:
pciBusID: 0000:01:00.0 name: NVIDIA RTX A2000 12GB computeCapability: 8.6
coreClock: 1.2GHz coreCount: 26 deviceMemorySize: 11.75GiB deviceMemoryBandwidth: 268.26GiB/s
2023-05-08 09:37:31.692349: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudart.so.10.1
2023-05-08 09:37:31.756689: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcublas.so.10
2023-05-08 09:37:31.756793: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcublasLt.so.10
2023-05-08 09:37:31.792431: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcufft.so.10
2023-05-08 09:37:31.801029: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcurand.so.10
2023-05-08 09:37:31.866009: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcusolver.so.10
2023-05-08 09:37:31.874931: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcusparse.so.10
2023-05-08 09:37:31.988965: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudnn.so.7
2023-05-08 09:37:31.989159: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:941] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2023-05-08 09:37:31.989419: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:941] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2023-05-08 09:37:31.989544: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1862] Adding visible gpu devices: 0
2023-05-08 09:37:31.990621: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations:  SSE4.1 SSE4.2 AVX AVX2 FMA
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
2023-05-08 09:37:31.993043: I tensorflow/compiler/jit/xla_gpu_device.cc:99] Not creating XLA devices, tf_xla_enable_xla_devices not set
2023-05-08 09:37:31.993197: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:941] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2023-05-08 09:37:31.993380: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1720] Found device 0 with properties:
pciBusID: 0000:01:00.0 name: NVIDIA RTX A2000 12GB computeCapability: 8.6
coreClock: 1.2GHz coreCount: 26 deviceMemorySize: 11.75GiB deviceMemoryBandwidth: 268.26GiB/s
2023-05-08 09:37:31.993406: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudart.so.10.1
2023-05-08 09:37:31.993436: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcublas.so.10
2023-05-08 09:37:31.993451: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcublasLt.so.10
2023-05-08 09:37:31.993467: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcufft.so.10
2023-05-08 09:37:31.993484: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcurand.so.10
2023-05-08 09:37:31.993502: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcusolver.so.10
2023-05-08 09:37:31.993518: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcusparse.so.10
2023-05-08 09:37:31.993535: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudnn.so.7
2023-05-08 09:37:31.993600: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:941] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2023-05-08 09:37:31.993763: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:941] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2023-05-08 09:37:31.993881: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1862] Adding visible gpu devices: 0
2023-05-08 09:37:31.994703: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudart.so.10.1
2023-05-08 09:39:47.663704: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1261] Device interconnect StreamExecutor with strength 1 edge matrix:
2023-05-08 09:39:47.663723: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1267]      0
2023-05-08 09:39:47.663727: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1280] 0:   N
2023-05-08 09:39:47.664624: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:941] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2023-05-08 09:39:47.664707: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:941] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2023-05-08 09:39:47.664753: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:941] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2023-05-08 09:39:47.664800: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1406] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 10694 MB memory) -> physical GPU (device: 0, name: NVIDIA RTX A2000 12GB, pci bus id: 0000:01:00.0, compute capability: 8.6)

I think these are common warnings. Besides, I printed the summary after this and it showed correctly (see extra information at the end of the issue).
After that, when make some prediction to make some sort of visual control over the generator images, the output looks like this:
2023-05-08 09:39:47.890873: I tensorflow/compiler/mlir/mlir_graph_optimization_pass.cc:116] None of the MLIR optimization passes are enabled (registered 2)
2023-05-08 09:39:47.918809: I tensorflow/core/platform/profile_utils/cpu_utils.cc:112] CPU Frequency:<PHONE_NUMBER> Hz
2023-05-08 09:39:48.043219: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcublas.so.10
2023-05-08 09:40:39.040740: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudnn.so.7
2023-05-08 09:42:07.469816: W tensorflow/core/framework/op_kernel.cc:1763] OP_REQUIRES failed at cwise_op_gpu_base.cc:89 : Internal: Failed to load in-memory CUBIN: CUDA_ERROR_NO_BINARY_FOR_GPU: no kernel image is available for execution on the device
Traceback (most recent call last):
  File "/home/calculin/Desktop/DCGAN_MELUS-main/GAN_train.py", line 110, in <module>
    aux_generated_images = generator.predict(aux_noise, verbose = 0)   #Create the images from the GAN.
  File "/home/calculin/miniconda3/envs/tensorflow/lib/python3.9/site-packages/tensorflow/python/keras/engine/training.py", line 1629, in predict
    tmp_batch_outputs = self.predict_function(iterator)
  File "/home/calculin/miniconda3/envs/tensorflow/lib/python3.9/site-packages/tensorflow/python/eager/def_function.py", line 828, in __call__
    result = self._call(*args, **kwds)
  File "/home/calculin/miniconda3/envs/tensorflow/lib/python3.9/site-packages/tensorflow/python/eager/def_function.py", line 894, in _call
    return self._concrete_stateful_fn._call_flat(
  File "/home/calculin/miniconda3/envs/tensorflow/lib/python3.9/site-packages/tensorflow/python/eager/function.py", line 1918, in _call_flat
    return self._build_call_outputs(self._inference_function.call(
  File "/home/calculin/miniconda3/envs/tensorflow/lib/python3.9/site-packages/tensorflow/python/eager/function.py", line 555, in call
    outputs = execute.execute(
  File "/home/calculin/miniconda3/envs/tensorflow/lib/python3.9/site-packages/tensorflow/python/eager/execute.py", line 59, in quick_execute
    tensors = pywrap_tfe.TFE_Py_Execute(ctx._handle, device_name, op_name,
tensorflow.python.framework.errors_impl.InternalError:  Failed to load in-memory CUBIN: CUDA_ERROR_NO_BINARY_FOR_GPU: no kernel image is available for execution on the device
	 [[node Generador/conv2d_4/Tanh (defined at /Desktop/DCGAN_MELUS-main/GAN_train.py:110) ]] [Op:__inference_predict_function_1081]

Function call stack:
predict_function

And then the kernel just dies. I am running it on terminal just by doing python3 mycode.py
[Context: this is the code runned in order to get the error]
aux_noise = np.random.normal(0, 1, size=(5, noise_dim))
aux_generated_images = generator.predict(aux_noise, verbose = 0)   #Create the images from the GAN.

There have been changes in paths compared to your earlier tested targets and bugs fixed in recent versions. Also you are trying to install tensorflow v2.4 with CUDA 12.1 which is not compatible. Please have a look at the official tested build configurations and follow the instructions.
https://www.tensorflow.org/install/source#gpu
Thank you!

Hi,
I am running into the same problem with NVIDIA A100 80GB. But same code and Conda environment works in Tesla V100 16GB. Both having same cuda version and nvidia driver.
What was the solution?
More details:
It works in:                        Graphic card: Tesla V100 16GB,    CUDA Version: 11.4, Driver version: 470.161.03
It has the CUBIN error in: Graphic card: NVIDIA A100 80GB, CUDA Version: 11.4, Driver Version: 470.161.03
Conda Environment (same for both): Python 3.9.16, tensorflow 2.4.1
Thanks

I ever tried with the following configuration and I also met this problem:

Tensorflow: 2.4.1
Python: 3.8.20
CUDA: 11.8
CUDNN: 8.7

Finally, I solve this situation via update the version of tensorflow to 2.9.0. Hope it can be helpful to others.


Use Tab for indentation

Codecov Report

Merging #61 (c1a740e) into version/0.14.1 (c2d5866) will not change coverage.
The diff coverage is 95.40%.

@@               Coverage Diff               @@
##           version/0.14.1      #61   +/-   ##
===============================================
  Coverage           96.35%   96.35%
===============================================
  Files                  35       35
  Lines                3373     3373
  Branches              742      742
===============================================
  Hits                 3250     3250
  Misses                122      122
  Partials                1        1

Impacted Files
Coverage Δ

src/models/Expression.ts
83.40% <81.56%> (ø)

src/steps/SetStep.ts
93.33% <85.71%> (ø)

src/models/Condition.ts
87.33% <85.92%> (ø)

src/database.ts
89.08% <86.33%> (ø)

src/UpdateSetItemInfo.ts
93.54% <86.66%> (ø)

src/binder.ts
90.76% <87.50%> (ø)

src/models/Operand.ts
94.84% <93.82%> (ø)

src/ReturningItemInfo.ts
97.43% <95.45%> (ø)

src/functions.ts
95.12% <95.45%> (ø)

src/columns.ts
96.66% <96.20%> (ø)

... and 25 more

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 c2d5866...c1a740e. Read the comment docs.


Relevant papers for astronomical scheduling

A scheduling model for astronomy
M. Solara, , , P. Michelonb, J. Avariasc, d, M. Garcesd
http://www.sciencedirect.com/science/article/pii/S2213133716300142
(Scheduling ALMA with a mixed integer linear programming)
An Integer Linear Programming Solution to the Telescope Network Scheduling Problem
Sotiria Lampoudi, Eric Saunders, Jason Eastman
http://arxiv.org/abs/1503.07170

See the bibliography at http://constraints.cs.washington.edu/cassowary/  - the application of that is quite different, but I think it's actually very mappable onto the scheduling problem.  Equally usefully, the toolkit in question has a python wrapper: https://github.com/enthought/casuarius

See also http://scheduler.dc3.com/Scheduler2006.pdf

Hi folks. I'm at SPIE in Edinburgh right now and scheduling is a topic that is coming up pretty frequently within the software talks. A lot of people have this wrapped up in their Observatory Control Software packages (of which many people are building separately) but many of them are also independently writing up their own schedulers. I've been trying to turn people onto the discussion here but am not sure if that will just add more noise to this particular group or not.
What I'd really like to do is organize some kind of Working Group or forum where people could be discussing these issues as 80% of the problems are the same across observatories and it is that 80% (with the ability to easily solve the remaining 20%) that I think astroplan is aiming to cover.
There are a lot of people out there who have spent considerable time thinking about these issues and it would be a shame to not be incorporating them. What are the thoughts here about somehow broadening this discussion to the wider astronomy community (including non-python users) beyond just a posting of a few of the relevant papers?

What are the thoughts here about somehow broadening this discussion to the wider astronomy community (including non-python users) beyond just a posting of a few of the relevant papers?

What do you propose? Maybe the best thing would be to get those people who have experience involved directly, so I appreciate that you're trying to do that.

Yes, mostly I am trying to get people involved in some sense. Some of them are not Python though but still have relevant and good ideas concerning best practices, etc. Honestly I don't know much about the subject at this point so don't really know what exists out there, it was just blindingly obvious to me (from a software developer standpoint) that many astronomers are recreating this wheel and they all seem to be doing it independently.
I'll poke around at SPIE a little more tomorrow and maybe bring the subject up in one of their ad hoc lightning talks, but I wanted to check in with this group first to make sure I wasn't myself just recreating another wheel by starting another discussion.
It seems like a Working Group or something might be good, I'm just not really sure who that is organized through. Any ideas appreciated, but again I don't want to just up the noise.

@wtgee I think the most helpful input that they could give is to suggest scheduling algorithms. Implementations in Python aren't important, because we can figure out how to code them, but we need guidance towards the best algorithms used to optimize schedules for astronomical problems.

I'm also chillin here at SPIE and can confirm that there's lots of telescope scheduler discussion going on.
Really, it sounds like we need someone to organize a conference on telescope scheduling...get all the ground and space-based folks in the same room, invite a bunch of the Operations Research folks...[NOT IT].  But it would be pretty cool to have a few days of presentations and a few hack days to put together a framework where people could then drop in their own scheduling algorithms.

Here's another nice paper that includes a fair bit of literature review:
http://adsabs.harvard.edu/abs/2012SPIE.8448E..1LC
My own sense is that it's only useful to think about algorithms once you've decided clearly on the merit function you're trying to optimize--open shutter efficiency? fairness between TAC-allocated programs?  observation utility towards a specific scientific goal?

See also https://ui.adsabs.harvard.edu/abs/2019BAAS...51g.125B/abstract.


Hard-coded forward slash bug fix (#48)

closes #48

Small fix for Donal - and ran formatting
Self reviewed


CAS-Adjacent: Configure Supplier Maintenance Transaction Scheduler within CAS Business Hours

User Story
As a ministry user, I need to limit when calls to the CAS Suppler Maintenance Web Service based on their business hours. I expect these requests to be held until the next window and then sent.
Acceptance Criteria:

[ ] Implement restrictions on when WS Supplier Maintenance requests are sent to CAS based on the table in business context.
[ ] We also need to be able to accommodate expected outages/changes to the schedule that we may be notified about.

Business Context

See link for CAS Web Services Schedule.

Going to put this in the 2.X pipeline - based on decision to do calls once a day at noon, we'll proceed with that and this will possibly get built after we have more information.


[Feature Req] Refresh tabs

I would find it useful to have an option (right click, shortcut key for example) to refresh the tabs shown in quick-tabs' list.
Use case looks like this:
Doing web dev work on something like Joomla or WP.  Have multiple tabs open to pages that are behind a login.
Then either:
a) some time goes by and login times out or
b) I save the session to return to it later (eg after a reboot or even in a few days)
now all those tabs have their destination url but are on a login screen,
I have to go to one of the tabs and login and then the I can refresh each of the others and they'll get to their intended page.
These tabs are easy for me to find using quick-tabs' search (how I do it now.)
If only I could just right click and do a refresh on the whole lot instead of manually activating each tab and F5 that would be awesome.
Thanks for considering.
Super extension btw, kudos dev(s).
Does what it says on the box and does it well so thank you very much for that.

Would this resolve your issue?
https://chrome.google.com/webstore/detail/reload-tabs/inhimoldpmckkeohhdkccpnpbpdfaple

Thanks @superclarkk.  Kind of sort of but not really.   What I really need is to refresh a subset not all open.  Just a few Quick Tabs so to speak.  Because refreshing 80 or more tabs at once would not make my computer happy I don't think.
She cries under the load of fat-assed Chrome as it is (bloated memory-leaking sieve that it is...) I do not need to further kick her while she's down ;)
The other thing is they're not necessarily grouped in a same window.  More typically they'll just be the same domain/sub-domain.  I looked at the linked and some similar extensions, none quite tick all the boxes for me, plus, I think it's a great functional fit for QT and something that will attractive to that specific set of users who like me have tons of tabs and frequently get timed out of one site or another.


Adding 24 hours to cross DST boundary does not respect DST

Description of the Issue and Steps to Reproduce:
The Add documentation gives this example:
var m = moment(new Date(2011, 2, 12, 5, 0, 0)); // the day before DST in the US
m.hours(); // 5
m.add(24, 'hours').hours(); // 6

Expected output:
5
6

Actual output:
5
5

Environment:

Moment: 2.20.1
node: v8.9.4
OS: Ubuntu 16.04.3 LTS

Other information that may be helpful:

Timezone: GMT
Date and time of test: Tue 13 Feb 11:33:33 GMT 2018

Tue Feb 13 2018 11:34:50 GMT+0000 (GMT)
2018-2-13 11:34:50
0
2.20.1

Apologies if this is a duplicate. I couldn't see a clear issue describing the mis-match in documentation from current behaviour.

Just after I raised this it was pointed out to me that the timezone needs to be set in order for this to work. So this is an issue with the documentation rather than the code. Cheers.


Upgrade tokio to 1.22.0 and replace async-std with tokio

Resolves https://github.com/paritytech/substrate/issues/12499.
polkadot companion: https://github.com/paritytech/polkadot/pull/6262
cumulus companion: https://github.com/paritytech/cumulus/pull/1917

Nice! :+1:
We should completely nuke async-std so that it isn't used anywhere in our codebases. Doesn't really make sense to have two different executors, especially when tokio's solid.

the example code in rust-libp2p repository instructs to configure executor for the swarm in tokio chat example. Should we configure the default executor similarly in case params.executor is None in service.rs?

I'm paranoid about the second bullet because I burned two weeks debugging bizarre async execution issues after having configured libp2p incorrectly.

Interestingly, the PR https://github.com/libp2p/rust-libp2p/pull/3097 has just landed in libp2p that makes the specification of executor explicit during the construction of Swarm: SwarmBuilder::new has been replaced with SwarmBuilder::with_executor + some alternative constructors with predifined executors for tokio, async-std, etc.
I'm going to change the API of NetworkWorker::new so it won't accept None executor anymore in this PR, and later when libp2p-0.50 is released we can move to the new SwarmBuilder::with_executor constructor.
CC @altonen

The CI pipeline was cancelled due to failure one of the required jobs.
Job name: cargo-check-each-crate
Logs: https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2082447

The CI pipeline was cancelled due to failure one of the required jobs.
Job name: test-linux-stable
Logs: https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2082433

The CI pipeline was cancelled due to failure one of the required jobs.
Job name: test-linux-stable
Logs: https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2083153

The CI pipeline was cancelled due to failure one of the required jobs.
Job name: cargo-check-each-crate
Logs: https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2083164

The CI pipeline was cancelled due to failure one of the required jobs.
Job name: test-linux-stable
Logs: https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2087632

The CI pipeline was cancelled due to failure one of the required jobs.
Job name: test-linux-stable
Logs: https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2090980

I suspect that I have converted some futures::executor::block_on into runtime.block_on where it wasn't strictly necessary. I also don't like that in some tests we create tokio runtime explicitly and split sync initialization and async execution, and in others we just run everything under #[tokio::test]. So, may be a follow-up PR/commits are needed to clean these things up @altonen @bkchr.

libp2p 0.50 was released last week. here is the PR that updates substrate: https://github.com/paritytech/substrate/pull/12734
let me know if you want me to change executors to tokio.

libp2p 0.50 was released last week. here is the PR that updates substrate: https://github.com/paritytech/substrate/pull/12734
let me know if you want me to change executors to tokio.

The CI pipeline was cancelled due to failure one of the required jobs.
Job name: cargo-check-benches
Logs: https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2113704

The CI pipeline was cancelled due to failure one of the required jobs.
Job name: cargo-check-benches
Logs: https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2113703

The CI pipeline was cancelled due to failure one of the required jobs.
Job name: test-linux-stable
Logs: https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2113708

The CI pipeline was cancelled due to failure one of the required jobs.
Job name: test-linux-stable
Logs: https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2113710

The CI pipeline was cancelled due to failure one of the required jobs.
Job name: test-linux-stable
Logs: https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/2113709

bot merge


Add mode  to allow adding dummy events for non-matching steps

Add mode  to allow adding dummy events for non-matching steps

Codecov Report
Attention: Patch coverage is 0% with 25 lines in your changes missing coverage. Please review.

Project coverage is 0.00%. Comparing base (59551e4) to head (3b6cc94).
Report is 616 commits behind head on master.

Files
Patch %
Lines

...n/funnel/window/FunnelBaseAggregationFunction.java
0.00%
25 Missing :warning:

Additional details and impacted files
@@              Coverage Diff              @@
##             master   #13382       +/-   ##
=============================================
- Coverage     61.75%    0.00%   -61.76%
=============================================
  Files          2436     2475       +39
  Lines        133233   136592     +3359
  Branches      20636    21248      +612
=============================================
- Hits          82274        0    -82274
- Misses        44911   136592    +91681
+ Partials       6048        0     -6048

Flag
Coverage Δ

custom-integration1
?

integration
0.00% <0.00%> (-0.01%)
:arrow_down:

integration1
?

integration2
0.00% <0.00%> (ø)

java-11
?

java-21
0.00% <0.00%> (-61.63%)
:arrow_down:

skip-bytebuffers-false
?

skip-bytebuffers-true
0.00% <0.00%> (-27.73%)
:arrow_down:

temurin
0.00% <0.00%> (-61.76%)
:arrow_down:

unittests
?

unittests1
?

unittests2
?

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


Add way to remove blog posts

Blog posts are not deleteable currently. Also save should only be allowed if there are changes to the post.

fixed thanks @zlalvani!


feat(tabs): adds support for two-way bindings on selectedIndex

closes #687
R: @jelbourn

LGTM

We cannot get this to work on MAterial ^5.2.4 is this in a subsequent release? Using npm version 5.8.0


can't find action in smart contract

I am trying to set eosio.token contract to account eosio.token following the instructions on tutorial. But when I call the action create in the contract. The cleos print following error message

Error 3050000: action exception
Error Details:
Unknown action create in contract eosio.token

I set the contract again but get error message

2533207ms thread-0   main.cpp:2541                 main                 ] Failed with error: Assert Exception (10)                                                                                account.code_version != code_id: contract is already running this version of code

I can't figure out the problem. Please help

What's version about your code?And can I see your command to call the action?

I use the eosio.token contract download from git yesterday. Here is what I did from command line

root@294022306f98:~# cleos wallet create -n xieyi
"/opt/eosio/bin/keosd" launched
Creating wallet: xieyi
Save password to use in the future to unlock this wallet.
Without password imported keys will not be retrievable.
"PW5Jr1mz5mE3hG5KFPr2yd9BxPPPnJN6RXqUxUrGN9HdGVcUTkGAm"
root@294022306f98:~# cleos create key
Private key: 5KfieiShgZv3cyeNYBwV68RSNhxup4KP3ef3CV8Bb87T7FDqQDH
Public key: EOS5MMHE3sgXGj66xaC1d3rPZnUATX4uXQJpHiVngr6sbuWqj8hMt
root@294022306f98:~# cleos wallet import -n xieyi 5KfieiShgZv3cyeNYBwV68RSNhxup4KP3ef3CV8Bb87T7FDqQDH
imported private key for: EOS5MMHE3sgXGj66xaC1d3rPZnUATX4uXQJpHiVngr6sbuWqj8hMt
root@294022306f98:~# make -C eosio.token/
make: Entering directory '/root/eosio.token'
make: Nothing to be done for 'all'.
make: Leaving directory '/root/eosio.token'
root@294022306f98:~# cleos create account eosio eosio.token EOS5MMHE3sgXGj66xaC1d3rPZnUATX4uXQJpHiVngr6sbuWqj8hMt
executed transaction: 2dcc0428b7cede508f4b3399e35ec481fc717b5d4874a59d9e22bece960a5d66  200 bytes  487 us

eosio <= eosio::newaccount            {"creator":"eosio","name":"eosio.token","owner":{"threshold":1,"keys":[{"key":"EOS5MMHE3sgXGj66xaC1d...
warning: transaction executed locally, but may not be confirmed by the network yet
root@294022306f98:~# cleos set contract eosio.token eosio.token -p eosio.token
Reading WAST/WASM from eosio.token/eosio.token.wasm...
Using already assembled WASM...
Publishing contract...
executed transaction: 5afef1239f9f32a0c38979376686d7cdba60d0fa5589ccbec237d3aad401c122  7952 bytes  2695 us
eosio <= eosio::setcode               {"account":"eosio.token","vmtype":0,"vmversion":0,"code":"0061736d01000000017e1560037f7e7f0060057f7e...
eosio <= eosio::setabi                {"account":"eosio.token","abi":"0e656f73696f3a3a6162692f312e3000000000000000"}
warning: transaction executed locally, but may not be confirmed by the network yet
root@294022306f98:~# cleos push action eosio.token create '{"issuer":"eosio","maximum_supply":"1000000000.0000 SYS"}' -p eosio.token
Error 3050000: action exception
Error Details:
Unknown action create in contract eosio.token

I'm getting this same error while running: cleos push action currency create '{"issuer":"currency", "maximum_supply":"10000.0000 CUR", "can_freeze":"0", "can_recall":"0", "can_whitelist":"0"}' -p currency!!
In my case error 3050000: action exception
Unknown action create in contract currency.
I'm using latest DAWN

You can check if the abi file related to the "token" contract has "create" action.

@LeslieRan I find no create action in abi file. but I follow the instructions given on wiki. Is there any problem with the instructions?

This is my abi file:
{
"____comment": "This file was generated by eosio-abigen. DO NOT EDIT - 2018-05-28T02:59:06",
"version": "eosio::abi/1.0",
"types": [],
"structs": [{
"name": "hi",
"base": "",
"fields": [{
"name": "user",
"type": "name"
}
]
}
],
"actions": [{
"name": "hi",
"type": "hi",
"ricardian_contract": ""
}
],
"tables": [],
"ricardian_clauses": [],
"error_messages": [],
"abi_extensions": []
}

@deba10106 that is an outdated contract, rebuild EOS

@deba10106 Did you modify the eosio.token.hpp and eosio.token.cpp files?

Okay, I was following a tutorial on youtube, which is outdated. I did the same with eosio.token what I did with the newly created currency contract and I got success! It seems to be a problem with the empty abi file!

@LeslieRan is the docker version OK? How do you tell whether the a contract is outdated?

This is my abi file generated the way told in tutorial
{
  "____comment": "This file was generated by eosio-abigen. DO NOT EDIT - 2018-05-28T06:33:21",
  "version": "eosio::abi/1.0",
  "types": [],
  "structs": [],
  "actions": [],
  "tables": [],
  "ricardian_clauses": [],
  "error_messages": [],
  "abi_extensions": []
}

No, don't do with currency. Instead do this: cd ~/eos/contracts/eosio.token
cleos create account eosio.token owner_public_key active_public_key
cleos set contract eosio.token ~/eos/contracts/eosio.token/
cleos push action eosio.token create '{"issuer":"eosio.token&co", "maximum_supply":"1000000.0000 CUR"}' -p eosio.token
You don't need to create currency and currency abi or wast files. New DAWN has in-built eosio.token contract with abi (non-empty) and wast files, which does the same job!

@deba10106 I use the latest contract code and follow the tutorial on wiki, but still can't call the create function of the contract eosio.token. Is it a problem caused by using docker version of eosio?

@breadbread1984  how did you solved this issue?

issue SYS, before you issue your token.

Hi friends,
I created an account and abi file has generated but after this ii found an error like. This is my abi file
~/eos/contracts/sabrin/eosio$ node server.js
deprecated, change Eos.Localnet(..) to just Eos(..)
{ broadcast: true,
transaction:
{ compression: 'none',
transaction:
{ expiration: '2018-07-05T07:10:05',
ref_block_num: 17095,
ref_block_prefix:<PHONE_NUMBER>,
net_usage_words: 0,
max_cpu_usage_ms: 0,
delay_sec: 0,
context_free_actions: [],
actions: [Array],
transaction_extensions: [] },
signatures:
[ 'SIG_K1_KVF4jt2NahBv8JRHqt9EpKMbmwdRN89dqjnso5T9CQXg1L9okTGKbAUDUAh3RE2ZNqYjcM1d5t7T7K9m5pDnuxsQtWRwhC' ] },
transaction_id: '2f42ae2696b5e66331f28ca06729c130747bf88343b2f0e2b24d7006c08d2434',
processed:
{ id: '2f42ae2696b5e66331f28ca06729c130747bf88343b2f0e2b24d7006c08d2434',
receipt: { status: 'executed', cpu_usage_us: 9318, net_usage_words: 2384 },
elapsed: 9318,
net_usage: 19072,
scheduled: false,
action_traces: [ [Object] ],
except: null } }
{ broadcast: true,
transaction:
{ compression: 'none',
transaction:
{ expiration: '2018-07-05T07:10:05',
ref_block_num: 17095,
ref_block_prefix:<PHONE_NUMBER>,
net_usage_words: 0,
max_cpu_usage_ms: 0,
delay_sec: 0,
context_free_actions: [],
actions: [Array],
transaction_extensions: [] },
signatures:
[ 'SIG_K1_KequpSCo7sJj993Ee8LYr27bikLok2GvBayL2CzpCoJy4Zd1UXssVqLhJfD5237ZE1XqrDG4FSV4ysvhMx9f9nHpj3PTou' ] },
transaction_id: '951f64eb8bdd5ee824db50d25ea1f25a780b854fe88732168941691e778ac0af',
processed:
{ id: '951f64eb8bdd5ee824db50d25ea1f25a780b854fe88732168941691e778ac0af',
receipt: { status: 'executed', cpu_usage_us: 3915, net_usage_words: 40 },
elapsed: 3915,
net_usage: 320,
scheduled: false,
action_traces: [ [Object] ],
except: null } }
cleos push action ias hi '["user"]' -p ias
Error 3050000: action exception
help me to rectify this error

Hi friends,
I created an account and abi file has generated but after this ii found an error like. This is my abi file
~/eos/contracts/sabrin/eosio$ node server.js
deprecated, change Eos.Localnet(..) to just Eos(..)
{ broadcast: true,
transaction:
{ compression: 'none',
transaction:
{ expiration: '2018-07-05T07:10:05',
ref_block_num: 17095,
ref_block_prefix:<PHONE_NUMBER>,
net_usage_words: 0,
max_cpu_usage_ms: 0,
delay_sec: 0,
context_free_actions: [],
actions: [Array],
transaction_extensions: [] },
signatures:
[ 'SIG_K1_KVF4jt2NahBv8JRHqt9EpKMbmwdRN89dqjnso5T9CQXg1L9okTGKbAUDUAh3RE2ZNqYjcM1d5t7T7K9m5pDnuxsQtWRwhC' ] },
transaction_id: '2f42ae2696b5e66331f28ca06729c130747bf88343b2f0e2b24d7006c08d2434',
processed:
{ id: '2f42ae2696b5e66331f28ca06729c130747bf88343b2f0e2b24d7006c08d2434',
receipt: { status: 'executed', cpu_usage_us: 9318, net_usage_words: 2384 },
elapsed: 9318,
net_usage: 19072,
scheduled: false,
action_traces: [ [Object] ],
except: null } }
{ broadcast: true,
transaction:
{ compression: 'none',
transaction:
{ expiration: '2018-07-05T07:10:05',
ref_block_num: 17095,
ref_block_prefix:<PHONE_NUMBER>,
net_usage_words: 0,
max_cpu_usage_ms: 0,
delay_sec: 0,
context_free_actions: [],
actions: [Array],
transaction_extensions: [] },
signatures:
[ 'SIG_K1_KequpSCo7sJj993Ee8LYr27bikLok2GvBayL2CzpCoJy4Zd1UXssVqLhJfD5237ZE1XqrDG4FSV4ysvhMx9f9nHpj3PTou' ] },
transaction_id: '951f64eb8bdd5ee824db50d25ea1f25a780b854fe88732168941691e778ac0af',
processed:
{ id: '951f64eb8bdd5ee824db50d25ea1f25a780b854fe88732168941691e778ac0af',
receipt: { status: 'executed', cpu_usage_us: 3915, net_usage_words: 40 },
elapsed: 3915,
net_usage: 320,
scheduled: false,
action_traces: [ [Object] ],
except: null } }
cleos push action ias hi '["user"]' -p ias
Error 3050000: action exception
help me to rectify this error

I can't understand what you pasted. you may redescribe your problem clearly and format your code

okay...my code need to create an hello world in front end. while running in local test net.
I found these error
cleos push action ias hi '["user"]' -p ias
Error 3050000: action exception

How do you solve this problem?
Recently I have the same question.
Thanks for your help.

@breadbread1984  Oh, I run the command on shell directly, not  a .cpp file has built.

if you build eosio with eosio_build.sh, the built contract binary should resides under <path/to/eos>/build/contracts/eosio.token . if you want to build the abi yourself, you need to add the comments as i mentioned above.

Thanks, I have solved it. It's all due to you.

hello friend, I met the same problem.
I write a contract in helloeos.cpp :
`#include <eosiolib/eosio.hpp>
#include <eosiolib/print.hpp>
using namespace eosio;
class helloeos : public eosio::contract {
public:
using contract::contract;
  void hello(account_name user) {
     print("Welcome to EOS! ", name{user});
  }

};
EOSIO_ABI(helloeos, (hello))`
Then I try to generate wast file and abi file :
root@20e3f099b242:/#eosiocpp -o helloeos.wast helloeos.cpp
root@20e3f099b242:/#eosiocpp -g helloeos.abi helloeos.cpp
And This is my abi file:
{   "____comment": "This file was generated by eosio-abigen. DO NOT EDIT - 2018-10-29T14:06:52",   "version": "eosio::abi/1.0",   "types": [],   "structs": [],   "actions": [],   "tables": [],   "ricardian_clauses": [],   "error_messages": [],   "abi_extensions": [],   "variants": [] }
I don't why it contains no actions. How do you solve this problem? Thank you very much.


[HMR] Update check failed: Error: Manifest request to ../{hash}.hot-update.json timed out.

First off, apologies if this is not the right repository to file this issue. Perhaps the koa-webpack-middleware is the better place to post it, but since I am not really what is going on, other than that HMR is failing, I thought I would try here first.
I am trying to set up HMR with a koa2/React app, but I just can't get hot reloading to work. My webpack config looks like
'use strict'

const path = require('path')
const webpack = require('webpack')

const hmrQueryString = 'webpack-hot-middleware/client?path=/__webpack_hmr&timeout=10000'

const config = {
  devtool: 'cheap-module-eval-source-map',
  entry: {
    bundle: [hmrQueryString, './app/client'],
    styles: [hmrQueryString, './resources/assets/sass/main.scss']
  },
  output: {
    path: path.join(__dirname, 'public'),
    filename: '[name].js',
    publicPath: '/assets/'
  },
  plugins: [
    new webpack.optimize.OccurenceOrderPlugin(),
    new webpack.NoErrorsPlugin(),
    new webpack.HotModuleReplacementPlugin()
  ],
  module: {
    loaders: [
      {
        tests: /\.jsx?$/,
        loaders: ['babel'],
        include: path.join(__dirname, 'app')
      },
      {
        test: /\.s?css$/,
        loaders: ['style', 'css?sourceMap', 'resolve-url', 'sass?sourceMap']
      }
    ]
  },
  resolve: {
    extensions: ['', '.js', '.jsx']
  }
}

module.exports = config

and then in my server setup
...
const compiler = webpack(webpackConfig)
  app.use(devMiddleware(compiler, {
    publicPath: webpackConfig.output.publicPath,
    stats: {
      colors: true
    }
  }))
  app.use(hotMiddleware(compiler))
...

However, this always seems to give me a [HMR] Update check failed: Error: Manifest request to ../{hash}.hot-update.json timed out. error, due to a failed GET request to /assets/{hash}.hot-update.json. I've tried several other configurations and combinations (e.g. `publicPath: 'http://localhost:port/'), but all of them result in the same error. Moreover, I don't even see the .hot-update.json file anywhere in the sources tab of Chrome, so I am not really sure if this is an issue of an incorrect location or just requesting a file that doesn't exit all together. I have to add that I am trying to set up a shared/isomorphic React app, and so I have a catch all route to integrate react router:
router.get('*', async ctx => {
  match({routes, location: ctx.request.url}, (err, redirectLocation, renderProps) => {
    if (err) {
      ctx.throw(500, err.message)
    } else if (redirectLocation) {
      ctx.redirect(path.join(redirectLocation.pathname, redirectLocation.search))
      ctx.status = 302
    } else if (renderProps) {
      renderRoute(ctx, renderProps)
    } else {
      ctx.throw(404, 'Not found')
    }
  })
})

I am sure this complicates things somewhat in that the /assets/{hash}.hot-update.json request is caught by this as well. But even if for testing purposes I replace '*' for '/' (so that this request is not caught) I still get the same result. My two other asset files, which I include in my HTML template like
...
<script type="text/javascript" src="/assets/bundle.js"></script>
<script type="text/javascript" src="/assets/styles.js"></script>
...

are resolved fine and are not caught by the '*' router. I guess this is taken care off appropriately by the webpack dev server middleware? Perhaps I am missing something obvious here...
Any ideas?
Thanks

I decided to close this issue as I've come to realise that it will be hard to pinpoint where things are going wrong. Instead, I've decided to take a step back and set up a simpler Express app with HMR that is failing as well here. Sorry for the fuzz.

I was facing the same issue, seems like something has to do with websockets. Everything worked fine after restarting my system. Not sure though.

i'm facing the same issue, and figured out that when hot-update.json has a hash on it name, the timeout occurs, after tried to just remove hash from name, it worked fancy. Therefore, When I do this, [id] from chunk, it need to go away too, wich occurs in a few timed out requests.

i'm facing the same issue, and figured out that when hot-update.json has a hash on it name, the timeout occurs, after tried to just remove hash from name, it worked fancy. Therefore, When I do this, [id] from chunk, it need to go away too, wich occurs in a few timed out requests.

How do you remove the hash from HMR chunks?