exercise1 vxuHarrisCorners Failed

hi giduthuri,
I am a  beginner for OpenVX, I feel your exercise is easier than official one. So I try to do this exercises on my PC(Win7 VS2013).
here, I meet a question.
When executed  vxuHarrisCorners, the output is like below.
LOG: [status = -1] Node[0] org.khronos.openvx.harris_corners failed to initialize!

ERROR: failed with status = (-1) at:...

I check the vxuHarrisCorners parameters, and not find the error one.
I paste the completed code on my side, if code  have any problem, please tell me, thank you!
/*
 * Copyright (c) 2016 The Khronos Group Inc.
 *
 * Permission is hereby granted, free of charge, to any person obtaining a
 * copy of this software and/or associated documentation files (the
 * "Materials"), to deal in the Materials without restriction, including
 * without limitation the rights to use, copy, modify, merge, publish,
 * distribute, sublicense, and/or sell copies of the Materials, and to
 * permit persons to whom the Materials are furnished to do so, subject to
 * the following conditions:
 *
 * The above copyright notice and this permission notice shall be included
 * in all copies or substantial portions of the Materials.
 *
 * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
 * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
 * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
 * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
 */

/*!
 * \file    exercise1.cpp
 * \example exercise1
 * \brief   Harris corners example.
 *          Look for TODO STEP keyword in comments for the code snippets that you need to write.
 * \author  Radhakrishna Giduthuri<EMAIL_ADDRESS> *          Kari Pulli<EMAIL_ADDRESS> */

////////
// Include OpenCV wrapper for image capture and display.
#include "opencv_camera_display.h"

////////********
// The most important top-level OpenVX header files are "VX/vx.h" and "VX/vxu.h".
// The "VX/vx.h" includes all headers needed to support functionality of the
// OpenVX specification, except for immediate mode functions, and it includes:
//    VX/vx_types.h     -- type definitions required by the OpenVX standard
//    VX/vx_api.h       -- all framework API definitions
//    VX/vx_kernels.h   -- list of supported kernels in the OpenVX standard
//    VX/vx_nodes.h     -- easier-to-use functions for the kernels
//    VX/vx_vendors.h
// The "VX/vxu.h" defines immediate mode utility functions.
//
// TODO STEP 01:********
//   1. Uncomment the lines below to include OpenVX header files.
#include <VX/vx.h>
#include <VX/vxu.h>

////////
// Useful macros for OpenVX error checking:
//   ERROR_CHECK_STATUS     - check status is VX_SUCCESS
//   ERROR_CHECK_OBJECT     - check if the object creation is successful
#define ERROR_CHECK_STATUS( status ) { \
        vx_status status_ = (status); \
        if(status_ != VX_SUCCESS) { \
            printf("ERROR: failed with status = (%d) at " __FILE__ "#%d\n", status_, __LINE__); \
            exit(1); \
        } \
    }

#define ERROR_CHECK_OBJECT( obj ) { \
        vx_status status_ = vxGetStatus((vx_reference)(obj)); \
        if(status_ != VX_SUCCESS) { \
            printf("ERROR: failed with status = (%d) at " __FILE__ "#%d\n", status_, __LINE__); \
            exit(1); \
        } \
    }

////////********
// log_callback function implements a mechanism to print log messages
// from OpenVX framework onto console.
//
// TODO STEP 03b (see 03a below):********
//   1. Find the function signature for the log_callback.
//      First, go to definition of vxRegisterLogCallback.
//      Find the type of its second argument (it matches vx_log_*_f).
//      Follow that type into its definition.
//      You'll see the function takes in four arguments, add them here.
//   2. Uncomment the body of the log callback function.
//        LOG: [<status>] <message>
//   3. Move to STEP 03c.
//      Hint: use the Find functionality, CTRL-F or CMD-F, type 02c, hit ENTER.
void VX_CALLBACK log_callback( /* add the function arguments and their types here */
  vx_context context,
  vx_referenct, ref,
  vx_status status,
  vx_char string[])
{
    printf( "LOG: [ status = %d ] %s\n", status, string );
    fflush( stdout );
}

////////
// main() has all the OpenVX application code for this exercise.
// Command-line usage:
//   % solution_exercise1 [<video-sequence>|<camera-device-number>]
// When neither video sequence nor camera device number is specified,
// it defaults to the video sequence in "PETS09-S1-L1-View001.avi".
int main( int argc, char * argv[] )
{
    // Get default video sequence when nothing is specified on command-line and
    // instantiate OpenCV GUI module for reading input RGB images and displaying
    // the image with OpenVX results.
    const char * video_sequence = argv[1];
    CGuiModule gui( video_sequence );

    // Try to grab the first video frame from the sequence using cv::VideoCapture
    // and check if a video frame is available.
    if( !gui.Grab() )
    {
        printf( "ERROR: input has no video\n" );
        return 1;
    }

    ////////
    // Set the application configuration parameters. Note that input video
    // sequence is an 8-bit RGB image with dimensions given by gui.GetWidth()
    // and gui.GetHeight(). The parameters for the Harris corners algorithm are:
    //   harris_strength_thresh - minimum threshold score to keep a corner
    //                            (computed using the normalized Sobel kernel)
    //   harris_min_distance    - radial L2 distance for non-max suppression
    //   harris_k_sensitivity   - sensitivity threshold k from the Harris-Stephens
    //   harris_gradient_size   - window size for gradient computation
    //   harris_block_size      - block window size used to compute the
    //                            Harris corner score
    vx_uint32  width                  = gui.GetWidth();
    vx_uint32  height                 = gui.GetHeight();
    vx_float32 harris_strength_thresh = 0.0005f;
    vx_float32 harris_min_distance    = 5.0f;
    vx_float32 harris_k_sensitivity   = 0.04f;
    vx_int32   harris_gradient_size   = 3;
    vx_int32   harris_block_size      = 3;

    ////////********
    // Create the OpenVX context and make sure the returned context is valid.
    //
    // TODO STEP 02:********
    //   1. Create an OpenVX context.
    //      First, set cursor on vx_context type,
    //      and right-click -> Follow Symbol Under Cursor (or hit F2).
    //      Read the documentation. See the reference to function vxCreate...
    //      Start typing the function instead of the NULL in the context assignment below.
    //      Move cursor over the function name, hit F2 again to read its documentation.
    //      Finish creating the context.
    //
    //   2. Use ERROR_CHECK_OBJECT macro to check if context creation was successful.
    //      Start typing ERROR_CHECK_OBJECT, then with cursor on top, hit F2 to see the definition.
    //      Finish calling the error check by passing it context as an argument.
    vx_context context = NULL;
    context = vxCreateContext();

    ////////********
    // Register the log_callback that you implemented to be able to receive
    // any log messages from the OpenVX framework.
    //
    // TODO STEP 03a:********
    //   1. Uncomment the line below.
    //      Fill in the first argument for vxRegisterLogCallback to register a log callback function.
    //      See the documentation (use F2).
    //      The second argument is a function pointer to log_callback, move next to STEP 03b.
    //      An easy way to find that is to put cursor on top of log_callback and hit F2.
  vxRegisterLogCallback(context, (vx_log_callbak_f)log_callback, vx_false_e );

    // TODO STEP 03c:********
    //   1. Uncomment the line below, run and see that you get a log output
    //      (in the Application Output tab below in the IDE).
  vxAddLogEntry( ( vx_reference ) context, VX_FAILURE, "Hello there!\n" );

    ////////********
    // Create OpenVX image object for input and OpenVX array object for output.
    //
    // TODO STEP 04:********
    //   1. See from vx_image type documentation with which function to create an image.
    //      Start typing the function name to replace NULL below, use autocomplete.
    //      Look into documentation (F2).
    //      The first argument should be obvious.
    //      For the second and third use local variables defined above, one of them is called width.
    //      For the last one use VX_DF_IMAGE_RGB.
    //   2. Use vxCreateArray API to create an array object with keypoint data type.
    //      See the documentation what should be the second argument (it's a type enum for keypoints).
    //   3. Use ERROR_CHECK_OBJECT to check proper creation of objects.
    //      We gave the one for the array, do a similar check for the image.
    vx_image input_rgb_image       = NULL;
    vx_array output_keypoint_array = NULL;
    output_keypoint_array  = vxCreateArray( context, VX_TYPE_KEYPOINT, 10000 );
    ERROR_CHECK_OBJECT( output_keypoint_array );
    input_rgb_image = vxCreateImage(context, width, height, VX_DF_IMAGE_RGB);
    ERROR_CHECK_OBJECT( input_rgb_image );

    ////////********
    // The Harris corner detector algorithm expects input to be an 8-bit image.
    // Given that the input is an RGB image, it is best to extract a gray scale
    // from RGB image, which requires two steps:
    //   - perform RGB to IYUV color conversion
    //   - extract Y channel from IYUV image
    // This requires two intermediate OpenVX image objects. Since you're
    // going to use immediate mode functions, you need to use vxCreateImage
    // to create the image objects, but not the vxCreateVirtualImage API.
    //
    // TODO STEP 05:********
    //   1. Create an IYUV image and a U8 image (for Y channel) with the same
    //      dimensions as the input RGB image. The image formats for
    //      IYUV and U8 images are VX_DF_IMAGE_IYUV and VX_DF_IMAGE_U8.
    //   2. Use ERROR_CHECK_OBJECT to check that the objects are valid.
    vx_image yuv_image        = NULL;
    vx_image gray_scale_image = NULL;

   yuv_image = vxCreate(context, width, height, VX_DF_IMAGE_IYUV);
   ERROR_CHECK_OBJECT(yuv_image);

   gray_scale_image = vxCreateImage(context, width, height, VX_DF_IMAGE_U8);
   ERROR_CHECK_OBJECT(gray_scale_image);

    ////////********
    // The immediate mode Harris corner detector function takes the
    // strength_thresh, min_distance, and sensitivity parameters as scalar
    // data objects. So, you need to create three scalar objects with
    // corresponding configuration parameters.
    //
    // TODO STEP 06:********
    //   1. Create scalar data objects of VX_TYPE_FLOAT32 for strength_thresh,
    //      min_distance, and sensitivity, with initial values as harris_strength_thresh,
    //      harris_min_distance, and harris_k_sensitivity.
    //      The first one is given below.
    //   2. Use ERROR_CHECK_OBJECT to check the objects.
    vx_scalar strength_thresh = vxCreateScalar( context, VX_TYPE_FLOAT32, &harris_strength_thresh );
    vx_scalar min_distance    =  vxCreateScalar( context, VX_TYPE_FLOAT32, &harris_min_distance);
    vx_scalar sensitivity     =  vxCreateScalar( context, VX_TYPE_FLOAT32, &harris_k_sensitivity);

    ////////
    // Process the video sequence frame by frame until the end of sequence or aborted.
    for( int frame_index = 0; !gui.AbortRequested(); frame_index++ )
    {
        ////////********
        // Copy the input RGB frame from OpenCV to OpenVX.
        // In order to do this, you need to use vxAccessImagePatch and vxCommitImagePatch APIs.
        // See "VX/vx_api.h" for the description of these APIs.
        //
        // TODO STEP 07:********
        //   1. Specify the coordinates of image patch by declaring the patch
        //      as a vx_rectangle_t data type. It has four fields, we've given you the first one.
        //      See for the documentation what are the others. The start values should be zeros,
        //      end values should be width (for x) and height (for y).
        //   2. Specify the memory layout of the OpenCV RGB image buffer by
        //      declaring the layout as a vx_imagepatch_addressing_t type.
        //      Remember that you need to specify stride_x and stride_y fields
        //      of vx_imagepatch_addressing_t for the image buffer layout.
        //      The stride_x should be 3 and stride_y should be gui.GetStride().
        //      We've given you the stride_y, add the stride_x.
        //   3. Get the pointer to buffer using gui.GetBuffer() and call
        //      vxAccessImagePatch for VX_WRITE_ONLY usage mode with a pointer
        //      to pointer returned by gui.GetBuffer() so COPY mode is used.
        //      Then immediately call vxCommitImagePatch for the actual copy.
        //      Use the image patch and memory layout in the above two steps.
        //      We've given you the access function, please fill in the commit function.
        //   4. Compare the return status with VX_SUCCESS to check if access/
        //      commit are successful. Or use the ERROR_CHECK_STATUS macro.
        vx_rectangle_t cv_rgb_image_region;
        cv_rgb_image_region.start_x = 0;
        cv_rgb_image_region.start_y = 0;
        cv_rgb_image_region.end_x = width;
        cv_rgb_image_region.end_y = hight;
        vx_imagepatch_addressing_t cv_rgb_image_layout;
        cv_rgb_image_layout.stride_x   = 3;
        cv_rgb_image_layout.stride_y   = gui.GetStride();
        vx_uint8 * cv_rgb_image_buffer = gui.GetBuffer();
        ERROR_CHECK_STATUS( vxAccessImagePatch( input_rgb_image, &cv_rgb_image_region, 0,
                                                &cv_rgb_image_layout, ( void ** )&cv_rgb_image_buffer,
                                                VX_WRITE_ONLY ) );
        ERROR_CHECK_STATUS( vxCommitImagePatch(input_rgb_image, &cv_rgb_image_region, 0,
                                                &cv_rgb_image_layout, cv_rgb_image_buffer ) );

        ////////********
        // In order to compute Harris corners from input RGB image, first you
        // need to convert the input RGB image into a gray scale image, followed by
        // running the Harris corner detector function. All the immediate mode
        // functions you need are declared in "VX/vxu.h".
        //
        // TODO STEP 08:********
        //   1. Convert the input RGB image to IYUV image using vxuColorConvert API.
        //   2. Extract Y channel from IYUV image into a gray scale image using
        //      vxuChannelExtract API with VX_CHANNEL_Y as the channel.
        //   3. Compute Harris corner detector using vxuHarrisCorners API.
        //      The num_corners parameter to vxuHarrisCorners is optional,
        //      you need to set it to NULL in this exercise.
        //   4. Use ERROR_CHECK_STATUS for error checking.
        ERROR_CHECK_STATUS( vxuColorConvert( context, input_rgb_image, yuv_image ) );
        ERROR_CHECK_STATUS( vxuChannelExtract( context, yuv_image, VX_CHANNEL_Y, gray_scale_image) );
           ERROR_CHECK_STATUS( vxuHarrisCorners( context, gray_scale_image, strength_thresh,
                                              min_distance, sensitivity, harris_gradient_size,
                                              harris_block_size, output_keypoint_array, NULL ) );

        ////////********
        // To mark the keypoints in display, you need to access the output
        // keypoint array and draw each item on the output window using
        // gui.DrawPoint().
        //
        // TODO STEP 09:********
        //   1. OpenVX array object has an attribute that stores the current number of items.
        //      The name of the attribute is VX_ARRAY_ATTRIBUTE_NUMITEMS and its value is of type vx_size.
        //      Use vxQueryArray API to get the number of keypoints in the output_keypoint_array
        //      data object, representing number of corners detected in the input RGB image.
        //      IMPORTANT: read the number of items into "num_corners"
        //      because this variable is displayed by code segment below.
        //   2. The data items in output keypoint array are of type vx_keypoint_t (see "VX/vx_types.h").
        //      To access the array buffer, use vxAccessArrayRange with start index = 0,
        //      end index = number of items in the array, and usage mode = VX_READ_ONLY.
        //      Note that the stride returned by this access call is not guaranteed to be sizeof(vx_keypoint_t).
        //      Also make sure that num_corners is > 0, because vxAccessArrayRange expects an end index > 0.
        //      We've given you this code.
        //   3. For each item in the keypoint buffer, use vxArrayItem to access individual keypoint
        //      and draw a marker at (x,y) using gui.DrawPoint(). The vx_keypoint_t has x & y data fields.
        //   4. Handover the control of output keypoint buffer back to
        //      OpenVX framework by calling vxCommitArrayRange API.
        //   5. Use ERROR_CHECK_STATUS for error checking.
        vx_size num_corners = 0;
        ERROR_CHECK_STATUS( vxQueryArray( output_keypoint_array,
                                          VX_ARRAY_ATTRIBUTE_NUMITEMS,
                                          &num_corners,
                                          sizeof( num_corners ) ) );
        if( num_corners > 0 )
        {
            vx_size kp_stride;
            vx_keypoint_t * kp_buf = NULL;
            ERROR_CHECK_STATUS( vxAccessArrayRange( output_keypoint_array, 0, num_corners,
                                                    &kp_stride, ( void ** ) &kp_buf, VX_READ_ONLY ) );
            for( vx_size i = 0; i < num_corners; i++ )
            {
                 vx_keypoint_t * kp = &vxArrayItem(vx_keypoint_t, kp_buf, 0, kp_stride);
                gui.DrawPoint( kp->x, kp->y );
            }
            ERROR_CHECK_STATUS( vxCommitArrayRange( output_keypoint_array, 0, num_corners, kp_buf ) );
        }

        ////////
        // Display the results and grab the next input RGB frame for the next iteration.
        char text[128];
        sprintf( text, "Keyboard ESC/Q-Quit SPACE-Pause [FRAME %d]", frame_index );
        gui.DrawText( 0, 16, text );
        sprintf( text, "Number of Corners: %d", ( int )num_corners );
        gui.DrawText( 0, 36, text );
        gui.Show();
        if( !gui.Grab() )
        {
            // Terminate the processing loop if the end of sequence is detected.
            gui.WaitForKey();
            break;
        }
    }

    ////////********
    // Release all the OpenVX objects created in this exercise, and make the context as the last one to release.
    // To release an OpenVX object, you need to call vxRelease<Object> API which takes a pointer to the object.
    // If the release operation is successful, the OpenVX framework will reset the object to NULL.
    //
    // TODO STEP 10:********
    //   1. Release all the image objects using vxReleaseImage API.
    //   2. Release all other objects using vxRelease<Object> APIs.
    //   3. Use ERROR_CHECK_STATUS for error checking.
    // Release three images.
    ERROR_CHECK_STATUS( vxReleaseImage( &input_rgb_image ) );
    ERROR_CHECK_STATUS( vxReleaseImage( &gray_scale_image ) );
    ERROR_CHECK_STATUS( vxReleaseImage( &yuv_image ) );
    // Release one array.
    ERROR_CHECK_STATUS( vxReleaseArray( &output_keypoint_array ) );
    // Release three Scalars.
    ERROR_CHECK_STATUS( vxReleaseScalar( &input_rgb_image ) );
    ERROR_CHECK_STATUS( vxReleaseScalar( &strength_thresh ) );
    ERROR_CHECK_STATUS( vxReleaseScalar( &sensitivity ) );

    ERROR_CHECK_STATUS( vxReleaseContext( &context ) );

    return 0;
}

