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 : 1836236 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 (2735002) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (2735002) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22167941 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['2735002'] with mtr_portfolio_ids : ['22167941'] and first list_photo_ids : [] new path : /proc/1836236/ Name: python3 Umask: 0002 State: R (running) Tgid: 1836236 Ngid: 0 Pid: 1836236 PPid: 1836235 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 1836236 NSpid: 1836236 NSpgid: 1833057 NSsid: 1833057 VmPeak: 1106928 kB VmSize: 1106928 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 98288 kB VmRSS: 98288 kB RssAnon: 59764 kB RssFile: 38524 kB RssShmem: 0 kB VmData: 865676 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 608 kB VmSwap: 0 kB HugetlbPages: 0 kB CoreDumping: 0 THP_enabled: 1 Threads: 1 SigQ: 0/63054 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: 55 nonvoluntary_ctxt_switches: 156 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '1836236', 'Ngid': '0', 'Pid': '1836236', 'PPid': '1836235', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '1836236', 'NSpid': '1836236', 'NSpgid': '1833057', 'NSsid': '1833057', 'VmPeak': '1106928 kB', 'VmSize': '1106928 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '98288 kB', 'VmRSS': '98288 kB', 'RssAnon': '59764 kB', 'RssFile': '38524 kB', 'RssShmem': '0 kB', 'VmData': '865676 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '608 kB', 'VmSwap': '0 kB', 'HugetlbPages': '0 kB', 'CoreDumping': '0', 'THP_enabled': '1', 'Threads': '1', 'SigQ': '0/63054', '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': '55', 'nonvoluntary_ctxt_switches': '156'} ('datou_batch_current', '1836236', '1106928', '0', '1106928', '865676', '98288', b'', 'marlene', '2735002') 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 (22167941) 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 (2735002 ) ) 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 (22167941) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1350800673, 'portfolio_id': 22167941}, {'photo_id': 1350800669, 'portfolio_id': 22167941}, {'photo_id': 1350800667, 'portfolio_id': 22167941}, {'photo_id': 1350800661, 'portfolio_id': 22167941}, {'photo_id': 1350800657, 'portfolio_id': 22167941}, {'photo_id': 1350800653, 'portfolio_id': 22167941}, {'photo_id': 1350800601, 'portfolio_id': 22167941}, {'photo_id': 1350800455, 'portfolio_id': 22167941}, {'photo_id': 1350800432, 'portfolio_id': 22167941}, {'photo_id': 1350800428, 'portfolio_id': 22167941}, {'photo_id': 1350799978, 'portfolio_id': 22167941}, {'photo_id': 1350799950, 'portfolio_id': 22167941}, {'photo_id': 1350799921, 'portfolio_id': 22167941}, {'photo_id': 1350799830, 'portfolio_id': 22167941}, {'photo_id': 1350799826, 'portfolio_id': 22167941}, {'photo_id': 1350799754, 'portfolio_id': 22167941}, {'photo_id': 1350799734, 'portfolio_id': 22167941}, {'photo_id': 1350799696, 'portfolio_id': 22167941}, {'photo_id': 1350799669, 'portfolio_id': 22167941}, {'photo_id': 1350799387, 'portfolio_id': 22167941}, {'photo_id': 1350799360, 'portfolio_id': 22167941}, {'photo_id': 1350799335, 'portfolio_id': 22167941}, {'photo_id': 1350799310, 'portfolio_id': 22167941}] map_portfolio_id_photo_id: {22167941: [1350800673, 1350800669, 1350800667, 1350800661, 1350800657, 1350800653, 1350800601, 1350800455, 1350800432, 1350800428, 1350799978, 1350799950, 1350799921, 1350799830, 1350799826, 1350799754, 1350799734, 1350799696, 1350799669, 1350799387, 1350799360, 1350799335, 1350799310]} ##### 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.014292478561401367 #### 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 Wed Apr 9 16:10: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 (22167941) 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 : 22167941 get user id for portfolio 22167941 get sub ptf for main ptf 22167941, type 3726 and hashtags ['flou', 'kraft', 'environnement', 'plastique', 'Carton_brun', 'metal', 'Carton_gris', 'Teint_Dans_La_Masse', 'autre_refus', 'papier', 'cartonnette', 'mal_croppe'] 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`=22167941 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('flou','kraft','environnement','plastique','Carton_brun','metal','Carton_gris','Teint_Dans_La_Masse','autre_refus','papier','cartonnette','mal_croppe')) 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`=22167941 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('flou','kraft','environnement','plastique','Carton_brun','metal','Carton_gris','Teint_Dans_La_Masse','autre_refus','papier','cartonnette','mal_croppe')) AND mptpi.`min_score`=0.5 To do returned map {'Teint_Dans_La_Masse': {'main_port_id': 22167941, 'sub_port_id': 22167944, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14643718, 'last_updated_at': datetime.datetime(2025, 4, 9, 16, 8, 58), 'last_updated_at_desc': datetime.datetime(2025, 4, 9, 16, 8, 58), 'last_updated_at_asc': datetime.datetime(2025, 4, 9, 16, 4, 58)}, 'Carton_gris': {'main_port_id': 22167941, 'sub_port_id': 22167945, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14643719, 'last_updated_at': datetime.datetime(2025, 4, 9, 16, 8, 58), 'last_updated_at_desc': datetime.datetime(2025, 4, 9, 16, 8, 58), 'last_updated_at_asc': datetime.datetime(2025, 4, 9, 16, 4, 58)}, 'environnement': {'main_port_id': 22167941, 'sub_port_id': 22167946, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14643720, 'last_updated_at': datetime.datetime(2025, 4, 9, 16, 8, 58), 'last_updated_at_desc': datetime.datetime(2025, 4, 9, 16, 8, 58), 'last_updated_at_asc': datetime.datetime(2025, 4, 9, 16, 4, 58)}, 'papier': {'main_port_id': 22167941, 'sub_port_id': 22167947, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14643721, 'last_updated_at': datetime.datetime(2025, 4, 9, 16, 8, 58), 'last_updated_at_desc': datetime.datetime(2025, 4, 9, 16, 8, 58), 'last_updated_at_asc': datetime.datetime(2025, 4, 9, 16, 4, 58)}, 'plastique': {'main_port_id': 22167941, 'sub_port_id': 22167948, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14643722, 'last_updated_at': datetime.datetime(2025, 4, 9, 16, 8, 58), 'last_updated_at_desc': datetime.datetime(2025, 4, 9, 16, 8, 58), 'last_updated_at_asc': datetime.datetime(2025, 4, 9, 16, 4, 58)}, 'mal_croppe': {'main_port_id': 22167941, 'sub_port_id': 22167949, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14643723, 'last_updated_at': datetime.datetime(2025, 4, 9, 16, 8, 58), 'last_updated_at_desc': datetime.datetime(2025, 4, 9, 16, 8, 58), 'last_updated_at_asc': datetime.datetime(2025, 4, 9, 16, 4, 58)}, 'flou': {'main_port_id': 22167941, 'sub_port_id': 22167950, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14643724, 'last_updated_at': datetime.datetime(2025, 4, 9, 16, 8, 58), 'last_updated_at_desc': datetime.datetime(2025, 4, 9, 16, 8, 58), 'last_updated_at_asc': datetime.datetime(2025, 4, 9, 16, 4, 58)}, 'cartonnette': {'main_port_id': 22167941, 'sub_port_id': 22167951, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14643725, 'last_updated_at': datetime.datetime(2025, 4, 9, 16, 8, 58), 'last_updated_at_desc': datetime.datetime(2025, 4, 9, 16, 8, 58), 'last_updated_at_asc': datetime.datetime(2025, 4, 9, 16, 4, 58)}, 'metal': {'main_port_id': 22167941, 'sub_port_id': 22167952, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14643726, 'last_updated_at': datetime.datetime(2025, 4, 9, 16, 8, 58), 'last_updated_at_desc': datetime.datetime(2025, 4, 9, 16, 8, 58), 'last_updated_at_asc': datetime.datetime(2025, 4, 9, 16, 4, 58)}, 'Carton_brun': {'main_port_id': 22167941, 'sub_port_id': 22167953, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14643727, 'last_updated_at': datetime.datetime(2025, 4, 9, 16, 8, 58), 'last_updated_at_desc': datetime.datetime(2025, 4, 9, 16, 8, 58), 'last_updated_at_asc': datetime.datetime(2025, 4, 9, 16, 4, 58)}, 'kraft': {'main_port_id': 22167941, 'sub_port_id': 22167954, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14643728, 'last_updated_at': datetime.datetime(2025, 4, 9, 16, 8, 58), 'last_updated_at_desc': datetime.datetime(2025, 4, 9, 16, 8, 58), 'last_updated_at_asc': datetime.datetime(2025, 4, 9, 16, 4, 58)}, 'autre_refus': {'main_port_id': 22167941, 'sub_port_id': 22167955, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14643729, 'last_updated_at': datetime.datetime(2025, 4, 9, 16, 8, 58), 'last_updated_at_desc': datetime.datetime(2025, 4, 9, 16, 8, 58), 'last_updated_at_asc': datetime.datetime(2025, 4, 9, 16, 4, 58)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22167944 , 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=22167941 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 (22167944) result : ((1350800067,), (1350800325,), (1350800343,), (1350800345,), (1350800346,), (1350800347,), (1350800348,), (1350800349,), (1350800679,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22167941) result : ((1350799310,), (1350799335,), (1350799360,), (1350799387,), (1350799669,), (1350799696,), (1350799734,), (1350799754,), (1350799826,), (1350799830,), (1350799921,), (1350799950,), (1350799978,), (1350800428,), (1350800432,), (1350800455,), (1350800601,), (1350800653,), (1350800657,), (1350800661,), (1350800667,), (1350800669,), (1350800673,)) 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 22167945 , 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=22167941 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 (22167945) result : ((1350800070,), (1350800326,), (1350800354,), (1350800355,), (1350800356,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22167941) result : ((1350799310,), (1350799335,), (1350799360,), (1350799387,), (1350799669,), (1350799696,), (1350799734,), (1350799754,), (1350799826,), (1350799830,), (1350799921,), (1350799950,), (1350799978,), (1350800428,), (1350800432,), (1350800455,), (1350800601,), (1350800653,), (1350800657,), (1350800661,), (1350800667,), (1350800669,), (1350800673,)) 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 22167946 , 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=22167941 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 (22167946) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22167941) result : ((1350799310,), (1350799335,), (1350799360,), (1350799387,), (1350799669,), (1350799696,), (1350799734,), (1350799754,), (1350799826,), (1350799830,), (1350799921,), (1350799950,), (1350799978,), (1350800428,), (1350800432,), (1350800455,), (1350800601,), (1350800653,), (1350800657,), (1350800661,), (1350800667,), (1350800669,), (1350800673,)) 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 22167947 , 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=22167941 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 (22167947) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22167941) result : ((1350799310,), (1350799335,), (1350799360,), (1350799387,), (1350799669,), (1350799696,), (1350799734,), (1350799754,), (1350799826,), (1350799830,), (1350799921,), (1350799950,), (1350799978,), (1350800428,), (1350800432,), (1350800455,), (1350800601,), (1350800653,), (1350800657,), (1350800661,), (1350800667,), (1350800669,), (1350800673,)) 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 22167948 , 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=22167941 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 (22167948) result : ((1350800073,), (1350800368,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22167941) result : ((1350799310,), (1350799335,), (1350799360,), (1350799387,), (1350799669,), (1350799696,), (1350799734,), (1350799754,), (1350799826,), (1350799830,), (1350799921,), (1350799950,), (1350799978,), (1350800428,), (1350800432,), (1350800455,), (1350800601,), (1350800653,), (1350800657,), (1350800661,), (1350800667,), (1350800669,), (1350800673,)) 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 22167949 , 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=22167941 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 (22167949) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22167941) result : ((1350799310,), (1350799335,), (1350799360,), (1350799387,), (1350799669,), (1350799696,), (1350799734,), (1350799754,), (1350799826,), (1350799830,), (1350799921,), (1350799950,), (1350799978,), (1350800428,), (1350800432,), (1350800455,), (1350800601,), (1350800653,), (1350800657,), (1350800661,), (1350800667,), (1350800669,), (1350800673,)) 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 22167950 , 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=22167941 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 (22167950) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22167941) result : ((1350799310,), (1350799335,), (1350799360,), (1350799387,), (1350799669,), (1350799696,), (1350799734,), (1350799754,), (1350799826,), (1350799830,), (1350799921,), (1350799950,), (1350799978,), (1350800428,), (1350800432,), (1350800455,), (1350800601,), (1350800653,), (1350800657,), (1350800661,), (1350800667,), (1350800669,), (1350800673,)) 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 22167951 , 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=22167941 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 (22167951) result : ((1350800327,), (1350800363,), (1350800365,), (1350800366,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22167941) result : ((1350799310,), (1350799335,), (1350799360,), (1350799387,), (1350799669,), (1350799696,), (1350799734,), (1350799754,), (1350799826,), (1350799830,), (1350799921,), (1350799950,), (1350799978,), (1350800428,), (1350800432,), (1350800455,), (1350800601,), (1350800653,), (1350800657,), (1350800661,), (1350800667,), (1350800669,), (1350800673,)) 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 22167952 , 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=22167941 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 (22167952) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22167941) result : ((1350799310,), (1350799335,), (1350799360,), (1350799387,), (1350799669,), (1350799696,), (1350799734,), (1350799754,), (1350799826,), (1350799830,), (1350799921,), (1350799950,), (1350799978,), (1350800428,), (1350800432,), (1350800455,), (1350800601,), (1350800653,), (1350800657,), (1350800661,), (1350800667,), (1350800669,), (1350800673,)) 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 22167953 , 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=22167941 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 (22167953) result : ((1350800071,), (1350800683,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22167941) result : ((1350799310,), (1350799335,), (1350799360,), (1350799387,), (1350799669,), (1350799696,), (1350799734,), (1350799754,), (1350799826,), (1350799830,), (1350799921,), (1350799950,), (1350799978,), (1350800428,), (1350800432,), (1350800455,), (1350800601,), (1350800653,), (1350800657,), (1350800661,), (1350800667,), (1350800669,), (1350800673,)) 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 22167954 , 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=22167941 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 (22167954) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22167941) result : ((1350799310,), (1350799335,), (1350799360,), (1350799387,), (1350799669,), (1350799696,), (1350799734,), (1350799754,), (1350799826,), (1350799830,), (1350799921,), (1350799950,), (1350799978,), (1350800428,), (1350800432,), (1350800455,), (1350800601,), (1350800653,), (1350800657,), (1350800661,), (1350800667,), (1350800669,), (1350800673,)) 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 22167955 , 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=22167941 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 (22167955) result : ((1350800068,), (1350800352,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22167941) result : ((1350799310,), (1350799335,), (1350799360,), (1350799387,), (1350799669,), (1350799696,), (1350799734,), (1350799754,), (1350799826,), (1350799830,), (1350799921,), (1350799950,), (1350799978,), (1350800428,), (1350800432,), (1350800455,), (1350800601,), (1350800653,), (1350800657,), (1350800661,), (1350800667,), (1350800669,), (1350800673,)) 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`=22167941 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('flou','kraft','environnement','plastique','Carton_brun','metal','Carton_gris','Teint_Dans_La_Masse','autre_refus','papier','cartonnette','mal_croppe')) 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`=22167941 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('flou','kraft','environnement','plastique','Carton_brun','metal','Carton_gris','Teint_Dans_La_Masse','autre_refus','papier','cartonnette','mal_croppe')) AND mptpi.`min_score`=0.5 To do returned map {'Teint_Dans_La_Masse': {'main_port_id': 22167941, 'sub_port_id': 22167956, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14643730, 'last_updated_at': datetime.datetime(2025, 4, 9, 16, 5), 'last_updated_at_desc': datetime.datetime(2025, 4, 9, 16, 5), 'last_updated_at_asc': datetime.datetime(2025, 4, 9, 16, 5)}, 'Carton_gris': {'main_port_id': 22167941, 'sub_port_id': 22167957, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14643731, 'last_updated_at': datetime.datetime(2025, 4, 9, 16, 5), 'last_updated_at_desc': datetime.datetime(2025, 4, 9, 16, 5), 'last_updated_at_asc': datetime.datetime(2025, 4, 9, 16, 5)}, 'environnement': {'main_port_id': 22167941, 'sub_port_id': 22167958, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14643732, 'last_updated_at': datetime.datetime(2025, 4, 9, 16, 5), 'last_updated_at_desc': datetime.datetime(2025, 4, 9, 16, 5), 'last_updated_at_asc': datetime.datetime(2025, 4, 9, 16, 5)}, 'papier': {'main_port_id': 22167941, 'sub_port_id': 22167959, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14643733, 'last_updated_at': datetime.datetime(2025, 4, 9, 16, 5), 'last_updated_at_desc': datetime.datetime(2025, 4, 9, 16, 5), 'last_updated_at_asc': datetime.datetime(2025, 4, 9, 16, 5)}, 'plastique': {'main_port_id': 22167941, 'sub_port_id': 22167960, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14643734, 'last_updated_at': datetime.datetime(2025, 4, 9, 16, 5), 'last_updated_at_desc': datetime.datetime(2025, 4, 9, 16, 5), 'last_updated_at_asc': datetime.datetime(2025, 4, 9, 16, 5)}, 'mal_croppe': {'main_port_id': 22167941, 'sub_port_id': 22167961, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14643735, 'last_updated_at': datetime.datetime(2025, 4, 9, 16, 5), 'last_updated_at_desc': datetime.datetime(2025, 4, 9, 16, 5), 'last_updated_at_asc': datetime.datetime(2025, 4, 9, 16, 5)}, 'flou': {'main_port_id': 22167941, 'sub_port_id': 22167962, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14643736, 'last_updated_at': datetime.datetime(2025, 4, 9, 16, 5), 'last_updated_at_desc': datetime.datetime(2025, 4, 9, 16, 5), 'last_updated_at_asc': datetime.datetime(2025, 4, 9, 16, 5)}, 'cartonnette': {'main_port_id': 22167941, 'sub_port_id': 22167963, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14643737, 'last_updated_at': datetime.datetime(2025, 4, 9, 16, 5), 'last_updated_at_desc': datetime.datetime(2025, 4, 9, 16, 5), 'last_updated_at_asc': datetime.datetime(2025, 4, 9, 16, 5)}, 'metal': {'main_port_id': 22167941, 'sub_port_id': 22167964, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14643738, 'last_updated_at': datetime.datetime(2025, 4, 9, 16, 5), 'last_updated_at_desc': datetime.datetime(2025, 4, 9, 16, 5), 'last_updated_at_asc': datetime.datetime(2025, 4, 9, 16, 5)}, 'Carton_brun': {'main_port_id': 22167941, 'sub_port_id': 22167965, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14643739, 'last_updated_at': datetime.datetime(2025, 4, 9, 16, 5), 'last_updated_at_desc': datetime.datetime(2025, 4, 9, 16, 5), 'last_updated_at_asc': datetime.datetime(2025, 4, 9, 16, 5)}, 'kraft': {'main_port_id': 22167941, 'sub_port_id': 22167966, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14643740, 'last_updated_at': datetime.datetime(2025, 4, 9, 16, 5), 'last_updated_at_desc': datetime.datetime(2025, 4, 9, 16, 5), 'last_updated_at_asc': datetime.datetime(2025, 4, 9, 16, 5)}, 'autre_refus': {'main_port_id': 22167941, 'sub_port_id': 22167967, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14643741, 'last_updated_at': datetime.datetime(2025, 4, 9, 16, 8, 58), 'last_updated_at_desc': datetime.datetime(2025, 4, 9, 16, 8, 58), 'last_updated_at_asc': datetime.datetime(2025, 4, 9, 16, 5)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22167956,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22167944 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22167957,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22167945 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22167958,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22167946 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22167959,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22167947 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22167960,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22167948 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22167961,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22167949 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22167962,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22167950 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22167963,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22167951 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22167964,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22167952 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22167965,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22167953 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22167966,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22167954 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22167967,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22167955 lien utilise dans velours : https://www.fotonower.com/velours/22167956,22167957,22167958,22167959,22167960,22167961,22167962,22167963,22167964,22167965,22167966,22167967?tags=Teint_Dans_La_Masse,Carton_gris,environnement,papier,plastique,mal_croppe,flou,cartonnette,metal,Carton_brun,kraft,autre_refus After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22167941]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1350800673, 1350800669, 1350800667, 1350800661, 1350800657, 1350800653] map_info['map_portfolio_photo'] : {22167941: [1350800673, 1350800669, 1350800667, 1350800661, 1350800657, 1350800653, 1350800601, 1350800455, 1350800432, 1350800428, 1350799978, 1350799950, 1350799921, 1350799830, 1350799826, 1350799754, 1350799734, 1350799696, 1350799669, 1350799387, 1350799360, 1350799335, 1350799310]} final : False mtd_id 4302 list_pids : [1350800673, 1350800669, 1350800667, 1350800661, 1350800657, 1350800653] Looping around the photos to save general results len do output : 1 /22167941. 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, '2735002') ('4302', '22167941', '1350800673', None, None, None, None, None, '2735002') ('4302', None, None, None, None, None, None, None, '2735002') ('4302', '22167941', '1350800669', None, None, None, None, None, '2735002') ('4302', None, None, None, None, None, None, None, '2735002') ('4302', '22167941', '1350800667', None, None, None, None, None, '2735002') ('4302', None, None, None, None, None, None, None, '2735002') ('4302', '22167941', '1350800661', None, None, None, None, None, '2735002') ('4302', None, None, None, None, None, None, None, '2735002') ('4302', '22167941', '1350800657', None, None, None, None, None, '2735002') ('4302', None, None, None, None, None, None, None, '2735002') ('4302', '22167941', '1350800653', None, None, None, None, None, '2735002') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 7 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, '22167941', "{'Teint_Dans_La_Masse': 22167944, 'Carton_gris': 22167945, 'environnement': 22167946, 'papier': 22167947, 'plastique': 22167948, 'mal_croppe': 22167949, 'flou': 22167950, 'cartonnette': 22167951, 'metal': 22167952, 'Carton_brun': 22167953, 'kraft': 22167954, 'autre_refus': 22167955}", None, None, None, None, '2735002'), ('4302', '22167941', '1350800673', None, None, None, None, None, '2735002'), ('4302', '22167941', '1350800669', None, None, None, None, None, '2735002'), ('4302', '22167941', '1350800667', None, None, None, None, None, '2735002'), ('4302', '22167941', '1350800661', None, None, None, None, None, '2735002'), ('4302', '22167941', '1350800657', None, None, None, None, None, '2735002'), ('4302', '22167941', '1350800653', None, None, None, None, None, '2735002')] time used for this insertion : 0.013741493225097656 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.3977923393249512 time spend to save output : 0.013973236083984375 total time spend for step 1 : 1.4117655754089355 step2:final Wed Apr 9 16:10: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 (22167941) 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 22167941 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1350799387,1350799360,1350799335,1350799310,1350799830,1350799826,1350799754,1350799734,1350799696,1350799669,1350799978,1350799950,1350799921,1350800455,1350800432,1350800428,1350800601,1350800673,1350800669,1350800667,1350800661,1350800657,1350800653); 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([22167941]) Inside saveOutput : final : False verbose : True original output for save of step final : {1350800673: ('0.048575091159425245',), 1350800669: ('0.048575091159425245',), 1350800667: ('0.048575091159425245',), 1350800661: ('0.048575091159425245',), 1350800657: ('0.048575091159425245',), 1350800653: ('0.048575091159425245',)} new output for save of step final : {1350800673: ('0.048575091159425245',), 1350800669: ('0.048575091159425245',), 1350800667: ('0.048575091159425245',), 1350800661: ('0.048575091159425245',), 1350800657: ('0.048575091159425245',), 1350800653: ('0.048575091159425245',)} [1350800673, 1350800669, 1350800667, 1350800661, 1350800657, 1350800653] map_info['map_portfolio_photo'] : {22167941: [1350800673, 1350800669, 1350800667, 1350800661, 1350800657, 1350800653, 1350800601, 1350800455, 1350800432, 1350800428, 1350799978, 1350799950, 1350799921, 1350799830, 1350799826, 1350799754, 1350799734, 1350799696, 1350799669, 1350799387, 1350799360, 1350799335, 1350799310]} final : False mtd_id 4302 list_pids : [1350800673, 1350800669, 1350800667, 1350800661, 1350800657, 1350800653] Looping around the photos to save general results len do output : 6 /1350800673.Didn't retrieve data . /1350800669.Didn't retrieve data . /1350800667.Didn't retrieve data . /1350800661.Didn't retrieve data . /1350800657.Didn't retrieve data . /1350800653.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, '2735002') ('4302', '22167941', '1350800673', None, None, None, None, None, '2735002') ('4302', None, None, None, None, None, None, None, '2735002') ('4302', '22167941', '1350800669', None, None, None, None, None, '2735002') ('4302', None, None, None, None, None, None, None, '2735002') ('4302', '22167941', '1350800667', None, None, None, None, None, '2735002') ('4302', None, None, None, None, None, None, None, '2735002') ('4302', '22167941', '1350800661', None, None, None, None, None, '2735002') ('4302', None, None, None, None, None, None, None, '2735002') ('4302', '22167941', '1350800657', None, None, None, None, None, '2735002') ('4302', None, None, None, None, None, None, None, '2735002') ('4302', '22167941', '1350800653', None, None, None, None, None, '2735002') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 18 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', '22167941', '1350800673', '0.048575091159425245', None, None, None, None, '2735002'), ('4302', '22167941', '1350800669', '0.048575091159425245', None, None, None, None, '2735002'), ('4302', '22167941', '1350800667', '0.048575091159425245', None, None, None, None, '2735002'), ('4302', '22167941', '1350800661', '0.048575091159425245', None, None, None, None, '2735002'), ('4302', '22167941', '1350800657', '0.048575091159425245', None, None, None, None, '2735002'), ('4302', '22167941', '1350800653', '0.048575091159425245', None, None, None, None, '2735002')] time used for this insertion : 0.01620173454284668 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.07055854797363281 time spend to save output : 0.016807079315185547 total time spend for step 2 : 0.08736562728881836 step3:velours_tree Wed Apr 9 16:10: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 : {22167941: [{'Teint_Dans_La_Masse': 22167944, 'Carton_gris': 22167945, 'environnement': 22167946, 'papier': 22167947, 'plastique': 22167948, 'mal_croppe': 22167949, 'flou': 22167950, 'cartonnette': 22167951, 'metal': 22167952, 'Carton_brun': 22167953, 'kraft': 22167954, 'autre_refus': 22167955}]} input_args_next_step : {22167941: ()} output_args : {22167941: [{'Teint_Dans_La_Masse': 22167944, 'Carton_gris': 22167945, 'environnement': 22167946, 'papier': 22167947, 'plastique': 22167948, 'mal_croppe': 22167949, 'flou': 22167950, 'cartonnette': 22167951, 'metal': 22167952, 'Carton_brun': 22167953, 'kraft': 22167954, 'autre_refus': 22167955}]} args : 22167941 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 : ({'Teint_Dans_La_Masse': 22167944, 'Carton_gris': 22167945, 'environnement': 22167946, 'papier': 22167947, 'plastique': 22167948, 'mal_croppe': 22167949, 'flou': 22167950, 'cartonnette': 22167951, 'metal': 22167952, 'Carton_brun': 22167953, 'kraft': 22167954, 'autre_refus': 22167955},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22167941) 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([22167941]) 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.34708619117736816 time spend to save output : 4.744529724121094e-05 total time spend for step 3 : 0.3471336364746094 step4:send_mail_cod Wed Apr 9 16:10: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 : {1350800673: ('0.048575091159425245',), 1350800669: ('0.048575091159425245',), 1350800667: ('0.048575091159425245',), 1350800661: ('0.048575091159425245',), 1350800657: ('0.048575091159425245',), 1350800653: ('0.048575091159425245',)} input_args_next_step : {1350800673: ()} output_args : {1350800673: ('0.048575091159425245',), 1350800669: ('0.048575091159425245',), 1350800667: ('0.048575091159425245',), 1350800661: ('0.048575091159425245',), 1350800657: ('0.048575091159425245',), 1350800653: ('0.048575091159425245',)} args : 1350800673 depend.output_id : 0 input_args_next_step : {1350800673: ('0.048575091159425245',), 1350800669: ()} output_args : {1350800673: ('0.048575091159425245',), 1350800669: ('0.048575091159425245',), 1350800667: ('0.048575091159425245',), 1350800661: ('0.048575091159425245',), 1350800657: ('0.048575091159425245',), 1350800653: ('0.048575091159425245',)} args : 1350800669 depend.output_id : 0 input_args_next_step : {1350800673: ('0.048575091159425245',), 1350800669: ('0.048575091159425245',), 1350800667: ()} output_args : {1350800673: ('0.048575091159425245',), 1350800669: ('0.048575091159425245',), 1350800667: ('0.048575091159425245',), 1350800661: ('0.048575091159425245',), 1350800657: ('0.048575091159425245',), 1350800653: ('0.048575091159425245',)} args : 1350800667 depend.output_id : 0 input_args_next_step : {1350800673: ('0.048575091159425245',), 1350800669: ('0.048575091159425245',), 1350800667: ('0.048575091159425245',), 1350800661: ()} output_args : {1350800673: ('0.048575091159425245',), 1350800669: ('0.048575091159425245',), 1350800667: ('0.048575091159425245',), 1350800661: ('0.048575091159425245',), 1350800657: ('0.048575091159425245',), 1350800653: ('0.048575091159425245',)} args : 1350800661 depend.output_id : 0 input_args_next_step : {1350800673: ('0.048575091159425245',), 1350800669: ('0.048575091159425245',), 1350800667: ('0.048575091159425245',), 1350800661: ('0.048575091159425245',), 1350800657: ()} output_args : {1350800673: ('0.048575091159425245',), 1350800669: ('0.048575091159425245',), 1350800667: ('0.048575091159425245',), 1350800661: ('0.048575091159425245',), 1350800657: ('0.048575091159425245',), 1350800653: ('0.048575091159425245',)} args : 1350800657 depend.output_id : 0 input_args_next_step : {1350800673: ('0.048575091159425245',), 1350800669: ('0.048575091159425245',), 1350800667: ('0.048575091159425245',), 1350800661: ('0.048575091159425245',), 1350800657: ('0.048575091159425245',), 1350800653: ()} output_args : {1350800673: ('0.048575091159425245',), 1350800669: ('0.048575091159425245',), 1350800667: ('0.048575091159425245',), 1350800661: ('0.048575091159425245',), 1350800657: ('0.048575091159425245',), 1350800653: ('0.048575091159425245',)} args : 1350800653 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 : {22167941: [{'Teint_Dans_La_Masse': 22167944, 'Carton_gris': 22167945, 'environnement': 22167946, 'papier': 22167947, 'plastique': 22167948, 'mal_croppe': 22167949, 'flou': 22167950, 'cartonnette': 22167951, 'metal': 22167952, 'Carton_brun': 22167953, 'kraft': 22167954, 'autre_refus': 22167955}]} input_args_next_step : {1350800673: ('0.048575091159425245',), 1350800669: ('0.048575091159425245',), 1350800667: ('0.048575091159425245',), 1350800661: ('0.048575091159425245',), 1350800657: ('0.048575091159425245',), 1350800653: ('0.048575091159425245',), 22167941: ()} output_args : {22167941: [{'Teint_Dans_La_Masse': 22167944, 'Carton_gris': 22167945, 'environnement': 22167946, 'papier': 22167947, 'plastique': 22167948, 'mal_croppe': 22167949, 'flou': 22167950, 'cartonnette': 22167951, 'metal': 22167952, 'Carton_brun': 22167953, 'kraft': 22167954, 'autre_refus': 22167955}]} args : 22167941 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 :7, first value : ('0.048575091159425245',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22167941) 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 (1350800673,1350800669,1350800667,1350800661,1350800657,1350800653) Found this number of photos: 6 ##### Call download_photos : nb_thread : 5 begin to download photo : 1350800653 begin to download photo : 1350800661 begin to download photo : 1350800669 download finish for photo 1350800661 begin to download photo : 1350800667 download finish for photo 1350800669 begin to download photo : 1350800673 download finish for photo 1350800653 begin to download photo : 1350800657 download finish for photo 1350800673 download finish for photo 1350800667 download finish for photo 1350800657 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos length of list_filenames : 6 ; length of list_pids : 6 ; length of list_args : 6 results_Auto_P22167941_09-04-2025_16_10_59.pdf 22167948 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=22167948 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1350800073: '1744207391_2870067_1350799335_2ec86b935c226fffd73cb74e9d132790_rle_crop_3751676740_0.png', 1350800368: '1744207526_2495058_1350799754_2c4f130320353092fd304a7846ec62cc_rle_crop_3751677997_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/9/6d7ba4acab2863b0960f424ee2559256_5181198.png change filename to text .imagette221679481744207859/ imagette221679481744207859/1744207526_2495058_1350799754_2c4f130320353092fd304a7846ec62cc_rle_crop_3751677997_0.png.png imagette221679481744207859/1744207391_2870067_1350799335_2ec86b935c226fffd73cb74e9d132790_rle_crop_3751676740_0.png.png imagette221679491744207860/ imagette221679501744207860/ wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/9/952842d941978397dc5054d32cf368fa_6189544.png imagette221679481744207859 22167949 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=22167949 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette221679491744207860 22167950 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=22167950 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette221679501744207860 22167951 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=22167951 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1350800327: '1744207511_2871720_1350799921_986a38b6b68c63efd4956823160d4296_rle_crop_3751677959_0.png', 1350800363: '1744207526_2495058_1350799978_247ad01763bd5e4689781d07eb01cc83_rle_crop_3751677974_0.png', 1350800365: '1744207526_2495058_1350799826_2205fe9737c7063f73fe00febd712144_rle_crop_3751677984_0.png', 1350800366: '1744207526_2495058_1350799734_bb70b00f9da804e597e91c9ae34375ba_rle_crop_3751678013_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/9/8ddeadbaf8f902ddb1e9314171bade13_25225407.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/9/dc546f0aee79d9ee50215646c290339d_84740867.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/9/626e4715c8a8c2352775c2a8c2be9034_65469159.png change filename to text .imagette221679511744207860/ imagette221679511744207860/1744207526_2495058_1350799978_247ad01763bd5e4689781d07eb01cc83_rle_crop_3751677974_0.png.png imagette221679511744207860/1744207526_2495058_1350799734_bb70b00f9da804e597e91c9ae34375ba_rle_crop_3751678013_0.png.png imagette221679511744207860/1744207511_2871720_1350799921_986a38b6b68c63efd4956823160d4296_rle_crop_3751677959_0.png.png imagette221679511744207860/1744207526_2495058_1350799826_2205fe9737c7063f73fe00febd712144_rle_crop_3751677984_0.png.png imagette221679521744207860/ imagette221679541744207860/ wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/9/9282e498f095c5a468dd887dc5d3f620_70822235.png imagette221679511744207860 22167952 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=22167952 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette221679521744207860 22167954 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=22167954 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette221679541744207860 22167955 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=22167955 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1350800068: '1744207391_2870067_1350799387_cca9cf05a97a5edbbd7e4f99c86eb3d4_rle_crop_3751676029_0.png', 1350800352: '1744207526_2495058_1350799826_2205fe9737c7063f73fe00febd712144_rle_crop_3751677980_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/9/ddeafd9dcab8a3095e4840ee326713d1_93998337.png change filename to text .imagette221679551744207860/ imagette221679551744207860/1744207391_2870067_1350799387_cca9cf05a97a5edbbd7e4f99c86eb3d4_rle_crop_3751676029_0.png.png imagette221679551744207860/1744207526_2495058_1350799826_2205fe9737c7063f73fe00febd712144_rle_crop_3751677980_0.png.png wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/9/773fec205670a7ef51dd7b0252bdf2a6_58984007.png imagette221679551744207860 22167944 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=22167944 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1350800067: '1744207391_2870067_1350799360_22e3ababc96dc06b64ce542250102da2_rle_crop_3751676724_0.png', 1350800325: '1744207511_2871720_1350799950_cee39f97acc0ec1a02252f975c121529_rle_crop_3751677947_0.png', 1350800343: '1744207526_2495058_1350799978_247ad01763bd5e4689781d07eb01cc83_rle_crop_3751677970_0.png', 1350800345: '1744207526_2495058_1350799826_2205fe9737c7063f73fe00febd712144_rle_crop_3751677986_0.png', 1350800346: '1744207526_2495058_1350799754_2c4f130320353092fd304a7846ec62cc_rle_crop_3751678001_0.png', 1350800347: '1744207526_2495058_1350799754_2c4f130320353092fd304a7846ec62cc_rle_crop_3751677998_0.png', 1350800348: '1744207526_2495058_1350799734_bb70b00f9da804e597e91c9ae34375ba_rle_crop_3751678014_0.png', 1350800349: '1744207526_2495058_1350799669_3860d81b2a7e6ec48ca7a4885ff1e38c_rle_crop_3751678034_0.png', 1350800679: '1744207743_2874818_1350800428_14ab0a152b9134fd2872b9aea5222c91_rle_crop_3751680066_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/9/f9c192a3fa340cf43a236e9645fb975c_99357393.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/9/bfd63a96e7a2756ccd405a7b52955b31_67350539.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/9/9cf965d431a4fcfa5473f854dab4bc88_76761759.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/9/e2b6b2a8ac52c210abdad257bb70968f_99405428.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/9/58c4529ce81070a7f8e6969cb7427498_69137841.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/9/16abba235845d291249d33248e819adc_60269060.png change filename to text .wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/9/2ef1fd8aa506e5687799143624cec075_49079161.png change filename to text .wget -O 8.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/9/1b530cab4d5441308da00e0c0af821df_27749750.png change filename to text .imagette221679441744207860/ imagette221679441744207860/1744207526_2495058_1350799669_3860d81b2a7e6ec48ca7a4885ff1e38c_rle_crop_3751678034_0.png.png imagette221679441744207860/1744207526_2495058_1350799826_2205fe9737c7063f73fe00febd712144_rle_crop_3751677986_0.png.png imagette221679441744207860/1744207391_2870067_1350799360_22e3ababc96dc06b64ce542250102da2_rle_crop_3751676724_0.png.png imagette221679441744207860/1744207526_2495058_1350799978_247ad01763bd5e4689781d07eb01cc83_rle_crop_3751677970_0.png.png imagette221679441744207860/1744207526_2495058_1350799754_2c4f130320353092fd304a7846ec62cc_rle_crop_3751678001_0.png.png imagette221679441744207860/1744207526_2495058_1350799734_bb70b00f9da804e597e91c9ae34375ba_rle_crop_3751678014_0.png.png imagette221679441744207860/1744207526_2495058_1350799754_2c4f130320353092fd304a7846ec62cc_rle_crop_3751677998_0.png.png imagette221679441744207860/1744207743_2874818_1350800428_14ab0a152b9134fd2872b9aea5222c91_rle_crop_3751680066_0.png.png imagette221679441744207860/1744207511_2871720_1350799950_cee39f97acc0ec1a02252f975c121529_rle_crop_3751677947_0.png.png wget -O 9.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/9/f666648b539b1400023036eae2e07cf1_49104765.png imagette221679441744207860 22167945 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=22167945 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1350800070: '1744207391_2870067_1350799335_2ec86b935c226fffd73cb74e9d132790_rle_crop_3751676739_0.png', 1350800326: '1744207511_2871720_1350799921_986a38b6b68c63efd4956823160d4296_rle_crop_3751677957_0.png', 1350800354: '1744207526_2495058_1350799978_247ad01763bd5e4689781d07eb01cc83_rle_crop_3751677968_0.png', 1350800355: '1744207526_2495058_1350799696_fb33d6282fbeb56095e99a4919004d35_rle_crop_3751678025_0.png', 1350800356: '1744207526_2495058_1350799669_3860d81b2a7e6ec48ca7a4885ff1e38c_rle_crop_3751678035_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/9/862aa5a6c8a5a68617a42c11ef086692_8147838.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/9/f0c4f9c10d14351aa4e20a578d941c8e_88440847.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/9/84e4503135fcd632de86ac17319ea301_68155164.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/9/ef57e37d9a477f5c315c3f6e8203ad6c_72083705.png change filename to text .imagette221679451744207860/ imagette221679451744207860/1744207526_2495058_1350799669_3860d81b2a7e6ec48ca7a4885ff1e38c_rle_crop_3751678035_0.png.png imagette221679451744207860/1744207511_2871720_1350799921_986a38b6b68c63efd4956823160d4296_rle_crop_3751677957_0.png.png imagette221679451744207860/1744207391_2870067_1350799335_2ec86b935c226fffd73cb74e9d132790_rle_crop_3751676739_0.png.png imagette221679451744207860/1744207526_2495058_1350799696_fb33d6282fbeb56095e99a4919004d35_rle_crop_3751678025_0.png.png imagette221679451744207860/1744207526_2495058_1350799978_247ad01763bd5e4689781d07eb01cc83_rle_crop_3751677968_0.png.png wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/9/e43f5ca871d073aa37fdd3ebac3683a8_7301000.png imagette221679451744207860 22167953 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=22167953 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1350800071: '1744207391_2870067_1350799310_9e34904789358e298d41c5558252412c_rle_crop_3751676769_0.png', 1350800683: '1744207754_2875047_1350800455_5097b1d65d70d0ebeb385c6177e7aebc_rle_crop_3751680076_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/9/73244fdf8d5ee33edaeac5289eafc556_88035557.png change filename to text .imagette221679531744207861/ imagette221679531744207861/1744207754_2875047_1350800455_5097b1d65d70d0ebeb385c6177e7aebc_rle_crop_3751680076_0.png.png imagette221679531744207861/1744207391_2870067_1350799310_9e34904789358e298d41c5558252412c_rle_crop_3751676769_0.png.png wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/9/aa067c3a7f66207f90d85ba2749d859b_34621750.png imagette221679531744207861 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=22167941 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/22167956,22167957,22167958,22167959,22167960,22167961,22167962,22167963,22167964,22167965,22167966,22167967?tags=Teint_Dans_La_Masse,Carton_gris,environnement,papier,plastique,mal_croppe,flou,cartonnette,metal,Carton_brun,kraft,autre_refus your option no_mail is active, we will not send the real mail to your client args[1350800673] : ('0.048575091159425245',) no score found for photo 1350800673 We are sending mail with results at report@fotonower.com args[1350800669] : ('0.048575091159425245',) no score found for photo 1350800669 We are sending mail with results at report@fotonower.com args[1350800667] : ('0.048575091159425245',) no score found for photo 1350800667 We are sending mail with results at report@fotonower.com args[1350800661] : ('0.048575091159425245',) no score found for photo 1350800661 We are sending mail with results at report@fotonower.com args[1350800657] : ('0.048575091159425245',) no score found for photo 1350800657 We are sending mail with results at report@fotonower.com args[1350800653] : ('0.048575091159425245',) no score found for photo 1350800653 We are sending mail with results at report@fotonower.com refus_total : 0.048575091159425245 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=22167941 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_P22167941_09-04-2025_16_10_59.pdf results_Auto_P22167941_09-04-2025_16_10_59.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22167941_09-04-2025_16_10_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','22167941','results_Auto_P22167941_09-04-2025_16_10_59.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22167941_09-04-2025_16_10_59.pdf','pdf','','0.14','0.048575091159425245') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22167941]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1350800673, 1350800669, 1350800667, 1350800661, 1350800657, 1350800653] map_info['map_portfolio_photo'] : {22167941: [1350800673, 1350800669, 1350800667, 1350800661, 1350800657, 1350800653, 1350800601, 1350800455, 1350800432, 1350800428, 1350799978, 1350799950, 1350799921, 1350799830, 1350799826, 1350799754, 1350799734, 1350799696, 1350799669, 1350799387, 1350799360, 1350799335, 1350799310]} final : False mtd_id 4302 list_pids : [1350800673, 1350800669, 1350800667, 1350800661, 1350800657, 1350800653] 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, '2735002') ('4302', '22167941', '1350800673', None, None, None, None, None, '2735002') ('4302', None, None, None, None, None, None, None, '2735002') ('4302', '22167941', '1350800669', None, None, None, None, None, '2735002') ('4302', None, None, None, None, None, None, None, '2735002') ('4302', '22167941', '1350800667', None, None, None, None, None, '2735002') ('4302', None, None, None, None, None, None, None, '2735002') ('4302', '22167941', '1350800661', None, None, None, None, None, '2735002') ('4302', None, None, None, None, None, None, None, '2735002') ('4302', '22167941', '1350800657', None, None, None, None, None, '2735002') ('4302', None, None, None, None, None, None, None, '2735002') ('4302', '22167941', '1350800653', None, None, None, None, None, '2735002') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 6 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', '22167941', '1350800673', None, None, None, None, None, '2735002'), ('4302', '22167941', '1350800669', None, None, None, None, None, '2735002'), ('4302', '22167941', '1350800667', None, None, None, None, None, '2735002'), ('4302', '22167941', '1350800661', None, None, None, None, None, '2735002'), ('4302', '22167941', '1350800657', None, None, None, None, None, '2735002'), ('4302', '22167941', '1350800653', None, None, None, None, None, '2735002')] time used for this insertion : 0.013862371444702148 save_final save missing photos in datou_result : time spend for datou_step_exec : 2.618239164352417 time spend to save output : 0.014082193374633789 total time spend for step 4 : 2.632321357727051 step5:split_time_score Wed Apr 9 16:11:02 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 : ['22167941'] 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 : [('22167941',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22167941) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1350800669: {'path': 'temp/1744207859_1836236_1350800669_5012dd6d63ad51102eba31bbdf66c1e4.jpg', 'extension': 'jpg'}, 1350800673: {'path': 'temp/1744207859_1836236_1350800673_ebde3b284fc4b8f2e97f2ff1c44b4405.jpg', 'extension': 'jpg'}, 1350800661: {'path': 'temp/1744207859_1836236_1350800661_11c804f0458f6dda17be70cca9cbb3a3.jpg', 'extension': 'jpg'}, 1350800667: {'path': 'temp/1744207859_1836236_1350800667_f2a06583bb52b6131c42379026ae5e17.jpg', 'extension': 'jpg'}, 1350800653: {'path': 'temp/1744207859_1836236_1350800653_1ca4f512ea688da36666459e7db1d58b.jpg', 'extension': 'jpg'}, 1350800657: {'path': 'temp/1744207859_1836236_1350800657_8074d7e05060dfa0c9b414608f1501a5.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 = 22167941; (('arc_en_ciel_jrm',),) 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 = 22167941 group by h (('16', 23),) 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=22167941 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 (22167941) 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 (22167941) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 09042025 22167941 Nombre de photos uploadées : 23 / 23040 (0%) 09042025 22167941 Nombre de photos taguées (types de déchets): 0 / 23 (0%) 09042025 22167941 Nombre de photos taguées (volume) : 0 / 23 (0%) [{'photo_id': 1350799387, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/9/cca9cf05a97a5edbbd7e4f99c86eb3d4.jpg', 'username': None, 'uploaded_at': 1744207267, 'text': 'image_09042025_16_00_13_10213.jpg'}, {'photo_id': 1350799360, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/9/22e3ababc96dc06b64ce542250102da2.jpg', 'username': None, 'uploaded_at': 1744207267, 'text': 'image_09042025_16_00_24_10140.jpg'}, {'photo_id': 1350799335, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/9/2ec86b935c226fffd73cb74e9d132790.jpg', 'username': None, 'uploaded_at': 1744207267, 'text': 'image_09042025_16_00_34_10136.jpg'}, {'photo_id': 1350799310, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/9/9e34904789358e298d41c5558252412c.jpg', 'username': None, 'uploaded_at': 1744207267, 'text': 'image_09042025_16_00_44_10136.jpg'}] 0 [] elapsed_time : load_data_split_time_score 2.1457672119140625e-06 elapsed_time : order_list_meta_photo_and_scores 6.67572021484375e-06 ??????????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.001232147216796875 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 22167941, '2025-04-09' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (1725367,979,"{}"); elapsed_time : insert_dashboard_record_day_entry 0.02912116050720215 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= 1725367 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 1725367, 'dashboard_run_id': 1734212, 'mtr_portfolio_id': 22165756, 'dashboard_result_id': 9947290, '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_P22165756_09-04-2025_15_32_58.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 22165872, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22165877, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22165880, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22165881, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22165882, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22165883, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22165884, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22165885, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22165886, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22165887, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22165888, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22165889, 'pht': 3726}}"}, {'dashboat_entry_day': 1725367, 'dashboard_run_id': 1734212, 'mtr_portfolio_id': 22166636, 'dashboard_result_id': 9947291, '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_P22166636_09-04-2025_15_46_58.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22166639, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22166640, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22166641, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22166642, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22166643, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22166644, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22166645, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22166646, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22166647, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22166648, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22166649, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22166650, 'pht': 3726}}"}, {'dashboat_entry_day': 1725367, 'dashboard_run_id': 1734212, 'mtr_portfolio_id': 22167333, 'dashboard_result_id': 9947292, '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_P22167333_09-04-2025_16_02_59.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 22167337, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22167338, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22167339, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22167340, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22167341, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22167342, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22167343, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22167344, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22167345, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22167346, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22167347, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22167348, 'pht': 3726}}"}, {'dashboat_entry_day': 1725367, 'dashboard_run_id': 1734212, 'mtr_portfolio_id': 22167941, 'dashboard_result_id': 9947293, '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_P22167941_09-04-2025_16_08_59.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22167944, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22167945, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22167946, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22167947, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22167948, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22167949, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22167950, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22167951, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22167952, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22167953, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22167954, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22167955, '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 = 22165756 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': 2734827, 'mtr_portfolio_id': 22165756, 'created_at': datetime.datetime(2025, 4, 9, 15, 32, 57), 'result': '0.054439983139558175', 'result_long': None, 'result_double': None}] Qualite : 0.054439983139558175 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22165756 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22165756_09-04-2025_15_32_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22165756 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_P22165756_09-04-2025_15_32_58.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 22165872, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22165877, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22165880, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22165881, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22165882, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22165883, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22165884, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22165885, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22165886, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22165887, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22165888, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22165889, 'pht': 3726}}" where mtr_portfolio_id = 22165756 and dashboard_run_id = 1734212 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`=22165756 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9947290, 0.054439983139558175, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22165756_09-04-2025_15_32_58.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 22165872, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22165877, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22165880, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22165881, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22165882, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22165883, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22165884, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22165885, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22165886, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22165887, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22165888, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22165889, '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 = 22166636 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': 2734893, 'mtr_portfolio_id': 22166636, 'created_at': datetime.datetime(2025, 4, 9, 15, 46, 58), 'result': '0.035680221660550814', 'result_long': None, 'result_double': None}] Qualite : 0.035680221660550814 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22166636 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22166636_09-04-2025_15_46_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22166636 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_P22166636_09-04-2025_15_46_58.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22166639, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22166640, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22166641, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22166642, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22166643, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22166644, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22166645, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22166646, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22166647, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22166648, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22166649, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22166650, 'pht': 3726}}" where mtr_portfolio_id = 22166636 and dashboard_run_id = 1734212 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`=22166636 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9947291, 0.035680221660550814, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22166636_09-04-2025_15_46_58.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22166639, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22166640, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22166641, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22166642, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22166643, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22166644, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22166645, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22166646, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22166647, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22166648, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22166649, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22166650, '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 = 22167333 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': 2734942, 'mtr_portfolio_id': 22167333, 'created_at': datetime.datetime(2025, 4, 9, 16, 2, 58), 'result': '0.04610585789001337', 'result_long': None, 'result_double': None}] Qualite : 0.04610585789001337 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22167333 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22167333_09-04-2025_16_02_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22167333 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_P22167333_09-04-2025_16_02_59.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 22167337, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22167338, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22167339, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22167340, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22167341, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22167342, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22167343, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22167344, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22167345, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22167346, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22167347, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22167348, 'pht': 3726}}" where mtr_portfolio_id = 22167333 and dashboard_run_id = 1734212 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`=22167333 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9947292, 0.04610585789001337, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22167333_09-04-2025_16_02_59.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 22167337, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22167338, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22167339, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22167340, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22167341, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22167342, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22167343, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22167344, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22167345, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22167346, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22167347, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22167348, '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 = 22167941 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': 2735002, 'mtr_portfolio_id': 22167941, 'created_at': datetime.datetime(2025, 4, 9, 16, 10, 59), 'result': '0.048575091159425245', 'result_long': None, 'result_double': None}] Qualite : 0.048575091159425245 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22167941 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22167941_09-04-2025_16_10_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22167941 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_P22167941_09-04-2025_16_10_59.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22167944, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22167945, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22167946, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22167947, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22167948, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22167949, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22167950, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22167951, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22167952, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22167953, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22167954, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22167955, 'pht': 3726}}" where mtr_portfolio_id = 22167941 and dashboard_run_id = 1734212 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`=22167941 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9947293, 0.048575091159425245, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22167941_09-04-2025_16_10_59.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22167944, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22167945, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22167946, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22167947, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22167948, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22167949, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22167950, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22167951, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22167952, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22167953, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22167954, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22167955, '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 (22165756,22166636,22167333,22167941) result : ((1350792505,), (1350792524,), (1350792534,), (1350792545,), (1350792558,), (1350792660,), (1350792664,), (1350792669,), (1350792674,), (1350792679,), (1350792683,), (1350792773,), (1350792805,), (1350792817,), (1350792862,), (1350792943,), (1350792950,), (1350792954,), (1350792968,), (1350793367,), (1350793375,), (1350793377,), (1350793378,), (1350793382,), (1350793386,), (1350793441,), (1350793446,), (1350793501,), (1350793503,), (1350793506,), (1350793507,), (1350793509,), (1350793512,), (1350793554,), (1350793557,), (1350793561,), (1350793565,), (1350793569,), (1350793595,), (1350793690,), (1350793692,), (1350793694,), (1350793696,), (1350793733,), (1350793737,), (1350793742,), (1350793749,), (1350793787,), (1350793798,), (1350793851,), (1350793854,), (1350793873,), (1350793875,), (1350793880,), (1350793916,), (1350793919,), (1350793923,), (1350793926,), (1350793928,), (1350794108,), (1350794159,), (1350794230,), (1350794245,), (1350794265,), (1350794284,), (1350794428,), (1350794514,), (1350794527,), (1350794531,), (1350794536,), (1350794751,), (1350794758,), (1350794763,), (1350794767,), (1350794773,), (1350795200,), (1350795142,), (1350795179,), (1350795182,), (1350795193,), (1350795338,), (1350795352,), (1350795388,), (1350795424,), (1350795478,), (1350795482,), (1350795493,), (1350795504,), (1350795512,), (1350795660,), (1350795664,), (1350795669,), (1350795673,), (1350795676,), (1350795680,), (1350795707,), (1350795711,), (1350795715,), (1350795723,), (1350795852,), (1350795870,), (1350795872,), (1350795877,), (1350796026,), (1350796030,), (1350796042,), (1350796046,), (1350796053,), (1350796057,), (1350796332,), (1350796343,), (1350796489,), (1350796501,), (1350796509,), (1350796515,), (1350796530,), (1350796684,), (1350796688,), (1350796734,), (1350796804,), (1350796807,), (1350796811,), (1350796816,), (1350796819,), (1350796833,), (1350796879,), (1350796888,), (1350796894,), (1350796899,), (1350796947,), (1350796949,), (1350796952,), (1350796956,), (1350796960,), (1350797008,), (1350797011,), (1350797015,), (1350797019,), (1350797023,), (1350797026,), (1350797089,), (1350797078,), (1350797082,), (1350797086,), (1350797323,), (1350797327,), (1350797330,), (1350797334,), (1350797359,), (1350797363,), (1350797366,), (1350797374,), (1350797442,), (1350797544,), (1350797547,), (1350797550,), (1350797556,), (1350797561,), (1350797574,), (1350797628,), (1350797641,), (1350797646,), (1350797702,), (1350797730,), (1350797755,), (1350797759,), (1350797762,), (1350797794,), (1350797795,), (1350797804,), (1350797812,), (1350797819,), (1350797850,), (1350797852,), (1350797856,), (1350797909,), (1350797959,), (1350798033,), (1350798339,), (1350798342,), (1350798355,), (1350798362,), (1350798364,), (1350798390,), (1350798480,), (1350798481,), (1350798487,), (1350798492,), (1350798504,), (1350798604,), (1350798688,), (1350798701,), (1350798714,), (1350798731,), (1350798791,), (1350798824,), (1350798855,), (1350798876,), (1350799194,), (1350799202,), (1350799211,), (1350799218,), (1350799228,), (1350799237,), (1350799401,), (1350799310,), (1350799335,), (1350799360,), (1350799387,), (1350799669,), (1350799696,), (1350799734,), (1350799754,), (1350799826,), (1350799830,), (1350799921,), (1350799950,), (1350799978,), (1350800428,), (1350800432,), (1350800455,), (1350800601,), (1350800653,), (1350800657,), (1350800661,), (1350800667,), (1350800669,), (1350800673,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'09042025': {'nb_upload': 23, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22167941]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1350800673, 1350800669, 1350800667, 1350800661, 1350800657, 1350800653] map_info['map_portfolio_photo'] : {22167941: [1350800673, 1350800669, 1350800667, 1350800661, 1350800657, 1350800653, 1350800601, 1350800455, 1350800432, 1350800428, 1350799978, 1350799950, 1350799921, 1350799830, 1350799826, 1350799754, 1350799734, 1350799696, 1350799669, 1350799387, 1350799360, 1350799335, 1350799310]} final : True mtd_id 4302 list_pids : [1350800673, 1350800669, 1350800667, 1350800661, 1350800657, 1350800653] Looping around the photos to save general results len do output : 1 /22167941Didn'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, '2735002') ('4302', '22167941', '1350800673', None, None, None, None, None, '2735002') ('4302', None, None, None, None, None, None, None, '2735002') ('4302', '22167941', '1350800669', None, None, None, None, None, '2735002') ('4302', None, None, None, None, None, None, None, '2735002') ('4302', '22167941', '1350800667', None, None, None, None, None, '2735002') ('4302', None, None, None, None, None, None, None, '2735002') ('4302', '22167941', '1350800661', None, None, None, None, None, '2735002') ('4302', None, None, None, None, None, None, None, '2735002') ('4302', '22167941', '1350800657', None, None, None, None, None, '2735002') ('4302', None, None, None, None, None, None, None, '2735002') ('4302', '22167941', '1350800653', None, None, None, None, None, '2735002') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 7 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, '22167941', 'None', None, None, None, None, '2735002'), ('4302', '22167941', '1350800673', None, None, None, None, None, '2735002'), ('4302', '22167941', '1350800669', None, None, None, None, None, '2735002'), ('4302', '22167941', '1350800667', None, None, None, None, None, '2735002'), ('4302', '22167941', '1350800661', None, None, None, None, None, '2735002'), ('4302', '22167941', '1350800657', None, None, None, None, None, '2735002'), ('4302', '22167941', '1350800653', None, None, None, None, None, '2735002')] time used for this insertion : 0.014497518539428711 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.36226654052734375 time spend to save output : 0.014707088470458984 total time spend for step 5 : 0.37697362899780273 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 (2735002) 2.09user 2.28system 0:06.81elapsed 64%CPU (0avgtext+0avgdata 157944maxresident)k 3208inputs+6520outputs (22major+63799minor)pagefaults 0swaps