python /home/admin/mtr/script_for_cron.py -j datou_current3 -m 20 -a ' -a 4302 -v ' -s datou_current_4302 -M 0 -S 0 -U 95,95,120 import MySQLdb succeeded Import error (python version) ['/Users/moilerat/Documents/Fotonower/install/caffe/distribute/python', '/home/admin/workarea/git/Velours/python/prod', '/home/admin/workarea/install/caffe_cuda8_python3/python', '/home/admin/workarea/install/darknet', '/home/admin/workarea/git/Velours/python', '/home/admin/workarea/install/caffe_frcnn_python3/py-faster-rcnn/caffe-fast-rcnn/python', '/home/admin/mtr/.credentials', '/home/admin/workarea/install/caffe/python', '/home/admin/workarea/install/caffe_frcnn/py-faster-rcnn/tools', '/home/admin/workarea/git/fotonowerpip', '/home/admin/workarea/install/segment-anything', '/home/admin/workarea/git/pyfvs', '/usr/lib/python38.zip', '/usr/lib/python3.8', '/usr/lib/python3.8/lib-dynload', '/home/admin/.local/lib/python3.8/site-packages', '/usr/local/lib/python3.8/dist-packages', '/usr/lib/python3/dist-packages'] Namespace(auto=False, cert_args='/home/fotonower/https/cert.pem', contextDataFile='', custom_size=0, database='', datou_id='4302', datou_id_excluded='', fifo=False, host='', is_cpu_mode=False, job='batch_current', json_args='', key_args='/home/fotonower/https/vision.fotonower.com.key', limit=1000, list_photo_ids='', local='', mtr_current_id=0, mtr_portfolio_ids='', nb_thread=1, no_current=False, offset=0, only_client=False, output_file='', password='', port=5100, rand=0, save=2, use_client=False, user_id=440, username='', verbose=True) process id : 2733776 load datou : 4302 # VR 17-11-17 : to create in DB ! Here we check the datou graph and we reorder steps ! Tree builded and cycle checked, now we need to re-order the steps ! We have currenlty an error because there is no dependence between the last step for the case tile - detect - glue We can either keep the depence of, it is better to keep an order compatible with the id of steps if we do not have sons, so a lexical order : (number_son, step_id) All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! DONE and to test : checkNoCycle ! Here we check the consistency of inputs/outputs number between the given ones and the db ! eke 1-6-18 : checkConsistencyNbInputNbOutput should be processed after step reordering ! WARNING : number of outputs for step 13596 ventilate_hashtags_in_portfolio is not consistent : 2 used against 1 in the step definition ! Step 11881 final have less inputs used (1) than in the step definition (3) : maybe we manage optionnal inputs ! Step 11881 final have less outputs used (1) than in the step definition (2) : some outputs may be not used ! WARNING : number of outputs for step 13625 velours_tree is not consistent : 2 used against 1 in the step definition ! Step 11884 send_mail_cod have less inputs used (3) than in the step definition (5) : maybe we manage optionnal inputs ! Number of inputs / outputs for each step checked ! Here we check the consistency of outputs/inputs types during steps connections eke 1-6-18 : checkConsistencyTypeOutputInput should be processed after checkConsistencyNbInputNbOutput ! We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 3 of step 11884 have datatype=6 WARNING : type of output 1 of step 13596 doesn't seem to be define in the database( WARNING : type of input 3 of step 11881 doesn't seem to be define in the database( We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 0 of step 13625 have datatype=18 WARNING : type of output 1 of step 13625 doesn't seem to be define in the database( WARNING : type of input 5 of step 11884 doesn't seem to be define in the database( DataTypes for each output/input checked ! Unexpected type seems boolean for variable list_input_json ERROR or WARNING : can't parse json string Expecting value: line 1 column 1 (char 0) Tried to parse : None was removed should we ? donnée sous forme de texte was removed should we ? (photo_id, hashtag_id, score_max) was removed should we ? id de la photo (peut être local ou global) was removed should we ? donnée sous forme de texte was removed should we ? donnée sous forme de texte was removed should we ? donnée sous forme de texte was removed should we ? None was removed should we ? donnée sous forme de nombre was removed should we ? (photo_id, hashtag_id, score_max) was removed should we ? (photo_id, hashtag_id, score_max) was removed should we ? (photo_id, hashtag_id, score_max) was removed should we ? (photo_id, hashtag_id, score_max) was removed should we ? (photo_id, hashtag_id, score_max) was removed should we ? donnée sous forme de texte was removed should we ? None was removed should we ? donnée sous forme de texte was removed should we ? [ptf_id0,ptf_id1...] was removed should we ? load thcls load pdts Running datou job : batch_current 4302 [] TODO datou_current to load to do maybe to take outside batchDatouExec SELECT * from MTRPhoto.mtr_datou_current where state = 0 AND mtr_portfolio_id is not NULL AND mtd_id = 4302 order by created_at desc LIMIT 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (3239352) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (3239352) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24630878 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['3239352'] with mtr_portfolio_ids : ['24630878'] and first list_photo_ids : [] new path : /proc/2733776/ Name: python3 Umask: 0002 State: R (running) Tgid: 2733776 Ngid: 0 Pid: 2733776 PPid: 2733775 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 2733776 NSpid: 2733776 NSpgid: 2732203 NSsid: 2732203 VmPeak: 1106868 kB VmSize: 1106868 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 98828 kB VmRSS: 98828 kB RssAnon: 59800 kB RssFile: 39028 kB RssShmem: 0 kB VmData: 865620 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 612 kB VmSwap: 0 kB HugetlbPages: 0 kB CoreDumping: 0 THP_enabled: 1 Threads: 1 SigQ: 6/63019 SigPnd: 0000000000000000 ShdPnd: 0000000000000000 SigBlk: 0000000000000000 SigIgn: 0000000001001000 SigCgt: 0000000180000002 CapInh: 0000000000000000 CapPrm: 0000000000000000 CapEff: 0000000000000000 CapBnd: 000001ffffffffff CapAmb: 0000000000000000 NoNewPrivs: 0 Seccomp: 0 Seccomp_filters: 0 Speculation_Store_Bypass: thread vulnerable SpeculationIndirectBranch: conditional enabled Cpus_allowed: ffffffff,ffffffff,ffffffff,ffffffff Cpus_allowed_list: 0-127 Mems_allowed: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001 Mems_allowed_list: 0 voluntary_ctxt_switches: 42 nonvoluntary_ctxt_switches: 87 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '2733776', 'Ngid': '0', 'Pid': '2733776', 'PPid': '2733775', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '2733776', 'NSpid': '2733776', 'NSpgid': '2732203', 'NSsid': '2732203', 'VmPeak': '1106868 kB', 'VmSize': '1106868 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '98828 kB', 'VmRSS': '98828 kB', 'RssAnon': '59800 kB', 'RssFile': '39028 kB', 'RssShmem': '0 kB', 'VmData': '865620 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '612 kB', 'VmSwap': '0 kB', 'HugetlbPages': '0 kB', 'CoreDumping': '0', 'THP_enabled': '1', 'Threads': '1', 'SigQ': '6/63019', 'SigPnd': '0000000000000000', 'ShdPnd': '0000000000000000', 'SigBlk': '0000000000000000', 'SigIgn': '0000000001001000', 'SigCgt': '0000000180000002', 'CapInh': '0000000000000000', 'CapPrm': '0000000000000000', 'CapEff': '0000000000000000', 'CapBnd': '000001ffffffffff', 'CapAmb': '0000000000000000', 'NoNewPrivs': '0', 'Seccomp': '0', 'Seccomp_filters': '0', 'Speculation_Store_Bypass': 'thread vulnerable', 'SpeculationIndirectBranch': 'conditional enabled', 'Cpus_allowed': 'ffffffff,ffffffff,ffffffff,ffffffff', 'Cpus_allowed_list': '0-127', 'Mems_allowed': '00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001', 'Mems_allowed_list': '0', 'voluntary_ctxt_switches': '42', 'nonvoluntary_ctxt_switches': '87'} ('datou_batch_current', '2733776', '1106868', '0', '1106868', '865620', '98828', b'', 'marlene', '3239352') insert ignore into MTRAdmin.mem_info (script_name, PID, VMpeak,VMswap,VMsize,VMdata,VMrss,GPU_ram, hostname, mtr_current_id) VALUES (%s,%s,%s,%s,%s,%s,%s,%s,%s,%s) Inside batchDatouExec : verbose : True ##### chargement datou SELECT name, created_at,limit_max FROM MTRDatou.mtr_datou WHERE id=4302 SELECT mtd.id, mtdt.`type`, mtd.`param`, mtd.param_json, mtdt.nb_input, mtdt.nb_output, mtdt.prod, mtdt.is_local, mtdt.is_datou_depend, mtdt.is_photo_id_local FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_step_types mtdt WHERE mtdt.`id`=mtd.`type` AND mtd.mtd_id=4302 SELECT mtd.id, mtd.mtd_id, mdsdt.id, mdsdt.name, mdsdt.description, msid.output_or_input, msid.data_order_id, mdsdt.type FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_steptype_io_datatypes msid, MTRDatou.mtr_datou_step_data_types mdsdt WHERE mtd.`type`=msid.`mtr_datou_step_type` AND mtd.mtd_id= 4302 AND msid.data_type=mdsdt.id SELECT mts_id_output, id_output, mts_id_input, id_input FROM MTRDatou.mtr_datou_step_by_step WHERE mtd_id=4302 # VR 17-11-17 : to create in DB ! Here we check the datou graph and we reorder steps ! Tree builded and cycle checked, now we need to re-order the steps ! We have currenlty an error because there is no dependence between the last step for the case tile - detect - glue We can either keep the depence of, it is better to keep an order compatible with the id of steps if we do not have sons, so a lexical order : (number_son, step_id) All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! DONE and to test : checkNoCycle ! Here we check the consistency of inputs/outputs number between the given ones and the db ! eke 1-6-18 : checkConsistencyNbInputNbOutput should be processed after step reordering ! WARNING : number of outputs for step 13596 ventilate_hashtags_in_portfolio is not consistent : 2 used against 1 in the step definition ! Step 11881 final have less inputs used (1) than in the step definition (3) : maybe we manage optionnal inputs ! Step 11881 final have less outputs used (1) than in the step definition (2) : some outputs may be not used ! WARNING : number of outputs for step 13625 velours_tree is not consistent : 2 used against 1 in the step definition ! Step 11884 send_mail_cod have less inputs used (3) than in the step definition (5) : maybe we manage optionnal inputs ! Number of inputs / outputs for each step checked ! Here we check the consistency of outputs/inputs types during steps connections eke 1-6-18 : checkConsistencyTypeOutputInput should be processed after checkConsistencyNbInputNbOutput ! We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 3 of step 11884 have datatype=6 WARNING : type of output 1 of step 13596 doesn't seem to be define in the database( WARNING : type of input 3 of step 11881 doesn't seem to be define in the database( We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 0 of step 13625 have datatype=18 WARNING : type of output 1 of step 13625 doesn't seem to be define in the database( WARNING : type of input 5 of step 11884 doesn't seem to be define in the database( DataTypes for each output/input checked ! no param json to modify List Step Type Loaded in datou : ventilate_hashtags_in_portfolio, final, velours_tree, send_mail_cod, split_time_score over limit max, limiting to limit_max 200 list_input_json : [] ##### fin chargement datou ##### chargement data ##### Call load_data_input : nb_thread : 1 origin SELECT ph.photo_id, ph.url FROM MTRBack.photos ph WHERE ph.photo_id IN (SELECT mtr_photo_id from MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id in (24630878) and hide_status = 0 ) AND ph.photo_id not in (SELECT mtr_photo_id from MTRPhoto.mtr_datou_result_search where mtr_current_id in (3239352 ) ) ORDER BY ph.photo_id DESC LIMIT 0, 200 We have 1 , {} SELECT mtr_photo_id, mtr_portfolio_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id in (24630878) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1370720254, 'portfolio_id': 24630878}, {'photo_id': 1370720252, 'portfolio_id': 24630878}, {'photo_id': 1370720240, 'portfolio_id': 24630878}, {'photo_id': 1370720239, 'portfolio_id': 24630878}, {'photo_id': 1370720237, 'portfolio_id': 24630878}, {'photo_id': 1370720228, 'portfolio_id': 24630878}, {'photo_id': 1370720209, 'portfolio_id': 24630878}, {'photo_id': 1370720207, 'portfolio_id': 24630878}, {'photo_id': 1370720205, 'portfolio_id': 24630878}, {'photo_id': 1370720196, 'portfolio_id': 24630878}, {'photo_id': 1370720192, 'portfolio_id': 24630878}, {'photo_id': 1370720190, 'portfolio_id': 24630878}, {'photo_id': 1370720156, 'portfolio_id': 24630878}, {'photo_id': 1370720154, 'portfolio_id': 24630878}, {'photo_id': 1370720152, 'portfolio_id': 24630878}, {'photo_id': 1370720150, 'portfolio_id': 24630878}, {'photo_id': 1370720148, 'portfolio_id': 24630878}, {'photo_id': 1370720145, 'portfolio_id': 24630878}] map_portfolio_id_photo_id: {24630878: [1370720254, 1370720252, 1370720240, 1370720239, 1370720237, 1370720228, 1370720209, 1370720207, 1370720205, 1370720196, 1370720192, 1370720190, 1370720156, 1370720154, 1370720152, 1370720150, 1370720148, 1370720145]} ##### Call download_photos : nb_thread : 1 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos ##### After load_data_input time to download the photos : 0.01380610466003418 #### fin chargement data Blocking on flush ? No conitnuing About to test input to load Calling datou_exec Inside datou_exec : verbose : True number of steps : 5 step1:ventilate_hashtags_in_portfolio Sat Jul 5 01:34:57 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (24630878) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {} map_subphoto_mainphoto : {} beginning of datou step ventilate_hashtags_in_portfolio : To implement ! To do loadFromThcl(), then load ParamDescType : thcl2725 get_desc_type_from_thcl : type of cat SELECT id, mtr_user_id, name, pb_hashtag_id, hashtag_id_list, button_legend_list, portfolio_id_lists, photo_hashtag_type, photo_desc_type, svm_limit, limit_tagging, is_public, live, created_at, updated_at, type_classification FROM MTRDatou.classification_theme WHERE `id` IN (2725) thcls : [{'id': 2725, 'mtr_user_id': 31, 'name': 'learn_qualipapia_rle_210302_2', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': 'Carton_brun,Carton_gris,Teint_Dans_La_Masse,autre_refus,cartonnette,environnement,kraft,metal,papier,plastique', 'svm_portfolios_learning': '3460440,3460441,3460446,3460434,3460439,3467416,3460442,3460443,3486028,3460445', 'photo_hashtag_type': 3410, 'photo_desc_type': 5186, 'type_classification': 'caffe', 'hashtag_id_list': '2107753024,2107753020,2107752385,2107752406,702398920,493012381,493202403,492628673,492668766,492725882'}] thcl {'id': 2725, 'mtr_user_id': 31, 'name': 'learn_qualipapia_rle_210302_2', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': 'Carton_brun,Carton_gris,Teint_Dans_La_Masse,autre_refus,cartonnette,environnement,kraft,metal,papier,plastique', 'svm_portfolios_learning': '3460440,3460441,3460446,3460434,3460439,3467416,3460442,3460443,3486028,3460445', 'photo_hashtag_type': 3410, 'photo_desc_type': 5186, 'type_classification': 'caffe', 'hashtag_id_list': '2107753024,2107753020,2107752385,2107752406,702398920,493012381,493202403,492628673,492668766,492725882'} Update svm_hashtag_type_desc : 5186 remove imagettes from duplicated photo Iterating over portfolio : 24630878 get user id for portfolio 24630878 get sub ptf for main ptf 24630878, type 3726 and hashtags ['metal', 'environnement', 'kraft', 'Teint_Dans_La_Masse', 'mal_croppe', 'Carton_gris', 'Carton_brun', 'autre_refus', 'flou', 'cartonnette', 'plastique', 'papier'] SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=24630878 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('metal','environnement','kraft','Teint_Dans_La_Masse','mal_croppe','Carton_gris','Carton_brun','autre_refus','flou','cartonnette','plastique','papier')) AND mptpi.`min_score`=0.5 SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=24630878 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('metal','environnement','kraft','Teint_Dans_La_Masse','mal_croppe','Carton_gris','Carton_brun','autre_refus','flou','cartonnette','plastique','papier')) AND mptpi.`min_score`=0.5 To do returned map {'autre_refus': {'main_port_id': 24630878, 'sub_port_id': 24630883, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16553664, 'last_updated_at': datetime.datetime(2025, 7, 5, 1, 33, 33), 'last_updated_at_desc': datetime.datetime(2025, 7, 5, 1, 33, 33), 'last_updated_at_asc': datetime.datetime(2025, 7, 5, 1, 33, 28)}, 'plastique': {'main_port_id': 24630878, 'sub_port_id': 24630884, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16553665, 'last_updated_at': datetime.datetime(2025, 7, 5, 1, 33, 33), 'last_updated_at_desc': datetime.datetime(2025, 7, 5, 1, 33, 33), 'last_updated_at_asc': datetime.datetime(2025, 7, 5, 1, 33, 28)}, 'Carton_gris': {'main_port_id': 24630878, 'sub_port_id': 24630885, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16553666, 'last_updated_at': datetime.datetime(2025, 7, 5, 1, 33, 33), 'last_updated_at_desc': datetime.datetime(2025, 7, 5, 1, 33, 33), 'last_updated_at_asc': datetime.datetime(2025, 7, 5, 1, 33, 28)}, 'flou': {'main_port_id': 24630878, 'sub_port_id': 24630886, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16553667, 'last_updated_at': datetime.datetime(2025, 7, 5, 1, 33, 33), 'last_updated_at_desc': datetime.datetime(2025, 7, 5, 1, 33, 33), 'last_updated_at_asc': datetime.datetime(2025, 7, 5, 1, 33, 28)}, 'Carton_brun': {'main_port_id': 24630878, 'sub_port_id': 24630887, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16553668, 'last_updated_at': datetime.datetime(2025, 7, 5, 1, 33, 33), 'last_updated_at_desc': datetime.datetime(2025, 7, 5, 1, 33, 33), 'last_updated_at_asc': datetime.datetime(2025, 7, 5, 1, 33, 28)}, 'kraft': {'main_port_id': 24630878, 'sub_port_id': 24630888, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16553669, 'last_updated_at': datetime.datetime(2025, 7, 5, 1, 33, 33), 'last_updated_at_desc': datetime.datetime(2025, 7, 5, 1, 33, 33), 'last_updated_at_asc': datetime.datetime(2025, 7, 5, 1, 33, 28)}, 'environnement': {'main_port_id': 24630878, 'sub_port_id': 24630889, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16553670, 'last_updated_at': datetime.datetime(2025, 7, 5, 1, 33, 33), 'last_updated_at_desc': datetime.datetime(2025, 7, 5, 1, 33, 33), 'last_updated_at_asc': datetime.datetime(2025, 7, 5, 1, 33, 28)}, 'metal': {'main_port_id': 24630878, 'sub_port_id': 24630890, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16553671, 'last_updated_at': datetime.datetime(2025, 7, 5, 1, 33, 33), 'last_updated_at_desc': datetime.datetime(2025, 7, 5, 1, 33, 33), 'last_updated_at_asc': datetime.datetime(2025, 7, 5, 1, 33, 28)}, 'Teint_Dans_La_Masse': {'main_port_id': 24630878, 'sub_port_id': 24630891, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16553672, 'last_updated_at': datetime.datetime(2025, 7, 5, 1, 33, 33), 'last_updated_at_desc': datetime.datetime(2025, 7, 5, 1, 33, 33), 'last_updated_at_asc': datetime.datetime(2025, 7, 5, 1, 33, 28)}, 'papier': {'main_port_id': 24630878, 'sub_port_id': 24630892, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16553673, 'last_updated_at': datetime.datetime(2025, 7, 5, 1, 33, 33), 'last_updated_at_desc': datetime.datetime(2025, 7, 5, 1, 33, 33), 'last_updated_at_asc': datetime.datetime(2025, 7, 5, 1, 33, 28)}, 'cartonnette': {'main_port_id': 24630878, 'sub_port_id': 24630893, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16553674, 'last_updated_at': datetime.datetime(2025, 7, 5, 1, 33, 33), 'last_updated_at_desc': datetime.datetime(2025, 7, 5, 1, 33, 33), 'last_updated_at_asc': datetime.datetime(2025, 7, 5, 1, 33, 28)}, 'mal_croppe': {'main_port_id': 24630878, 'sub_port_id': 24630894, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16553675, 'last_updated_at': datetime.datetime(2025, 7, 5, 1, 33, 33), 'last_updated_at_desc': datetime.datetime(2025, 7, 5, 1, 33, 33), 'last_updated_at_asc': datetime.datetime(2025, 7, 5, 1, 33, 28)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 24630883 , sub_photo_id, 979,now() FROM (SELECT csp.sub_photo_id, csp.crop_hashtag_id, csp.created_at FROM MTRPhoto.crop_sub_photo_ids csp, MTRPhoto.crop_hashtag_ids chi, MTRBack.hashtags h, MTRUser.mtr_portfolio_photos mpp WHERE mpp.mtr_portfolio_id=24630878 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='autre_refus' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24630883) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24630878) result : ((1370720145,), (1370720148,), (1370720150,), (1370720152,), (1370720154,), (1370720156,), (1370720190,), (1370720192,), (1370720196,), (1370720205,), (1370720207,), (1370720209,), (1370720228,), (1370720237,), (1370720239,), (1370720240,), (1370720252,), (1370720254,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 24630884 , sub_photo_id, 979,now() FROM (SELECT csp.sub_photo_id, csp.crop_hashtag_id, csp.created_at FROM MTRPhoto.crop_sub_photo_ids csp, MTRPhoto.crop_hashtag_ids chi, MTRBack.hashtags h, MTRUser.mtr_portfolio_photos mpp WHERE mpp.mtr_portfolio_id=24630878 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='plastique' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24630884) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24630878) result : ((1370720145,), (1370720148,), (1370720150,), (1370720152,), (1370720154,), (1370720156,), (1370720190,), (1370720192,), (1370720196,), (1370720205,), (1370720207,), (1370720209,), (1370720228,), (1370720237,), (1370720239,), (1370720240,), (1370720252,), (1370720254,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 24630885 , sub_photo_id, 979,now() FROM (SELECT csp.sub_photo_id, csp.crop_hashtag_id, csp.created_at FROM MTRPhoto.crop_sub_photo_ids csp, MTRPhoto.crop_hashtag_ids chi, MTRBack.hashtags h, MTRUser.mtr_portfolio_photos mpp WHERE mpp.mtr_portfolio_id=24630878 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='Carton_gris' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24630885) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24630878) result : ((1370720145,), (1370720148,), (1370720150,), (1370720152,), (1370720154,), (1370720156,), (1370720190,), (1370720192,), (1370720196,), (1370720205,), (1370720207,), (1370720209,), (1370720228,), (1370720237,), (1370720239,), (1370720240,), (1370720252,), (1370720254,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 24630886 , sub_photo_id, 979,now() FROM (SELECT csp.sub_photo_id, csp.crop_hashtag_id, csp.created_at FROM MTRPhoto.crop_sub_photo_ids csp, MTRPhoto.crop_hashtag_ids chi, MTRBack.hashtags h, MTRUser.mtr_portfolio_photos mpp WHERE mpp.mtr_portfolio_id=24630878 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='flou' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24630886) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24630878) result : ((1370720145,), (1370720148,), (1370720150,), (1370720152,), (1370720154,), (1370720156,), (1370720190,), (1370720192,), (1370720196,), (1370720205,), (1370720207,), (1370720209,), (1370720228,), (1370720237,), (1370720239,), (1370720240,), (1370720252,), (1370720254,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 24630887 , sub_photo_id, 979,now() FROM (SELECT csp.sub_photo_id, csp.crop_hashtag_id, csp.created_at FROM MTRPhoto.crop_sub_photo_ids csp, MTRPhoto.crop_hashtag_ids chi, MTRBack.hashtags h, MTRUser.mtr_portfolio_photos mpp WHERE mpp.mtr_portfolio_id=24630878 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='Carton_brun' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24630887) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24630878) result : ((1370720145,), (1370720148,), (1370720150,), (1370720152,), (1370720154,), (1370720156,), (1370720190,), (1370720192,), (1370720196,), (1370720205,), (1370720207,), (1370720209,), (1370720228,), (1370720237,), (1370720239,), (1370720240,), (1370720252,), (1370720254,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 24630888 , sub_photo_id, 979,now() FROM (SELECT csp.sub_photo_id, csp.crop_hashtag_id, csp.created_at FROM MTRPhoto.crop_sub_photo_ids csp, MTRPhoto.crop_hashtag_ids chi, MTRBack.hashtags h, MTRUser.mtr_portfolio_photos mpp WHERE mpp.mtr_portfolio_id=24630878 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='kraft' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24630888) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24630878) result : ((1370720145,), (1370720148,), (1370720150,), (1370720152,), (1370720154,), (1370720156,), (1370720190,), (1370720192,), (1370720196,), (1370720205,), (1370720207,), (1370720209,), (1370720228,), (1370720237,), (1370720239,), (1370720240,), (1370720252,), (1370720254,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 24630889 , sub_photo_id, 979,now() FROM (SELECT csp.sub_photo_id, csp.crop_hashtag_id, csp.created_at FROM MTRPhoto.crop_sub_photo_ids csp, MTRPhoto.crop_hashtag_ids chi, MTRBack.hashtags h, MTRUser.mtr_portfolio_photos mpp WHERE mpp.mtr_portfolio_id=24630878 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='environnement' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24630889) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24630878) result : ((1370720145,), (1370720148,), (1370720150,), (1370720152,), (1370720154,), (1370720156,), (1370720190,), (1370720192,), (1370720196,), (1370720205,), (1370720207,), (1370720209,), (1370720228,), (1370720237,), (1370720239,), (1370720240,), (1370720252,), (1370720254,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 24630890 , sub_photo_id, 979,now() FROM (SELECT csp.sub_photo_id, csp.crop_hashtag_id, csp.created_at FROM MTRPhoto.crop_sub_photo_ids csp, MTRPhoto.crop_hashtag_ids chi, MTRBack.hashtags h, MTRUser.mtr_portfolio_photos mpp WHERE mpp.mtr_portfolio_id=24630878 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='metal' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24630890) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24630878) result : ((1370720145,), (1370720148,), (1370720150,), (1370720152,), (1370720154,), (1370720156,), (1370720190,), (1370720192,), (1370720196,), (1370720205,), (1370720207,), (1370720209,), (1370720228,), (1370720237,), (1370720239,), (1370720240,), (1370720252,), (1370720254,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 24630891 , sub_photo_id, 979,now() FROM (SELECT csp.sub_photo_id, csp.crop_hashtag_id, csp.created_at FROM MTRPhoto.crop_sub_photo_ids csp, MTRPhoto.crop_hashtag_ids chi, MTRBack.hashtags h, MTRUser.mtr_portfolio_photos mpp WHERE mpp.mtr_portfolio_id=24630878 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='Teint_Dans_La_Masse' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24630891) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24630878) result : ((1370720145,), (1370720148,), (1370720150,), (1370720152,), (1370720154,), (1370720156,), (1370720190,), (1370720192,), (1370720196,), (1370720205,), (1370720207,), (1370720209,), (1370720228,), (1370720237,), (1370720239,), (1370720240,), (1370720252,), (1370720254,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 24630892 , sub_photo_id, 979,now() FROM (SELECT csp.sub_photo_id, csp.crop_hashtag_id, csp.created_at FROM MTRPhoto.crop_sub_photo_ids csp, MTRPhoto.crop_hashtag_ids chi, MTRBack.hashtags h, MTRUser.mtr_portfolio_photos mpp WHERE mpp.mtr_portfolio_id=24630878 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='papier' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24630892) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24630878) result : ((1370720145,), (1370720148,), (1370720150,), (1370720152,), (1370720154,), (1370720156,), (1370720190,), (1370720192,), (1370720196,), (1370720205,), (1370720207,), (1370720209,), (1370720228,), (1370720237,), (1370720239,), (1370720240,), (1370720252,), (1370720254,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 24630893 , sub_photo_id, 979,now() FROM (SELECT csp.sub_photo_id, csp.crop_hashtag_id, csp.created_at FROM MTRPhoto.crop_sub_photo_ids csp, MTRPhoto.crop_hashtag_ids chi, MTRBack.hashtags h, MTRUser.mtr_portfolio_photos mpp WHERE mpp.mtr_portfolio_id=24630878 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='cartonnette' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24630893) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24630878) result : ((1370720145,), (1370720148,), (1370720150,), (1370720152,), (1370720154,), (1370720156,), (1370720190,), (1370720192,), (1370720196,), (1370720205,), (1370720207,), (1370720209,), (1370720228,), (1370720237,), (1370720239,), (1370720240,), (1370720252,), (1370720254,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 24630894 , sub_photo_id, 979,now() FROM (SELECT csp.sub_photo_id, csp.crop_hashtag_id, csp.created_at FROM MTRPhoto.crop_sub_photo_ids csp, MTRPhoto.crop_hashtag_ids chi, MTRBack.hashtags h, MTRUser.mtr_portfolio_photos mpp WHERE mpp.mtr_portfolio_id=24630878 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='mal_croppe' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24630894) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24630878) result : ((1370720145,), (1370720148,), (1370720150,), (1370720152,), (1370720154,), (1370720156,), (1370720190,), (1370720192,), (1370720196,), (1370720205,), (1370720207,), (1370720209,), (1370720228,), (1370720237,), (1370720239,), (1370720240,), (1370720252,), (1370720254,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") To do ! Use context local managing function ! SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=24630878 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('metal','environnement','kraft','Teint_Dans_La_Masse','mal_croppe','Carton_gris','Carton_brun','autre_refus','flou','cartonnette','plastique','papier')) AND mptpi.`min_score`=0.5 SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=24630878 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('metal','environnement','kraft','Teint_Dans_La_Masse','mal_croppe','Carton_gris','Carton_brun','autre_refus','flou','cartonnette','plastique','papier')) AND mptpi.`min_score`=0.5 To do returned map {'autre_refus': {'main_port_id': 24630878, 'sub_port_id': 24630895, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16553676, 'last_updated_at': datetime.datetime(2025, 7, 5, 1, 33, 34), 'last_updated_at_desc': datetime.datetime(2025, 7, 5, 1, 33, 34), 'last_updated_at_asc': datetime.datetime(2025, 7, 5, 1, 33, 34)}, 'plastique': {'main_port_id': 24630878, 'sub_port_id': 24630896, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16553677, 'last_updated_at': datetime.datetime(2025, 7, 5, 1, 33, 34), 'last_updated_at_desc': datetime.datetime(2025, 7, 5, 1, 33, 34), 'last_updated_at_asc': datetime.datetime(2025, 7, 5, 1, 33, 34)}, 'Carton_gris': {'main_port_id': 24630878, 'sub_port_id': 24630897, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16553678, 'last_updated_at': datetime.datetime(2025, 7, 5, 1, 33, 34), 'last_updated_at_desc': datetime.datetime(2025, 7, 5, 1, 33, 34), 'last_updated_at_asc': datetime.datetime(2025, 7, 5, 1, 33, 34)}, 'flou': {'main_port_id': 24630878, 'sub_port_id': 24630898, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16553679, 'last_updated_at': datetime.datetime(2025, 7, 5, 1, 33, 34), 'last_updated_at_desc': datetime.datetime(2025, 7, 5, 1, 33, 34), 'last_updated_at_asc': datetime.datetime(2025, 7, 5, 1, 33, 34)}, 'Carton_brun': {'main_port_id': 24630878, 'sub_port_id': 24630899, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16553680, 'last_updated_at': datetime.datetime(2025, 7, 5, 1, 33, 34), 'last_updated_at_desc': datetime.datetime(2025, 7, 5, 1, 33, 34), 'last_updated_at_asc': datetime.datetime(2025, 7, 5, 1, 33, 34)}, 'kraft': {'main_port_id': 24630878, 'sub_port_id': 24630900, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16553681, 'last_updated_at': datetime.datetime(2025, 7, 5, 1, 33, 34), 'last_updated_at_desc': datetime.datetime(2025, 7, 5, 1, 33, 34), 'last_updated_at_asc': datetime.datetime(2025, 7, 5, 1, 33, 34)}, 'environnement': {'main_port_id': 24630878, 'sub_port_id': 24630901, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16553682, 'last_updated_at': datetime.datetime(2025, 7, 5, 1, 33, 34), 'last_updated_at_desc': datetime.datetime(2025, 7, 5, 1, 33, 34), 'last_updated_at_asc': datetime.datetime(2025, 7, 5, 1, 33, 34)}, 'metal': {'main_port_id': 24630878, 'sub_port_id': 24630902, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16553683, 'last_updated_at': datetime.datetime(2025, 7, 5, 1, 33, 34), 'last_updated_at_desc': datetime.datetime(2025, 7, 5, 1, 33, 34), 'last_updated_at_asc': datetime.datetime(2025, 7, 5, 1, 33, 34)}, 'Teint_Dans_La_Masse': {'main_port_id': 24630878, 'sub_port_id': 24630903, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16553684, 'last_updated_at': datetime.datetime(2025, 7, 5, 1, 33, 34), 'last_updated_at_desc': datetime.datetime(2025, 7, 5, 1, 33, 34), 'last_updated_at_asc': datetime.datetime(2025, 7, 5, 1, 33, 34)}, 'papier': {'main_port_id': 24630878, 'sub_port_id': 24630904, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16553685, 'last_updated_at': datetime.datetime(2025, 7, 5, 1, 33, 34), 'last_updated_at_desc': datetime.datetime(2025, 7, 5, 1, 33, 34), 'last_updated_at_asc': datetime.datetime(2025, 7, 5, 1, 33, 34)}, 'cartonnette': {'main_port_id': 24630878, 'sub_port_id': 24630905, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16553686, 'last_updated_at': datetime.datetime(2025, 7, 5, 1, 33, 34), 'last_updated_at_desc': datetime.datetime(2025, 7, 5, 1, 33, 34), 'last_updated_at_asc': datetime.datetime(2025, 7, 5, 1, 33, 34)}, 'mal_croppe': {'main_port_id': 24630878, 'sub_port_id': 24630906, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16553687, 'last_updated_at': datetime.datetime(2025, 7, 5, 1, 33, 34), 'last_updated_at_desc': datetime.datetime(2025, 7, 5, 1, 33, 34), 'last_updated_at_asc': datetime.datetime(2025, 7, 5, 1, 33, 34)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24630895,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24630883 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24630896,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24630884 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24630897,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24630885 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24630898,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24630886 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24630899,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24630887 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24630900,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24630888 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24630901,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24630889 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24630902,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24630890 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24630903,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24630891 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24630904,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24630892 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24630905,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24630893 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24630906,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24630894 lien utilise dans velours : https://www.fotonower.com/velours/24630895,24630896,24630897,24630898,24630899,24630900,24630901,24630902,24630903,24630904,24630905,24630906?tags=autre_refus,plastique,Carton_gris,flou,Carton_brun,kraft,environnement,metal,Teint_Dans_La_Masse,papier,cartonnette,mal_croppe After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([24630878]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1370720254, 1370720252, 1370720240, 1370720239, 1370720237, 1370720228, 1370720209, 1370720207, 1370720205, 1370720196, 1370720192, 1370720190] map_info['map_portfolio_photo'] : {24630878: [1370720254, 1370720252, 1370720240, 1370720239, 1370720237, 1370720228, 1370720209, 1370720207, 1370720205, 1370720196, 1370720192, 1370720190, 1370720156, 1370720154, 1370720152, 1370720150, 1370720148, 1370720145]} final : False mtd_id 4302 list_pids : [1370720254, 1370720252, 1370720240, 1370720239, 1370720237, 1370720228, 1370720209, 1370720207, 1370720205, 1370720196, 1370720192, 1370720190] Looping around the photos to save general results len do output : 1 /24630878. before output type Here is an output not treated by saveGeneral : Managing all output in save final without adding information in the mtr_datou_result ('4302', None, None, None, None, None, None, None, '3239352') ('4302', '24630878', '1370720254', None, None, None, None, None, '3239352') ('4302', None, None, None, None, None, None, None, '3239352') ('4302', '24630878', '1370720252', None, None, None, None, None, '3239352') ('4302', None, None, None, None, None, None, None, '3239352') ('4302', '24630878', '1370720240', None, None, None, None, None, '3239352') ('4302', None, None, None, None, None, None, None, '3239352') ('4302', '24630878', '1370720239', None, None, None, None, None, '3239352') ('4302', None, None, None, None, None, None, None, '3239352') ('4302', '24630878', '1370720237', None, None, None, None, None, '3239352') ('4302', None, None, None, None, None, None, None, '3239352') ('4302', '24630878', '1370720228', None, None, None, None, None, '3239352') ('4302', None, None, None, None, None, None, None, '3239352') ('4302', '24630878', '1370720209', None, None, None, None, None, '3239352') ('4302', None, None, None, None, None, None, None, '3239352') ('4302', '24630878', '1370720207', None, None, None, None, None, '3239352') ('4302', None, None, None, None, None, None, None, '3239352') ('4302', '24630878', '1370720205', None, None, None, None, None, '3239352') ('4302', None, None, None, None, None, None, None, '3239352') ('4302', '24630878', '1370720196', None, None, None, None, None, '3239352') ('4302', None, None, None, None, None, None, None, '3239352') ('4302', '24630878', '1370720192', None, None, None, None, None, '3239352') ('4302', None, None, None, None, None, None, None, '3239352') ('4302', '24630878', '1370720190', None, None, None, None, None, '3239352') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 13 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '24630878', "{'autre_refus': 24630883, 'plastique': 24630884, 'Carton_gris': 24630885, 'flou': 24630886, 'Carton_brun': 24630887, 'kraft': 24630888, 'environnement': 24630889, 'metal': 24630890, 'Teint_Dans_La_Masse': 24630891, 'papier': 24630892, 'cartonnette': 24630893, 'mal_croppe': 24630894}", None, None, None, None, '3239352'), ('4302', '24630878', '1370720254', None, None, None, None, None, '3239352'), ('4302', '24630878', '1370720252', None, None, None, None, None, '3239352'), ('4302', '24630878', '1370720240', None, None, None, None, None, '3239352'), ('4302', '24630878', '1370720239', None, None, None, None, None, '3239352'), ('4302', '24630878', '1370720237', None, None, None, None, None, '3239352'), ('4302', '24630878', '1370720228', None, None, None, None, None, '3239352'), ('4302', '24630878', '1370720209', None, None, None, None, None, '3239352'), ('4302', '24630878', '1370720207', None, None, None, None, None, '3239352'), ('4302', '24630878', '1370720205', None, None, None, None, None, '3239352'), ('4302', '24630878', '1370720196', None, None, None, None, None, '3239352'), ('4302', '24630878', '1370720192', None, None, None, None, None, '3239352'), ('4302', '24630878', '1370720190', None, None, None, None, None, '3239352')] time used for this insertion : 0.05598092079162598 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.440000295639038 time spend to save output : 0.056290388107299805 total time spend for step 1 : 1.496290683746338 step2:final Sat Jul 5 01:34:59 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :0, first value : [] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (24630878) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {} map_subphoto_mainphoto : {} Beginning of datou step final ! query to retrieve results for portfolio 24630878 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1370720156,1370720154,1370720152,1370720150,1370720148,1370720145,1370720209,1370720207,1370720205,1370720196,1370720192,1370720190,1370720254,1370720252,1370720240,1370720239,1370720237,1370720228); insert ignore into MTRUser.portfolio_carac_ratio (portfolio_id, hashtag_type, hashtag_id, value) values (%s,%s,%s,%s) on DUPLICATE KEY UPDATE value=VALUES(value) After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([24630878]) Inside saveOutput : final : False verbose : True original output for save of step final : {1370720254: ('0.0',), 1370720252: ('0.0',), 1370720240: ('0.0',), 1370720239: ('0.0',), 1370720237: ('0.0',), 1370720228: ('0.0',), 1370720209: ('0.0',), 1370720207: ('0.0',), 1370720205: ('0.0',), 1370720196: ('0.0',), 1370720192: ('0.0',), 1370720190: ('0.0',)} new output for save of step final : {1370720254: ('0.0',), 1370720252: ('0.0',), 1370720240: ('0.0',), 1370720239: ('0.0',), 1370720237: ('0.0',), 1370720228: ('0.0',), 1370720209: ('0.0',), 1370720207: ('0.0',), 1370720205: ('0.0',), 1370720196: ('0.0',), 1370720192: ('0.0',), 1370720190: ('0.0',)} [1370720254, 1370720252, 1370720240, 1370720239, 1370720237, 1370720228, 1370720209, 1370720207, 1370720205, 1370720196, 1370720192, 1370720190] map_info['map_portfolio_photo'] : {24630878: [1370720254, 1370720252, 1370720240, 1370720239, 1370720237, 1370720228, 1370720209, 1370720207, 1370720205, 1370720196, 1370720192, 1370720190, 1370720156, 1370720154, 1370720152, 1370720150, 1370720148, 1370720145]} final : False mtd_id 4302 list_pids : [1370720254, 1370720252, 1370720240, 1370720239, 1370720237, 1370720228, 1370720209, 1370720207, 1370720205, 1370720196, 1370720192, 1370720190] Looping around the photos to save general results len do output : 12 /1370720254.Didn't retrieve data . /1370720252.Didn't retrieve data . /1370720240.Didn't retrieve data . /1370720239.Didn't retrieve data . /1370720237.Didn't retrieve data . /1370720228.Didn't retrieve data . /1370720209.Didn't retrieve data . /1370720207.Didn't retrieve data . /1370720205.Didn't retrieve data . /1370720196.Didn't retrieve data . /1370720192.Didn't retrieve data . /1370720190.Didn't retrieve data . before output type Used above Used above Managing all output in save final without adding information in the mtr_datou_result ('4302', None, None, None, None, None, None, None, '3239352') ('4302', '24630878', '1370720254', None, None, None, None, None, '3239352') ('4302', None, None, None, None, None, None, None, '3239352') ('4302', '24630878', '1370720252', None, None, None, None, None, '3239352') ('4302', None, None, None, None, None, None, None, '3239352') ('4302', '24630878', '1370720240', None, None, None, None, None, '3239352') ('4302', None, None, None, None, None, None, None, '3239352') ('4302', '24630878', '1370720239', None, None, None, None, None, '3239352') ('4302', None, None, None, None, None, None, None, '3239352') ('4302', '24630878', '1370720237', None, None, None, None, None, '3239352') ('4302', None, None, None, None, None, None, None, '3239352') ('4302', '24630878', '1370720228', None, None, None, None, None, '3239352') ('4302', None, None, None, None, None, None, None, '3239352') ('4302', '24630878', '1370720209', None, None, None, None, None, '3239352') ('4302', None, None, None, None, None, None, None, '3239352') ('4302', '24630878', '1370720207', None, None, None, None, None, '3239352') ('4302', None, None, None, None, None, None, None, '3239352') ('4302', '24630878', '1370720205', None, None, None, None, None, '3239352') ('4302', None, None, None, None, None, None, None, '3239352') ('4302', '24630878', '1370720196', None, None, None, None, None, '3239352') ('4302', None, None, None, None, None, None, None, '3239352') ('4302', '24630878', '1370720192', None, None, None, None, None, '3239352') ('4302', None, None, None, None, None, None, None, '3239352') ('4302', '24630878', '1370720190', None, None, None, None, None, '3239352') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 36 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '24630878', '1370720254', '0.0', None, None, None, None, '3239352'), ('4302', '24630878', '1370720252', '0.0', None, None, None, None, '3239352'), ('4302', '24630878', '1370720240', '0.0', None, None, None, None, '3239352'), ('4302', '24630878', '1370720239', '0.0', None, None, None, None, '3239352'), ('4302', '24630878', '1370720237', '0.0', None, None, None, None, '3239352'), ('4302', '24630878', '1370720228', '0.0', None, None, None, None, '3239352'), ('4302', '24630878', '1370720209', '0.0', None, None, None, None, '3239352'), ('4302', '24630878', '1370720207', '0.0', None, None, None, None, '3239352'), ('4302', '24630878', '1370720205', '0.0', None, None, None, None, '3239352'), ('4302', '24630878', '1370720196', '0.0', None, None, None, None, '3239352'), ('4302', '24630878', '1370720192', '0.0', None, None, None, None, '3239352'), ('4302', '24630878', '1370720190', '0.0', None, None, None, None, '3239352')] time used for this insertion : 0.017228364944458008 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.06293201446533203 time spend to save output : 0.017824649810791016 total time spend for step 2 : 0.08075666427612305 step3:velours_tree Sat Jul 5 01:34:59 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : {24630878: [{'autre_refus': 24630883, 'plastique': 24630884, 'Carton_gris': 24630885, 'flou': 24630886, 'Carton_brun': 24630887, 'kraft': 24630888, 'environnement': 24630889, 'metal': 24630890, 'Teint_Dans_La_Masse': 24630891, 'papier': 24630892, 'cartonnette': 24630893, 'mal_croppe': 24630894}]} input_args_next_step : {24630878: ()} output_args : {24630878: [{'autre_refus': 24630883, 'plastique': 24630884, 'Carton_gris': 24630885, 'flou': 24630886, 'Carton_brun': 24630887, 'kraft': 24630888, 'environnement': 24630889, 'metal': 24630890, 'Teint_Dans_La_Masse': 24630891, 'papier': 24630892, 'cartonnette': 24630893, 'mal_croppe': 24630894}]} args : 24630878 depend.output_id : 0 VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :1, first value : ({'autre_refus': 24630883, 'plastique': 24630884, 'Carton_gris': 24630885, 'flou': 24630886, 'Carton_brun': 24630887, 'kraft': 24630888, 'environnement': 24630889, 'metal': 24630890, 'Teint_Dans_La_Masse': 24630891, 'papier': 24630892, 'cartonnette': 24630893, 'mal_croppe': 24630894},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (24630878) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {} map_subphoto_mainphoto : {} can't find the photo_desc_type After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([24630878]) Inside saveOutput : final : False verbose : True ouput is None No outpout to save, returning out of save general time spend for datou_step_exec : 0.3175632953643799 time spend to save output : 5.316734313964844e-05 total time spend for step 3 : 0.31761646270751953 step4:send_mail_cod Sat Jul 5 01:34:59 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! complete output_args for input 2 : {1370720254: ('0.0',), 1370720252: ('0.0',), 1370720240: ('0.0',), 1370720239: ('0.0',), 1370720237: ('0.0',), 1370720228: ('0.0',), 1370720209: ('0.0',), 1370720207: ('0.0',), 1370720205: ('0.0',), 1370720196: ('0.0',), 1370720192: ('0.0',), 1370720190: ('0.0',)} input_args_next_step : {1370720254: ()} output_args : {1370720254: ('0.0',), 1370720252: ('0.0',), 1370720240: ('0.0',), 1370720239: ('0.0',), 1370720237: ('0.0',), 1370720228: ('0.0',), 1370720209: ('0.0',), 1370720207: ('0.0',), 1370720205: ('0.0',), 1370720196: ('0.0',), 1370720192: ('0.0',), 1370720190: ('0.0',)} args : 1370720254 depend.output_id : 0 input_args_next_step : {1370720254: ('0.0',), 1370720252: ()} output_args : {1370720254: ('0.0',), 1370720252: ('0.0',), 1370720240: ('0.0',), 1370720239: ('0.0',), 1370720237: ('0.0',), 1370720228: ('0.0',), 1370720209: ('0.0',), 1370720207: ('0.0',), 1370720205: ('0.0',), 1370720196: ('0.0',), 1370720192: ('0.0',), 1370720190: ('0.0',)} args : 1370720252 depend.output_id : 0 input_args_next_step : {1370720254: ('0.0',), 1370720252: ('0.0',), 1370720240: ()} output_args : {1370720254: ('0.0',), 1370720252: ('0.0',), 1370720240: ('0.0',), 1370720239: ('0.0',), 1370720237: ('0.0',), 1370720228: ('0.0',), 1370720209: ('0.0',), 1370720207: ('0.0',), 1370720205: ('0.0',), 1370720196: ('0.0',), 1370720192: ('0.0',), 1370720190: ('0.0',)} args : 1370720240 depend.output_id : 0 input_args_next_step : {1370720254: ('0.0',), 1370720252: ('0.0',), 1370720240: ('0.0',), 1370720239: ()} output_args : {1370720254: ('0.0',), 1370720252: ('0.0',), 1370720240: ('0.0',), 1370720239: ('0.0',), 1370720237: ('0.0',), 1370720228: ('0.0',), 1370720209: ('0.0',), 1370720207: ('0.0',), 1370720205: ('0.0',), 1370720196: ('0.0',), 1370720192: ('0.0',), 1370720190: ('0.0',)} args : 1370720239 depend.output_id : 0 input_args_next_step : {1370720254: ('0.0',), 1370720252: ('0.0',), 1370720240: ('0.0',), 1370720239: ('0.0',), 1370720237: ()} output_args : {1370720254: ('0.0',), 1370720252: ('0.0',), 1370720240: ('0.0',), 1370720239: ('0.0',), 1370720237: ('0.0',), 1370720228: ('0.0',), 1370720209: ('0.0',), 1370720207: ('0.0',), 1370720205: ('0.0',), 1370720196: ('0.0',), 1370720192: ('0.0',), 1370720190: ('0.0',)} args : 1370720237 depend.output_id : 0 input_args_next_step : {1370720254: ('0.0',), 1370720252: ('0.0',), 1370720240: ('0.0',), 1370720239: ('0.0',), 1370720237: ('0.0',), 1370720228: ()} output_args : {1370720254: ('0.0',), 1370720252: ('0.0',), 1370720240: ('0.0',), 1370720239: ('0.0',), 1370720237: ('0.0',), 1370720228: ('0.0',), 1370720209: ('0.0',), 1370720207: ('0.0',), 1370720205: ('0.0',), 1370720196: ('0.0',), 1370720192: ('0.0',), 1370720190: ('0.0',)} args : 1370720228 depend.output_id : 0 input_args_next_step : {1370720254: ('0.0',), 1370720252: ('0.0',), 1370720240: ('0.0',), 1370720239: ('0.0',), 1370720237: ('0.0',), 1370720228: ('0.0',), 1370720209: ()} output_args : {1370720254: ('0.0',), 1370720252: ('0.0',), 1370720240: ('0.0',), 1370720239: ('0.0',), 1370720237: ('0.0',), 1370720228: ('0.0',), 1370720209: ('0.0',), 1370720207: ('0.0',), 1370720205: ('0.0',), 1370720196: ('0.0',), 1370720192: ('0.0',), 1370720190: ('0.0',)} args : 1370720209 depend.output_id : 0 input_args_next_step : {1370720254: ('0.0',), 1370720252: ('0.0',), 1370720240: ('0.0',), 1370720239: ('0.0',), 1370720237: ('0.0',), 1370720228: ('0.0',), 1370720209: ('0.0',), 1370720207: ()} output_args : {1370720254: ('0.0',), 1370720252: ('0.0',), 1370720240: ('0.0',), 1370720239: ('0.0',), 1370720237: ('0.0',), 1370720228: ('0.0',), 1370720209: ('0.0',), 1370720207: ('0.0',), 1370720205: ('0.0',), 1370720196: ('0.0',), 1370720192: ('0.0',), 1370720190: ('0.0',)} args : 1370720207 depend.output_id : 0 input_args_next_step : {1370720254: ('0.0',), 1370720252: ('0.0',), 1370720240: ('0.0',), 1370720239: ('0.0',), 1370720237: ('0.0',), 1370720228: ('0.0',), 1370720209: ('0.0',), 1370720207: ('0.0',), 1370720205: ()} output_args : {1370720254: ('0.0',), 1370720252: ('0.0',), 1370720240: ('0.0',), 1370720239: ('0.0',), 1370720237: ('0.0',), 1370720228: ('0.0',), 1370720209: ('0.0',), 1370720207: ('0.0',), 1370720205: ('0.0',), 1370720196: ('0.0',), 1370720192: ('0.0',), 1370720190: ('0.0',)} args : 1370720205 depend.output_id : 0 input_args_next_step : {1370720254: ('0.0',), 1370720252: ('0.0',), 1370720240: ('0.0',), 1370720239: ('0.0',), 1370720237: ('0.0',), 1370720228: ('0.0',), 1370720209: ('0.0',), 1370720207: ('0.0',), 1370720205: ('0.0',), 1370720196: ()} output_args : {1370720254: ('0.0',), 1370720252: ('0.0',), 1370720240: ('0.0',), 1370720239: ('0.0',), 1370720237: ('0.0',), 1370720228: ('0.0',), 1370720209: ('0.0',), 1370720207: ('0.0',), 1370720205: ('0.0',), 1370720196: ('0.0',), 1370720192: ('0.0',), 1370720190: ('0.0',)} args : 1370720196 depend.output_id : 0 input_args_next_step : {1370720254: ('0.0',), 1370720252: ('0.0',), 1370720240: ('0.0',), 1370720239: ('0.0',), 1370720237: ('0.0',), 1370720228: ('0.0',), 1370720209: ('0.0',), 1370720207: ('0.0',), 1370720205: ('0.0',), 1370720196: ('0.0',), 1370720192: ()} output_args : {1370720254: ('0.0',), 1370720252: ('0.0',), 1370720240: ('0.0',), 1370720239: ('0.0',), 1370720237: ('0.0',), 1370720228: ('0.0',), 1370720209: ('0.0',), 1370720207: ('0.0',), 1370720205: ('0.0',), 1370720196: ('0.0',), 1370720192: ('0.0',), 1370720190: ('0.0',)} args : 1370720192 depend.output_id : 0 input_args_next_step : {1370720254: ('0.0',), 1370720252: ('0.0',), 1370720240: ('0.0',), 1370720239: ('0.0',), 1370720237: ('0.0',), 1370720228: ('0.0',), 1370720209: ('0.0',), 1370720207: ('0.0',), 1370720205: ('0.0',), 1370720196: ('0.0',), 1370720192: ('0.0',), 1370720190: ()} output_args : {1370720254: ('0.0',), 1370720252: ('0.0',), 1370720240: ('0.0',), 1370720239: ('0.0',), 1370720237: ('0.0',), 1370720228: ('0.0',), 1370720209: ('0.0',), 1370720207: ('0.0',), 1370720205: ('0.0',), 1370720196: ('0.0',), 1370720192: ('0.0',), 1370720190: ('0.0',)} args : 1370720190 depend.output_id : 0 Inconsistent number of input and output, step which parrallelize and manage error in input by avoiding sending an output for this data can't be used in tree dependencies of input and output complete output_args for input 3 : {24630878: [{'autre_refus': 24630883, 'plastique': 24630884, 'Carton_gris': 24630885, 'flou': 24630886, 'Carton_brun': 24630887, 'kraft': 24630888, 'environnement': 24630889, 'metal': 24630890, 'Teint_Dans_La_Masse': 24630891, 'papier': 24630892, 'cartonnette': 24630893, 'mal_croppe': 24630894}]} input_args_next_step : {1370720254: ('0.0',), 1370720252: ('0.0',), 1370720240: ('0.0',), 1370720239: ('0.0',), 1370720237: ('0.0',), 1370720228: ('0.0',), 1370720209: ('0.0',), 1370720207: ('0.0',), 1370720205: ('0.0',), 1370720196: ('0.0',), 1370720192: ('0.0',), 1370720190: ('0.0',), 24630878: ()} output_args : {24630878: [{'autre_refus': 24630883, 'plastique': 24630884, 'Carton_gris': 24630885, 'flou': 24630886, 'Carton_brun': 24630887, 'kraft': 24630888, 'environnement': 24630889, 'metal': 24630890, 'Teint_Dans_La_Masse': 24630891, 'papier': 24630892, 'cartonnette': 24630893, 'mal_croppe': 24630894}]} args : 24630878 depend.output_id : 0 We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :13, first value : ('0.0',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (24630878) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {} map_subphoto_mainphoto : {} dans la step send mail cod work_area: /home/admin/workarea/git/Velours/python in order to get the selector url, please entre the license of selector SELECT photo_id, url FROM MTRBack.photos ph WHERE photo_id IN (1370720254,1370720252,1370720240,1370720239,1370720237,1370720228,1370720209,1370720207,1370720205,1370720196,1370720192,1370720190) Found this number of photos: 12 ##### Call download_photos : nb_thread : 5 begin to download photo : 1370720190 begin to download photo : 1370720205 begin to download photo : 1370720228 begin to download photo : 1370720240 download finish for photo 1370720228 begin to download photo : 1370720237 download finish for photo 1370720190 begin to download photo : 1370720192 download finish for photo 1370720240 begin to download photo : 1370720252 download finish for photo 1370720205 begin to download photo : 1370720207 download finish for photo 1370720252 begin to download photo : 1370720254 download finish for photo 1370720237 begin to download photo : 1370720239 download finish for photo 1370720192 begin to download photo : 1370720196 download finish for photo 1370720207 begin to download photo : 1370720209 download finish for photo 1370720196 download finish for photo 1370720239 download finish for photo 1370720254 download finish for photo 1370720209 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette246308831751672099/ imagette246308841751672099/ imagette246308861751672099/ imagette246308881751672100/ imagette246308901751672100/ imagette246308931751672100/ imagette246308941751672100/ imagette246308851751672100/ imagette246308871751672100/ imagette246308911751672100/ length of list_filenames : 12 ; length of list_pids : 12 ; length of list_args : 12 results_Auto_P24630878_05-07-2025_01_34_59.pdf 24630883 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=24630883 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette246308831751672099 24630884 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=24630884 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette246308841751672099 24630886 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=24630886 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette246308861751672099 24630888 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=24630888 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette246308881751672100 24630890 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=24630890 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette246308901751672100 24630893 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=24630893 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette246308931751672100 24630894 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=24630894 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette246308941751672100 24630885 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=24630885 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette246308851751672100 24630887 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=24630887 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette246308871751672100 24630891 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=24630891 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette246308911751672100 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=24630878 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/24630895,24630896,24630897,24630898,24630899,24630900,24630901,24630902,24630903,24630904,24630905,24630906?tags=autre_refus,plastique,Carton_gris,flou,Carton_brun,kraft,environnement,metal,Teint_Dans_La_Masse,papier,cartonnette,mal_croppe your option no_mail is active, we will not send the real mail to your client args[1370720254] : ('0.0',) no score found for photo 1370720254 We are sending mail with results at report@fotonower.com args[1370720252] : ('0.0',) no score found for photo 1370720252 We are sending mail with results at report@fotonower.com args[1370720240] : ('0.0',) no score found for photo 1370720240 We are sending mail with results at report@fotonower.com args[1370720239] : ('0.0',) no score found for photo 1370720239 We are sending mail with results at report@fotonower.com args[1370720237] : ('0.0',) no score found for photo 1370720237 We are sending mail with results at report@fotonower.com args[1370720228] : ('0.0',) no score found for photo 1370720228 We are sending mail with results at report@fotonower.com args[1370720209] : ('0.0',) no score found for photo 1370720209 We are sending mail with results at report@fotonower.com args[1370720207] : ('0.0',) no score found for photo 1370720207 We are sending mail with results at report@fotonower.com args[1370720205] : ('0.0',) no score found for photo 1370720205 We are sending mail with results at report@fotonower.com args[1370720196] : ('0.0',) no score found for photo 1370720196 We are sending mail with results at report@fotonower.com args[1370720192] : ('0.0',) no score found for photo 1370720192 We are sending mail with results at report@fotonower.com args[1370720190] : ('0.0',) no score found for photo 1370720190 We are sending mail with results at report@fotonower.com refus_total : 0.0 2022-04-13 10:29:59 0 SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=24630878 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 1000 start upload file to ovh https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24630878_05-07-2025_01_34_59.pdf results_Auto_P24630878_05-07-2025_01_34_59.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24630878_05-07-2025_01_34_59.pdf start insert file to database insert into MTRUser.mtr_files (mtd_id,mtr_portfolio_id,text,url,format,tags,file_size,value) values ('4302','24630878','results_Auto_P24630878_05-07-2025_01_34_59.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24630878_05-07-2025_01_34_59.pdf','pdf','','0.11','0.0') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([24630878]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1370720254, 1370720252, 1370720240, 1370720239, 1370720237, 1370720228, 1370720209, 1370720207, 1370720205, 1370720196, 1370720192, 1370720190] map_info['map_portfolio_photo'] : {24630878: [1370720254, 1370720252, 1370720240, 1370720239, 1370720237, 1370720228, 1370720209, 1370720207, 1370720205, 1370720196, 1370720192, 1370720190, 1370720156, 1370720154, 1370720152, 1370720150, 1370720148, 1370720145]} final : False mtd_id 4302 list_pids : [1370720254, 1370720252, 1370720240, 1370720239, 1370720237, 1370720228, 1370720209, 1370720207, 1370720205, 1370720196, 1370720192, 1370720190] Looping around the photos to save general results len do output : 0 before output type Used above Managing all output in save final without adding information in the mtr_datou_result ('4302', None, None, None, None, None, None, None, '3239352') ('4302', '24630878', '1370720254', None, None, None, None, None, '3239352') ('4302', None, None, None, None, None, None, None, '3239352') ('4302', '24630878', '1370720252', None, None, None, None, None, '3239352') ('4302', None, None, None, None, None, None, None, '3239352') ('4302', '24630878', '1370720240', None, None, None, None, None, '3239352') ('4302', None, None, None, None, None, None, None, '3239352') ('4302', '24630878', '1370720239', None, None, None, None, None, '3239352') ('4302', None, None, None, None, None, None, None, '3239352') ('4302', '24630878', '1370720237', None, None, None, None, None, '3239352') ('4302', None, None, None, None, None, None, None, '3239352') ('4302', '24630878', '1370720228', None, None, None, None, None, '3239352') ('4302', None, None, None, None, None, None, None, '3239352') ('4302', '24630878', '1370720209', None, None, None, None, None, '3239352') ('4302', None, None, None, None, None, None, None, '3239352') ('4302', '24630878', '1370720207', None, None, None, None, None, '3239352') ('4302', None, None, None, None, None, None, None, '3239352') ('4302', '24630878', '1370720205', None, None, None, None, None, '3239352') ('4302', None, None, None, None, None, None, None, '3239352') ('4302', '24630878', '1370720196', None, None, None, None, None, '3239352') ('4302', None, None, None, None, None, None, None, '3239352') ('4302', '24630878', '1370720192', None, None, None, None, None, '3239352') ('4302', None, None, None, None, None, None, None, '3239352') ('4302', '24630878', '1370720190', None, None, None, None, None, '3239352') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 12 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '24630878', '1370720254', None, None, None, None, None, '3239352'), ('4302', '24630878', '1370720252', None, None, None, None, None, '3239352'), ('4302', '24630878', '1370720240', None, None, None, None, None, '3239352'), ('4302', '24630878', '1370720239', None, None, None, None, None, '3239352'), ('4302', '24630878', '1370720237', None, None, None, None, None, '3239352'), ('4302', '24630878', '1370720228', None, None, None, None, None, '3239352'), ('4302', '24630878', '1370720209', None, None, None, None, None, '3239352'), ('4302', '24630878', '1370720207', None, None, None, None, None, '3239352'), ('4302', '24630878', '1370720205', None, None, None, None, None, '3239352'), ('4302', '24630878', '1370720196', None, None, None, None, None, '3239352'), ('4302', '24630878', '1370720192', None, None, None, None, None, '3239352'), ('4302', '24630878', '1370720190', None, None, None, None, None, '3239352')] time used for this insertion : 0.024953126907348633 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.5874078273773193 time spend to save output : 0.02524113655090332 total time spend for step 4 : 1.6126489639282227 step5:split_time_score Sat Jul 5 01:35:01 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : ['24630878'] We expect there is only one output and this part is used while all output are not tuple or array Inconsistent number of input and output, step which parrallelize and manage error in input by avoiding sending an output for this data can't be used in tree dependencies of input and output complete output_args for input 1 : VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :1, first value : [('24630878',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (24630878) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1370720190: {'path': 'temp/1751672099_2733776_1370720190_2abd2d40f8280935eadfc6cb4d727b5d.jpg', 'extension': 'jpg'}, 1370720192: {'path': 'temp/1751672099_2733776_1370720192_79a004b01d2c8890d0435fe916484bdc.jpg', 'extension': 'jpg'}, 1370720196: {'path': 'temp/1751672099_2733776_1370720196_75c74104489613d016c3bf999db36fb0.jpg', 'extension': 'jpg'}, 1370720228: {'path': 'temp/1751672099_2733776_1370720228_ef76e9c4353bdf273b144c5ba2e7725c.jpg', 'extension': 'jpg'}, 1370720237: {'path': 'temp/1751672099_2733776_1370720237_3cd2f2924f77118eab168d9b582b0629.jpg', 'extension': 'jpg'}, 1370720239: {'path': 'temp/1751672099_2733776_1370720239_afab483aa2d0f5711775ba1788f5bee2.jpg', 'extension': 'jpg'}, 1370720240: {'path': 'temp/1751672099_2733776_1370720240_8fcf42a8cbc383c185240bb795831368.jpg', 'extension': 'jpg'}, 1370720252: {'path': 'temp/1751672099_2733776_1370720252_2081f6f0a2dad801b22b8489b1a0dc69.jpg', 'extension': 'jpg'}, 1370720254: {'path': 'temp/1751672099_2733776_1370720254_d35cfb38ae7df38bec9301d1d8941aa8.jpg', 'extension': 'jpg'}, 1370720205: {'path': 'temp/1751672099_2733776_1370720205_5e72ea8cad98e605b8a9d2d134bf7954.jpg', 'extension': 'jpg'}, 1370720207: {'path': 'temp/1751672099_2733776_1370720207_71aa931f46b0ff534c0527e2aa5433f8.jpg', 'extension': 'jpg'}, 1370720209: {'path': 'temp/1751672099_2733776_1370720209_4f1d05e2692019b96f5e0e6698c1dcc1.jpg', 'extension': 'jpg'}} map_subphoto_mainphoto : {} begin split time score SELECT app_name, token FROM MTRUser.mtr_app_api_token WHERE mtr_user_id=979 AND app_name="token_split_time_score" AND expire_at > NOW() select distinct dp.name from MTRPhoto.dashboard_entry_day ded, MTRPhoto.dashboard_places dp, MTRPhoto.dashboard_results dr where ded.dashboard_place_id = dp.id and ded.last_run_id = dr.dashboard_run_id and dp.id = ded.dashboard_place_id and dr.mtr_portfolio_id = 24630878; (('arc_en_ciel_jrm_live',),) TODO : Insert select and so on Begin split_port_in_batch_balle thcls : [{'id': 861, 'mtr_user_id': 31, 'name': 'Rungis_class_dechets_1212', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': 'Rungis_Aluminium,Rungis_Carton,Rungis_Papier,Rungis_Plastique_clair,Rungis_Plastique_dur,Rungis_Plastique_fonce,Rungis_Tapis_vide,Rungis_Tetrapak', 'svm_portfolios_learning': '1160730,571842,571844,571839,571933,571840,571841,572307', 'photo_hashtag_type': 999, 'photo_desc_type': 3963, 'type_classification': 'caffe', 'hashtag_id_list': '2107751280,2107750907,2107750908,2107750909,2107750910,2107750911,2107750912,2107750913'}] thcls : [{'id': 758, 'mtr_user_id': 31, 'name': 'Rungis_amount_dechets_fall_2018_v2', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': '05102018_Papier_non_papier_dense,05102018_Papier_non_papier_peu_dense,05102018_Papier_non_papier_presque_vide,05102018_Papier_non_papier_tres_dense,05102018_Papier_non_papier_tres_peu_dense', 'svm_portfolios_learning': '1108385,1108386,1108388,1108384,1108387', 'photo_hashtag_type': 856, 'photo_desc_type': 3853, 'type_classification': 'caffe', 'hashtag_id_list': '2107751013,2107751014,2107751015,2107751016,2107751017'}] select SUBSTRING(ph.text,16,2) as h, count(*) from MTRUser.mtr_portfolio_photos mpp inner join MTRBack.photos ph on mpp.mtr_photo_id = ph.photo_id where mpp.mtr_portfolio_id = 24630878 group by h (('01', 18),) SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=24630878 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 100000 SELECT cps.photo_id, cps.score, h.hashtag, cps.hashtag_id, mpp1.mtr_portfolio_id FROM MTRPhoto.class_photo_score cps, MTRBack.hashtags h, MTRUser.mtr_portfolio_photos mpp1 where mpp1.mtr_photo_id=cps.photo_id AND h.hashtag_id=cps.hashtag_id AND mpp1.hide_status=0 AND mpp1.mtr_portfolio_id in (24630878) AND cps.thcl in (861) order by cps.score desc LIMIT 0, 100000 SELECT cps.photo_id, cps.score, h.hashtag, cps.hashtag_id, mpp1.mtr_portfolio_id FROM MTRPhoto.class_photo_score cps, MTRBack.hashtags h, MTRUser.mtr_portfolio_photos mpp1 where mpp1.mtr_photo_id=cps.photo_id AND h.hashtag_id=cps.hashtag_id AND mpp1.hide_status=0 AND mpp1.mtr_portfolio_id in (24630878) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 05072025 24630878 Nombre de photos uploadées : 18 / 23040 (0%) 05072025 24630878 Nombre de photos taguées (types de déchets): 0 / 18 (0%) 05072025 24630878 Nombre de photos taguées (volume) : 0 / 18 (0%) [{'photo_id': 1370720156, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/5/073fba9308a65337ec6ad3638d4cb807.jpg', 'username': None, 'uploaded_at': 1751671863, 'text': 'image_05072025_01_30_03_9141.jpg'}, {'photo_id': 1370720154, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/5/42df82cba6c92926c74660ca72ce349f.jpg', 'username': None, 'uploaded_at': 1751671863, 'text': 'image_05072025_01_30_13_10137.jpg'}, {'photo_id': 1370720152, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/5/14fc221b407efbbc400bb6159cfe6300.jpg', 'username': None, 'uploaded_at': 1751671863, 'text': 'image_05072025_01_30_23_10136.jpg'}, {'photo_id': 1370720150, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/5/f9828a6cf0204f463c4d8b2c4f13a87f.jpg', 'username': None, 'uploaded_at': 1751671863, 'text': 'image_05072025_01_30_33_10134.jpg'}] 0 [] elapsed_time : load_data_split_time_score 1.1920928955078125e-06 elapsed_time : order_list_meta_photo_and_scores 5.4836273193359375e-06 ?????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.0009884834289550781 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 218, 24630878, '2025-07-05' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (1954264,979,"{}"); elapsed_time : insert_dashboard_record_day_entry 0.02317070960998535 We will return after consolidate but for now we need the day, how to get it, for now depending on the previous heavy steps SELECT dri.dashboard_entry_day, dr.dashboard_run_id, dr.mtr_portfolio_id, dr.id, dr.hashtag, dr.completion_json FROM MTRPhoto.dashboard_results dr, MTRPhoto.dashboard_run_ids dri, MTRPhoto.dashboard_entry_day ded WHERE ded.id= 1954264 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 1954264, 'dashboard_run_id': 1961877, 'mtr_portfolio_id': 24629481, 'dashboard_result_id': 12164525, 'hashtag': '_______JRM', 'completion_json': "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24629481_05-07-2025_01_02_58.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24629492, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24629494, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24629495, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24629496, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24629497, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24629499, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24629500, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24629501, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24629503, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24629504, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24629505, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24629507, 'pht': 3726}}"}, {'dashboat_entry_day': 1954264, 'dashboard_run_id': 1961877, 'mtr_portfolio_id': 24629958, 'dashboard_result_id': 12164526, 'hashtag': '_______JRM', 'completion_json': "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24629958_05-07-2025_01_17_01.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 24629986, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24629987, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24629988, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24629989, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24629990, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24629991, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24629992, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24629993, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24629994, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24629995, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24629996, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24629997, 'pht': 3726}}"}, {'dashboat_entry_day': 1954264, 'dashboard_run_id': 1961877, 'mtr_portfolio_id': 24630493, 'dashboard_result_id': 12164527, 'hashtag': '_______JRM', 'completion_json': "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24630493_05-07-2025_01_32_59.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24630519, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24630520, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24630521, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24630522, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24630523, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24630524, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24630525, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24630526, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24630527, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24630528, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24630529, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24630530, 'pht': 3726}}"}, {'dashboat_entry_day': 1954264, 'dashboard_run_id': 1961877, 'mtr_portfolio_id': 24630878, 'dashboard_result_id': 12164528, 'hashtag': '_______JRM', 'completion_json': "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24630878_05-07-2025_01_33_35.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24630883, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24630884, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24630885, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24630886, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24630887, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24630888, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24630889, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24630890, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24630891, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24630892, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24630893, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24630894, 'pht': 3726}}"}] SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 24629481 AND result is not null and result<>"None" and result<>0.0 AND mtd_id=4302 ORDER BY id desc LIMIT 1 list_result_datou : [{'mtr_datou_id': 4302, 'mtr_datou_current_id': 3239212, 'mtr_portfolio_id': 24629481, 'created_at': datetime.datetime(2025, 7, 5, 1, 2, 57), 'result': '0.03553554793306419', 'result_long': None, 'result_double': None}] Qualite : 0.03553554793306419 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 24629481 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24629481_05-07-2025_01_02_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 24629481 order by id desc limit 1 update MTRPhoto.dashboard_results set completion_json = "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24629481_05-07-2025_01_02_58.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24629492, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24629494, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24629495, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24629496, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24629497, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24629499, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24629500, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24629501, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24629503, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24629504, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24629505, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24629507, 'pht': 3726}}" where mtr_portfolio_id = 24629481 and dashboard_run_id = 1961877 SELECT name, created_at,limit_max FROM MTRDatou.mtr_datou WHERE id=4302 SELECT mtd.id, mtdt.`type`, mtd.`param`, mtd.param_json, mtdt.nb_input, mtdt.nb_output, mtdt.prod, mtdt.is_local, mtdt.is_datou_depend, mtdt.is_photo_id_local FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_step_types mtdt WHERE mtdt.`id`=mtd.`type` AND mtd.mtd_id=4302 SELECT mtd.id, mtd.mtd_id, mdsdt.id, mdsdt.name, mdsdt.description, msid.output_or_input, msid.data_order_id, mdsdt.type FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_steptype_io_datatypes msid, MTRDatou.mtr_datou_step_data_types mdsdt WHERE mtd.`type`=msid.`mtr_datou_step_type` AND mtd.mtd_id= 4302 AND msid.data_type=mdsdt.id SELECT mts_id_output, id_output, mts_id_input, id_input FROM MTRDatou.mtr_datou_step_by_step WHERE mtd_id=4302 # VR 17-11-17 : to create in DB ! Here we check the datou graph and we reorder steps ! Tree builded and cycle checked, now we need to re-order the steps ! We have currenlty an error because there is no dependence between the last step for the case tile - detect - glue We can either keep the depence of, it is better to keep an order compatible with the id of steps if we do not have sons, so a lexical order : (number_son, step_id) All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! DONE and to test : checkNoCycle ! Here we check the consistency of inputs/outputs number between the given ones and the db ! eke 1-6-18 : checkConsistencyNbInputNbOutput should be processed after step reordering ! WARNING : number of outputs for step 13596 ventilate_hashtags_in_portfolio is not consistent : 2 used against 1 in the step definition ! Step 11881 final have less inputs used (1) than in the step definition (3) : maybe we manage optionnal inputs ! Step 11881 final have less outputs used (1) than in the step definition (2) : some outputs may be not used ! WARNING : number of outputs for step 13625 velours_tree is not consistent : 2 used against 1 in the step definition ! Step 11884 send_mail_cod have less inputs used (3) than in the step definition (5) : maybe we manage optionnal inputs ! Number of inputs / outputs for each step checked ! Here we check the consistency of outputs/inputs types during steps connections eke 1-6-18 : checkConsistencyTypeOutputInput should be processed after checkConsistencyNbInputNbOutput ! We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 3 of step 11884 have datatype=6 WARNING : type of output 1 of step 13596 doesn't seem to be define in the database( WARNING : type of input 3 of step 11881 doesn't seem to be define in the database( We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 0 of step 13625 have datatype=18 WARNING : type of output 1 of step 13625 doesn't seem to be define in the database( WARNING : type of input 5 of step 11884 doesn't seem to be define in the database( DataTypes for each output/input checked ! no param json to modify TODO Duplicate data, are they consistent 3 ? Duplicate data, are they consistent 4 ? SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=24629481 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (12164525, 0.03553554793306419, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24629481_05-07-2025_01_02_58.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24629492, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24629494, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24629495, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24629496, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24629497, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24629499, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24629500, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24629501, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24629503, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24629504, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24629505, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24629507, 'pht': 3726}}") ON DUPLICATE KEY UPDATE qualite=VALUES(qualite), completion_json=VALUES(completion_json) ret update_qualite_results : None SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 24629958 AND result is not null and result<>"None" and result<>0.0 AND mtd_id=4302 ORDER BY id desc LIMIT 1 list_result_datou : [{'mtr_datou_id': 4302, 'mtr_datou_current_id': 3239267, 'mtr_portfolio_id': 24629958, 'created_at': datetime.datetime(2025, 7, 5, 1, 17), 'result': '0.00233574526336904', 'result_long': None, 'result_double': None}] Qualite : 0.00233574526336904 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 24629958 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24629958_05-07-2025_01_17_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 24629958 order by id desc limit 1 update MTRPhoto.dashboard_results set completion_json = "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24629958_05-07-2025_01_17_01.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 24629986, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24629987, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24629988, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24629989, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24629990, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24629991, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24629992, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24629993, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24629994, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24629995, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24629996, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24629997, 'pht': 3726}}" where mtr_portfolio_id = 24629958 and dashboard_run_id = 1961877 SELECT name, created_at,limit_max FROM MTRDatou.mtr_datou WHERE id=4302 SELECT mtd.id, mtdt.`type`, mtd.`param`, mtd.param_json, mtdt.nb_input, mtdt.nb_output, mtdt.prod, mtdt.is_local, mtdt.is_datou_depend, mtdt.is_photo_id_local FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_step_types mtdt WHERE mtdt.`id`=mtd.`type` AND mtd.mtd_id=4302 SELECT mtd.id, mtd.mtd_id, mdsdt.id, mdsdt.name, mdsdt.description, msid.output_or_input, msid.data_order_id, mdsdt.type FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_steptype_io_datatypes msid, MTRDatou.mtr_datou_step_data_types mdsdt WHERE mtd.`type`=msid.`mtr_datou_step_type` AND mtd.mtd_id= 4302 AND msid.data_type=mdsdt.id SELECT mts_id_output, id_output, mts_id_input, id_input FROM MTRDatou.mtr_datou_step_by_step WHERE mtd_id=4302 # VR 17-11-17 : to create in DB ! Here we check the datou graph and we reorder steps ! Tree builded and cycle checked, now we need to re-order the steps ! We have currenlty an error because there is no dependence between the last step for the case tile - detect - glue We can either keep the depence of, it is better to keep an order compatible with the id of steps if we do not have sons, so a lexical order : (number_son, step_id) All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! DONE and to test : checkNoCycle ! Here we check the consistency of inputs/outputs number between the given ones and the db ! eke 1-6-18 : checkConsistencyNbInputNbOutput should be processed after step reordering ! WARNING : number of outputs for step 13596 ventilate_hashtags_in_portfolio is not consistent : 2 used against 1 in the step definition ! Step 11881 final have less inputs used (1) than in the step definition (3) : maybe we manage optionnal inputs ! Step 11881 final have less outputs used (1) than in the step definition (2) : some outputs may be not used ! WARNING : number of outputs for step 13625 velours_tree is not consistent : 2 used against 1 in the step definition ! Step 11884 send_mail_cod have less inputs used (3) than in the step definition (5) : maybe we manage optionnal inputs ! Number of inputs / outputs for each step checked ! Here we check the consistency of outputs/inputs types during steps connections eke 1-6-18 : checkConsistencyTypeOutputInput should be processed after checkConsistencyNbInputNbOutput ! We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 3 of step 11884 have datatype=6 WARNING : type of output 1 of step 13596 doesn't seem to be define in the database( WARNING : type of input 3 of step 11881 doesn't seem to be define in the database( We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 0 of step 13625 have datatype=18 WARNING : type of output 1 of step 13625 doesn't seem to be define in the database( WARNING : type of input 5 of step 11884 doesn't seem to be define in the database( DataTypes for each output/input checked ! no param json to modify TODO Duplicate data, are they consistent 3 ? Duplicate data, are they consistent 4 ? SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=24629958 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (12164526, 0.00233574526336904, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24629958_05-07-2025_01_17_01.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 24629986, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24629987, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24629988, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24629989, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24629990, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24629991, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24629992, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24629993, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24629994, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24629995, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24629996, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24629997, 'pht': 3726}}") ON DUPLICATE KEY UPDATE qualite=VALUES(qualite), completion_json=VALUES(completion_json) ret update_qualite_results : None SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 24630493 AND result is not null and result<>"None" and result<>0.0 AND mtd_id=4302 ORDER BY id desc LIMIT 1 list_result_datou : [{'mtr_datou_id': 4302, 'mtr_datou_current_id': 3239315, 'mtr_portfolio_id': 24630493, 'created_at': datetime.datetime(2025, 7, 5, 1, 32, 58), 'result': '0.0002198232415477101', 'result_long': None, 'result_double': None}] Qualite : 0.0002198232415477101 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 24630493 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24630493_05-07-2025_01_32_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 24630493 order by id desc limit 1 update MTRPhoto.dashboard_results set completion_json = "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24630493_05-07-2025_01_32_59.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24630519, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24630520, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24630521, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24630522, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24630523, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24630524, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24630525, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24630526, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24630527, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24630528, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24630529, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24630530, 'pht': 3726}}" where mtr_portfolio_id = 24630493 and dashboard_run_id = 1961877 SELECT name, created_at,limit_max FROM MTRDatou.mtr_datou WHERE id=4302 SELECT mtd.id, mtdt.`type`, mtd.`param`, mtd.param_json, mtdt.nb_input, mtdt.nb_output, mtdt.prod, mtdt.is_local, mtdt.is_datou_depend, mtdt.is_photo_id_local FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_step_types mtdt WHERE mtdt.`id`=mtd.`type` AND mtd.mtd_id=4302 SELECT mtd.id, mtd.mtd_id, mdsdt.id, mdsdt.name, mdsdt.description, msid.output_or_input, msid.data_order_id, mdsdt.type FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_steptype_io_datatypes msid, MTRDatou.mtr_datou_step_data_types mdsdt WHERE mtd.`type`=msid.`mtr_datou_step_type` AND mtd.mtd_id= 4302 AND msid.data_type=mdsdt.id SELECT mts_id_output, id_output, mts_id_input, id_input FROM MTRDatou.mtr_datou_step_by_step WHERE mtd_id=4302 # VR 17-11-17 : to create in DB ! Here we check the datou graph and we reorder steps ! Tree builded and cycle checked, now we need to re-order the steps ! We have currenlty an error because there is no dependence between the last step for the case tile - detect - glue We can either keep the depence of, it is better to keep an order compatible with the id of steps if we do not have sons, so a lexical order : (number_son, step_id) All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! DONE and to test : checkNoCycle ! Here we check the consistency of inputs/outputs number between the given ones and the db ! eke 1-6-18 : checkConsistencyNbInputNbOutput should be processed after step reordering ! WARNING : number of outputs for step 13596 ventilate_hashtags_in_portfolio is not consistent : 2 used against 1 in the step definition ! Step 11881 final have less inputs used (1) than in the step definition (3) : maybe we manage optionnal inputs ! Step 11881 final have less outputs used (1) than in the step definition (2) : some outputs may be not used ! WARNING : number of outputs for step 13625 velours_tree is not consistent : 2 used against 1 in the step definition ! Step 11884 send_mail_cod have less inputs used (3) than in the step definition (5) : maybe we manage optionnal inputs ! Number of inputs / outputs for each step checked ! Here we check the consistency of outputs/inputs types during steps connections eke 1-6-18 : checkConsistencyTypeOutputInput should be processed after checkConsistencyNbInputNbOutput ! We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 3 of step 11884 have datatype=6 WARNING : type of output 1 of step 13596 doesn't seem to be define in the database( WARNING : type of input 3 of step 11881 doesn't seem to be define in the database( We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 0 of step 13625 have datatype=18 WARNING : type of output 1 of step 13625 doesn't seem to be define in the database( WARNING : type of input 5 of step 11884 doesn't seem to be define in the database( DataTypes for each output/input checked ! no param json to modify TODO Duplicate data, are they consistent 3 ? Duplicate data, are they consistent 4 ? SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=24630493 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (12164527, 0.0002198232415477101, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24630493_05-07-2025_01_32_59.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24630519, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24630520, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24630521, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24630522, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24630523, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24630524, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24630525, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24630526, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24630527, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24630528, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24630529, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24630530, 'pht': 3726}}") ON DUPLICATE KEY UPDATE qualite=VALUES(qualite), completion_json=VALUES(completion_json) ret update_qualite_results : None SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 24630878 AND result is not null and result<>"None" and result<>0.0 AND mtd_id=4302 ORDER BY id desc LIMIT 1 SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 24630878 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 ORDER BY created_at desc LIMIT 1 select value from MTRUser.portfolio_carac_ratio where portfolio_id = 24630878 and created_at >= ( SELECT min(created_at) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 24630878 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 )and created_at < ( SELECT addtime(max(created_at),100) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 24630878 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 ) order by value desc list_result_datou : [{'mtr_datou_id': 4302, 'mtr_datou_current_id': 3239352, 'mtr_portfolio_id': 24630878, 'created_at': datetime.datetime(2025, 7, 5, 1, 34, 59), 'result': 0.0, 'result_long': None, 'result_double': None}] Qualite : 0.0 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 24630878 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24630878_05-07-2025_01_34_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 24630878 order by id desc limit 1 update MTRPhoto.dashboard_results set completion_json = "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24630878_05-07-2025_01_34_59.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24630883, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24630884, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24630885, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24630886, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24630887, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24630888, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24630889, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24630890, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24630891, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24630892, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24630893, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24630894, 'pht': 3726}}" where mtr_portfolio_id = 24630878 and dashboard_run_id = 1961877 SELECT name, created_at,limit_max FROM MTRDatou.mtr_datou WHERE id=4302 SELECT mtd.id, mtdt.`type`, mtd.`param`, mtd.param_json, mtdt.nb_input, mtdt.nb_output, mtdt.prod, mtdt.is_local, mtdt.is_datou_depend, mtdt.is_photo_id_local FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_step_types mtdt WHERE mtdt.`id`=mtd.`type` AND mtd.mtd_id=4302 SELECT mtd.id, mtd.mtd_id, mdsdt.id, mdsdt.name, mdsdt.description, msid.output_or_input, msid.data_order_id, mdsdt.type FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_steptype_io_datatypes msid, MTRDatou.mtr_datou_step_data_types mdsdt WHERE mtd.`type`=msid.`mtr_datou_step_type` AND mtd.mtd_id= 4302 AND msid.data_type=mdsdt.id SELECT mts_id_output, id_output, mts_id_input, id_input FROM MTRDatou.mtr_datou_step_by_step WHERE mtd_id=4302 # VR 17-11-17 : to create in DB ! Here we check the datou graph and we reorder steps ! Tree builded and cycle checked, now we need to re-order the steps ! We have currenlty an error because there is no dependence between the last step for the case tile - detect - glue We can either keep the depence of, it is better to keep an order compatible with the id of steps if we do not have sons, so a lexical order : (number_son, step_id) All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! DONE and to test : checkNoCycle ! Here we check the consistency of inputs/outputs number between the given ones and the db ! eke 1-6-18 : checkConsistencyNbInputNbOutput should be processed after step reordering ! WARNING : number of outputs for step 13596 ventilate_hashtags_in_portfolio is not consistent : 2 used against 1 in the step definition ! Step 11881 final have less inputs used (1) than in the step definition (3) : maybe we manage optionnal inputs ! Step 11881 final have less outputs used (1) than in the step definition (2) : some outputs may be not used ! WARNING : number of outputs for step 13625 velours_tree is not consistent : 2 used against 1 in the step definition ! Step 11884 send_mail_cod have less inputs used (3) than in the step definition (5) : maybe we manage optionnal inputs ! Number of inputs / outputs for each step checked ! Here we check the consistency of outputs/inputs types during steps connections eke 1-6-18 : checkConsistencyTypeOutputInput should be processed after checkConsistencyNbInputNbOutput ! We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 3 of step 11884 have datatype=6 WARNING : type of output 1 of step 13596 doesn't seem to be define in the database( WARNING : type of input 3 of step 11881 doesn't seem to be define in the database( We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 0 of step 13625 have datatype=18 WARNING : type of output 1 of step 13625 doesn't seem to be define in the database( WARNING : type of input 5 of step 11884 doesn't seem to be define in the database( DataTypes for each output/input checked ! no param json to modify TODO Duplicate data, are they consistent 3 ? Duplicate data, are they consistent 4 ? SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=24630878 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (12164528, 0.0, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24630878_05-07-2025_01_34_59.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24630883, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24630884, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24630885, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24630886, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24630887, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24630888, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24630889, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24630890, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24630891, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24630892, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24630893, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24630894, 'pht': 3726}}") ON DUPLICATE KEY UPDATE qualite=VALUES(qualite), completion_json=VALUES(completion_json) ret update_qualite_results : None SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24629481,24629958,24630493,24630878) result : ((1370716479,), (1370716485,), (1370716489,), (1370716493,), (1370716502,), (1370716505,), (1370716514,), (1370716519,), (1370716521,), (1370716523,), (1370716526,), (1370716529,), (1370716564,), (1370716565,), (1370716567,), (1370716568,), (1370716570,), (1370716571,), (1370716574,), (1370716575,), (1370716584,), (1370716585,), (1370716587,), (1370716588,), (1370716596,), (1370716598,), (1370716602,), (1370716610,), (1370716612,), (1370716614,), (1370716623,), (1370716625,), (1370716627,), (1370716629,), (1370716632,), (1370716634,), (1370716680,), (1370716684,), (1370716688,), (1370716693,), (1370716697,), (1370716699,), (1370716702,), (1370716704,), (1370716719,), (1370716723,), (1370716725,), (1370716734,), (1370716759,), (1370716762,), (1370716764,), (1370716766,), (1370716774,), (1370716778,), (1370716784,), (1370716788,), (1370716790,), (1370716791,), (1370716796,), (1370716798,), (1370716805,), (1370716806,), (1370716807,), (1370716808,), (1370716809,), (1370716810,), (1370716865,), (1370716866,), (1370716868,), (1370716870,), (1370716872,), (1370716873,), (1370716877,), (1370716882,), (1370716888,), (1370716889,), (1370716891,), (1370716892,), (1370716953,), (1370716954,), (1370716975,), (1370716978,), (1370716981,), (1370716985,), (1370717040,), (1370717043,), (1370717045,), (1370717070,), (1370717103,), (1370717135,), (1370718100,), (1370718169,), (1370718207,), (1370718253,), (1370718287,), (1370718305,), (1370718340,), (1370718375,), (1370718444,), (1370718506,), (1370718567,), (1370718702,), (1370718734,), (1370718789,), (1370718853,), (1370718911,), (1370718956,), (1370719127,), (1370719152,), (1370719154,), (1370719177,), (1370719198,), (1370719202,), (1370719271,), (1370719273,), (1370719275,), (1370719279,), (1370719284,), (1370719288,), (1370719296,), (1370719300,), (1370719302,), (1370719315,), (1370719317,), (1370719318,), (1370719329,), (1370719332,), (1370719349,), (1370719354,), (1370719357,), (1370719359,), (1370719365,), (1370719368,), (1370719370,), (1370719371,), (1370719373,), (1370719375,), (1370719400,), (1370719403,), (1370719406,), (1370719410,), (1370719416,), (1370719419,), (1370719423,), (1370719426,), (1370719428,), (1370719433,), (1370719436,), (1370719438,), (1370719441,), (1370719443,), (1370719445,), (1370719448,), (1370719451,), (1370719453,), (1370719472,), (1370719473,), (1370719474,), (1370719478,), (1370719481,), (1370719496,), (1370719505,), (1370719506,), (1370719508,), (1370719509,), (1370719511,), (1370719512,), (1370719519,), (1370719521,), (1370719523,), (1370719526,), (1370719528,), (1370719530,), (1370719536,), (1370719539,), (1370719544,), (1370719547,), (1370719549,), (1370719551,), (1370719572,), (1370719576,), (1370719580,), (1370719585,), (1370719622,), (1370719648,), (1370719655,), (1370719657,), (1370719659,), (1370719660,), (1370719663,), (1370719665,), (1370719684,), (1370719687,), (1370719690,), (1370719692,), (1370719695,), (1370719697,), (1370719699,), (1370719702,), (1370719705,), (1370719707,), (1370719709,), (1370719711,), (1370719716,), (1370719719,), (1370719722,), (1370719724,), (1370719726,), (1370719728,), (1370719780,), (1370719784,), (1370719787,), (1370719788,), (1370719789,), (1370719791,), (1370719795,), (1370719799,), (1370719801,), (1370719804,), (1370719808,), (1370719812,), (1370719820,), (1370719821,), (1370719822,), (1370719823,), (1370719825,), (1370719827,), (1370719837,), (1370719841,), (1370719846,), (1370719849,), (1370719854,), (1370719856,), (1370719911,), (1370719912,), (1370719913,), (1370719914,), (1370719916,), (1370719917,), (1370719918,), (1370719921,), (1370719923,), (1370719924,), (1370719927,), (1370719929,), (1370719935,), (1370719936,), (1370719937,), (1370719939,), (1370719941,), (1370719944,), (1370719949,), (1370719954,), (1370719957,), (1370719959,), (1370719961,), (1370719963,), (1370719981,), (1370719982,), (1370719984,), (1370719985,), (1370719987,), (1370719988,), (1370719990,), (1370719992,), (1370719995,), (1370719996,), (1370719998,), (1370719999,), (1370720003,), (1370720005,), (1370720007,), (1370720010,), (1370720014,), (1370720017,), (1370720021,), (1370720023,), (1370720025,), (1370720027,), (1370720030,), (1370720033,), (1370720060,), (1370720062,), (1370720064,), (1370720070,), (1370720072,), (1370720073,), (1370720079,), (1370720080,), (1370720082,), (1370720083,), (1370720102,), (1370720103,), (1370720107,), (1370720108,), (1370720111,), (1370720112,), (1370720114,), (1370720115,), (1370720124,), (1370720126,), (1370720129,), (1370720130,), (1370720132,), (1370720134,), (1370720145,), (1370720148,), (1370720150,), (1370720152,), (1370720154,), (1370720156,), (1370720190,), (1370720192,), (1370720196,), (1370720205,), (1370720207,), (1370720209,), (1370720228,), (1370720237,), (1370720239,), (1370720240,), (1370720252,), (1370720254,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'05072025': {'nb_upload': 18, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([24630878]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1370720254, 1370720252, 1370720240, 1370720239, 1370720237, 1370720228, 1370720209, 1370720207, 1370720205, 1370720196, 1370720192, 1370720190] map_info['map_portfolio_photo'] : {24630878: [1370720254, 1370720252, 1370720240, 1370720239, 1370720237, 1370720228, 1370720209, 1370720207, 1370720205, 1370720196, 1370720192, 1370720190, 1370720156, 1370720154, 1370720152, 1370720150, 1370720148, 1370720145]} final : True mtd_id 4302 list_pids : [1370720254, 1370720252, 1370720240, 1370720239, 1370720237, 1370720228, 1370720209, 1370720207, 1370720205, 1370720196, 1370720192, 1370720190] Looping around the photos to save general results len do output : 1 /24630878Didn't retrieve data . before output type Here is an output not treated by saveGeneral : Managing all output in save final without adding information in the mtr_datou_result ('4302', None, None, None, None, None, None, None, '3239352') ('4302', '24630878', '1370720254', None, None, None, None, None, '3239352') ('4302', None, None, None, None, None, None, None, '3239352') ('4302', '24630878', '1370720252', None, None, None, None, None, '3239352') ('4302', None, None, None, None, None, None, None, '3239352') ('4302', '24630878', '1370720240', None, None, None, None, None, '3239352') ('4302', None, None, None, None, None, None, None, '3239352') ('4302', '24630878', '1370720239', None, None, None, None, None, '3239352') ('4302', None, None, None, None, None, None, None, '3239352') ('4302', '24630878', '1370720237', None, None, None, None, None, '3239352') ('4302', None, None, None, None, None, None, None, '3239352') ('4302', '24630878', '1370720228', None, None, None, None, None, '3239352') ('4302', None, None, None, None, None, None, None, '3239352') ('4302', '24630878', '1370720209', None, None, None, None, None, '3239352') ('4302', None, None, None, None, None, None, None, '3239352') ('4302', '24630878', '1370720207', None, None, None, None, None, '3239352') ('4302', None, None, None, None, None, None, None, '3239352') ('4302', '24630878', '1370720205', None, None, None, None, None, '3239352') ('4302', None, None, None, None, None, None, None, '3239352') ('4302', '24630878', '1370720196', None, None, None, None, None, '3239352') ('4302', None, None, None, None, None, None, None, '3239352') ('4302', '24630878', '1370720192', None, None, None, None, None, '3239352') ('4302', None, None, None, None, None, None, None, '3239352') ('4302', '24630878', '1370720190', None, None, None, None, None, '3239352') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 13 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '24630878', 'None', None, None, None, None, '3239352'), ('4302', '24630878', '1370720254', None, None, None, None, None, '3239352'), ('4302', '24630878', '1370720252', None, None, None, None, None, '3239352'), ('4302', '24630878', '1370720240', None, None, None, None, None, '3239352'), ('4302', '24630878', '1370720239', None, None, None, None, None, '3239352'), ('4302', '24630878', '1370720237', None, None, None, None, None, '3239352'), ('4302', '24630878', '1370720228', None, None, None, None, None, '3239352'), ('4302', '24630878', '1370720209', None, None, None, None, None, '3239352'), ('4302', '24630878', '1370720207', None, None, None, None, None, '3239352'), ('4302', '24630878', '1370720205', None, None, None, None, None, '3239352'), ('4302', '24630878', '1370720196', None, None, None, None, None, '3239352'), ('4302', '24630878', '1370720192', None, None, None, None, None, '3239352'), ('4302', '24630878', '1370720190', None, None, None, None, None, '3239352')] time used for this insertion : 0.01705145835876465 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.33444952964782715 time spend to save output : 0.017271041870117188 total time spend for step 5 : 0.35172057151794434 caffe_path_current : About to save ! 2 After save, about to update current ! ret : 2 len(input) + len(total_photo_id_missing) : 1 set_done_treatment DELETE from MTRPhoto.mtr_datou_current where id in (3239352) 2.09user 2.43system 0:06.92elapsed 65%CPU (0avgtext+0avgdata 161132maxresident)k 440inputs+7088outputs (3major+64396minor)pagefaults 0swaps