I change the cmakelists, added OpenVX libraries. This issue is fixed...

The result is right, the wroking code like below:
/*
 * Copyright (c) 2016 The Khronos Group Inc.
 *
 * Permission is hereby granted, free of charge, to any person obtaining a
 * copy of this software and/or associated documentation files (the
 * "Materials"), to deal in the Materials without restriction, including
 * without limitation the rights to use, copy, modify, merge, publish,
 * distribute, sublicense, and/or sell copies of the Materials, and to
 * permit persons to whom the Materials are furnished to do so, subject to
 * the following conditions:
 *
 * The above copyright notice and this permission notice shall be included
 * in all copies or substantial portions of the Materials.
 *
 * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
 * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
 * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
 * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
 */

/*!
 * \file    exercise1.cpp
 * \example exercise1
 * \brief   Harris corners example.
 *          Look for TODO STEP keyword in comments for the code snippets that you need to write.
 * \author  Radhakrishna Giduthuri<EMAIL_ADDRESS> *          Kari Pulli<EMAIL_ADDRESS> */

////////
// Include OpenCV wrapper for image capture and display.
#include "opencv_camera_display.h"

////////********
// The most important top-level OpenVX header files are "VX/vx.h" and "VX/vxu.h".
// The "VX/vx.h" includes all headers needed to support functionality of the
// OpenVX specification, except for immediate mode functions, and it includes:
//    VX/vx_types.h     -- type definitions required by the OpenVX standard
//    VX/vx_api.h       -- all framework API definitions
//    VX/vx_kernels.h   -- list of supported kernels in the OpenVX standard
//    VX/vx_nodes.h     -- easier-to-use functions for the kernels
//    VX/vx_vendors.h
// The "VX/vxu.h" defines immediate mode utility functions.
//
// TODO STEP 01:********
//   1. Uncomment the lines below to include OpenVX header files.
#include <VX/vx.h>
#include <VX/vxu.h>

////////
// Useful macros for OpenVX error checking:
//   ERROR_CHECK_STATUS     - check status is VX_SUCCESS
//   ERROR_CHECK_OBJECT     - check if the object creation is successful
#define ERROR_CHECK_STATUS( status ) { \
        vx_status status_ = (status); \
        if(status_ != VX_SUCCESS) { \
            printf("ERROR: failed with status = (%d) at " __FILE__ "#%d\n", status_, __LINE__); \
            exit(1); \
        } \
    }

#define ERROR_CHECK_OBJECT( obj ) { \
        vx_status status_ = vxGetStatus((vx_reference)(obj)); \
        if(status_ != VX_SUCCESS) { \
            printf("ERROR: failed with status = (%d) at " __FILE__ "#%d\n", status_, __LINE__); \
            exit(1); \
        } \
    }

////////********
// log_callback function implements a mechanism to print log messages
// from OpenVX framework onto console.
//
// TODO STEP 03b (see 03a below):********
//   1. Find the function signature for the log_callback.
//      First, go to definition of vxRegisterLogCallback.
//      Find the type of its second argument (it matches vx_log_*_f).
//      Follow that type into its definition.
//      You'll see the function takes in four arguments, add them here.
//   2. Uncomment the body of the log callback function.
//        LOG: [<status>] <message>
//   3. Move to STEP 03c.
//      Hint: use the Find functionality, CTRL-F or CMD-F, type 02c, hit ENTER.
void VX_CALLBACK log_callback( /* add the function arguments and their types here */
  vx_context context,
  vx_referenct, ref,
  vx_status status,
  vx_char string[])
{
    printf( "LOG: [ status = %d ] %s\n", status, string );
    fflush( stdout );
}

