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 : 3848263 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 (3814055) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (3814055) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27425471 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['3814055'] with mtr_portfolio_ids : ['27425471'] and first list_photo_ids : [] new path : /proc/3848263/ Name: python3 Umask: 0002 State: R (running) Tgid: 3848263 Ngid: 0 Pid: 3848263 PPid: 3848262 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 3848263 NSpid: 3848263 NSpgid: 3846985 NSsid: 3846985 VmPeak: 1106856 kB VmSize: 1106856 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 98116 kB VmRSS: 98116 kB RssAnon: 59848 kB RssFile: 38268 kB RssShmem: 0 kB VmData: 865608 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 592 kB VmSwap: 0 kB HugetlbPages: 0 kB CoreDumping: 0 THP_enabled: 1 Threads: 1 SigQ: 0/63019 SigPnd: 0000000000000000 ShdPnd: 0000000000000000 SigBlk: 0000000000000000 SigIgn: 0000000001001000 SigCgt: 0000000180000002 CapInh: 0000000000000000 CapPrm: 0000000000000000 CapEff: 0000000000000000 CapBnd: 000001ffffffffff CapAmb: 0000000000000000 NoNewPrivs: 0 Seccomp: 0 Seccomp_filters: 0 Speculation_Store_Bypass: thread vulnerable SpeculationIndirectBranch: conditional enabled Cpus_allowed: ffffffff,ffffffff,ffffffff,ffffffff Cpus_allowed_list: 0-127 Mems_allowed: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001 Mems_allowed_list: 0 voluntary_ctxt_switches: 51 nonvoluntary_ctxt_switches: 83 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '3848263', 'Ngid': '0', 'Pid': '3848263', 'PPid': '3848262', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '3848263', 'NSpid': '3848263', 'NSpgid': '3846985', 'NSsid': '3846985', 'VmPeak': '1106856 kB', 'VmSize': '1106856 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '98116 kB', 'VmRSS': '98116 kB', 'RssAnon': '59848 kB', 'RssFile': '38268 kB', 'RssShmem': '0 kB', 'VmData': '865608 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '592 kB', 'VmSwap': '0 kB', 'HugetlbPages': '0 kB', 'CoreDumping': '0', 'THP_enabled': '1', 'Threads': '1', 'SigQ': '0/63019', 'SigPnd': '0000000000000000', 'ShdPnd': '0000000000000000', 'SigBlk': '0000000000000000', 'SigIgn': '0000000001001000', 'SigCgt': '0000000180000002', 'CapInh': '0000000000000000', 'CapPrm': '0000000000000000', 'CapEff': '0000000000000000', 'CapBnd': '000001ffffffffff', 'CapAmb': '0000000000000000', 'NoNewPrivs': '0', 'Seccomp': '0', 'Seccomp_filters': '0', 'Speculation_Store_Bypass': 'thread vulnerable', 'SpeculationIndirectBranch': 'conditional enabled', 'Cpus_allowed': 'ffffffff,ffffffff,ffffffff,ffffffff', 'Cpus_allowed_list': '0-127', 'Mems_allowed': '00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001', 'Mems_allowed_list': '0', 'voluntary_ctxt_switches': '51', 'nonvoluntary_ctxt_switches': '83'} ('datou_batch_current', '3848263', '1106856', '0', '1106856', '865608', '98116', b'', 'marlene', '3814055') 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_view ph WHERE ph.photo_id IN (SELECT mtr_photo_id from MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id in (27425471) 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 (3814055 ) ) 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 (27425471) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1387298910, 'portfolio_id': 27425471}, {'photo_id': 1387298909, 'portfolio_id': 27425471}, {'photo_id': 1387298908, 'portfolio_id': 27425471}, {'photo_id': 1387298900, 'portfolio_id': 27425471}, {'photo_id': 1387298896, 'portfolio_id': 27425471}, {'photo_id': 1387298895, 'portfolio_id': 27425471}, {'photo_id': 1387298893, 'portfolio_id': 27425471}, {'photo_id': 1387298890, 'portfolio_id': 27425471}, {'photo_id': 1387298887, 'portfolio_id': 27425471}, {'photo_id': 1387298884, 'portfolio_id': 27425471}, {'photo_id': 1387298869, 'portfolio_id': 27425471}, {'photo_id': 1387298866, 'portfolio_id': 27425471}, {'photo_id': 1387298864, 'portfolio_id': 27425471}, {'photo_id': 1387298681, 'portfolio_id': 27425471}, {'photo_id': 1387298679, 'portfolio_id': 27425471}, {'photo_id': 1387298323, 'portfolio_id': 27425471}, {'photo_id': 1387298321, 'portfolio_id': 27425471}, {'photo_id': 1387298304, 'portfolio_id': 27425471}, {'photo_id': 1387298301, 'portfolio_id': 27425471}, {'photo_id': 1387298299, 'portfolio_id': 27425471}, {'photo_id': 1387298275, 'portfolio_id': 27425471}, {'photo_id': 1387298271, 'portfolio_id': 27425471}, {'photo_id': 1387298267, 'portfolio_id': 27425471}, {'photo_id': 1387298249, 'portfolio_id': 27425471}, {'photo_id': 1387298247, 'portfolio_id': 27425471}, {'photo_id': 1387298234, 'portfolio_id': 27425471}, {'photo_id': 1387298231, 'portfolio_id': 27425471}, {'photo_id': 1387298225, 'portfolio_id': 27425471}, {'photo_id': 1387298223, 'portfolio_id': 27425471}, {'photo_id': 1387298220, 'portfolio_id': 27425471}, {'photo_id': 1387298217, 'portfolio_id': 27425471}, {'photo_id': 1387298203, 'portfolio_id': 27425471}, {'photo_id': 1387298199, 'portfolio_id': 27425471}, {'photo_id': 1387298195, 'portfolio_id': 27425471}, {'photo_id': 1387298193, 'portfolio_id': 27425471}, {'photo_id': 1387298190, 'portfolio_id': 27425471}, {'photo_id': 1387297994, 'portfolio_id': 27425471}, {'photo_id': 1387297990, 'portfolio_id': 27425471}, {'photo_id': 1387297745, 'portfolio_id': 27425471}, {'photo_id': 1387297637, 'portfolio_id': 27425471}, {'photo_id': 1387297635, 'portfolio_id': 27425471}, {'photo_id': 1387297617, 'portfolio_id': 27425471}, {'photo_id': 1387297615, 'portfolio_id': 27425471}, {'photo_id': 1387297613, 'portfolio_id': 27425471}, {'photo_id': 1387297611, 'portfolio_id': 27425471}, {'photo_id': 1387297608, 'portfolio_id': 27425471}, {'photo_id': 1387297579, 'portfolio_id': 27425471}, {'photo_id': 1387297577, 'portfolio_id': 27425471}] map_portfolio_id_photo_id: {27425471: [1387298910, 1387298909, 1387298908, 1387298900, 1387298896, 1387298895, 1387298893, 1387298890, 1387298887, 1387298884, 1387298869, 1387298866, 1387298864, 1387298681, 1387298679, 1387298323, 1387298321, 1387298304, 1387298301, 1387298299, 1387298275, 1387298271, 1387298267, 1387298249, 1387298247, 1387298234, 1387298231, 1387298225, 1387298223, 1387298220, 1387298217, 1387298203, 1387298199, 1387298195, 1387298193, 1387298190, 1387297994, 1387297990, 1387297745, 1387297637, 1387297635, 1387297617, 1387297615, 1387297613, 1387297611, 1387297608, 1387297579, 1387297577]} ##### 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.05290484428405762 #### 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 Oct 2 00:42:58 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (27425471) 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 : 27425471 get user id for portfolio 27425471 get sub ptf for main ptf 27425471, type 3726 and hashtags ['metal', 'environnement', 'cartonnette', 'autre_refus', 'Carton_brun', 'flou', 'kraft', 'plastique', 'Carton_gris', 'mal_croppe', 'Teint_Dans_La_Masse', 'papier'] SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=27425471 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('metal','environnement','cartonnette','autre_refus','Carton_brun','flou','kraft','plastique','Carton_gris','mal_croppe','Teint_Dans_La_Masse','papier')) AND mptpi.`min_score`=0.5 SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=27425471 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('metal','environnement','cartonnette','autre_refus','Carton_brun','flou','kraft','plastique','Carton_gris','mal_croppe','Teint_Dans_La_Masse','papier')) AND mptpi.`min_score`=0.5 To do returned map {'plastique': {'main_port_id': 27425471, 'sub_port_id': 27425502, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18532477, 'last_updated_at': datetime.datetime(2025, 10, 2, 0, 41, 1), 'last_updated_at_desc': datetime.datetime(2025, 10, 2, 0, 41, 1), 'last_updated_at_asc': datetime.datetime(2025, 10, 2, 0, 33, 30)}, 'metal': {'main_port_id': 27425471, 'sub_port_id': 27425503, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18532478, 'last_updated_at': datetime.datetime(2025, 10, 2, 0, 41, 1), 'last_updated_at_desc': datetime.datetime(2025, 10, 2, 0, 41, 1), 'last_updated_at_asc': datetime.datetime(2025, 10, 2, 0, 33, 30)}, 'papier': {'main_port_id': 27425471, 'sub_port_id': 27425504, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18532479, 'last_updated_at': datetime.datetime(2025, 10, 2, 0, 41, 1), 'last_updated_at_desc': datetime.datetime(2025, 10, 2, 0, 41, 1), 'last_updated_at_asc': datetime.datetime(2025, 10, 2, 0, 33, 30)}, 'cartonnette': {'main_port_id': 27425471, 'sub_port_id': 27425505, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18532480, 'last_updated_at': datetime.datetime(2025, 10, 2, 0, 41, 1), 'last_updated_at_desc': datetime.datetime(2025, 10, 2, 0, 41, 1), 'last_updated_at_asc': datetime.datetime(2025, 10, 2, 0, 33, 30)}, 'environnement': {'main_port_id': 27425471, 'sub_port_id': 27425506, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18532481, 'last_updated_at': datetime.datetime(2025, 10, 2, 0, 41, 1), 'last_updated_at_desc': datetime.datetime(2025, 10, 2, 0, 41, 1), 'last_updated_at_asc': datetime.datetime(2025, 10, 2, 0, 33, 30)}, 'kraft': {'main_port_id': 27425471, 'sub_port_id': 27425507, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18532482, 'last_updated_at': datetime.datetime(2025, 10, 2, 0, 41, 1), 'last_updated_at_desc': datetime.datetime(2025, 10, 2, 0, 41, 1), 'last_updated_at_asc': datetime.datetime(2025, 10, 2, 0, 33, 30)}, 'Teint_Dans_La_Masse': {'main_port_id': 27425471, 'sub_port_id': 27425508, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18532483, 'last_updated_at': datetime.datetime(2025, 10, 2, 0, 41, 1), 'last_updated_at_desc': datetime.datetime(2025, 10, 2, 0, 41, 1), 'last_updated_at_asc': datetime.datetime(2025, 10, 2, 0, 33, 30)}, 'autre_refus': {'main_port_id': 27425471, 'sub_port_id': 27425509, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18532484, 'last_updated_at': datetime.datetime(2025, 10, 2, 0, 41, 1), 'last_updated_at_desc': datetime.datetime(2025, 10, 2, 0, 41, 1), 'last_updated_at_asc': datetime.datetime(2025, 10, 2, 0, 33, 30)}, 'Carton_gris': {'main_port_id': 27425471, 'sub_port_id': 27425510, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18532485, 'last_updated_at': datetime.datetime(2025, 10, 2, 0, 41, 1), 'last_updated_at_desc': datetime.datetime(2025, 10, 2, 0, 41, 1), 'last_updated_at_asc': datetime.datetime(2025, 10, 2, 0, 33, 30)}, 'Carton_brun': {'main_port_id': 27425471, 'sub_port_id': 27425511, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18532486, 'last_updated_at': datetime.datetime(2025, 10, 2, 0, 41, 1), 'last_updated_at_desc': datetime.datetime(2025, 10, 2, 0, 41, 1), 'last_updated_at_asc': datetime.datetime(2025, 10, 2, 0, 33, 30)}, 'mal_croppe': {'main_port_id': 27425471, 'sub_port_id': 27425512, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18532487, 'last_updated_at': datetime.datetime(2025, 10, 2, 0, 41, 1), 'last_updated_at_desc': datetime.datetime(2025, 10, 2, 0, 41, 1), 'last_updated_at_asc': datetime.datetime(2025, 10, 2, 0, 33, 30)}, 'flou': {'main_port_id': 27425471, 'sub_port_id': 27425513, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18532488, 'last_updated_at': datetime.datetime(2025, 10, 2, 0, 41, 1), 'last_updated_at_desc': datetime.datetime(2025, 10, 2, 0, 41, 1), 'last_updated_at_asc': datetime.datetime(2025, 10, 2, 0, 33, 30)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 27425502 , 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=27425471 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 (27425502) result : ((1387298291,), (1387298704,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27425471) result : ((1387297577,), (1387297579,), (1387297608,), (1387297611,), (1387297613,), (1387297615,), (1387297617,), (1387297635,), (1387297637,), (1387297745,), (1387297990,), (1387297994,), (1387298190,), (1387298193,), (1387298195,), (1387298199,), (1387298203,), (1387298217,), (1387298220,), (1387298223,), (1387298225,), (1387298231,), (1387298234,), (1387298247,), (1387298249,), (1387298267,), (1387298271,), (1387298275,), (1387298299,), (1387298301,), (1387298304,), (1387298321,), (1387298323,), (1387298679,), (1387298681,), (1387298864,), (1387298866,), (1387298869,), (1387298884,), (1387298887,), (1387298890,), (1387298893,), (1387298895,), (1387298896,), (1387298900,), (1387298908,), (1387298909,), (1387298910,)) 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 (1387298900) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 27425503 , 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=27425471 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 (27425503) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27425471) result : ((1387297577,), (1387297579,), (1387297608,), (1387297611,), (1387297613,), (1387297615,), (1387297617,), (1387297635,), (1387297637,), (1387297745,), (1387297990,), (1387297994,), (1387298190,), (1387298193,), (1387298195,), (1387298199,), (1387298203,), (1387298217,), (1387298220,), (1387298223,), (1387298225,), (1387298231,), (1387298234,), (1387298247,), (1387298249,), (1387298267,), (1387298271,), (1387298275,), (1387298299,), (1387298301,), (1387298304,), (1387298321,), (1387298323,), (1387298679,), (1387298681,), (1387298864,), (1387298866,), (1387298869,), (1387298884,), (1387298887,), (1387298890,), (1387298893,), (1387298895,), (1387298896,), (1387298900,), (1387298908,), (1387298909,), (1387298910,)) 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 (1387298900) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 27425504 , 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=27425471 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 (27425504) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27425471) result : ((1387297577,), (1387297579,), (1387297608,), (1387297611,), (1387297613,), (1387297615,), (1387297617,), (1387297635,), (1387297637,), (1387297745,), (1387297990,), (1387297994,), (1387298190,), (1387298193,), (1387298195,), (1387298199,), (1387298203,), (1387298217,), (1387298220,), (1387298223,), (1387298225,), (1387298231,), (1387298234,), (1387298247,), (1387298249,), (1387298267,), (1387298271,), (1387298275,), (1387298299,), (1387298301,), (1387298304,), (1387298321,), (1387298323,), (1387298679,), (1387298681,), (1387298864,), (1387298866,), (1387298869,), (1387298884,), (1387298887,), (1387298890,), (1387298893,), (1387298895,), (1387298896,), (1387298900,), (1387298908,), (1387298909,), (1387298910,)) 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 (1387298900) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 27425505 , 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=27425471 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 (27425505) result : ((1387298230,), (1387298284,), (1387298285,), (1387298286,), (1387298287,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27425471) result : ((1387297577,), (1387297579,), (1387297608,), (1387297611,), (1387297613,), (1387297615,), (1387297617,), (1387297635,), (1387297637,), (1387297745,), (1387297990,), (1387297994,), (1387298190,), (1387298193,), (1387298195,), (1387298199,), (1387298203,), (1387298217,), (1387298220,), (1387298223,), (1387298225,), (1387298231,), (1387298234,), (1387298247,), (1387298249,), (1387298267,), (1387298271,), (1387298275,), (1387298299,), (1387298301,), (1387298304,), (1387298321,), (1387298323,), (1387298679,), (1387298681,), (1387298864,), (1387298866,), (1387298869,), (1387298884,), (1387298887,), (1387298890,), (1387298893,), (1387298895,), (1387298896,), (1387298900,), (1387298908,), (1387298909,), (1387298910,)) 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 (1387298900) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 27425506 , 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=27425471 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 (27425506) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27425471) result : ((1387297577,), (1387297579,), (1387297608,), (1387297611,), (1387297613,), (1387297615,), (1387297617,), (1387297635,), (1387297637,), (1387297745,), (1387297990,), (1387297994,), (1387298190,), (1387298193,), (1387298195,), (1387298199,), (1387298203,), (1387298217,), (1387298220,), (1387298223,), (1387298225,), (1387298231,), (1387298234,), (1387298247,), (1387298249,), (1387298267,), (1387298271,), (1387298275,), (1387298299,), (1387298301,), (1387298304,), (1387298321,), (1387298323,), (1387298679,), (1387298681,), (1387298864,), (1387298866,), (1387298869,), (1387298884,), (1387298887,), (1387298890,), (1387298893,), (1387298895,), (1387298896,), (1387298900,), (1387298908,), (1387298909,), (1387298910,)) 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 (1387298900) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 27425507 , 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=27425471 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 (27425507) result : ((1387298232,), (1387298705,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27425471) result : ((1387297577,), (1387297579,), (1387297608,), (1387297611,), (1387297613,), (1387297615,), (1387297617,), (1387297635,), (1387297637,), (1387297745,), (1387297990,), (1387297994,), (1387298190,), (1387298193,), (1387298195,), (1387298199,), (1387298203,), (1387298217,), (1387298220,), (1387298223,), (1387298225,), (1387298231,), (1387298234,), (1387298247,), (1387298249,), (1387298267,), (1387298271,), (1387298275,), (1387298299,), (1387298301,), (1387298304,), (1387298321,), (1387298323,), (1387298679,), (1387298681,), (1387298864,), (1387298866,), (1387298869,), (1387298884,), (1387298887,), (1387298890,), (1387298893,), (1387298895,), (1387298896,), (1387298900,), (1387298908,), (1387298909,), (1387298910,)) 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 (1387298900) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 27425508 , 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=27425471 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 (27425508) result : ((1387298688,), (1387298689,), (1387298690,), (1387298691,), (1387298692,), (1387298693,), (1387298694,), (1387298695,), (1387298696,), (1387298697,), (1387298698,), (1387298699,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27425471) result : ((1387297577,), (1387297579,), (1387297608,), (1387297611,), (1387297613,), (1387297615,), (1387297617,), (1387297635,), (1387297637,), (1387297745,), (1387297990,), (1387297994,), (1387298190,), (1387298193,), (1387298195,), (1387298199,), (1387298203,), (1387298217,), (1387298220,), (1387298223,), (1387298225,), (1387298231,), (1387298234,), (1387298247,), (1387298249,), (1387298267,), (1387298271,), (1387298275,), (1387298299,), (1387298301,), (1387298304,), (1387298321,), (1387298323,), (1387298679,), (1387298681,), (1387298864,), (1387298866,), (1387298869,), (1387298884,), (1387298887,), (1387298890,), (1387298893,), (1387298895,), (1387298896,), (1387298900,), (1387298908,), (1387298909,), (1387298910,)) 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 (1387298900) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 27425509 , 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=27425471 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 (27425509) result : ((1387298227,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27425471) result : ((1387297577,), (1387297579,), (1387297608,), (1387297611,), (1387297613,), (1387297615,), (1387297617,), (1387297635,), (1387297637,), (1387297745,), (1387297990,), (1387297994,), (1387298190,), (1387298193,), (1387298195,), (1387298199,), (1387298203,), (1387298217,), (1387298220,), (1387298223,), (1387298225,), (1387298231,), (1387298234,), (1387298247,), (1387298249,), (1387298267,), (1387298271,), (1387298275,), (1387298299,), (1387298301,), (1387298304,), (1387298321,), (1387298323,), (1387298679,), (1387298681,), (1387298864,), (1387298866,), (1387298869,), (1387298884,), (1387298887,), (1387298890,), (1387298893,), (1387298895,), (1387298896,), (1387298900,), (1387298908,), (1387298909,), (1387298910,)) 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 (1387298900) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 27425510 , 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=27425471 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 (27425510) result : ((1387298228,), (1387298700,), (1387298701,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27425471) result : ((1387297577,), (1387297579,), (1387297608,), (1387297611,), (1387297613,), (1387297615,), (1387297617,), (1387297635,), (1387297637,), (1387297745,), (1387297990,), (1387297994,), (1387298190,), (1387298193,), (1387298195,), (1387298199,), (1387298203,), (1387298217,), (1387298220,), (1387298223,), (1387298225,), (1387298231,), (1387298234,), (1387298247,), (1387298249,), (1387298267,), (1387298271,), (1387298275,), (1387298299,), (1387298301,), (1387298304,), (1387298321,), (1387298323,), (1387298679,), (1387298681,), (1387298864,), (1387298866,), (1387298869,), (1387298884,), (1387298887,), (1387298890,), (1387298893,), (1387298895,), (1387298896,), (1387298900,), (1387298908,), (1387298909,), (1387298910,)) 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 (1387298900) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 27425511 , 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=27425471 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 (27425511) result : ((1387298289,), (1387298290,), (1387298702,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27425471) result : ((1387297577,), (1387297579,), (1387297608,), (1387297611,), (1387297613,), (1387297615,), (1387297617,), (1387297635,), (1387297637,), (1387297745,), (1387297990,), (1387297994,), (1387298190,), (1387298193,), (1387298195,), (1387298199,), (1387298203,), (1387298217,), (1387298220,), (1387298223,), (1387298225,), (1387298231,), (1387298234,), (1387298247,), (1387298249,), (1387298267,), (1387298271,), (1387298275,), (1387298299,), (1387298301,), (1387298304,), (1387298321,), (1387298323,), (1387298679,), (1387298681,), (1387298864,), (1387298866,), (1387298869,), (1387298884,), (1387298887,), (1387298890,), (1387298893,), (1387298895,), (1387298896,), (1387298900,), (1387298908,), (1387298909,), (1387298910,)) 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 (1387298900) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 27425512 , 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=27425471 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 (27425512) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27425471) result : ((1387297577,), (1387297579,), (1387297608,), (1387297611,), (1387297613,), (1387297615,), (1387297617,), (1387297635,), (1387297637,), (1387297745,), (1387297990,), (1387297994,), (1387298190,), (1387298193,), (1387298195,), (1387298199,), (1387298203,), (1387298217,), (1387298220,), (1387298223,), (1387298225,), (1387298231,), (1387298234,), (1387298247,), (1387298249,), (1387298267,), (1387298271,), (1387298275,), (1387298299,), (1387298301,), (1387298304,), (1387298321,), (1387298323,), (1387298679,), (1387298681,), (1387298864,), (1387298866,), (1387298869,), (1387298884,), (1387298887,), (1387298890,), (1387298893,), (1387298895,), (1387298896,), (1387298900,), (1387298908,), (1387298909,), (1387298910,)) 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 (1387298900) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 27425513 , 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=27425471 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 (27425513) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27425471) result : ((1387297577,), (1387297579,), (1387297608,), (1387297611,), (1387297613,), (1387297615,), (1387297617,), (1387297635,), (1387297637,), (1387297745,), (1387297990,), (1387297994,), (1387298190,), (1387298193,), (1387298195,), (1387298199,), (1387298203,), (1387298217,), (1387298220,), (1387298223,), (1387298225,), (1387298231,), (1387298234,), (1387298247,), (1387298249,), (1387298267,), (1387298271,), (1387298275,), (1387298299,), (1387298301,), (1387298304,), (1387298321,), (1387298323,), (1387298679,), (1387298681,), (1387298864,), (1387298866,), (1387298869,), (1387298884,), (1387298887,), (1387298890,), (1387298893,), (1387298895,), (1387298896,), (1387298900,), (1387298908,), (1387298909,), (1387298910,)) 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 (1387298900) and cspi.crop_hashtag_id = chi.id; To do ! Use context local managing function ! SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=27425471 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('metal','environnement','cartonnette','autre_refus','Carton_brun','flou','kraft','plastique','Carton_gris','mal_croppe','Teint_Dans_La_Masse','papier')) AND mptpi.`min_score`=0.5 SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=27425471 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('metal','environnement','cartonnette','autre_refus','Carton_brun','flou','kraft','plastique','Carton_gris','mal_croppe','Teint_Dans_La_Masse','papier')) AND mptpi.`min_score`=0.5 To do returned map {'plastique': {'main_port_id': 27425471, 'sub_port_id': 27425514, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18532489, 'last_updated_at': datetime.datetime(2025, 10, 2, 0, 33, 35), 'last_updated_at_desc': datetime.datetime(2025, 10, 2, 0, 33, 35), 'last_updated_at_asc': datetime.datetime(2025, 10, 2, 0, 33, 35)}, 'metal': {'main_port_id': 27425471, 'sub_port_id': 27425515, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18532490, 'last_updated_at': datetime.datetime(2025, 10, 2, 0, 33, 35), 'last_updated_at_desc': datetime.datetime(2025, 10, 2, 0, 33, 35), 'last_updated_at_asc': datetime.datetime(2025, 10, 2, 0, 33, 35)}, 'papier': {'main_port_id': 27425471, 'sub_port_id': 27425516, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18532491, 'last_updated_at': datetime.datetime(2025, 10, 2, 0, 33, 35), 'last_updated_at_desc': datetime.datetime(2025, 10, 2, 0, 33, 35), 'last_updated_at_asc': datetime.datetime(2025, 10, 2, 0, 33, 35)}, 'cartonnette': {'main_port_id': 27425471, 'sub_port_id': 27425517, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18532492, 'last_updated_at': datetime.datetime(2025, 10, 2, 0, 33, 35), 'last_updated_at_desc': datetime.datetime(2025, 10, 2, 0, 33, 35), 'last_updated_at_asc': datetime.datetime(2025, 10, 2, 0, 33, 35)}, 'environnement': {'main_port_id': 27425471, 'sub_port_id': 27425518, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18532493, 'last_updated_at': datetime.datetime(2025, 10, 2, 0, 33, 35), 'last_updated_at_desc': datetime.datetime(2025, 10, 2, 0, 33, 35), 'last_updated_at_asc': datetime.datetime(2025, 10, 2, 0, 33, 35)}, 'kraft': {'main_port_id': 27425471, 'sub_port_id': 27425519, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18532494, 'last_updated_at': datetime.datetime(2025, 10, 2, 0, 33, 35), 'last_updated_at_desc': datetime.datetime(2025, 10, 2, 0, 33, 35), 'last_updated_at_asc': datetime.datetime(2025, 10, 2, 0, 33, 35)}, 'Teint_Dans_La_Masse': {'main_port_id': 27425471, 'sub_port_id': 27425520, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18532495, 'last_updated_at': datetime.datetime(2025, 10, 2, 0, 33, 35), 'last_updated_at_desc': datetime.datetime(2025, 10, 2, 0, 33, 35), 'last_updated_at_asc': datetime.datetime(2025, 10, 2, 0, 33, 35)}, 'autre_refus': {'main_port_id': 27425471, 'sub_port_id': 27425521, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18532496, 'last_updated_at': datetime.datetime(2025, 10, 2, 0, 33, 35), 'last_updated_at_desc': datetime.datetime(2025, 10, 2, 0, 33, 35), 'last_updated_at_asc': datetime.datetime(2025, 10, 2, 0, 33, 35)}, 'Carton_gris': {'main_port_id': 27425471, 'sub_port_id': 27425522, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18532497, 'last_updated_at': datetime.datetime(2025, 10, 2, 0, 33, 35), 'last_updated_at_desc': datetime.datetime(2025, 10, 2, 0, 33, 35), 'last_updated_at_asc': datetime.datetime(2025, 10, 2, 0, 33, 35)}, 'Carton_brun': {'main_port_id': 27425471, 'sub_port_id': 27425523, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18532498, 'last_updated_at': datetime.datetime(2025, 10, 2, 0, 33, 35), 'last_updated_at_desc': datetime.datetime(2025, 10, 2, 0, 33, 35), 'last_updated_at_asc': datetime.datetime(2025, 10, 2, 0, 33, 35)}, 'mal_croppe': {'main_port_id': 27425471, 'sub_port_id': 27425524, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18532499, 'last_updated_at': datetime.datetime(2025, 10, 2, 0, 33, 35), 'last_updated_at_desc': datetime.datetime(2025, 10, 2, 0, 33, 35), 'last_updated_at_asc': datetime.datetime(2025, 10, 2, 0, 33, 35)}, 'flou': {'main_port_id': 27425471, 'sub_port_id': 27425525, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18532500, 'last_updated_at': datetime.datetime(2025, 10, 2, 0, 41, 2), 'last_updated_at_desc': datetime.datetime(2025, 10, 2, 0, 41, 2), 'last_updated_at_asc': datetime.datetime(2025, 10, 2, 0, 33, 35)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27425514,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27425502 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27425515,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27425503 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27425516,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27425504 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27425517,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27425505 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27425518,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27425506 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27425519,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27425507 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27425520,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27425508 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27425521,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27425509 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27425522,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27425510 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27425523,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27425511 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27425524,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27425512 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27425525,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27425513 lien utilise dans velours : https://marlene.fotonower.com/velours/27425514,27425515,27425516,27425517,27425518,27425519,27425520,27425521,27425522,27425523,27425524,27425525?tags=plastique,metal,papier,cartonnette,environnement,kraft,Teint_Dans_La_Masse,autre_refus,Carton_gris,Carton_brun,mal_croppe,flou After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([27425471]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1387298910, 1387298909, 1387298908, 1387298900, 1387298896, 1387298895, 1387298893, 1387298890, 1387298887, 1387298884] map_info['map_portfolio_photo'] : {27425471: [1387298910, 1387298909, 1387298908, 1387298900, 1387298896, 1387298895, 1387298893, 1387298890, 1387298887, 1387298884, 1387298869, 1387298866, 1387298864, 1387298681, 1387298679, 1387298323, 1387298321, 1387298304, 1387298301, 1387298299, 1387298275, 1387298271, 1387298267, 1387298249, 1387298247, 1387298234, 1387298231, 1387298225, 1387298223, 1387298220, 1387298217, 1387298203, 1387298199, 1387298195, 1387298193, 1387298190, 1387297994, 1387297990, 1387297745, 1387297637, 1387297635, 1387297617, 1387297615, 1387297613, 1387297611, 1387297608, 1387297579, 1387297577]} final : False mtd_id 4302 list_pids : [1387298910, 1387298909, 1387298908, 1387298900, 1387298896, 1387298895, 1387298893, 1387298890, 1387298887, 1387298884] Looping around the photos to save general results len do output : 1 /27425471. 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, '3814055') ('4302', '27425471', '1387298910', None, None, None, None, None, '3814055') ('4302', None, None, None, None, None, None, None, '3814055') ('4302', '27425471', '1387298909', None, None, None, None, None, '3814055') ('4302', None, None, None, None, None, None, None, '3814055') ('4302', '27425471', '1387298908', None, None, None, None, None, '3814055') ('4302', None, None, None, None, None, None, None, '3814055') ('4302', '27425471', '1387298900', None, None, None, None, None, '3814055') ('4302', None, None, None, None, None, None, None, '3814055') ('4302', '27425471', '1387298896', None, None, None, None, None, '3814055') ('4302', None, None, None, None, None, None, None, '3814055') ('4302', '27425471', '1387298895', None, None, None, None, None, '3814055') ('4302', None, None, None, None, None, None, None, '3814055') ('4302', '27425471', '1387298893', None, None, None, None, None, '3814055') ('4302', None, None, None, None, None, None, None, '3814055') ('4302', '27425471', '1387298890', None, None, None, None, None, '3814055') ('4302', None, None, None, None, None, None, None, '3814055') ('4302', '27425471', '1387298887', None, None, None, None, None, '3814055') ('4302', None, None, None, None, None, None, None, '3814055') ('4302', '27425471', '1387298884', None, None, None, None, None, '3814055') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 11 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, '27425471', "{'plastique': 27425502, 'metal': 27425503, 'papier': 27425504, 'cartonnette': 27425505, 'environnement': 27425506, 'kraft': 27425507, 'Teint_Dans_La_Masse': 27425508, 'autre_refus': 27425509, 'Carton_gris': 27425510, 'Carton_brun': 27425511, 'mal_croppe': 27425512, 'flou': 27425513}", None, None, None, None, '3814055'), ('4302', '27425471', '1387298910', None, None, None, None, None, '3814055'), ('4302', '27425471', '1387298909', None, None, None, None, None, '3814055'), ('4302', '27425471', '1387298908', None, None, None, None, None, '3814055'), ('4302', '27425471', '1387298900', None, None, None, None, None, '3814055'), ('4302', '27425471', '1387298896', None, None, None, None, None, '3814055'), ('4302', '27425471', '1387298895', None, None, None, None, None, '3814055'), ('4302', '27425471', '1387298893', None, None, None, None, None, '3814055'), ('4302', '27425471', '1387298890', None, None, None, None, None, '3814055'), ('4302', '27425471', '1387298887', None, None, None, None, None, '3814055'), ('4302', '27425471', '1387298884', None, None, None, None, None, '3814055')] time used for this insertion : 0.036808013916015625 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.6469395160675049 time spend to save output : 0.03710579872131348 total time spend for step 1 : 1.6840453147888184 step2:final Thu Oct 2 00:43:00 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :0, first value : [] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (27425471) 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 27425471 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1387297579,1387297577,1387297617,1387297615,1387297613,1387297611,1387297608,1387297994,1387297990,1387297745,1387297637,1387297635,1387298203,1387298199,1387298195,1387298193,1387298190,1387298234,1387298231,1387298225,1387298223,1387298220,1387298217,1387298249,1387298247,1387298275,1387298271,1387298267,1387298304,1387298301,1387298299,1387298681,1387298679,1387298323,1387298321,1387298900,1387298869,1387298866,1387298896,1387298895,1387298864,1387298893,1387298890,1387298887,1387298884,1387298910,1387298909,1387298908); 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([27425471]) Inside saveOutput : final : False verbose : True original output for save of step final : {1387298910: ('0.03730256948196789',), 1387298909: ('0.03730256948196789',), 1387298908: ('0.03730256948196789',), 1387298900: ('0.03730256948196789',), 1387298896: ('0.03730256948196789',), 1387298895: ('0.03730256948196789',), 1387298893: ('0.03730256948196789',), 1387298890: ('0.03730256948196789',), 1387298887: ('0.03730256948196789',), 1387298884: ('0.03730256948196789',)} new output for save of step final : {1387298910: ('0.03730256948196789',), 1387298909: ('0.03730256948196789',), 1387298908: ('0.03730256948196789',), 1387298900: ('0.03730256948196789',), 1387298896: ('0.03730256948196789',), 1387298895: ('0.03730256948196789',), 1387298893: ('0.03730256948196789',), 1387298890: ('0.03730256948196789',), 1387298887: ('0.03730256948196789',), 1387298884: ('0.03730256948196789',)} [1387298910, 1387298909, 1387298908, 1387298900, 1387298896, 1387298895, 1387298893, 1387298890, 1387298887, 1387298884] map_info['map_portfolio_photo'] : {27425471: [1387298910, 1387298909, 1387298908, 1387298900, 1387298896, 1387298895, 1387298893, 1387298890, 1387298887, 1387298884, 1387298869, 1387298866, 1387298864, 1387298681, 1387298679, 1387298323, 1387298321, 1387298304, 1387298301, 1387298299, 1387298275, 1387298271, 1387298267, 1387298249, 1387298247, 1387298234, 1387298231, 1387298225, 1387298223, 1387298220, 1387298217, 1387298203, 1387298199, 1387298195, 1387298193, 1387298190, 1387297994, 1387297990, 1387297745, 1387297637, 1387297635, 1387297617, 1387297615, 1387297613, 1387297611, 1387297608, 1387297579, 1387297577]} final : False mtd_id 4302 list_pids : [1387298910, 1387298909, 1387298908, 1387298900, 1387298896, 1387298895, 1387298893, 1387298890, 1387298887, 1387298884] Looping around the photos to save general results len do output : 10 /1387298910.Didn't retrieve data . /1387298909.Didn't retrieve data . /1387298908.Didn't retrieve data . /1387298900.Didn't retrieve data . /1387298896.Didn't retrieve data . /1387298895.Didn't retrieve data . /1387298893.Didn't retrieve data . /1387298890.Didn't retrieve data . /1387298887.Didn't retrieve data . /1387298884.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, '3814055') ('4302', '27425471', '1387298910', None, None, None, None, None, '3814055') ('4302', None, None, None, None, None, None, None, '3814055') ('4302', '27425471', '1387298909', None, None, None, None, None, '3814055') ('4302', None, None, None, None, None, None, None, '3814055') ('4302', '27425471', '1387298908', None, None, None, None, None, '3814055') ('4302', None, None, None, None, None, None, None, '3814055') ('4302', '27425471', '1387298900', None, None, None, None, None, '3814055') ('4302', None, None, None, None, None, None, None, '3814055') ('4302', '27425471', '1387298896', None, None, None, None, None, '3814055') ('4302', None, None, None, None, None, None, None, '3814055') ('4302', '27425471', '1387298895', None, None, None, None, None, '3814055') ('4302', None, None, None, None, None, None, None, '3814055') ('4302', '27425471', '1387298893', None, None, None, None, None, '3814055') ('4302', None, None, None, None, None, None, None, '3814055') ('4302', '27425471', '1387298890', None, None, None, None, None, '3814055') ('4302', None, None, None, None, None, None, None, '3814055') ('4302', '27425471', '1387298887', None, None, None, None, None, '3814055') ('4302', None, None, None, None, None, None, None, '3814055') ('4302', '27425471', '1387298884', None, None, None, None, None, '3814055') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 30 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', '27425471', '1387298910', '0.03730256948196789', None, None, None, None, '3814055'), ('4302', '27425471', '1387298909', '0.03730256948196789', None, None, None, None, '3814055'), ('4302', '27425471', '1387298908', '0.03730256948196789', None, None, None, None, '3814055'), ('4302', '27425471', '1387298900', '0.03730256948196789', None, None, None, None, '3814055'), ('4302', '27425471', '1387298896', '0.03730256948196789', None, None, None, None, '3814055'), ('4302', '27425471', '1387298895', '0.03730256948196789', None, None, None, None, '3814055'), ('4302', '27425471', '1387298893', '0.03730256948196789', None, None, None, None, '3814055'), ('4302', '27425471', '1387298890', '0.03730256948196789', None, None, None, None, '3814055'), ('4302', '27425471', '1387298887', '0.03730256948196789', None, None, None, None, '3814055'), ('4302', '27425471', '1387298884', '0.03730256948196789', None, None, None, None, '3814055')] time used for this insertion : 0.036550045013427734 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.2485353946685791 time spend to save output : 0.037068843841552734 total time spend for step 2 : 0.28560423851013184 step3:velours_tree Thu Oct 2 00:43:00 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : {27425471: [{'plastique': 27425502, 'metal': 27425503, 'papier': 27425504, 'cartonnette': 27425505, 'environnement': 27425506, 'kraft': 27425507, 'Teint_Dans_La_Masse': 27425508, 'autre_refus': 27425509, 'Carton_gris': 27425510, 'Carton_brun': 27425511, 'mal_croppe': 27425512, 'flou': 27425513}]} input_args_next_step : {27425471: ()} output_args : {27425471: [{'plastique': 27425502, 'metal': 27425503, 'papier': 27425504, 'cartonnette': 27425505, 'environnement': 27425506, 'kraft': 27425507, 'Teint_Dans_La_Masse': 27425508, 'autre_refus': 27425509, 'Carton_gris': 27425510, 'Carton_brun': 27425511, 'mal_croppe': 27425512, 'flou': 27425513}]} args : 27425471 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 : ({'plastique': 27425502, 'metal': 27425503, 'papier': 27425504, 'cartonnette': 27425505, 'environnement': 27425506, 'kraft': 27425507, 'Teint_Dans_La_Masse': 27425508, 'autre_refus': 27425509, 'Carton_gris': 27425510, 'Carton_brun': 27425511, 'mal_croppe': 27425512, 'flou': 27425513},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (27425471) 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([27425471]) 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.285125732421875 time spend to save output : 5.14984130859375e-05 total time spend for step 3 : 0.28517723083496094 step4:send_mail_cod Thu Oct 2 00:43:00 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! complete output_args for input 2 : {1387298910: ('0.03730256948196789',), 1387298909: ('0.03730256948196789',), 1387298908: ('0.03730256948196789',), 1387298900: ('0.03730256948196789',), 1387298896: ('0.03730256948196789',), 1387298895: ('0.03730256948196789',), 1387298893: ('0.03730256948196789',), 1387298890: ('0.03730256948196789',), 1387298887: ('0.03730256948196789',), 1387298884: ('0.03730256948196789',)} input_args_next_step : {1387298910: ()} output_args : {1387298910: ('0.03730256948196789',), 1387298909: ('0.03730256948196789',), 1387298908: ('0.03730256948196789',), 1387298900: ('0.03730256948196789',), 1387298896: ('0.03730256948196789',), 1387298895: ('0.03730256948196789',), 1387298893: ('0.03730256948196789',), 1387298890: ('0.03730256948196789',), 1387298887: ('0.03730256948196789',), 1387298884: ('0.03730256948196789',)} args : 1387298910 depend.output_id : 0 input_args_next_step : {1387298910: ('0.03730256948196789',), 1387298909: ()} output_args : {1387298910: ('0.03730256948196789',), 1387298909: ('0.03730256948196789',), 1387298908: ('0.03730256948196789',), 1387298900: ('0.03730256948196789',), 1387298896: ('0.03730256948196789',), 1387298895: ('0.03730256948196789',), 1387298893: ('0.03730256948196789',), 1387298890: ('0.03730256948196789',), 1387298887: ('0.03730256948196789',), 1387298884: ('0.03730256948196789',)} args : 1387298909 depend.output_id : 0 input_args_next_step : {1387298910: ('0.03730256948196789',), 1387298909: ('0.03730256948196789',), 1387298908: ()} output_args : {1387298910: ('0.03730256948196789',), 1387298909: ('0.03730256948196789',), 1387298908: ('0.03730256948196789',), 1387298900: ('0.03730256948196789',), 1387298896: ('0.03730256948196789',), 1387298895: ('0.03730256948196789',), 1387298893: ('0.03730256948196789',), 1387298890: ('0.03730256948196789',), 1387298887: ('0.03730256948196789',), 1387298884: ('0.03730256948196789',)} args : 1387298908 depend.output_id : 0 input_args_next_step : {1387298910: ('0.03730256948196789',), 1387298909: ('0.03730256948196789',), 1387298908: ('0.03730256948196789',), 1387298900: ()} output_args : {1387298910: ('0.03730256948196789',), 1387298909: ('0.03730256948196789',), 1387298908: ('0.03730256948196789',), 1387298900: ('0.03730256948196789',), 1387298896: ('0.03730256948196789',), 1387298895: ('0.03730256948196789',), 1387298893: ('0.03730256948196789',), 1387298890: ('0.03730256948196789',), 1387298887: ('0.03730256948196789',), 1387298884: ('0.03730256948196789',)} args : 1387298900 depend.output_id : 0 input_args_next_step : {1387298910: ('0.03730256948196789',), 1387298909: ('0.03730256948196789',), 1387298908: ('0.03730256948196789',), 1387298900: ('0.03730256948196789',), 1387298896: ()} output_args : {1387298910: ('0.03730256948196789',), 1387298909: ('0.03730256948196789',), 1387298908: ('0.03730256948196789',), 1387298900: ('0.03730256948196789',), 1387298896: ('0.03730256948196789',), 1387298895: ('0.03730256948196789',), 1387298893: ('0.03730256948196789',), 1387298890: ('0.03730256948196789',), 1387298887: ('0.03730256948196789',), 1387298884: ('0.03730256948196789',)} args : 1387298896 depend.output_id : 0 input_args_next_step : {1387298910: ('0.03730256948196789',), 1387298909: ('0.03730256948196789',), 1387298908: ('0.03730256948196789',), 1387298900: ('0.03730256948196789',), 1387298896: ('0.03730256948196789',), 1387298895: ()} output_args : {1387298910: ('0.03730256948196789',), 1387298909: ('0.03730256948196789',), 1387298908: ('0.03730256948196789',), 1387298900: ('0.03730256948196789',), 1387298896: ('0.03730256948196789',), 1387298895: ('0.03730256948196789',), 1387298893: ('0.03730256948196789',), 1387298890: ('0.03730256948196789',), 1387298887: ('0.03730256948196789',), 1387298884: ('0.03730256948196789',)} args : 1387298895 depend.output_id : 0 input_args_next_step : {1387298910: ('0.03730256948196789',), 1387298909: ('0.03730256948196789',), 1387298908: ('0.03730256948196789',), 1387298900: ('0.03730256948196789',), 1387298896: ('0.03730256948196789',), 1387298895: ('0.03730256948196789',), 1387298893: ()} output_args : {1387298910: ('0.03730256948196789',), 1387298909: ('0.03730256948196789',), 1387298908: ('0.03730256948196789',), 1387298900: ('0.03730256948196789',), 1387298896: ('0.03730256948196789',), 1387298895: ('0.03730256948196789',), 1387298893: ('0.03730256948196789',), 1387298890: ('0.03730256948196789',), 1387298887: ('0.03730256948196789',), 1387298884: ('0.03730256948196789',)} args : 1387298893 depend.output_id : 0 input_args_next_step : {1387298910: ('0.03730256948196789',), 1387298909: ('0.03730256948196789',), 1387298908: ('0.03730256948196789',), 1387298900: ('0.03730256948196789',), 1387298896: ('0.03730256948196789',), 1387298895: ('0.03730256948196789',), 1387298893: ('0.03730256948196789',), 1387298890: ()} output_args : {1387298910: ('0.03730256948196789',), 1387298909: ('0.03730256948196789',), 1387298908: ('0.03730256948196789',), 1387298900: ('0.03730256948196789',), 1387298896: ('0.03730256948196789',), 1387298895: ('0.03730256948196789',), 1387298893: ('0.03730256948196789',), 1387298890: ('0.03730256948196789',), 1387298887: ('0.03730256948196789',), 1387298884: ('0.03730256948196789',)} args : 1387298890 depend.output_id : 0 input_args_next_step : {1387298910: ('0.03730256948196789',), 1387298909: ('0.03730256948196789',), 1387298908: ('0.03730256948196789',), 1387298900: ('0.03730256948196789',), 1387298896: ('0.03730256948196789',), 1387298895: ('0.03730256948196789',), 1387298893: ('0.03730256948196789',), 1387298890: ('0.03730256948196789',), 1387298887: ()} output_args : {1387298910: ('0.03730256948196789',), 1387298909: ('0.03730256948196789',), 1387298908: ('0.03730256948196789',), 1387298900: ('0.03730256948196789',), 1387298896: ('0.03730256948196789',), 1387298895: ('0.03730256948196789',), 1387298893: ('0.03730256948196789',), 1387298890: ('0.03730256948196789',), 1387298887: ('0.03730256948196789',), 1387298884: ('0.03730256948196789',)} args : 1387298887 depend.output_id : 0 input_args_next_step : {1387298910: ('0.03730256948196789',), 1387298909: ('0.03730256948196789',), 1387298908: ('0.03730256948196789',), 1387298900: ('0.03730256948196789',), 1387298896: ('0.03730256948196789',), 1387298895: ('0.03730256948196789',), 1387298893: ('0.03730256948196789',), 1387298890: ('0.03730256948196789',), 1387298887: ('0.03730256948196789',), 1387298884: ()} output_args : {1387298910: ('0.03730256948196789',), 1387298909: ('0.03730256948196789',), 1387298908: ('0.03730256948196789',), 1387298900: ('0.03730256948196789',), 1387298896: ('0.03730256948196789',), 1387298895: ('0.03730256948196789',), 1387298893: ('0.03730256948196789',), 1387298890: ('0.03730256948196789',), 1387298887: ('0.03730256948196789',), 1387298884: ('0.03730256948196789',)} args : 1387298884 depend.output_id : 0 Inconsistent number of input and output, step which parrallelize and manage error in input by avoiding sending an output for this data can't be used in tree dependencies of input and output complete output_args for input 3 : {27425471: [{'plastique': 27425502, 'metal': 27425503, 'papier': 27425504, 'cartonnette': 27425505, 'environnement': 27425506, 'kraft': 27425507, 'Teint_Dans_La_Masse': 27425508, 'autre_refus': 27425509, 'Carton_gris': 27425510, 'Carton_brun': 27425511, 'mal_croppe': 27425512, 'flou': 27425513}]} input_args_next_step : {1387298910: ('0.03730256948196789',), 1387298909: ('0.03730256948196789',), 1387298908: ('0.03730256948196789',), 1387298900: ('0.03730256948196789',), 1387298896: ('0.03730256948196789',), 1387298895: ('0.03730256948196789',), 1387298893: ('0.03730256948196789',), 1387298890: ('0.03730256948196789',), 1387298887: ('0.03730256948196789',), 1387298884: ('0.03730256948196789',), 27425471: ()} output_args : {27425471: [{'plastique': 27425502, 'metal': 27425503, 'papier': 27425504, 'cartonnette': 27425505, 'environnement': 27425506, 'kraft': 27425507, 'Teint_Dans_La_Masse': 27425508, 'autre_refus': 27425509, 'Carton_gris': 27425510, 'Carton_brun': 27425511, 'mal_croppe': 27425512, 'flou': 27425513}]} args : 27425471 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 :11, first value : ('0.03730256948196789',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (27425471) 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_view ph WHERE photo_id IN (1387298910,1387298909,1387298908,1387298900,1387298896,1387298895,1387298893,1387298890,1387298887,1387298884) Found this number of photos: 10 ##### Call download_photos : nb_thread : 5 begin to download photo : 1387298884 begin to download photo : 1387298893 begin to download photo : 1387298900 begin to download photo : 1387298910 download finish for photo 1387298910 download finish for photo 1387298893 begin to download photo : 1387298895 download finish for photo 1387298884 begin to download photo : 1387298887 download finish for photo 1387298900 begin to download photo : 1387298908 download finish for photo 1387298887 begin to download photo : 1387298890 download finish for photo 1387298895 begin to download photo : 1387298896 download finish for photo 1387298908 begin to download photo : 1387298909 download finish for photo 1387298896 download finish for photo 1387298890 download finish for photo 1387298909 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 : 10 ; length of list_pids : 10 ; length of list_args : 10 results_Auto_P27425471_02-10-2025_00_43_01.pdf 27425502 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=27425502 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1387298291: '1759358225_3517255_1387297637_adddeb7668c9fcfd0f2a9348845b45f6_rle_crop_3983330922_0.png', 1387298704: '1759358346_3520833_1387298231_3e6fff03cabfb06b018afa1960c43e2d_rle_crop_3983331101_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/2/1d86edd567667226c74088ea293b743f_6914965.png change filename to text .imagette274255021759358581/ imagette274255021759358581/1759358346_3520833_1387298231_3e6fff03cabfb06b018afa1960c43e2d_rle_crop_3983331101_0.png.png imagette274255021759358581/1759358225_3517255_1387297637_adddeb7668c9fcfd0f2a9348845b45f6_rle_crop_3983330922_0.png.png imagette274255031759358581/ wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/2/02b26bb1e721a03da0a22aacd241dae7_88602675.png imagette274255021759358581 27425503 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=27425503 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette274255031759358581 27425505 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=27425505 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1387298230: '1759358105_3513385_1387297579_96d3c787b83188d6ef6106db409afab8_rle_crop_3983327412_0.png', 1387298284: '1759358225_3517255_1387297990_987a440f77b9a775271907d737628e17_rle_crop_3983330897_0.png', 1387298285: '1759358225_3517255_1387297745_3ff560f5a1e9c5a828fb2e3c5dd018dd_rle_crop_3983330911_0.png', 1387298286: '1759358225_3517255_1387297637_adddeb7668c9fcfd0f2a9348845b45f6_rle_crop_3983330920_0.png', 1387298287: '1759358225_3517255_1387297635_2484bdb1109d733ea7d271364a5a8ad9_rle_crop_3983330935_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/2/955c6b3b26ff12b5821b25cc62fd9dce_85171849.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/2/0829b2b336f71f4452de2606a370288c_89172547.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/2/292674448c3b4e7f1c93f8137c7f8f4c_2002537.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/2/379472c16901d2a1265acfe4d98984aa_3714676.png change filename to text .imagette274255051759358581/ imagette274255051759358581/1759358225_3517255_1387297745_3ff560f5a1e9c5a828fb2e3c5dd018dd_rle_crop_3983330911_0.png.png imagette274255051759358581/1759358225_3517255_1387297635_2484bdb1109d733ea7d271364a5a8ad9_rle_crop_3983330935_0.png.png imagette274255051759358581/1759358225_3517255_1387297637_adddeb7668c9fcfd0f2a9348845b45f6_rle_crop_3983330920_0.png.png imagette274255051759358581/1759358105_3513385_1387297579_96d3c787b83188d6ef6106db409afab8_rle_crop_3983327412_0.png.png imagette274255051759358581/1759358225_3517255_1387297990_987a440f77b9a775271907d737628e17_rle_crop_3983330897_0.png.png wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/2/7703db33051f8f5b84929e3a5fae6ed6_39488730.png imagette274255051759358581 27425507 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=27425507 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1387298232: '1759358105_3513385_1387297579_96d3c787b83188d6ef6106db409afab8_rle_crop_3983327413_0.png', 1387298705: '1759358346_3520833_1387298217_cf8a4a44eacc208afd71912ddfd656ba_rle_crop_3983331145_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/2/a71a5d81d9f11e3427eef801477a5fa3_59055568.png change filename to text .imagette274255071759358582/ imagette274255071759358582/1759358105_3513385_1387297579_96d3c787b83188d6ef6106db409afab8_rle_crop_3983327413_0.png.png imagette274255071759358582/1759358346_3520833_1387298217_cf8a4a44eacc208afd71912ddfd656ba_rle_crop_3983331145_0.png.png wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/2/27a8100d037ed4fbe492daff477e5d2d_19088003.png imagette274255071759358582 27425509 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=27425509 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1387298227: '1759358105_3513385_1387297579_96d3c787b83188d6ef6106db409afab8_rle_crop_3983327415_0.png'} change filename to text .imagette274255091759358582/ imagette274255091759358582/1759358105_3513385_1387297579_96d3c787b83188d6ef6106db409afab8_rle_crop_3983327415_0.png.png imagette274255121759358582/ imagette274255131759358582/ wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/2/d6af82566bb9b827f2d033c69cfbf44a_92763390.png imagette274255091759358582 27425512 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=27425512 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette274255121759358582 27425513 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=27425513 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette274255131759358582 27425508 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=27425508 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1387298688: '1759358346_3520833_1387298249_aef2efdbbea4fb66184022e5328df20b_rle_crop_3983331088_0.png', 1387298689: '1759358346_3520833_1387298231_3e6fff03cabfb06b018afa1960c43e2d_rle_crop_3983331109_0.png', 1387298690: '1759358346_3520833_1387298231_3e6fff03cabfb06b018afa1960c43e2d_rle_crop_3983331110_0.png', 1387298691: '1759358346_3520833_1387298231_3e6fff03cabfb06b018afa1960c43e2d_rle_crop_3983331108_0.png', 1387298692: '1759358346_3520833_1387298231_3e6fff03cabfb06b018afa1960c43e2d_rle_crop_3983331103_0.png', 1387298693: '1759358346_3520833_1387298225_458ec0642fbf6fde55e3f9f5dd098abd_rle_crop_3983331120_0.png', 1387298694: '1759358346_3520833_1387298225_458ec0642fbf6fde55e3f9f5dd098abd_rle_crop_3983331118_0.png', 1387298695: '1759358346_3520833_1387298225_458ec0642fbf6fde55e3f9f5dd098abd_rle_crop_3983331116_0.png', 1387298696: '1759358346_3520833_1387298223_15ec771afd0f22891c92742497ebfc40_rle_crop_3983331129_0.png', 1387298697: '1759358346_3520833_1387298223_15ec771afd0f22891c92742497ebfc40_rle_crop_3983331128_0.png', 1387298698: '1759358346_3520833_1387298220_9a2df21507912411f9b45b2d07f6f487_rle_crop_3983331138_0.png', 1387298699: '1759358346_3520833_1387298217_cf8a4a44eacc208afd71912ddfd656ba_rle_crop_3983331149_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/2/1a1811cd9ccef2c65a3da4a3600c5b73_2890203.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/2/49c165f52830bbfd723efa711a5f5c7e_42775056.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/2/9c7ae60da4a98ff131877119a0dccb46_72766721.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/2/d5759f7b0d9d7bda6d3654fd31131795_16528929.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/2/c34143dad1d003a5c212caaf9a22a832_48979703.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/2/3c753738df77dcf8050cd47a89d70626_79318256.png change filename to text .wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/2/d26846c8df0d1d4ede106b5fd46d92e2_16401542.png change filename to text .wget -O 8.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/2/e11a55710f54e60cad94aae418ccb073_27415322.png change filename to text .wget -O 9.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/2/20149d380682087a167e58c4230ebb26_83840521.png change filename to text .wget -O 10.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/2/594bbe68c9d5f5270f53b3918b7ee735_36269968.png change filename to text .wget -O 11.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/2/6ed61a4c92d81f86de59fa8d0f205093_60259465.png change filename to text .imagette274255081759358582/ imagette274255081759358582/1759358346_3520833_1387298225_458ec0642fbf6fde55e3f9f5dd098abd_rle_crop_3983331120_0.png.png imagette274255081759358582/1759358346_3520833_1387298231_3e6fff03cabfb06b018afa1960c43e2d_rle_crop_3983331110_0.png.png imagette274255081759358582/1759358346_3520833_1387298231_3e6fff03cabfb06b018afa1960c43e2d_rle_crop_3983331108_0.png.png imagette274255081759358582/1759358346_3520833_1387298223_15ec771afd0f22891c92742497ebfc40_rle_crop_3983331128_0.png.png imagette274255081759358582/1759358346_3520833_1387298225_458ec0642fbf6fde55e3f9f5dd098abd_rle_crop_3983331118_0.png.png imagette274255081759358582/1759358346_3520833_1387298217_cf8a4a44eacc208afd71912ddfd656ba_rle_crop_3983331149_0.png.png imagette274255081759358582/1759358346_3520833_1387298220_9a2df21507912411f9b45b2d07f6f487_rle_crop_3983331138_0.png.png imagette274255081759358582/1759358346_3520833_1387298231_3e6fff03cabfb06b018afa1960c43e2d_rle_crop_3983331109_0.png.png imagette274255081759358582/1759358346_3520833_1387298249_aef2efdbbea4fb66184022e5328df20b_rle_crop_3983331088_0.png.png imagette274255081759358582/1759358346_3520833_1387298231_3e6fff03cabfb06b018afa1960c43e2d_rle_crop_3983331103_0.png.png imagette274255081759358582/1759358346_3520833_1387298225_458ec0642fbf6fde55e3f9f5dd098abd_rle_crop_3983331116_0.png.png imagette274255081759358582/1759358346_3520833_1387298223_15ec771afd0f22891c92742497ebfc40_rle_crop_3983331129_0.png.png wget -O 12.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/2/5e1353017e74fd962133cca4fe40304f_47661256.png imagette274255081759358582 27425510 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=27425510 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1387298228: '1759358105_3513385_1387297577_1e7c177aafbafebeae87c3c114f1432d_rle_crop_3983327419_0.png', 1387298700: '1759358346_3520833_1387298220_9a2df21507912411f9b45b2d07f6f487_rle_crop_3983331134_0.png', 1387298701: '1759358346_3520833_1387298217_cf8a4a44eacc208afd71912ddfd656ba_rle_crop_3983331147_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/2/01e79b61cd93b087e9d554ac2e59033d_25457183.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/2/494f1b260c5fd0229239a24c5b9274ae_95601910.png change filename to text .imagette274255101759358583/ imagette274255101759358583/1759358346_3520833_1387298217_cf8a4a44eacc208afd71912ddfd656ba_rle_crop_3983331147_0.png.png imagette274255101759358583/1759358346_3520833_1387298220_9a2df21507912411f9b45b2d07f6f487_rle_crop_3983331134_0.png.png imagette274255101759358583/1759358105_3513385_1387297577_1e7c177aafbafebeae87c3c114f1432d_rle_crop_3983327419_0.png.png wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/2/6b692c299d8f822fb2f229a64bc2757a_10116594.png imagette274255101759358583 27425511 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=27425511 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1387298289: '1759358225_3517255_1387297990_987a440f77b9a775271907d737628e17_rle_crop_3983330898_0.png', 1387298290: '1759358225_3517255_1387297637_adddeb7668c9fcfd0f2a9348845b45f6_rle_crop_3983330923_0.png', 1387298702: '1759358346_3520833_1387298225_458ec0642fbf6fde55e3f9f5dd098abd_rle_crop_3983331119_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/2/973fa8603860efb85e9b0747cee5a98c_24037238.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/2/e73d749339439a7f130b21c646952588_40252038.png change filename to text .imagette274255111759358583/ imagette274255111759358583/1759358225_3517255_1387297637_adddeb7668c9fcfd0f2a9348845b45f6_rle_crop_3983330923_0.png.png imagette274255111759358583/1759358225_3517255_1387297990_987a440f77b9a775271907d737628e17_rle_crop_3983330898_0.png.png imagette274255111759358583/1759358346_3520833_1387298225_458ec0642fbf6fde55e3f9f5dd098abd_rle_crop_3983331119_0.png.png wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/2/cc1539d692352ccd674e3bbf2a057e49_62156502.png imagette274255111759358583 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=27425471 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://marlene.fotonower.com/velours/27425514,27425515,27425516,27425517,27425518,27425519,27425520,27425521,27425522,27425523,27425524,27425525?tags=plastique,metal,papier,cartonnette,environnement,kraft,Teint_Dans_La_Masse,autre_refus,Carton_gris,Carton_brun,mal_croppe,flou your option no_mail is active, we will not send the real mail to your client args[1387298910] : ('0.03730256948196789',) no score found for photo 1387298910 We are sending mail with results at report@fotonower.com args[1387298909] : ('0.03730256948196789',) no score found for photo 1387298909 We are sending mail with results at report@fotonower.com args[1387298908] : ('0.03730256948196789',) no score found for photo 1387298908 We are sending mail with results at report@fotonower.com args[1387298900] : ('0.03730256948196789',) no score found for photo 1387298900 We are sending mail with results at report@fotonower.com args[1387298896] : ('0.03730256948196789',) no score found for photo 1387298896 We are sending mail with results at report@fotonower.com args[1387298895] : ('0.03730256948196789',) no score found for photo 1387298895 We are sending mail with results at report@fotonower.com args[1387298893] : ('0.03730256948196789',) no score found for photo 1387298893 We are sending mail with results at report@fotonower.com args[1387298890] : ('0.03730256948196789',) no score found for photo 1387298890 We are sending mail with results at report@fotonower.com args[1387298887] : ('0.03730256948196789',) no score found for photo 1387298887 We are sending mail with results at report@fotonower.com args[1387298884] : ('0.03730256948196789',) no score found for photo 1387298884 We are sending mail with results at report@fotonower.com refus_total : 0.03730256948196789 2022-04-13 10:29:59 0 SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=27425471 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_P27425471_02-10-2025_00_43_01.pdf results_Auto_P27425471_02-10-2025_00_43_01.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27425471_02-10-2025_00_43_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','27425471','results_Auto_P27425471_02-10-2025_00_43_01.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27425471_02-10-2025_00_43_01.pdf','pdf','','0.16','0.03730256948196789') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([27425471]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1387298910, 1387298909, 1387298908, 1387298900, 1387298896, 1387298895, 1387298893, 1387298890, 1387298887, 1387298884] map_info['map_portfolio_photo'] : {27425471: [1387298910, 1387298909, 1387298908, 1387298900, 1387298896, 1387298895, 1387298893, 1387298890, 1387298887, 1387298884, 1387298869, 1387298866, 1387298864, 1387298681, 1387298679, 1387298323, 1387298321, 1387298304, 1387298301, 1387298299, 1387298275, 1387298271, 1387298267, 1387298249, 1387298247, 1387298234, 1387298231, 1387298225, 1387298223, 1387298220, 1387298217, 1387298203, 1387298199, 1387298195, 1387298193, 1387298190, 1387297994, 1387297990, 1387297745, 1387297637, 1387297635, 1387297617, 1387297615, 1387297613, 1387297611, 1387297608, 1387297579, 1387297577]} final : False mtd_id 4302 list_pids : [1387298910, 1387298909, 1387298908, 1387298900, 1387298896, 1387298895, 1387298893, 1387298890, 1387298887, 1387298884] 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, '3814055') ('4302', '27425471', '1387298910', None, None, None, None, None, '3814055') ('4302', None, None, None, None, None, None, None, '3814055') ('4302', '27425471', '1387298909', None, None, None, None, None, '3814055') ('4302', None, None, None, None, None, None, None, '3814055') ('4302', '27425471', '1387298908', None, None, None, None, None, '3814055') ('4302', None, None, None, None, None, None, None, '3814055') ('4302', '27425471', '1387298900', None, None, None, None, None, '3814055') ('4302', None, None, None, None, None, None, None, '3814055') ('4302', '27425471', '1387298896', None, None, None, None, None, '3814055') ('4302', None, None, None, None, None, None, None, '3814055') ('4302', '27425471', '1387298895', None, None, None, None, None, '3814055') ('4302', None, None, None, None, None, None, None, '3814055') ('4302', '27425471', '1387298893', None, None, None, None, None, '3814055') ('4302', None, None, None, None, None, None, None, '3814055') ('4302', '27425471', '1387298890', None, None, None, None, None, '3814055') ('4302', None, None, None, None, None, None, None, '3814055') ('4302', '27425471', '1387298887', None, None, None, None, None, '3814055') ('4302', None, None, None, None, None, None, None, '3814055') ('4302', '27425471', '1387298884', None, None, None, None, None, '3814055') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 10 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '27425471', '1387298910', None, None, None, None, None, '3814055'), ('4302', '27425471', '1387298909', None, None, None, None, None, '3814055'), ('4302', '27425471', '1387298908', None, None, None, None, None, '3814055'), ('4302', '27425471', '1387298900', None, None, None, None, None, '3814055'), ('4302', '27425471', '1387298896', None, None, None, None, None, '3814055'), ('4302', '27425471', '1387298895', None, None, None, None, None, '3814055'), ('4302', '27425471', '1387298893', None, None, None, None, None, '3814055'), ('4302', '27425471', '1387298890', None, None, None, None, None, '3814055'), ('4302', '27425471', '1387298887', None, None, None, None, None, '3814055'), ('4302', '27425471', '1387298884', None, None, None, None, None, '3814055')] time used for this insertion : 0.035643577575683594 save_final save missing photos in datou_result : time spend for datou_step_exec : 4.228184700012207 time spend to save output : 0.03589439392089844 total time spend for step 4 : 4.2640790939331055 step5:split_time_score Thu Oct 2 00:43: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 : ['27425471'] 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 : [('27425471',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (27425471) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1387298910: {'path': 'temp/1759358581_3848263_1387298910_503e48b9d132e53b3ae700d9233f4b16.jpg', 'extension': 'jpg'}, 1387298893: {'path': 'temp/1759358581_3848263_1387298893_8fe53629dffb001e736637321ee439c8.jpg', 'extension': 'jpg'}, 1387298895: {'path': 'temp/1759358581_3848263_1387298895_d0954ceed3efadc907b530698ac5609e.jpg', 'extension': 'jpg'}, 1387298896: {'path': 'temp/1759358581_3848263_1387298896_9e1bf67fa54f10830fe4c952a2964a7f.jpg', 'extension': 'jpg'}, 1387298884: {'path': 'temp/1759358581_3848263_1387298884_06a985cf325906c12e97495e107e4b85.jpg', 'extension': 'jpg'}, 1387298887: {'path': 'temp/1759358581_3848263_1387298887_9b325047cb7e302233badb16361c30ca.jpg', 'extension': 'jpg'}, 1387298890: {'path': 'temp/1759358581_3848263_1387298890_2508763f0be62ede47714f41c1abecc2.jpg', 'extension': 'jpg'}, 1387298900: {'path': 'temp/1759358581_3848263_1387298900_36ef22cc0dc9d1c002f254be1b438286.jpg', 'extension': 'jpg'}, 1387298908: {'path': 'temp/1759358581_3848263_1387298908_11eca81c145430f8f116d56dd836b9e3.jpg', 'extension': 'jpg'}, 1387298909: {'path': 'temp/1759358581_3848263_1387298909_84dca5a45745793442dc57023e07af5b.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 = 27425471; (('arc_en_ciel_jrm_live',),) TODO : Insert select and so on Begin split_port_in_batch_balle thcls : [{'id': 861, 'mtr_user_id': 31, 'name': 'Rungis_class_dechets_1212', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': 'Rungis_Aluminium,Rungis_Carton,Rungis_Papier,Rungis_Plastique_clair,Rungis_Plastique_dur,Rungis_Plastique_fonce,Rungis_Tapis_vide,Rungis_Tetrapak', 'svm_portfolios_learning': '1160730,571842,571844,571839,571933,571840,571841,572307', 'photo_hashtag_type': 999, 'photo_desc_type': 3963, 'type_classification': 'caffe', 'hashtag_id_list': '2107751280,2107750907,2107750908,2107750909,2107750910,2107750911,2107750912,2107750913'}] thcls : [{'id': 758, 'mtr_user_id': 31, 'name': 'Rungis_amount_dechets_fall_2018_v2', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': '05102018_Papier_non_papier_dense,05102018_Papier_non_papier_peu_dense,05102018_Papier_non_papier_presque_vide,05102018_Papier_non_papier_tres_dense,05102018_Papier_non_papier_tres_peu_dense', 'svm_portfolios_learning': '1108385,1108386,1108388,1108384,1108387', 'photo_hashtag_type': 856, 'photo_desc_type': 3853, 'type_classification': 'caffe', 'hashtag_id_list': '2107751013,2107751014,2107751015,2107751016,2107751017'}] select SUBSTRING(ph.text,16,2) as h, count(*) from MTRUser.mtr_portfolio_photos mpp inner join MTRBack.photos_view ph on mpp.mtr_photo_id = ph.photo_id where mpp.mtr_portfolio_id = 27425471 group by h (('00', 48),) SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=27425471 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 (27425471) 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 (27425471) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 02102025 27425471 Nombre de photos uploadées : 48 / 23040 (0%) 02102025 27425471 Nombre de photos taguées (types de déchets): 0 / 48 (0%) 02102025 27425471 Nombre de photos taguées (volume) : 0 / 48 (0%) [{'photo_id': 1387297579, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/2/96d3c787b83188d6ef6106db409afab8.jpg', 'username': None, 'uploaded_at': 1759357873, 'text': 'image_02102025_00_30_13_10143.jpg 1e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1387297577, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/2/1e7c177aafbafebeae87c3c114f1432d.jpg', 'username': None, 'uploaded_at': 1759357873, 'text': 'image_02102025_00_30_24_10139.jpg 2e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1387297617, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/2/f3b1d4b819afeb710d2552b22250206c.jpg', 'username': None, 'uploaded_at': 1759357928, 'text': 'image_02102025_00_30_34_10145.jpg'}, {'photo_id': 1387297615, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/2/adea9f98d0cdf2235c7b942438ae0125.jpg', 'username': None, 'uploaded_at': 1759357928, 'text': 'image_02102025_00_31_03_10150.jpg'}] 0 [] elapsed_time : load_data_split_time_score 1.430511474609375e-06 elapsed_time : order_list_meta_photo_and_scores 5.0067901611328125e-06 ???????????????????????????????????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.0029833316802978516 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 218, 27425471, '2025-10-02' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); Catched exception ! Connect or reconnect ! SELECT id FROM MTRPhoto.dashboard_entry_day where dashboard_place_id = 218 and date = '2025-10-02' ; INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (2377546,979,"{}"); Catched exception ! Connect or reconnect ! elapsed_time : insert_dashboard_record_day_entry 0.6602778434753418 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= 2377546 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 2377546, 'dashboard_run_id': 2385139, 'mtr_portfolio_id': 27424686, 'dashboard_result_id': 15904561, '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_P27424686_02-10-2025_00_19_04.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27424695, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27424696, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27424697, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27424698, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27424699, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27424700, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27424701, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27424702, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27424703, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27424704, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27424705, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27424706, 'pht': 3726}}"}, {'dashboat_entry_day': 2377546, 'dashboard_run_id': 2385139, 'mtr_portfolio_id': 27425124, 'dashboard_result_id': 15904562, '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_P27425124_02-10-2025_00_33_05.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27425161, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27425162, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27425163, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27425164, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27425165, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27425166, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27425167, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27425168, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27425169, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27425170, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27425171, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27425172, 'pht': 3726}}"}, {'dashboat_entry_day': 2377546, 'dashboard_run_id': 2385139, 'mtr_portfolio_id': 27425471, 'dashboard_result_id': 15904563, '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_P27425471_02-10-2025_00_41_03.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27425502, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27425503, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27425504, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27425505, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27425506, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27425507, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27425508, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27425509, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27425510, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27425511, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27425512, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27425513, '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 = 27424686 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': 3813971, 'mtr_portfolio_id': 27424686, 'created_at': datetime.datetime(2025, 10, 2, 0, 19, 3), 'result': '0.03805004351602606', 'result_long': None, 'result_double': None}] Qualite : 0.03805004351602606 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27424686 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27424686_02-10-2025_00_19_04.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27424686 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_P27424686_02-10-2025_00_19_04.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27424695, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27424696, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27424697, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27424698, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27424699, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27424700, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27424701, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27424702, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27424703, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27424704, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27424705, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27424706, 'pht': 3726}}" where mtr_portfolio_id = 27424686 and dashboard_run_id = 2385139 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`=27424686 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15904561, 0.03805004351602606, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27424686_02-10-2025_00_19_04.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27424695, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27424696, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27424697, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27424698, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27424699, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27424700, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27424701, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27424702, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27424703, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27424704, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27424705, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27424706, '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 = 27425124 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': 3814019, 'mtr_portfolio_id': 27425124, 'created_at': datetime.datetime(2025, 10, 2, 0, 33, 4), 'result': '0.05625780692897417', 'result_long': None, 'result_double': None}] Qualite : 0.05625780692897417 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27425124 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27425124_02-10-2025_00_33_05.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27425124 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_P27425124_02-10-2025_00_33_05.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27425161, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27425162, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27425163, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27425164, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27425165, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27425166, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27425167, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27425168, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27425169, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27425170, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27425171, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27425172, 'pht': 3726}}" where mtr_portfolio_id = 27425124 and dashboard_run_id = 2385139 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`=27425124 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15904562, 0.05625780692897417, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27425124_02-10-2025_00_33_05.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27425161, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27425162, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27425163, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27425164, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27425165, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27425166, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27425167, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27425168, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27425169, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27425170, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27425171, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27425172, '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 = 27425471 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': 3814055, 'mtr_portfolio_id': 27425471, 'created_at': datetime.datetime(2025, 10, 2, 0, 43), 'result': '0.03730256948196789', 'result_long': None, 'result_double': None}] Qualite : 0.03730256948196789 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27425471 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27425471_02-10-2025_00_43_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27425471 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_P27425471_02-10-2025_00_43_01.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27425502, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27425503, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27425504, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27425505, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27425506, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27425507, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27425508, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27425509, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27425510, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27425511, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27425512, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27425513, 'pht': 3726}}" where mtr_portfolio_id = 27425471 and dashboard_run_id = 2385139 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`=27425471 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15904563, 0.03730256948196789, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27425471_02-10-2025_00_43_01.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27425502, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27425503, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27425504, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27425505, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27425506, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27425507, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27425508, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27425509, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27425510, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27425511, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27425512, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27425513, '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 (27424686,27425124,27425471) result : ((1387291774,), (1387291778,), (1387291781,), (1387291812,), (1387291813,), (1387291814,), (1387291816,), (1387291819,), (1387291841,), (1387291844,), (1387291846,), (1387291967,), (1387292459,), (1387292461,), (1387292465,), (1387292467,), (1387292616,), (1387292621,), (1387292626,), (1387292631,), (1387292635,), (1387292637,), (1387292648,), (1387292650,), (1387292651,), (1387292654,), (1387292674,), (1387292677,), (1387292680,), (1387292683,), (1387292702,), (1387292704,), (1387292705,), (1387292706,), (1387295337,), (1387295331,), (1387295334,), (1387295936,), (1387296090,), (1387296143,), (1387296147,), (1387296163,), (1387296164,), (1387296183,), (1387296186,), (1387296189,), (1387296192,), (1387296210,), (1387296213,), (1387296215,), (1387296218,), (1387296238,), (1387296241,), (1387296244,), (1387296247,), (1387296253,), (1387296503,), (1387297042,), (1387297086,), (1387297104,), (1387297107,), (1387297109,), (1387297112,), (1387297251,), (1387297487,), (1387297494,), (1387297497,), (1387297501,), (1387297504,), (1387297507,), (1387297518,), (1387297521,), (1387297524,), (1387297546,), (1387297551,), (1387297582,), (1387297585,), (1387297588,), (1387297577,), (1387297579,), (1387297608,), (1387297611,), (1387297613,), (1387297615,), (1387297617,), (1387297635,), (1387297637,), (1387297745,), (1387297990,), (1387297994,), (1387298190,), (1387298193,), (1387298195,), (1387298199,), (1387298203,), (1387298217,), (1387298220,), (1387298223,), (1387298225,), (1387298231,), (1387298234,), (1387298247,), (1387298249,), (1387298267,), (1387298271,), (1387298275,), (1387298299,), (1387298301,), (1387298304,), (1387298321,), (1387298323,), (1387298679,), (1387298681,), (1387298864,), (1387298866,), (1387298869,), (1387298884,), (1387298887,), (1387298890,), (1387298893,), (1387298895,), (1387298896,), (1387298900,), (1387298908,), (1387298909,), (1387298910,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'02102025': {'nb_upload': 48, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([27425471]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1387298910, 1387298909, 1387298908, 1387298900, 1387298896, 1387298895, 1387298893, 1387298890, 1387298887, 1387298884] map_info['map_portfolio_photo'] : {27425471: [1387298910, 1387298909, 1387298908, 1387298900, 1387298896, 1387298895, 1387298893, 1387298890, 1387298887, 1387298884, 1387298869, 1387298866, 1387298864, 1387298681, 1387298679, 1387298323, 1387298321, 1387298304, 1387298301, 1387298299, 1387298275, 1387298271, 1387298267, 1387298249, 1387298247, 1387298234, 1387298231, 1387298225, 1387298223, 1387298220, 1387298217, 1387298203, 1387298199, 1387298195, 1387298193, 1387298190, 1387297994, 1387297990, 1387297745, 1387297637, 1387297635, 1387297617, 1387297615, 1387297613, 1387297611, 1387297608, 1387297579, 1387297577]} final : True mtd_id 4302 list_pids : [1387298910, 1387298909, 1387298908, 1387298900, 1387298896, 1387298895, 1387298893, 1387298890, 1387298887, 1387298884] Looping around the photos to save general results len do output : 1 /27425471Didn'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, '3814055') ('4302', '27425471', '1387298910', None, None, None, None, None, '3814055') ('4302', None, None, None, None, None, None, None, '3814055') ('4302', '27425471', '1387298909', None, None, None, None, None, '3814055') ('4302', None, None, None, None, None, None, None, '3814055') ('4302', '27425471', '1387298908', None, None, None, None, None, '3814055') ('4302', None, None, None, None, None, None, None, '3814055') ('4302', '27425471', '1387298900', None, None, None, None, None, '3814055') ('4302', None, None, None, None, None, None, None, '3814055') ('4302', '27425471', '1387298896', None, None, None, None, None, '3814055') ('4302', None, None, None, None, None, None, None, '3814055') ('4302', '27425471', '1387298895', None, None, None, None, None, '3814055') ('4302', None, None, None, None, None, None, None, '3814055') ('4302', '27425471', '1387298893', None, None, None, None, None, '3814055') ('4302', None, None, None, None, None, None, None, '3814055') ('4302', '27425471', '1387298890', None, None, None, None, None, '3814055') ('4302', None, None, None, None, None, None, None, '3814055') ('4302', '27425471', '1387298887', None, None, None, None, None, '3814055') ('4302', None, None, None, None, None, None, None, '3814055') ('4302', '27425471', '1387298884', None, None, None, None, None, '3814055') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 11 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, '27425471', 'None', None, None, None, None, '3814055'), ('4302', '27425471', '1387298910', None, None, None, None, None, '3814055'), ('4302', '27425471', '1387298909', None, None, None, None, None, '3814055'), ('4302', '27425471', '1387298908', None, None, None, None, None, '3814055'), ('4302', '27425471', '1387298900', None, None, None, None, None, '3814055'), ('4302', '27425471', '1387298896', None, None, None, None, None, '3814055'), ('4302', '27425471', '1387298895', None, None, None, None, None, '3814055'), ('4302', '27425471', '1387298893', None, None, None, None, None, '3814055'), ('4302', '27425471', '1387298890', None, None, None, None, None, '3814055'), ('4302', '27425471', '1387298887', None, None, None, None, None, '3814055'), ('4302', '27425471', '1387298884', None, None, None, None, None, '3814055')] time used for this insertion : 0.03688502311706543 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.5827631950378418 time spend to save output : 0.03714299201965332 total time spend for step 5 : 1.6199061870574951 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 (3814055) 1.97user 2.49system 0:11.05elapsed 40%CPU (0avgtext+0avgdata 159100maxresident)k 248inputs+9088outputs (0major+64191minor)pagefaults 0swaps