Run Analysis Error in Collab

Hello David,
I tried running Sports2D using Collab but I encountered this error:

Hi Jeffrey, thank you for sharing this issue, it helps me improve the software!
From what I can see, it looks like no persons are detected in the whole video.
Can you insert a line of code (anywhere): Insert -> code block
then type video_full_path
and execute the cell? (little arrow on the left of the code block)
Could you also click on the
--------------------- <> 2 frames ------------------
line that's in the middle of the error so that I can see the whole message?

This? thanks
On Wed, Jun 7, 2023 at 8:51 AM David PAGNON @.***>
wrote:

Hi Jeffrey, thank you for sharing this issue, it helps me improve the
software!
From what I can see, it looks like no persons are detected in the whole
video.
Can you insert a line of code (anywhere): Insert -> code block
then type video_full_path
and execute the cell? (little arrow on the left of the code block)
Could you also click on the
--------------------- <> 2 frames ------------------
line that's in the middle of the error so that I can see the whole message?
—
Reply to this email directly, view it on GitHub
https://github.com/davidpagnon/Sports2D/issues/1#issuecomment-1580013945,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AYWOLMVK4NJP4TE4UGEZZ7DXKAQGZANCNFSM6AAAAAAY5MQLHU
.
You are receiving this because you authored the thread.Message ID:
@.***>

Sorry, I am not sure this answers my questions, it may be easier to answer on github rather than by email?

#!/usr/bin/env python
-- coding: utf-8 --
'''
##############################################################
## Compute angles from 2D pose detection                    ##
##############################################################
Detect joint centers from a video with OpenPose or BlazePose.
Save a 2D csv position file per person, and optionally json files, image files, and video files.

If OpenPose is used, multiple persons can be consistently detected across frames.
Interpolates sequences of missing data if they are less than N frames long.
Optionally filters results with Butterworth, gaussian, median, or loess filter.
Optionally displays figures.

If BlazePose is used, only one person can be detected.
No interpolation nor filtering options available. Not plotting available.

/!\ Warning /!\
- The pose detection is only as good as the pose estimation algorithm, i.e., it is not perfect.
- It will lead to reliable results only if the persons move in the 2D plane (sagittal plane).
- The persons need to be filmed as perpendicularly as possible from their side.
If you need research-grade markerless joint kinematics, consider using several cameras,
and constraining angles to a biomechanically accurate model. See Pose2Sim for example:
https://github.com/perfanalytics/pose2sim

INPUTS:
- a video
- a dictionary obtained from a configuration file (.toml extension)
- a skeleton model

OUTPUTS:
- one csv file of joint coordinates per detected person
- optionally json directory, image directory, video
- a logs.txt file

'''
INIT
import os
import logging
from pathlib import Path
from sys import platform
import json
import subprocess
import itertools as it
import numpy as np
import pandas as pd
import cv2
import matplotlib.pyplot as plt
import matplotlib as mpl
from Sports2D.Sports2D import base_params
from Sports2D.Utilities import Blazepose_runsave, filter, common
from Sports2D.Utilities.skeletons import *
AUTHORSHIP INFORMATION
author = "David Pagnon"
copyright = "Copyright 2023, Sports2D"
credits = ["David Pagnon"]
license = "BSD 3-Clause License"
version = "0.1"
maintainer = "David Pagnon"
email =<EMAIL_ADDRESS>status = "Development"
FUNCTIONS
def display_figures_fun(df_list):
'''
Displays filtered and unfiltered data for comparison
/!\ Crashes on the third window...
INPUTS:
- df_list: list of dataframes of 3N columns, only 3i and 3i+1 are displayed

OUTPUT:
- matplotlib window with tabbed figures for each keypoint
'''

mpl.use('qt5agg')
mpl.rc('figure', max_open_warning=0)

keypoints_names = df_list[0].columns.get_level_values(2)[1::3]

pw = common.plotWindow()
for id, keypoint in enumerate(keypoints_names):
    f = plt.figure()

    axX = plt.subplot(211)
    [plt.plot(df.iloc[:,0], df.iloc[:,id*3+1], label=['unfiltered' if i==0 else 'filtered' if i==1 else ''][0]) for i,df in enumerate(df_list)]
    plt.setp(axX.get_xticklabels(), visible=False)
    axX.set_ylabel(keypoint+' X')
    plt.legend()

    axY = plt.subplot(212)
    [plt.plot(df.iloc[:,0], df.iloc[:,id*3+2]) for df in df_list]
    axY.set_xlabel('Time (seconds)')
    axY.set_ylabel(keypoint+' Y')

    pw.addPlot(keypoint, f)

pw.show()

def run_openpose_windows(video_path, json_path, pose_model):
'''
Use a subprocess to run OpenPoseDemo.exe, and saves json coordinate files.
INPUTS:
- video_path: Path of the video to analyze
- json_path: Path of the directory where to save json files
- pose_model: string. "BODY_25B", "BODY_25", or others.

INPUTS:
- video_path: Path of the video to analyze
- json_path: Path of the directory where to save json files
- pose_model: string. "BODY_25B", "BODY_25", or others.

WARNING: not tested.
INPUTS:
- video_path: Path of the video to analyze
- json_path: Path of the directory where to save json files
- pose_model: string. "BODY_25B", "BODY_25", or others.

OUTPUTS:
- json files in json_path
'''

subprocess.run(["./build/examples/openpose/openpose.bin", "--video", video_path, \
"--model_pose", pose_model, \
"--write_json", json_path, \
"--render_pose", "0", "--display", "0"])

def euclidean_distance(q1, q2):
'''
Euclidean distance between 2 points (N-dim).
INPUTS:
- q1: list of N_dimensional coordinates of point
- q2: idem

OUTPUTS:
- euc_dist: float. Euclidian distance between q1 and q2
'''

q1 = np.array(q1)
q2 = np.array(q2)
dist = q2 - q1

euc_dist = np.sqrt(np.sum( [d**2 for d in dist]))

return euc_dist

def min_with_single_indices(L, T):
'''
Let L be a list (size s) with T associated tuple indices (size s).
Select the smallest values of L, considering that
the next smallest value cannot have the same numbers
in the associated tuple as any of the previous ones.
Example:
L = [  20,   27,  51,    33,   43,   23,   37,   24,   4,   68,   84,    3  ]
T = list(it.product(range(2),range(3)))
  = [(0,0),(0,1),(0,2),(0,3),(1,0),(1,1),(1,2),(1,3),(2,0),(2,1),(2,2),(2,3)]

- 1st smallest value: 3 with tuple (2,3), index 11
- 2nd smallest value when excluding indices [(0,0),(0,1),(0,2),X,(1,0),(1,1),(1,2),X,X,X,X,X]:
20 with tuple (0,0), index 0
- 3rd smallest value when excluding [X,X,X,X,X,(1,1),(1,2),X,X,X,X,X]:
23 with tuple (1,1), index 5

INPUTS:
- L: list (size s)
- T: T associated tuple indices (size s)

OUTPUTS:
- minL: list of smallest values of L, considering constraints on tuple indices
- argminL: list of indices of smallest values of L
- T_minL: list of tuples associated with smallest values of L
'''

minL = [np.min(L)]
argminL = [np.argmin(L)]
T_minL = [T[argminL[0]]]

mask_tokeep = np.array([True for t in T])
i=0
while mask_tokeep.any()==True:
    mask_tokeep = mask_tokeep & np.array([t[0]!=T_minL[i][0] and t[1]!=T_minL[i][1] for t in T])
    if mask_tokeep.any()==True:
        indicesL_tokeep = np.where(mask_tokeep)[0]
        minL += [np.min(np.array(L)[indicesL_tokeep])]
        argminL += [indicesL_tokeep[np.argmin(np.array(L)[indicesL_tokeep])]]
        T_minL += (T[argminL[i+1]],)
        i+=1

return minL, argminL, T_minL

def sort_people(keyptpre, keypt, nb_persons_to_detect):
'''
Associate persons across frames
Persons' indices are sometimes swapped when changing frame
A person is associated to another in the next frame when they are at a small distance
INPUTS:
- keyptpre: array of shape K, L, M with K the number of detected persons,
L the number of detected keypoints, M their 2D coordinates + confidence
for the previous frame
- keypt: idem keyptpre, for current frame

OUTPUT:
- keypt: array with reordered persons
'''

# Generate possible person correspondences across frames
personsIDs_comb = list(it.product(range(len(keyptpre)),range(len(keypt))))
# Compute distance between persons from one frame to another
frame_by_frame_dist = []
for comb in personsIDs_comb:
    frame_by_frame_dist += [np.mean([euclidean_distance(i,j) for (i,j) in zip(keyptpre[comb[0]][:,:2],keypt[comb[1]][:,:2])])]
# sort correspondences by distance
_, index_best_comb, _ = min_with_single_indices(frame_by_frame_dist, personsIDs_comb)
index_best_comb.sort()
personsIDs_sorted = np.array(personsIDs_comb)[index_best_comb][:,1]
# rearrange persons
keypt = np.array(keypt)[personsIDs_sorted]

return keypt

def json_to_csv(json_path, frame_rate, pose_model, interp_gap_smaller_than, filter_options, show_plots):
'''
Converts frame-by-frame json coordinate files
to one csv files per detected person
INPUTS:
- json_path: directory path of json files
- pose_model: string, to get tree from skeletons.py
- interp_gap_smaller_than: integer, maximum number of missing frames for conducting interpolation
- filter_options: list, options for filtering
- show_plots: boolean, show plots or not

OUTPUTS:
- Creation of one csv files per detected person
'''

# Retrieve keypoint names from model
model = eval(pose_model)
keypoints_ids = [node.id for _, _, node in RenderTree(model) if node.id!=None]
keypoints_names = [node.name for _, _, node in RenderTree(model) if node.id!=None]
keypoints_names_rearranged = [y for x,y in sorted(zip(keypoints_ids,keypoints_names))]
keypoints_nb = len(keypoints_ids)

# Retrieve coordinates
logging.info('Sorting people across frames.')
json_fnames = list(json_path.glob('*.json'))
nb_persons_to_detect = max([len(json.load(open(json_fname))['people']) for json_fname in json_fnames])
Coords = [np.array([]).reshape(0,keypoints_nb*3)] * nb_persons_to_detect
for json_fname in json_fnames:    # for each frame
    with open(json_fname) as json_f:
        json_file = json.load(json_f)
        keypt = []
        # Retrieve coords for this frame
        for ppl in range(len(json_file['people'])):  # for each detected person
            keypt += [np.asarray(json_file['people'][ppl]['pose_keypoints_2d']).reshape(-1,3)]
        keypt = np.array(keypt)
        # Make sure keypt is as large as the number of persons that need to be detected
        if len(keypt) < nb_persons_to_detect:
            empty_keypt_to_add = np.concatenate( [[ np.zeros([25,3]) ]] * (nb_persons_to_detect-len(keypt)) )
            keypt = [np.concatenate([keypt, empty_keypt_to_add]) if keypt!=[] else empty_keypt_to_add][0]
        if 'keyptpre' not in locals():
            keyptpre = keypt
        # Associate persons across frames
        keypt = sort_people(keyptpre, keypt, nb_persons_to_detect)
        # Concatenate to coordinates of previous frames
        for i in range(nb_persons_to_detect):
            Coords[i] = np.vstack([Coords[i], keypt[i].reshape(-1)])
        keyptpre = keypt
logging.info(f'{nb_persons_to_detect} persons found.')

