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 : 1595686 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 (2931868) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (2931868) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 23251214 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['2931868'] with mtr_portfolio_ids : ['23251214'] and first list_photo_ids : [] new path : /proc/1595686/ Name: python3 Umask: 0002 State: R (running) Tgid: 1595686 Ngid: 0 Pid: 1595686 PPid: 1595685 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 1595686 NSpid: 1595686 NSpgid: 1593664 NSsid: 1593664 VmPeak: 1107324 kB VmSize: 1107324 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 99884 kB VmRSS: 99884 kB RssAnon: 60212 kB RssFile: 39672 kB RssShmem: 0 kB VmData: 866072 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 600 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: 52 nonvoluntary_ctxt_switches: 87 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '1595686', 'Ngid': '0', 'Pid': '1595686', 'PPid': '1595685', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '1595686', 'NSpid': '1595686', 'NSpgid': '1593664', 'NSsid': '1593664', 'VmPeak': '1107324 kB', 'VmSize': '1107324 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '99884 kB', 'VmRSS': '99884 kB', 'RssAnon': '60212 kB', 'RssFile': '39672 kB', 'RssShmem': '0 kB', 'VmData': '866072 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '600 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': '52', 'nonvoluntary_ctxt_switches': '87'} ('datou_batch_current', '1595686', '1107324', '0', '1107324', '866072', '99884', b'', 'marlene', '2931868') 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 (23251214) 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 (2931868 ) ) 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 (23251214) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1360423070, 'portfolio_id': 23251214}, {'photo_id': 1360423066, 'portfolio_id': 23251214}, {'photo_id': 1360423051, 'portfolio_id': 23251214}, {'photo_id': 1360422950, 'portfolio_id': 23251214}, {'photo_id': 1360422947, 'portfolio_id': 23251214}, {'photo_id': 1360422945, 'portfolio_id': 23251214}, {'photo_id': 1360422942, 'portfolio_id': 23251214}, {'photo_id': 1360422938, 'portfolio_id': 23251214}, {'photo_id': 1360422936, 'portfolio_id': 23251214}, {'photo_id': 1360422620, 'portfolio_id': 23251214}, {'photo_id': 1360422594, 'portfolio_id': 23251214}, {'photo_id': 1360422590, 'portfolio_id': 23251214}, {'photo_id': 1360422585, 'portfolio_id': 23251214}, {'photo_id': 1360422414, 'portfolio_id': 23251214}, {'photo_id': 1360422407, 'portfolio_id': 23251214}, {'photo_id': 1360422404, 'portfolio_id': 23251214}, {'photo_id': 1360422400, 'portfolio_id': 23251214}, {'photo_id': 1360422397, 'portfolio_id': 23251214}, {'photo_id': 1360422149, 'portfolio_id': 23251214}, {'photo_id': 1360422122, 'portfolio_id': 23251214}, {'photo_id': 1360422103, 'portfolio_id': 23251214}, {'photo_id': 1360422100, 'portfolio_id': 23251214}, {'photo_id': 1360422093, 'portfolio_id': 23251214}, {'photo_id': 1360421768, 'portfolio_id': 23251214}, {'photo_id': 1360421729, 'portfolio_id': 23251214}, {'photo_id': 1360421701, 'portfolio_id': 23251214}, {'photo_id': 1360421672, 'portfolio_id': 23251214}, {'photo_id': 1360421644, 'portfolio_id': 23251214}, {'photo_id': 1360421310, 'portfolio_id': 23251214}, {'photo_id': 1360421307, 'portfolio_id': 23251214}, {'photo_id': 1360421302, 'portfolio_id': 23251214}, {'photo_id': 1360421299, 'portfolio_id': 23251214}, {'photo_id': 1360421297, 'portfolio_id': 23251214}, {'photo_id': 1360421294, 'portfolio_id': 23251214}, {'photo_id': 1360421227, 'portfolio_id': 23251214}, {'photo_id': 1360421173, 'portfolio_id': 23251214}, {'photo_id': 1360421168, 'portfolio_id': 23251214}, {'photo_id': 1360421163, 'portfolio_id': 23251214}, {'photo_id': 1360421159, 'portfolio_id': 23251214}, {'photo_id': 1360420983, 'portfolio_id': 23251214}, {'photo_id': 1360420979, 'portfolio_id': 23251214}, {'photo_id': 1360420976, 'portfolio_id': 23251214}, {'photo_id': 1360420952, 'portfolio_id': 23251214}, {'photo_id': 1360420949, 'portfolio_id': 23251214}, {'photo_id': 1360420947, 'portfolio_id': 23251214}, {'photo_id': 1360420946, 'portfolio_id': 23251214}, {'photo_id': 1360420912, 'portfolio_id': 23251214}, {'photo_id': 1360420908, 'portfolio_id': 23251214}, {'photo_id': 1360420597, 'portfolio_id': 23251214}, {'photo_id': 1360420571, 'portfolio_id': 23251214}, {'photo_id': 1360420542, 'portfolio_id': 23251214}, {'photo_id': 1360420516, 'portfolio_id': 23251214}, {'photo_id': 1360420477, 'portfolio_id': 23251214}, {'photo_id': 1360419880, 'portfolio_id': 23251214}, {'photo_id': 1360419849, 'portfolio_id': 23251214}, {'photo_id': 1360419836, 'portfolio_id': 23251214}, {'photo_id': 1360419835, 'portfolio_id': 23251214}, {'photo_id': 1360419553, 'portfolio_id': 23251214}, {'photo_id': 1360419505, 'portfolio_id': 23251214}, {'photo_id': 1360419472, 'portfolio_id': 23251214}, {'photo_id': 1360419445, 'portfolio_id': 23251214}] map_portfolio_id_photo_id: {23251214: [1360423070, 1360423066, 1360423051, 1360422950, 1360422947, 1360422945, 1360422942, 1360422938, 1360422936, 1360422620, 1360422594, 1360422590, 1360422585, 1360422414, 1360422407, 1360422404, 1360422400, 1360422397, 1360422149, 1360422122, 1360422103, 1360422100, 1360422093, 1360421768, 1360421729, 1360421701, 1360421672, 1360421644, 1360421310, 1360421307, 1360421302, 1360421299, 1360421297, 1360421294, 1360421227, 1360421173, 1360421168, 1360421163, 1360421159, 1360420983, 1360420979, 1360420976, 1360420952, 1360420949, 1360420947, 1360420946, 1360420912, 1360420908, 1360420597, 1360420571, 1360420542, 1360420516, 1360420477, 1360419880, 1360419849, 1360419836, 1360419835, 1360419553, 1360419505, 1360419472, 1360419445]} ##### 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.01560354232788086 #### 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 Thu May 22 07:14:56 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 (23251214) 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 : 23251214 get user id for portfolio 23251214 get sub ptf for main ptf 23251214, type 3726 and hashtags ['metal', 'Carton_gris', 'mal_croppe', 'cartonnette', 'Teint_Dans_La_Masse', 'autre_refus', 'papier', 'plastique', 'environnement', 'flou', 'kraft', 'Carton_brun'] 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`=23251214 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('metal','Carton_gris','mal_croppe','cartonnette','Teint_Dans_La_Masse','autre_refus','papier','plastique','environnement','flou','kraft','Carton_brun')) 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`=23251214 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('metal','Carton_gris','mal_croppe','cartonnette','Teint_Dans_La_Masse','autre_refus','papier','plastique','environnement','flou','kraft','Carton_brun')) AND mptpi.`min_score`=0.5 To do returned map {'mal_croppe': {'main_port_id': 23251214, 'sub_port_id': 23251323, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15510532, 'last_updated_at': datetime.datetime(2025, 5, 22, 7, 12, 59), 'last_updated_at_desc': datetime.datetime(2025, 5, 22, 7, 12, 59), 'last_updated_at_asc': datetime.datetime(2025, 5, 22, 7, 3, 27)}, 'metal': {'main_port_id': 23251214, 'sub_port_id': 23251324, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15510533, 'last_updated_at': datetime.datetime(2025, 5, 22, 7, 12, 59), 'last_updated_at_desc': datetime.datetime(2025, 5, 22, 7, 12, 59), 'last_updated_at_asc': datetime.datetime(2025, 5, 22, 7, 3, 27)}, 'autre_refus': {'main_port_id': 23251214, 'sub_port_id': 23251325, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15510534, 'last_updated_at': datetime.datetime(2025, 5, 22, 7, 12, 59), 'last_updated_at_desc': datetime.datetime(2025, 5, 22, 7, 12, 59), 'last_updated_at_asc': datetime.datetime(2025, 5, 22, 7, 3, 27)}, 'environnement': {'main_port_id': 23251214, 'sub_port_id': 23251326, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15510535, 'last_updated_at': datetime.datetime(2025, 5, 22, 7, 12, 59), 'last_updated_at_desc': datetime.datetime(2025, 5, 22, 7, 12, 59), 'last_updated_at_asc': datetime.datetime(2025, 5, 22, 7, 3, 27)}, 'papier': {'main_port_id': 23251214, 'sub_port_id': 23251327, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15510536, 'last_updated_at': datetime.datetime(2025, 5, 22, 7, 12, 59), 'last_updated_at_desc': datetime.datetime(2025, 5, 22, 7, 12, 59), 'last_updated_at_asc': datetime.datetime(2025, 5, 22, 7, 3, 27)}, 'cartonnette': {'main_port_id': 23251214, 'sub_port_id': 23251328, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15510537, 'last_updated_at': datetime.datetime(2025, 5, 22, 7, 12, 59), 'last_updated_at_desc': datetime.datetime(2025, 5, 22, 7, 12, 59), 'last_updated_at_asc': datetime.datetime(2025, 5, 22, 7, 3, 27)}, 'Carton_brun': {'main_port_id': 23251214, 'sub_port_id': 23251329, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15510538, 'last_updated_at': datetime.datetime(2025, 5, 22, 7, 12, 59), 'last_updated_at_desc': datetime.datetime(2025, 5, 22, 7, 12, 59), 'last_updated_at_asc': datetime.datetime(2025, 5, 22, 7, 3, 27)}, 'kraft': {'main_port_id': 23251214, 'sub_port_id': 23251330, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15510539, 'last_updated_at': datetime.datetime(2025, 5, 22, 7, 12, 59), 'last_updated_at_desc': datetime.datetime(2025, 5, 22, 7, 12, 59), 'last_updated_at_asc': datetime.datetime(2025, 5, 22, 7, 3, 27)}, 'Teint_Dans_La_Masse': {'main_port_id': 23251214, 'sub_port_id': 23251331, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15510540, 'last_updated_at': datetime.datetime(2025, 5, 22, 7, 12, 59), 'last_updated_at_desc': datetime.datetime(2025, 5, 22, 7, 12, 59), 'last_updated_at_asc': datetime.datetime(2025, 5, 22, 7, 3, 27)}, 'flou': {'main_port_id': 23251214, 'sub_port_id': 23251332, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15510541, 'last_updated_at': datetime.datetime(2025, 5, 22, 7, 12, 59), 'last_updated_at_desc': datetime.datetime(2025, 5, 22, 7, 12, 59), 'last_updated_at_asc': datetime.datetime(2025, 5, 22, 7, 3, 27)}, 'plastique': {'main_port_id': 23251214, 'sub_port_id': 23251333, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15510542, 'last_updated_at': datetime.datetime(2025, 5, 22, 7, 12, 59), 'last_updated_at_desc': datetime.datetime(2025, 5, 22, 7, 12, 59), 'last_updated_at_asc': datetime.datetime(2025, 5, 22, 7, 3, 27)}, 'Carton_gris': {'main_port_id': 23251214, 'sub_port_id': 23251334, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15510543, 'last_updated_at': datetime.datetime(2025, 5, 22, 7, 12, 59), 'last_updated_at_desc': datetime.datetime(2025, 5, 22, 7, 12, 59), 'last_updated_at_asc': datetime.datetime(2025, 5, 22, 7, 3, 27)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 23251323 , 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=23251214 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 (23251323) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (23251214) result : ((1360419445,), (1360419472,), (1360419505,), (1360419553,), (1360419835,), (1360419836,), (1360419849,), (1360419880,), (1360420477,), (1360420516,), (1360420542,), (1360420571,), (1360420597,), (1360420908,), (1360420912,), (1360420946,), (1360420947,), (1360420949,), (1360420952,), (1360420976,), (1360420979,), (1360420983,), (1360421159,), (1360421163,), (1360421168,), (1360421173,), (1360421227,), (1360421294,), (1360421297,), (1360421299,), (1360421302,), (1360421307,), (1360421310,), (1360421644,), (1360421672,), (1360421701,), (1360421729,), (1360421768,), (1360422093,), (1360422100,), (1360422103,), (1360422122,), (1360422149,), (1360422397,), (1360422400,), (1360422404,), (1360422407,), (1360422414,), (1360422585,), (1360422590,), (1360422594,), (1360422620,), (1360422936,), (1360422938,), (1360422942,), (1360422945,), (1360422947,), (1360422950,), (1360423051,), (1360423066,), (1360423070,)) 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 (1360422400,1360422100) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 23251324 , 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=23251214 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 (23251324) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (23251214) result : ((1360419445,), (1360419472,), (1360419505,), (1360419553,), (1360419835,), (1360419836,), (1360419849,), (1360419880,), (1360420477,), (1360420516,), (1360420542,), (1360420571,), (1360420597,), (1360420908,), (1360420912,), (1360420946,), (1360420947,), (1360420949,), (1360420952,), (1360420976,), (1360420979,), (1360420983,), (1360421159,), (1360421163,), (1360421168,), (1360421173,), (1360421227,), (1360421294,), (1360421297,), (1360421299,), (1360421302,), (1360421307,), (1360421310,), (1360421644,), (1360421672,), (1360421701,), (1360421729,), (1360421768,), (1360422093,), (1360422100,), (1360422103,), (1360422122,), (1360422149,), (1360422397,), (1360422400,), (1360422404,), (1360422407,), (1360422414,), (1360422585,), (1360422590,), (1360422594,), (1360422620,), (1360422936,), (1360422938,), (1360422942,), (1360422945,), (1360422947,), (1360422950,), (1360423051,), (1360423066,), (1360423070,)) 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 (1360422400,1360422100) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 23251325 , 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=23251214 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 (23251325) result : ((1360420997,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (23251214) result : ((1360419445,), (1360419472,), (1360419505,), (1360419553,), (1360419835,), (1360419836,), (1360419849,), (1360419880,), (1360420477,), (1360420516,), (1360420542,), (1360420571,), (1360420597,), (1360420908,), (1360420912,), (1360420946,), (1360420947,), (1360420949,), (1360420952,), (1360420976,), (1360420979,), (1360420983,), (1360421159,), (1360421163,), (1360421168,), (1360421173,), (1360421227,), (1360421294,), (1360421297,), (1360421299,), (1360421302,), (1360421307,), (1360421310,), (1360421644,), (1360421672,), (1360421701,), (1360421729,), (1360421768,), (1360422093,), (1360422100,), (1360422103,), (1360422122,), (1360422149,), (1360422397,), (1360422400,), (1360422404,), (1360422407,), (1360422414,), (1360422585,), (1360422590,), (1360422594,), (1360422620,), (1360422936,), (1360422938,), (1360422942,), (1360422945,), (1360422947,), (1360422950,), (1360423051,), (1360423066,), (1360423070,)) 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 (1360422400,1360422100) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 23251326 , 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=23251214 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 (23251326) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (23251214) result : ((1360419445,), (1360419472,), (1360419505,), (1360419553,), (1360419835,), (1360419836,), (1360419849,), (1360419880,), (1360420477,), (1360420516,), (1360420542,), (1360420571,), (1360420597,), (1360420908,), (1360420912,), (1360420946,), (1360420947,), (1360420949,), (1360420952,), (1360420976,), (1360420979,), (1360420983,), (1360421159,), (1360421163,), (1360421168,), (1360421173,), (1360421227,), (1360421294,), (1360421297,), (1360421299,), (1360421302,), (1360421307,), (1360421310,), (1360421644,), (1360421672,), (1360421701,), (1360421729,), (1360421768,), (1360422093,), (1360422100,), (1360422103,), (1360422122,), (1360422149,), (1360422397,), (1360422400,), (1360422404,), (1360422407,), (1360422414,), (1360422585,), (1360422590,), (1360422594,), (1360422620,), (1360422936,), (1360422938,), (1360422942,), (1360422945,), (1360422947,), (1360422950,), (1360423051,), (1360423066,), (1360423070,)) 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 (1360422400,1360422100) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 23251327 , 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=23251214 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 (23251327) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (23251214) result : ((1360419445,), (1360419472,), (1360419505,), (1360419553,), (1360419835,), (1360419836,), (1360419849,), (1360419880,), (1360420477,), (1360420516,), (1360420542,), (1360420571,), (1360420597,), (1360420908,), (1360420912,), (1360420946,), (1360420947,), (1360420949,), (1360420952,), (1360420976,), (1360420979,), (1360420983,), (1360421159,), (1360421163,), (1360421168,), (1360421173,), (1360421227,), (1360421294,), (1360421297,), (1360421299,), (1360421302,), (1360421307,), (1360421310,), (1360421644,), (1360421672,), (1360421701,), (1360421729,), (1360421768,), (1360422093,), (1360422100,), (1360422103,), (1360422122,), (1360422149,), (1360422397,), (1360422400,), (1360422404,), (1360422407,), (1360422414,), (1360422585,), (1360422590,), (1360422594,), (1360422620,), (1360422936,), (1360422938,), (1360422942,), (1360422945,), (1360422947,), (1360422950,), (1360423051,), (1360423066,), (1360423070,)) 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 (1360422400,1360422100) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 23251328 , 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=23251214 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 (23251328) result : ((1360421024,), (1360422352,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (23251214) result : ((1360419445,), (1360419472,), (1360419505,), (1360419553,), (1360419835,), (1360419836,), (1360419849,), (1360419880,), (1360420477,), (1360420516,), (1360420542,), (1360420571,), (1360420597,), (1360420908,), (1360420912,), (1360420946,), (1360420947,), (1360420949,), (1360420952,), (1360420976,), (1360420979,), (1360420983,), (1360421159,), (1360421163,), (1360421168,), (1360421173,), (1360421227,), (1360421294,), (1360421297,), (1360421299,), (1360421302,), (1360421307,), (1360421310,), (1360421644,), (1360421672,), (1360421701,), (1360421729,), (1360421768,), (1360422093,), (1360422100,), (1360422103,), (1360422122,), (1360422149,), (1360422397,), (1360422400,), (1360422404,), (1360422407,), (1360422414,), (1360422585,), (1360422590,), (1360422594,), (1360422620,), (1360422936,), (1360422938,), (1360422942,), (1360422945,), (1360422947,), (1360422950,), (1360423051,), (1360423066,), (1360423070,)) 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 (1360422400,1360422100) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 23251329 , 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=23251214 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 (23251329) result : ((1360421032,), (1360421035,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (23251214) result : ((1360419445,), (1360419472,), (1360419505,), (1360419553,), (1360419835,), (1360419836,), (1360419849,), (1360419880,), (1360420477,), (1360420516,), (1360420542,), (1360420571,), (1360420597,), (1360420908,), (1360420912,), (1360420946,), (1360420947,), (1360420949,), (1360420952,), (1360420976,), (1360420979,), (1360420983,), (1360421159,), (1360421163,), (1360421168,), (1360421173,), (1360421227,), (1360421294,), (1360421297,), (1360421299,), (1360421302,), (1360421307,), (1360421310,), (1360421644,), (1360421672,), (1360421701,), (1360421729,), (1360421768,), (1360422093,), (1360422100,), (1360422103,), (1360422122,), (1360422149,), (1360422397,), (1360422400,), (1360422404,), (1360422407,), (1360422414,), (1360422585,), (1360422590,), (1360422594,), (1360422620,), (1360422936,), (1360422938,), (1360422942,), (1360422945,), (1360422947,), (1360422950,), (1360423051,), (1360423066,), (1360423070,)) 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 (1360422400,1360422100) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 23251330 , 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=23251214 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 (23251330) result : ((1360421058,), (1360421060,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (23251214) result : ((1360419445,), (1360419472,), (1360419505,), (1360419553,), (1360419835,), (1360419836,), (1360419849,), (1360419880,), (1360420477,), (1360420516,), (1360420542,), (1360420571,), (1360420597,), (1360420908,), (1360420912,), (1360420946,), (1360420947,), (1360420949,), (1360420952,), (1360420976,), (1360420979,), (1360420983,), (1360421159,), (1360421163,), (1360421168,), (1360421173,), (1360421227,), (1360421294,), (1360421297,), (1360421299,), (1360421302,), (1360421307,), (1360421310,), (1360421644,), (1360421672,), (1360421701,), (1360421729,), (1360421768,), (1360422093,), (1360422100,), (1360422103,), (1360422122,), (1360422149,), (1360422397,), (1360422400,), (1360422404,), (1360422407,), (1360422414,), (1360422585,), (1360422590,), (1360422594,), (1360422620,), (1360422936,), (1360422938,), (1360422942,), (1360422945,), (1360422947,), (1360422950,), (1360423051,), (1360423066,), (1360423070,)) 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 (1360422400,1360422100) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 23251331 , 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=23251214 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 (23251331) result : ((1360420989,), (1360420990,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (23251214) result : ((1360419445,), (1360419472,), (1360419505,), (1360419553,), (1360419835,), (1360419836,), (1360419849,), (1360419880,), (1360420477,), (1360420516,), (1360420542,), (1360420571,), (1360420597,), (1360420908,), (1360420912,), (1360420946,), (1360420947,), (1360420949,), (1360420952,), (1360420976,), (1360420979,), (1360420983,), (1360421159,), (1360421163,), (1360421168,), (1360421173,), (1360421227,), (1360421294,), (1360421297,), (1360421299,), (1360421302,), (1360421307,), (1360421310,), (1360421644,), (1360421672,), (1360421701,), (1360421729,), (1360421768,), (1360422093,), (1360422100,), (1360422103,), (1360422122,), (1360422149,), (1360422397,), (1360422400,), (1360422404,), (1360422407,), (1360422414,), (1360422585,), (1360422590,), (1360422594,), (1360422620,), (1360422936,), (1360422938,), (1360422942,), (1360422945,), (1360422947,), (1360422950,), (1360423051,), (1360423066,), (1360423070,)) 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 (1360422400,1360422100) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 23251332 , 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=23251214 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 (23251332) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (23251214) result : ((1360419445,), (1360419472,), (1360419505,), (1360419553,), (1360419835,), (1360419836,), (1360419849,), (1360419880,), (1360420477,), (1360420516,), (1360420542,), (1360420571,), (1360420597,), (1360420908,), (1360420912,), (1360420946,), (1360420947,), (1360420949,), (1360420952,), (1360420976,), (1360420979,), (1360420983,), (1360421159,), (1360421163,), (1360421168,), (1360421173,), (1360421227,), (1360421294,), (1360421297,), (1360421299,), (1360421302,), (1360421307,), (1360421310,), (1360421644,), (1360421672,), (1360421701,), (1360421729,), (1360421768,), (1360422093,), (1360422100,), (1360422103,), (1360422122,), (1360422149,), (1360422397,), (1360422400,), (1360422404,), (1360422407,), (1360422414,), (1360422585,), (1360422590,), (1360422594,), (1360422620,), (1360422936,), (1360422938,), (1360422942,), (1360422945,), (1360422947,), (1360422950,), (1360423051,), (1360423066,), (1360423070,)) 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 (1360422400,1360422100) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 23251333 , 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=23251214 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 (23251333) result : ((1360421043,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (23251214) result : ((1360419445,), (1360419472,), (1360419505,), (1360419553,), (1360419835,), (1360419836,), (1360419849,), (1360419880,), (1360420477,), (1360420516,), (1360420542,), (1360420571,), (1360420597,), (1360420908,), (1360420912,), (1360420946,), (1360420947,), (1360420949,), (1360420952,), (1360420976,), (1360420979,), (1360420983,), (1360421159,), (1360421163,), (1360421168,), (1360421173,), (1360421227,), (1360421294,), (1360421297,), (1360421299,), (1360421302,), (1360421307,), (1360421310,), (1360421644,), (1360421672,), (1360421701,), (1360421729,), (1360421768,), (1360422093,), (1360422100,), (1360422103,), (1360422122,), (1360422149,), (1360422397,), (1360422400,), (1360422404,), (1360422407,), (1360422414,), (1360422585,), (1360422590,), (1360422594,), (1360422620,), (1360422936,), (1360422938,), (1360422942,), (1360422945,), (1360422947,), (1360422950,), (1360423051,), (1360423066,), (1360423070,)) 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 (1360422400,1360422100) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 23251334 , 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=23251214 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 (23251334) result : ((1360421009,), (1360421011,), (1360421013,), (1360421015,), (1360421017,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (23251214) result : ((1360419445,), (1360419472,), (1360419505,), (1360419553,), (1360419835,), (1360419836,), (1360419849,), (1360419880,), (1360420477,), (1360420516,), (1360420542,), (1360420571,), (1360420597,), (1360420908,), (1360420912,), (1360420946,), (1360420947,), (1360420949,), (1360420952,), (1360420976,), (1360420979,), (1360420983,), (1360421159,), (1360421163,), (1360421168,), (1360421173,), (1360421227,), (1360421294,), (1360421297,), (1360421299,), (1360421302,), (1360421307,), (1360421310,), (1360421644,), (1360421672,), (1360421701,), (1360421729,), (1360421768,), (1360422093,), (1360422100,), (1360422103,), (1360422122,), (1360422149,), (1360422397,), (1360422400,), (1360422404,), (1360422407,), (1360422414,), (1360422585,), (1360422590,), (1360422594,), (1360422620,), (1360422936,), (1360422938,), (1360422942,), (1360422945,), (1360422947,), (1360422950,), (1360423051,), (1360423066,), (1360423070,)) 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 (1360422400,1360422100) and cspi.crop_hashtag_id = chi.id; 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`=23251214 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('metal','Carton_gris','mal_croppe','cartonnette','Teint_Dans_La_Masse','autre_refus','papier','plastique','environnement','flou','kraft','Carton_brun')) 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`=23251214 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('metal','Carton_gris','mal_croppe','cartonnette','Teint_Dans_La_Masse','autre_refus','papier','plastique','environnement','flou','kraft','Carton_brun')) AND mptpi.`min_score`=0.5 To do returned map {'mal_croppe': {'main_port_id': 23251214, 'sub_port_id': 23251340, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15510544, 'last_updated_at': datetime.datetime(2025, 5, 22, 7, 3, 33), 'last_updated_at_desc': datetime.datetime(2025, 5, 22, 7, 3, 33), 'last_updated_at_asc': datetime.datetime(2025, 5, 22, 7, 3, 33)}, 'metal': {'main_port_id': 23251214, 'sub_port_id': 23251341, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15510545, 'last_updated_at': datetime.datetime(2025, 5, 22, 7, 3, 33), 'last_updated_at_desc': datetime.datetime(2025, 5, 22, 7, 3, 33), 'last_updated_at_asc': datetime.datetime(2025, 5, 22, 7, 3, 33)}, 'autre_refus': {'main_port_id': 23251214, 'sub_port_id': 23251342, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15510546, 'last_updated_at': datetime.datetime(2025, 5, 22, 7, 3, 33), 'last_updated_at_desc': datetime.datetime(2025, 5, 22, 7, 3, 33), 'last_updated_at_asc': datetime.datetime(2025, 5, 22, 7, 3, 33)}, 'environnement': {'main_port_id': 23251214, 'sub_port_id': 23251343, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15510547, 'last_updated_at': datetime.datetime(2025, 5, 22, 7, 3, 33), 'last_updated_at_desc': datetime.datetime(2025, 5, 22, 7, 3, 33), 'last_updated_at_asc': datetime.datetime(2025, 5, 22, 7, 3, 33)}, 'papier': {'main_port_id': 23251214, 'sub_port_id': 23251344, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15510548, 'last_updated_at': datetime.datetime(2025, 5, 22, 7, 3, 33), 'last_updated_at_desc': datetime.datetime(2025, 5, 22, 7, 3, 33), 'last_updated_at_asc': datetime.datetime(2025, 5, 22, 7, 3, 33)}, 'cartonnette': {'main_port_id': 23251214, 'sub_port_id': 23251345, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15510549, 'last_updated_at': datetime.datetime(2025, 5, 22, 7, 3, 33), 'last_updated_at_desc': datetime.datetime(2025, 5, 22, 7, 3, 33), 'last_updated_at_asc': datetime.datetime(2025, 5, 22, 7, 3, 33)}, 'Carton_brun': {'main_port_id': 23251214, 'sub_port_id': 23251346, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15510550, 'last_updated_at': datetime.datetime(2025, 5, 22, 7, 3, 33), 'last_updated_at_desc': datetime.datetime(2025, 5, 22, 7, 3, 33), 'last_updated_at_asc': datetime.datetime(2025, 5, 22, 7, 3, 33)}, 'kraft': {'main_port_id': 23251214, 'sub_port_id': 23251347, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15510551, 'last_updated_at': datetime.datetime(2025, 5, 22, 7, 3, 33), 'last_updated_at_desc': datetime.datetime(2025, 5, 22, 7, 3, 33), 'last_updated_at_asc': datetime.datetime(2025, 5, 22, 7, 3, 33)}, 'Teint_Dans_La_Masse': {'main_port_id': 23251214, 'sub_port_id': 23251348, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15510552, 'last_updated_at': datetime.datetime(2025, 5, 22, 7, 3, 33), 'last_updated_at_desc': datetime.datetime(2025, 5, 22, 7, 3, 33), 'last_updated_at_asc': datetime.datetime(2025, 5, 22, 7, 3, 33)}, 'flou': {'main_port_id': 23251214, 'sub_port_id': 23251349, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15510553, 'last_updated_at': datetime.datetime(2025, 5, 22, 7, 3, 33), 'last_updated_at_desc': datetime.datetime(2025, 5, 22, 7, 3, 33), 'last_updated_at_asc': datetime.datetime(2025, 5, 22, 7, 3, 33)}, 'plastique': {'main_port_id': 23251214, 'sub_port_id': 23251350, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15510554, 'last_updated_at': datetime.datetime(2025, 5, 22, 7, 3, 33), 'last_updated_at_desc': datetime.datetime(2025, 5, 22, 7, 3, 33), 'last_updated_at_asc': datetime.datetime(2025, 5, 22, 7, 3, 33)}, 'Carton_gris': {'main_port_id': 23251214, 'sub_port_id': 23251351, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15510555, 'last_updated_at': datetime.datetime(2025, 5, 22, 7, 12, 59), 'last_updated_at_desc': datetime.datetime(2025, 5, 22, 7, 12, 59), 'last_updated_at_asc': datetime.datetime(2025, 5, 22, 7, 3, 33)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 23251340,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 23251323 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 23251341,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 23251324 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 23251342,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 23251325 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 23251343,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 23251326 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 23251344,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 23251327 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 23251345,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 23251328 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 23251346,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 23251329 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 23251347,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 23251330 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 23251348,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 23251331 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 23251349,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 23251332 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 23251350,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 23251333 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 23251351,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 23251334 lien utilise dans velours : https://www.fotonower.com/velours/23251340,23251341,23251342,23251343,23251344,23251345,23251346,23251347,23251348,23251349,23251350,23251351?tags=mal_croppe,metal,autre_refus,environnement,papier,cartonnette,Carton_brun,kraft,Teint_Dans_La_Masse,flou,plastique,Carton_gris After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([23251214]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1360423070, 1360423066, 1360423051, 1360422950, 1360422947, 1360422945, 1360422942, 1360422938, 1360422936] map_info['map_portfolio_photo'] : {23251214: [1360423070, 1360423066, 1360423051, 1360422950, 1360422947, 1360422945, 1360422942, 1360422938, 1360422936, 1360422620, 1360422594, 1360422590, 1360422585, 1360422414, 1360422407, 1360422404, 1360422400, 1360422397, 1360422149, 1360422122, 1360422103, 1360422100, 1360422093, 1360421768, 1360421729, 1360421701, 1360421672, 1360421644, 1360421310, 1360421307, 1360421302, 1360421299, 1360421297, 1360421294, 1360421227, 1360421173, 1360421168, 1360421163, 1360421159, 1360420983, 1360420979, 1360420976, 1360420952, 1360420949, 1360420947, 1360420946, 1360420912, 1360420908, 1360420597, 1360420571, 1360420542, 1360420516, 1360420477, 1360419880, 1360419849, 1360419836, 1360419835, 1360419553, 1360419505, 1360419472, 1360419445]} final : False mtd_id 4302 list_pids : [1360423070, 1360423066, 1360423051, 1360422950, 1360422947, 1360422945, 1360422942, 1360422938, 1360422936] Looping around the photos to save general results len do output : 1 /23251214. 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, '2931868') ('4302', '23251214', '1360423070', None, None, None, None, None, '2931868') ('4302', None, None, None, None, None, None, None, '2931868') ('4302', '23251214', '1360423066', None, None, None, None, None, '2931868') ('4302', None, None, None, None, None, None, None, '2931868') ('4302', '23251214', '1360423051', None, None, None, None, None, '2931868') ('4302', None, None, None, None, None, None, None, '2931868') ('4302', '23251214', '1360422950', None, None, None, None, None, '2931868') ('4302', None, None, None, None, None, None, None, '2931868') ('4302', '23251214', '1360422947', None, None, None, None, None, '2931868') ('4302', None, None, None, None, None, None, None, '2931868') ('4302', '23251214', '1360422945', None, None, None, None, None, '2931868') ('4302', None, None, None, None, None, None, None, '2931868') ('4302', '23251214', '1360422942', None, None, None, None, None, '2931868') ('4302', None, None, None, None, None, None, None, '2931868') ('4302', '23251214', '1360422938', None, None, None, None, None, '2931868') ('4302', None, None, None, None, None, None, None, '2931868') ('4302', '23251214', '1360422936', None, None, None, None, None, '2931868') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 10 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, '23251214', "{'mal_croppe': 23251323, 'metal': 23251324, 'autre_refus': 23251325, 'environnement': 23251326, 'papier': 23251327, 'cartonnette': 23251328, 'Carton_brun': 23251329, 'kraft': 23251330, 'Teint_Dans_La_Masse': 23251331, 'flou': 23251332, 'plastique': 23251333, 'Carton_gris': 23251334}", None, None, None, None, '2931868'), ('4302', '23251214', '1360423070', None, None, None, None, None, '2931868'), ('4302', '23251214', '1360423066', None, None, None, None, None, '2931868'), ('4302', '23251214', '1360423051', None, None, None, None, None, '2931868'), ('4302', '23251214', '1360422950', None, None, None, None, None, '2931868'), ('4302', '23251214', '1360422947', None, None, None, None, None, '2931868'), ('4302', '23251214', '1360422945', None, None, None, None, None, '2931868'), ('4302', '23251214', '1360422942', None, None, None, None, None, '2931868'), ('4302', '23251214', '1360422938', None, None, None, None, None, '2931868'), ('4302', '23251214', '1360422936', None, None, None, None, None, '2931868')] time used for this insertion : 0.01655101776123047 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.41515016555786133 time spend to save output : 0.016782760620117188 total time spend for step 1 : 0.4319329261779785 step2:final Thu May 22 07:14:56 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 (23251214) 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 23251214 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1360419553,1360419505,1360419472,1360419445,1360419880,1360419849,1360419836,1360419835,1360420597,1360420571,1360420542,1360420516,1360420477,1360420952,1360420949,1360420947,1360420946,1360420912,1360420908,1360420983,1360420979,1360420976,1360421227,1360421173,1360421168,1360421163,1360421159,1360421310,1360421307,1360421302,1360421299,1360421297,1360421294,1360421768,1360421729,1360421701,1360421672,1360421644,1360422149,1360422122,1360422103,1360422100,1360422093,1360422414,1360422407,1360422404,1360422400,1360422397,1360422620,1360422594,1360422590,1360422585,1360422950,1360422947,1360422945,1360422942,1360422938,1360422936,1360423070,1360423066,1360423051); 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([23251214]) Inside saveOutput : final : False verbose : True original output for save of step final : {1360423070: ('0.0800495504484515',), 1360423066: ('0.0800495504484515',), 1360423051: ('0.0800495504484515',), 1360422950: ('0.0800495504484515',), 1360422947: ('0.0800495504484515',), 1360422945: ('0.0800495504484515',), 1360422942: ('0.0800495504484515',), 1360422938: ('0.0800495504484515',), 1360422936: ('0.0800495504484515',)} new output for save of step final : {1360423070: ('0.0800495504484515',), 1360423066: ('0.0800495504484515',), 1360423051: ('0.0800495504484515',), 1360422950: ('0.0800495504484515',), 1360422947: ('0.0800495504484515',), 1360422945: ('0.0800495504484515',), 1360422942: ('0.0800495504484515',), 1360422938: ('0.0800495504484515',), 1360422936: ('0.0800495504484515',)} [1360423070, 1360423066, 1360423051, 1360422950, 1360422947, 1360422945, 1360422942, 1360422938, 1360422936] map_info['map_portfolio_photo'] : {23251214: [1360423070, 1360423066, 1360423051, 1360422950, 1360422947, 1360422945, 1360422942, 1360422938, 1360422936, 1360422620, 1360422594, 1360422590, 1360422585, 1360422414, 1360422407, 1360422404, 1360422400, 1360422397, 1360422149, 1360422122, 1360422103, 1360422100, 1360422093, 1360421768, 1360421729, 1360421701, 1360421672, 1360421644, 1360421310, 1360421307, 1360421302, 1360421299, 1360421297, 1360421294, 1360421227, 1360421173, 1360421168, 1360421163, 1360421159, 1360420983, 1360420979, 1360420976, 1360420952, 1360420949, 1360420947, 1360420946, 1360420912, 1360420908, 1360420597, 1360420571, 1360420542, 1360420516, 1360420477, 1360419880, 1360419849, 1360419836, 1360419835, 1360419553, 1360419505, 1360419472, 1360419445]} final : False mtd_id 4302 list_pids : [1360423070, 1360423066, 1360423051, 1360422950, 1360422947, 1360422945, 1360422942, 1360422938, 1360422936] Looping around the photos to save general results len do output : 9 /1360423070.Didn't retrieve data . /1360423066.Didn't retrieve data . /1360423051.Didn't retrieve data . /1360422950.Didn't retrieve data . /1360422947.Didn't retrieve data . /1360422945.Didn't retrieve data . /1360422942.Didn't retrieve data . /1360422938.Didn't retrieve data . /1360422936.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, '2931868') ('4302', '23251214', '1360423070', None, None, None, None, None, '2931868') ('4302', None, None, None, None, None, None, None, '2931868') ('4302', '23251214', '1360423066', None, None, None, None, None, '2931868') ('4302', None, None, None, None, None, None, None, '2931868') ('4302', '23251214', '1360423051', None, None, None, None, None, '2931868') ('4302', None, None, None, None, None, None, None, '2931868') ('4302', '23251214', '1360422950', None, None, None, None, None, '2931868') ('4302', None, None, None, None, None, None, None, '2931868') ('4302', '23251214', '1360422947', None, None, None, None, None, '2931868') ('4302', None, None, None, None, None, None, None, '2931868') ('4302', '23251214', '1360422945', None, None, None, None, None, '2931868') ('4302', None, None, None, None, None, None, None, '2931868') ('4302', '23251214', '1360422942', None, None, None, None, None, '2931868') ('4302', None, None, None, None, None, None, None, '2931868') ('4302', '23251214', '1360422938', None, None, None, None, None, '2931868') ('4302', None, None, None, None, None, None, None, '2931868') ('4302', '23251214', '1360422936', None, None, None, None, None, '2931868') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 27 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', '23251214', '1360423070', '0.0800495504484515', None, None, None, None, '2931868'), ('4302', '23251214', '1360423066', '0.0800495504484515', None, None, None, None, '2931868'), ('4302', '23251214', '1360423051', '0.0800495504484515', None, None, None, None, '2931868'), ('4302', '23251214', '1360422950', '0.0800495504484515', None, None, None, None, '2931868'), ('4302', '23251214', '1360422947', '0.0800495504484515', None, None, None, None, '2931868'), ('4302', '23251214', '1360422945', '0.0800495504484515', None, None, None, None, '2931868'), ('4302', '23251214', '1360422942', '0.0800495504484515', None, None, None, None, '2931868'), ('4302', '23251214', '1360422938', '0.0800495504484515', None, None, None, None, '2931868'), ('4302', '23251214', '1360422936', '0.0800495504484515', None, None, None, None, '2931868')] time used for this insertion : 0.0162961483001709 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.06217336654663086 time spend to save output : 0.016788959503173828 total time spend for step 2 : 0.07896232604980469 step3:velours_tree Thu May 22 07:14:56 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 : {23251214: [{'mal_croppe': 23251323, 'metal': 23251324, 'autre_refus': 23251325, 'environnement': 23251326, 'papier': 23251327, 'cartonnette': 23251328, 'Carton_brun': 23251329, 'kraft': 23251330, 'Teint_Dans_La_Masse': 23251331, 'flou': 23251332, 'plastique': 23251333, 'Carton_gris': 23251334}]} input_args_next_step : {23251214: ()} output_args : {23251214: [{'mal_croppe': 23251323, 'metal': 23251324, 'autre_refus': 23251325, 'environnement': 23251326, 'papier': 23251327, 'cartonnette': 23251328, 'Carton_brun': 23251329, 'kraft': 23251330, 'Teint_Dans_La_Masse': 23251331, 'flou': 23251332, 'plastique': 23251333, 'Carton_gris': 23251334}]} args : 23251214 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 : ({'mal_croppe': 23251323, 'metal': 23251324, 'autre_refus': 23251325, 'environnement': 23251326, 'papier': 23251327, 'cartonnette': 23251328, 'Carton_brun': 23251329, 'kraft': 23251330, 'Teint_Dans_La_Masse': 23251331, 'flou': 23251332, 'plastique': 23251333, 'Carton_gris': 23251334},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (23251214) 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([23251214]) 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.27272605895996094 time spend to save output : 4.9591064453125e-05 total time spend for step 3 : 0.27277565002441406 step4:send_mail_cod Thu May 22 07:14:56 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 : {1360423070: ('0.0800495504484515',), 1360423066: ('0.0800495504484515',), 1360423051: ('0.0800495504484515',), 1360422950: ('0.0800495504484515',), 1360422947: ('0.0800495504484515',), 1360422945: ('0.0800495504484515',), 1360422942: ('0.0800495504484515',), 1360422938: ('0.0800495504484515',), 1360422936: ('0.0800495504484515',)} input_args_next_step : {1360423070: ()} output_args : {1360423070: ('0.0800495504484515',), 1360423066: ('0.0800495504484515',), 1360423051: ('0.0800495504484515',), 1360422950: ('0.0800495504484515',), 1360422947: ('0.0800495504484515',), 1360422945: ('0.0800495504484515',), 1360422942: ('0.0800495504484515',), 1360422938: ('0.0800495504484515',), 1360422936: ('0.0800495504484515',)} args : 1360423070 depend.output_id : 0 input_args_next_step : {1360423070: ('0.0800495504484515',), 1360423066: ()} output_args : {1360423070: ('0.0800495504484515',), 1360423066: ('0.0800495504484515',), 1360423051: ('0.0800495504484515',), 1360422950: ('0.0800495504484515',), 1360422947: ('0.0800495504484515',), 1360422945: ('0.0800495504484515',), 1360422942: ('0.0800495504484515',), 1360422938: ('0.0800495504484515',), 1360422936: ('0.0800495504484515',)} args : 1360423066 depend.output_id : 0 input_args_next_step : {1360423070: ('0.0800495504484515',), 1360423066: ('0.0800495504484515',), 1360423051: ()} output_args : {1360423070: ('0.0800495504484515',), 1360423066: ('0.0800495504484515',), 1360423051: ('0.0800495504484515',), 1360422950: ('0.0800495504484515',), 1360422947: ('0.0800495504484515',), 1360422945: ('0.0800495504484515',), 1360422942: ('0.0800495504484515',), 1360422938: ('0.0800495504484515',), 1360422936: ('0.0800495504484515',)} args : 1360423051 depend.output_id : 0 input_args_next_step : {1360423070: ('0.0800495504484515',), 1360423066: ('0.0800495504484515',), 1360423051: ('0.0800495504484515',), 1360422950: ()} output_args : {1360423070: ('0.0800495504484515',), 1360423066: ('0.0800495504484515',), 1360423051: ('0.0800495504484515',), 1360422950: ('0.0800495504484515',), 1360422947: ('0.0800495504484515',), 1360422945: ('0.0800495504484515',), 1360422942: ('0.0800495504484515',), 1360422938: ('0.0800495504484515',), 1360422936: ('0.0800495504484515',)} args : 1360422950 depend.output_id : 0 input_args_next_step : {1360423070: ('0.0800495504484515',), 1360423066: ('0.0800495504484515',), 1360423051: ('0.0800495504484515',), 1360422950: ('0.0800495504484515',), 1360422947: ()} output_args : {1360423070: ('0.0800495504484515',), 1360423066: ('0.0800495504484515',), 1360423051: ('0.0800495504484515',), 1360422950: ('0.0800495504484515',), 1360422947: ('0.0800495504484515',), 1360422945: ('0.0800495504484515',), 1360422942: ('0.0800495504484515',), 1360422938: ('0.0800495504484515',), 1360422936: ('0.0800495504484515',)} args : 1360422947 depend.output_id : 0 input_args_next_step : {1360423070: ('0.0800495504484515',), 1360423066: ('0.0800495504484515',), 1360423051: ('0.0800495504484515',), 1360422950: ('0.0800495504484515',), 1360422947: ('0.0800495504484515',), 1360422945: ()} output_args : {1360423070: ('0.0800495504484515',), 1360423066: ('0.0800495504484515',), 1360423051: ('0.0800495504484515',), 1360422950: ('0.0800495504484515',), 1360422947: ('0.0800495504484515',), 1360422945: ('0.0800495504484515',), 1360422942: ('0.0800495504484515',), 1360422938: ('0.0800495504484515',), 1360422936: ('0.0800495504484515',)} args : 1360422945 depend.output_id : 0 input_args_next_step : {1360423070: ('0.0800495504484515',), 1360423066: ('0.0800495504484515',), 1360423051: ('0.0800495504484515',), 1360422950: ('0.0800495504484515',), 1360422947: ('0.0800495504484515',), 1360422945: ('0.0800495504484515',), 1360422942: ()} output_args : {1360423070: ('0.0800495504484515',), 1360423066: ('0.0800495504484515',), 1360423051: ('0.0800495504484515',), 1360422950: ('0.0800495504484515',), 1360422947: ('0.0800495504484515',), 1360422945: ('0.0800495504484515',), 1360422942: ('0.0800495504484515',), 1360422938: ('0.0800495504484515',), 1360422936: ('0.0800495504484515',)} args : 1360422942 depend.output_id : 0 input_args_next_step : {1360423070: ('0.0800495504484515',), 1360423066: ('0.0800495504484515',), 1360423051: ('0.0800495504484515',), 1360422950: ('0.0800495504484515',), 1360422947: ('0.0800495504484515',), 1360422945: ('0.0800495504484515',), 1360422942: ('0.0800495504484515',), 1360422938: ()} output_args : {1360423070: ('0.0800495504484515',), 1360423066: ('0.0800495504484515',), 1360423051: ('0.0800495504484515',), 1360422950: ('0.0800495504484515',), 1360422947: ('0.0800495504484515',), 1360422945: ('0.0800495504484515',), 1360422942: ('0.0800495504484515',), 1360422938: ('0.0800495504484515',), 1360422936: ('0.0800495504484515',)} args : 1360422938 depend.output_id : 0 input_args_next_step : {1360423070: ('0.0800495504484515',), 1360423066: ('0.0800495504484515',), 1360423051: ('0.0800495504484515',), 1360422950: ('0.0800495504484515',), 1360422947: ('0.0800495504484515',), 1360422945: ('0.0800495504484515',), 1360422942: ('0.0800495504484515',), 1360422938: ('0.0800495504484515',), 1360422936: ()} output_args : {1360423070: ('0.0800495504484515',), 1360423066: ('0.0800495504484515',), 1360423051: ('0.0800495504484515',), 1360422950: ('0.0800495504484515',), 1360422947: ('0.0800495504484515',), 1360422945: ('0.0800495504484515',), 1360422942: ('0.0800495504484515',), 1360422938: ('0.0800495504484515',), 1360422936: ('0.0800495504484515',)} args : 1360422936 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 : {23251214: [{'mal_croppe': 23251323, 'metal': 23251324, 'autre_refus': 23251325, 'environnement': 23251326, 'papier': 23251327, 'cartonnette': 23251328, 'Carton_brun': 23251329, 'kraft': 23251330, 'Teint_Dans_La_Masse': 23251331, 'flou': 23251332, 'plastique': 23251333, 'Carton_gris': 23251334}]} input_args_next_step : {1360423070: ('0.0800495504484515',), 1360423066: ('0.0800495504484515',), 1360423051: ('0.0800495504484515',), 1360422950: ('0.0800495504484515',), 1360422947: ('0.0800495504484515',), 1360422945: ('0.0800495504484515',), 1360422942: ('0.0800495504484515',), 1360422938: ('0.0800495504484515',), 1360422936: ('0.0800495504484515',), 23251214: ()} output_args : {23251214: [{'mal_croppe': 23251323, 'metal': 23251324, 'autre_refus': 23251325, 'environnement': 23251326, 'papier': 23251327, 'cartonnette': 23251328, 'Carton_brun': 23251329, 'kraft': 23251330, 'Teint_Dans_La_Masse': 23251331, 'flou': 23251332, 'plastique': 23251333, 'Carton_gris': 23251334}]} args : 23251214 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 :10, first value : ('0.0800495504484515',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (23251214) 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 (1360423070,1360423066,1360423051,1360422950,1360422947,1360422945,1360422942,1360422938,1360422936) Found this number of photos: 9 ##### Call download_photos : nb_thread : 5 begin to download photo : 1360422936 begin to download photo : 1360422942 begin to download photo : 1360422947 begin to download photo : 1360423051 begin to download photo : 1360423070 download finish for photo 1360423070 download finish for photo 1360422936 begin to download photo : 1360422938 download finish for photo 1360422947 begin to download photo : 1360422950 download finish for photo 1360422942 begin to download photo : 1360422945 download finish for photo 1360423051 begin to download photo : 1360423066 download finish for photo 1360423066 download finish for photo 1360422938 download finish for photo 1360422950 download finish for photo 1360422945 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette232513231747890897/ imagette232513241747890897/ length of list_filenames : 9 ; length of list_pids : 9 ; length of list_args : 9 results_Auto_P23251214_22-05-2025_07_14_57.pdf 23251323 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=23251323 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette232513231747890897 23251324 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=23251324 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette232513241747890897 23251325 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=23251325 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1360420997: '1747890265_1439762_1360419472_0ee82a482b96ee0d5f0fe9b848795440_rle_crop_3809618455_0.png'} change filename to text .imagette232513251747890897/ imagette232513251747890897/1747890265_1439762_1360419472_0ee82a482b96ee0d5f0fe9b848795440_rle_crop_3809618455_0.png.png wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/22/2e1d3348cdc8834376dc0c1278a88ddb_26147607.png imagette232513251747890897 23251328 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=23251328 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1360421024: '1747890265_1439762_1360419880_647285277cb0a3030532ec6bf933cc3a_rle_crop_3809618279_0.png', 1360422352: '1747890567_1445857_1360420979_79c50fcbf22a63c422a74e7f03438065_rle_crop_3809621421_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/22/fdce4b6df504f0ccfbd76de1c25c5dea_24674207.png change filename to text .imagette232513281747890897/ imagette232513281747890897/1747890265_1439762_1360419880_647285277cb0a3030532ec6bf933cc3a_rle_crop_3809618279_0.png.png imagette232513281747890897/1747890567_1445857_1360420979_79c50fcbf22a63c422a74e7f03438065_rle_crop_3809621421_0.png.png wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/22/114db383258340e3ce5f490d02424e86_43055014.png imagette232513281747890897 23251330 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=23251330 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1360421058: '1747890265_1439762_1360419553_e5ffdf73a906911cd4e3d0a48776badb_rle_crop_3809618290_0.png', 1360421060: '1747890265_1439762_1360419445_1d9274f250ac1aecacf98342dd32a4fd_rle_crop_3809618460_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/22/6ae514b34dc8c6bf2cedef41d29f6932_48600493.png change filename to text .imagette232513301747890897/ imagette232513301747890897/1747890265_1439762_1360419445_1d9274f250ac1aecacf98342dd32a4fd_rle_crop_3809618460_0.png.png imagette232513301747890897/1747890265_1439762_1360419553_e5ffdf73a906911cd4e3d0a48776badb_rle_crop_3809618290_0.png.png imagette232513321747890897/ wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/22/501366cca30e56ceb2797439055ddc26_75153853.png imagette232513301747890897 23251332 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=23251332 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette232513321747890897 23251333 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=23251333 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1360421043: '1747890265_1439762_1360419505_3b6ce320a0366b4666d84f58e0b9055d_rle_crop_3809618365_0.png'} change filename to text .imagette232513331747890897/ imagette232513331747890897/1747890265_1439762_1360419505_3b6ce320a0366b4666d84f58e0b9055d_rle_crop_3809618365_0.png.png wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/22/8ed9af2d79a53d474c49dd9d05167ab1_89007398.png imagette232513331747890897 23251329 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=23251329 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1360421032: '1747890265_1439762_1360419553_e5ffdf73a906911cd4e3d0a48776badb_rle_crop_3809618293_0.png', 1360421035: '1747890265_1439762_1360419472_0ee82a482b96ee0d5f0fe9b848795440_rle_crop_3809618452_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/22/b58395a9e96d225bad260c8d9869b289_5672340.png change filename to text .imagette232513291747890897/ imagette232513291747890897/1747890265_1439762_1360419553_e5ffdf73a906911cd4e3d0a48776badb_rle_crop_3809618293_0.png.png imagette232513291747890897/1747890265_1439762_1360419472_0ee82a482b96ee0d5f0fe9b848795440_rle_crop_3809618452_0.png.png wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/22/323cd4ba539647f9eb54709c7a3ac569_27009766.png imagette232513291747890897 23251331 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=23251331 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1360420989: '1747890265_1439762_1360419880_647285277cb0a3030532ec6bf933cc3a_rle_crop_3809618281_0.png', 1360420990: '1747890265_1439762_1360419505_3b6ce320a0366b4666d84f58e0b9055d_rle_crop_3809618370_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/22/9be6d3a60a418ca97c126339f92b58f7_75611848.png change filename to text .imagette232513311747890897/ imagette232513311747890897/1747890265_1439762_1360419505_3b6ce320a0366b4666d84f58e0b9055d_rle_crop_3809618370_0.png.png imagette232513311747890897/1747890265_1439762_1360419880_647285277cb0a3030532ec6bf933cc3a_rle_crop_3809618281_0.png.png wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/22/a96bb0577133d2219c05f4ce122b1ad5_42759224.png imagette232513311747890897 23251334 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=23251334 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1360421009: '1747890265_1439762_1360419880_647285277cb0a3030532ec6bf933cc3a_rle_crop_3809618280_0.png', 1360421011: '1747890265_1439762_1360419553_e5ffdf73a906911cd4e3d0a48776badb_rle_crop_3809618292_0.png', 1360421013: '1747890265_1439762_1360419553_e5ffdf73a906911cd4e3d0a48776badb_rle_crop_3809618295_0.png', 1360421015: '1747890265_1439762_1360419505_3b6ce320a0366b4666d84f58e0b9055d_rle_crop_3809618372_0.png', 1360421017: '1747890265_1439762_1360419472_0ee82a482b96ee0d5f0fe9b848795440_rle_crop_3809618448_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/22/96ff51c4355b14289dd311f9f042b18b_65143311.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/22/acda8906f8bbf57cdc69730c1b3f7a57_44637010.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/22/4fa349d0c0d0e51bc9d83174bd1a1942_47960138.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/22/2acfd8a04e137aa03b69782a45407dc0_2749180.png change filename to text .imagette232513341747890897/ imagette232513341747890897/1747890265_1439762_1360419553_e5ffdf73a906911cd4e3d0a48776badb_rle_crop_3809618295_0.png.png imagette232513341747890897/1747890265_1439762_1360419553_e5ffdf73a906911cd4e3d0a48776badb_rle_crop_3809618292_0.png.png imagette232513341747890897/1747890265_1439762_1360419472_0ee82a482b96ee0d5f0fe9b848795440_rle_crop_3809618448_0.png.png imagette232513341747890897/1747890265_1439762_1360419505_3b6ce320a0366b4666d84f58e0b9055d_rle_crop_3809618372_0.png.png imagette232513341747890897/1747890265_1439762_1360419880_647285277cb0a3030532ec6bf933cc3a_rle_crop_3809618280_0.png.png wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/22/ab502f5c43b878bd589a44b0981659f1_72459969.png imagette232513341747890897 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=23251214 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/23251340,23251341,23251342,23251343,23251344,23251345,23251346,23251347,23251348,23251349,23251350,23251351?tags=mal_croppe,metal,autre_refus,environnement,papier,cartonnette,Carton_brun,kraft,Teint_Dans_La_Masse,flou,plastique,Carton_gris your option no_mail is active, we will not send the real mail to your client args[1360423070] : ('0.0800495504484515',) no score found for photo 1360423070 We are sending mail with results at report@fotonower.com args[1360423066] : ('0.0800495504484515',) no score found for photo 1360423066 We are sending mail with results at report@fotonower.com args[1360423051] : ('0.0800495504484515',) no score found for photo 1360423051 We are sending mail with results at report@fotonower.com args[1360422950] : ('0.0800495504484515',) no score found for photo 1360422950 We are sending mail with results at report@fotonower.com args[1360422947] : ('0.0800495504484515',) no score found for photo 1360422947 We are sending mail with results at report@fotonower.com args[1360422945] : ('0.0800495504484515',) no score found for photo 1360422945 We are sending mail with results at report@fotonower.com args[1360422942] : ('0.0800495504484515',) no score found for photo 1360422942 We are sending mail with results at report@fotonower.com args[1360422938] : ('0.0800495504484515',) no score found for photo 1360422938 We are sending mail with results at report@fotonower.com args[1360422936] : ('0.0800495504484515',) no score found for photo 1360422936 We are sending mail with results at report@fotonower.com refus_total : 0.0800495504484515 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=23251214 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_P23251214_22-05-2025_07_14_57.pdf results_Auto_P23251214_22-05-2025_07_14_57.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23251214_22-05-2025_07_14_57.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','23251214','results_Auto_P23251214_22-05-2025_07_14_57.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23251214_22-05-2025_07_14_57.pdf','pdf','','0.13','0.0800495504484515') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([23251214]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1360423070, 1360423066, 1360423051, 1360422950, 1360422947, 1360422945, 1360422942, 1360422938, 1360422936] map_info['map_portfolio_photo'] : {23251214: [1360423070, 1360423066, 1360423051, 1360422950, 1360422947, 1360422945, 1360422942, 1360422938, 1360422936, 1360422620, 1360422594, 1360422590, 1360422585, 1360422414, 1360422407, 1360422404, 1360422400, 1360422397, 1360422149, 1360422122, 1360422103, 1360422100, 1360422093, 1360421768, 1360421729, 1360421701, 1360421672, 1360421644, 1360421310, 1360421307, 1360421302, 1360421299, 1360421297, 1360421294, 1360421227, 1360421173, 1360421168, 1360421163, 1360421159, 1360420983, 1360420979, 1360420976, 1360420952, 1360420949, 1360420947, 1360420946, 1360420912, 1360420908, 1360420597, 1360420571, 1360420542, 1360420516, 1360420477, 1360419880, 1360419849, 1360419836, 1360419835, 1360419553, 1360419505, 1360419472, 1360419445]} final : False mtd_id 4302 list_pids : [1360423070, 1360423066, 1360423051, 1360422950, 1360422947, 1360422945, 1360422942, 1360422938, 1360422936] 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, '2931868') ('4302', '23251214', '1360423070', None, None, None, None, None, '2931868') ('4302', None, None, None, None, None, None, None, '2931868') ('4302', '23251214', '1360423066', None, None, None, None, None, '2931868') ('4302', None, None, None, None, None, None, None, '2931868') ('4302', '23251214', '1360423051', None, None, None, None, None, '2931868') ('4302', None, None, None, None, None, None, None, '2931868') ('4302', '23251214', '1360422950', None, None, None, None, None, '2931868') ('4302', None, None, None, None, None, None, None, '2931868') ('4302', '23251214', '1360422947', None, None, None, None, None, '2931868') ('4302', None, None, None, None, None, None, None, '2931868') ('4302', '23251214', '1360422945', None, None, None, None, None, '2931868') ('4302', None, None, None, None, None, None, None, '2931868') ('4302', '23251214', '1360422942', None, None, None, None, None, '2931868') ('4302', None, None, None, None, None, None, None, '2931868') ('4302', '23251214', '1360422938', None, None, None, None, None, '2931868') ('4302', None, None, None, None, None, None, None, '2931868') ('4302', '23251214', '1360422936', None, None, None, None, None, '2931868') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 9 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', '23251214', '1360423070', None, None, None, None, None, '2931868'), ('4302', '23251214', '1360423066', None, None, None, None, None, '2931868'), ('4302', '23251214', '1360423051', None, None, None, None, None, '2931868'), ('4302', '23251214', '1360422950', None, None, None, None, None, '2931868'), ('4302', '23251214', '1360422947', None, None, None, None, None, '2931868'), ('4302', '23251214', '1360422945', None, None, None, None, None, '2931868'), ('4302', '23251214', '1360422942', None, None, None, None, None, '2931868'), ('4302', '23251214', '1360422938', None, None, None, None, None, '2931868'), ('4302', '23251214', '1360422936', None, None, None, None, None, '2931868')] time used for this insertion : 0.014995574951171875 save_final save missing photos in datou_result : time spend for datou_step_exec : 2.2782249450683594 time spend to save output : 0.015203714370727539 total time spend for step 4 : 2.293428659439087 step5:split_time_score Thu May 22 07:14: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 : ['23251214'] 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 : [('23251214',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (23251214) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1360423070: {'path': 'temp/1747890896_1595686_1360423070_cf9e779f039b0fce992f966e00f9e143.jpg', 'extension': 'jpg'}, 1360423051: {'path': 'temp/1747890896_1595686_1360423051_e6082a9ef642a8e80f03b43c93f3e37a.jpg', 'extension': 'jpg'}, 1360423066: {'path': 'temp/1747890896_1595686_1360423066_a5e88acfda0966cc120a2367d1a65b59.jpg', 'extension': 'jpg'}, 1360422936: {'path': 'temp/1747890896_1595686_1360422936_e1cabb5a1ed573d951a70014adcbeed5.jpg', 'extension': 'jpg'}, 1360422938: {'path': 'temp/1747890896_1595686_1360422938_92c48f70b48071fefaa1d929e2188dcd.jpg', 'extension': 'jpg'}, 1360422947: {'path': 'temp/1747890896_1595686_1360422947_5ae22b4994168a24d2d1d679d23ea534.jpg', 'extension': 'jpg'}, 1360422950: {'path': 'temp/1747890896_1595686_1360422950_fb5c7eddcf59f3fb50b9e310809b302e.jpg', 'extension': 'jpg'}, 1360422942: {'path': 'temp/1747890896_1595686_1360422942_9f6335e1456d147f0bd829898fcadf98.jpg', 'extension': 'jpg'}, 1360422945: {'path': 'temp/1747890896_1595686_1360422945_2439c151b7d438e31c585abff0d52d0d.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 = 23251214; (('arc_en_ciel_jrm_live',), ('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 = 23251214 group by h (('07', 61),) 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=23251214 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 (23251214) 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 (23251214) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 22052025 23251214 Nombre de photos uploadées : 61 / 23040 (0%) 22052025 23251214 Nombre de photos taguées (types de déchets): 0 / 61 (0%) 22052025 23251214 Nombre de photos taguées (volume) : 0 / 61 (0%) [{'photo_id': 1360419553, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/22/e5ffdf73a906911cd4e3d0a48776badb.jpg', 'username': None, 'uploaded_at': 1747890067, 'text': 'image_22052025_07_00_14_010188m0.jpg 1e-05 for time 1, id_amount 3 this amount prod time diff : 1e-05'}, {'photo_id': 1360419505, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/22/3b6ce320a0366b4666d84f58e0b9055d.jpg', 'username': None, 'uploaded_at': 1747890067, 'text': 'image_22052025_07_00_24_010140m0.jpg 2e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1360419472, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/22/0ee82a482b96ee0d5f0fe9b848795440.jpg', 'username': None, 'uploaded_at': 1747890067, 'text': 'image_22052025_07_00_34_010140m0.jpg 3.0000000000000004e-05 for time 1, id_amount 1 this amount prod time diff : 1e-05'}, {'photo_id': 1360419445, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/22/1d9274f250ac1aecacf98342dd32a4fd.jpg', 'username': None, 'uploaded_at': 1747890067, 'text': 'image_22052025_07_00_44_010137m0.jpg 4e-05 for time 1, id_amount 1 this amount prod time diff : 1e-05'}] 0 [] elapsed_time : load_data_split_time_score 1.430511474609375e-06 elapsed_time : order_list_meta_photo_and_scores 4.5299530029296875e-06 ????????????????????????????????????????????????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.003479480743408203 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 23251214, '2025-05-22' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (1828582,979,"{}"); elapsed_time : insert_dashboard_record_day_entry 0.023709535598754883 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= 1828582 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 1828582, 'dashboard_run_id': 1837191, 'mtr_portfolio_id': 23245647, 'dashboard_result_id': 10826100, '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_P23245647_22-05-2025_06_10_29.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23245667, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23245668, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23245669, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23245670, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23245671, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23245672, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23245673, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23245674, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23245675, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23245676, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23245677, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23245678, 'pht': 3726}}"}, {'dashboat_entry_day': 1828582, 'dashboard_run_id': 1837191, 'mtr_portfolio_id': 23246295, 'dashboard_result_id': 10826101, '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_P23246295_22-05-2025_06_11_28.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23246336, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23246337, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23246338, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23246339, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23246340, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23246341, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23246342, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23246343, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23246344, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23246345, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23246346, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23246347, 'pht': 3726}}"}, {'dashboat_entry_day': 1828582, 'dashboard_run_id': 1837191, 'mtr_portfolio_id': 23246834, 'dashboard_result_id': 10826102, '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_P23246834_22-05-2025_05_46_59.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23246877, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23246878, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23246879, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23246880, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23246881, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23246882, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23246883, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23246884, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23246885, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23246886, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23246887, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23246888, 'pht': 3726}}"}, {'dashboat_entry_day': 1828582, 'dashboard_run_id': 1837191, 'mtr_portfolio_id': 23247440, 'dashboard_result_id': 10826103, '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_P23247440_22-05-2025_06_03_28.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23247486, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23247487, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23247488, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23247489, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23247490, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23247491, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23247492, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23247493, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23247494, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23247495, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23247496, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23247497, 'pht': 3726}}"}, {'dashboat_entry_day': 1828582, 'dashboard_run_id': 1837191, 'mtr_portfolio_id': 23248080, 'dashboard_result_id': 10826104, '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_P23248080_22-05-2025_06_18_59.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23248123, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23248124, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23248125, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23248126, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23248127, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23248128, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23248129, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23248130, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23248131, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23248132, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23248133, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23248134, 'pht': 3726}}"}, {'dashboat_entry_day': 1828582, 'dashboard_run_id': 1837191, 'mtr_portfolio_id': 23249066, 'dashboard_result_id': 10826105, '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_P23249066_22-05-2025_06_32_57.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23249098, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23249099, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23249100, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23249101, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23249102, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23249103, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23249104, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23249105, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23249106, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23249107, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23249108, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23249109, 'pht': 3726}}"}, {'dashboat_entry_day': 1828582, 'dashboard_run_id': 1837191, 'mtr_portfolio_id': 23249917, 'dashboard_result_id': 10826106, '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_P23249917_22-05-2025_06_48_59.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 23249931, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23249932, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23249933, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23249934, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23249935, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23249936, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23249937, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23249938, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23249939, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23249940, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23249941, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23249942, 'pht': 3726}}"}, {'dashboat_entry_day': 1828582, 'dashboard_run_id': 1837191, 'mtr_portfolio_id': 23250582, 'dashboard_result_id': 10826107, '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_P23250582_22-05-2025_07_03_00.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23250655, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23250656, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23250657, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23250658, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23250659, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23250660, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23250661, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23250662, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23250663, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23250664, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23250665, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23250666, 'pht': 3726}}"}, {'dashboat_entry_day': 1828582, 'dashboard_run_id': 1837191, 'mtr_portfolio_id': 23251214, 'dashboard_result_id': 10826108, '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_P23251214_22-05-2025_07_13_00.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23251323, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23251324, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23251325, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23251326, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23251327, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23251328, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23251329, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23251330, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23251331, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23251332, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23251333, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23251334, '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 = 23245647 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': 2931120, 'mtr_portfolio_id': 23245647, 'created_at': datetime.datetime(2025, 5, 22, 6, 10, 28), 'result': '0.10100379997966319', 'result_long': None, 'result_double': None}] Qualite : 0.10100379997966319 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 23245647 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23245647_22-05-2025_06_10_29.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 23245647 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_P23245647_22-05-2025_06_10_29.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23245667, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23245668, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23245669, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23245670, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23245671, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23245672, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23245673, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23245674, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23245675, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23245676, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23245677, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23245678, 'pht': 3726}}" where mtr_portfolio_id = 23245647 and dashboard_run_id = 1837191 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`=23245647 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10826100, 0.10100379997966319, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23245647_22-05-2025_06_10_29.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23245667, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23245668, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23245669, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23245670, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23245671, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23245672, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23245673, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23245674, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23245675, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23245676, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23245677, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23245678, '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 = 23246295 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': 2931121, 'mtr_portfolio_id': 23246295, 'created_at': datetime.datetime(2025, 5, 22, 6, 11, 26), 'result': '0.054239532515861555', 'result_long': None, 'result_double': None}] Qualite : 0.054239532515861555 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 23246295 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23246295_22-05-2025_06_11_28.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 23246295 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_P23246295_22-05-2025_06_11_28.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23246336, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23246337, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23246338, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23246339, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23246340, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23246341, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23246342, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23246343, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23246344, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23246345, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23246346, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23246347, 'pht': 3726}}" where mtr_portfolio_id = 23246295 and dashboard_run_id = 1837191 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`=23246295 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10826101, 0.054239532515861555, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23246295_22-05-2025_06_11_28.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23246336, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23246337, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23246338, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23246339, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23246340, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23246341, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23246342, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23246343, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23246344, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23246345, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23246346, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23246347, '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 = 23246834 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': 2931049, 'mtr_portfolio_id': 23246834, 'created_at': datetime.datetime(2025, 5, 22, 5, 46, 59), 'result': '0.038235238211983144', 'result_long': None, 'result_double': None}] Qualite : 0.038235238211983144 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 23246834 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23246834_22-05-2025_05_46_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 23246834 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_P23246834_22-05-2025_05_46_59.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23246877, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23246878, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23246879, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23246880, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23246881, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23246882, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23246883, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23246884, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23246885, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23246886, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23246887, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23246888, 'pht': 3726}}" where mtr_portfolio_id = 23246834 and dashboard_run_id = 1837191 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`=23246834 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10826102, 0.038235238211983144, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23246834_22-05-2025_05_46_59.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23246877, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23246878, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23246879, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23246880, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23246881, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23246882, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23246883, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23246884, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23246885, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23246886, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23246887, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23246888, '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 = 23247440 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': 2931225, 'mtr_portfolio_id': 23247440, 'created_at': datetime.datetime(2025, 5, 22, 6, 3, 28), 'result': '0.0800093332737387', 'result_long': None, 'result_double': None}] Qualite : 0.0800093332737387 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 23247440 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23247440_22-05-2025_06_03_28.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 23247440 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_P23247440_22-05-2025_06_03_28.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23247486, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23247487, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23247488, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23247489, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23247490, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23247491, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23247492, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23247493, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23247494, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23247495, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23247496, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23247497, 'pht': 3726}}" where mtr_portfolio_id = 23247440 and dashboard_run_id = 1837191 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`=23247440 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10826103, 0.0800093332737387, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23247440_22-05-2025_06_03_28.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23247486, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23247487, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23247488, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23247489, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23247490, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23247491, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23247492, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23247493, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23247494, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23247495, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23247496, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23247497, '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 = 23248080 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': 2931334, 'mtr_portfolio_id': 23248080, 'created_at': datetime.datetime(2025, 5, 22, 6, 18, 58), 'result': '0.05135937319949131', 'result_long': None, 'result_double': None}] Qualite : 0.05135937319949131 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 23248080 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23248080_22-05-2025_06_18_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 23248080 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_P23248080_22-05-2025_06_18_59.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23248123, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23248124, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23248125, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23248126, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23248127, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23248128, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23248129, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23248130, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23248131, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23248132, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23248133, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23248134, 'pht': 3726}}" where mtr_portfolio_id = 23248080 and dashboard_run_id = 1837191 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`=23248080 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10826104, 0.05135937319949131, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23248080_22-05-2025_06_18_59.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23248123, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23248124, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23248125, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23248126, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23248127, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23248128, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23248129, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23248130, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23248131, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23248132, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23248133, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23248134, '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 = 23249066 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': 2931511, 'mtr_portfolio_id': 23249066, 'created_at': datetime.datetime(2025, 5, 22, 6, 32, 57), 'result': '0.05290047862984647', 'result_long': None, 'result_double': None}] Qualite : 0.05290047862984647 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 23249066 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23249066_22-05-2025_06_32_57.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 23249066 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_P23249066_22-05-2025_06_32_57.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23249098, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23249099, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23249100, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23249101, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23249102, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23249103, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23249104, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23249105, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23249106, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23249107, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23249108, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23249109, 'pht': 3726}}" where mtr_portfolio_id = 23249066 and dashboard_run_id = 1837191 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`=23249066 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10826105, 0.05290047862984647, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23249066_22-05-2025_06_32_57.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23249098, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23249099, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23249100, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23249101, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23249102, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23249103, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23249104, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23249105, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23249106, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23249107, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23249108, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23249109, '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 = 23249917 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': 2931629, 'mtr_portfolio_id': 23249917, 'created_at': datetime.datetime(2025, 5, 22, 6, 48, 59), 'result': '0.038229498046543076', 'result_long': None, 'result_double': None}] Qualite : 0.038229498046543076 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 23249917 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23249917_22-05-2025_06_48_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 23249917 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_P23249917_22-05-2025_06_48_59.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 23249931, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23249932, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23249933, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23249934, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23249935, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23249936, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23249937, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23249938, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23249939, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23249940, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23249941, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23249942, 'pht': 3726}}" where mtr_portfolio_id = 23249917 and dashboard_run_id = 1837191 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`=23249917 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10826106, 0.038229498046543076, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23249917_22-05-2025_06_48_59.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 23249931, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23249932, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23249933, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23249934, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23249935, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23249936, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23249937, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23249938, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23249939, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23249940, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23249941, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23249942, '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 = 23250582 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': 2931744, 'mtr_portfolio_id': 23250582, 'created_at': datetime.datetime(2025, 5, 22, 7, 2, 59), 'result': '0.05328962431632753', 'result_long': None, 'result_double': None}] Qualite : 0.05328962431632753 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 23250582 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23250582_22-05-2025_07_03_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 23250582 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_P23250582_22-05-2025_07_03_00.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23250655, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23250656, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23250657, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23250658, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23250659, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23250660, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23250661, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23250662, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23250663, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23250664, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23250665, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23250666, 'pht': 3726}}" where mtr_portfolio_id = 23250582 and dashboard_run_id = 1837191 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`=23250582 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10826107, 0.05328962431632753, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23250582_22-05-2025_07_03_00.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23250655, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23250656, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23250657, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23250658, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23250659, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23250660, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23250661, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23250662, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23250663, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23250664, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23250665, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23250666, '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 = 23251214 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': 2931868, 'mtr_portfolio_id': 23251214, 'created_at': datetime.datetime(2025, 5, 22, 7, 14, 56), 'result': '0.0800495504484515', 'result_long': None, 'result_double': None}] Qualite : 0.0800495504484515 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 23251214 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23251214_22-05-2025_07_14_57.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 23251214 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_P23251214_22-05-2025_07_14_57.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23251323, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23251324, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23251325, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23251326, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23251327, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23251328, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23251329, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23251330, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23251331, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23251332, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23251333, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23251334, 'pht': 3726}}" where mtr_portfolio_id = 23251214 and dashboard_run_id = 1837191 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`=23251214 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10826108, 0.0800495504484515, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23251214_22-05-2025_07_14_57.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23251323, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23251324, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23251325, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23251326, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23251327, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23251328, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23251329, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23251330, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23251331, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23251332, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23251333, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23251334, '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 (23245647,23246295,23246834,23247440,23248080,23249066,23249917,23250582,23251214) result : ((1360388548,), (1360388617,), (1360389081,), (1360389201,), (1360389524,), (1360389555,), (1360389591,), (1360389641,), (1360389643,), (1360389740,), (1360389747,), (1360389907,), (1360389909,), (1360389975,), (1360390055,), (1360390069,), (1360390089,), (1360390097,), (1360390098,), (1360390469,), (1360390332,), (1360390366,), (1360390393,), (1360390418,), (1360390445,), (1360390842,), (1360390845,), (1360390861,), (1360391098,), (1360391122,), (1360391154,), (1360391182,), (1360391211,), (1360391235,), (1360391363,), (1360391365,), (1360391387,), (1360391392,), (1360391421,), (1360391448,), (1360391473,), (1360391715,), (1360391718,), (1360391720,), (1360391722,), (1360391724,), (1360391750,), (1360392022,), (1360392048,), (1360392112,), (1360392232,), (1360392250,), (1360392278,), (1360392286,), (1360392288,), (1360392294,), (1360392339,), (1360392346,), (1360392350,), (1360392354,), (1360392358,), (1360392597,), (1360392620,), (1360392644,), (1360392691,), (1360392734,), (1360392779,), (1360393197,), (1360393238,), (1360393257,), (1360393259,), (1360393283,), (1360393307,), (1360393600,), (1360393608,), (1360393610,), (1360393774,), (1360393777,), (1360393801,), (1360393817,), (1360393894,), (1360393906,), (1360393910,), (1360393927,), (1360393929,), (1360393930,), (1360393947,), (1360393950,), (1360393953,), (1360393956,), (1360393958,), (1360394024,), (1360393974,), (1360393976,), (1360393982,), (1360393987,), (1360394085,), (1360394091,), (1360394094,), (1360394097,), (1360394099,), (1360394218,), (1360394245,), (1360394250,), (1360394335,), (1360394338,), (1360394350,), (1360394352,), (1360394353,), (1360394355,), (1360394357,), (1360394508,), (1360394518,), (1360394543,), (1360394550,), (1360394755,), (1360394757,), (1360394760,), (1360394762,), (1360394854,), (1360394865,), (1360394867,), (1360394869,), (1360394871,), (1360394872,), (1360394882,), (1360394884,), (1360394886,), (1360394888,), (1360394890,), (1360394891,), (1360394901,), (1360394902,), (1360394904,), (1360394969,), (1360394994,), (1360395020,), (1360395044,), (1360395094,), (1360395154,), (1360395691,), (1360395723,), (1360395774,), (1360395799,), (1360395861,), (1360395863,), (1360395865,), (1360396116,), (1360396139,), (1360396146,), (1360396148,), (1360396155,), (1360396201,), (1360396372,), (1360396404,), (1360396407,), (1360396411,), (1360396563,), (1360396504,), (1360396529,), (1360396965,), (1360397034,), (1360397067,), (1360397099,), (1360397116,), (1360397241,), (1360397244,), (1360397247,), (1360397249,), (1360397251,), (1360397253,), (1360397270,), (1360397272,), (1360397275,), (1360397289,), (1360397297,), (1360397300,), (1360397328,), (1360397357,), (1360397382,), (1360397701,), (1360397730,), (1360397733,), (1360397744,), (1360397774,), (1360397786,), (1360397813,), (1360397850,), (1360397875,), (1360397904,), (1360397935,), (1360398132,), (1360398173,), (1360398206,), (1360398223,), (1360398397,), (1360398399,), (1360398402,), (1360398405,), (1360398407,), (1360398409,), (1360398425,), (1360398428,), (1360398431,), (1360398434,), (1360398588,), (1360398606,), (1360398849,), (1360398864,), (1360398869,), (1360398871,), (1360398874,), (1360398875,), (1360398926,), (1360398961,), (1360399020,), (1360399754,), (1360399560,), (1360399616,), (1360399680,), (1360399726,), (1360400195,), (1360400209,), (1360400210,), (1360400239,), (1360400314,), (1360400511,), (1360400559,), (1360400605,), (1360400916,), (1360400950,), (1360400974,), (1360401000,), (1360401036,), (1360401059,), (1360401080,), (1360401082,), (1360401085,), (1360401087,), (1360401089,), (1360401090,), (1360401209,), (1360401794,), (1360402025,), (1360402050,), (1360402055,), (1360402058,), (1360402083,), (1360402106,), (1360402122,), (1360402128,), (1360402131,), (1360402134,), (1360402135,), (1360402136,), (1360402151,), (1360402158,), (1360402278,), (1360403178,), (1360403033,), (1360403058,), (1360403122,), (1360403600,), (1360403679,), (1360403781,), (1360403806,), (1360403941,), (1360403947,), (1360403970,), (1360403976,), (1360404000,), (1360404478,), (1360404526,), (1360404581,), (1360404633,), (1360404687,), (1360404735,), (1360405141,), (1360405143,), (1360405154,), (1360405459,), (1360405461,), (1360405463,), (1360405465,), (1360405467,), (1360405472,), (1360405636,), (1360405655,), (1360405681,), (1360405713,), (1360405736,), (1360405760,), (1360406249,), (1360406294,), (1360406319,), (1360406663,), (1360406667,), (1360406670,), (1360406686,), (1360407048,), (1360407060,), (1360407123,), (1360407125,), (1360407127,), (1360407199,), (1360407233,), (1360407306,), (1360407318,), (1360407344,), (1360407471,), (1360407474,), (1360407476,), (1360407478,), (1360407479,), (1360407480,), (1360407620,), (1360407653,), (1360407685,), (1360408160,), (1360408177,), (1360408201,), (1360408224,), (1360408253,), (1360408279,), (1360408537,), (1360408554,), (1360408572,), (1360408579,), (1360408678,), (1360408690,), (1360408715,), (1360408707,), (1360408709,), (1360408712,), (1360408736,), (1360408740,), (1360408742,), (1360408744,), (1360408746,), (1360408757,), (1360408910,), (1360408928,), (1360408942,), (1360408948,), (1360408979,), (1360408994,), (1360409016,), (1360409019,), (1360409021,), (1360409046,), (1360409048,), (1360409050,), (1360409070,), (1360409587,), (1360409846,), (1360409900,), (1360410094,), (1360410119,), (1360410145,), (1360410903,), (1360410978,), (1360411032,), (1360411084,), (1360411140,), (1360411422,), (1360411426,), (1360411450,), (1360411480,), (1360411509,), (1360411938,), (1360411942,), (1360411944,), (1360411946,), (1360411949,), (1360412173,), (1360412175,), (1360412177,), (1360412179,), (1360412200,), (1360412368,), (1360412396,), (1360412424,), (1360412448,), (1360412804,), (1360412807,), (1360412821,), (1360412846,), (1360413101,), (1360413097,), (1360413098,), (1360413099,), (1360413100,), (1360413109,), (1360413516,), (1360413603,), (1360413690,), (1360414174,), (1360414187,), (1360414189,), (1360414215,), (1360414237,), (1360414477,), (1360414478,), (1360414480,), (1360414483,), (1360414710,), (1360414724,), (1360414739,), (1360414756,), (1360414759,), (1360414761,), (1360414763,), (1360414765,), (1360414769,), (1360414973,), (1360414992,), (1360414997,), (1360415319,), (1360415347,), (1360415378,), (1360415406,), (1360415432,), (1360415456,), (1360415723,), (1360415748,), (1360415772,), (1360415797,), (1360416108,), (1360416142,), (1360416190,), (1360416217,), (1360416233,), (1360416234,), (1360416246,), (1360416248,), (1360416249,), (1360416250,), (1360416251,), (1360416252,), (1360416377,), (1360416388,), (1360416398,), (1360416413,), (1360417044,), (1360417092,), (1360417152,), (1360417198,), (1360417276,), (1360417327,), (1360418450,), (1360418547,), (1360418930,), (1360419006,), (1360419064,), (1360419116,), (1360419591,), (1360419445,), (1360419472,), (1360419505,), (1360419553,), (1360419835,), (1360419836,), (1360419849,), (1360419880,), (1360420477,), (1360420516,), (1360420542,), (1360420571,), (1360420597,), (1360420908,), (1360420912,), (1360420946,), (1360420947,), (1360420949,), (1360420952,), (1360420976,), (1360420979,), (1360420983,), (1360421159,), (1360421163,), (1360421168,), (1360421173,), (1360421227,), (1360421294,), (1360421297,), (1360421299,), (1360421302,), (1360421307,), (1360421310,), (1360421644,), (1360421672,), (1360421701,), (1360421729,), (1360421768,), (1360422093,), (1360422100,), (1360422103,), (1360422122,), (1360422149,), (1360422397,), (1360422400,), (1360422404,), (1360422407,), (1360422414,), (1360422585,), (1360422590,), (1360422594,), (1360422620,), (1360422936,), (1360422938,), (1360422942,), (1360422945,), (1360422947,), (1360422950,), (1360423051,), (1360423066,), (1360423070,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'22052025': {'nb_upload': 61, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([23251214]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1360423070, 1360423066, 1360423051, 1360422950, 1360422947, 1360422945, 1360422942, 1360422938, 1360422936] map_info['map_portfolio_photo'] : {23251214: [1360423070, 1360423066, 1360423051, 1360422950, 1360422947, 1360422945, 1360422942, 1360422938, 1360422936, 1360422620, 1360422594, 1360422590, 1360422585, 1360422414, 1360422407, 1360422404, 1360422400, 1360422397, 1360422149, 1360422122, 1360422103, 1360422100, 1360422093, 1360421768, 1360421729, 1360421701, 1360421672, 1360421644, 1360421310, 1360421307, 1360421302, 1360421299, 1360421297, 1360421294, 1360421227, 1360421173, 1360421168, 1360421163, 1360421159, 1360420983, 1360420979, 1360420976, 1360420952, 1360420949, 1360420947, 1360420946, 1360420912, 1360420908, 1360420597, 1360420571, 1360420542, 1360420516, 1360420477, 1360419880, 1360419849, 1360419836, 1360419835, 1360419553, 1360419505, 1360419472, 1360419445]} final : True mtd_id 4302 list_pids : [1360423070, 1360423066, 1360423051, 1360422950, 1360422947, 1360422945, 1360422942, 1360422938, 1360422936] Looping around the photos to save general results len do output : 1 /23251214Didn'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, '2931868') ('4302', '23251214', '1360423070', None, None, None, None, None, '2931868') ('4302', None, None, None, None, None, None, None, '2931868') ('4302', '23251214', '1360423066', None, None, None, None, None, '2931868') ('4302', None, None, None, None, None, None, None, '2931868') ('4302', '23251214', '1360423051', None, None, None, None, None, '2931868') ('4302', None, None, None, None, None, None, None, '2931868') ('4302', '23251214', '1360422950', None, None, None, None, None, '2931868') ('4302', None, None, None, None, None, None, None, '2931868') ('4302', '23251214', '1360422947', None, None, None, None, None, '2931868') ('4302', None, None, None, None, None, None, None, '2931868') ('4302', '23251214', '1360422945', None, None, None, None, None, '2931868') ('4302', None, None, None, None, None, None, None, '2931868') ('4302', '23251214', '1360422942', None, None, None, None, None, '2931868') ('4302', None, None, None, None, None, None, None, '2931868') ('4302', '23251214', '1360422938', None, None, None, None, None, '2931868') ('4302', None, None, None, None, None, None, None, '2931868') ('4302', '23251214', '1360422936', None, None, None, None, None, '2931868') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 10 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, '23251214', 'None', None, None, None, None, '2931868'), ('4302', '23251214', '1360423070', None, None, None, None, None, '2931868'), ('4302', '23251214', '1360423066', None, None, None, None, None, '2931868'), ('4302', '23251214', '1360423051', None, None, None, None, None, '2931868'), ('4302', '23251214', '1360422950', None, None, None, None, None, '2931868'), ('4302', '23251214', '1360422947', None, None, None, None, None, '2931868'), ('4302', '23251214', '1360422945', None, None, None, None, None, '2931868'), ('4302', '23251214', '1360422942', None, None, None, None, None, '2931868'), ('4302', '23251214', '1360422938', None, None, None, None, None, '2931868'), ('4302', '23251214', '1360422936', None, None, None, None, None, '2931868')] time used for this insertion : 0.04728388786315918 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.6362214088439941 time spend to save output : 0.04752659797668457 total time spend for step 5 : 0.6837480068206787 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 (2931868) 2.04user 2.37system 0:05.39elapsed 81%CPU (0avgtext+0avgdata 160752maxresident)k 48inputs+7000outputs (0major+64418minor)pagefaults 0swaps