////////
// main() has all the OpenVX application code for this exercise.
// Command-line usage:
//   % solution_exercise1 [<video-sequence>|<camera-device-number>]
// When neither video sequence nor camera device number is specified,
// it defaults to the video sequence in "PETS09-S1-L1-View001.avi".
int main( int argc, char * argv[] )
{
    // Get default video sequence when nothing is specified on command-line and
    // instantiate OpenCV GUI module for reading input RGB images and displaying
    // the image with OpenVX results.
    const char * video_sequence = argv[1];
    CGuiModule gui( video_sequence );

    // Try to grab the first video frame from the sequence using cv::VideoCapture
    // and check if a video frame is available.
    if( !gui.Grab() )
    {
        printf( "ERROR: input has no video\n" );
        return 1;
    }

    ////////
    // Set the application configuration parameters. Note that input video
    // sequence is an 8-bit RGB image with dimensions given by gui.GetWidth()
    // and gui.GetHeight(). The parameters for the Harris corners algorithm are:
    //   harris_strength_thresh - minimum threshold score to keep a corner
    //                            (computed using the normalized Sobel kernel)
    //   harris_min_distance    - radial L2 distance for non-max suppression
    //   harris_k_sensitivity   - sensitivity threshold k from the Harris-Stephens
    //   harris_gradient_size   - window size for gradient computation
    //   harris_block_size      - block window size used to compute the
    //                            Harris corner score
    vx_uint32  width                  = gui.GetWidth();
    vx_uint32  height                 = gui.GetHeight();
    vx_float32 harris_strength_thresh = 0.0005f;
    vx_float32 harris_min_distance    = 5.0f;
    vx_float32 harris_k_sensitivity   = 0.04f;
    vx_int32   harris_gradient_size   = 3;
    vx_int32   harris_block_size      = 3;

    ////////********
    // Create the OpenVX context and make sure the returned context is valid.
    //
    // TODO STEP 02:********
    //   1. Create an OpenVX context.
    //      First, set cursor on vx_context type,
    //      and right-click -> Follow Symbol Under Cursor (or hit F2).
    //      Read the documentation. See the reference to function vxCreate...
    //      Start typing the function instead of the NULL in the context assignment below.
    //      Move cursor over the function name, hit F2 again to read its documentation.
    //      Finish creating the context.
    //
    //   2. Use ERROR_CHECK_OBJECT macro to check if context creation was successful.
    //      Start typing ERROR_CHECK_OBJECT, then with cursor on top, hit F2 to see the definition.
    //      Finish calling the error check by passing it context as an argument.
    vx_context context = NULL;
    context = vxCreateContext();

    ////////********
    // Register the log_callback that you implemented to be able to receive
    // any log messages from the OpenVX framework.
    //
    // TODO STEP 03a:********
    //   1. Uncomment the line below.
    //      Fill in the first argument for vxRegisterLogCallback to register a log callback function.
    //      See the documentation (use F2).
    //      The second argument is a function pointer to log_callback, move next to STEP 03b.
    //      An easy way to find that is to put cursor on top of log_callback and hit F2.
  vxRegisterLogCallback(context, (vx_log_callbak_f)log_callback, vx_false_e );

    // TODO STEP 03c:********
    //   1. Uncomment the line below, run and see that you get a log output
    //      (in the Application Output tab below in the IDE).
  vxAddLogEntry( ( vx_reference ) context, VX_FAILURE, "Hello there!\n" );

    ////////********
    // Create OpenVX image object for input and OpenVX array object for output.
    //
    // TODO STEP 04:********
    //   1. See from vx_image type documentation with which function to create an image.
    //      Start typing the function name to replace NULL below, use autocomplete.
    //      Look into documentation (F2).
    //      The first argument should be obvious.
    //      For the second and third use local variables defined above, one of them is called width.
    //      For the last one use VX_DF_IMAGE_RGB.
    //   2. Use vxCreateArray API to create an array object with keypoint data type.
    //      See the documentation what should be the second argument (it's a type enum for keypoints).
    //   3. Use ERROR_CHECK_OBJECT to check proper creation of objects.
    //      We gave the one for the array, do a similar check for the image.
    vx_image input_rgb_image       = NULL;
    vx_array output_keypoint_array = NULL;
    output_keypoint_array  = vxCreateArray( context, VX_TYPE_KEYPOINT, 10000 );
    ERROR_CHECK_OBJECT( output_keypoint_array );
    input_rgb_image = vxCreateImage(context, width, height, VX_DF_IMAGE_RGB);
    ERROR_CHECK_OBJECT( input_rgb_image );

    ////////********
    // The Harris corner detector algorithm expects input to be an 8-bit image.
    // Given that the input is an RGB image, it is best to extract a gray scale
    // from RGB image, which requires two steps:
    //   - perform RGB to IYUV color conversion
    //   - extract Y channel from IYUV image
    // This requires two intermediate OpenVX image objects. Since you're
    // going to use immediate mode functions, you need to use vxCreateImage
    // to create the image objects, but not the vxCreateVirtualImage API.
    //
    // TODO STEP 05:********
    //   1. Create an IYUV image and a U8 image (for Y channel) with the same
    //      dimensions as the input RGB image. The image formats for
    //      IYUV and U8 images are VX_DF_IMAGE_IYUV and VX_DF_IMAGE_U8.
    //   2. Use ERROR_CHECK_OBJECT to check that the objects are valid.
    vx_image yuv_image        = NULL;
    vx_image gray_scale_image = NULL;

   yuv_image = vxCreate(context, width, height, VX_DF_IMAGE_IYUV);
   ERROR_CHECK_OBJECT(yuv_image);

   gray_scale_image = vxCreateImage(context, width, height, VX_DF_IMAGE_U8);
   ERROR_CHECK_OBJECT(gray_scale_image);

    ////////********
    // The immediate mode Harris corner detector function takes the
    // strength_thresh, min_distance, and sensitivity parameters as scalar
    // data objects. So, you need to create three scalar objects with
    // corresponding configuration parameters.
    //
    // TODO STEP 06:********
    //   1. Create scalar data objects of VX_TYPE_FLOAT32 for strength_thresh,
    //      min_distance, and sensitivity, with initial values as harris_strength_thresh,
    //      harris_min_distance, and harris_k_sensitivity.
    //      The first one is given below.
    //   2. Use ERROR_CHECK_OBJECT to check the objects.
    vx_scalar strength_thresh = vxCreateScalar( context, VX_TYPE_FLOAT32, &harris_strength_thresh );
    vx_scalar min_distance    =  vxCreateScalar( context, VX_TYPE_FLOAT32, &harris_min_distance);
    vx_scalar sensitivity     =  vxCreateScalar( context, VX_TYPE_FLOAT32, &harris_k_sensitivity);

    ////////
    // Process the video sequence frame by frame until the end of sequence or aborted.
    for( int frame_index = 0; !gui.AbortRequested(); frame_index++ )
    {
        ////////********
        // Copy the input RGB frame from OpenCV to OpenVX.
        // In order to do this, you need to use vxAccessImagePatch and vxCommitImagePatch APIs.
        // See "VX/vx_api.h" for the description of these APIs.
        //
        // TODO STEP 07:********
        //   1. Specify the coordinates of image patch by declaring the patch
        //      as a vx_rectangle_t data type. It has four fields, we've given you the first one.
        //      See for the documentation what are the others. The start values should be zeros,
        //      end values should be width (for x) and height (for y).
        //   2. Specify the memory layout of the OpenCV RGB image buffer by
        //      declaring the layout as a vx_imagepatch_addressing_t type.
        //      Remember that you need to specify stride_x and stride_y fields
        //      of vx_imagepatch_addressing_t for the image buffer layout.
        //      The stride_x should be 3 and stride_y should be gui.GetStride().
        //      We've given you the stride_y, add the stride_x.
        //   3. Get the pointer to buffer using gui.GetBuffer() and call
        //      vxAccessImagePatch for VX_WRITE_ONLY usage mode with a pointer
        //      to pointer returned by gui.GetBuffer() so COPY mode is used.
        //      Then immediately call vxCommitImagePatch for the actual copy.
        //      Use the image patch and memory layout in the above two steps.
        //      We've given you the access function, please fill in the commit function.
        //   4. Compare the return status with VX_SUCCESS to check if access/
        //      commit are successful. Or use the ERROR_CHECK_STATUS macro.
        vx_rectangle_t cv_rgb_image_region;
        cv_rgb_image_region.start_x = 0;
        cv_rgb_image_region.start_y = 0;
        cv_rgb_image_region.end_x = width;
        cv_rgb_image_region.end_y = hight;
        vx_imagepatch_addressing_t cv_rgb_image_layout;
        cv_rgb_image_layout.stride_x   = 3;
        cv_rgb_image_layout.stride_y   = gui.GetStride();
        vx_uint8 * cv_rgb_image_buffer = gui.GetBuffer();
        ERROR_CHECK_STATUS( vxAccessImagePatch( input_rgb_image, &cv_rgb_image_region, 0,
                                                &cv_rgb_image_layout, ( void ** )&cv_rgb_image_buffer,
                                                VX_WRITE_ONLY ) );
        ERROR_CHECK_STATUS( vxCommitImagePatch(input_rgb_image, &cv_rgb_image_region, 0,
                                                &cv_rgb_image_layout, cv_rgb_image_buffer ) );

        ////////********
        // In order to compute Harris corners from input RGB image, first you
        // need to convert the input RGB image into a gray scale image, followed by
        // running the Harris corner detector function. All the immediate mode
        // functions you need are declared in "VX/vxu.h".
        //
        // TODO STEP 08:********
        //   1. Convert the input RGB image to IYUV image using vxuColorConvert API.
        //   2. Extract Y channel from IYUV image into a gray scale image using
        //      vxuChannelExtract API with VX_CHANNEL_Y as the channel.
        //   3. Compute Harris corner detector using vxuHarrisCorners API.
        //      The num_corners parameter to vxuHarrisCorners is optional,
        //      you need to set it to NULL in this exercise.
        //   4. Use ERROR_CHECK_STATUS for error checking.
        ERROR_CHECK_STATUS( vxuColorConvert( context, input_rgb_image, yuv_image ) );
        ERROR_CHECK_STATUS( vxuChannelExtract( context, yuv_image, VX_CHANNEL_Y, gray_scale_image) );
           ERROR_CHECK_STATUS( vxuHarrisCorners( context, gray_scale_image, strength_thresh,
                                              min_distance, sensitivity, harris_gradient_size,
                                              harris_block_size, output_keypoint_array, NULL ) );

        ////////********
        // To mark the keypoints in display, you need to access the output
        // keypoint array and draw each item on the output window using
        // gui.DrawPoint().
        //
        // TODO STEP 09:********
        //   1. OpenVX array object has an attribute that stores the current number of items.
        //      The name of the attribute is VX_ARRAY_ATTRIBUTE_NUMITEMS and its value is of type vx_size.
        //      Use vxQueryArray API to get the number of keypoints in the output_keypoint_array
        //      data object, representing number of corners detected in the input RGB image.
        //      IMPORTANT: read the number of items into "num_corners"
        //      because this variable is displayed by code segment below.
        //   2. The data items in output keypoint array are of type vx_keypoint_t (see "VX/vx_types.h").
        //      To access the array buffer, use vxAccessArrayRange with start index = 0,
        //      end index = number of items in the array, and usage mode = VX_READ_ONLY.
        //      Note that the stride returned by this access call is not guaranteed to be sizeof(vx_keypoint_t).
        //      Also make sure that num_corners is > 0, because vxAccessArrayRange expects an end index > 0.
        //      We've given you this code.
        //   3. For each item in the keypoint buffer, use vxArrayItem to access individual keypoint
        //      and draw a marker at (x,y) using gui.DrawPoint(). The vx_keypoint_t has x & y data fields.
        //   4. Handover the control of output keypoint buffer back to
        //      OpenVX framework by calling vxCommitArrayRange API.
        //   5. Use ERROR_CHECK_STATUS for error checking.
        vx_size num_corners = 0;
        ERROR_CHECK_STATUS( vxQueryArray( output_keypoint_array,
                                          VX_ARRAY_ATTRIBUTE_NUMITEMS,
                                          &num_corners,
                                          sizeof( num_corners ) ) );
        if( num_corners > 0 )
        {
            vx_size kp_stride;
            vx_keypoint_t * kp_buf = NULL;
            ERROR_CHECK_STATUS( vxAccessArrayRange( output_keypoint_array, 0, num_corners,
                                                    &kp_stride, ( void ** ) &kp_buf, VX_READ_ONLY ) );
            for( vx_size i = 0; i < num_corners; i++ )
            {
                 vx_keypoint_t * kp = &vxArrayItem(vx_keypoint_t, kp_buf+i, 0, kp_stride);
                gui.DrawPoint( kp->x, kp->y );
            }
            ERROR_CHECK_STATUS( vxCommitArrayRange( output_keypoint_array, 0, num_corners, kp_buf ) );
        }

        ////////
        // Display the results and grab the next input RGB frame for the next iteration.
        char text[128];
        sprintf( text, "Keyboard ESC/Q-Quit SPACE-Pause [FRAME %d]", frame_index );
        gui.DrawText( 0, 16, text );
        sprintf( text, "Number of Corners: %d", ( int )num_corners );
        gui.DrawText( 0, 36, text );
        gui.Show();
        if( !gui.Grab() )
        {
            // Terminate the processing loop if the end of sequence is detected.
            gui.WaitForKey();
            break;
        }
    }

    ////////********
    // Release all the OpenVX objects created in this exercise, and make the context as the last one to release.
    // To release an OpenVX object, you need to call vxRelease<Object> API which takes a pointer to the object.
    // If the release operation is successful, the OpenVX framework will reset the object to NULL.
    //
    // TODO STEP 10:********
    //   1. Release all the image objects using vxReleaseImage API.
    //   2. Release all other objects using vxRelease<Object> APIs.
    //   3. Use ERROR_CHECK_STATUS for error checking.
    // Release three images.
    ERROR_CHECK_STATUS( vxReleaseImage( &input_rgb_image ) );
    ERROR_CHECK_STATUS( vxReleaseImage( &gray_scale_image ) );
    ERROR_CHECK_STATUS( vxReleaseImage( &yuv_image ) );
    // Release one array.
    ERROR_CHECK_STATUS( vxReleaseArray( &output_keypoint_array ) );
    // Release three Scalars.
    ERROR_CHECK_STATUS( vxReleaseScalar( &input_rgb_image ) );
    ERROR_CHECK_STATUS( vxReleaseScalar( &strength_thresh ) );
    ERROR_CHECK_STATUS( vxReleaseScalar( &sensitivity ) );

    ERROR_CHECK_STATUS( vxReleaseContext( &context ) );

    return 0;
}