# Inject coordinates in dataframes and save
for i in range(nb_persons_to_detect):
    # Prepare csv header
    scorer = ['DavidPagnon']*(keypoints_nb*3+1)
    individuals = [f'person{i}']*(keypoints_nb*3+1)
    bodyparts = [[p]*3 for p in keypoints_names_rearranged]
    bodyparts = ['Time']+[item for sublist in bodyparts for item in sublist]
    coords = ['seconds']+['x', 'y', 'likelihood']*keypoints_nb
    tuples = list(zip(scorer, individuals, bodyparts, coords))
    index_csv = pd.MultiIndex.from_tuples(tuples, names=['scorer', 'individuals', 'bodyparts', 'coords'])

    # Create dataframe
    df_list=[]
    time = np.expand_dims( np.arange(0,len(Coords[i])/frame_rate, 1/frame_rate), axis=0 )
    time_coords = np.concatenate(( time, Coords[i].T ))
    df_list += [pd.DataFrame(time_coords, index=index_csv).T]

    # Interpolate
    logging.info(f'Person {i}: Interpolating missing sequences if they are smaller than {interp_gap_smaller_than} frames.')
    df_list[0] = df_list[0].apply(common.interpolate_zeros_nans, axis=0, args = [interp_gap_smaller_than, 'linear'])

    # Filter
    if filter_options[0]:
        filter_type = filter_options[1]
        if filter_type == 'butterworth':
            args = f'Butterworth filter, {filter_options[2]}th order, {filter_options[3]} Hz.'
        if filter_type == 'gaussian':
            args = f'Gaussian filter, Sigma kernel {filter_options[5]}'
        if filter_type == 'loess':
            args = f'LOESS filter, window size of {filter_options[6]} frames.'
        if filter_type == 'median':
            args = f'Median filter, kernel of {filter_options[7]}.'
        logging.info(f'Person {i}: Filtering with {args}.')
        df_list[0].replace(0, np.nan, inplace=True)
        df_list += [df_list[0].copy()]
        df_list[1] = df_list[1].apply(filter.filter1d, axis=0, args=filter_options)
    df_list[-1].replace(np.nan, 0, inplace=True)

    # Save csv
    csv_path = json_path.parent / Path(json_path.name[:-5]+f'_person{i}_points.csv')
    logging.info(f'Person {i}: Saving csv position file in {csv_path}.')
    df_list[-1].to_csv(csv_path, sep=',', index=True, lineterminator='\n')

    # Display figures
    if show_plots:
        logging.info(f'Person {i}: Displaying figures.')
        display_figures_fun(df_list)

def draw_bounding_box(X, Y, img):
'''
Draw bounding boxes and person ID
around list of lists of X and Y coordinates
INPUTS:
- X: list of list of x coordinates
- Y: list of list of y coordinates
- img: opencv image

OUTPUT:
- img: image with rectangles and person IDs
'''

cmap = plt.cm.hsv

# Draw rectangles
[cv2.rectangle(img,
    (np.nanmin(x).astype(int)-25, np.nanmin(y).astype(int)-25),
    (np.nanmax(x).astype(int)+25, np.nanmax(y).astype(int)+25),
    (np.array(cmap((i+1)/len(X)))*255).tolist(),
    2)
    for i,(x,y) in enumerate(zip(X,Y)) if not np.isnan(x).all()]

# Write person ID
[cv2.putText(img, str(i),
    (np.nanmin(x).astype(int), np.nanmin(y).astype(int)),
    cv2.FONT_HERSHEY_SIMPLEX, 1,
    (np.array(cmap((i+1)/len(X)))*255).tolist(),
    2, cv2.LINE_AA)
    for i,(x,y) in enumerate(zip(X,Y)) if not np.isnan(x).all()]

return img

def draw_keypts_skel(X, Y, img, *pose_model):
'''
Draws keypoints and optionally skeleton for each person
INPUTS:
- X: list of list of x coordinates
- Y: list of list of y coordinates
- img: opencv image

OUTPUT:
- img: image with keypoints and skeleton
'''

model = eval(pose_model[0])
cmap = plt.cm.hsv

# Draw keypoints (same color for same keypoint)
for (x,y) in zip(X,Y):
    [cv2.circle(img, (int(x[i]), int(y[i])), 5,
        (255,255,255),
        -1)
        for i in range(len(x))
        if not (np.isnan(x[i]) or np.isnan(y[i]))]

# Draw skeleton
if pose_model != None:
    eval(pose_model[0])
    # Get (unique) pairs between which to draw a line
    node_pairs = []
    for data_i in PreOrderIter(model.root, filter_=lambda node: node.is_leaf):
        node_branches = [node_i.id for node_i in data_i.path[1:]]
        node_pairs += [[node_branches[i],node_branches[i+1]] for i in range(len(node_branches)-1)]
    node_pairs = [list(x) for x in set(tuple(x) for x in node_pairs)]
    # Draw lines
    for (x,y) in zip(X,Y):
        [cv2.line(img,
        (int(x[n[0]]), int(y[n[0]])), (int(x[n[1]]), int(y[n[1]])),
        (np.array(cmap((i+1)/len(node_pairs)))*255).tolist(),
        2)
        for i, n in enumerate(node_pairs)
        if not (np.isnan(x[n[0]]) or np.isnan(y[n[0]]) or np.isnan(x[n[1]]) or np.isnan(y[n[1]]))]

return img

def save_imgvid_reID(video_path, video_result_path, save_vid=1, save_img=1, *pose_model):
'''
Displays json 2d detections overlayed on original raw images.
High confidence keypoints are green, low confidence ones are red.
Note: See 'json_display_without_img.py' if you only want to display the
json coordinates on an animated graph or if don't have the original raw
images.

Usage:
json_display_with_img -j "<json_folder>" -i "<raw_img_folder>"
json_display_with_img -j "<json_folder>" -i "<raw_img_folder>" -o "<output_img_folder>" -d True -s True
import json_display_with_img; json_display_with_img.json_display_with_img_func(json_folder=r'<json_folder>', raw_img_folder=r'<raw_img_folder>')
'''

Find csv position files, prepare video and image saving paths
pose_model = pose_model[0]
csv_paths = list(video_result_path.parent.glob(f'*{video_result_path.stem}*{pose_model}*points*refined*.csv'))
if csv_paths == []:
    csv_paths = list(video_result_path.parent.glob(f'*{video_result_path.stem}*{pose_model}*points*.csv'))

# Open csv files
coords = []
for c in csv_paths:
    with open(c) as c_f:
        coords += [pd.read_csv(c_f, header=[0,1,2,3])]

# Open video frame by frame
cap = cv2.VideoCapture(str(video_path))
W, H = cap.get(cv2.CAP_PROP_FRAME_WIDTH), cap.get(cv2.CAP_PROP_FRAME_HEIGHT)
fps = cap.get(cv2.CAP_PROP_FPS)
if (cap.isOpened()== False):
    print("Error opening video stream or file")
if save_vid:
    video_pose_path = video_result_path.parent / (video_result_path.stem + '_' + pose_model + '.mp4')
    fourcc = cv2.VideoWriter_fourcc(*'mp4v')
    writer = cv2.VideoWriter(str(video_pose_path), fourcc, fps, (int(W), int(H)))
if save_img:
    img_pose_path = video_result_path.parent / (video_result_path.stem + '_' + pose_model + '_img')
    img_pose_path.mkdir(parents=True, exist_ok=True)

f = 0
while(cap.isOpened()):
    ret, frame = cap.read()
    try:
        X = [np.array(coord.iloc[f,2::3]) for coord in coords]
        X = [np.where(x==0., np.nan, x) for x in X]
        Y = [np.array(coord.iloc[f,3::3]) for coord in coords]
        Y = [np.where(y==0., np.nan, y) for y in Y]

        # Draw bounding box
        frame = draw_bounding_box(X, Y, frame)

        # Draw keypoints and skeleton
        frame = draw_keypts_skel(X, Y, frame, pose_model)

        # Save video and images
        if save_vid:
            writer.write(frame)
        if save_img:
            cv2.imwrite(str( img_pose_path / (video_result_path.stem+'_'+pose_model+'.'+str(f).zfill(5)+'.png' )), frame)

    except:
        break
    f += 1
cap.release()
writer.release()

def detect_pose_fun(config_dict):
'''
Detect joint centers from a video with OpenPose or BlazePose.
Save a 2D csv file per person, and optionally json files, image files, and video file.
If OpenPose is used, multiple persons can be consistently detected across frames.
Interpolates sequences of missing data if they are less than N frames long.
Optionally filters results with Butterworth, gaussian, median, or loess filter.
Optionally displays figures.

If BlazePose is used, only one person can be detected.
No interpolation nor filtering options available. Not plotting available.

/!\ Warning /!\
- The pose detection is only as good as the pose estimation algorithm, i.e., it is not perfect.
- It will lead to reliable results only if the persons move in the 2D plane (sagittal plane).
- The persons need to be filmed as perpendicularly as possible from their side.
If you need research-grade markerless joint kinematics, consider using several cameras,
and constraining angles to a biomechanically accurate model. See Pose2Sim for example:
https://github.com/perfanalytics/pose2sim

INPUTS:
- a video
- a dictionary obtained from a configuration file (.toml extension)
- a skeleton model

OUTPUTS:
- one csv file of joint coordinates per detected person
- optionally json directory, image directory, video
- a logs.txt file
'''

# Retrieve parameters
root_dir = os.getcwd()
video_dir, video_file, result_dir, frame_rate = base_params(config_dict)
pose_algo = config_dict.get('pose').get('pose_algo')

load_pose = config_dict.get('pose_advanced').get('load_pose')
save_vid = config_dict.get('pose_advanced').get('save_vid')
save_img = config_dict.get('pose_advanced').get('save_img')
interp_gap_smaller_than = config_dict.get('pose_advanced').get('interp_gap_smaller_than')

show_plots = config_dict.get('pose_advanced').get('show_plots')
do_filter = config_dict.get('pose_advanced').get('filter')
filter_type = config_dict.get('pose_advanced').get('filter_type')
butterworth_filter_order = config_dict.get('pose_advanced').get('butterworth').get('order')
butterworth_filter_cutoff = config_dict.get('pose_advanced').get('butterworth').get('cut_off_frequency')
gaussian_filter_kernel = config_dict.get('pose_advanced').get('gaussian').get('sigma_kernel')
loess_filter_kernel = config_dict.get('pose_advanced').get('loess').get('nb_values_used')
median_filter_kernel = config_dict.get('pose_advanced').get('median').get('kernel_size')
filter_options = (do_filter, filter_type, butterworth_filter_order, butterworth_filter_cutoff, frame_rate, gaussian_filter_kernel, loess_filter_kernel, median_filter_kernel)

video_file_stem = video_file.stem
video_path = video_dir / video_file
video_result_path = result_dir / video_file

if pose_algo == 'OPENPOSE':
    pose_model = config_dict.get('pose').get('OPENPOSE').get('openpose_model')
    json_path = result_dir / '_'.join((video_file_stem,pose_model,'json'))

    # Pose detection skipped if load existing json files
    if load_pose and len(list(json_path.glob('*')))>0:
        pass
    else:
        logging.info(f'Detecting 2D joint positions with OpenPose model {pose_model}, for {video_file}.')
        json_path.mkdir(parents=True, exist_ok=True)
        openpose_path = config_dict.get('pose').get('OPENPOSE').get('openpose_path')
        os.chdir(openpose_path)
        if platform =="win32":
            run_openpose_windows(video_path, json_path, pose_model)
        elif platform == "darwin":
            run_openpose_mac(video_path, json_path, pose_model)
        elif platform == "linux" or platform=="linux2":
            run_openpose_linux(video_path, json_path, pose_model)
        os.chdir(root_dir)

# Sort people and save to csv, optionally display plot
    json_to_csv(json_path, frame_rate, pose_model, interp_gap_smaller_than, filter_options, show_plots)

# Save images and files after reindentification
    if save_img and save_vid:
        logging.info(f'Saving images and video in {result_dir}.')
    if save_img and not save_vid:
        logging.info(f'Saving images in {result_dir}.')
    if not save_img and save_vid:
        logging.info(f'Saving video in {result_dir}.')
    if save_vid or save_img:
        save_imgvid_reID(video_path, video_result_path, save_vid, save_img, pose_model)

