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 : 689238 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 (2730968) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (2730968) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22135842 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['2730968'] with mtr_portfolio_ids : ['22135842'] and first list_photo_ids : [] new path : /proc/689238/ Name: python3 Umask: 0002 State: R (running) Tgid: 689238 Ngid: 0 Pid: 689238 PPid: 689237 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 689238 NSpid: 689238 NSpgid: 683477 NSsid: 683477 VmPeak: 1106828 kB VmSize: 1106828 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 98740 kB VmRSS: 98740 kB RssAnon: 59800 kB RssFile: 38940 kB RssShmem: 0 kB VmData: 865576 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 612 kB VmSwap: 0 kB HugetlbPages: 0 kB CoreDumping: 0 THP_enabled: 1 Threads: 1 SigQ: 0/63054 SigPnd: 0000000000000000 ShdPnd: 0000000000000000 SigBlk: 0000000000000000 SigIgn: 0000000001001000 SigCgt: 0000000180000002 CapInh: 0000000000000000 CapPrm: 0000000000000000 CapEff: 0000000000000000 CapBnd: 000001ffffffffff CapAmb: 0000000000000000 NoNewPrivs: 0 Seccomp: 0 Seccomp_filters: 0 Speculation_Store_Bypass: thread vulnerable SpeculationIndirectBranch: conditional enabled Cpus_allowed: ffffffff,ffffffff,ffffffff,ffffffff Cpus_allowed_list: 0-127 Mems_allowed: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001 Mems_allowed_list: 0 voluntary_ctxt_switches: 57 nonvoluntary_ctxt_switches: 115 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '689238', 'Ngid': '0', 'Pid': '689238', 'PPid': '689237', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '689238', 'NSpid': '689238', 'NSpgid': '683477', 'NSsid': '683477', 'VmPeak': '1106828 kB', 'VmSize': '1106828 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '98740 kB', 'VmRSS': '98740 kB', 'RssAnon': '59800 kB', 'RssFile': '38940 kB', 'RssShmem': '0 kB', 'VmData': '865576 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '612 kB', 'VmSwap': '0 kB', 'HugetlbPages': '0 kB', 'CoreDumping': '0', 'THP_enabled': '1', 'Threads': '1', 'SigQ': '0/63054', 'SigPnd': '0000000000000000', 'ShdPnd': '0000000000000000', 'SigBlk': '0000000000000000', 'SigIgn': '0000000001001000', 'SigCgt': '0000000180000002', 'CapInh': '0000000000000000', 'CapPrm': '0000000000000000', 'CapEff': '0000000000000000', 'CapBnd': '000001ffffffffff', 'CapAmb': '0000000000000000', 'NoNewPrivs': '0', 'Seccomp': '0', 'Seccomp_filters': '0', 'Speculation_Store_Bypass': 'thread vulnerable', 'SpeculationIndirectBranch': 'conditional enabled', 'Cpus_allowed': 'ffffffff,ffffffff,ffffffff,ffffffff', 'Cpus_allowed_list': '0-127', 'Mems_allowed': '00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001', 'Mems_allowed_list': '0', 'voluntary_ctxt_switches': '57', 'nonvoluntary_ctxt_switches': '115'} ('datou_batch_current', '689238', '1106828', '0', '1106828', '865576', '98740', b'', 'marlene', '2730968') 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 (22135842) 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 (2730968 ) ) 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 (22135842) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1350723990, 'portfolio_id': 22135842}, {'photo_id': 1350723922, 'portfolio_id': 22135842}, {'photo_id': 1350723917, 'portfolio_id': 22135842}, {'photo_id': 1350723863, 'portfolio_id': 22135842}, {'photo_id': 1350723860, 'portfolio_id': 22135842}, {'photo_id': 1350723857, 'portfolio_id': 22135842}, {'photo_id': 1350723854, 'portfolio_id': 22135842}, {'photo_id': 1350723798, 'portfolio_id': 22135842}, {'photo_id': 1350723792, 'portfolio_id': 22135842}, {'photo_id': 1350723775, 'portfolio_id': 22135842}, {'photo_id': 1350723773, 'portfolio_id': 22135842}, {'photo_id': 1350723755, 'portfolio_id': 22135842}, {'photo_id': 1350723693, 'portfolio_id': 22135842}, {'photo_id': 1350723689, 'portfolio_id': 22135842}, {'photo_id': 1350723686, 'portfolio_id': 22135842}, {'photo_id': 1350723674, 'portfolio_id': 22135842}, {'photo_id': 1350723648, 'portfolio_id': 22135842}, {'photo_id': 1350723570, 'portfolio_id': 22135842}, {'photo_id': 1350723565, 'portfolio_id': 22135842}, {'photo_id': 1350723561, 'portfolio_id': 22135842}, {'photo_id': 1350723558, 'portfolio_id': 22135842}, {'photo_id': 1350723509, 'portfolio_id': 22135842}, {'photo_id': 1350723507, 'portfolio_id': 22135842}, {'photo_id': 1350723505, 'portfolio_id': 22135842}, {'photo_id': 1350723501, 'portfolio_id': 22135842}, {'photo_id': 1350723398, 'portfolio_id': 22135842}, {'photo_id': 1350723305, 'portfolio_id': 22135842}, {'photo_id': 1350723225, 'portfolio_id': 22135842}, {'photo_id': 1350723219, 'portfolio_id': 22135842}, {'photo_id': 1350723217, 'portfolio_id': 22135842}, {'photo_id': 1350723215, 'portfolio_id': 22135842}, {'photo_id': 1350723170, 'portfolio_id': 22135842}, {'photo_id': 1350723167, 'portfolio_id': 22135842}, {'photo_id': 1350723163, 'portfolio_id': 22135842}, {'photo_id': 1350723123, 'portfolio_id': 22135842}, {'photo_id': 1350723121, 'portfolio_id': 22135842}, {'photo_id': 1350722988, 'portfolio_id': 22135842}, {'photo_id': 1350722961, 'portfolio_id': 22135842}, {'photo_id': 1350722956, 'portfolio_id': 22135842}, {'photo_id': 1350722954, 'portfolio_id': 22135842}, {'photo_id': 1350722749, 'portfolio_id': 22135842}, {'photo_id': 1350722747, 'portfolio_id': 22135842}, {'photo_id': 1350722743, 'portfolio_id': 22135842}, {'photo_id': 1350722662, 'portfolio_id': 22135842}, {'photo_id': 1350722640, 'portfolio_id': 22135842}, {'photo_id': 1350722501, 'portfolio_id': 22135842}, {'photo_id': 1350722491, 'portfolio_id': 22135842}, {'photo_id': 1350722434, 'portfolio_id': 22135842}, {'photo_id': 1350722429, 'portfolio_id': 22135842}, {'photo_id': 1350722426, 'portfolio_id': 22135842}, {'photo_id': 1350722423, 'portfolio_id': 22135842}, {'photo_id': 1350722207, 'portfolio_id': 22135842}, {'photo_id': 1350722204, 'portfolio_id': 22135842}, {'photo_id': 1350722201, 'portfolio_id': 22135842}, {'photo_id': 1350722199, 'portfolio_id': 22135842}] map_portfolio_id_photo_id: {22135842: [1350723990, 1350723922, 1350723917, 1350723863, 1350723860, 1350723857, 1350723854, 1350723798, 1350723792, 1350723775, 1350723773, 1350723755, 1350723693, 1350723689, 1350723686, 1350723674, 1350723648, 1350723570, 1350723565, 1350723561, 1350723558, 1350723509, 1350723507, 1350723505, 1350723501, 1350723398, 1350723305, 1350723225, 1350723219, 1350723217, 1350723215, 1350723170, 1350723167, 1350723163, 1350723123, 1350723121, 1350722988, 1350722961, 1350722956, 1350722954, 1350722749, 1350722747, 1350722743, 1350722662, 1350722640, 1350722501, 1350722491, 1350722434, 1350722429, 1350722426, 1350722423, 1350722207, 1350722204, 1350722201, 1350722199]} ##### 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.017946243286132812 #### fin chargement data Blocking on flush ? No conitnuing About to test input to load Calling datou_exec Inside datou_exec : verbose : True number of steps : 5 step1:ventilate_hashtags_in_portfolio Thu Apr 17 14:32:59 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22135842) 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 : 22135842 get user id for portfolio 22135842 get sub ptf for main ptf 22135842, type 3726 and hashtags ['flou', 'metal', 'cartonnette', 'Teint_Dans_La_Masse', 'Carton_gris', 'environnement', 'autre_refus', 'kraft', 'papier', 'mal_croppe', 'Carton_brun', 'plastique'] 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`=22135842 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('flou','metal','cartonnette','Teint_Dans_La_Masse','Carton_gris','environnement','autre_refus','kraft','papier','mal_croppe','Carton_brun','plastique')) 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`=22135842 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('flou','metal','cartonnette','Teint_Dans_La_Masse','Carton_gris','environnement','autre_refus','kraft','papier','mal_croppe','Carton_brun','plastique')) AND mptpi.`min_score`=0.5 To do returned map {'kraft': {'main_port_id': 22135842, 'sub_port_id': 22135872, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14616797, 'last_updated_at': datetime.datetime(2025, 4, 17, 14, 31), 'last_updated_at_desc': datetime.datetime(2025, 4, 17, 14, 31), 'last_updated_at_asc': datetime.datetime(2025, 4, 17, 14, 19, 27)}, 'plastique': {'main_port_id': 22135842, 'sub_port_id': 22135873, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14616798, 'last_updated_at': datetime.datetime(2025, 4, 17, 14, 31), 'last_updated_at_desc': datetime.datetime(2025, 4, 17, 14, 31), 'last_updated_at_asc': datetime.datetime(2025, 4, 17, 14, 19, 27)}, 'environnement': {'main_port_id': 22135842, 'sub_port_id': 22135874, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14616799, 'last_updated_at': datetime.datetime(2025, 4, 17, 14, 31), 'last_updated_at_desc': datetime.datetime(2025, 4, 17, 14, 31), 'last_updated_at_asc': datetime.datetime(2025, 4, 17, 14, 19, 27)}, 'papier': {'main_port_id': 22135842, 'sub_port_id': 22135875, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14616800, 'last_updated_at': datetime.datetime(2025, 4, 17, 14, 31), 'last_updated_at_desc': datetime.datetime(2025, 4, 17, 14, 31), 'last_updated_at_asc': datetime.datetime(2025, 4, 17, 14, 19, 27)}, 'metal': {'main_port_id': 22135842, 'sub_port_id': 22135876, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14616801, 'last_updated_at': datetime.datetime(2025, 4, 17, 14, 31), 'last_updated_at_desc': datetime.datetime(2025, 4, 17, 14, 31), 'last_updated_at_asc': datetime.datetime(2025, 4, 17, 14, 19, 27)}, 'autre_refus': {'main_port_id': 22135842, 'sub_port_id': 22135877, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14616802, 'last_updated_at': datetime.datetime(2025, 4, 17, 14, 31), 'last_updated_at_desc': datetime.datetime(2025, 4, 17, 14, 31), 'last_updated_at_asc': datetime.datetime(2025, 4, 17, 14, 19, 27)}, 'Carton_brun': {'main_port_id': 22135842, 'sub_port_id': 22135878, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14616803, 'last_updated_at': datetime.datetime(2025, 4, 17, 14, 31), 'last_updated_at_desc': datetime.datetime(2025, 4, 17, 14, 31), 'last_updated_at_asc': datetime.datetime(2025, 4, 17, 14, 19, 27)}, 'mal_croppe': {'main_port_id': 22135842, 'sub_port_id': 22135879, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14616804, 'last_updated_at': datetime.datetime(2025, 4, 17, 14, 31), 'last_updated_at_desc': datetime.datetime(2025, 4, 17, 14, 31), 'last_updated_at_asc': datetime.datetime(2025, 4, 17, 14, 19, 27)}, 'Carton_gris': {'main_port_id': 22135842, 'sub_port_id': 22135880, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14616805, 'last_updated_at': datetime.datetime(2025, 4, 17, 14, 31), 'last_updated_at_desc': datetime.datetime(2025, 4, 17, 14, 31), 'last_updated_at_asc': datetime.datetime(2025, 4, 17, 14, 19, 27)}, 'flou': {'main_port_id': 22135842, 'sub_port_id': 22135881, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14616806, 'last_updated_at': datetime.datetime(2025, 4, 17, 14, 31), 'last_updated_at_desc': datetime.datetime(2025, 4, 17, 14, 31), 'last_updated_at_asc': datetime.datetime(2025, 4, 17, 14, 19, 27)}, 'Teint_Dans_La_Masse': {'main_port_id': 22135842, 'sub_port_id': 22135882, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14616807, 'last_updated_at': datetime.datetime(2025, 4, 17, 14, 31), 'last_updated_at_desc': datetime.datetime(2025, 4, 17, 14, 31), 'last_updated_at_asc': datetime.datetime(2025, 4, 17, 14, 19, 27)}, 'cartonnette': {'main_port_id': 22135842, 'sub_port_id': 22135883, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14616808, 'last_updated_at': datetime.datetime(2025, 4, 17, 14, 31), 'last_updated_at_desc': datetime.datetime(2025, 4, 17, 14, 31), 'last_updated_at_asc': datetime.datetime(2025, 4, 17, 14, 19, 27)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22135872 , 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=22135842 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 (22135872) result : ((1350723529,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22135842) result : ((1350722199,), (1350722201,), (1350722204,), (1350722207,), (1350722423,), (1350722426,), (1350722429,), (1350722434,), (1350722491,), (1350722501,), (1350722640,), (1350722662,), (1350722743,), (1350722747,), (1350722749,), (1350722954,), (1350722956,), (1350722961,), (1350722988,), (1350723121,), (1350723123,), (1350723163,), (1350723167,), (1350723170,), (1350723215,), (1350723217,), (1350723219,), (1350723225,), (1350723305,), (1350723398,), (1350723501,), (1350723505,), (1350723507,), (1350723509,), (1350723558,), (1350723561,), (1350723565,), (1350723570,), (1350723648,), (1350723674,), (1350723686,), (1350723689,), (1350723693,), (1350723755,), (1350723773,), (1350723775,), (1350723792,), (1350723798,), (1350723854,), (1350723857,), (1350723860,), (1350723863,), (1350723917,), (1350723922,), (1350723990,)) 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 22135873 , 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=22135842 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 (22135873) result : ((1350723120,), (1350723212,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22135842) result : ((1350722199,), (1350722201,), (1350722204,), (1350722207,), (1350722423,), (1350722426,), (1350722429,), (1350722434,), (1350722491,), (1350722501,), (1350722640,), (1350722662,), (1350722743,), (1350722747,), (1350722749,), (1350722954,), (1350722956,), (1350722961,), (1350722988,), (1350723121,), (1350723123,), (1350723163,), (1350723167,), (1350723170,), (1350723215,), (1350723217,), (1350723219,), (1350723225,), (1350723305,), (1350723398,), (1350723501,), (1350723505,), (1350723507,), (1350723509,), (1350723558,), (1350723561,), (1350723565,), (1350723570,), (1350723648,), (1350723674,), (1350723686,), (1350723689,), (1350723693,), (1350723755,), (1350723773,), (1350723775,), (1350723792,), (1350723798,), (1350723854,), (1350723857,), (1350723860,), (1350723863,), (1350723917,), (1350723922,), (1350723990,)) 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 22135874 , 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=22135842 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 (22135874) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22135842) result : ((1350722199,), (1350722201,), (1350722204,), (1350722207,), (1350722423,), (1350722426,), (1350722429,), (1350722434,), (1350722491,), (1350722501,), (1350722640,), (1350722662,), (1350722743,), (1350722747,), (1350722749,), (1350722954,), (1350722956,), (1350722961,), (1350722988,), (1350723121,), (1350723123,), (1350723163,), (1350723167,), (1350723170,), (1350723215,), (1350723217,), (1350723219,), (1350723225,), (1350723305,), (1350723398,), (1350723501,), (1350723505,), (1350723507,), (1350723509,), (1350723558,), (1350723561,), (1350723565,), (1350723570,), (1350723648,), (1350723674,), (1350723686,), (1350723689,), (1350723693,), (1350723755,), (1350723773,), (1350723775,), (1350723792,), (1350723798,), (1350723854,), (1350723857,), (1350723860,), (1350723863,), (1350723917,), (1350723922,), (1350723990,)) 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 22135875 , 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=22135842 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 (22135875) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22135842) result : ((1350722199,), (1350722201,), (1350722204,), (1350722207,), (1350722423,), (1350722426,), (1350722429,), (1350722434,), (1350722491,), (1350722501,), (1350722640,), (1350722662,), (1350722743,), (1350722747,), (1350722749,), (1350722954,), (1350722956,), (1350722961,), (1350722988,), (1350723121,), (1350723123,), (1350723163,), (1350723167,), (1350723170,), (1350723215,), (1350723217,), (1350723219,), (1350723225,), (1350723305,), (1350723398,), (1350723501,), (1350723505,), (1350723507,), (1350723509,), (1350723558,), (1350723561,), (1350723565,), (1350723570,), (1350723648,), (1350723674,), (1350723686,), (1350723689,), (1350723693,), (1350723755,), (1350723773,), (1350723775,), (1350723792,), (1350723798,), (1350723854,), (1350723857,), (1350723860,), (1350723863,), (1350723917,), (1350723922,), (1350723990,)) 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 22135876 , 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=22135842 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 (22135876) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22135842) result : ((1350722199,), (1350722201,), (1350722204,), (1350722207,), (1350722423,), (1350722426,), (1350722429,), (1350722434,), (1350722491,), (1350722501,), (1350722640,), (1350722662,), (1350722743,), (1350722747,), (1350722749,), (1350722954,), (1350722956,), (1350722961,), (1350722988,), (1350723121,), (1350723123,), (1350723163,), (1350723167,), (1350723170,), (1350723215,), (1350723217,), (1350723219,), (1350723225,), (1350723305,), (1350723398,), (1350723501,), (1350723505,), (1350723507,), (1350723509,), (1350723558,), (1350723561,), (1350723565,), (1350723570,), (1350723648,), (1350723674,), (1350723686,), (1350723689,), (1350723693,), (1350723755,), (1350723773,), (1350723775,), (1350723792,), (1350723798,), (1350723854,), (1350723857,), (1350723860,), (1350723863,), (1350723917,), (1350723922,), (1350723990,)) 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 22135877 , 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=22135842 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 (22135877) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22135842) result : ((1350722199,), (1350722201,), (1350722204,), (1350722207,), (1350722423,), (1350722426,), (1350722429,), (1350722434,), (1350722491,), (1350722501,), (1350722640,), (1350722662,), (1350722743,), (1350722747,), (1350722749,), (1350722954,), (1350722956,), (1350722961,), (1350722988,), (1350723121,), (1350723123,), (1350723163,), (1350723167,), (1350723170,), (1350723215,), (1350723217,), (1350723219,), (1350723225,), (1350723305,), (1350723398,), (1350723501,), (1350723505,), (1350723507,), (1350723509,), (1350723558,), (1350723561,), (1350723565,), (1350723570,), (1350723648,), (1350723674,), (1350723686,), (1350723689,), (1350723693,), (1350723755,), (1350723773,), (1350723775,), (1350723792,), (1350723798,), (1350723854,), (1350723857,), (1350723860,), (1350723863,), (1350723917,), (1350723922,), (1350723990,)) 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 22135878 , 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=22135842 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 (22135878) result : ((1350722913,), (1350723518,), (1350723912,), (1350723913,), (1350724026,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22135842) result : ((1350722199,), (1350722201,), (1350722204,), (1350722207,), (1350722423,), (1350722426,), (1350722429,), (1350722434,), (1350722491,), (1350722501,), (1350722640,), (1350722662,), (1350722743,), (1350722747,), (1350722749,), (1350722954,), (1350722956,), (1350722961,), (1350722988,), (1350723121,), (1350723123,), (1350723163,), (1350723167,), (1350723170,), (1350723215,), (1350723217,), (1350723219,), (1350723225,), (1350723305,), (1350723398,), (1350723501,), (1350723505,), (1350723507,), (1350723509,), (1350723558,), (1350723561,), (1350723565,), (1350723570,), (1350723648,), (1350723674,), (1350723686,), (1350723689,), (1350723693,), (1350723755,), (1350723773,), (1350723775,), (1350723792,), (1350723798,), (1350723854,), (1350723857,), (1350723860,), (1350723863,), (1350723917,), (1350723922,), (1350723990,)) 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 22135879 , 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=22135842 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 (22135879) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22135842) result : ((1350722199,), (1350722201,), (1350722204,), (1350722207,), (1350722423,), (1350722426,), (1350722429,), (1350722434,), (1350722491,), (1350722501,), (1350722640,), (1350722662,), (1350722743,), (1350722747,), (1350722749,), (1350722954,), (1350722956,), (1350722961,), (1350722988,), (1350723121,), (1350723123,), (1350723163,), (1350723167,), (1350723170,), (1350723215,), (1350723217,), (1350723219,), (1350723225,), (1350723305,), (1350723398,), (1350723501,), (1350723505,), (1350723507,), (1350723509,), (1350723558,), (1350723561,), (1350723565,), (1350723570,), (1350723648,), (1350723674,), (1350723686,), (1350723689,), (1350723693,), (1350723755,), (1350723773,), (1350723775,), (1350723792,), (1350723798,), (1350723854,), (1350723857,), (1350723860,), (1350723863,), (1350723917,), (1350723922,), (1350723990,)) 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 22135880 , 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=22135842 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 (22135880) result : ((1350723194,), (1350724025,), (1350724091,), (1350724093,), (1350724094,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22135842) result : ((1350722199,), (1350722201,), (1350722204,), (1350722207,), (1350722423,), (1350722426,), (1350722429,), (1350722434,), (1350722491,), (1350722501,), (1350722640,), (1350722662,), (1350722743,), (1350722747,), (1350722749,), (1350722954,), (1350722956,), (1350722961,), (1350722988,), (1350723121,), (1350723123,), (1350723163,), (1350723167,), (1350723170,), (1350723215,), (1350723217,), (1350723219,), (1350723225,), (1350723305,), (1350723398,), (1350723501,), (1350723505,), (1350723507,), (1350723509,), (1350723558,), (1350723561,), (1350723565,), (1350723570,), (1350723648,), (1350723674,), (1350723686,), (1350723689,), (1350723693,), (1350723755,), (1350723773,), (1350723775,), (1350723792,), (1350723798,), (1350723854,), (1350723857,), (1350723860,), (1350723863,), (1350723917,), (1350723922,), (1350723990,)) 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 22135881 , 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=22135842 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 (22135881) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22135842) result : ((1350722199,), (1350722201,), (1350722204,), (1350722207,), (1350722423,), (1350722426,), (1350722429,), (1350722434,), (1350722491,), (1350722501,), (1350722640,), (1350722662,), (1350722743,), (1350722747,), (1350722749,), (1350722954,), (1350722956,), (1350722961,), (1350722988,), (1350723121,), (1350723123,), (1350723163,), (1350723167,), (1350723170,), (1350723215,), (1350723217,), (1350723219,), (1350723225,), (1350723305,), (1350723398,), (1350723501,), (1350723505,), (1350723507,), (1350723509,), (1350723558,), (1350723561,), (1350723565,), (1350723570,), (1350723648,), (1350723674,), (1350723686,), (1350723689,), (1350723693,), (1350723755,), (1350723773,), (1350723775,), (1350723792,), (1350723798,), (1350723854,), (1350723857,), (1350723860,), (1350723863,), (1350723917,), (1350723922,), (1350723990,)) 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 22135882 , 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=22135842 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 (22135882) result : ((1350722906,), (1350723118,), (1350723906,), (1350723907,), (1350723908,), (1350723909,), (1350724024,), (1350724086,), (1350724087,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22135842) result : ((1350722199,), (1350722201,), (1350722204,), (1350722207,), (1350722423,), (1350722426,), (1350722429,), (1350722434,), (1350722491,), (1350722501,), (1350722640,), (1350722662,), (1350722743,), (1350722747,), (1350722749,), (1350722954,), (1350722956,), (1350722961,), (1350722988,), (1350723121,), (1350723123,), (1350723163,), (1350723167,), (1350723170,), (1350723215,), (1350723217,), (1350723219,), (1350723225,), (1350723305,), (1350723398,), (1350723501,), (1350723505,), (1350723507,), (1350723509,), (1350723558,), (1350723561,), (1350723565,), (1350723570,), (1350723648,), (1350723674,), (1350723686,), (1350723689,), (1350723693,), (1350723755,), (1350723773,), (1350723775,), (1350723792,), (1350723798,), (1350723854,), (1350723857,), (1350723860,), (1350723863,), (1350723917,), (1350723922,), (1350723990,)) 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 22135883 , 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=22135842 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 (22135883) result : ((1350723195,), (1350723514,), (1350723515,), (1350723910,), (1350723911,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22135842) result : ((1350722199,), (1350722201,), (1350722204,), (1350722207,), (1350722423,), (1350722426,), (1350722429,), (1350722434,), (1350722491,), (1350722501,), (1350722640,), (1350722662,), (1350722743,), (1350722747,), (1350722749,), (1350722954,), (1350722956,), (1350722961,), (1350722988,), (1350723121,), (1350723123,), (1350723163,), (1350723167,), (1350723170,), (1350723215,), (1350723217,), (1350723219,), (1350723225,), (1350723305,), (1350723398,), (1350723501,), (1350723505,), (1350723507,), (1350723509,), (1350723558,), (1350723561,), (1350723565,), (1350723570,), (1350723648,), (1350723674,), (1350723686,), (1350723689,), (1350723693,), (1350723755,), (1350723773,), (1350723775,), (1350723792,), (1350723798,), (1350723854,), (1350723857,), (1350723860,), (1350723863,), (1350723917,), (1350723922,), (1350723990,)) 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`=22135842 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('flou','metal','cartonnette','Teint_Dans_La_Masse','Carton_gris','environnement','autre_refus','kraft','papier','mal_croppe','Carton_brun','plastique')) 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`=22135842 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('flou','metal','cartonnette','Teint_Dans_La_Masse','Carton_gris','environnement','autre_refus','kraft','papier','mal_croppe','Carton_brun','plastique')) AND mptpi.`min_score`=0.5 To do returned map {'kraft': {'main_port_id': 22135842, 'sub_port_id': 22135884, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14616809, 'last_updated_at': datetime.datetime(2025, 4, 17, 14, 19, 29), 'last_updated_at_desc': datetime.datetime(2025, 4, 17, 14, 19, 29), 'last_updated_at_asc': datetime.datetime(2025, 4, 17, 14, 19, 29)}, 'plastique': {'main_port_id': 22135842, 'sub_port_id': 22135885, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14616810, 'last_updated_at': datetime.datetime(2025, 4, 17, 14, 19, 29), 'last_updated_at_desc': datetime.datetime(2025, 4, 17, 14, 19, 29), 'last_updated_at_asc': datetime.datetime(2025, 4, 17, 14, 19, 29)}, 'environnement': {'main_port_id': 22135842, 'sub_port_id': 22135886, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14616811, 'last_updated_at': datetime.datetime(2025, 4, 17, 14, 19, 29), 'last_updated_at_desc': datetime.datetime(2025, 4, 17, 14, 19, 29), 'last_updated_at_asc': datetime.datetime(2025, 4, 17, 14, 19, 29)}, 'papier': {'main_port_id': 22135842, 'sub_port_id': 22135887, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14616812, 'last_updated_at': datetime.datetime(2025, 4, 17, 14, 19, 29), 'last_updated_at_desc': datetime.datetime(2025, 4, 17, 14, 19, 29), 'last_updated_at_asc': datetime.datetime(2025, 4, 17, 14, 19, 29)}, 'metal': {'main_port_id': 22135842, 'sub_port_id': 22135888, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14616813, 'last_updated_at': datetime.datetime(2025, 4, 17, 14, 19, 29), 'last_updated_at_desc': datetime.datetime(2025, 4, 17, 14, 19, 29), 'last_updated_at_asc': datetime.datetime(2025, 4, 17, 14, 19, 29)}, 'autre_refus': {'main_port_id': 22135842, 'sub_port_id': 22135889, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14616814, 'last_updated_at': datetime.datetime(2025, 4, 17, 14, 19, 29), 'last_updated_at_desc': datetime.datetime(2025, 4, 17, 14, 19, 29), 'last_updated_at_asc': datetime.datetime(2025, 4, 17, 14, 19, 29)}, 'Carton_brun': {'main_port_id': 22135842, 'sub_port_id': 22135890, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14616815, 'last_updated_at': datetime.datetime(2025, 4, 17, 14, 19, 29), 'last_updated_at_desc': datetime.datetime(2025, 4, 17, 14, 19, 29), 'last_updated_at_asc': datetime.datetime(2025, 4, 17, 14, 19, 29)}, 'mal_croppe': {'main_port_id': 22135842, 'sub_port_id': 22135891, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14616816, 'last_updated_at': datetime.datetime(2025, 4, 17, 14, 19, 29), 'last_updated_at_desc': datetime.datetime(2025, 4, 17, 14, 19, 29), 'last_updated_at_asc': datetime.datetime(2025, 4, 17, 14, 19, 29)}, 'Carton_gris': {'main_port_id': 22135842, 'sub_port_id': 22135892, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14616817, 'last_updated_at': datetime.datetime(2025, 4, 17, 14, 19, 29), 'last_updated_at_desc': datetime.datetime(2025, 4, 17, 14, 19, 29), 'last_updated_at_asc': datetime.datetime(2025, 4, 17, 14, 19, 29)}, 'flou': {'main_port_id': 22135842, 'sub_port_id': 22135893, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14616818, 'last_updated_at': datetime.datetime(2025, 4, 17, 14, 19, 29), 'last_updated_at_desc': datetime.datetime(2025, 4, 17, 14, 19, 29), 'last_updated_at_asc': datetime.datetime(2025, 4, 17, 14, 19, 29)}, 'Teint_Dans_La_Masse': {'main_port_id': 22135842, 'sub_port_id': 22135894, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14616819, 'last_updated_at': datetime.datetime(2025, 4, 17, 14, 19, 29), 'last_updated_at_desc': datetime.datetime(2025, 4, 17, 14, 19, 29), 'last_updated_at_asc': datetime.datetime(2025, 4, 17, 14, 19, 29)}, 'cartonnette': {'main_port_id': 22135842, 'sub_port_id': 22135895, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14616820, 'last_updated_at': datetime.datetime(2025, 4, 17, 14, 31), 'last_updated_at_desc': datetime.datetime(2025, 4, 17, 14, 31), 'last_updated_at_asc': datetime.datetime(2025, 4, 17, 14, 19, 29)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22135884,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22135872 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22135885,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22135873 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22135886,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22135874 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22135887,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22135875 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22135888,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22135876 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22135889,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22135877 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22135890,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22135878 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22135891,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22135879 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22135892,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22135880 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22135893,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22135881 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22135894,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22135882 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22135895,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22135883 lien utilise dans velours : https://www.fotonower.com/velours/22135884,22135885,22135886,22135887,22135888,22135889,22135890,22135891,22135892,22135893,22135894,22135895?tags=kraft,plastique,environnement,papier,metal,autre_refus,Carton_brun,mal_croppe,Carton_gris,flou,Teint_Dans_La_Masse,cartonnette After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22135842]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1350723990] map_info['map_portfolio_photo'] : {22135842: [1350723990, 1350723922, 1350723917, 1350723863, 1350723860, 1350723857, 1350723854, 1350723798, 1350723792, 1350723775, 1350723773, 1350723755, 1350723693, 1350723689, 1350723686, 1350723674, 1350723648, 1350723570, 1350723565, 1350723561, 1350723558, 1350723509, 1350723507, 1350723505, 1350723501, 1350723398, 1350723305, 1350723225, 1350723219, 1350723217, 1350723215, 1350723170, 1350723167, 1350723163, 1350723123, 1350723121, 1350722988, 1350722961, 1350722956, 1350722954, 1350722749, 1350722747, 1350722743, 1350722662, 1350722640, 1350722501, 1350722491, 1350722434, 1350722429, 1350722426, 1350722423, 1350722207, 1350722204, 1350722201, 1350722199]} final : False mtd_id 4302 list_pids : [1350723990] Looping around the photos to save general results len do output : 1 /22135842. 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, '2730968') ('4302', '22135842', '1350723990', None, None, None, None, None, '2730968') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 2 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, '22135842', "{'kraft': 22135872, 'plastique': 22135873, 'environnement': 22135874, 'papier': 22135875, 'metal': 22135876, 'autre_refus': 22135877, 'Carton_brun': 22135878, 'mal_croppe': 22135879, 'Carton_gris': 22135880, 'flou': 22135881, 'Teint_Dans_La_Masse': 22135882, 'cartonnette': 22135883}", None, None, None, None, '2730968'), ('4302', '22135842', '1350723990', None, None, None, None, None, '2730968')] time used for this insertion : 0.011881351470947266 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.5669784545898438 time spend to save output : 0.012232303619384766 total time spend for step 1 : 1.5792107582092285 step2:final Thu Apr 17 14:33: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 (22135842) 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 22135842 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1350722207,1350722204,1350722201,1350722199,1350722434,1350722429,1350722426,1350722423,1350722501,1350722491,1350722662,1350722640,1350722749,1350722747,1350722743,1350722988,1350722961,1350722956,1350722954,1350723123,1350723121,1350723170,1350723167,1350723163,1350723398,1350723305,1350723225,1350723219,1350723217,1350723215,1350723509,1350723507,1350723505,1350723501,1350723570,1350723565,1350723561,1350723558,1350723693,1350723689,1350723686,1350723674,1350723648,1350723798,1350723792,1350723775,1350723773,1350723755,1350723863,1350723860,1350723857,1350723854,1350723922,1350723917,1350723990); 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([22135842]) Inside saveOutput : final : False verbose : True original output for save of step final : {1350723990: ('0.03390971668086789',)} new output for save of step final : {1350723990: ('0.03390971668086789',)} [1350723990] map_info['map_portfolio_photo'] : {22135842: [1350723990, 1350723922, 1350723917, 1350723863, 1350723860, 1350723857, 1350723854, 1350723798, 1350723792, 1350723775, 1350723773, 1350723755, 1350723693, 1350723689, 1350723686, 1350723674, 1350723648, 1350723570, 1350723565, 1350723561, 1350723558, 1350723509, 1350723507, 1350723505, 1350723501, 1350723398, 1350723305, 1350723225, 1350723219, 1350723217, 1350723215, 1350723170, 1350723167, 1350723163, 1350723123, 1350723121, 1350722988, 1350722961, 1350722956, 1350722954, 1350722749, 1350722747, 1350722743, 1350722662, 1350722640, 1350722501, 1350722491, 1350722434, 1350722429, 1350722426, 1350722423, 1350722207, 1350722204, 1350722201, 1350722199]} final : False mtd_id 4302 list_pids : [1350723990] Looping around the photos to save general results len do output : 1 /1350723990.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, '2730968') ('4302', '22135842', '1350723990', None, None, None, None, None, '2730968') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 3 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', '22135842', '1350723990', '0.03390971668086789', None, None, None, None, '2730968')] time used for this insertion : 0.011048078536987305 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.06948971748352051 time spend to save output : 0.0113525390625 total time spend for step 2 : 0.08084225654602051 step3:velours_tree Thu Apr 17 14:33: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 : {22135842: [{'kraft': 22135872, 'plastique': 22135873, 'environnement': 22135874, 'papier': 22135875, 'metal': 22135876, 'autre_refus': 22135877, 'Carton_brun': 22135878, 'mal_croppe': 22135879, 'Carton_gris': 22135880, 'flou': 22135881, 'Teint_Dans_La_Masse': 22135882, 'cartonnette': 22135883}]} input_args_next_step : {22135842: ()} output_args : {22135842: [{'kraft': 22135872, 'plastique': 22135873, 'environnement': 22135874, 'papier': 22135875, 'metal': 22135876, 'autre_refus': 22135877, 'Carton_brun': 22135878, 'mal_croppe': 22135879, 'Carton_gris': 22135880, 'flou': 22135881, 'Teint_Dans_La_Masse': 22135882, 'cartonnette': 22135883}]} args : 22135842 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 : ({'kraft': 22135872, 'plastique': 22135873, 'environnement': 22135874, 'papier': 22135875, 'metal': 22135876, 'autre_refus': 22135877, 'Carton_brun': 22135878, 'mal_croppe': 22135879, 'Carton_gris': 22135880, 'flou': 22135881, 'Teint_Dans_La_Masse': 22135882, 'cartonnette': 22135883},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22135842) 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([22135842]) 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.38986968994140625 time spend to save output : 5.459785461425781e-05 total time spend for step 3 : 0.3899242877960205 step4:send_mail_cod Thu Apr 17 14:33:01 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed 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 : {1350723990: ('0.03390971668086789',)} input_args_next_step : {1350723990: ()} output_args : {1350723990: ('0.03390971668086789',)} args : 1350723990 depend.output_id : 0 complete output_args for input 3 : {22135842: [{'kraft': 22135872, 'plastique': 22135873, 'environnement': 22135874, 'papier': 22135875, 'metal': 22135876, 'autre_refus': 22135877, 'Carton_brun': 22135878, 'mal_croppe': 22135879, 'Carton_gris': 22135880, 'flou': 22135881, 'Teint_Dans_La_Masse': 22135882, 'cartonnette': 22135883}]} input_args_next_step : {1350723990: ('0.03390971668086789',), 22135842: ()} output_args : {22135842: [{'kraft': 22135872, 'plastique': 22135873, 'environnement': 22135874, 'papier': 22135875, 'metal': 22135876, 'autre_refus': 22135877, 'Carton_brun': 22135878, 'mal_croppe': 22135879, 'Carton_gris': 22135880, 'flou': 22135881, 'Teint_Dans_La_Masse': 22135882, 'cartonnette': 22135883}]} args : 22135842 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 :2, first value : ('0.03390971668086789',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22135842) 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 (1350723990) Found this number of photos: 1 ##### Call download_photos : nb_thread : 5 begin to download photo : 1350723990 download finish for photo 1350723990 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 : 1 ; length of list_pids : 1 ; length of list_args : 1 results_Auto_P22135842_17-04-2025_14_33_01.pdf 22135872 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=22135872 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1350723529: '1744892712_2980098_1350723167_b4bee2136eac58b77047cb740130f489_rle_crop_3751765017_0.png'} change filename to text .imagette221358721744893181/ imagette221358721744893181/1744892712_2980098_1350723167_b4bee2136eac58b77047cb740130f489_rle_crop_3751765017_0.png.png wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/17/203b9cfdd9eb393fd5c4199bbba26bca_62507689.png imagette221358721744893181 22135873 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=22135873 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1350723120: '1744892507_692797_1350722749_d3c520ac5c40a013b3c0379051bec65c_rle_crop_3751762448_0.png', 1350723212: '1744892623_697125_1350722501_beea15da11da7f3926de4f5e5c515392_rle_crop_3751763505_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/17/432cb823fafd57f406103e7c4fc97afc_82222176.png change filename to text .imagette221358731744893181/ imagette221358731744893181/1744892623_697125_1350722501_beea15da11da7f3926de4f5e5c515392_rle_crop_3751763505_0.png.png imagette221358731744893181/1744892507_692797_1350722749_d3c520ac5c40a013b3c0379051bec65c_rle_crop_3751762448_0.png.png imagette221358761744893181/ imagette221358771744893181/ imagette221358791744893181/ imagette221358811744893181/ wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/17/043cad35b7d0689bc0cb5f94f8222605_94260597.png imagette221358731744893181 22135876 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=22135876 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette221358761744893181 22135877 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=22135877 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette221358771744893181 22135879 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=22135879 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette221358791744893181 22135881 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=22135881 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette221358811744893181 22135883 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=22135883 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1350723195: '1744892591_2978721_1350723123_b704a2e70d804f22da306513715d6b57_rle_crop_3751763429_0.png', 1350723514: '1744892701_2979936_1350723170_04e89d4713378f26f3a2cb2a0e389ab6_rle_crop_3751764992_0.png', 1350723515: '1744892701_2979936_1350723121_f075207b6c720c345e347fa21588c4bf_rle_crop_3751765003_0.png', 1350723910: '1744892951_2982135_1350723225_0094fdaae1d5d8b4869143a7da6d2424_rle_crop_3751766222_0.png', 1350723911: '1744892951_2982135_1350723219_3f1c64102aa5531eb79b102f93d7f9c2_rle_crop_3751766236_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/17/9225f9ed4ec11f2d91689c66440a99f9_99937731.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/17/48a6ce48dada63ad2bdaebd8dc56b35f_71598264.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/17/75fc1885ecc460c3691c0e5eb3d4cc07_35499152.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/17/a123d687e43f3fed454432085cdcb321_59743402.png change filename to text .imagette221358831744893181/ imagette221358831744893181/1744892701_2979936_1350723170_04e89d4713378f26f3a2cb2a0e389ab6_rle_crop_3751764992_0.png.png imagette221358831744893181/1744892951_2982135_1350723225_0094fdaae1d5d8b4869143a7da6d2424_rle_crop_3751766222_0.png.png imagette221358831744893181/1744892591_2978721_1350723123_b704a2e70d804f22da306513715d6b57_rle_crop_3751763429_0.png.png imagette221358831744893181/1744892951_2982135_1350723219_3f1c64102aa5531eb79b102f93d7f9c2_rle_crop_3751766236_0.png.png imagette221358831744893181/1744892701_2979936_1350723121_f075207b6c720c345e347fa21588c4bf_rle_crop_3751765003_0.png.png wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/17/ec1ddbe285ff99ce13ac72afa79f8ad2_19293987.png imagette221358831744893181 22135878 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=22135878 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1350722913: '1744892412_2976737_1350722434_a8d6ded678ad1b3f2daca12bc15c4bfc_rle_crop_3751761340_0.png', 1350723518: '1744892701_2979936_1350723170_04e89d4713378f26f3a2cb2a0e389ab6_rle_crop_3751764994_0.png', 1350723912: '1744892951_2982135_1350723217_d1886385e981ee4d37b796cd44f7e73a_rle_crop_3751766242_0.png', 1350723913: '1744892951_2982135_1350723215_159c26281c2a544461606dddce02bff9_rle_crop_3751766258_0.png', 1350724026: '1744893071_2983549_1350723860_3200f484651c819ccc24414875a199c4_rle_crop_3751766869_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/17/540b0b5f924fa4481703f86f3c53eaed_14857125.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/17/6181115f77c32dbdcc0ff730ee0fa6b1_52189224.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/17/ebf7d4d8820c68963c9f305777c6818f_5536286.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/17/ab27ccc79ad694939e2906604afb0848_22077300.png change filename to text .imagette221358781744893181/ imagette221358781744893181/1744892951_2982135_1350723217_d1886385e981ee4d37b796cd44f7e73a_rle_crop_3751766242_0.png.png imagette221358781744893181/1744892951_2982135_1350723215_159c26281c2a544461606dddce02bff9_rle_crop_3751766258_0.png.png imagette221358781744893181/1744892412_2976737_1350722434_a8d6ded678ad1b3f2daca12bc15c4bfc_rle_crop_3751761340_0.png.png imagette221358781744893181/1744892701_2979936_1350723170_04e89d4713378f26f3a2cb2a0e389ab6_rle_crop_3751764994_0.png.png imagette221358781744893181/1744893071_2983549_1350723860_3200f484651c819ccc24414875a199c4_rle_crop_3751766869_0.png.png wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/17/72a0c4ef40bf704dc675d0331022b407_4646994.png imagette221358781744893181 22135880 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=22135880 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1350723194: '1744892591_2978721_1350723123_b704a2e70d804f22da306513715d6b57_rle_crop_3751763432_0.png', 1350724025: '1744893071_2983549_1350723857_b5d8ee9d6a19d1322222cd8d6dfb8c67_rle_crop_3751766878_0.png', 1350724091: '1744893132_2984225_1350723773_545264155a3300657d48c7f217cb1c09_rle_crop_3751766637_0.png', 1350724093: '1744893132_2984225_1350723773_545264155a3300657d48c7f217cb1c09_rle_crop_3751766638_0.png', 1350724094: '1744893132_2984225_1350723773_545264155a3300657d48c7f217cb1c09_rle_crop_3751766640_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/17/3b0a6b75ac6a16cffd0c0b38843d0d2c_84162979.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/17/cbf024ba063fc6724d121046d6c073b9_10349607.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/17/d4e17ce2ca4192015083bdcb3b2ebbcc_69446678.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/17/c316961fcf292b810b8f9fecadd6e92a_20200421.png change filename to text .imagette221358801744893183/ imagette221358801744893183/1744893071_2983549_1350723857_b5d8ee9d6a19d1322222cd8d6dfb8c67_rle_crop_3751766878_0.png.png imagette221358801744893183/1744893132_2984225_1350723773_545264155a3300657d48c7f217cb1c09_rle_crop_3751766638_0.png.png imagette221358801744893183/1744893132_2984225_1350723773_545264155a3300657d48c7f217cb1c09_rle_crop_3751766637_0.png.png imagette221358801744893183/1744893132_2984225_1350723773_545264155a3300657d48c7f217cb1c09_rle_crop_3751766640_0.png.png imagette221358801744893183/1744892591_2978721_1350723123_b704a2e70d804f22da306513715d6b57_rle_crop_3751763432_0.png.png wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/17/05187280607b7472b73d9cbd9bf44120_6631882.png imagette221358801744893183 22135882 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=22135882 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1350722906: '1744892412_2976737_1350722199_db43ccba0fd07a353693efc7be2ad5c5_rle_crop_3751761383_0.png', 1350723118: '1744892507_692797_1350722749_d3c520ac5c40a013b3c0379051bec65c_rle_crop_3751762444_0.png', 1350723906: '1744892951_2982135_1350723305_3741c9207e634d4f37236795f4079c77_rle_crop_3751766211_0.png', 1350723907: '1744892951_2982135_1350723305_3741c9207e634d4f37236795f4079c77_rle_crop_3751766210_0.png', 1350723908: '1744892951_2982135_1350723305_3741c9207e634d4f37236795f4079c77_rle_crop_3751766212_0.png', 1350723909: '1744892951_2982135_1350723215_159c26281c2a544461606dddce02bff9_rle_crop_3751766257_0.png', 1350724024: '1744893071_2983549_1350723854_394916be97b2086eefdd790cfd98284c_rle_crop_3751766896_0.png', 1350724086: '1744893132_2984225_1350723792_f2c567d207d64b0f36c1636c2e559ea5_rle_crop_3751766441_0.png', 1350724087: '1744893132_2984225_1350723792_f2c567d207d64b0f36c1636c2e559ea5_rle_crop_3751766442_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/17/0b46e3b07aabc1b72fe7fa57e1ba1952_41150779.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/17/760f17ec3a4780b95b987ff74b0ebb4f_73006948.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/17/659b7b20a1aa972d38acd4c9fdc06a1e_5244738.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/17/2ed86770d4f6b9e1d1c82f197217dbdb_98364702.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/17/440bcbbf4eb8091e84bcf4f063be9a49_82283193.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/17/33bdb5eb83de834ce05882b001075054_37776968.png change filename to text .wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/17/496d462b6779df7452db750f1338eb1b_24322071.png change filename to text .wget -O 8.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/17/19c4a1e18d35c3ff8b3bac6c39e45750_67646719.png change filename to text .imagette221358821744893184/ imagette221358821744893184/1744892507_692797_1350722749_d3c520ac5c40a013b3c0379051bec65c_rle_crop_3751762444_0.png.png imagette221358821744893184/1744892412_2976737_1350722199_db43ccba0fd07a353693efc7be2ad5c5_rle_crop_3751761383_0.png.png imagette221358821744893184/1744892951_2982135_1350723305_3741c9207e634d4f37236795f4079c77_rle_crop_3751766211_0.png.png imagette221358821744893184/1744892951_2982135_1350723305_3741c9207e634d4f37236795f4079c77_rle_crop_3751766212_0.png.png imagette221358821744893184/1744892951_2982135_1350723215_159c26281c2a544461606dddce02bff9_rle_crop_3751766257_0.png.png imagette221358821744893184/1744893071_2983549_1350723854_394916be97b2086eefdd790cfd98284c_rle_crop_3751766896_0.png.png imagette221358821744893184/1744893132_2984225_1350723792_f2c567d207d64b0f36c1636c2e559ea5_rle_crop_3751766441_0.png.png imagette221358821744893184/1744893132_2984225_1350723792_f2c567d207d64b0f36c1636c2e559ea5_rle_crop_3751766442_0.png.png imagette221358821744893184/1744892951_2982135_1350723305_3741c9207e634d4f37236795f4079c77_rle_crop_3751766210_0.png.png wget -O 9.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/17/e5704312d4c17a1011af48cc6f2d0bb5_9147194.png imagette221358821744893184 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=22135842 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/22135884,22135885,22135886,22135887,22135888,22135889,22135890,22135891,22135892,22135893,22135894,22135895?tags=kraft,plastique,environnement,papier,metal,autre_refus,Carton_brun,mal_croppe,Carton_gris,flou,Teint_Dans_La_Masse,cartonnette your option no_mail is active, we will not send the real mail to your client args[1350723990] : ('0.03390971668086789',) no score found for photo 1350723990 We are sending mail with results at report@fotonower.com refus_total : 0.03390971668086789 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=22135842 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_P22135842_17-04-2025_14_33_01.pdf results_Auto_P22135842_17-04-2025_14_33_01.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22135842_17-04-2025_14_33_01.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','22135842','results_Auto_P22135842_17-04-2025_14_33_01.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22135842_17-04-2025_14_33_01.pdf','pdf','','0.1','0.03390971668086789') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22135842]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1350723990] map_info['map_portfolio_photo'] : {22135842: [1350723990, 1350723922, 1350723917, 1350723863, 1350723860, 1350723857, 1350723854, 1350723798, 1350723792, 1350723775, 1350723773, 1350723755, 1350723693, 1350723689, 1350723686, 1350723674, 1350723648, 1350723570, 1350723565, 1350723561, 1350723558, 1350723509, 1350723507, 1350723505, 1350723501, 1350723398, 1350723305, 1350723225, 1350723219, 1350723217, 1350723215, 1350723170, 1350723167, 1350723163, 1350723123, 1350723121, 1350722988, 1350722961, 1350722956, 1350722954, 1350722749, 1350722747, 1350722743, 1350722662, 1350722640, 1350722501, 1350722491, 1350722434, 1350722429, 1350722426, 1350722423, 1350722207, 1350722204, 1350722201, 1350722199]} final : False mtd_id 4302 list_pids : [1350723990] 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, '2730968') ('4302', '22135842', '1350723990', None, None, None, None, None, '2730968') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 1 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', '22135842', '1350723990', None, None, None, None, None, '2730968')] time used for this insertion : 0.010770797729492188 save_final save missing photos in datou_result : time spend for datou_step_exec : 4.415323257446289 time spend to save output : 0.010956287384033203 total time spend for step 4 : 4.426279544830322 step5:split_time_score Thu Apr 17 14:33:05 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 : ['22135842'] 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 : [('22135842',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22135842) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1350723990: {'path': 'temp/1744893181_689238_1350723990_ec018ae3db148d900ce7843156022f18.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 = 22135842; (('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 = 22135842 group by h (('14', 55),) 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=22135842 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 (22135842) 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 (22135842) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 17042025 22135842 Nombre de photos uploadées : 55 / 23040 (0%) 17042025 22135842 Nombre de photos taguées (types de déchets): 0 / 55 (0%) 17042025 22135842 Nombre de photos taguées (volume) : 0 / 55 (0%) [{'photo_id': 1350722207, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/17/747f8bb1f1c9fe4720b6bb40e04515b2.jpg', 'username': None, 'uploaded_at': 1744892167, 'text': 'image_17042025_14_15_14_010136m0.jpg 1e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1350722204, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/17/e23191024090b2deb6e0e0152444ad83.jpg', 'username': None, 'uploaded_at': 1744892167, 'text': 'image_17042025_14_15_23_009126m0.jpg 2e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1350722201, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/17/13f89f7ae136182d98a253d49a757729.jpg', 'username': None, 'uploaded_at': 1744892167, 'text': 'image_17042025_14_15_33_010139m0.jpg 3.0000000000000004e-05 for time 1, id_amount 3 this amount prod time diff : 1e-05'}, {'photo_id': 1350722199, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/17/db43ccba0fd07a353693efc7be2ad5c5.jpg', 'username': None, 'uploaded_at': 1744892167, 'text': 'image_17042025_14_15_43_010135m0.jpg 4e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}] 0 [] elapsed_time : load_data_split_time_score 1.430511474609375e-06 elapsed_time : order_list_meta_photo_and_scores 4.291534423828125e-06 ??????????????????????????????????????????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.0026917457580566406 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 22135842, '2025-04-17' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (1721208,979,"{}"); elapsed_time : insert_dashboard_record_day_entry 0.024543046951293945 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= 1721208 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 1721208, 'dashboard_run_id': 1730999, 'mtr_portfolio_id': 22134150, 'dashboard_result_id': 9933654, '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_P22134150_17-04-2025_13_47_02.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22134151, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22134152, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22134153, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22134154, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22134155, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22134156, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22134157, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22134158, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22134159, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22134160, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22134161, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22134162, 'pht': 3726}}"}, {'dashboat_entry_day': 1721208, 'dashboard_run_id': 1730999, 'mtr_portfolio_id': 22134502, 'dashboard_result_id': 9933655, '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_P22134502_17-04-2025_14_03_00.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22134561, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22134562, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22134563, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22134564, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22134565, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22134566, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22134567, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22134568, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22134569, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22134570, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22134571, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22134573, 'pht': 3726}}"}, {'dashboat_entry_day': 1721208, 'dashboard_run_id': 1730999, 'mtr_portfolio_id': 22135140, 'dashboard_result_id': 9933656, '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_P22135140_17-04-2025_14_18_58.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22135141, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22135142, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22135143, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22135144, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22135145, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22135146, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22135147, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22135148, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22135149, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22135150, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22135151, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22135152, 'pht': 3726}}"}, {'dashboat_entry_day': 1721208, 'dashboard_run_id': 1730999, 'mtr_portfolio_id': 22135842, 'dashboard_result_id': 9933657, '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_P22135842_17-04-2025_14_31_02.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22135872, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22135873, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22135874, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22135875, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22135876, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22135877, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22135878, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22135879, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22135880, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22135881, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22135882, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22135883, '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 = 22134150 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': 2730816, 'mtr_portfolio_id': 22134150, 'created_at': datetime.datetime(2025, 4, 17, 13, 47, 1), 'result': '0.03380996099756384', 'result_long': None, 'result_double': None}] Qualite : 0.03380996099756384 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22134150 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22134150_17-04-2025_13_47_02.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22134150 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_P22134150_17-04-2025_13_47_02.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22134151, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22134152, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22134153, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22134154, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22134155, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22134156, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22134157, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22134158, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22134159, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22134160, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22134161, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22134162, 'pht': 3726}}" where mtr_portfolio_id = 22134150 and dashboard_run_id = 1730999 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`=22134150 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9933654, 0.03380996099756384, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22134150_17-04-2025_13_47_02.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22134151, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22134152, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22134153, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22134154, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22134155, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22134156, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22134157, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22134158, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22134159, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22134160, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22134161, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22134162, '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 = 22134502 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': 2730838, 'mtr_portfolio_id': 22134502, 'created_at': datetime.datetime(2025, 4, 17, 14, 2, 59), 'result': '0.057995338370224234', 'result_long': None, 'result_double': None}] Qualite : 0.057995338370224234 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22134502 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22134502_17-04-2025_14_03_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22134502 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_P22134502_17-04-2025_14_03_00.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22134561, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22134562, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22134563, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22134564, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22134565, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22134566, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22134567, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22134568, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22134569, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22134570, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22134571, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22134573, 'pht': 3726}}" where mtr_portfolio_id = 22134502 and dashboard_run_id = 1730999 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`=22134502 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9933655, 0.057995338370224234, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22134502_17-04-2025_14_03_00.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22134561, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22134562, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22134563, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22134564, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22134565, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22134566, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22134567, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22134568, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22134569, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22134570, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22134571, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22134573, '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 = 22135140 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': 2730903, 'mtr_portfolio_id': 22135140, 'created_at': datetime.datetime(2025, 4, 17, 14, 18, 57), 'result': '0.04704927001433636', 'result_long': None, 'result_double': None}] Qualite : 0.04704927001433636 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22135140 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22135140_17-04-2025_14_18_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22135140 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_P22135140_17-04-2025_14_18_58.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22135141, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22135142, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22135143, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22135144, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22135145, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22135146, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22135147, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22135148, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22135149, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22135150, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22135151, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22135152, 'pht': 3726}}" where mtr_portfolio_id = 22135140 and dashboard_run_id = 1730999 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`=22135140 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9933656, 0.04704927001433636, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22135140_17-04-2025_14_18_58.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22135141, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22135142, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22135143, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22135144, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22135145, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22135146, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22135147, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22135148, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22135149, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22135150, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22135151, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22135152, '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 = 22135842 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': 2730968, 'mtr_portfolio_id': 22135842, 'created_at': datetime.datetime(2025, 4, 17, 14, 33), 'result': '0.03390971668086789', 'result_long': None, 'result_double': None}] Qualite : 0.03390971668086789 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22135842 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22135842_17-04-2025_14_33_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22135842 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_P22135842_17-04-2025_14_33_01.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22135872, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22135873, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22135874, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22135875, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22135876, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22135877, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22135878, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22135879, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22135880, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22135881, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22135882, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22135883, 'pht': 3726}}" where mtr_portfolio_id = 22135842 and dashboard_run_id = 1730999 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`=22135842 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9933657, 0.03390971668086789, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22135842_17-04-2025_14_33_01.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22135872, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22135873, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22135874, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22135875, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22135876, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22135877, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22135878, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22135879, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22135880, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22135881, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22135882, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22135883, '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 (22134150,22134502,22135140,22135842) result : ((1350708446,), (1350708654,), (1350708656,), (1350708657,), (1350709481,), (1350709722,), (1350709735,), (1350709772,), (1350709786,), (1350709826,), (1350709827,), (1350709829,), (1350709831,), (1350709834,), (1350709881,), (1350709909,), (1350709935,), (1350710250,), (1350710652,), (1350710707,), (1350710750,), (1350710777,), (1350710936,), (1350710963,), (1350710990,), (1350711185,), (1350711209,), (1350711236,), (1350711298,), (1350711291,), (1350711293,), (1350711296,), (1350711471,), (1350711491,), (1350711501,), (1350711507,), (1350711573,), (1350711578,), (1350711581,), (1350711584,), (1350711586,), (1350711775,), (1350711778,), (1350711782,), (1350711848,), (1350711887,), (1350711917,), (1350711961,), (1350713204,), (1350713306,), (1350713333,), (1350713361,), (1350713388,), (1350713652,), (1350713680,), (1350713705,), (1350714567,), (1350714596,), (1350715133,), (1350715136,), (1350715139,), (1350715142,), (1350715146,), (1350715324,), (1350715326,), (1350715327,), (1350715454,), (1350715482,), (1350715511,), (1350715540,), (1350715568,), (1350715602,), (1350715879,), (1350715908,), (1350715937,), (1350716143,), (1350716169,), (1350717525,), (1350717629,), (1350717691,), (1350717856,), (1350717914,), (1350717982,), (1350718062,), (1350718842,), (1350718595,), (1350718667,), (1350718727,), (1350718791,), (1350719522,), (1350719578,), (1350720173,), (1350720210,), (1350720226,), (1350720293,), (1350720325,), (1350720353,), (1350720551,), (1350720554,), (1350720558,), (1350720576,), (1350720737,), (1350720740,), (1350720887,), (1350720900,), (1350720903,), (1350720907,), (1350720977,), (1350720988,), (1350721255,), (1350721263,), (1350721320,), (1350721323,), (1350721405,), (1350721410,), (1350721437,), (1350721441,), (1350721543,), (1350721569,), (1350721587,), (1350721590,), (1350721647,), (1350721651,), (1350721793,), (1350721846,), (1350721852,), (1350721872,), (1350721884,), (1350721955,), (1350722121,), (1350722351,), (1350722199,), (1350722201,), (1350722204,), (1350722207,), (1350722423,), (1350722426,), (1350722429,), (1350722434,), (1350722491,), (1350722501,), (1350722640,), (1350722662,), (1350722743,), (1350722747,), (1350722749,), (1350722954,), (1350722956,), (1350722961,), (1350722988,), (1350723121,), (1350723123,), (1350723163,), (1350723167,), (1350723170,), (1350723215,), (1350723217,), (1350723219,), (1350723225,), (1350723305,), (1350723398,), (1350723501,), (1350723505,), (1350723507,), (1350723509,), (1350723558,), (1350723561,), (1350723565,), (1350723570,), (1350723648,), (1350723674,), (1350723686,), (1350723689,), (1350723693,), (1350723755,), (1350723773,), (1350723775,), (1350723792,), (1350723798,), (1350723854,), (1350723857,), (1350723860,), (1350723863,), (1350723917,), (1350723922,), (1350723990,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'17042025': {'nb_upload': 55, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22135842]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1350723990] map_info['map_portfolio_photo'] : {22135842: [1350723990, 1350723922, 1350723917, 1350723863, 1350723860, 1350723857, 1350723854, 1350723798, 1350723792, 1350723775, 1350723773, 1350723755, 1350723693, 1350723689, 1350723686, 1350723674, 1350723648, 1350723570, 1350723565, 1350723561, 1350723558, 1350723509, 1350723507, 1350723505, 1350723501, 1350723398, 1350723305, 1350723225, 1350723219, 1350723217, 1350723215, 1350723170, 1350723167, 1350723163, 1350723123, 1350723121, 1350722988, 1350722961, 1350722956, 1350722954, 1350722749, 1350722747, 1350722743, 1350722662, 1350722640, 1350722501, 1350722491, 1350722434, 1350722429, 1350722426, 1350722423, 1350722207, 1350722204, 1350722201, 1350722199]} final : True mtd_id 4302 list_pids : [1350723990] Looping around the photos to save general results len do output : 1 /22135842Didn'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, '2730968') ('4302', '22135842', '1350723990', None, None, None, None, None, '2730968') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 2 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, '22135842', 'None', None, None, None, None, '2730968'), ('4302', '22135842', '1350723990', None, None, None, None, None, '2730968')] time used for this insertion : 0.011955499649047852 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.37116384506225586 time spend to save output : 0.01213216781616211 total time spend for step 5 : 0.38329601287841797 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 (2730968) 1.98user 2.30system 0:11.20elapsed 38%CPU (0avgtext+0avgdata 155704maxresident)k 3256inputs+3912outputs (23major+61788minor)pagefaults 0swaps