docs(lineage): Updating Lineage feature guide

Expands on manual lineage guide to include details around managing lineage edges via API; simplifies sidebar navigation to remove unnecessary subdirectory in Enrich Metadata section
Checklist

[ ] The PR conforms to DataHub's Contributing Guideline (particularly Commit Message Format)
[ ] Links to related issues (if applicable)
[ ] Tests for the changes have been added/updated (if applicable)
[ ] Docs related to the changes have been added/updated (if applicable). If a new feature has been added a Usage Guide has been added for the same.
[ ] For any breaking change/potential downtime/deprecation/big changes an entry has been made in Updating DataHub

@chriscollins3456 @jjoyce0510 this is ready for final review. One thing to consider -- this PR removes intro.md which is our legacy entry point for lineage.. it was extremely low value, but it will result in a broken link. Should we think through redirects?


nixos/doc: fix acme dns-01 example

Summary: fix errors with example code in the manual that shows how to set up DNS-01 verification via the acme protocol, e.g. for those who want to get wildcard certificates from Let's Encrypt.
Fix syntax error in nix arrays (there should not be commas.)
Fix permissions on /var/lib/secrets so it can be read by bind daemon. Without this fix bind won't start.
Add the missing feature: put the generated secret into certs.secret
Description of changes

Things done