elif pose_algo == 'BLAZEPOSE':
    model_complexity = config_dict.get('pose').get('BLAZEPOSE').get('model_complexity')
    Blazepose_runsave.blazepose_detec_func(input_file=video_path, save_images=save_img, to_json=True, save_video=save_vid, to_csv=True, output_folder=result_dir, model_complexity=model_complexity)

logging.info(f'Done.')

Thank you!
As it is very long, I took the liberty of hiding the code block.
So it seems like your upload worked, and yet, we cannot find anyone in your video. Two potential explanations there:

either there is actually no one in the whole video
or OpenPose cannot detect them. This is the case when people are laying horizontally or standing upside-down. I suspect that your video is turned in portrait mode. I made sure I automatically rotated such videos, but maybe this did not work with your video format. To make it sure, can you open a new code block and type
!ffprobe $video_full_path?

By the way, the part I wanted you to click on is this.

Here you go:
/content/Sports2D/Sports2D_python/lib/python3.10/site-packages/Sports2D/Sports2D.py in detect_pose(config)
174     start = time.time()
175
--> 176     detect_pose_fun(config_dict)
177
178     end = time.time()
/content/Sports2D/Sports2D_python/lib/python3.10/site-packages/Sports2D/detect_pose.py in detect_pose_fun(config_dict)
589
590     # Sort people and save to csv, optionally display plot
--> 591         json_to_csv(json_path, frame_rate, pose_model, interp_gap_smaller_than, filter_options, show_plots)
592
593     # Save images and files after reindentification
/content/Sports2D/Sports2D_python/lib/python3.10/site-packages/Sports2D/detect_pose.py in json_to_csv(json_path, frame_rate, pose_model, interp_gap_smaller_than, filter_options, show_plots)
290     logging.info('Sorting people across frames.')
291     json_fnames = list(json_path.glob('.json'))
--> 292     nb_persons_to_detect = max([len(json.load(open(json_fname))['people']) for json_fname in json_fnames])
293     Coords = [np.array([]).reshape(0,keypoints_nb3)] * nb_persons_to_detect
294     for json_fname in json_fnames:    # for each frame
ValueError: max() arg is an empty sequence

Okay, thank you.
Can you also open a new code block and type !ffprobe $video_full_path?

Sorry, there is an underscore between !ffprobe and $video_full_path that should not be there

Thank you, this is what I needed.
As I am going to need to do some testing, would you mind sending me your video per email so that I can make sure it works before the next release?
I may not be able to do it today but I will try to solve it by tomorrow.

Hello,
I tried it with your video and haven't been able to reproduced the error. It worked fine by me, so I will need more detail about each step you ran:

First, let's start over from a fresh install. Can you go to your Google drive and remove the Sports2D folder?

Second, can you run each cell (little "play" button on the upper-left), one after another? You don't need to run the "settings" cell if you don't change them. You do need to run it all over from the beginning after each disconnection.

Then, did you choose "Install once" and "Install OpenPose", or did you choose other settings?
What are the settings you used in all other cells?

Hello,

removed Sports2D folder
Used "Install Once" and "Install Open Pose"
I still get this error after clicking  Run Analysis:

/content/Sports2D/Sports2D_python/lib/python3.10/site-packages/Sports2D/Sports2D.py in detect_pose(config)
174     start = time.time()
175
--> 176     detect_pose_fun(config_dict)
177
178     end = time.time()
/content/Sports2D/Sports2D_python/lib/python3.10/site-packages/Sports2D/detect_pose.py in detect_pose_fun(config_dict)
589
590     # Sort people and save to csv, optionally display plot
--> 591         json_to_csv(json_path, frame_rate, pose_model, interp_gap_smaller_than, filter_options, show_plots)
592
593     # Save images and files after reindentification
/content/Sports2D/Sports2D_python/lib/python3.10/site-packages/Sports2D/detect_pose.py in json_to_csv(json_path, frame_rate, pose_model, interp_gap_smaller_than, filter_options, show_plots)
290     logging.info('Sorting people across frames.')
291     json_fnames = list(json_path.glob('.json'))
--> 292     nb_persons_to_detect = max([len(json.load(open(json_fname))['people']) for json_fname in json_fnames])
293     Coords = [np.array([]).reshape(0,keypoints_nb3)] * nb_persons_to_detect
294     for json_fname in json_fnames:    # for each frame
ValueError: max() arg is an empty sequence

Sorry I tried with all the parameters I could think of and I still don't get any error, would you be available for a short visioconference today? I am available the whole day, you can reach me per email so that we set it up.

Okay, that would be a convenient explanation because I currently don't have much more ideas!
If it still does not work once your laptop is fixed, please hit me up and we will figure it out.

I tried again, but got this error in Run Analysis:

Detect pose for video sample.mp4
Detecting 2D joint positions with OpenPose model BODY_25B, for sample.mp4.
/content/drive/My Drive/Sports2D/Sports2D_results
FileNotFoundError                         Traceback (most recent call last)
 in <cell line: 10>()
