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 : 889890 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 (2605952) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (2605952) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20734877 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['2605952'] with mtr_portfolio_ids : ['20734877'] and first list_photo_ids : [] new path : /proc/889890/ Name: python3 Umask: 0002 State: R (running) Tgid: 889890 Ngid: 0 Pid: 889890 PPid: 889889 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 889890 NSpid: 889890 NSpgid: 886853 NSsid: 886853 VmPeak: 1106848 kB VmSize: 1106848 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 98148 kB VmRSS: 98148 kB RssAnon: 59756 kB RssFile: 38392 kB RssShmem: 0 kB VmData: 865596 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 588 kB VmSwap: 0 kB HugetlbPages: 0 kB CoreDumping: 0 THP_enabled: 1 Threads: 1 SigQ: 3/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: 53 nonvoluntary_ctxt_switches: 29 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '889890', 'Ngid': '0', 'Pid': '889890', 'PPid': '889889', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '889890', 'NSpid': '889890', 'NSpgid': '886853', 'NSsid': '886853', 'VmPeak': '1106848 kB', 'VmSize': '1106848 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '98148 kB', 'VmRSS': '98148 kB', 'RssAnon': '59756 kB', 'RssFile': '38392 kB', 'RssShmem': '0 kB', 'VmData': '865596 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '588 kB', 'VmSwap': '0 kB', 'HugetlbPages': '0 kB', 'CoreDumping': '0', 'THP_enabled': '1', 'Threads': '1', 'SigQ': '3/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': '53', 'nonvoluntary_ctxt_switches': '29'} ('datou_batch_current', '889890', '1106848', '0', '1106848', '865596', '98148', b'', 'marlene', '2605952') 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 (20734877) 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 (2605952 ) ) 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 (20734877) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1338926299, 'portfolio_id': 20734877}, {'photo_id': 1338926243, 'portfolio_id': 20734877}, {'photo_id': 1338926236, 'portfolio_id': 20734877}, {'photo_id': 1338926233, 'portfolio_id': 20734877}, {'photo_id': 1338926123, 'portfolio_id': 20734877}, {'photo_id': 1338926119, 'portfolio_id': 20734877}, {'photo_id': 1338925860, 'portfolio_id': 20734877}, {'photo_id': 1338925770, 'portfolio_id': 20734877}, {'photo_id': 1338925616, 'portfolio_id': 20734877}, {'photo_id': 1338925610, 'portfolio_id': 20734877}, {'photo_id': 1338925497, 'portfolio_id': 20734877}, {'photo_id': 1338925495, 'portfolio_id': 20734877}, {'photo_id': 1338925486, 'portfolio_id': 20734877}, {'photo_id': 1338925424, 'portfolio_id': 20734877}, {'photo_id': 1338925309, 'portfolio_id': 20734877}, {'photo_id': 1338924373, 'portfolio_id': 20734877}, {'photo_id': 1338924369, 'portfolio_id': 20734877}, {'photo_id': 1338924361, 'portfolio_id': 20734877}, {'photo_id': 1338924335, 'portfolio_id': 20734877}, {'photo_id': 1338924210, 'portfolio_id': 20734877}, {'photo_id': 1338923912, 'portfolio_id': 20734877}, {'photo_id': 1338923657, 'portfolio_id': 20734877}, {'photo_id': 1338923365, 'portfolio_id': 20734877}, {'photo_id': 1338923095, 'portfolio_id': 20734877}, {'photo_id': 1338923059, 'portfolio_id': 20734877}, {'photo_id': 1338923055, 'portfolio_id': 20734877}, {'photo_id': 1338923051, 'portfolio_id': 20734877}, {'photo_id': 1338923030, 'portfolio_id': 20734877}, {'photo_id': 1338923028, 'portfolio_id': 20734877}, {'photo_id': 1338923025, 'portfolio_id': 20734877}, {'photo_id': 1338923018, 'portfolio_id': 20734877}, {'photo_id': 1338922991, 'portfolio_id': 20734877}, {'photo_id': 1338922988, 'portfolio_id': 20734877}, {'photo_id': 1338922911, 'portfolio_id': 20734877}, {'photo_id': 1338922906, 'portfolio_id': 20734877}, {'photo_id': 1338922895, 'portfolio_id': 20734877}, {'photo_id': 1338922888, 'portfolio_id': 20734877}, {'photo_id': 1338922852, 'portfolio_id': 20734877}, {'photo_id': 1338922846, 'portfolio_id': 20734877}, {'photo_id': 1338922842, 'portfolio_id': 20734877}, {'photo_id': 1338922830, 'portfolio_id': 20734877}, {'photo_id': 1338922828, 'portfolio_id': 20734877}] map_portfolio_id_photo_id: {20734877: [1338926299, 1338926243, 1338926236, 1338926233, 1338926123, 1338926119, 1338925860, 1338925770, 1338925616, 1338925610, 1338925497, 1338925495, 1338925486, 1338925424, 1338925309, 1338924373, 1338924369, 1338924361, 1338924335, 1338924210, 1338923912, 1338923657, 1338923365, 1338923095, 1338923059, 1338923055, 1338923051, 1338923030, 1338923028, 1338923025, 1338923018, 1338922991, 1338922988, 1338922911, 1338922906, 1338922895, 1338922888, 1338922852, 1338922846, 1338922842, 1338922830, 1338922828]} ##### 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.01593756675720215 #### 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 Fri Feb 21 22:42:58 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 (20734877) 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 : 20734877 get user id for portfolio 20734877 get sub ptf for main ptf 20734877, type 3726 and hashtags ['kraft', 'plastique', 'papier', 'environnement', 'Carton_brun', 'flou', 'autre_refus', 'Carton_gris', 'metal', 'cartonnette', 'mal_croppe', 'Teint_Dans_La_Masse'] 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`=20734877 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('kraft','plastique','papier','environnement','Carton_brun','flou','autre_refus','Carton_gris','metal','cartonnette','mal_croppe','Teint_Dans_La_Masse')) 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`=20734877 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('kraft','plastique','papier','environnement','Carton_brun','flou','autre_refus','Carton_gris','metal','cartonnette','mal_croppe','Teint_Dans_La_Masse')) AND mptpi.`min_score`=0.5 To do returned map {'papier': {'main_port_id': 20734877, 'sub_port_id': 20734886, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13379119, 'last_updated_at': datetime.datetime(2025, 2, 21, 22, 41, 1), 'last_updated_at_desc': datetime.datetime(2025, 2, 21, 22, 41, 1), 'last_updated_at_asc': datetime.datetime(2025, 2, 21, 22, 34, 57)}, 'Teint_Dans_La_Masse': {'main_port_id': 20734877, 'sub_port_id': 20734887, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13379120, 'last_updated_at': datetime.datetime(2025, 2, 21, 22, 41, 1), 'last_updated_at_desc': datetime.datetime(2025, 2, 21, 22, 41, 1), 'last_updated_at_asc': datetime.datetime(2025, 2, 21, 22, 34, 57)}, 'autre_refus': {'main_port_id': 20734877, 'sub_port_id': 20734888, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13379121, 'last_updated_at': datetime.datetime(2025, 2, 21, 22, 41, 1), 'last_updated_at_desc': datetime.datetime(2025, 2, 21, 22, 41, 1), 'last_updated_at_asc': datetime.datetime(2025, 2, 21, 22, 34, 57)}, 'Carton_gris': {'main_port_id': 20734877, 'sub_port_id': 20734889, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13379122, 'last_updated_at': datetime.datetime(2025, 2, 21, 22, 41, 1), 'last_updated_at_desc': datetime.datetime(2025, 2, 21, 22, 41, 1), 'last_updated_at_asc': datetime.datetime(2025, 2, 21, 22, 34, 57)}, 'environnement': {'main_port_id': 20734877, 'sub_port_id': 20734890, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13379123, 'last_updated_at': datetime.datetime(2025, 2, 21, 22, 41, 1), 'last_updated_at_desc': datetime.datetime(2025, 2, 21, 22, 41, 1), 'last_updated_at_asc': datetime.datetime(2025, 2, 21, 22, 34, 57)}, 'metal': {'main_port_id': 20734877, 'sub_port_id': 20734891, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13379124, 'last_updated_at': datetime.datetime(2025, 2, 21, 22, 41, 1), 'last_updated_at_desc': datetime.datetime(2025, 2, 21, 22, 41, 1), 'last_updated_at_asc': datetime.datetime(2025, 2, 21, 22, 34, 57)}, 'plastique': {'main_port_id': 20734877, 'sub_port_id': 20734892, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13379125, 'last_updated_at': datetime.datetime(2025, 2, 21, 22, 41, 1), 'last_updated_at_desc': datetime.datetime(2025, 2, 21, 22, 41, 1), 'last_updated_at_asc': datetime.datetime(2025, 2, 21, 22, 34, 57)}, 'cartonnette': {'main_port_id': 20734877, 'sub_port_id': 20734893, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13379126, 'last_updated_at': datetime.datetime(2025, 2, 21, 22, 41, 1), 'last_updated_at_desc': datetime.datetime(2025, 2, 21, 22, 41, 1), 'last_updated_at_asc': datetime.datetime(2025, 2, 21, 22, 34, 57)}, 'Carton_brun': {'main_port_id': 20734877, 'sub_port_id': 20734894, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13379127, 'last_updated_at': datetime.datetime(2025, 2, 21, 22, 41, 1), 'last_updated_at_desc': datetime.datetime(2025, 2, 21, 22, 41, 1), 'last_updated_at_asc': datetime.datetime(2025, 2, 21, 22, 34, 57)}, 'mal_croppe': {'main_port_id': 20734877, 'sub_port_id': 20734895, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13379128, 'last_updated_at': datetime.datetime(2025, 2, 21, 22, 41, 1), 'last_updated_at_desc': datetime.datetime(2025, 2, 21, 22, 41, 1), 'last_updated_at_asc': datetime.datetime(2025, 2, 21, 22, 34, 57)}, 'flou': {'main_port_id': 20734877, 'sub_port_id': 20734896, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13379129, 'last_updated_at': datetime.datetime(2025, 2, 21, 22, 41, 1), 'last_updated_at_desc': datetime.datetime(2025, 2, 21, 22, 41, 1), 'last_updated_at_asc': datetime.datetime(2025, 2, 21, 22, 34, 57)}, 'kraft': {'main_port_id': 20734877, 'sub_port_id': 20734897, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13379130, 'last_updated_at': datetime.datetime(2025, 2, 21, 22, 41, 1), 'last_updated_at_desc': datetime.datetime(2025, 2, 21, 22, 41, 1), 'last_updated_at_asc': datetime.datetime(2025, 2, 21, 22, 34, 57)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 20734886 , 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=20734877 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 (20734886) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20734877) result : ((1338922828,), (1338922830,), (1338922842,), (1338922846,), (1338922852,), (1338922888,), (1338922895,), (1338922906,), (1338922911,), (1338922988,), (1338922991,), (1338923018,), (1338923025,), (1338923028,), (1338923030,), (1338923051,), (1338923055,), (1338923059,), (1338923095,), (1338923365,), (1338923657,), (1338923912,), (1338924210,), (1338924335,), (1338924361,), (1338924369,), (1338924373,), (1338925309,), (1338925424,), (1338925486,), (1338925495,), (1338925497,), (1338925610,), (1338925616,), (1338925770,), (1338925860,), (1338926119,), (1338926123,), (1338926233,), (1338926236,), (1338926243,), (1338926299,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 20734887 , 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=20734877 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 (20734887) result : ((1338925927,), (1338926186,), (1338926187,), (1338926188,), (1338926189,), (1338926190,), (1338926191,), (1338926203,), (1338926204,), (1338926205,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20734877) result : ((1338922828,), (1338922830,), (1338922842,), (1338922846,), (1338922852,), (1338922888,), (1338922895,), (1338922906,), (1338922911,), (1338922988,), (1338922991,), (1338923018,), (1338923025,), (1338923028,), (1338923030,), (1338923051,), (1338923055,), (1338923059,), (1338923095,), (1338923365,), (1338923657,), (1338923912,), (1338924210,), (1338924335,), (1338924361,), (1338924369,), (1338924373,), (1338925309,), (1338925424,), (1338925486,), (1338925495,), (1338925497,), (1338925610,), (1338925616,), (1338925770,), (1338925860,), (1338926119,), (1338926123,), (1338926233,), (1338926236,), (1338926243,), (1338926299,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 20734888 , 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=20734877 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 (20734888) result : ((1338924362,), (1338926208,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20734877) result : ((1338922828,), (1338922830,), (1338922842,), (1338922846,), (1338922852,), (1338922888,), (1338922895,), (1338922906,), (1338922911,), (1338922988,), (1338922991,), (1338923018,), (1338923025,), (1338923028,), (1338923030,), (1338923051,), (1338923055,), (1338923059,), (1338923095,), (1338923365,), (1338923657,), (1338923912,), (1338924210,), (1338924335,), (1338924361,), (1338924369,), (1338924373,), (1338925309,), (1338925424,), (1338925486,), (1338925495,), (1338925497,), (1338925610,), (1338925616,), (1338925770,), (1338925860,), (1338926119,), (1338926123,), (1338926233,), (1338926236,), (1338926243,), (1338926299,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 20734889 , 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=20734877 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 (20734889) result : ((1338924363,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20734877) result : ((1338922828,), (1338922830,), (1338922842,), (1338922846,), (1338922852,), (1338922888,), (1338922895,), (1338922906,), (1338922911,), (1338922988,), (1338922991,), (1338923018,), (1338923025,), (1338923028,), (1338923030,), (1338923051,), (1338923055,), (1338923059,), (1338923095,), (1338923365,), (1338923657,), (1338923912,), (1338924210,), (1338924335,), (1338924361,), (1338924369,), (1338924373,), (1338925309,), (1338925424,), (1338925486,), (1338925495,), (1338925497,), (1338925610,), (1338925616,), (1338925770,), (1338925860,), (1338926119,), (1338926123,), (1338926233,), (1338926236,), (1338926243,), (1338926299,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 20734890 , 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=20734877 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 (20734890) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20734877) result : ((1338922828,), (1338922830,), (1338922842,), (1338922846,), (1338922852,), (1338922888,), (1338922895,), (1338922906,), (1338922911,), (1338922988,), (1338922991,), (1338923018,), (1338923025,), (1338923028,), (1338923030,), (1338923051,), (1338923055,), (1338923059,), (1338923095,), (1338923365,), (1338923657,), (1338923912,), (1338924210,), (1338924335,), (1338924361,), (1338924369,), (1338924373,), (1338925309,), (1338925424,), (1338925486,), (1338925495,), (1338925497,), (1338925610,), (1338925616,), (1338925770,), (1338925860,), (1338926119,), (1338926123,), (1338926233,), (1338926236,), (1338926243,), (1338926299,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 20734891 , 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=20734877 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 (20734891) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20734877) result : ((1338922828,), (1338922830,), (1338922842,), (1338922846,), (1338922852,), (1338922888,), (1338922895,), (1338922906,), (1338922911,), (1338922988,), (1338922991,), (1338923018,), (1338923025,), (1338923028,), (1338923030,), (1338923051,), (1338923055,), (1338923059,), (1338923095,), (1338923365,), (1338923657,), (1338923912,), (1338924210,), (1338924335,), (1338924361,), (1338924369,), (1338924373,), (1338925309,), (1338925424,), (1338925486,), (1338925495,), (1338925497,), (1338925610,), (1338925616,), (1338925770,), (1338925860,), (1338926119,), (1338926123,), (1338926233,), (1338926236,), (1338926243,), (1338926299,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 20734892 , 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=20734877 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 (20734892) result : ((1338926200,), (1338926217,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20734877) result : ((1338922828,), (1338922830,), (1338922842,), (1338922846,), (1338922852,), (1338922888,), (1338922895,), (1338922906,), (1338922911,), (1338922988,), (1338922991,), (1338923018,), (1338923025,), (1338923028,), (1338923030,), (1338923051,), (1338923055,), (1338923059,), (1338923095,), (1338923365,), (1338923657,), (1338923912,), (1338924210,), (1338924335,), (1338924361,), (1338924369,), (1338924373,), (1338925309,), (1338925424,), (1338925486,), (1338925495,), (1338925497,), (1338925610,), (1338925616,), (1338925770,), (1338925860,), (1338926119,), (1338926123,), (1338926233,), (1338926236,), (1338926243,), (1338926299,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 20734893 , 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=20734877 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 (20734893) result : ((1338924365,), (1338925928,), (1338926195,), (1338926196,), (1338926197,), (1338926198,), (1338926199,), (1338926210,), (1338926211,), (1338926212,), (1338926213,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20734877) result : ((1338922828,), (1338922830,), (1338922842,), (1338922846,), (1338922852,), (1338922888,), (1338922895,), (1338922906,), (1338922911,), (1338922988,), (1338922991,), (1338923018,), (1338923025,), (1338923028,), (1338923030,), (1338923051,), (1338923055,), (1338923059,), (1338923095,), (1338923365,), (1338923657,), (1338923912,), (1338924210,), (1338924335,), (1338924361,), (1338924369,), (1338924373,), (1338925309,), (1338925424,), (1338925486,), (1338925495,), (1338925497,), (1338925610,), (1338925616,), (1338925770,), (1338925860,), (1338926119,), (1338926123,), (1338926233,), (1338926236,), (1338926243,), (1338926299,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 20734894 , 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=20734877 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 (20734894) result : ((1338924367,), (1338925929,), (1338925930,), (1338926215,), (1338926216,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20734877) result : ((1338922828,), (1338922830,), (1338922842,), (1338922846,), (1338922852,), (1338922888,), (1338922895,), (1338922906,), (1338922911,), (1338922988,), (1338922991,), (1338923018,), (1338923025,), (1338923028,), (1338923030,), (1338923051,), (1338923055,), (1338923059,), (1338923095,), (1338923365,), (1338923657,), (1338923912,), (1338924210,), (1338924335,), (1338924361,), (1338924369,), (1338924373,), (1338925309,), (1338925424,), (1338925486,), (1338925495,), (1338925497,), (1338925610,), (1338925616,), (1338925770,), (1338925860,), (1338926119,), (1338926123,), (1338926233,), (1338926236,), (1338926243,), (1338926299,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 20734895 , 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=20734877 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 (20734895) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20734877) result : ((1338922828,), (1338922830,), (1338922842,), (1338922846,), (1338922852,), (1338922888,), (1338922895,), (1338922906,), (1338922911,), (1338922988,), (1338922991,), (1338923018,), (1338923025,), (1338923028,), (1338923030,), (1338923051,), (1338923055,), (1338923059,), (1338923095,), (1338923365,), (1338923657,), (1338923912,), (1338924210,), (1338924335,), (1338924361,), (1338924369,), (1338924373,), (1338925309,), (1338925424,), (1338925486,), (1338925495,), (1338925497,), (1338925610,), (1338925616,), (1338925770,), (1338925860,), (1338926119,), (1338926123,), (1338926233,), (1338926236,), (1338926243,), (1338926299,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 20734896 , 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=20734877 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 (20734896) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20734877) result : ((1338922828,), (1338922830,), (1338922842,), (1338922846,), (1338922852,), (1338922888,), (1338922895,), (1338922906,), (1338922911,), (1338922988,), (1338922991,), (1338923018,), (1338923025,), (1338923028,), (1338923030,), (1338923051,), (1338923055,), (1338923059,), (1338923095,), (1338923365,), (1338923657,), (1338923912,), (1338924210,), (1338924335,), (1338924361,), (1338924369,), (1338924373,), (1338925309,), (1338925424,), (1338925486,), (1338925495,), (1338925497,), (1338925610,), (1338925616,), (1338925770,), (1338925860,), (1338926119,), (1338926123,), (1338926233,), (1338926236,), (1338926243,), (1338926299,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 20734897 , 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=20734877 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 (20734897) result : ((1338926219,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20734877) result : ((1338922828,), (1338922830,), (1338922842,), (1338922846,), (1338922852,), (1338922888,), (1338922895,), (1338922906,), (1338922911,), (1338922988,), (1338922991,), (1338923018,), (1338923025,), (1338923028,), (1338923030,), (1338923051,), (1338923055,), (1338923059,), (1338923095,), (1338923365,), (1338923657,), (1338923912,), (1338924210,), (1338924335,), (1338924361,), (1338924369,), (1338924373,), (1338925309,), (1338925424,), (1338925486,), (1338925495,), (1338925497,), (1338925610,), (1338925616,), (1338925770,), (1338925860,), (1338926119,), (1338926123,), (1338926233,), (1338926236,), (1338926243,), (1338926299,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") To do ! Use context local managing function ! SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=20734877 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('kraft','plastique','papier','environnement','Carton_brun','flou','autre_refus','Carton_gris','metal','cartonnette','mal_croppe','Teint_Dans_La_Masse')) 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`=20734877 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('kraft','plastique','papier','environnement','Carton_brun','flou','autre_refus','Carton_gris','metal','cartonnette','mal_croppe','Teint_Dans_La_Masse')) AND mptpi.`min_score`=0.5 To do returned map {'papier': {'main_port_id': 20734877, 'sub_port_id': 20734899, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13379131, 'last_updated_at': datetime.datetime(2025, 2, 21, 22, 35, 1), 'last_updated_at_desc': datetime.datetime(2025, 2, 21, 22, 35, 1), 'last_updated_at_asc': datetime.datetime(2025, 2, 21, 22, 35, 1)}, 'Teint_Dans_La_Masse': {'main_port_id': 20734877, 'sub_port_id': 20734900, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13379132, 'last_updated_at': datetime.datetime(2025, 2, 21, 22, 35, 1), 'last_updated_at_desc': datetime.datetime(2025, 2, 21, 22, 35, 1), 'last_updated_at_asc': datetime.datetime(2025, 2, 21, 22, 35, 1)}, 'autre_refus': {'main_port_id': 20734877, 'sub_port_id': 20734901, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13379133, 'last_updated_at': datetime.datetime(2025, 2, 21, 22, 35, 1), 'last_updated_at_desc': datetime.datetime(2025, 2, 21, 22, 35, 1), 'last_updated_at_asc': datetime.datetime(2025, 2, 21, 22, 35, 1)}, 'Carton_gris': {'main_port_id': 20734877, 'sub_port_id': 20734902, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13379134, 'last_updated_at': datetime.datetime(2025, 2, 21, 22, 35, 1), 'last_updated_at_desc': datetime.datetime(2025, 2, 21, 22, 35, 1), 'last_updated_at_asc': datetime.datetime(2025, 2, 21, 22, 35, 1)}, 'environnement': {'main_port_id': 20734877, 'sub_port_id': 20734903, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13379135, 'last_updated_at': datetime.datetime(2025, 2, 21, 22, 35, 1), 'last_updated_at_desc': datetime.datetime(2025, 2, 21, 22, 35, 1), 'last_updated_at_asc': datetime.datetime(2025, 2, 21, 22, 35, 1)}, 'metal': {'main_port_id': 20734877, 'sub_port_id': 20734904, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13379136, 'last_updated_at': datetime.datetime(2025, 2, 21, 22, 35, 1), 'last_updated_at_desc': datetime.datetime(2025, 2, 21, 22, 35, 1), 'last_updated_at_asc': datetime.datetime(2025, 2, 21, 22, 35, 1)}, 'plastique': {'main_port_id': 20734877, 'sub_port_id': 20734905, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13379137, 'last_updated_at': datetime.datetime(2025, 2, 21, 22, 35, 1), 'last_updated_at_desc': datetime.datetime(2025, 2, 21, 22, 35, 1), 'last_updated_at_asc': datetime.datetime(2025, 2, 21, 22, 35, 1)}, 'cartonnette': {'main_port_id': 20734877, 'sub_port_id': 20734906, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13379138, 'last_updated_at': datetime.datetime(2025, 2, 21, 22, 35, 1), 'last_updated_at_desc': datetime.datetime(2025, 2, 21, 22, 35, 1), 'last_updated_at_asc': datetime.datetime(2025, 2, 21, 22, 35, 1)}, 'Carton_brun': {'main_port_id': 20734877, 'sub_port_id': 20734907, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13379139, 'last_updated_at': datetime.datetime(2025, 2, 21, 22, 35, 1), 'last_updated_at_desc': datetime.datetime(2025, 2, 21, 22, 35, 1), 'last_updated_at_asc': datetime.datetime(2025, 2, 21, 22, 35, 1)}, 'mal_croppe': {'main_port_id': 20734877, 'sub_port_id': 20734908, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13379140, 'last_updated_at': datetime.datetime(2025, 2, 21, 22, 35, 1), 'last_updated_at_desc': datetime.datetime(2025, 2, 21, 22, 35, 1), 'last_updated_at_asc': datetime.datetime(2025, 2, 21, 22, 35, 1)}, 'flou': {'main_port_id': 20734877, 'sub_port_id': 20734909, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13379141, 'last_updated_at': datetime.datetime(2025, 2, 21, 22, 35, 1), 'last_updated_at_desc': datetime.datetime(2025, 2, 21, 22, 35, 1), 'last_updated_at_asc': datetime.datetime(2025, 2, 21, 22, 35, 1)}, 'kraft': {'main_port_id': 20734877, 'sub_port_id': 20734910, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13379142, 'last_updated_at': datetime.datetime(2025, 2, 21, 22, 41, 2), 'last_updated_at_desc': datetime.datetime(2025, 2, 21, 22, 41, 2), 'last_updated_at_asc': datetime.datetime(2025, 2, 21, 22, 35, 1)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20734899,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20734886 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20734900,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20734887 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20734901,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20734888 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20734902,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20734889 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20734903,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20734890 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20734904,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20734891 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20734905,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20734892 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20734906,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20734893 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20734907,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20734894 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20734908,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20734895 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20734909,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20734896 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20734910,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20734897 lien utilise dans velours : https://www.fotonower.com/velours/20734899,20734900,20734901,20734902,20734903,20734904,20734905,20734906,20734907,20734908,20734909,20734910?tags=papier,Teint_Dans_La_Masse,autre_refus,Carton_gris,environnement,metal,plastique,cartonnette,Carton_brun,mal_croppe,flou,kraft After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([20734877]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1338926299, 1338926243, 1338926236, 1338926233] map_info['map_portfolio_photo'] : {20734877: [1338926299, 1338926243, 1338926236, 1338926233, 1338926123, 1338926119, 1338925860, 1338925770, 1338925616, 1338925610, 1338925497, 1338925495, 1338925486, 1338925424, 1338925309, 1338924373, 1338924369, 1338924361, 1338924335, 1338924210, 1338923912, 1338923657, 1338923365, 1338923095, 1338923059, 1338923055, 1338923051, 1338923030, 1338923028, 1338923025, 1338923018, 1338922991, 1338922988, 1338922911, 1338922906, 1338922895, 1338922888, 1338922852, 1338922846, 1338922842, 1338922830, 1338922828]} final : False mtd_id 4302 list_pids : [1338926299, 1338926243, 1338926236, 1338926233] Looping around the photos to save general results len do output : 1 /20734877. 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, '2605952') ('4302', '20734877', '1338926299', None, None, None, None, None, '2605952') ('4302', None, None, None, None, None, None, None, '2605952') ('4302', '20734877', '1338926243', None, None, None, None, None, '2605952') ('4302', None, None, None, None, None, None, None, '2605952') ('4302', '20734877', '1338926236', None, None, None, None, None, '2605952') ('4302', None, None, None, None, None, None, None, '2605952') ('4302', '20734877', '1338926233', None, None, None, None, None, '2605952') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 5 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, '20734877', "{'papier': 20734886, 'Teint_Dans_La_Masse': 20734887, 'autre_refus': 20734888, 'Carton_gris': 20734889, 'environnement': 20734890, 'metal': 20734891, 'plastique': 20734892, 'cartonnette': 20734893, 'Carton_brun': 20734894, 'mal_croppe': 20734895, 'flou': 20734896, 'kraft': 20734897}", None, None, None, None, '2605952'), ('4302', '20734877', '1338926299', None, None, None, None, None, '2605952'), ('4302', '20734877', '1338926243', None, None, None, None, None, '2605952'), ('4302', '20734877', '1338926236', None, None, None, None, None, '2605952'), ('4302', '20734877', '1338926233', None, None, None, None, None, '2605952')] time used for this insertion : 0.013394355773925781 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.3485887050628662 time spend to save output : 0.013588905334472656 total time spend for step 1 : 1.3621776103973389 step2:final Fri Feb 21 22:43:00 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 (20734877) 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 20734877 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1338922852,1338922846,1338922842,1338922830,1338922828,1338922991,1338922988,1338922911,1338922906,1338922895,1338922888,1338923030,1338923018,1338923028,1338923025,1338923059,1338923055,1338923051,1338924335,1338924210,1338923912,1338923657,1338923365,1338923095,1338924373,1338924369,1338924361,1338925497,1338925495,1338925486,1338925424,1338925309,1338925860,1338925770,1338925616,1338925610,1338926123,1338926119,1338926243,1338926236,1338926233,1338926299); 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([20734877]) Inside saveOutput : final : False verbose : True original output for save of step final : {1338926299: ('0.034384712783341785',), 1338926243: ('0.034384712783341785',), 1338926236: ('0.034384712783341785',), 1338926233: ('0.034384712783341785',)} new output for save of step final : {1338926299: ('0.034384712783341785',), 1338926243: ('0.034384712783341785',), 1338926236: ('0.034384712783341785',), 1338926233: ('0.034384712783341785',)} [1338926299, 1338926243, 1338926236, 1338926233] map_info['map_portfolio_photo'] : {20734877: [1338926299, 1338926243, 1338926236, 1338926233, 1338926123, 1338926119, 1338925860, 1338925770, 1338925616, 1338925610, 1338925497, 1338925495, 1338925486, 1338925424, 1338925309, 1338924373, 1338924369, 1338924361, 1338924335, 1338924210, 1338923912, 1338923657, 1338923365, 1338923095, 1338923059, 1338923055, 1338923051, 1338923030, 1338923028, 1338923025, 1338923018, 1338922991, 1338922988, 1338922911, 1338922906, 1338922895, 1338922888, 1338922852, 1338922846, 1338922842, 1338922830, 1338922828]} final : False mtd_id 4302 list_pids : [1338926299, 1338926243, 1338926236, 1338926233] Looping around the photos to save general results len do output : 4 /1338926299.Didn't retrieve data . /1338926243.Didn't retrieve data . /1338926236.Didn't retrieve data . /1338926233.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, '2605952') ('4302', '20734877', '1338926299', None, None, None, None, None, '2605952') ('4302', None, None, None, None, None, None, None, '2605952') ('4302', '20734877', '1338926243', None, None, None, None, None, '2605952') ('4302', None, None, None, None, None, None, None, '2605952') ('4302', '20734877', '1338926236', None, None, None, None, None, '2605952') ('4302', None, None, None, None, None, None, None, '2605952') ('4302', '20734877', '1338926233', None, None, None, None, None, '2605952') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 12 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '20734877', '1338926299', '0.034384712783341785', None, None, None, None, '2605952'), ('4302', '20734877', '1338926243', '0.034384712783341785', None, None, None, None, '2605952'), ('4302', '20734877', '1338926236', '0.034384712783341785', None, None, None, None, '2605952'), ('4302', '20734877', '1338926233', '0.034384712783341785', None, None, None, None, '2605952')] time used for this insertion : 0.012456655502319336 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.06223559379577637 time spend to save output : 0.012755870819091797 total time spend for step 2 : 0.07499146461486816 step3:velours_tree Fri Feb 21 22:43:00 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 : {20734877: [{'papier': 20734886, 'Teint_Dans_La_Masse': 20734887, 'autre_refus': 20734888, 'Carton_gris': 20734889, 'environnement': 20734890, 'metal': 20734891, 'plastique': 20734892, 'cartonnette': 20734893, 'Carton_brun': 20734894, 'mal_croppe': 20734895, 'flou': 20734896, 'kraft': 20734897}]} input_args_next_step : {20734877: ()} output_args : {20734877: [{'papier': 20734886, 'Teint_Dans_La_Masse': 20734887, 'autre_refus': 20734888, 'Carton_gris': 20734889, 'environnement': 20734890, 'metal': 20734891, 'plastique': 20734892, 'cartonnette': 20734893, 'Carton_brun': 20734894, 'mal_croppe': 20734895, 'flou': 20734896, 'kraft': 20734897}]} args : 20734877 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 : ({'papier': 20734886, 'Teint_Dans_La_Masse': 20734887, 'autre_refus': 20734888, 'Carton_gris': 20734889, 'environnement': 20734890, 'metal': 20734891, 'plastique': 20734892, 'cartonnette': 20734893, 'Carton_brun': 20734894, 'mal_croppe': 20734895, 'flou': 20734896, 'kraft': 20734897},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (20734877) 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([20734877]) 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.33520054817199707 time spend to save output : 6.175041198730469e-05 total time spend for step 3 : 0.3352622985839844 step4:send_mail_cod Fri Feb 21 22:43:00 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 : {1338926299: ('0.034384712783341785',), 1338926243: ('0.034384712783341785',), 1338926236: ('0.034384712783341785',), 1338926233: ('0.034384712783341785',)} input_args_next_step : {1338926299: ()} output_args : {1338926299: ('0.034384712783341785',), 1338926243: ('0.034384712783341785',), 1338926236: ('0.034384712783341785',), 1338926233: ('0.034384712783341785',)} args : 1338926299 depend.output_id : 0 input_args_next_step : {1338926299: ('0.034384712783341785',), 1338926243: ()} output_args : {1338926299: ('0.034384712783341785',), 1338926243: ('0.034384712783341785',), 1338926236: ('0.034384712783341785',), 1338926233: ('0.034384712783341785',)} args : 1338926243 depend.output_id : 0 input_args_next_step : {1338926299: ('0.034384712783341785',), 1338926243: ('0.034384712783341785',), 1338926236: ()} output_args : {1338926299: ('0.034384712783341785',), 1338926243: ('0.034384712783341785',), 1338926236: ('0.034384712783341785',), 1338926233: ('0.034384712783341785',)} args : 1338926236 depend.output_id : 0 input_args_next_step : {1338926299: ('0.034384712783341785',), 1338926243: ('0.034384712783341785',), 1338926236: ('0.034384712783341785',), 1338926233: ()} output_args : {1338926299: ('0.034384712783341785',), 1338926243: ('0.034384712783341785',), 1338926236: ('0.034384712783341785',), 1338926233: ('0.034384712783341785',)} args : 1338926233 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 : {20734877: [{'papier': 20734886, 'Teint_Dans_La_Masse': 20734887, 'autre_refus': 20734888, 'Carton_gris': 20734889, 'environnement': 20734890, 'metal': 20734891, 'plastique': 20734892, 'cartonnette': 20734893, 'Carton_brun': 20734894, 'mal_croppe': 20734895, 'flou': 20734896, 'kraft': 20734897}]} input_args_next_step : {1338926299: ('0.034384712783341785',), 1338926243: ('0.034384712783341785',), 1338926236: ('0.034384712783341785',), 1338926233: ('0.034384712783341785',), 20734877: ()} output_args : {20734877: [{'papier': 20734886, 'Teint_Dans_La_Masse': 20734887, 'autre_refus': 20734888, 'Carton_gris': 20734889, 'environnement': 20734890, 'metal': 20734891, 'plastique': 20734892, 'cartonnette': 20734893, 'Carton_brun': 20734894, 'mal_croppe': 20734895, 'flou': 20734896, 'kraft': 20734897}]} args : 20734877 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 :5, first value : ('0.034384712783341785',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (20734877) 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 (1338926299,1338926243,1338926236,1338926233) Found this number of photos: 4 ##### Call download_photos : nb_thread : 5 begin to download photo : 1338926233 begin to download photo : 1338926236 begin to download photo : 1338926243 begin to download photo : 1338926299 download finish for photo 1338926243 download finish for photo 1338926236 download finish for photo 1338926233 download finish for photo 1338926299 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos length of list_filenames : 4 ; length of list_pids : 4 ; length of list_args : 4 results_Auto_P20734877_21-02-2025_22_43_00.pdf 20734888 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=20734888 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1338924362: '1740173733_1106908_1338922911_43bb7af1a31e0477b37f2c8450fcda07_rle_crop_3682691748_0.png', 1338926208: '1740173974_1111008_1338925497_9b1ce7ec9e5b8b5696a078fc7058262a_rle_crop_3682694301_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/21/a97e57d0f4081571ebfadc174cc78099_62476916.png change filename to text .imagette207348881740174180/ imagette207348881740174180/1740173974_1111008_1338925497_9b1ce7ec9e5b8b5696a078fc7058262a_rle_crop_3682694301_0.png.png imagette207348881740174180/1740173733_1106908_1338922911_43bb7af1a31e0477b37f2c8450fcda07_rle_crop_3682691748_0.png.png imagette207348911740174180/ wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/21/9da1d27a3160afc72e73a374270898c6_24294453.png imagette207348881740174180 20734891 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=20734891 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette207348911740174180 20734892 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=20734892 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1338926200: '1740173954_1110644_1338925486_5f02e6ffb280bddcb3873126f18678c4_rle_crop_3682694253_0.png', 1338926217: '1740173974_1111008_1338925497_9b1ce7ec9e5b8b5696a078fc7058262a_rle_crop_3682694307_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/21/e3771543c2c50a8cff11c336a8b74540_60591004.png change filename to text .imagette207348921740174180/ imagette207348921740174180/1740173954_1110644_1338925486_5f02e6ffb280bddcb3873126f18678c4_rle_crop_3682694253_0.png.png imagette207348921740174180/1740173974_1111008_1338925497_9b1ce7ec9e5b8b5696a078fc7058262a_rle_crop_3682694307_0.png.png wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/21/86dde1d785b81d25573874f8f8d428e4_8792600.png imagette207348921740174180 20734893 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=20734893 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1338924365: '1740173733_1106908_1338922888_d7bb58c3851d163a5a22a651271d49d9_rle_crop_3682691812_0.png', 1338925928: '1740173873_1109368_1338923055_d6d6eada509baf6dc3de9623ea928f7f_rle_crop_3682693204_0.png', 1338926195: '1740173954_1110644_1338925495_ee0604cbed945e4c8ddcca9676595558_rle_crop_3682694237_0.png', 1338926196: '1740173954_1110644_1338925495_ee0604cbed945e4c8ddcca9676595558_rle_crop_3682694241_0.png', 1338926197: '1740173954_1110644_1338925486_5f02e6ffb280bddcb3873126f18678c4_rle_crop_3682694255_0.png', 1338926198: '1740173954_1110644_1338925486_5f02e6ffb280bddcb3873126f18678c4_rle_crop_3682694260_0.png', 1338926199: '1740173954_1110644_1338925424_eb98237c760f81b8caf8e74b0d5d00da_rle_crop_3682694269_0.png', 1338926210: '1740173974_1111008_1338925497_9b1ce7ec9e5b8b5696a078fc7058262a_rle_crop_3682694303_0.png', 1338926211: '1740173974_1111008_1338925497_9b1ce7ec9e5b8b5696a078fc7058262a_rle_crop_3682694302_0.png', 1338926212: '1740173974_1111008_1338924361_f9e19e450f8753dd8dca9f62dc9b27ee_rle_crop_3682694328_0.png', 1338926213: '1740173974_1111008_1338924361_f9e19e450f8753dd8dca9f62dc9b27ee_rle_crop_3682694324_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/21/3170388044d0bbeaadc8ff6f71ecdb4b_40978629.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/21/a286d043e62bc3e507673b23efc8e2a7_88220089.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/21/04f6d4ff93eb137aa39743b31a23e8e0_20309953.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/21/e15f4c39b54a6682882f214dc47e9c3f_70066347.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/21/75fb3e4e12c5a1ebc4e77d582e10ac89_61701835.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/21/4c251a515ac51581aaddbd8436248998_66817359.png change filename to text .wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/21/7d6649fd60e894767d4de3c3cde4e06e_21258525.png change filename to text .wget -O 8.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/21/5e2510a0d5a730c01a6e22059714144b_43825691.png change filename to text .wget -O 9.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/21/561b4f3d50aeab4270f20cf3aa05e088_82556052.png change filename to text .wget -O 10.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/21/8b461f30a77dac68dd231a6077210149_4813788.png change filename to text .imagette207348931740174180/ imagette207348931740174180/1740173954_1110644_1338925486_5f02e6ffb280bddcb3873126f18678c4_rle_crop_3682694260_0.png.png imagette207348931740174180/1740173974_1111008_1338924361_f9e19e450f8753dd8dca9f62dc9b27ee_rle_crop_3682694328_0.png.png imagette207348931740174180/1740173733_1106908_1338922888_d7bb58c3851d163a5a22a651271d49d9_rle_crop_3682691812_0.png.png imagette207348931740174180/1740173974_1111008_1338925497_9b1ce7ec9e5b8b5696a078fc7058262a_rle_crop_3682694302_0.png.png imagette207348931740174180/1740173873_1109368_1338923055_d6d6eada509baf6dc3de9623ea928f7f_rle_crop_3682693204_0.png.png imagette207348931740174180/1740173954_1110644_1338925495_ee0604cbed945e4c8ddcca9676595558_rle_crop_3682694237_0.png.png imagette207348931740174180/1740173954_1110644_1338925495_ee0604cbed945e4c8ddcca9676595558_rle_crop_3682694241_0.png.png imagette207348931740174180/1740173954_1110644_1338925486_5f02e6ffb280bddcb3873126f18678c4_rle_crop_3682694255_0.png.png imagette207348931740174180/1740173954_1110644_1338925424_eb98237c760f81b8caf8e74b0d5d00da_rle_crop_3682694269_0.png.png imagette207348931740174180/1740173974_1111008_1338924361_f9e19e450f8753dd8dca9f62dc9b27ee_rle_crop_3682694324_0.png.png imagette207348931740174180/1740173974_1111008_1338925497_9b1ce7ec9e5b8b5696a078fc7058262a_rle_crop_3682694303_0.png.png imagette207348951740174181/ imagette207348961740174181/ wget -O 11.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/21/27924e177de6aebf4073dcecfa32e303_37807669.png imagette207348931740174180 20734895 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=20734895 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette207348951740174181 20734896 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=20734896 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette207348961740174181 20734897 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=20734897 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1338926219: '1740173974_1111008_1338924361_f9e19e450f8753dd8dca9f62dc9b27ee_rle_crop_3682694326_0.png'} change filename to text .imagette207348971740174181/ imagette207348971740174181/1740173974_1111008_1338924361_f9e19e450f8753dd8dca9f62dc9b27ee_rle_crop_3682694326_0.png.png wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/21/32f57199f9b0dc1cedcacd3a06bfc561_83793400.png imagette207348971740174181 20734887 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=20734887 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1338925927: '1740173873_1109368_1338924335_e5db6d196cde28fa3194b62b713ee407_rle_crop_3682693137_0.png', 1338926186: '1740173954_1110644_1338925495_ee0604cbed945e4c8ddcca9676595558_rle_crop_3682694243_0.png', 1338926187: '1740173954_1110644_1338925486_5f02e6ffb280bddcb3873126f18678c4_rle_crop_3682694257_0.png', 1338926188: '1740173954_1110644_1338925486_5f02e6ffb280bddcb3873126f18678c4_rle_crop_3682694261_0.png', 1338926189: '1740173954_1110644_1338925424_eb98237c760f81b8caf8e74b0d5d00da_rle_crop_3682694272_0.png', 1338926190: '1740173954_1110644_1338925309_a0c152a336a268efdf9fe8977d5fde20_rle_crop_3682694298_0.png', 1338926191: '1740173954_1110644_1338925309_a0c152a336a268efdf9fe8977d5fde20_rle_crop_3682694291_0.png', 1338926203: '1740173974_1111008_1338925497_9b1ce7ec9e5b8b5696a078fc7058262a_rle_crop_3682694313_0.png', 1338926204: '1740173974_1111008_1338924369_7d436c66e0141d91e5ce2ac0ae03a251_rle_crop_3682694321_0.png', 1338926205: '1740173974_1111008_1338924361_f9e19e450f8753dd8dca9f62dc9b27ee_rle_crop_3682694329_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/21/a96036a39970efa8682e7a8756a5d161_60781098.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/21/7853c93c9d0d14fd84b32771c97fe02e_20165274.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/21/90c031ed0780b829827c1034bf0c6226_48598297.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/21/61ba6f7bf1bc68a1bd7274cf30a75954_3043049.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/21/26ddde0d1a2d1173dc53389c30ab02bb_86749799.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/21/317e2eb9821352e0508538ea77ff4e71_14778094.png change filename to text .wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/21/1ae71668891547418717cb81bb23ae43_8993626.png change filename to text .wget -O 8.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/21/34b9742ffb1951b310888218c9d9b03f_7600052.png change filename to text .wget -O 9.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/21/740c1ee6fd8f4cb51d0fbc22fa64a02c_39968138.png change filename to text .imagette207348871740174181/ imagette207348871740174181/1740173954_1110644_1338925486_5f02e6ffb280bddcb3873126f18678c4_rle_crop_3682694257_0.png.png imagette207348871740174181/1740173954_1110644_1338925486_5f02e6ffb280bddcb3873126f18678c4_rle_crop_3682694261_0.png.png imagette207348871740174181/1740173954_1110644_1338925424_eb98237c760f81b8caf8e74b0d5d00da_rle_crop_3682694272_0.png.png imagette207348871740174181/1740173873_1109368_1338924335_e5db6d196cde28fa3194b62b713ee407_rle_crop_3682693137_0.png.png imagette207348871740174181/1740173974_1111008_1338924369_7d436c66e0141d91e5ce2ac0ae03a251_rle_crop_3682694321_0.png.png imagette207348871740174181/1740173974_1111008_1338924361_f9e19e450f8753dd8dca9f62dc9b27ee_rle_crop_3682694329_0.png.png imagette207348871740174181/1740173954_1110644_1338925309_a0c152a336a268efdf9fe8977d5fde20_rle_crop_3682694291_0.png.png imagette207348871740174181/1740173954_1110644_1338925495_ee0604cbed945e4c8ddcca9676595558_rle_crop_3682694243_0.png.png imagette207348871740174181/1740173974_1111008_1338925497_9b1ce7ec9e5b8b5696a078fc7058262a_rle_crop_3682694313_0.png.png imagette207348871740174181/1740173954_1110644_1338925309_a0c152a336a268efdf9fe8977d5fde20_rle_crop_3682694298_0.png.png wget -O 10.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/21/8542a2304f3ee47d66c892b08c2a86d8_33489688.png imagette207348871740174181 20734889 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=20734889 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1338924363: '1740173733_1106908_1338922911_43bb7af1a31e0477b37f2c8450fcda07_rle_crop_3682691749_0.png'} change filename to text .imagette207348891740174182/ imagette207348891740174182/1740173733_1106908_1338922911_43bb7af1a31e0477b37f2c8450fcda07_rle_crop_3682691749_0.png.png wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/21/a0fe30e5a237071d1645a9e61153b142_76914995.png imagette207348891740174182 20734894 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=20734894 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1338924367: '1740173733_1106908_1338922888_d7bb58c3851d163a5a22a651271d49d9_rle_crop_3682691819_0.png', 1338925929: '1740173873_1109368_1338924335_e5db6d196cde28fa3194b62b713ee407_rle_crop_3682693132_0.png', 1338925930: '1740173873_1109368_1338923051_a00d4ca9f6be4f4ee42f4df1e46f9d52_rle_crop_3682693221_0.png', 1338926215: '1740173974_1111008_1338924361_f9e19e450f8753dd8dca9f62dc9b27ee_rle_crop_3682694332_0.png', 1338926216: '1740173974_1111008_1338924361_f9e19e450f8753dd8dca9f62dc9b27ee_rle_crop_3682694331_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/21/da23e7b721b1044d76e7cf2107997b65_3798648.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/21/52abb85c892cdba26458f73c522973f3_25587678.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/21/91123441b8b9b8bc75dcdb0161a8177c_44533098.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/21/63f6ae79d29a298fa9b49ab16cd3d1b5_16588675.png change filename to text .imagette207348941740174182/ imagette207348941740174182/1740173733_1106908_1338922888_d7bb58c3851d163a5a22a651271d49d9_rle_crop_3682691819_0.png.png imagette207348941740174182/1740173974_1111008_1338924361_f9e19e450f8753dd8dca9f62dc9b27ee_rle_crop_3682694331_0.png.png imagette207348941740174182/1740173873_1109368_1338923051_a00d4ca9f6be4f4ee42f4df1e46f9d52_rle_crop_3682693221_0.png.png imagette207348941740174182/1740173974_1111008_1338924361_f9e19e450f8753dd8dca9f62dc9b27ee_rle_crop_3682694332_0.png.png imagette207348941740174182/1740173873_1109368_1338924335_e5db6d196cde28fa3194b62b713ee407_rle_crop_3682693132_0.png.png wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/21/6e4658ff201df3cc70bd09aa467f63c3_49649338.png imagette207348941740174182 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=20734877 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/20734899,20734900,20734901,20734902,20734903,20734904,20734905,20734906,20734907,20734908,20734909,20734910?tags=papier,Teint_Dans_La_Masse,autre_refus,Carton_gris,environnement,metal,plastique,cartonnette,Carton_brun,mal_croppe,flou,kraft your option no_mail is active, we will not send the real mail to your client args[1338926299] : ('0.034384712783341785',) no score found for photo 1338926299 We are sending mail with results at report@fotonower.com args[1338926243] : ('0.034384712783341785',) no score found for photo 1338926243 We are sending mail with results at report@fotonower.com args[1338926236] : ('0.034384712783341785',) no score found for photo 1338926236 We are sending mail with results at report@fotonower.com args[1338926233] : ('0.034384712783341785',) no score found for photo 1338926233 We are sending mail with results at report@fotonower.com refus_total : 0.034384712783341785 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=20734877 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_P20734877_21-02-2025_22_43_00.pdf results_Auto_P20734877_21-02-2025_22_43_00.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20734877_21-02-2025_22_43_00.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','20734877','results_Auto_P20734877_21-02-2025_22_43_00.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20734877_21-02-2025_22_43_00.pdf','pdf','','0.16','0.034384712783341785') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([20734877]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1338926299, 1338926243, 1338926236, 1338926233] map_info['map_portfolio_photo'] : {20734877: [1338926299, 1338926243, 1338926236, 1338926233, 1338926123, 1338926119, 1338925860, 1338925770, 1338925616, 1338925610, 1338925497, 1338925495, 1338925486, 1338925424, 1338925309, 1338924373, 1338924369, 1338924361, 1338924335, 1338924210, 1338923912, 1338923657, 1338923365, 1338923095, 1338923059, 1338923055, 1338923051, 1338923030, 1338923028, 1338923025, 1338923018, 1338922991, 1338922988, 1338922911, 1338922906, 1338922895, 1338922888, 1338922852, 1338922846, 1338922842, 1338922830, 1338922828]} final : False mtd_id 4302 list_pids : [1338926299, 1338926243, 1338926236, 1338926233] 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, '2605952') ('4302', '20734877', '1338926299', None, None, None, None, None, '2605952') ('4302', None, None, None, None, None, None, None, '2605952') ('4302', '20734877', '1338926243', None, None, None, None, None, '2605952') ('4302', None, None, None, None, None, None, None, '2605952') ('4302', '20734877', '1338926236', None, None, None, None, None, '2605952') ('4302', None, None, None, None, None, None, None, '2605952') ('4302', '20734877', '1338926233', None, None, None, None, None, '2605952') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 4 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', '20734877', '1338926299', None, None, None, None, None, '2605952'), ('4302', '20734877', '1338926243', None, None, None, None, None, '2605952'), ('4302', '20734877', '1338926236', None, None, None, None, None, '2605952'), ('4302', '20734877', '1338926233', None, None, None, None, None, '2605952')] time used for this insertion : 0.011965751647949219 save_final save missing photos in datou_result : time spend for datou_step_exec : 3.0408573150634766 time spend to save output : 0.01215362548828125 total time spend for step 4 : 3.053010940551758 step5:split_time_score Fri Feb 21 22:43:03 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 : ['20734877'] 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 : [('20734877',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (20734877) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1338926243: {'path': 'temp/1740174180_889890_1338926243_7e157dc52723bbe25112dac1f9029beb.jpg', 'extension': 'jpg'}, 1338926236: {'path': 'temp/1740174180_889890_1338926236_7b518bc5324a3ad63540645dbf599c79.jpg', 'extension': 'jpg'}, 1338926233: {'path': 'temp/1740174180_889890_1338926233_9675766f99fc27b6dd1bfff014df9558.jpg', 'extension': 'jpg'}, 1338926299: {'path': 'temp/1740174180_889890_1338926299_36308bb3710b46def2daee46dee93349.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 = 20734877; (('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 = 20734877 group by h (('22', 42),) 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=20734877 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 (20734877) 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 (20734877) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 21022025 20734877 Nombre de photos uploadées : 42 / 23040 (0%) 21022025 20734877 Nombre de photos taguées (types de déchets): 0 / 42 (0%) 21022025 20734877 Nombre de photos taguées (volume) : 0 / 42 (0%) [{'photo_id': 1338922852, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/21/85076fae7da0825d6209bc89228b5a33.jpg', 'username': None, 'uploaded_at': 1740173484, 'text': 'image_21022025_22_30_03_10139.jpg'}, {'photo_id': 1338922846, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/21/03bc2c0a111df8e000bb267df6267d36.jpg', 'username': None, 'uploaded_at': 1740173484, 'text': 'image_21022025_22_30_13_10138.jpg'}, {'photo_id': 1338922842, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/21/4a68f1ba99626ff7acadc5136707faa5.jpg', 'username': None, 'uploaded_at': 1740173484, 'text': 'image_21022025_22_30_24_10134.jpg'}, {'photo_id': 1338922830, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/21/4e7cde4cfff254afd32cf9c2b22ae91d.jpg', 'username': None, 'uploaded_at': 1740173484, 'text': 'image_21022025_22_30_34_10143.jpg'}] 0 [] elapsed_time : load_data_split_time_score 1.9073486328125e-06 elapsed_time : order_list_meta_photo_and_scores 5.245208740234375e-06 ?????????????????????????????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.0028009414672851562 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 20734877, '2025-02-21' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (1615145,979,"{}"); elapsed_time : insert_dashboard_record_day_entry 0.022020816802978516 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= 1615145 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 1615145, 'dashboard_run_id': 1625697, 'mtr_portfolio_id': 20733367, 'dashboard_result_id': 9014104, '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_P20733367_21-02-2025_22_02_59.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 20733401, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20733402, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20733403, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20733404, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20733405, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20733406, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20733407, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20733408, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20733409, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20733410, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20733411, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20733412, 'pht': 3726}}"}, {'dashboat_entry_day': 1615145, 'dashboard_run_id': 1625697, 'mtr_portfolio_id': 20733786, 'dashboard_result_id': 9014105, '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_P20733786_21-02-2025_22_19_00.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20733815, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20733816, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20733817, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20733818, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20733819, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20733820, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20733821, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20733822, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20733823, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20733824, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20733825, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20733826, 'pht': 3726}}"}, {'dashboat_entry_day': 1615145, 'dashboard_run_id': 1625697, 'mtr_portfolio_id': 20734349, 'dashboard_result_id': 9014106, '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_P20734349_21-02-2025_22_32_58.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20734357, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20734358, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20734359, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20734360, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20734361, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20734362, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20734363, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20734364, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20734365, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20734366, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20734367, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20734368, 'pht': 3726}}"}, {'dashboat_entry_day': 1615145, 'dashboard_run_id': 1625697, 'mtr_portfolio_id': 20734877, 'dashboard_result_id': 9014107, '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_P20734877_21-02-2025_22_41_02.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 20734886, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20734887, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20734888, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20734889, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20734890, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20734891, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20734892, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20734893, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20734894, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20734895, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20734896, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20734897, '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 = 20733367 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': 2605734, 'mtr_portfolio_id': 20733367, 'created_at': datetime.datetime(2025, 2, 21, 22, 2, 58), 'result': '0.037147749014865956', 'result_long': None, 'result_double': None}] Qualite : 0.037147749014865956 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 20733367 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20733367_21-02-2025_22_02_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 20733367 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_P20733367_21-02-2025_22_02_59.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 20733401, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20733402, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20733403, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20733404, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20733405, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20733406, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20733407, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20733408, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20733409, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20733410, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20733411, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20733412, 'pht': 3726}}" where mtr_portfolio_id = 20733367 and dashboard_run_id = 1625697 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`=20733367 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9014104, 0.037147749014865956, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20733367_21-02-2025_22_02_59.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 20733401, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20733402, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20733403, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20733404, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20733405, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20733406, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20733407, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20733408, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20733409, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20733410, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20733411, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20733412, '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 = 20733786 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': 2605833, 'mtr_portfolio_id': 20733786, 'created_at': datetime.datetime(2025, 2, 21, 22, 18, 59), 'result': '0.034780689882658374', 'result_long': None, 'result_double': None}] Qualite : 0.034780689882658374 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 20733786 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20733786_21-02-2025_22_19_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 20733786 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_P20733786_21-02-2025_22_19_00.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20733815, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20733816, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20733817, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20733818, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20733819, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20733820, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20733821, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20733822, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20733823, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20733824, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20733825, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20733826, 'pht': 3726}}" where mtr_portfolio_id = 20733786 and dashboard_run_id = 1625697 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`=20733786 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9014105, 0.034780689882658374, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20733786_21-02-2025_22_19_00.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20733815, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20733816, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20733817, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20733818, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20733819, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20733820, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20733821, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20733822, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20733823, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20733824, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20733825, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20733826, '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 = 20734349 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': 2605881, 'mtr_portfolio_id': 20734349, 'created_at': datetime.datetime(2025, 2, 21, 22, 32, 57), 'result': '0.04521464188811201', 'result_long': None, 'result_double': None}] Qualite : 0.04521464188811201 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 20734349 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20734349_21-02-2025_22_32_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 20734349 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_P20734349_21-02-2025_22_32_58.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20734357, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20734358, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20734359, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20734360, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20734361, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20734362, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20734363, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20734364, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20734365, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20734366, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20734367, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20734368, 'pht': 3726}}" where mtr_portfolio_id = 20734349 and dashboard_run_id = 1625697 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`=20734349 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9014106, 0.04521464188811201, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20734349_21-02-2025_22_32_58.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20734357, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20734358, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20734359, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20734360, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20734361, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20734362, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20734363, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20734364, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20734365, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20734366, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20734367, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20734368, '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 = 20734877 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': 2605952, 'mtr_portfolio_id': 20734877, 'created_at': datetime.datetime(2025, 2, 21, 22, 43), 'result': '0.034384712783341785', 'result_long': None, 'result_double': None}] Qualite : 0.034384712783341785 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 20734877 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20734877_21-02-2025_22_43_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 20734877 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_P20734877_21-02-2025_22_43_00.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 20734886, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20734887, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20734888, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20734889, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20734890, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20734891, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20734892, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20734893, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20734894, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20734895, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20734896, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20734897, 'pht': 3726}}" where mtr_portfolio_id = 20734877 and dashboard_run_id = 1625697 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`=20734877 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9014107, 0.034384712783341785, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20734877_21-02-2025_22_43_00.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 20734886, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20734887, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20734888, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20734889, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20734890, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20734891, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20734892, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20734893, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20734894, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20734895, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20734896, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20734897, '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 (20733367,20733786,20734349,20734877) result : ((1338914819,), (1338914823,), (1338914845,), (1338914848,), (1338914851,), (1338914853,), (1338914855,), (1338914863,), (1338914913,), (1338915034,), (1338915035,), (1338915039,), (1338915061,), (1338915063,), (1338915065,), (1338915067,), (1338915070,), (1338915071,), (1338915109,), (1338915111,), (1338915112,), (1338915114,), (1338915178,), (1338915274,), (1338916137,), (1338916232,), (1338916314,), (1338916408,), (1338916518,), (1338916634,), (1338916636,), (1338916638,), (1338916640,), (1338916642,), (1338916702,), (1338916703,), (1338916824,), (1338917147,), (1338917440,), (1338917729,), (1338918313,), (1338918375,), (1338918441,), (1338918452,), (1338918563,), (1338918613,), (1338918681,), (1338918692,), (1338918694,), (1338919154,), (1338919215,), (1338919247,), (1338919276,), (1338919321,), (1338919434,), (1338919768,), (1338919771,), (1338919772,), (1338919774,), (1338919796,), (1338919804,), (1338919809,), (1338919811,), (1338919813,), (1338919817,), (1338920319,), (1338920323,), (1338920325,), (1338920326,), (1338920328,), (1338920482,), (1338920453,), (1338920464,), (1338920476,), (1338920481,), (1338920501,), (1338920503,), (1338920505,), (1338920507,), (1338920509,), (1338920819,), (1338920873,), (1338920877,), (1338920895,), (1338920919,), (1338920953,), (1338920956,), (1338920959,), (1338920960,), (1338921014,), (1338921015,), (1338921017,), (1338921024,), (1338921086,), (1338921092,), (1338921094,), (1338921111,), (1338921113,), (1338921116,), (1338921214,), (1338921218,), (1338921219,), (1338921266,), (1338921273,), (1338921276,), (1338921280,), (1338921297,), (1338921377,), (1338921444,), (1338921464,), (1338921479,), (1338921482,), (1338921485,), (1338921513,), (1338921517,), (1338921521,), (1338921524,), (1338921547,), (1338921550,), (1338921554,), (1338921558,), (1338921562,), (1338921585,), (1338921591,), (1338921597,), (1338921599,), (1338921602,), (1338921604,), (1338921621,), (1338921624,), (1338921629,), (1338921631,), (1338921717,), (1338921720,), (1338921723,), (1338921725,), (1338921816,), (1338921819,), (1338921831,), (1338921835,), (1338921838,), (1338921839,), (1338921867,), (1338921858,), (1338921859,), (1338921863,), (1338922001,), (1338922003,), (1338922006,), (1338922008,), (1338922064,), (1338922067,), (1338922071,), (1338922079,), (1338922082,), (1338922100,), (1338922155,), (1338922167,), (1338922169,), (1338922187,), (1338922191,), (1338922194,), (1338922198,), (1338922202,), (1338922219,), (1338922226,), (1338922230,), (1338922235,), (1338922242,), (1338922262,), (1338922264,), (1338922267,), (1338922271,), (1338922279,), (1338922343,), (1338922345,), (1338922442,), (1338922444,), (1338922446,), (1338922449,), (1338922452,), (1338922473,), (1338922475,), (1338922478,), (1338922481,), (1338922486,), (1338922488,), (1338922513,), (1338922519,), (1338922544,), (1338922550,), (1338922557,), (1338922654,), (1338922659,), (1338922662,), (1338922664,), (1338922697,), (1338922699,), (1338922700,), (1338922738,), (1338922747,), (1338922751,), (1338922756,), (1338922759,), (1338922763,), (1338922784,), (1338922792,), (1338922794,), (1338922857,), (1338922828,), (1338922830,), (1338922842,), (1338922846,), (1338922852,), (1338922888,), (1338922895,), (1338922906,), (1338922911,), (1338922988,), (1338922991,), (1338923018,), (1338923025,), (1338923028,), (1338923030,), (1338923051,), (1338923055,), (1338923059,), (1338923095,), (1338923365,), (1338923657,), (1338923912,), (1338924210,), (1338924335,), (1338924361,), (1338924369,), (1338924373,), (1338925309,), (1338925424,), (1338925486,), (1338925495,), (1338925497,), (1338925610,), (1338925616,), (1338925770,), (1338925860,), (1338926119,), (1338926123,), (1338926233,), (1338926236,), (1338926243,), (1338926299,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'21022025': {'nb_upload': 42, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([20734877]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1338926299, 1338926243, 1338926236, 1338926233] map_info['map_portfolio_photo'] : {20734877: [1338926299, 1338926243, 1338926236, 1338926233, 1338926123, 1338926119, 1338925860, 1338925770, 1338925616, 1338925610, 1338925497, 1338925495, 1338925486, 1338925424, 1338925309, 1338924373, 1338924369, 1338924361, 1338924335, 1338924210, 1338923912, 1338923657, 1338923365, 1338923095, 1338923059, 1338923055, 1338923051, 1338923030, 1338923028, 1338923025, 1338923018, 1338922991, 1338922988, 1338922911, 1338922906, 1338922895, 1338922888, 1338922852, 1338922846, 1338922842, 1338922830, 1338922828]} final : True mtd_id 4302 list_pids : [1338926299, 1338926243, 1338926236, 1338926233] Looping around the photos to save general results len do output : 1 /20734877Didn'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, '2605952') ('4302', '20734877', '1338926299', None, None, None, None, None, '2605952') ('4302', None, None, None, None, None, None, None, '2605952') ('4302', '20734877', '1338926243', None, None, None, None, None, '2605952') ('4302', None, None, None, None, None, None, None, '2605952') ('4302', '20734877', '1338926236', None, None, None, None, None, '2605952') ('4302', None, None, None, None, None, None, None, '2605952') ('4302', '20734877', '1338926233', None, None, None, None, None, '2605952') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 5 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, '20734877', 'None', None, None, None, None, '2605952'), ('4302', '20734877', '1338926299', None, None, None, None, None, '2605952'), ('4302', '20734877', '1338926243', None, None, None, None, None, '2605952'), ('4302', '20734877', '1338926236', None, None, None, None, None, '2605952'), ('4302', '20734877', '1338926233', None, None, None, None, None, '2605952')] time used for this insertion : 0.012863397598266602 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.32878589630126953 time spend to save output : 0.013123750686645508 total time spend for step 5 : 0.34190964698791504 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 (2605952) 1.89user 2.34system 0:08.96elapsed 47%CPU (0avgtext+0avgdata 157228maxresident)k 232inputs+7776outputs (14major+63853minor)pagefaults 0swaps