Built on platform(s)

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

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested, as applicable:

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

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

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module
[ ] (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes

[ ] Fits CONTRIBUTING.md.

@winterqt We good to go on this? I'm hoping we can get it merged before it bit-rots.

anything I can do to help this along?


Leading Zeros getting removed

Hey,
I've got this input
<input pattern="\d*" mask="99999999" ng-change="updateApplication()" required type="number" ng-model="application.number">

This is for a a 8 digit string
Things like
11111111 and 22222222 work, however if i do something like 001 then the leading zeros get stripped out, the moment you type in a non-zero character it gets removed
Gif below demonstrates

Try changing the type = "number" to type ="tel"


[Backtracing][Linux] Add Linux support to swift-backtrace.

We need a Linux specific Target implementation, and a couple of minor tweaks to make things build everywhere.
rdar://110262673

This is built on #66408 and includes all of its commits. The first commit that actually forms part of this PR is 7cc2446.

Explanation: Adds the necessary code to the swift-backtrace executable to support Linux.
Risk: Low. Only affects Linux, and this code is disabled until the later enabling PR.
Original PR: #66337
Reviewed by: @MaxDesiatov
Resolves: rdar://110262673
Tests: The Linux backtracing tests exercise this code (but those are in the enabling PR as they won't work until this is enabled).

@swift-ci Please test


Chart not rendered

Although the code inspection shows the chart seems to be properly defined, no chart is rendered. It's conceivable I missed something, but what?
Pieces of the puzzle:
Symfony 6.0.6
composer:
symfony/ux-chartjs: v2.1.0
packages.json:
"@hotwired/stimulus": "^3.0.1"
"@symfony/stimulus-bridge": "^3.0.0"
"@symfony/webpack-encore": "^1.7.0"
bootstrap.js:
import { startStimulusApp } from '@symfony/stimulus-bridge';

// Registers Stimulus controllers from controllers.json and in the controllers/ directory
export const app = startStimulusApp(require.context(
    '@symfony/stimulus-bridge/lazy-controller-loader!./controllers',
    true,
    /\.[jt]sx?$/
));

app.js includes:

export const app = startStimulusApp(require.context(
    '@symfony/stimulus-bridge/lazy-controller-loader!./controllers',
    true,
    /\.(j|t)sx?$/
));

Admin controller:
    public function index(ChartService $charter, ChartBuilderInterface $chartBuilder)
    {
        $v_chart = $charter->volunteerChart();
        $volChart = $chartBuilder->createChart(Chart::TYPE_LINE);
        $volChart->setData($v_chart['data']);
        $volChart->setOptions($v_chart['options']);
        ....

        return $this->render('Admin/index.html.twig', [
                    'vol_chart' => $volChart,
                    ...
        ]);
    }

where ChartService simply generates the data and options to be applied.
template: {{ render_chart(vol_chart) }}
Inspector's HTML:
<canvas data-controller="symfony--ux-chartjs--chart" data-symfony--ux-chartjs--chart-view-value="{"type":"line","data":{"labels":["Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","Jan","Feb"],"datasets":[{"label":"Volunteer registrations by month","backgroundColor":"rgb(255, 99, 132)","borderColor":"rgb(255, 99, 132)","data":[4,9,16,23,29,34,38,41,44,46,47,48]}]},"options":{"scales":{"y":{"suggestedMin":0,"suggestedMax":100}}}}"></canvas>

Edit: more readable HTML

In an effort to avoid any extraneous mistakes I distilled the code from a current project to a repo at github.  If you run it with symfony serve -d, just launching <IP_ADDRESS>:8000 will take you to a blank page where the page source code contains the rendered <canvas>...</canvas>.
The setup for the distilled code was simply:
symfony new chart_test --webapp
composer require symfony/ux-chartjs
yarn install --force
yarn encore dev

I then added three files: a controller, a service and a template.

Discovered that in the original project no Chart.js controller had been added in ../assets. Assuring there was a controller in chart_test allowed the chart to be rendered.

is there any solution? I have a similar problem


Create TSP.java

Implemented Travelling Salesman Problem

Hi @arin2002,
Could you please inform why it is failing 1 check (label)?

dont worry it is merged


stops working when it raches 20000 mesh vertices/1000 trail size anyway to fix that?

https://github.com/Codel1417/VRC-Ender-3/releases/tag/V1.2


ome-ns-web: Bumping OMERO.web release

Upgraded ns-web by re-running the server-state-playbook after bumping the OMERO.web version in the playbook.
Note, this did not work straight off, as the role which this playbook is using a hard-coded set of dependencies, rather than reading the requirements.yml shipped with the OMERO.web distribution. This will be fixed in the role with the inclusion of https://github.com/openmicroscopy/ansible-role-omero-web/pull/3/files
Run against ome-ns-web in check mode: ns-web-531_upgrade-provision_20170426-164631Z.txt
Run against ome-ns-web: ns-web-531_upgrade-provision_20170426-164926Z.txt
(i.e. live / in production)

Travis error is unrelated:
sorry, openmicroscopy.omero-common was not found on https://galaxy.ansible.com.

Bumping.


chore: update pnpm-lock.yaml

What this PR solves / how to test
Runinning pnpm i results in a changed lockfile, looks like we forgot to commit it somewhere.
Fixes #0000 (Just a chore)
Author has addressed the following

Tests

[ ] TODO (before merge)
[ ] Tests included
[x] Tests not necessary because: internal

E2E Tests CI Job required? (Use "e2e" label or ask maintainer to run separately)

[ ] I don't know
[ ] Required
[x] Not required because: internal

Changeset (Changeset guidelines)

[ ] TODO (before merge)
[ ] Changeset included
[x] Changeset not necessary because: internal

Public documentation

[ ] TODO (before merge)
[ ] Cloudflare docs PR(s):
[x] Documentation not necessary because:internal

friction log, this

generated this

This has come up a number of times. Every time we fix it the changesets Version Packages PR reverts it. 😢

Oh I can't merge it, could one of you please do so? thank you!

There is little point in merging this without fixing the changesets problem because it will re-appear after the next release later today.

That's fine, I'll send a PR again after the release while we wanit for a proper fix. But I can't test PRs or send fresh PRs without this file popping up everytime.


Memory allocation error on worker 0: std::bad_alloc: cudaErrorMemoryAllocation: out of memory

Traceback (most recent call last):
  File "/opt/h2oai/dai/python/lib/python3.8/site-packages/xgboost/core.py", line 445, in inner_f
    return f(**kwargs)
  File "/opt/h2oai/dai/python/lib/python3.8/site-packages/xgboost/sklearn.py", line 1229, in fit
    self._Booster = train(
  File "/opt/h2oai/dai/python/lib/python3.8/site-packages/xgboost/training.py", line 186, in train
    bst = _train_internal(params, dtrain,
  File "/opt/h2oai/dai/python/lib/python3.8/site-packages/xgboost/training.py", line 81, in _train_internal
    bst.update(dtrain, i, obj)
  File "/opt/h2oai/dai/python/lib/python3.8/site-packages/xgboost/core.py", line 1572, in update
    _check_call(_LIB.XGBoosterUpdateOneIter(self.handle,
  File "/opt/h2oai/dai/python/lib/python3.8/site-packages/xgboost/core.py", line 213, in _check_call
    raise XGBoostError(py_str(_LIB.XGBGetLastError()))
xgboost.core.XGBoostError: [13:55:26] /workspace/xgboost/src/c_api/../data/../common/device_helpers.cuh:414: Memory allocation error on worker 0: std::bad_alloc: cudaErrorMemoryAllocation: out of memory
- Free memory:<PHONE_NUMBER>6
- Requested memory: 47996

Stack trace:
  [bt] (0) /opt/h2oai/dai/python/lib/python3.8/site-packages/xgboost/lib/libxgboost.so(+0x30b2d9) [0x7f3c6fe452d9]
  [bt] (1) /opt/h2oai/dai/python/lib/python3.8/site-packages/xgboost/lib/libxgboost.so(+0x30dd6d) [0x7f3c6fe47d6d]
  [bt] (2) /opt/h2oai/dai/python/lib/python3.8/site-packages/xgboost/lib/libxgboost.so(+0x340633) [0x7f3c6fe7a633]
  [bt] (3) /opt/h2oai/dai/python/lib/python3.8/site-packages/xgboost/lib/libxgboost.so(+0x35303d) [0x7f3c6fe8d03d]
  [bt] (4) /opt/h2oai/dai/python/lib/python3.8/site-packages/xgboost/lib/libxgboost.so(+0x353943) [0x7f3c6fe8d943]
  [bt] (5) /opt/h2oai/dai/python/lib/python3.8/site-packages/xgboost/lib/libxgboost.so(+0x4a6ac2) [0x7f3c6ffe0ac2]
  [bt] (6) /opt/h2oai/dai/python/lib/python3.8/site-packages/xgboost/lib/libxgboost.so(+0x195bd9) [0x7f3c6fccfbd9]
  [bt] (7) /opt/h2oai/dai/python/lib/python3.8/site-packages/xgboost/lib/libxgboost.so(+0x1ce5a4) [0x7f3c6fd085a4]
  [bt] (8) /opt/h2oai/dai/python/lib/python3.8/site-packages/xgboost/lib/libxgboost.so(XGBoosterUpdateOneIter+0x68) [0x7f3c6fbf42b8]

based upon close to master hash.
Odd thing here is system is quite free and the test is a very small data test.  The requested memory is only 48k, but we have 11GB free.
Is it possible this is an erroneous error message?  Can we get a better error message?

based upon close to master hash.

Would be great it can be more precise.

Is it possible this is an erroneous error message?

Seems like it.  It can be caused by a previous error, cuda is always running asynchronously.

Can we get a better error message?

Yes, by using compute-sanitizer or cuda-memcheck.
I suspect that you have empty data set in inputs, could you please try something after https://github.com/dmlc/xgboost/commit/e6088366dfb4fb163f0cf6e946a2d087934743dd ?  I worked out some fixes for invalid device ordinal caused by empty datasets.  We used to handle them only in dask interface (distributed use case), but after that PR I have also put some guards against empty data.

Thanks.  We are on 29f8fd6fee96b5b28bc1ccd6fdfc5d472b949f0b
cuda-memcheck isn't feasible since it is hit so rarely among all our testing of thousands of tests (unit and integration).

Out of curiosity, are you testing categorical data support too? (which would be great)

Feel free to close this one if you can pass your tests.

cuda-memcheck isn't feasible since it is hit so rarely among all our testing of thousands of tests

It's worth spending some time to make the tests deterministic.

Feel free to close this one if you can pass your tests.

cuda-memcheck isn't feasible since it is hit so rarely among all our testing of thousands of tests

It's worth spending some time to make the tests deterministic.

They are, it's xgboost's behavior in this case that is not reproducing.

some out-of-bounds memory accesses.

I haven't seen this on XGBoost GPU for a long time now...  if you have an example of out-of-bound access please open a new issue.  I will try to fix it as soon as possible.

it's xgboost's behavior in this case that is not reproducing

If you have an example that XGBoost is flaky given deterministic input, please share.  The empty dataset issues I mentioned are quite deterministic, given an empty dataset in cupy/cudf, the cuda pointer is invalid so XGBoost cannot obtain the correct device ordinal, so a CUDA error is guaranteed to happen.

If that's the case upgrading xgboost won't help.  Just as a side note, if XGBoost is being flaky given deterministic input, then there's a bug.  So please share any such behaviors.

If that's the case upgrading xgboost won't help. Just as a side note, if XGBoost is being flaky given deterministic input, then there's a bug. So please share any such behaviors.

Yes will do.  As usual, because of the odd behavior, I was seeking advice on what could be happening in order to make a repro.
That is, under what (if any) external conditions would you expect xgboost to say it needed 40k of memory and fail but had 11GB free?  Can that fact be used somehow to isolate the problem better?

You agree the error is absurd right?

Yeah, totally.

That is, under what (if any) external conditions would you expect xgboost to say it needed 40k of memory and fail but had 11GB free?

As mentioned, CUDA is running asynchronously, so an error in a CUDA API call (including launching kernel) might not be immediately returned, and might be observed in a later call to a possibly different CUDA API function.  In this case, there's an error before allocating the memory, but the error is delayed due to async API, so it's only reported during memory allocation, leading to this obscure failure that has nothing to do with memory allocation.
The reason I mention cuda-memcheck and sanitizer is, there's an option called --force-blocking-launches, which can avoid all the async function calls and get the error immediately.

Maybe related.  This time GPU is mostly free, and doing GPU scoring.  During loading of the model from disk, it goes to cupy for some frame.  And then can't even allocate 512 bytes.
2021-07-29 13:02:35,586 C: 21% D:1.9TB   M:56.2GB  NODE:REMOTE2     31050  DATA   |   File "cupy/_core/core.pyx", line 2120, in cupy._core.core.array
2021-07-29 13:02:35,587 C: 21% D:1.9TB   M:56.2GB  NODE:REMOTE2     31050  DATA   |   File "cupy/_core/core.pyx", line 2199, in cupy._core.core.array
2021-07-29 13:02:35,587 C: 21% D:1.9TB   M:56.2GB  NODE:REMOTE2     31050  DATA   |   File "cupy/_core/core.pyx", line 2273, in cupy._core.core._send_object_to_gpu
2021-07-29 13:02:35,587 C: 21% D:1.9TB   M:56.2GB  NODE:REMOTE2     31050  DATA   |   File "cupy/_core/core.pyx", line 164, in cupy._core.core.ndarray.__init__
2021-07-29 13:02:35,587 C: 21% D:1.9TB   M:56.2GB  NODE:REMOTE2     31050  DATA   |   File "cupy/cuda/memory.pyx", line 735, in cupy.cuda.memory.alloc
2021-07-29 13:02:35,587 C: 21% D:1.9TB   M:56.2GB  NODE:REMOTE2     31050  DATA   |   File "cupy/cuda/memory.pyx", line 1412, in cupy.cuda.memory.MemoryPool.malloc
2021-07-29 13:02:35,588 C: 21% D:1.9TB   M:56.2GB  NODE:REMOTE2     31050  DATA   |   File "cupy/cuda/memory.pyx", line 1433, in cupy.cuda.memory.MemoryPool.malloc
2021-07-29 13:02:35,588 C: 21% D:1.9TB   M:56.2GB  NODE:REMOTE2     31050  DATA   |   File "cupy/cuda/memory.pyx", line 1113, in cupy.cuda.memory.SingleDeviceMemoryPool.malloc
2021-07-29 13:02:35,588 C: 21% D:1.9TB   M:56.2GB  NODE:REMOTE2     31050  DATA   |   File "cupy/cuda/memory.pyx", line 1134, in cupy.cuda.memory.SingleDeviceMemoryPool._malloc
2021-07-29 13:02:35,588 C: 21% D:1.9TB   M:56.2GB  NODE:REMOTE2     31050  DATA   |   File "cupy/cuda/memory.pyx", line 1372, in cupy.cuda.memory.SingleDeviceMemoryPool._try_malloc
2021-07-29 13:02:35,588 C: 21% D:1.9TB   M:56.2GB  NODE:REMOTE2     31050  DATA   | cupy.cuda.memory.OutOfMemoryError: Out of memory allocating 512 bytes (allocated so far: 0 bytes).

Dumped during error less than second later:

2021-07-29 13:02:36,182 C: 24% D:1.9TB   M:57.0GB  NODE:REMOTE2     31050  DATA   | Thu Jul 29 13:02:36 2021
2021-07-29 13:02:36,183 C: 24% D:1.9TB   M:57.0GB  NODE:REMOTE2     31050  DATA   | +-----------------------------------------------------------------------------+
2021-07-29 13:02:36,183 C: 24% D:1.9TB   M:57.0GB  NODE:REMOTE2     31050  DATA   | | NVIDIA-SMI 460.32.03    Driver Version: 460.32.03    CUDA Version: 11.2     |
2021-07-29 13:02:36,184 C: 24% D:1.9TB   M:57.0GB  NODE:REMOTE2     31050  DATA   | |-------------------------------+----------------------+----------------------+
2021-07-29 13:02:36,184 C: 24% D:1.9TB   M:57.0GB  NODE:REMOTE2     31050  DATA   | | GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
2021-07-29 13:02:36,184 C: 24% D:1.9TB   M:57.0GB  NODE:REMOTE2     31050  DATA   | | Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
2021-07-29 13:02:36,184 C: 24% D:1.9TB   M:57.0GB  NODE:REMOTE2     31050  DATA   | |                               |                      |               MIG M. |
2021-07-29 13:02:36,184 C: 24% D:1.9TB   M:57.0GB  NODE:REMOTE2     31050  DATA   | |===============================+======================+======================|
2021-07-29 13:02:36,185 C: 24% D:1.9TB   M:57.0GB  NODE:REMOTE2     31050  DATA   | |   0  GeForce GTX 108...  On   | 00000000:01:00.0 Off |                  N/A |
2021-07-29 13:02:36,185 C: 24% D:1.9TB   M:57.0GB  NODE:REMOTE2     31050  DATA   | | 40%   67C    P2    74W / 250W |   3981MiB / 11177MiB |     58%      Default |
2021-07-29 13:02:36,185 C: 24% D:1.9TB   M:57.0GB  NODE:REMOTE2     31050  DATA   | |                               |                      |                  N/A |
2021-07-29 13:02:36,185 C: 24% D:1.9TB   M:57.0GB  NODE:REMOTE2     31050  DATA   | +-------------------------------+----------------------+----------------------+
2021-07-29 13:02:36,185 C: 24% D:1.9TB   M:57.0GB  NODE:REMOTE2     31050  DATA   | |   1  GeForce GTX 108...  On   | 00000000:02:00.0 Off |                  N/A |
2021-07-29 13:02:36,186 C: 24% D:1.9TB   M:57.0GB  NODE:REMOTE2     31050  DATA   | | 18%   54C    P2    74W / 250W |    306MiB / 11178MiB |     10%      Default |
2021-07-29 13:02:36,186 C: 24% D:1.9TB   M:57.0GB  NODE:REMOTE2     31050  DATA   | |                               |                      |                  N/A |
2021-07-29 13:02:36,186 C: 24% D:1.9TB   M:57.0GB  NODE:REMOTE2     31050  DATA   | +-------------------------------+----------------------+----------------------+
2021-07-29 13:02:36,186 C: 24% D:1.9TB   M:57.0GB  NODE:REMOTE2     31050  DATA   |
2021-07-29 13:02:36,186 C: 24% D:1.9TB   M:57.0GB  NODE:REMOTE2     31050  DATA   | +-----------------------------------------------------------------------------+
2021-07-29 13:02:36,186 C: 24% D:1.9TB   M:57.0GB  NODE:REMOTE2     31050  DATA   | | Processes:                                                                  |
2021-07-29 13:02:36,187 C: 24% D:1.9TB   M:57.0GB  NODE:REMOTE2     31050  DATA   | |  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
2021-07-29 13:02:36,187 C: 24% D:1.9TB   M:57.0GB  NODE:REMOTE2     31050  DATA   | |        ID   ID                                                   Usage      |
2021-07-29 13:02:36,187 C: 24% D:1.9TB   M:57.0GB  NODE:REMOTE2     31050  DATA   | |=============================================================================|
2021-07-29 13:02:36,187 C: 24% D:1.9TB   M:57.0GB  NODE:REMOTE2     31050  DATA   | |    0   N/A  N/A      2551      G   /usr/lib/xorg/Xorg                105MiB |
2021-07-29 13:02:36,187 C: 24% D:1.9TB   M:57.0GB  NODE:REMOTE2     31050  DATA   | |    0   N/A  N/A      2707      G   /usr/bin/gnome-shell               50MiB |
2021-07-29 13:02:36,188 C: 24% D:1.9TB   M:57.0GB  NODE:REMOTE2     31050  DATA   | |    0   N/A  N/A     13295      C   ...i:beginfit_model_textbert     3685MiB |
2021-07-29 13:02:36,188 C: 24% D:1.9TB   M:57.0GB  NODE:REMOTE2     31050  DATA   | |    0   N/A  N/A     32000      C   ...cp://<IP_ADDRESS>:38889]      135MiB |
2021-07-29 13:02:36,188 C: 24% D:1.9TB   M:57.0GB  NODE:REMOTE2     31050  DATA   | |    1   N/A  N/A     14182      C   ...text_char_cnn_transformer      169MiB |
2021-07-29 13:02:36,188 C: 24% D:1.9TB   M:57.0GB  NODE:REMOTE2     31050  DATA   | |    1   N/A  N/A     32003      C   ...cp://<IP_ADDRESS>:40191]      135MiB |
2021-07-29 13:02:36,188 C: 24% D:1.9TB   M:57.0GB  NODE:REMOTE2     31050  DATA   | +-----------------------------------------------------------------------------+
2021-07-29 13:02:36,189 C: 24% D:1.9TB   M:57.0GB  NODE:REMOTE2     31050  DATA   |

Again, I'm pretty sure the error happened before the memory allocation.  You need to run compute-sanitizer to narrow down where did the error happen.

Closing due to stalled.  Feel free to reopen if the issue persists with the latest packages.

I am having that problem over again!

Please open a new issue and share some more details about the dataset and the hardware.


why two evaluation results are different?

I want to use boost yap to do some small example, the codes are below, why  I put the expression into an operator or member function in a structure, the two evaluation results are different? I am looking forward to your reply, many thanks!
new4.cpp.txt

seems no one would answer my question.

It seems like I experience a similar issue when using stateful  terminals created from rvalue references. I'll have look if I can figure out what is going on...

many thanks
greole<EMAIL_ADDRESS>于2020年2月17日周一 上午1:19写道：

It seems like I experience a similar issue when using stateful terminals
created from rvalue references. I'll have look if I can figure out what is
going on...
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/boostorg/yap/issues/101?email_source=notifications&email_token=AABCZJLIS5YJYPMJEWBPOO3RDFYRBA5CNFSM4KPR2LNKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEL4MYTI#issuecomment-586730573,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AABCZJOHJL22ARBCIMEGNFTRDFYRBANCNFSM4KPR2LNA
.

struct eval
{
	auto operator() (double a, double b) {
		auto lhs_w = boost::yap::make_terminal<tarray_expr>(std::move(a));
		auto rhs_w = boost::yap::make_terminal<tarray_expr>(std::move(b));

		return lhs_w + rhs_w;
	}
};

This returns a dangling reference to both lhs_w and rhs_w.  The documentation explains why.  If you std::move them both, as in return std::move(lhs_w) + std::move(rhs_w);, your code will work as intended.


gym cannot make a new environment

I noticed that the environment structure has been reorganized and I don't quite understand how to register an environment.
It seems gym cannot identify the environment and make it... Any suggestion here??
Python 3.8
Mac Catalina 10.15.7
import numpy as np
import torch
import torch.nn as nn
import neurogym as ngym

# ========= define some parameters ===================
lr = 1e-4
batch_size = 16
seq_len = 36
hidden_size = 256
output_size = 4

# ========= initilize the neurogym object ============
task = 'PerceptualDecisionMaking'
kwargs = {}
# Make supervised dataset
dataset = ngym.Dataset(task, env_kwargs=kwargs, batch_size=batch_size,
                       seq_len=seq_len, cache_len=0)
env = dataset.env

---------------------------------------------------------------------------
Error                                     Traceback (most recent call last)
<ipython-input-3-f5cb2f342ff0> in <module>
     21 kwargs = {}
     22 # Make supervised dataset
---> 23 dataset = ngym.Dataset(task, env_kwargs=kwargs, batch_size=batch_size,
     24                        seq_len=seq_len, cache_len=0)
     25 env = dataset.env

~/Documents/Code_git/neurogym/neurogym/utils/data.py in __init__(self, env, env_kwargs, batch_size, seq_len, max_batch, batch_first, cache_len)
     33             if env_kwargs is None:
     34                 env_kwargs = {}
---> 35             self.envs = [gym.make(env, **env_kwargs)
     36                          for _ in range(batch_size)]
     37         for env in self.envs:

~/Documents/Code_git/neurogym/neurogym/utils/data.py in <listcomp>(.0)
     33             if env_kwargs is None:
     34                 env_kwargs = {}
---> 35             self.envs = [gym.make(env, **env_kwargs)
     36                          for _ in range(batch_size)]
     37         for env in self.envs:

~/opt/miniconda3/lib/python3.8/site-packages/gym/envs/registration.py in make(id, **kwargs)
    143
    144 def make(id, **kwargs):
--> 145     return registry.make(id, **kwargs)
    146
    147 def spec(id):

~/opt/miniconda3/lib/python3.8/site-packages/gym/envs/registration.py in make(self, path, **kwargs)
     87         else:
     88             logger.info('Making new env: %s', path)
---> 89         spec = self.spec(path)
     90         env = spec.make(**kwargs)
     91         # We used to have people override _reset/_step rather than

~/opt/miniconda3/lib/python3.8/site-packages/gym/envs/registration.py in spec(self, path)
    116         match = env_id_re.search(id)
    117         if not match:
--> 118             raise error.Error('Attempted to look up malformed environment ID: {}. (Currently all IDs must be of the form {}.)'.format(id.encode('utf-8'), env_id_re.pattern))
    119
    120         try:

Error: Attempted to look up malformed environment ID: b'PerceptualDecisionMaking'. (Currently all IDs must be of the form ^(?:[\w:-]+\/)?([\w:.-]+)-v(\d+)$.)

gym convention is that tasks are named ABC-vX, where X can be 0, 1, 2, ...
It should work if you write
task = 'PerceptualDecisionMaking-v0'


Merge latest master into Network 2018 05 01

This checklist is used to make sure that common issues in a pull request are addressed. This will expedite the process of getting your pull request merged and avoid extra work on your part to fix issues discovered during the review process.
PR information

[ ] The title of the PR is clear and informative.
[ ] There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For information on cleaning up the commits in your pull request, see this page.
[ ] Except for special cases involving multiple contributors, the PR is started from a fork of the main repository, not a branch.
[ ] If applicable, the PR references the bug/issue that it fixes.
[ ] Swagger files are correctly named (e.g. the api-version in the path should match the api-version in the spec).

Quality of Swagger

[ ] I have read the contribution guidelines.
[ ] My spec meets the review criteria:

[ ] The spec conforms to the Swagger 2.0 specification.
[ ] The spec follows the guidelines described in the Swagger checklist document.
[ ] Validation tools were run on swagger spec(s) and have all been fixed in this PR.

Automation for azure-libraries-for-java

@marstr ping

Howdy @dsgouda, sorry for the delay on this.
Taking a look at the Git history, I'm not really clear on why this PR is open. It seems like there are no changes in master that are relevant to the Networking RP.

I'm going to close this PR, we can chat offline further if you'd like, or if someone on the Networking team is concerned.


Create a basic architectural overview

The Kaban board is complete and can be visited here: https://github.com/osoc22/project-track-trace/projects/1. The basis issues are added to the board, but feel free to make more, edit them or split them as you see fit. Just make sure to add a priority label to it!

The architectural overview details which parts the applications exists and which technology it uses. It also makes suggestions as how we should let these applications communicate with each other and how we can host the Docker images of these applications.


The blender rendered image seems upside down

Dear authors,
Thank you for the great work!
The rendered image from the blender seems upside down:

Do you know how to solve this?
Thank you!
Best,
Rui

36_out.mp4

Hi, @ruizhaogit
This issue arises from improper axis processing during the rendering of rigged cylinders, while the SMPL meshes remain unaffected. We have released an updated version of the rendering code on GitHub, which you can pull and try out.


Resolve SourceSerializer Sticking in Loop

Problem
Resolving potential issue that arises when filenames could collide. The logic intended to resolve this can potentially get stuck in a loop.
Solution
Add line to allow while-loop to break at appropriate time.
Validation

Ran against code that previously got loop. No longer gets stuck in loop.

This looks like a good potential use case for a unit test, if it is feasible to add one.


Remove sharing dataset name across system tests.

Avoids eventual consistency clashes.
Closes #2318.

Should these datasets be deleted at some point? Maybe I'm missing where that happens.

@daspecster Perils of reviewing just the diff:  they get added to self.to_delete in the lines just below where the diff ends, e.g. https://github.com/tseaver/google-cloud-python/blob/986ad36e9a7e8584dc4677a163f67ab456c5d6bc/system_tests/bigquery.py#L78.


[Feature] Image / File Uploads

Is your feature request related to a problem? Please describe.
To use the editor in a wiki related context, it would be useful for users to upload their images directly and not having to upload them somewhere else and then paste the link. This could happen via drag and drop as well as separate browse for file button next to the url entry.
Describe the solution you'd like
Most markdown editors solve this by adding an image upload handler, that returns an url to the uploaded File and then automatically ads an image or Link (for files) into the markdown code.
Describe alternatives you've considered
Adding an upload button outside of the markdown editor and then somehow add an image with code

That's an app-level feature, I think you need a prosemirror plugin to support it. It needs to handle the clipboard events, it's similar to @milkdown/plugin-clipboard.
This is a common feature. However I don't have enough time for now to implement it because I'm working on the diagram feature. It would be pretty cool if you can implement as a community plugin, or wait for me to have time to support it.

Thanks I'll look into it. I think ideally it should also be integrated with the /image command.

Hi @underdoeg , are you working on this?

Not yet. But will need it at?one poont

Not yet. But will need it at one point

I'm starting to work on this, you can wait for my progress.

This plugin has been done here:
https://github.com/Saul-Mirone/milkdown/blob/main/packages/plugin-upload/README.md
Will be released in next version.


move copy constructor for json_data

Summary:
As json_data is being used in CmdStan, it does this:
    stan::json::json_data d(stream);
    stream.close();
    std::shared_ptr<stan::io::var_context> result
      = std::make_shared<stan::json::json_data>(d);
    return result;

The class json_data is a subclass of var_context.  It does not define a copy constructor, so the default copy constructor will be invoked by that call to make_shared (which constructs an object and returns a shared pointer to it that encapsulates the memory management).  That means a deep copy of all the data.  That means all the data sits in memory twice while this block is executing.
To solve this problem, we need to define move semantics so that the returned object constructed in the shared pointer can steal the data from the local object.
I'm not sure how to test this as we want to make sure we reduce total dynamic memory overhead requirements.
Current Version:
v2.19.1

Transferring to cmdstan, this is where json_data code lives now.


youtube-dl: 2020.12.02 -> 2020.12.05

Motivation for this change
https://github.com/ytdl-org/youtube-dl/releases/tag/2020.12.05
Things done

[x] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
Built on platform(s)

[x] NixOS
[x] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[x] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Ensured that relevant documentation is up to date
[x] Fits CONTRIBUTING.md.

Thanks! Ported to stable as 99f8282a65821f148df596ba389606e732eaf99d.


bp.plan() gets stuck at SHOW TAGS IN ACCOUNT

[redacted:ACCOUNTADMIN] >
        SELECT
            CURRENT_ACCOUNT_NAME() as account,
            CURRENT_ACCOUNT() as account_locator,
            CURRENT_USER() as user,
            CURRENT_ROLE() as role,
            CURRENT_AVAILABLE_ROLES() as available_roles,
            CURRENT_SECONDARY_ROLES() as secondary_roles,
            CURRENT_DATABASE() as database,
            CURRENT_SCHEMAS() as schemas,
            CURRENT_WAREHOUSE() as warehouse,
            CURRENT_VERSION() as version
            (1 rows, 0.17s)
[redacted:ACCOUNTADMIN] > SHOW TAGS IN ACCOUNT    (2 rows, 14.75s)

I haven't tried the package in a while now. It seems like at least in version 0.8.9 I can't make the plan. It just gets stuck after showing the tags...

Update. It's not actually stuck-stuck but the performance is terrible. It's just extremely, extremely slow, compared to a month ago or so. It takes ages to complete the plan.

I'll try to repro.

I'll try to repro.

See comment. It actually does not get completely stuck but freezes at that step for a long time. There is perhaps some other task running in the background but it's not logged.

I'll try to repro.

Hi teej, I was mistaken, it's just the next statement it is running that is very slow. It shows grants on a role which returns 37k rows, takes 243s, sounds about right.

Fixed in v0.10


Add documentation on how to download measurement data

Description
Hello sorry for asking something so basic but I can't seem to obtain any measurement data using the Python wrapper. I have successfully downloaded a list of all the OpenAQ locations, but the client.Measurements class appears to not have any 'get' method only list. Could you add some guidance on how to download measurements to the documentation please? For example, when I know the location_id, how do I download all the historical data for that location? Many thanks

Measurements are only available with the list method because there is rarely a case when a single measurement is need. You can see a bit more in the reference docs about how to use the measurements list, which requires a location_id argument. Then use a date_from and date_to and parameters_id to filter to period and parameter of interest:
https://python.openaq.org/reference/openaq/#openaq._sync.models.measurements.Measurements.list
I will mention this call will change greatly in the future in favor of a "sensor-first" approach. We will still likely provide the location based approach but it will likely get another function name. All that is to say, we will likely document better when the function changes are done. see more in https://github.com/openaq/openaq-python/issues/9

Thankyou! Sorry I'd misunderstood the difference between list and get


Roles mapping "add" delete pre defined backend_roles

Hi guys,
I have a role called "workaround_role", when a Company Access my kibana module for the first time a backend service check if its created, if its not it create like this:
curl -X PATCH -H 'Content-Type: application/json' 'OUR URL to create' -d '
[
{
"op": "add", "path": "/workaround_role", "value": { "backend_roles": ["COMPANY1-MODELER", "COMPANY1-ADMINISTRATOR", "COMPANY1-ANALYST"] }
}
]'
and it's create perfectly
wordaround_role -> mapping users : COMPANY1-MODELER", "COMPANY1-ADMINISTRATOR", "COMPANY1-ANALYST
The problem:
The problem occours when a second company acess the module, so the opendistro security should use the same script to add in the workaround_role the name of the company2 but keeping the company1
should be like this: ( we're using PATCH )
wordaround_role -> mapping users : COMPANY1-MODELER", "COMPANY1-ADMINISTRATOR", "COMPANY1-ANALYST, COMPANY2-MODELER", "COMPANY2-ADMINISTRATOR", "COMPANY2-ANALYST,
But the script do a "op": "replace" and not include the new backend roles, it exclude the pre defined ones and include only the new ones
stay like this:
wordaround_role -> mapping users :  COMPANY2-MODELER", "COMPANY2-ADMINISTRATOR", "COMPANY2-ANALYST
Why the older backend_roles is not kepping? we are using "add" with PATCH, it should only include the new backend roles, it's like the role is deleted and created with the new ones.

Looks like you are creating users. Please see the documentation. Request with "op":"add" creates new users. Here is the documentation for creating/updating/deleting roles.
If you want to keep the existing backend roles of the user, you can do "op":"add"/"op":"replace"with existing backend roles + new backend roles.


EnhReq: Need ability to retrieve history of changes for Azure App Config keys

Related command

As of today - I could retrieve some configured entry and fields of names and last_modified in form like this:
az appconfig feature show -n <name> --key .appconfig.featureflag/<flag> --fields name last_modified
but I cannot find a way to retrieve history of changes, which I could see in Azure UI.
Is your feature request related to a problem? Please describe.

It's a problem of expected OOTB AZ CLI capabilities here.
Describe the solution you'd like

Not sure if --history option is used in some other AZ CLI commands. But potentially would like to be able to do like this:
az appconfig feature show -n <name> --key .appconfig.featureflag/<flag> --fields name last_modified state --history
Describe alternatives you've considered

The only known alternative so far is Azure Portal UI, which is inconvenient for better automation.
Additional context

N/A

Thank you for opening this issue, we will look into it.

Hi @andrejusc, would az appconfig revision command work for you?
https://learn.microsoft.com/en-us/cli/azure/appconfig/revision?view=azure-cli-latest

@avanigupta - it works only partially as in my original command az appconfig feature show - I could specify state in fields, but for az appconfig revision command - I could only specify value like such:
az appconfig revision list -n <name>  --key <key> --fields key value last_modified
and then it would require additional parsing of value output line to decipher if it's enabled/disabled:
"value": "{\"id\":\"MyFlagKey\",\"description\":\"MyFlagKey to test\",\"enabled\":false,\"conditions\":{\"client_filters\":[]}}"
and I'd like to be able to retrieve state in revisions history as separate entity without a need for post-parsing and also be able to retrieve/filter out in initial call only entries when it's false or true. Could that be achieved?

We currently don't support revision history specifically for feature flags. However, you could still filter on the state by parsing the value field using the --query argument that's available for all Azure CLI commands.

@avanigupta - but how to do that? I'm reading that JMESPath, which is used for --query logic doesn't support inner JSON parsing. So how to retrieve then via --query value of enabled from my above example?
I could potentially achieve that via Linux jq tool (it has fromjson method for parsing capability for inner JSON), but I'd like to avoid using that here.
As retrieval here is not straightforward - I still see then value of this enhancement request to be implemented/considered.

@avanigupta - could this request be prioritized by some means?

Hi @andrejusc,
Thank you for reaching out. We currently only support the listing revision of key-values since the provided supported fields are those that are common to regular configuration feature flags. The idea to add a --history flag to the appconfig feature show, while helpful, introduces an inconsistency in the return type from a show command. In one case we return a single object, but with a flag, we might return a list of objects.
A workaround that I might suggest would be akin to what you mentioned earlier by parsing the value of the feature flag.
Using jq, you can get the state of a feature flag by piping it to a function like this.
function getFeatureFlagState()
{
    jq '.value | fromjson | .enabled' ${1};
}

Also, you could use this command to get all feature flags with their last modified date and state:
az appconfig revision list -n <store-name> --key <feature-flag-key> | jq ".[] | {modified_date: .lastModified, enabled: .value | fromjson | .enabled}

I hope this helps.

Hi @albertofori - having already quite powerful --query approach for various AZ CLI commands - I'd like to avoid using 3rd party tools like jq at all cost (even if I'm using such myself in some of Ubuntu distros). Reduce of dependencies will make overall experience much better and also more cross platform friendly.
Not sure why it's a problem of consistency here - I assume single object or array of objects are 2 main JSON variations in responses anyway. And it's down to consumer then based on provided documentation to process that response one way or another. But main point here - is to avoid extra parsing need altogether as it's not the expectation with already flexible AZ CLI commands/options/filters/etc.

Not sure why it's a problem of consistency here - I assume single object or array of objects are 2 main JSON variations in responses anyway

In Azure CLI, show commands are standardized to show the properties of a single resource. To list multiple instances of a resource, we have to use list commands. That's the reason we don't want to introduce a something like a --show-history flag for show commands.
However, your point is valid that we should provide an easier way to get the history of feature flags without parsing json values using 3rd party tools. We are considering the best way to design this feature to meet your needs and Azure CLI standards.


Logo Ideas

I think a good guideline for a logo is something that we can easily turn into slack/discord/skype/twitch emoji. We also want to stick to the neckwear theme.
Background:
This library generates a haskell implementation from an openapi spec.
References:
Open API Spec Logo

https://avatars3.githubusercontent.com/u/16343502?v=3&s=200

Once we get consensus on the ideas here we'll polish it.

We can get design to help out here!

That would be awesome!

Closing for now.


feat: use Uint32Array for shuffling/committees

Motivation
Looking at heap snapshots of a running lodestar node, the memory usage of shufflings stood out as larger than necessary.
Description
Replace number[] with Uint32Array for activeIndices, shuffling, and committees in the EpochShuffling.
This has two benefits: tighter packing of the data (TypedArray vs Object) AND data sharing between shuffling and committees.
The tradeoff is that only indices < 2 ^ 32 (4.2 billion) can be represented here, rather than indices < 2 ^ 53. In practice this is plenty and not an issue.

looks good to me, dropped a minor comment @wemeetagain

:tada: This PR is included in v1.17.0 :tada:


Port Gauge as s-c-s sink

As a developer, I'd like to port gauge module from XD to s-c-s repo, so I can use it as sink module to build streaming pipeline.
Acceptance:

gauge as sink module is available in spring-cloud-stream-modules repo
maven repo includes gauge module with respective group/artifact/version

This issue was moved to spring-cloud/spring-cloud-stream-app-starters#58


Update portfolio and UGDG of quiz feature

Does this fix any open issues+

Does this fix any open issues?

Nope it only updates for the documentations.


Didn't find op for builtin opcode 'LOGISTIC' version '1'

@tensorflow/micro
System information

Host OS Platform and Distribution: Mac OS 10.16
TensorFlow installed from  source at  2020-06-22  ( git clone.. )
Target platform :  Arm Mbed OS

Describe the problem
Run-time error on FRDM-K66F board:
Didn't find op for builtin opcode 'LOGISTIC' version '1'
Failed to get registration from op code LOGISTIC

I looked at the TFLite source code, at it uses LOGISTIC version=0 :
https://github.com/tensorflow/tensorflow/blob/master/tensorflow/lite/micro/kernels/logistic.cc#L124
Please provide the exact sequence of commands/steps when you ran into the problem
Compiled code as described here:
https://github.com/tensorflow/tensorflow/tree/master/tensorflow/lite/micro/examples/micro_speech#deploy-to-nxp-frdm-k66f
Instead original model.cc I use my own model.cc which uses LOGISTIC op code.
Compiled, deployed to board and got the run-time error on FRDM-K66F board:
Didn't find op for builtin opcode 'LOGISTIC' version '1'
Failed to get registration from op code LOGISTIC

Hi Michael,
version 0 is the default value passed in and it will be overwritten when the builtin operator is added.
The error message seem to suggest that you didn't register this operator in the resolver.
Could you share which OpResovler are you using?
Also add @advaitjain who has been working on the versioning etc.
Thanks,

Adding operation to resolver solves the issue.
I expected what TFLite may figure out from the model file all  ops and register it automatically

@mlubinsky-arm Could you please let us know if the issue still persists and feel free to close the issue if it is resolved for you ? Thanks!


Batch Norm layer computes moving variances wrongly when fused=True

System information

Have I written custom code (as opposed to using a stock example script provided in TensorFlow): Yes
OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Linux Ubuntu 20.04
Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device: N/A
TensorFlow installed from (source or binary): binary
TensorFlow version (use command below): 2.8.0 (gpu)
Python version: 3.10.2
Bazel version (if compiling from source): N/A
GCC/Compiler version (if compiling from source): N/A
CUDA/cuDNN version: 11.5/8.3.1
GPU model and memory: 1080 Ti 12GB

Describe the current behavior
tf.keras.layers.BatchNormalization computes moving variances wrongly when fused=True. It computes it with
         next_variance=old_variance*momentum+batch_variance*(1-momentum)*2

This issue happens on both cpu and gpu.
Describe the expected behavior
I would expect it to conform to the equation
         next_variance=old_variance*momentum+batch_variance*(1-momentum)

Or at the very least give the same result when fused=False. If the implementation was intended to be this way it should at least be mentioned in the documentation.

Do you want to contribute a PR? (yes/no): no

Solution
I was able to track the issue to here: https://github.com/tensorflow/tensorflow/blob/aa85f517d6eb1123e55215c68c75580d1a511eae/tensorflow/python/ops/nn_impl.py#L1691
After which it delves into the backend C/C++ implementation which I couldn't find any guide anywhere to navigate. I would appreciate if you know of any tutorials on that.
Standalone code to reproduce the issue
import tensorflow as tf
from math import sqrt

with tf.device("/cpu:0"):
    # with tf.device("/gpu:0"):
    var = 5.0
    std = sqrt(var)
    inp = tf.reshape(tf.constant([-std, std]), (1, 2, 1, 1))
    true_mean = tf.reduce_mean(inp, axis=(0, 1, 2)).numpy()
    print("True mean: " + str(true_mean))
    true_var = tf.math.reduce_variance(inp, axis=(0, 1, 2)).numpy()
    print("True variance: " + str(true_var))

    for momentum in [0.0, 0.25, 0.75, 0.9]:
        for fused in [True, False]:
            layer = tf.keras.layers.BatchNormalization(
                scale=True, center=True, trainable=True, momentum=momentum, fused=fused
            )
            initial_mean = 0.0
            initial_var = 1.0
            out = layer(inp, training=True)
            print("\n===========================")
            print("Momentum: " + str(momentum) + " Fused: " + str(fused))
            print("Moving mean: " + str(layer.moving_mean.numpy()))
            print(
                "Moving mean always correctly computed: "
                + str(initial_mean * momentum + true_mean * (1 - momentum))
            )
            print("Moving var: " + str(layer.moving_variance.numpy()))
            print(
                "Moving var should have been: "
                + str(initial_var * momentum + true_var * (1 - momentum))
            )

            if fused:
                print(
                    "When fused==True moving var wrongly computed as: "
                    + str(initial_var * momentum + 2 * true_var * (1 - momentum))
                )
            else:
                print(
                    "When fused==False moving var correctly computed as: "
                    + str(initial_var * momentum + true_var * (1 - momentum))
                )
            print("===========================\n")

See this gist: https://gist.github.com/canbakiskan/f0722931cdc73061515524fdf8437501

@sachinprasadhs ,
I was able to reproduce the issue in tf v2.8, v2.7 and nightly.Please find the gist here.

You can find some details when fused is set to True. Let us know if this helps you.
https://github.com/keras-team/keras/blob/d8fcb9d4d4dad45080ecfdd575483653028f8eda/keras/layers/normalization/batch_normalization.py#L197-L205

Not really, the problem isn't when fused is used but rather what happens when it is used is wrong. Let me also point out that fused=True is the default behavior.

Ok I found the culprit. It's not that the batch's variance is multiplied by 2 but rather to Bessel's coefficient correction which is n/(n-1) where n is the number of elements in a channel of the tensor here.
It's still inconsistent behavior with respect to fused=False case though. I'm changing the title and first post accordingly.

Development of keras moved to separate repository https://github.com/keras-team/keras/issues
Please post this issue on keras-team/keras repo.
To know more see;
https://discuss.tensorflow.org/t/keras-project-moved-to-new-repository-in-https-github-com-keras-team-keras/1999
Thank you!


[BEAM-11415] Add Dataflow Runner to new Go ValidatesRunner framework.

Straightforward, this adds Dataflow support to the script, as well as a corresponding Gradle command for Dataflow.

Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

[x] Choose reviewer(s) and mention them in a comment (R: @username).
[x] Format the pull request title like [BEAM-XXX] Fixes bug in ApproximateQuantiles, where you replace BEAM-XXX with the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue.
[ ] Update CHANGES.md with noteworthy changes.
[x] If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.

GitHub Actions Tests Status (on master branch)

See CI.md for more information about GitHub Actions CI.

R: @lostluck

R: @lostluck


multiple-column cards  are invisible until resize container height (only the first is displayed at the beginning)

I have problems with horizontal cards. I tried both bootstrap column and your list-item.
This is my use case:

2 elements
bufferAmount is not set
window is sized with a small height, just a portion of the top of the card is visible;

In this situation, at the beginning, only the first card is displayed, then only if i make the window height bigger, so i increase the height of the page, the second card magically appear.
This problem is not present if i set a bufferAmount (but bufferAmount has poor performance in my case) or if the page is in full height.
I don't understand why only the first is rendered and how to fix this problem.
Thank you for any suggestion.
This is my case with some snapshot:
In the first picture, there is only the first card, then i increase the page height just a little moving the chrome inspector down and at a certain height the second card is displayed

I solve the issue.
The problem was with padding on my cards. For some reason it creates problem on height calculation.
Thank you in every case.

This problem is not solved. Sorry.
I'm making tests to understand better the issue.
If i set the scroll.window parentScroll, the problem occurs, if i set a container with fixed height, it works.
I'm using bootstrap in this moment and it's like virtual-scroller doesn't calculate the right scrollHeight because there where multi columns.
I tried some similar issues about bootstrap, template-rows etc.
I also tried the list-item for multiple-column demo but not works.
Thank you in advance.

@casper5822 I need a stackblitz before I can help :)

Oh, It looks like this is similar to the other issue you posted in & bufferAmount is a viable workaround.
How noticeable is the performance impact? Unless you're setting it to a very large value, the impact should be minimal. My suggestion would be to use bufferAmount & then follow all the performance guidelines in the readme.

The open multi column issue is this same issue so i will close it.
We made other tests and we find the same problem (math round).
We also tried the bufferAmount solution but it is not a valid workaround because with hundreds of cards very slow rendering occurs and our performance tests are not passed. In some case, with complex cards a user back to previous page takes up to 8 seconds.
So we have at this point only one solution redesign our cards in a vertical list waiting for a bug fix in the future.
Thank you for all @speige

Ok. I strongly suggest going over all the performance documentation at https://github.com/rintoj/ngx-virtual-scroller
Search for headings starting with "Performance - "
If you follow those guidelines, I think the performance issues will be improved. A small bufferAmount shouldn't cause such a negative performance impact. If you're following those guidelines & still have performance issues with bufferAmount, I'd be interested in investigating further.

Ok i will reopen the issue. Tomorrow i will follow the guidelines and stop the new  layout design.
Thank you for all.

Sorry another report about this problem that we notice in one test is the follow:
It seems like this problem occurs if the container viewport height has a height less than the card  (child) item. So in this case, the others card are considered out of the vertical viewport.
Maybe, the fact is that in a multi column situation the viewport witdh must be considered and not only the height.

@casper5822 In this situation is bufferAmount still a valid workaround (ignoring the performance impact)?

Yes the bufferAmount is a valid workaround because scroller bypass the viewport,  in fact it was the first fix we made, but we stack at performance tests.

We adopted the bufferAmount workaround at the end.
The performances were improved.
In our case the problem was a "star rank directive" for angular 2 inside the card:
It seems to be heavy to render so we implemented a custom ranking stars system.
Now with a bufferAmount = 3 we have about 0.8 - 1.5 seconds on a "go back page" call on a 2000 items . The delay is due to the scrollToIndex usage in order  to restore the same scrollPosition in the list.
It is acceptable for now.
Thank you @speige

I had a similar problem - be sure that your item-block is NOT wrapped to any other blocks (e.g. div), example:
Incorrect
 <virtual-scroller #scroll
                      [items]="items"
                      [parentScroll]="scroll.window"
                      (vsChange)="loadMore($event)"
                      [scrollThrottlingTime]="150">

                        ...

    </virtual-scroller>

Correct
 <virtual-scroller #scroll
                      [items]="items"
                      [parentScroll]="scroll.window"
                      (vsChange)="loadMore($event)"
                      [scrollThrottlingTime]="150">

                     ...

    </virtual-scroller>

Thank you. I have not any div between. The problem is how the scroller works. For now the solution for me is set bufferAmount e quale to the number of card in a row

@casper5822 I use 4 items per row without any flex and everything is fine (you have to set height of html and body as well (for me it's 100%)) and bufferAmount is not used in my case.
Also you may try to use the following workaround - set scrollerHeight manually. (in one of my case it helped for me using  [scrollbarHeight]="itemHeight", I know looks like a dirty trick but works.

@casper5822 also if your page is dynamically changed - try to invalidateAllCachedMeasurements

@casper5822  how to use that give me the example


Queriable -> Queryable

Closes #71

@sgrif I aliased the attribute but the Queriable trait was public so do we need to alias that as well?
Something like?
trait Queriable<ST: NativeSqlType>: Queryable<ST, Row=FromSqlRow<ST>> {
   fn build(row: Self::Row) -> Self;
}

Let's just kill the alias, this is a mechanical change for migrating

This needs a CHANGELOG entry.

Removed alias and added changelog.

Good to merge. Needs rebase.


Fix leader election with RBAC in tests

What this PR does / why we need it:
Which issue this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged): fixes #
Special notes for your reviewer:
Release note:

NONE

This PR also disables scoping Navigator to a single namespace as part of the standard helm chart deployment

log.gz

So after looking into this some more, the actual controller won't be able to create the initial Endpoint resource used for leader election as we have explicitly named the resource in the RBAC policy, which consequently then rejects POST requests to the API endpoint (as the endpoint does not include the resource name at this point). This is a limitation with RBAC at the moment.

Updated & tested working. Review as and when you've got time. Don't want to hold you up!

/lgtm

@wallrj - I'm well aware the e2e tests need improving. Currently we are blocked by needing to supply some e2e testing infrastructure via Prow, so that we can actually get VMs big enough to run Elasticsearch (it is a massive resource hog).
This will I'll be working on some e2e testing, so will get the actual test cases written up then so we can start to see how they perform 😄

/approve


Implement FuncCalled and FuncReturned visualization events

Also refactor VisualizerManager by reflection.

Implement it. Will not send events for internal functions.
In this case, __printval__ will be called twice. First one is to print the return value of print() function. Second one is to print the return value of foo() function.
Optimize the design to implement it.