8 get_ipython().run_line_magic('cd', '$result_path')
9 with open('Config.toml', "w") as config_file: toml.dump(config_dict, config_file)
---> 10 Sports2D.detect_pose('Config.toml')
11 Sports2D.compute_angles('Config.toml')
5 frames
/content/Sports2D/Sports2D_python/lib/python3.10/site-packages/Sports2D/Sports2D.py in detect_pose(config)
174     start = time.time()
175
--> 176     detect_pose_fun(config_dict)
177
178     end = time.time()
/content/Sports2D/Sports2D_python/lib/python3.10/site-packages/Sports2D/detect_pose.py in detect_pose_fun(config_dict)
586                 run_openpose_mac(video_path, json_path, pose_model)
587             elif platform == "linux" or platform=="linux2":
--> 588                 run_openpose_linux(video_path, json_path, pose_model)
589             os.chdir(root_dir)
590
/content/Sports2D/Sports2D_python/lib/python3.10/site-packages/Sports2D/detect_pose.py in run_openpose_linux(video_path, json_path, pose_model)
139     '''
140
--> 141     subprocess.run(["./build/examples/openpose/openpose.bin", "--video", video_path,
142     "--model_pose", pose_model,
143     "--write_json", json_path, \
/usr/lib/python3.10/subprocess.py in run(input, capture_output, timeout, check, *popenargs, **kwargs)
501         kwargs['stderr'] = PIPE
502
--> 503     with Popen(*popenargs, **kwargs) as process:
504         try:
505             stdout, stderr = process.communicate(input, timeout=timeout)
/usr/lib/python3.10/subprocess.py in init(self, args, bufsize, executable, stdin, stdout, stderr, preexec_fn, close_fds, shell, cwd, env, universal_newlines, startupinfo, creationflags, restore_signals, start_new_session, pass_fds, user, group, extra_groups, encoding, errors, text, umask, pipesize)
969                             encoding=encoding, errors=errors)
970
--> 971             self._execute_child(args, executable, preexec_fn, close_fds,
972                                 pass_fds, cwd, env,
973                                 startupinfo, creationflags, shell,
/usr/lib/python3.10/subprocess.py in _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, gid, gids, uid, umask, start_new_session)
1861                     if errno_num != 0:
1862                         err_msg = os.strerror(errno_num)
-> 1863                     raise child_exception_type(errno_num, err_msg, err_filename)
1864                 raise child_exception_type(err_msg)
1865
FileNotFoundError: [Errno 2] No such file or directory: './build/examples/openpose/openpose.bin'

It looks like OpenPose was not installed, did you run the Installation cell?
Also, I recently changed a few things on the Python package, you may want to go to your Google Drive -> Sports2D, and remove Sports2D_python so that it does a clean install.

Connecting to Google Drive...
Drive already mounted at /content/drive; to attempt to forcibly remount, call drive.mount("/content/drive", force_remount=True).
/content/Sports2D already exists.
cp: '/content/Sports2D' and '/content/drive/My Drive/Sports2D' are the same file
Installing Sports2D in Google Drive...
Sports2D already installed.
Installing OpenPose in Google Drive...
OpenPose already installed.
Setting up the environment...
chmod: cannot access '/content/Sports2D/Sports2D_openpose/build/examples/openpose/openpose.bin': No such file or directory
cp: cannot stat '/content/Sports2D/Sports2D_openpose/build/src/openpose/libopenpose.so.1.7.0': No such file or directory
cp: cannot stat '/content/Sports2D/Sports2D_openpose/build/caffe/lib/libcaffe.so.1.0.0': No such file or directory
Done.

I think you need to delete your Sports2D_python folder in your Google drive, do menu-> disconnect and delete runtime,
And try again.
Actually, do you want us to have a visioconference? I'm available for the next two hours.

And there is also a problem with OpenPose so you could as well delete the whole Sports2D directory in your Drive

Another possibility: you may have run the install, and then waited long enough that the server got disconnected. In that case, do menu->runtime->disconnect and delete runtime, and then run install again (it should take 2 minutes if everything is already installed in your drive).
I really don't get it, I tried again with all parameters I could think of and everything seemed to work fine on my end 😅

I tried with another laptop (deleted Sports 2D folder):
Part of the code in Installation:
The following packages will be REMOVED:
libcudnn8-dev
The following held packages will be changed:
libcudnn8
The following packages will be DOWNGRADED:
libcudnn8
0 upgraded, 0 newly installed, 1 downgraded, 1 to remove and 13 not upgraded.
Need to get 430 MB of archives.
After this operation, 1,027 MB disk space will be freed.
(Reading database ... 123832 files and directories currently installed.)
Removing libcudnn8-dev (<IP_ADDRESS>-1+cuda11.8) ...
update-alternatives: removing manually selected alternative - switching libcudnn to auto mode
dpkg: warning: downgrading libcudnn8 from <IP_ADDRESS>-1+cuda11.8 to <IP_ADDRESS>-1+cuda11.2
(Reading database ... 123799 files and directories currently installed.)
Preparing to unpack .../libcudnn8_<IP_ADDRESS>-1+cuda11.2_amd64.deb ...
Unpacking libcudnn8 (<IP_ADDRESS>-1+cuda11.2) over (<IP_ADDRESS>-1+cuda11.8) ...
Setting up libcudnn8 (<IP_ADDRESS>-1+cuda11.2) ...
Done.
Run:
/content/Sports2D/Sports2D_python/lib/python3.10/site-packages/Sports2D/Sports2D.py in detect_pose(config)
174     start = time.time()
175
--> 176     detect_pose_fun(config_dict)
177
178     end = time.time()
/content/Sports2D/Sports2D_python/lib/python3.10/site-packages/Sports2D/detect_pose.py in detect_pose_fun(config_dict)
590
591     # Sort people and save to csv, optionally display plot
--> 592         json_to_csv(json_path, frame_rate, pose_model, interp_gap_smaller_than, filter_options, show_plots)
593
594     # Save images and files after reindentification
/content/Sports2D/Sports2D_python/lib/python3.10/site-packages/Sports2D/detect_pose.py in json_to_csv(json_path, frame_rate, pose_model, interp_gap_smaller_than, filter_options, show_plots)
290     logging.info('Sorting people across frames.')
291     json_fnames = list(json_path.glob('.json'))
--> 292     nb_persons_to_detect = max([len(json.load(open(json_fname))['people']) for json_fname in json_fnames])
293     Coords = [np.array([]).reshape(0,keypoints_nb3)] * nb_persons_to_detect
294     for json_fname in json_fnames:    # for each frame
ValueError: max() arg is an empty sequence

OK, so it is the same error as the first time, and I never got it even with the video you sent me, even trying on my smartphone,or another computer, with another account.
Would you be available sometimes next week for a visioconference, so that I can understand better what is going wrong?
I will try to release a Youtube tutorial as soon as possible, too.

Here is the video I was talking about:
https://www.youtube.com/watch?v=Er5RpcJ8o1Y

Thank for the tutorial.
From computer:

Uninstalled Sports2D_videos folder
Reinstalled..
I still get the same error

From Mobile phone:

I finally figured it out!

I removed the collab in my googledirve and used: https://colab.research.google.com/github/davidpagnon/Sports2D/blob/main/Sports2D/Sports2D.ipynb#scrollTo=0cOwHHXoBrCz   .

Awesome!!
I'm very glad it worked, however I am not sure I understand what was your problem and how you solved it. Do you tho k you could elaborate, so that I make sure other users don't face the same issue?

I installed Sports2D collab in my google drive, and encountered the errors. When I deleted it (also  the Sports2D_videos folder) and used the link on github (https://colab.research.google.com/github/davidpagnon/Sports2D/blob/main/Sports2D/Sports2D.ipynb), it worked!
It also detected someone who's not there!

I used the same link but saved a copy in my googledrive. Thanks for the clarification regarding false image detection.
Cheers


Updated Enum Set For Turn Restrictions

Description:
Updated enum set for turn restrictions. NO_PATH_RESTRICTIONS set was missing values NO_EXIT and NO_ENTRY.
Potential Impact:
Will affect what TurnRestictionCheck flags. Turn Restriction Check is in Atlas Checks.
Unit Test Approach:
N/A
Test Results:
N/A

In doubt: Contributing Guidelines

Could you an detailed explanation on why these two values should be included in this enum set?


Fx add_columns typo in README

While doing some development with EM I noticed the examples for add_columns are syntactically incorrect. Wanted to fix this so other users don't get tripped up.
Didn't think updating the changelog is necessary since this is documentation only.

I updated the merge branch to be rc/0.3.2, instead of main directly. @johncmerfeld Could you also update the CHANGELOG file with this update?

I updated the merge branch to be rc/0.3.2, instead of main directly. @johncmerfeld Could you also update the CHANGELOG file with this update?

@jayckaiser done!


feat: Allow accessing jsi::Value on RawProps

Summary:
I'm working on a new React Native Framework. It uses pure C++/JSI to create, mount and update a View under Fabric.
Unfortunately the RawProps type abstraction is not enough in my case, I need the actual jsi::Value (which might be a jsi::HostObject, NativeState, or other custom types I created).
Now my idea is to avoid going the RawPropsParser route and instead directly access the RawProps' jsi::Value (including it's jsi::Runtime) to go my route.
This will be safe since I immediately convert the jsi::Value to other C++ types, and I don't keep that instance (nor the jsi::Runtime) in memory.
My previous approach was extending RawPropsParser, but that's a bit more complex since friendship is not inheritable in C++ and I also feel like we don't need the whole prop parsing loop. In my case, all of the parsing is statically generated with templates - there will be no iterations.
If there's a simpler or better alternative to this, I'm all ears - but from what I'm seeing in the codebase there is no better direct point to intercept all jsi::Values for view components. Please correct me if I'm wrong (cc @philIip ?)

Changelog:
[INTERNAL] [CHANGED] - Allow accessing RawProps' jsi::Value directly for React Native Frameworks

Test Plan:
I receive RawProps (e.g. in ImageProps.cpp), and directly access jsi::Value from there to convert the object to a C++ object (or individual C++ keys).

Actually wait, I think at this point it's already too late. I think at this point we don't have the raw jsi::Values anymore, do we?
I'm not sure if I fully understand the codebase here, but I can see that [RCTMountingManager synchronouslyUpdateViewOnUIThread] already uses convertIdToFollyDynamic - I don't get why? I thought Fabric is using JSI instead of folly dynamic?
https://github.com/facebook/react-native/blob/2f8d4f0c253853ec4f56cf01b41a1f73a393f804/packages/react-native/React/Fabric/Mounting/RCTMountingManager.mm#L301-L302
If that's the case, then my jsi::HostObjects from JS are already converted to plain NSDictionaries / folly::dynamic maps, no?
I think I need to find an earlier point to intercept props then...

WIP because friendship is not inheritable - I'll probably change this idea to make the jsi::Values accessors public just like folly::dynamic.
Will do tomorrow

cc @cortinico sorry for pinging but please lmk if this is a good or bad idea, and if there's a better way to get the props as jsi::Values. thanks!

cc @cortinico sorry for pinging but please lmk if this is a good or bad idea, and if there's a better way to get the props as jsi::Values. thanks!

@philIip is the best reviewer here

hmmm my gut is telling me we shouldn't allow this. raw props is supposed to obfuscate the "type" of value bag and this change essentially reverses that. is this to support the frameProcessor lambda prop?
cc @javache @sammy-SC

I think your high-level use-case here (allowing complex HostObject props to be passed through) makes sense, but we need to figure out a more scalable way to expose this. RawProps can represent both folly::dynamic as well as jsi::Value, and we manage how this get accessed so we can change the internals from diff-based to full JS representation based.
Also keep in mind that while Android parses props here, it will pass only a folly::dynamic representation of it through to native, and you'd need use State or other mechanisms to make the HostObject available.

Okay I see. I only tested on iOS so far, my bad.
What do you suggest then? I need a way to access a view component's props as jsi::Values...

Something @dmytrorykun came across recently is that RawValue eagerly converts the incoming jsi::Value to a folly::dynamic representation, something we want to move away from. So if we can could get that supported (similar to RawProps supporting both representations), we could allow prop conversion (eg using the existing bridging logic)

Yea I have a similar implementation to the bridging interfaces you built. I just browsed through them, impressive work!
My implementation (not yet OSS) is pretty similar, but has a few important differences. Especially around functions/callbacks (Function/Promise), and custom types (HostObjects/NativeState).
So are you saying that I should use RN's Cxx bridging interface, or is there a way I can use my own? Accessing jsi::Value directly on props.

To be completely precise, it's not RawValue, it's Props that eagerly converts incoming RawProps to folly::dynamic. Happens only on Android.

And in RawProps we are storing an actual jsi::Value and converting it to a folly::dynamic, as opposed to actually storing a folly::dynamic right?
https://github.com/facebook/react-native/blob/f903f3483794f0e0e0b05ac24ab761344c319d6b/packages/react-native/ReactCommon/react/renderer/core/RawProps.cpp#L174-L184
So then the approach of accessing jsi::Value at this stage (RawProps) would work?

To be completely precise, it's not RawValue, it's Props that eagerly converts incoming RawProps to folly::dynamic. Happens only on Android.

No, this is not what I'm referring to. @mrousavy's code pointer is correct. RawValue can only contain a folly::dynamic, while we would want it contain a jsi::Value as well.

To be completely precise, it's not RawValue, it's Props that eagerly converts incoming RawProps to folly::dynamic. Happens only on Android.

No, I'm talking about this code in RawPropsParser
https://github.com/facebook/react-native/blob/f903f3483794f0e0e0b05ac24ab761344c319d6b/packages/react-native/ReactCommon/react/renderer/core/RawPropsParser.cpp#L140-L141
This is where we need to hold on to the jsi::Value instead.

So just for my understanding; is it correct that on Android, the jsi::Value is already gone after RawProps? (-> folly::dynamic)

but we need to figure out a more scalable way to expose this.

@javache do you have any alternative solutions?
I mean I could try starting fully from scratch to look into mounting views in an entirely different way, I'm not too familiar with how the react renderer / fabric works but to me this would sound like I need to re-invent A TON of stuff, which is not a good idea.
I want to reuse Yoga, the react renderer, and even inherit props from UIView if possible, while still getting access to props as jsi::Values...

is it correct that on Android, the jsi::Value is already gone after RawProps

It's gone once we complete parsing, ie when you have the Props object.

@javache do you have any alternative solutions?

I'm afraid not right now. We're actively looking at this code for perf reasons, and mapping it more closely to jsi::Value is definitely something we're interested in, but it's a non-trivial change. For now, I think the simplest option is to use a (C++) TurboModule to store these JSI values, and pass a (numeric) reference to the stored values as a prop instead.

Hmm okay I see, thanks @javache.
So just to be on the same page, is this the same idea that you're proposing?

Someone creates a view component using my React Native Framework (say <Camera> with 2 props: device, frameProcessor, both are custom types/jsi::HostObjects)
Instead of using React Native's view system to somehow pass those props, I just generate a dummy view component that also has the same props (device, frameProcessor), but instead of being any type they are just numbers
In my JS View component (Camera.tsx), I then intercept all props in the render() function, and for each prop I do something like makeValueGlobalAndGetReferenceId(device) (same for frameProcessor), and pass that to the React Native View component
In the React Native view component I then look up the numbers in my global reference table and convert them back from their actual values

JS:
class Camera {

  render() {
    const { device, frameProcessor } = this.props
    const deviceRef = makeValueGlobalAndGetReferenceId(device)
    const frameProcessorRef = makeValueGlobalAndGetReferenceId(frameProcessor)

    return <NativeCamera device={deviceRef} frameProcessor={frameProcessorRef} />
  }
}

C++:
std::unordered_map<double, jsi::Value> globals;
static double latestRefId = 0;
auto func = [](jsi::Runtime&, const jsi::Value&, jsi::Value* args, size_t) -> jsi::Value {
  double referenceId = latestRefId++;
  // store given value in global (TODO: this is UNSAFE, because it escapes this function and we dont know if it will be consumed right away)
  globals[referenceId] = std::move(args[0]);
  return jsi::Value(referenceId);
}
runtime.global().setProperty("makeValueGlobalAndGetReferenceId", jsi::Function::createFromHostFunction(..., func));

My React Native Framework's middleman C++:
void updateProps() {
  // well, this just converts the numbers (deviceRef, frameProcessorRef) to jsi::Values again.
  // but this is also unsafe since we are no longer on the JS thread here afaik.
  // also we are not 100% sure if values will be consumed (e.g. concurrent updates canceling a batch?)
}

Is that what you had in mind as well? This sounds like a really hacky solution, and my TODO comments are a bit concerning

Another problem I see with the global number reference <-> jsi::Value map approach is that view component functions aren't really trivial to implement.
E.g. for a  I'd have a takePhoto(..) function which returns a Photo jsi::HostObject.
How would I implement this? I could create a global jsi::Function that performs takePhoto(...) and returns a jsi::HostObject, but how do I get a reference to the Camera View in there?
nativeId? findNodeHandle?
I know this isn't trivial at all, but at first I was thinking that maybe somewhat reinventing the wheel here and building my own JSI based view components (including prop updaters and view component functions) would be a better approach.
For that I'd need access to the jsi::Value in RawProps though, unless there is a level higher through which I can get props?
I don't want to re-implement the whole thing starting from React.createElement because then I'd probably break things like Reanimated, as that works through setNativeProps...

Yes, the approach I described has a number of short-comings. All props parsing from React commits does happen on the JS thread though, so accessing these globals should be safe.
We are actively looking at this part of code-base as part of performance improvements, but do not have any immediate plans to make closer integration with jsi::Value part of props parsing.
I don't think we want to pull in this PR as-is, as it's quite broad and will limit us in how we can evolve this going forward (same reason the operator() folly::dynamic is deprecated here).

Hey @javache! After our discussion at react native london we wanted to revisit this topic.
My proposal to move forward with this would be to make the prop parser configurable, so by default the existing RawPropsParser is being used, but can be switched with alternative implementations that enable us to access the jsi::Value directly:
1. Add an optional path for RawValue to hold a runtime + jsi value pair:
https://github.com/hannojg/react-native/blob/00c4d052e4f8a381d25dba73bc60603bb28ba4ca/packages/react-native/ReactCommon/react/renderer/core/RawValue.h#L74-L97

2. Make the RawPropsParser configurable on the level of the ConcreteComponentDescriptor
https://github.com/hannojg/react-native/blob/7232c90e922f760f0b97b4f6f74640d1e895a29c/packages/react-native/ReactCommon/react/renderer/core/ConcreteComponentDescriptor.h#L32

Notes

I moved the RawPropsParser from ComponentDescriptor to ConcreteComponentDescriptor as it was used only there
For this to work with RawProps which uses RawPropsParser we have to implement a interface / abstract class which we use in RawProps

3. Use a custom RawPropsParser in our component that wants to opt-in to use jsi prop values directly
Now our custom component can opt into using a custom prop parser, which enables us to store any prop we want to handle with jsi directly as nativeProp
https://github.com/hannojg/react-native/blob/7232c90e922f760f0b97b4f6f74640d1e895a29c/packages/rn-tester/ManualComponent/ManualFabricComponentView.mm#L63-L77

Note: In this PoC example the JsiPropParser isn't optimized for performance yet (ie. passing dangling pointers, re-creating jsi::Values, re-calculating prop names which seems expensive, etc)

4. Get jsi::Value from RawValue in our concrete props implementation
Now in our concrete props implementation we can get the RawValue and read the jsi::Value from it directly:
https://github.com/hannojg/react-native/blob/7232c90e922f760f0b97b4f6f74640d1e895a29c/packages/rn-tester/ManualComponent/ManualFabricComponentView.mm#L27-L42

I feel like the pro to this approach is that:

We offer a migration path for RawValue to remove the folly::dynamic types (we can start experimenting with this integration, at some point bring over the JsiPropParser and start to migrate core components)
We make the Prop parsing configurable

I still have to look into how we can bridge the value over to android though. I reckon that for our use case not too many changes will be needed, as we will own the bridging part from C++ to the view manager in Java/Kotlin.
Let me know what you all are thinking! 😊
(A PoC PR is here: https://github.com/facebook/react-native/pull/47717)

Thanks for listing those options @hannojg!
Given that we want to move away from folly::dynamic as the intermediate representation, I'd want to have RawValue support both jsi::Value and folly::dynamic, which should include all the existing type casting API's too, so this becomes a transparent upgrade.
Using templates would be an interesting approach to avoid a ton of std::variant runtime checking to know which path to take, and allow testing this on a component by component basis.
While designing this, consider how we could 1) fully remove the folly::dynamic codepath in the future 2) test an incremental rollout of this, where we could choose at runtime which implementation to use.

Roger that, will open up a new PR with such a change in the coming days! Thanks for the feedback :)

Update:
I implemented:

https://github.com/facebook/react-native/pull/48047

which adds a new constructor for the RawValue class and a feature flag that, when enabled, will use RawValue with the jsi::Values directly.

Consider how we could fully remove the folly::dynamic codepath in the future

We can basically track down all places that create RawValue using folly::dynamic, and change them to pass the jsi Runtime and Value directly.

Test an incremental rollout of this, where we could choose at runtime which implementation to use.

I think this is covered in the PR by using a react native feature flag

Testing this on a component by component basis.

For this, I opened a separate PR on top of the mentioned one, that allows us to:

https://github.com/hannojg/react-native/pull/2

Pass a flag to RawPropsParser to enable the jsi variant
Pass a custom instance of RawPropsParser to ConcreteComponentProvider for components as an opt-in


PERA-1224 :: Add BIP-39 models to common module

Pull Request Template
Description

Add BIP-39 models to common module

Related Issues

Closes https://algorandfoundation.atlassian.net/browse/PERA-1224

Checklist

[X] Have you tested your changes locally?
[X] Have you reviewed the code for any potential issues?
[X] Have you documented any necessary changes in the project's documentation?
[X] Have you added any necessary tests for your changes?
[X] Have you updated any relevant dependencies?

Additional Notes

My next PR will call this from compose test app
./gradlew testProdDebugUnitTest seems to fail for me locally but ./gradlew testDebugUnitTest passes
Do we want to start bumping the DB versions or keep it 1 till launch?

This was the UI button i added to existing one (added some text next to + icon)


How do I preserve text selection when dragging?

When I initiate a drag, any text selected in
...
 is deselected. How do I avoid this?
import React, { Component } from 'react'
import Draggable from 'react-draggable'

export default class Window extends Component {
  render() {
    return (
      <Draggable>

Title

          {this.props.children}

      </Draggable>
    )
  }
}

You may pass a prop enableUserSelectHack={false} to

Hmmm, that didn't do the trick for me but I was able to get it working by setting onMouseDown={e => e.preventDefault()} to the handle element like so:
<Draggable handle="#handle" enableUserSelectHack={false}>
  <WindowContainer>

      <WindowTitleBar onMouseDown={e => e.preventDefault()}>
        My Title
      </WindowTitleBar>

    {this.props.children}
  </WindowContainer>
</Draggable>

This is fixed in #470


error "conda env create -f environment.yaml "

when conda env create -f environment.yaml
errors Solving environment: failed InvalidVersionSpecError: Invalid version spec: =2.7
python version:3.8
how to solve this problem?

I can't reproduce the issue.
It looks like a conda problem, see link. What version of conda do you use? Have you tried upgrade it to the latest?
If you can use pytorch in your own environment, I believe it is okay to install requirements via pip install -r requirements.txt && pip install pytorch_lightning==1.1.8


Display location as text in "Key Facts"

Done (not live at time of comment, will deploy later today once I've gone through all my tickets)


Version Issue

Numpy's version has been already upgraded to 2.x, but now tensorflow can't support it.Can you upgrade the tensorflow library?

I'll appreciate it if you can upgrade it.

duplicate of #67291


Add better error handling

$ curl -X POST -H "Authorization: 123"  http://my-k8s-claimer.com/lease
error decoding JSON (EOF)

A nice improvement here would be to have the CLI read and output the response body on failures

@jchauncey do we still emit useless error messages here?

Hrm we do get some weird errors but its better. I'll close this for now


Make title bar look like in the mockups

See https://people.mozilla.org/~shorlander/stuff/explorations-06.html
Word of warning: these are just UI explorations/experiments that are subject to change.


Node in devMode within pipelines' graph view (UI)

When looking at the nodes of a running pipeline, show which nodes are in devMode

insert icon devmode on box node
try add tooltip "dev mode"

No tooltip seen in latest version.


feat: add tests for db migration on sqlite and postgres

Pull Request Checklist

[x] Description: Briefly describe the changes in this pull request.
[ ] Changelog: Ensure a changelog entry following the format of Keep a Changelog is added at the bottom of the PR description.
[ ] Documentation: Have you updated relevant documentation Open WebUI Docs, or other documentation sources?
[ ] Dependencies: Are there any new dependencies? Have you updated the dependency versions in the documentation?
[x] Testing: Have you written and run sufficient tests for the changes?

Description
Adds a new test in CI that runs the backend with SQLite and Postgres, and verifies that they start correctly, which will be key to ensuring we don't break compatibility with external databases when making changes to DB schema.
Example run: https://github.com/open-webui/open-webui/actions/runs/8868769049/job/24348714090?pr=1830
There's a test for MySQL as well, but it was failing, so I've commented it out for now: https://github.com/cheahjs/open-webui-fork/actions/runs/8868578535/job/24348304494

Great addition! LGTM!


Need Edit Service Information and Detail on Service List

In GitLab by @luotian-github on Sep 28, 2017, 17:31
update k8s cli

In GitLab by @sokril on Nov 8, 2019, 08:12
closed


Remove branch support

Part of #3428
This change starts removing branching support.  Since the changes span client+server, we'll need each side to bump version before the remaining bits can be safely removed.

Changes made per PR feedback, will wait for the 0.30 version bump to merge.


Readme file

Hi,
your plugin looks really well done, I've tried to do some reverse engineering on how to use it, but a couple of info in a readme.md would be really great!
Thanks for your work
Massimo

FYI, here is the code I used in CakePHP v4:
$config = Configure::read('Upload');
$uploader = new Uploader($config, $this->request->getData('file'));
$result = $uploader->upload();


Crash App when run react-native-voice

I think react-native-audio-toolkit conflict micro permission with react-native-voice on real iphone. How to disable or remove recorder package on react-native-audio-toolkit? Thanks you!

I lodged an issue on the react native voice repository. It's related to the audio session category management (since iOS requires you to handle a single audio session throughout the app).
https://github.com/wenkesj/react-native-voice/issues/50


Selected Subgraph

I would update the code for obtaining a subgraph here:
from
for node_id, node in self.graph.nodes.items():
    if solution[node_selected[node_id]]:
        selected_graph.add_node(node_id, node)

for edge_id, edge in self.graph.edges.items():
    if solution[edge_selected[edge_id]]:
        selected_graph.add_edge(edge_id, edge)

to become,
for node_id, node in self.graph.nodes.items():
    if solution[node_selected[node_id]] > 0.5:
        selected_graph.add_node(node_id, node)

for edge_id, edge in self.graph.edges.items():
    if solution[edge_selected[edge_id]] > 0.5:
        selected_graph.add_edge(edge_id, edge)

Since the selected subgraph at times can skip a few nodes and edges if the solution indicator value on them is not exactly 1 but is 1.0000002etc.

that would be just fine.  could you make a PR?


Client reconnect fails for DTLS / PSK connections

I have the following scenario.

Start Server
Start Leshan Client it connects using PSK
Restart Server
Client gets timeout on update and tries to reconnect without success again and again

@sbernard31 suspected this as the reason
1. Start Server
2. Start Client it connects using PSK (an handshake DTLS is done and a DTLS connection is created)
3. Restart Server (So the server lost DTLS connections for all clients)
4. Client try to do an update using the current DTLS connection but the server ignore the message as it has no connection for this client.
5. Client get a timeout and retry later but still using the same DTLS connection, so get timeout again.

The PR #135 should fix this one.

PR #135 fixes the problem for me. Thanks

PR #135 integrated in master (commit d413abf)


When a user is in Tablet mode or in approx 655px width the dropdown got white or undefined background

Describe the bug
When a user is in Tablet mode or in approx 655px width the dropdown got white or undefined background.
To Reproduce
Steps to reproduce the behavior:

Open in '655px width'
Click on 'dropdown'
U cannot see the lists
See error

Expected behavior
Background of dropdown should be depends on dark/light mode not take undefined colors
Screenshots

Is this what you have in mind?
I tested it on a browser though, not a tablet.

Yeah,
We have to work on that for tablets view.


Variable length int endianness

I thought num2VarInt was doing the right thing until my invocations started failing at the most inconvenient time. After debugging the node I realised that it was trying to read too much of the byte array, failing on GAS cost deserialization because there was no buffer left. Swapping the bytes around fixed it and the txes went through fine.
This is where the wrong var int was coming through - fd00fd should be 253 but was becoming 64768 in the node.
I've noticed that we aren't using var ints for big values right now (mostly short array lengths) so I wonder if this was the wrong endianness all along and we are just missing a reverseHex.

yes looks like we are missing a reverseHex in write. i reversed in readVarInt but somehow did not do that in num2VarInt. Would you like to PR?

Yep, no problem. Just wanted to double check my findings. Will send over the PR asap.

yes thanks for the discovery! might be the root of many weird invocation failures... time to write more tests for utils...

Well with that said (I agree with more testing) the invocations do work surprisingly well. especially considering they were only used for RPX mintTokens in neon so far...


Please ignore this, I will start another PR

After making all changes to the cask:

[x] brew cask audit --download {{cask_file}} is error-free.
[x] brew cask style --fix {{cask_file}} left no offenses.
[x] The commit message includes the cask’s name and version.

I need to close this pull, since there are some error, it picked up a old commit.


[Macros on Darwin] Use device platform paths when building for the simulator

To avoid having duplicated macro implementations in both the device and
simulator platforms, when building for a simulator platform, pass
-external-plugin-path that points into the device platform. There
is no need to have macro implementations in the simulator platforms.
Implements rdar://112563633

@swift-ci please test

@swift-ci please test

@swift-ci please test Windows


llama-cpp-python doesn't use Metal on M2 device by default

I originally deployed this with no modifications. The chat UI worked wonderfully, but was operating at a slower rate. I checked the MacOS Activity Monitor and there was no GPU activity.
I had to install llama-cpp-python on my Mac using the CMAKE_ARGS="-DLLAMA_METAL=on" flag, then use pip download llama-cpp-python to generate a .tar.gz, and change the Dockerfile to copy the zip and pip install it. Once I did that, I built the container again and the GPU acceleration seemed to work.
I tried adding CMAKE_ARGS="-DLLAMA_METAL=on" as an ENV var in the Dockerfile, but I'm somewhat unfamiliar with the cmake environment on my Mac and it generated some library errors.
CMAKE error:
6.774         vendor/llama.cpp/CMakeLists.txt:105 (include)
6.774
6.774
6.774       -- Performing Test CMAKE_HAVE_LIBC_PTHREAD
6.774       -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
6.774       -- Found Threads: TRUE
6.774       CMake Error at vendor/llama.cpp/CMakeLists.txt:151 (find_library):
6.774         Could not find FOUNDATION_LIBRARY using the following names: Foundation
6.774
6.774
6.774       -- Configuring incomplete, errors occurred!
6.774
6.774       *** CMake configuration failed
6.774       [end of output]```

@remy415 bad news I'm afraid. If you want to use Metal GPU you will need to run on host, unless something has changed recently. Here is a quick clip that explains the challenges of virtualizing the Metal GPU:
https://www.youtube.com/watch?v=Bxa2-wNSjJg&t=307s

To add, we plan to adapt Tadpole to support host execution:
https://github.com/defenseunicorns/tadpole
This should at least give you a quick way to get up and running with Metal outside of containers. @remy415


Allow users to ignore mutants based on heuristics

Is your feature request related to a problem? Please describe.
We have had a couple of requests in the past to allow to ignore specific mutants:
#2966 #1174 #1470 #1464
Some of these issues have been solved by allowing users to ignore using a comment, however, this isn't always practical.
For large codebases where you want to ignore the same pattern every time. For example: console.log().
Or you want to ignore mutants based on some other data, for example using the result of a git command, like the git checker seems to be doing.
Describe the solution you'd like
I would like to be able to ignore specific mutants based on heuristics (for lack of a better word). It would be run inside the instrumenter on each AST node visitation. It could then decide to ignore the current node with a reason.
The API could look like this
type IgnoreResult = false | { ignore: true, reason: string };

interface Ignorer {
  init?(): Promise<void>;

  shouldIgnore(path: NodePath): IgnoreResult;
}

We should document some examples for common use cases, like ignoring console.log statements. Issue #3230 needs to be solved to allow for locally defined plugins.
Describe alternatives you've considered
There are a number of issues linked where users thought of different approaches. However, I think this abstraction makes the most sense. It allows for the most freedom.
Additional context
All current plugin APIs are located inside the @stryker-mutator/api package. I want this to be no exception. However, the NodePath interface comes from @babel/core. I don't want that to be part of the dependencies of the API package. So we might want to mark it as a dev dependency 🤷♀

Ignore-plugins are released in StrykerJS 7.3.
https://twitter.com/stryker_mutator/status/1713557660832792870
https://stryker-mutator.io/docs/stryker-js/disable-mutants/#using-an-ignore-plugin


[Shims] Don't redeclare lgamma_r in macOS 15.0 and associated SDKs

macOS 15.0, iOS 18.0, et al has started unconditionally declaring lgamma_r in <math.h>, add a __has_include in SwiftShims to detect that and not redeclare it when building against those SDK versions.

We don't want to include anything like os/availability.h to figure out if we're in a newer SDK because that will cause module cycles on previous OSes where os/availability.h is still in the Darwin module. @mikeash had the good idea to check for a header that's new in the new OSes instead.

@swift-ci smoke test

@swift-ci smoke test


More options for sorting items within a relation

Order alphabetically (Currently the breadcrumbs appear in the same order they appear in that file, I think)
Use a custom property of a file to sort the breadcrumbs in it. sortorder, for example.

Looks like you beat me to the punch! Would love to see a consistent order in my Breadcrumbs hierarchy! Thanks Ross

@bodiequirk @veradrawer if you want to test out the beta version, I have added the ability to sort items in 1.2.0.
Note, if you are still on 0.11.x, this may be a breaking change. If you get any errors, first ping me here or (preferably) on Discord @SkepticMystic, and I can help troubleshoot it :)

@SkepticMystic Ooh nice! I would be glad to help out. This is awesome. I have the beta running on my laptop anyways, so I will download the beta of Breadcrumbs and let you know how it works!

I was able to utilize the custom order from the beta 1.2 version, but I cannot get the BC-order field to override the alphabetical defaults in the current (2.4 build)


Silently compile even with errors

We are currently using the .ts extension for some of our files that are plain javascript. The tsc command will output a .js file regardless of if there are Typescript errors in the .ts file.  Is there any way to enable this behavior for this gem?

Hello @yjukaku,
Not clear what you want. Could you provide an example of file with error, tsc command with appropriate params and what you expect to see after command executing?

Save this file with the ts extension in the Rails javascripts folder.
// app/assets/javascripts/plain.js
$(function(){
  console.log("I'm a plain javascript file, using jquery, but saved with a .ts extension");
});

Error:
Typescript error in file 'test/app/assets/javascripts/plain.ts':
/var/folders/36/clbwldqs6039l61kp6q1jxkh0000gn/T/typescript-node20151019-785-1pc7706.ts(1,1): error TS2304: Cannot find name '$'.

Obviously the issue is that we aren't declaring/importing the $. But if I ran this using tsc plain.ts, it would show the same error BUT still output the javascript file plain.js.  Basically, I want the option for the typescript-rails gem to still render the page but just log the error messages.  I understand why this isn't the default behavior but I think an option is necessary for some cases.

Sorry. It is not possible. If you want to use plain js use it in .js-files and don't try to compile via tsc.
Or you can fork it and create your own implementation.


Update Dockerfile

Coverage remained the same at 99.276% when pulling 1dde3f8cb857c13bcf28b884afa39c77023889c7 on dockerup into 769b0eef2a5e935b5740854e0a6ee80470e8a1e4 on master.

Coverage remained the same at 99.276% when pulling 6e2e9713badf9f995a7687c3234d4abc3dafbf87 on dockerup into 769b0eef2a5e935b5740854e0a6ee80470e8a1e4 on master.


[HUDI-1821] Remove legacy code for Flink writer

Tips

Thank you very much for contributing to Apache Hudi.
Please review https://hudi.apache.org/contributing.html before opening a pull request.

What is the purpose of the pull request
Remove the legacy code to avoid confusion.
The list to remove:

org.apache.hudi.sink.CommitSink
org.apache.hudi.sink.InstantGenerateOperator
org.apache.hudi.sink.KeyedWriteProcessFunction
org.apache.hudi.sink.KeyedWriteProcessOperator
org.apache.hudi.sink.transform.JsonStringToHoodieRecordMapFunction
org.apache.hudi.streamer.HoodieFlinkStreamer
org.apache.hudi.sink.transform.TestJsonStringToHoodieRecordMapFunction
org.apache.hudi.exception.HoodieFlinkStreamerException

The method to remove:

StreamWriteITCase#testWriteToHoodieLegacy

The list to rename:

org.apache.hudi.streamer.HoodieFlinkStreamerV2 => org.apache.hudi.streamer.HoodieFlinkStreamer

Brief change log
(for example:)

Modify AnnotationLocation checkstyle rule in checkstyle.xml

Verify this pull request
(Please pick either of the following options)
This pull request is a trivial rework / code cleanup without any test coverage.
(or)
This pull request is already covered by existing tests, such as (please describe tests).
(or)
This change added tests and can be verified as follows:
(example:)

Added integration tests for end-to-end.
Added HoodieClientWriteTest to verify the change.
Manually verified the change by running a job locally.

Committer checklist

[ ] Has a corresponding JIRA in PR title & commit

[ ] Commit message is descriptive of the change

[ ] CI is green

[ ] Necessary doc changes done or have another open PR

[ ] For large changes, please consider breaking it into sub-tasks under an umbrella JIRA.

Codecov Report

Merging #2868 (3928b17) into master (4a34318) will increase coverage by 16.67%.
The diff coverage is n/a.

@@              Coverage Diff              @@
##             master    #2868       +/-   ##
=============================================
+ Coverage     53.01%   69.68%   +16.67%
+ Complexity     3744      373     -3371
=============================================
  Files           488       54      -434
  Lines         23435     1996    -21439
  Branches       2500      236     -2264
=============================================
- Hits          12423     1391    -11032
+ Misses         9913      473     -9440
+ Partials       1099      132      -967

Flag
Coverage Δ
Complexity Δ

hudicli
?
?

hudiclient
?
?

hudicommon
?
?

hudiflink
?
?

hudihadoopmr
?
?

hudisparkdatasource
?
?

hudisync
?
?

huditimelineservice
?
?

hudiutilities
69.68% <ø> (-0.06%)
373.00 <ø> (-1.00)

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

Impacted Files
Coverage Δ
Complexity Δ

...apache/hudi/utilities/deltastreamer/DeltaSync.java
71.08% <0.00%> (-0.35%)
55.00% <0.00%> (-1.00%)

...apache/hudi/common/util/collection/ArrayUtils.java

...udi/common/util/queue/BoundedInMemoryExecutor.java

...n/java/org/apache/hudi/hadoop/InputSplitUtils.java

...g/apache/hudi/sink/partitioner/BucketAssigner.java

...apache/hudi/timeline/service/handlers/Handler.java

...org/apache/hudi/common/config/TypedProperties.java

...rg/apache/hudi/common/model/HoodieFileGroupId.java

...g/apache/hudi/common/function/FunctionWrapper.java

...pache/hudi/common/config/HoodieMetadataConfig.java

... and 417 more

@yanghua Hi，i triggered the ci and it's passed.

Hi, @yanghua can you take a look, thanks ~

I have two questions:

The lowest Flink version we supported is 1.12.x?
Can we provide an e2e demo and documentation to show the usage of the flink streamer via jar-mode, just like delta-streamer, it should be out of the box;

I tried it, but missed the dependencies of the Kafka connector. Can we make the new flink streamer peer to the delta streamer?

I have two questions:

The lowest Flink version we supported is 1.12.x?
Can we provide an e2e demo and documentation to show the usage of the flink streamer via jar-mode, just like delta-streamer, it should be out of the box;

I tried it, but missed the dependencies of the Kafka connector. Can we make the new flink streamer peer to the delta streamer?

Yes, people would only use flink 1.12.x code, the code to remove is not because of flink version, it's because the logic is totally redundant.
I still think we should not include a kafka connector into the delta streamer, on one complains the missing of it, based on the users i see.

I have two questions:

The lowest Flink version we supported is 1.12.x?
Can we provide an e2e demo and documentation to show the usage of the flink streamer via jar-mode, just like delta-streamer, it should be out of the box;

I tried it, but missed the dependencies of the Kafka connector. Can we make the new flink streamer peer to the delta streamer?

Yes, people would only use flink 1.12.x code, the code to remove is not because of flink version, it's because the logic is totally redundant. Remove to avoid cofusion, because i found some people use the legacy code with poor performance.

Although I know that many users are currently testing based on 1.12, the threshold we set for many users of older versions is very high. Pray that they are willing to upgrade the Flink version in order to use hudi. In fact, I personally think that the biggest improvement of the new implementation lies in the bucket assigner. As for other points, we could have found a solution (although it does not seem very elegant). Well, I don't have to worry about the Flink version anymore, and I don't have time to pay attention to the old implementation.

I still think we should not include a kafka connector into the delta streamer, on one complains the missing of it, based on the users i see.

I still insist that we need to include kafka-related dependencies. If you look back at the HoodieFlinkStreamerV2 class. What is it in essence? It is just a program written using Flink DataStream API, which is specific (Kafka -> Hudi), not plug-in-oriented or abstract-oriented. For a specific Flink program, we should provide users with an Uber(fat) Jar. Instead of letting users pay attention to details and pay additional costs. Otherwise, why don't we make the source universal?

I still insist that we need to include kafka-related dependencies. If you look back at the HoodieFlinkStreamerV2 class. What is it in essence? It is just a program written using Flink DataStream API, which is specific (Kafka -> Hudi)

No, on one says that they don't know how to add a connector jar or actually few people use the HoodieFlinkStreamerV2 tool.

I still insist that we need to include kafka-related dependencies. If you look back at the HoodieFlinkStreamerV2 class. What is it in essence? It is just a program written using Flink DataStream API, which is specific (Kafka -> Hudi)

No, on one says that they don't know how to add a connector jar or actually few people use the HoodieFlinkStreamerV2 tool.

"one says that they don't know how to add a connector jar" -> I recommend we package it into the bundle for users. It's not that users won't, but users should not or may not need to perceive these things. This is a question of user experience.
According to your logic, what reason do you think users will not use FlinkWriteClient directly? Why should we guide users to use Flink SQL? Can't users write the FlinkStreamer class by themselves?
All of this is to shield users from details as much as possible, let the framework provide out-of-the-box capabilities as much as possible, and provide a good experience as much as possible? Is not it?
"actually few people use the HoodieFlinkStreamerV2 tool" -> Actually, there still few users use the flink write client, because it is still not production-ready for 0.8, you know. IMO, we do not get enough samples about your result.
I have never understood why we cannot include the kafka connector to provide convenience to some users who do not use SQL. And it should provide a consistent experience with DeltaStreamer based on Spark. Otherwise, don't call "FlinkStreamerXXX".

Fine, let's keep them for a time.

Fine, let's keep them for a time.

I do not object to deleting the legacy code. I just suggest we'd better add the Kafka connector into the bundle. And let it be a completed function. Then, we can delete the legacy code and use the new Flink streamer.

Fine, let's keep them for a time.

I do not object to deleting the legacy code. I just suggest we'd better add the Kafka connector into the bundle. And let it be a completed function. Then, we can delete the legacy code and use the new Flink streamer.

I agree the Flink streamer should bundle with a kafka jar, but the hudi-flink-bundle should not include kafka, because many people include the bundle jar in the pom directly, we should keep the jar as small as possible to avoid unnecessary jar conflicts.
Maybe we should move the streamer out of the hudi-flink module into the hudi-utilities module.

we can split the `hudi-utilities to
hudi-utilities
├── hudi-utilities-flink
└── hudi-utilities-spark

Move HoodieFlinkStreamer to hudi-utilities-flink and keep kafka related dependeny to hudi-utilities-flink-bundle

we can split the `hudi-utilities to
hudi-utilities
├── hudi-utilities-flink
└── hudi-utilities-spark

Move HoodieFlinkStreamer to hudi-utilities-flink and keep kafka related dependeny to hudi-utilities-flink-bundle

+1

Fine, let's keep them for a time.

I do not object to deleting the legacy code. I just suggest we'd better add the Kafka connector into the bundle. And let it be a completed function. Then, we can delete the legacy code and use the new Flink streamer.

I agree the Flink streamer should bundle with a kafka jar, but the hudi-flink-bundle should not include kafka, because many people include the bundle jar in the pom directly, we should keep the jar as small as possible to avoid unnecessary jar conflicts.
Maybe we should move the streamer out of the hudi-flink module into the hudi-utilities module.

+1, it's what I mean.

Fine, let's keep them for a time.

I do not object to deleting the legacy code. I just suggest we'd better add the Kafka connector into the bundle. And let it be a completed function. Then, we can delete the legacy code and use the new Flink streamer.

I agree the Flink streamer should bundle with a kafka jar, but the hudi-flink-bundle should not include kafka, because many people include the bundle jar in the pom directly, we should keep the jar as small as possible to avoid unnecessary jar conflicts.
Maybe we should move the streamer out of the hudi-flink module into the hudi-utilities module.

+1, it's what I mean.

That's cool, we can do the move in another PR and this PR can merge first i think.

Fine, let's keep them for a time.

I do not object to deleting the legacy code. I just suggest we'd better add the Kafka connector into the bundle. And let it be a completed function. Then, we can delete the legacy code and use the new Flink streamer.

I agree the Flink streamer should bundle with a kafka jar, but the hudi-flink-bundle should not include kafka, because many people include the bundle jar in the pom directly, we should keep the jar as small as possible to avoid unnecessary jar conflicts.
Maybe we should move the streamer out of the hudi-flink module into the hudi-utilities module.

+1, it's what I mean.

That's cool, we can do the move in another PR and this PR can merge first i think.

OK, please file a ticket to track this work.

see https://issues.apache.org/jira/browse/HUDI-1872

see https://issues.apache.org/jira/browse/HUDI-1872

@MyLanPangzi Are you interested in this ticket? To continue refactoring.

see https://issues.apache.org/jira/browse/HUDI-1872

@MyLanPangzi Are you interested in this ticket? To continue refactoring.

yes, I have already made part of it in my local repo.

see https://issues.apache.org/jira/browse/HUDI-1872

@MyLanPangzi Are you interested in this ticket? To continue refactoring.

yes, I have already made part of it in my local repo.

sg. thanks~


Add ie10 support

React Popover relies on Flexbox for layout. To use Flexbox in ie10 requires not just a prefix but different properties and values (namely to display).
https://github.com/jsstyles/css-vendor does not handle this problem. Therefore we currently do not support ie10!

Related https://github.com/jsstyles/css-vendor/pull/3.


Tests don't block for results

For example test_t1_end2end and test_tphi_ramsey_end_to_end. They shouldn't depend on the simulator's speed.

Those tests are using assertExperimentDone() from #568, which contains block_for_results() and is the preferred method to block in tests.

Ok, so I'm closing.


Updated readme

Updated install instructions. Some of the stuff in Future Plans and FAQs also needs updating.

Coverage remained the same at 74.168% when pulling 57c83525a3e7deb448fb44ce857423f13bb4138c on david-puglielli:readme-update into e959679aa664670a22013eb1811e2a123d47149a on Microsoft:dev.

Coverage remained the same at 74.168% when pulling f521282a636074d4de3bb9f3e624d1488a4f0c6b on david-puglielli:readme-update into e959679aa664670a22013eb1811e2a123d47149a on Microsoft:dev.

Coverage remained the same at 74.168% when pulling f521282a636074d4de3bb9f3e624d1488a4f0c6b on david-puglielli:readme-update into e959679aa664670a22013eb1811e2a123d47149a on Microsoft:dev.

Coverage remained the same at 74.168% when pulling 9aff63ecb46b11d3d99a6799e06e7c4a5c265e24 on david-puglielli:readme-update into e959679aa664670a22013eb1811e2a123d47149a on Microsoft:dev.

Coverage remained the same at 74.168% when pulling 77522875fd325d828303f895c63d5d5edc9905fd on david-puglielli:readme-update into e959679aa664670a22013eb1811e2a123d47149a on Microsoft:dev.

Coverage decreased (-23.0%) to 51.183% when pulling a947aec0da2112c611f2c2f13262b11ae4b06444 on david-puglielli:readme-update into e959679aa664670a22013eb1811e2a123d47149a on Microsoft:dev.

Coverage decreased (-23.0%) to 51.183% when pulling a947aec0da2112c611f2c2f13262b11ae4b06444 on david-puglielli:readme-update into e959679aa664670a22013eb1811e2a123d47149a on Microsoft:dev.

Coverage decreased (-22.9%) to 51.267% when pulling 6eb1e0311fd5f8f2c6bd24d6727956f595ba12ad on david-puglielli:readme-update into e959679aa664670a22013eb1811e2a123d47149a on Microsoft:dev.


fix: set eslint config to "root" inside examples

Prevents ESlint from referencing parent config and dependencies causing linting to fail if they've not been installed.

Hey @darrylblake! Thanks for drawing my attention to an issue with our examples. The eslint configurations were not actually relying on the eslint-recommended approach to sharing configurations and were instead directly requiring files.
The method you've proposed to resolve the issues you were seeing tipped me off to that issue because it required setting root at a non-root location. Given the degree of difference between this proposed solution and the ESLint-recommended solution, I'm closing this PR in favor of #1172.
Thank you so much for an actionable error report!


check neighbors limit problem

hello. Thanks for your contribution.
I ran the train_S3DIS.py and encountered a "limit" error, and the program will be stuck in this process.
The following information is the error.
Previous calibration found:
Check batch limit dictionary
"potentials_1.200_0.030_6": ?
Check neighbors limit dictionary
"0.030_0.075": ?
"0.060_0.150": ?
"0.120_0.300": ?
"0.240_1.200": ?
"0.480_2.400": ?
Could you give me some suggestions?  Thanks!

had the same problem, I had nan in my colors in the dataset.


Coral USB issue

Hi,
I plugged my new USB Coral, when I start frigate I get the message: No EdgeTPU was detected. If you do not have a Coral device yet, you must configure CPU detectors
It doesn't seem to be able to find the USB. I am not using a VM.
Thank you.

I am not using a VM.

Meaning you flashed HA OS to a device?
What are you running on?

Yeah I am running HA OS on a NUC.

Thank you. Changing the cable worked for me.

Thank you. Changing the cable worked for me.

Glad it worked, you should be good to close this issue now


Sitemap generation for dynamic URLs limited to 1000 pages only

Details
Hi there,
I've been trialling this module (it's amazing, thank you!).
I am fetching dynamic URLs from a supabase table. I expect there to be around 6000 entries in the sitemap, but for some reason i end up with 1003 entries (1000 are dynamic, and then 3 static pages).
Here's my server/api/_sitemap-urls.ts endpoint.
import { serverSupabaseClient } from "#supabase/server";

export default defineEventHandler(async (event) => {
  const client = await serverSupabaseClient(event);

  const { data } = await client.from("posts").select("*");

  return data.map((p) => {
    return { loc: `/posts/${p.slug}`, lastmod: p.updated_at };
  });
});

I've also tried multi sitemaps, but it's simply splitting my entries into 1000 and then 3 in the next sitemap.
Does anyone know if i am hitting some internal nuxt and/or nuxt-simple-sitemap limits?
Thanks

I'm really sorry, I've been looking at this issue for 4 hours... And 5 minutes after posting this, I realised this is actually a default setting from Supabase...

By default, Supabase projects return a maximum of 1,000 rows. This setting can be changed in your project's API settings. It's recommended that you keep it low to limit the payload size of accidental or malicious requests. You can use range() queries to paginate through your data.

Good catch, glad you could fix it 🙂


Incorrect example on resource page

On this page: https://registry.terraform.io/providers/s1ntaxe770r/planetscale/latest/docs/resources/database
data "planetscale_database" "db"{
  organization = "exampleorg"
  name = "exampledb"
}

This should be:
resource "planetscale_database" "db"{
  organization = "exampleorg"
  name = "exampledb"
}

updated the docs, changes should reflect in the next release


[SimEngine] Precision, recall and f1 not updating

Sim Engine has precision, recall and f1 all zero, in certain runs. It seems to usually happen at the start of the run. I've checked the logs and the values reported are zero, so it doesn't seem to be a plotting issue. It seems to be lower-level, so assigning this to Trent.
Leaving #856 open to check after this is done.

@calina-c can you try to reproduce the error? If you can't, I guess we close this issue for now.

I can't reproduce it now, but I could reproduce it when I opened the issue. As could Roberto and yourself. It might be that the code has updated in the meantime, or an issue with the data at that particular point giving bizarre results.
I will close both this and the plot issue for now and we'll stumble into this again if not fixed.


[OCIS-storage] reading a file that a collaborator uploaded is impossible

create a folder: curl -k -u richard:superfluidity -X MKCOL https://localhost:9200/remote.php/dav/files/richard/folder1
share a folder: curl -k -u richard:superfluidity -X POST https://localhost:9200/ocs/v2.php/apps/files_sharing/api/v1/shares -d 'permissions=31&path=%2Ffolder1&shareType=0&shareWith=einstein' -H "Content-Type: application/x-www-form-urlencoded" | xmllint --format -
as receiver accept the share curl -k -u einstein:relativity -X POST https://localhost:9200/ocs/v1.php/apps/files_sharing/api/v1/shares/pending/2cb918c7-f7f7-4b3a-96d3-50b2359de165
as receiver upload a file curl -k -u einstein:relativity -XPUT -d"123" https://localhost:9200/webdav/Shares/folder1/file1.txt
as receiver download the file curl -k -u einstein:relativity -XGET https://localhost:9200/webdav/Shares/folder1/file1.txt => works
as sharer check the content of the folder curl -k -u richard:superfluidity -X PROPFIND https://localhost:9200/webdav/folder1 | xmllint --format - => file is listed
as sharer try to download the file curl -k -u richard:superfluidity -X GET https://localhost:9200/webdav/folder1/file1.txt -v => HTTP 403 Forbidden

OCIS logs:
2020-10-28T14:04:28+05:45 ERR home/artur/go/pkg/mod/github.com/cs3org/reva@v1.3.1-0.20201023144216-cdb3d6688da5/internal/grpc/services/storageprovider/storageprovider.go:505 > permission denied error="error: permission denied: 2091ff03-e325-409d-a74e-a5615067a082" pkg=rgrpc service=storage traceid=6da7e9f5ad3f9efa5b487b2a466f91c2

same when trying to overwrite such a file, the sharer gets a 403 response

as sharer trying to PROPFIND the uploaded file (curl -k -u richard:superfluidity -X PROPFIND https://localhost:9200/webdav/folder1/file1.txt -v) returns 207 Multi-Status but with an empty content

This is no longer the case with the ocis storage:

This is no longer the case with the ocis storage:


Autoscaler patch

SimpleScaler: turn on all nodes if there are pending jobs

Coverage remained the same at 33.681% when pulling 717c0c03f14c020392561213c4c22f384410e6db on Starmys:autoscaler-patch into 34fc8f600d8a040c901225606660bd1c73b54154 on microsoft:master.


feat: Support limit policy "wait"

TokenBucketRateLimiter will wait until the token is regenerated
SlidingLogRateLimiter will wait until window slides out of accessible space

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (287eaa2) 100.00% compared to head (abf1487) 100.00%.

Additional details and impacted files
@@            Coverage Diff            @@
##              main        #9   +/-   ##
=========================================
  Coverage   100.00%   100.00%
=========================================
  Files            7         7
  Lines          114       146   +32
  Branches        17        23    +6
=========================================
+ Hits           114       146   +32

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


JDK/JRE 18 support

java18 released 4 weeks ago

这是来自QQ邮箱的假期自动回复邮件。

您好，我最近正在休假中，无法亲自回复您的邮件。我将在假期结束后，尽快给您回复。

Please update to Java 18

Please !

Please!

i justed forked it into my multi-layer-dockerfile and changed the from section without difficulties:
`FROM eclipse-temurin:18-jre-jammy as tomcat_10.0.22-jre18-temurin
ENV CATALINA_HOME /usr/local/tomcat
ENV PATH $CATALINA_HOME/bin:$PATH
RUN mkdir -p "$CATALINA_HOME"
WORKDIR $CATALINA_HOME
let "Tomcat Native" live somewhere isolated
ENV TOMCAT_NATIVE_LIBDIR $CATALINA_HOME/native-jni-lib
ENV LD_LIBRARY_PATH ${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$TOMCAT_NATIVE_LIBDIR
see https://www.apache.org/dist/tomcat/tomcat-10/KEYS
see also "versions.sh" (https://github.com/docker-library/tomcat/blob/master/versions.sh)
ENV GPG_KEYS A9C5DF4D22E99998D9875A5110C01C5A2F6059E7
ENV TOMCAT_MAJOR 10
ENV TOMCAT_VERSION 10.0.22
ENV TOMCAT_SHA512 fe46db8794f066882b30e7a94bd8d3dbcf29e8e8ffaf67c1355846755745a7c9eafd124819283f218bcf410921a485b44b57b56fd6251fb99d67d95f3dd36826
COPY --from=tomcat:10.0.22-jdk17-temurin-jammy $CATALINA_HOME $CATALINA_HOME
RUN set -eux;
apt-get update;
xargs -rt apt-get install -y --no-install-recommends < "$TOMCAT_NATIVE_LIBDIR/.dependencies.txt";
rm -rf /var/lib/apt/lists/*
verify Tomcat Native is working properly
RUN set -eux;
nativeLines="$(catalina.sh configtest 2>&1)";
nativeLines="$(echo "$nativeLines" | grep 'Apache Tomcat Native')";
nativeLines="$(echo "$nativeLines" | sort -u)";
if ! echo "$nativeLines" | grep -E 'INFO: Loaded( APR based)? Apache Tomcat Native library' >&2; then
echo >&2 "$nativeLines";
exit 1;
fi
EXPOSE 8080
CMD ["catalina.sh", "run"]
`

Linking to the very relevant https://github.com/docker-library/tomcat/pull/248#issuecomment-1329908153 (sorry for not typing this up sooner :bow:).
See also https://github.com/docker-library/tomcat/pull/275#issuecomment-1235938409

Thanks for the push (and for the implementation suggestions!! :bow: :heart:); I'm going to close this now in order to consolidate into https://github.com/docker-library/tomcat/pull/299 :sweat_smile:


Add Italian translations

Hi,
I added the Italian translations.

@ciarlystreet we already have this other PR (#136) for italian translations.
Do you mind help us to review that PR?


Handle API errors in script_status

When an API error is returned, https://github.com/cloudflare/wrangler/blob/921c626bb0a0a611ac7d6fb01fe0296d79f3bcca/src/user/account.rs#L27 doesn't handle it properly.
For example here's the API response: {"success":false,"errors":[{"code":10000,"message":"Authentication error"}]}, I would suggest adding into account the success field.

because we are doing multiscript for all #72 has removed all checking of "script status" so this is resovled.


Misc. issues 10/10/2021

[x] #1118
Most likely an onCardBountyAdded vs onCardBountyChanged issue

[ ] After using Quick-draw handgun, the original cheater can now punish the freshly-cheatin hand.

[x] #1119

The Quickdraw handgun allowing to play cheatin against swapped hand was conscious decision. The client does not strictly forbid everything, that would be too much and difficult to implement. There are still rules that player should follow (even though client allows it) and it is specifically written on the card, so I decided not to implement the restriction. If anyone wants, feel free but since this is will be legacy, I am not going to.


Pass scalprum api on mount

wait for #19
closes #22
Changes

removed unnecessary mount call from initializing the app

this has to be done by the scaffolding app
calling directly in initialize app achieves nothing

pass an API object as an argument to the mount function

passes the whole scalprum object (we may choose to restrict the access later on; we probably don't want apps to have access to other app mounts/unmount methods)
object can be extended with custom values

Codecov Report

Merging #23 into main will increase coverage by 4.34%.
The diff coverage is 83.33%.

@@            Coverage Diff             @@
##             main      #23      +/-   ##
==========================================
+ Coverage   53.26%   57.60%   +4.34%
==========================================
  Files           5        5
  Lines          92       92
  Branches       13       13
==========================================
+ Hits           49       53       +4
+ Misses         43       39       -4

Impacted Files
Coverage Δ

packages/core/src/index.ts
84.84% <83.33%> (+12.12%)
:arrow_up:

Continue to review full report at Codecov.

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


There's always 1 active window per display

I've tried using borders (RIP) and opacity to distinguish the currently active window, but I've always noticed a strange issue. It seems that there's always 1 active window per display. That is, if I have active_window_opacity set to 1.0, and normal_window_opacity set to 0.8, every monitor has a non-translucent window. This makes it difficult to tell which monitor has focus. Is there a way to enable a "global" active window?

I just added the following to my ~/.yabairc to get this working.
yabai -m signal --add event=application_front_switched action="yabai -m window recent --opacity 0.8; yabai -m window --opacity 0.0"

I have 4 monitors, and only the currently active window is at full opacity.  The others are at 0.8.

ohhh great tip, thanks!!


fix(curriculum): updated address class

Checklist:

[x] I have read and followed the contribution guidelines.
[ ] I have read and followed the how to open a pull request guide.
[x] My pull request targets the main branch of freeCodeCamp.
[x] I have tested these changes either locally on my machine, or GitPod.

Closes #49595

+ font-size: 11px;
+ font-style: italic;
+ margin-bottom: 0px;
-  margin-bottom: 5px;

Hey @midikaif,
Please update the pull-request title according to our contributing guide lines

@Sembauke, is this title okay?

Hi @midikaif, thank you for opening the pull request, I am closing this because:

The issue isn't about changing the CSS properties, unless you have linked the wrong issue.
There is a PR that solves that issue https://github.com/freeCodeCamp/freeCodeCamp/pull/49597

Happy coding.


Target electron-renderer should have browser in resolve.mainFields

Do you want to request a feature or report a bug?
Bug

What is the current behavior?
When using target: 'electron-renderer', it doesn't use the browser version of dependencies with a browser field in their package.json.
If the current behavior is a bug, please provide the steps to reproduce.

What is the expected behavior?
A renderer process in Electron is just a browser, so it makes sense for it to get browser versions of dependencies, like the web target. So when electron-renderer is specified as target, it mainFields: ["browser", "module", "main"] should be set.
https://webpack.js.org/configuration/resolve/#resolve-mainfields
If this is a feature request, what is motivation or use case for changing the behavior?
Please mention other relevant information such as the browser version, Node.js version, webpack version, and Operating System.
Webpack 4.1.1

Send a PR


subtitles to the main screen in nds encodes

Remove the updated date line entirely, doesn't make sense anymore. Never got around to remove it myself.
Also, it's better to separate different unrelated tweaks into different PRs.


Update to go 1.9.2

Required for all non-trivial PRs

[ ] Rebased/mergable
[ ] Tests pass
[ ] CHANGELOG.md updated
[ ] Sign CLA (if not already signed)

Updates to go1.9.2

@jwilder my only suggestion would be we switch out the 1.9 test runner for a 1.10 one. The 1.10 branch is open. I assume Circle doesn't fail the build if the testing-future-go-version runner fails does it?

There's a couple other mentions of Go versions that need to be updated. I'm locating those now and I'll drop them in here.

@e-dard It does fail the build.

@jwilder there's some go 1.8.4 occurrences in CONTRIBUTING.md that need updated, then I think this PR is good to go.

@mark-rushakoff Fixed

@jwilder dang. I guess we should probably hold the 1.10 runner off until the branch is a bit more stable.


Fix prefer-explicit-assert raising error on destructuring statement

Closes #40.
I've added a check for Array destructuring. I've never seen it before, but I thought it wouldn't hurt.
Thanks for your help!

Any estimates on when this will be merged? Great work regardless! 👍

Any estimates on when this will be merged? Great work regardless! 👍

AFAICT it's ok from my side, let's see if Thomas can take a look :)

:tada: This PR is included in version 1.3.2 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:

Thank you for guiding me through!

@all-contributors please add @afontcu  for code and test.


Tag and Publish v0.13.0-rc1?

Can 3ddd13a be tagged as v0.13.0-rc1 and be published on bower? Thanks ;)

Done. I always forget git push --tags :(

It often happens to me too :(
BTW, upgraded to v0.13.0-rc2, thanks a lot! :)