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 : 1769567 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 (2762808) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (2762808) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22436117 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['2762808'] with mtr_portfolio_ids : ['22436117'] and first list_photo_ids : [] new path : /proc/1769567/ Name: python3 Umask: 0002 State: R (running) Tgid: 1769567 Ngid: 0 Pid: 1769567 PPid: 1769566 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 1769567 NSpid: 1769567 NSpgid: 1766502 NSsid: 1766502 VmPeak: 1106936 kB VmSize: 1106936 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 98680 kB VmRSS: 98680 kB RssAnon: 59804 kB RssFile: 38876 kB RssShmem: 0 kB VmData: 865684 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 616 kB VmSwap: 0 kB HugetlbPages: 0 kB CoreDumping: 0 THP_enabled: 1 Threads: 1 SigQ: 0/63054 SigPnd: 0000000000000000 ShdPnd: 0000000000000000 SigBlk: 0000000000000000 SigIgn: 0000000001001000 SigCgt: 0000000180000002 CapInh: 0000000000000000 CapPrm: 0000000000000000 CapEff: 0000000000000000 CapBnd: 000001ffffffffff CapAmb: 0000000000000000 NoNewPrivs: 0 Seccomp: 0 Seccomp_filters: 0 Speculation_Store_Bypass: thread vulnerable SpeculationIndirectBranch: conditional enabled Cpus_allowed: ffffffff,ffffffff,ffffffff,ffffffff Cpus_allowed_list: 0-127 Mems_allowed: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001 Mems_allowed_list: 0 voluntary_ctxt_switches: 68 nonvoluntary_ctxt_switches: 139 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '1769567', 'Ngid': '0', 'Pid': '1769567', 'PPid': '1769566', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '1769567', 'NSpid': '1769567', 'NSpgid': '1766502', 'NSsid': '1766502', 'VmPeak': '1106936 kB', 'VmSize': '1106936 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '98680 kB', 'VmRSS': '98680 kB', 'RssAnon': '59804 kB', 'RssFile': '38876 kB', 'RssShmem': '0 kB', 'VmData': '865684 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '616 kB', 'VmSwap': '0 kB', 'HugetlbPages': '0 kB', 'CoreDumping': '0', 'THP_enabled': '1', 'Threads': '1', 'SigQ': '0/63054', 'SigPnd': '0000000000000000', 'ShdPnd': '0000000000000000', 'SigBlk': '0000000000000000', 'SigIgn': '0000000001001000', 'SigCgt': '0000000180000002', 'CapInh': '0000000000000000', 'CapPrm': '0000000000000000', 'CapEff': '0000000000000000', 'CapBnd': '000001ffffffffff', 'CapAmb': '0000000000000000', 'NoNewPrivs': '0', 'Seccomp': '0', 'Seccomp_filters': '0', 'Speculation_Store_Bypass': 'thread vulnerable', 'SpeculationIndirectBranch': 'conditional enabled', 'Cpus_allowed': 'ffffffff,ffffffff,ffffffff,ffffffff', 'Cpus_allowed_list': '0-127', 'Mems_allowed': '00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001', 'Mems_allowed_list': '0', 'voluntary_ctxt_switches': '68', 'nonvoluntary_ctxt_switches': '139'} ('datou_batch_current', '1769567', '1106936', '0', '1106936', '865684', '98680', b'', 'marlene', '2762808') insert ignore into MTRAdmin.mem_info (script_name, PID, VMpeak,VMswap,VMsize,VMdata,VMrss,GPU_ram, hostname, mtr_current_id) VALUES (%s,%s,%s,%s,%s,%s,%s,%s,%s,%s) Inside batchDatouExec : verbose : True ##### chargement datou SELECT name, created_at,limit_max FROM MTRDatou.mtr_datou WHERE id=4302 SELECT mtd.id, mtdt.`type`, mtd.`param`, mtd.param_json, mtdt.nb_input, mtdt.nb_output, mtdt.prod, mtdt.is_local, mtdt.is_datou_depend, mtdt.is_photo_id_local FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_step_types mtdt WHERE mtdt.`id`=mtd.`type` AND mtd.mtd_id=4302 SELECT mtd.id, mtd.mtd_id, mdsdt.id, mdsdt.name, mdsdt.description, msid.output_or_input, msid.data_order_id, mdsdt.type FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_steptype_io_datatypes msid, MTRDatou.mtr_datou_step_data_types mdsdt WHERE mtd.`type`=msid.`mtr_datou_step_type` AND mtd.mtd_id= 4302 AND msid.data_type=mdsdt.id SELECT mts_id_output, id_output, mts_id_input, id_input FROM MTRDatou.mtr_datou_step_by_step WHERE mtd_id=4302 # VR 17-11-17 : to create in DB ! Here we check the datou graph and we reorder steps ! Tree builded and cycle checked, now we need to re-order the steps ! We have currenlty an error because there is no dependence between the last step for the case tile - detect - glue We can either keep the depence of, it is better to keep an order compatible with the id of steps if we do not have sons, so a lexical order : (number_son, step_id) All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! DONE and to test : checkNoCycle ! Here we check the consistency of inputs/outputs number between the given ones and the db ! eke 1-6-18 : checkConsistencyNbInputNbOutput should be processed after step reordering ! WARNING : number of outputs for step 13596 ventilate_hashtags_in_portfolio is not consistent : 2 used against 1 in the step definition ! Step 11881 final have less inputs used (1) than in the step definition (3) : maybe we manage optionnal inputs ! Step 11881 final have less outputs used (1) than in the step definition (2) : some outputs may be not used ! WARNING : number of outputs for step 13625 velours_tree is not consistent : 2 used against 1 in the step definition ! Step 11884 send_mail_cod have less inputs used (3) than in the step definition (5) : maybe we manage optionnal inputs ! Number of inputs / outputs for each step checked ! Here we check the consistency of outputs/inputs types during steps connections eke 1-6-18 : checkConsistencyTypeOutputInput should be processed after checkConsistencyNbInputNbOutput ! We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 3 of step 11884 have datatype=6 WARNING : type of output 1 of step 13596 doesn't seem to be define in the database( WARNING : type of input 3 of step 11881 doesn't seem to be define in the database( We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 0 of step 13625 have datatype=18 WARNING : type of output 1 of step 13625 doesn't seem to be define in the database( WARNING : type of input 5 of step 11884 doesn't seem to be define in the database( DataTypes for each output/input checked ! no param json to modify List Step Type Loaded in datou : ventilate_hashtags_in_portfolio, final, velours_tree, send_mail_cod, split_time_score over limit max, limiting to limit_max 200 list_input_json : [] ##### fin chargement datou ##### chargement data ##### Call load_data_input : nb_thread : 1 origin SELECT ph.photo_id, ph.url FROM MTRBack.photos ph WHERE ph.photo_id IN (SELECT mtr_photo_id from MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id in (22436117) 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 (2762808 ) ) 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 (22436117) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1353757307, 'portfolio_id': 22436117}, {'photo_id': 1353757263, 'portfolio_id': 22436117}, {'photo_id': 1353757234, 'portfolio_id': 22436117}, {'photo_id': 1353757204, 'portfolio_id': 22436117}, {'photo_id': 1353757179, 'portfolio_id': 22436117}, {'photo_id': 1353756779, 'portfolio_id': 22436117}, {'photo_id': 1353756749, 'portfolio_id': 22436117}, {'photo_id': 1353756717, 'portfolio_id': 22436117}, {'photo_id': 1353756672, 'portfolio_id': 22436117}, {'photo_id': 1353756663, 'portfolio_id': 22436117}, {'photo_id': 1353756656, 'portfolio_id': 22436117}, {'photo_id': 1353756403, 'portfolio_id': 22436117}, {'photo_id': 1353756366, 'portfolio_id': 22436117}, {'photo_id': 1353756336, 'portfolio_id': 22436117}, {'photo_id': 1353756308, 'portfolio_id': 22436117}, {'photo_id': 1353755943, 'portfolio_id': 22436117}, {'photo_id': 1353755879, 'portfolio_id': 22436117}, {'photo_id': 1353755784, 'portfolio_id': 22436117}, {'photo_id': 1353755729, 'portfolio_id': 22436117}, {'photo_id': 1353755601, 'portfolio_id': 22436117}] map_portfolio_id_photo_id: {22436117: [1353757307, 1353757263, 1353757234, 1353757204, 1353757179, 1353756779, 1353756749, 1353756717, 1353756672, 1353756663, 1353756656, 1353756403, 1353756366, 1353756336, 1353756308, 1353755943, 1353755879, 1353755784, 1353755729, 1353755601]} ##### 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.01549220085144043 #### fin chargement data Blocking on flush ? No conitnuing About to test input to load Calling datou_exec Inside datou_exec : verbose : True number of steps : 5 step1:ventilate_hashtags_in_portfolio Fri Apr 25 14:50: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 (22436117) 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 : 22436117 get user id for portfolio 22436117 get sub ptf for main ptf 22436117, type 3726 and hashtags ['metal', 'Carton_gris', 'papier', 'Carton_brun', 'cartonnette', 'kraft', 'Teint_Dans_La_Masse', 'mal_croppe', 'environnement', 'flou', 'autre_refus', 'plastique'] SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=22436117 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('metal','Carton_gris','papier','Carton_brun','cartonnette','kraft','Teint_Dans_La_Masse','mal_croppe','environnement','flou','autre_refus','plastique')) AND mptpi.`min_score`=0.5 SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=22436117 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('metal','Carton_gris','papier','Carton_brun','cartonnette','kraft','Teint_Dans_La_Masse','mal_croppe','environnement','flou','autre_refus','plastique')) AND mptpi.`min_score`=0.5 To do returned map {'plastique': {'main_port_id': 22436117, 'sub_port_id': 22436135, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14881855, 'last_updated_at': datetime.datetime(2025, 4, 25, 14, 49), 'last_updated_at_desc': datetime.datetime(2025, 4, 25, 14, 49), 'last_updated_at_asc': datetime.datetime(2025, 4, 25, 14, 49)}, 'Carton_gris': {'main_port_id': 22436117, 'sub_port_id': 22436136, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14881856, 'last_updated_at': datetime.datetime(2025, 4, 25, 14, 49), 'last_updated_at_desc': datetime.datetime(2025, 4, 25, 14, 49), 'last_updated_at_asc': datetime.datetime(2025, 4, 25, 14, 49)}, 'autre_refus': {'main_port_id': 22436117, 'sub_port_id': 22436137, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14881857, 'last_updated_at': datetime.datetime(2025, 4, 25, 14, 49), 'last_updated_at_desc': datetime.datetime(2025, 4, 25, 14, 49), 'last_updated_at_asc': datetime.datetime(2025, 4, 25, 14, 49)}, 'metal': {'main_port_id': 22436117, 'sub_port_id': 22436138, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14881858, 'last_updated_at': datetime.datetime(2025, 4, 25, 14, 49), 'last_updated_at_desc': datetime.datetime(2025, 4, 25, 14, 49), 'last_updated_at_asc': datetime.datetime(2025, 4, 25, 14, 49)}, 'flou': {'main_port_id': 22436117, 'sub_port_id': 22436139, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14881859, 'last_updated_at': datetime.datetime(2025, 4, 25, 14, 49), 'last_updated_at_desc': datetime.datetime(2025, 4, 25, 14, 49), 'last_updated_at_asc': datetime.datetime(2025, 4, 25, 14, 49)}, 'environnement': {'main_port_id': 22436117, 'sub_port_id': 22436140, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14881860, 'last_updated_at': datetime.datetime(2025, 4, 25, 14, 49), 'last_updated_at_desc': datetime.datetime(2025, 4, 25, 14, 49), 'last_updated_at_asc': datetime.datetime(2025, 4, 25, 14, 49)}, 'kraft': {'main_port_id': 22436117, 'sub_port_id': 22436141, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14881861, 'last_updated_at': datetime.datetime(2025, 4, 25, 14, 49), 'last_updated_at_desc': datetime.datetime(2025, 4, 25, 14, 49), 'last_updated_at_asc': datetime.datetime(2025, 4, 25, 14, 49)}, 'Teint_Dans_La_Masse': {'main_port_id': 22436117, 'sub_port_id': 22436142, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14881862, 'last_updated_at': datetime.datetime(2025, 4, 25, 14, 49), 'last_updated_at_desc': datetime.datetime(2025, 4, 25, 14, 49), 'last_updated_at_asc': datetime.datetime(2025, 4, 25, 14, 49)}, 'mal_croppe': {'main_port_id': 22436117, 'sub_port_id': 22436143, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14881863, 'last_updated_at': datetime.datetime(2025, 4, 25, 14, 49), 'last_updated_at_desc': datetime.datetime(2025, 4, 25, 14, 49), 'last_updated_at_asc': datetime.datetime(2025, 4, 25, 14, 49)}, 'cartonnette': {'main_port_id': 22436117, 'sub_port_id': 22436144, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14881864, 'last_updated_at': datetime.datetime(2025, 4, 25, 14, 49), 'last_updated_at_desc': datetime.datetime(2025, 4, 25, 14, 49), 'last_updated_at_asc': datetime.datetime(2025, 4, 25, 14, 49)}, 'Carton_brun': {'main_port_id': 22436117, 'sub_port_id': 22436145, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14881865, 'last_updated_at': datetime.datetime(2025, 4, 25, 14, 49), 'last_updated_at_desc': datetime.datetime(2025, 4, 25, 14, 49), 'last_updated_at_asc': datetime.datetime(2025, 4, 25, 14, 49)}, 'papier': {'main_port_id': 22436117, 'sub_port_id': 22436146, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14881866, 'last_updated_at': datetime.datetime(2025, 4, 25, 14, 49), 'last_updated_at_desc': datetime.datetime(2025, 4, 25, 14, 49), 'last_updated_at_asc': datetime.datetime(2025, 4, 25, 14, 49)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22436135 , 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=22436117 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 (22436135) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22436117) result : ((1353755601,), (1353755729,), (1353755784,), (1353755879,), (1353755943,), (1353756308,), (1353756336,), (1353756366,), (1353756403,), (1353756656,), (1353756663,), (1353756672,), (1353756717,), (1353756749,), (1353756779,), (1353757179,), (1353757204,), (1353757234,), (1353757263,), (1353757307,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22436136 , 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=22436117 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 (22436136) result : ((1353757882,), (1353757883,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22436117) result : ((1353755601,), (1353755729,), (1353755784,), (1353755879,), (1353755943,), (1353756308,), (1353756336,), (1353756366,), (1353756403,), (1353756656,), (1353756663,), (1353756672,), (1353756717,), (1353756749,), (1353756779,), (1353757179,), (1353757204,), (1353757234,), (1353757263,), (1353757307,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22436137 , 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=22436117 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 (22436137) result : ((1353757864,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22436117) result : ((1353755601,), (1353755729,), (1353755784,), (1353755879,), (1353755943,), (1353756308,), (1353756336,), (1353756366,), (1353756403,), (1353756656,), (1353756663,), (1353756672,), (1353756717,), (1353756749,), (1353756779,), (1353757179,), (1353757204,), (1353757234,), (1353757263,), (1353757307,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22436138 , 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=22436117 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 (22436138) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22436117) result : ((1353755601,), (1353755729,), (1353755784,), (1353755879,), (1353755943,), (1353756308,), (1353756336,), (1353756366,), (1353756403,), (1353756656,), (1353756663,), (1353756672,), (1353756717,), (1353756749,), (1353756779,), (1353757179,), (1353757204,), (1353757234,), (1353757263,), (1353757307,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22436139 , 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=22436117 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 (22436139) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22436117) result : ((1353755601,), (1353755729,), (1353755784,), (1353755879,), (1353755943,), (1353756308,), (1353756336,), (1353756366,), (1353756403,), (1353756656,), (1353756663,), (1353756672,), (1353756717,), (1353756749,), (1353756779,), (1353757179,), (1353757204,), (1353757234,), (1353757263,), (1353757307,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22436140 , 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=22436117 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 (22436140) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22436117) result : ((1353755601,), (1353755729,), (1353755784,), (1353755879,), (1353755943,), (1353756308,), (1353756336,), (1353756366,), (1353756403,), (1353756656,), (1353756663,), (1353756672,), (1353756717,), (1353756749,), (1353756779,), (1353757179,), (1353757204,), (1353757234,), (1353757263,), (1353757307,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22436141 , 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=22436117 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 (22436141) result : ((1353757952,), (1353757954,), (1353757955,), (1353757957,), (1353757958,), (1353757959,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22436117) result : ((1353755601,), (1353755729,), (1353755784,), (1353755879,), (1353755943,), (1353756308,), (1353756336,), (1353756366,), (1353756403,), (1353756656,), (1353756663,), (1353756672,), (1353756717,), (1353756749,), (1353756779,), (1353757179,), (1353757204,), (1353757234,), (1353757263,), (1353757307,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22436142 , 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=22436117 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 (22436142) result : ((1353757850,), (1353757851,), (1353757853,), (1353757854,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22436117) result : ((1353755601,), (1353755729,), (1353755784,), (1353755879,), (1353755943,), (1353756308,), (1353756336,), (1353756366,), (1353756403,), (1353756656,), (1353756663,), (1353756672,), (1353756717,), (1353756749,), (1353756779,), (1353757179,), (1353757204,), (1353757234,), (1353757263,), (1353757307,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22436143 , 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=22436117 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 (22436143) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22436117) result : ((1353755601,), (1353755729,), (1353755784,), (1353755879,), (1353755943,), (1353756308,), (1353756336,), (1353756366,), (1353756403,), (1353756656,), (1353756663,), (1353756672,), (1353756717,), (1353756749,), (1353756779,), (1353757179,), (1353757204,), (1353757234,), (1353757263,), (1353757307,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22436144 , 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=22436117 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 (22436144) result : ((1353757897,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22436117) result : ((1353755601,), (1353755729,), (1353755784,), (1353755879,), (1353755943,), (1353756308,), (1353756336,), (1353756366,), (1353756403,), (1353756656,), (1353756663,), (1353756672,), (1353756717,), (1353756749,), (1353756779,), (1353757179,), (1353757204,), (1353757234,), (1353757263,), (1353757307,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22436145 , 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=22436117 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 (22436145) result : ((1353757916,), (1353757917,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22436117) result : ((1353755601,), (1353755729,), (1353755784,), (1353755879,), (1353755943,), (1353756308,), (1353756336,), (1353756366,), (1353756403,), (1353756656,), (1353756663,), (1353756672,), (1353756717,), (1353756749,), (1353756779,), (1353757179,), (1353757204,), (1353757234,), (1353757263,), (1353757307,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22436146 , 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=22436117 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 (22436146) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22436117) result : ((1353755601,), (1353755729,), (1353755784,), (1353755879,), (1353755943,), (1353756308,), (1353756336,), (1353756366,), (1353756403,), (1353756656,), (1353756663,), (1353756672,), (1353756717,), (1353756749,), (1353756779,), (1353757179,), (1353757204,), (1353757234,), (1353757263,), (1353757307,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") To do ! Use context local managing function ! SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=22436117 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('metal','Carton_gris','papier','Carton_brun','cartonnette','kraft','Teint_Dans_La_Masse','mal_croppe','environnement','flou','autre_refus','plastique')) AND mptpi.`min_score`=0.5 SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=22436117 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('metal','Carton_gris','papier','Carton_brun','cartonnette','kraft','Teint_Dans_La_Masse','mal_croppe','environnement','flou','autre_refus','plastique')) AND mptpi.`min_score`=0.5 To do returned map {'plastique': {'main_port_id': 22436117, 'sub_port_id': 22436147, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14881867, 'last_updated_at': datetime.datetime(2025, 4, 25, 14, 49), 'last_updated_at_desc': datetime.datetime(2025, 4, 25, 14, 49), 'last_updated_at_asc': datetime.datetime(2025, 4, 25, 14, 49)}, 'Carton_gris': {'main_port_id': 22436117, 'sub_port_id': 22436148, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14881868, 'last_updated_at': datetime.datetime(2025, 4, 25, 14, 49), 'last_updated_at_desc': datetime.datetime(2025, 4, 25, 14, 49), 'last_updated_at_asc': datetime.datetime(2025, 4, 25, 14, 49)}, 'autre_refus': {'main_port_id': 22436117, 'sub_port_id': 22436149, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14881869, 'last_updated_at': datetime.datetime(2025, 4, 25, 14, 49), 'last_updated_at_desc': datetime.datetime(2025, 4, 25, 14, 49), 'last_updated_at_asc': datetime.datetime(2025, 4, 25, 14, 49)}, 'metal': {'main_port_id': 22436117, 'sub_port_id': 22436150, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14881870, 'last_updated_at': datetime.datetime(2025, 4, 25, 14, 49), 'last_updated_at_desc': datetime.datetime(2025, 4, 25, 14, 49), 'last_updated_at_asc': datetime.datetime(2025, 4, 25, 14, 49)}, 'flou': {'main_port_id': 22436117, 'sub_port_id': 22436151, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14881871, 'last_updated_at': datetime.datetime(2025, 4, 25, 14, 49), 'last_updated_at_desc': datetime.datetime(2025, 4, 25, 14, 49), 'last_updated_at_asc': datetime.datetime(2025, 4, 25, 14, 49)}, 'environnement': {'main_port_id': 22436117, 'sub_port_id': 22436152, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14881872, 'last_updated_at': datetime.datetime(2025, 4, 25, 14, 49), 'last_updated_at_desc': datetime.datetime(2025, 4, 25, 14, 49), 'last_updated_at_asc': datetime.datetime(2025, 4, 25, 14, 49)}, 'kraft': {'main_port_id': 22436117, 'sub_port_id': 22436153, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14881873, 'last_updated_at': datetime.datetime(2025, 4, 25, 14, 49), 'last_updated_at_desc': datetime.datetime(2025, 4, 25, 14, 49), 'last_updated_at_asc': datetime.datetime(2025, 4, 25, 14, 49)}, 'Teint_Dans_La_Masse': {'main_port_id': 22436117, 'sub_port_id': 22436154, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14881874, 'last_updated_at': datetime.datetime(2025, 4, 25, 14, 49), 'last_updated_at_desc': datetime.datetime(2025, 4, 25, 14, 49), 'last_updated_at_asc': datetime.datetime(2025, 4, 25, 14, 49)}, 'mal_croppe': {'main_port_id': 22436117, 'sub_port_id': 22436155, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14881875, 'last_updated_at': datetime.datetime(2025, 4, 25, 14, 49), 'last_updated_at_desc': datetime.datetime(2025, 4, 25, 14, 49), 'last_updated_at_asc': datetime.datetime(2025, 4, 25, 14, 49)}, 'cartonnette': {'main_port_id': 22436117, 'sub_port_id': 22436156, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14881876, 'last_updated_at': datetime.datetime(2025, 4, 25, 14, 49), 'last_updated_at_desc': datetime.datetime(2025, 4, 25, 14, 49), 'last_updated_at_asc': datetime.datetime(2025, 4, 25, 14, 49)}, 'Carton_brun': {'main_port_id': 22436117, 'sub_port_id': 22436157, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14881877, 'last_updated_at': datetime.datetime(2025, 4, 25, 14, 49), 'last_updated_at_desc': datetime.datetime(2025, 4, 25, 14, 49), 'last_updated_at_asc': datetime.datetime(2025, 4, 25, 14, 49)}, 'papier': {'main_port_id': 22436117, 'sub_port_id': 22436158, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14881878, 'last_updated_at': datetime.datetime(2025, 4, 25, 14, 49), 'last_updated_at_desc': datetime.datetime(2025, 4, 25, 14, 49), 'last_updated_at_asc': datetime.datetime(2025, 4, 25, 14, 49)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22436147,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22436135 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22436148,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22436136 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22436149,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22436137 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22436150,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22436138 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22436151,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22436139 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22436152,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22436140 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22436153,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22436141 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22436154,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22436142 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22436155,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22436143 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22436156,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22436144 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22436157,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22436145 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22436158,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22436146 lien utilise dans velours : https://www.fotonower.com/velours/22436147,22436148,22436149,22436150,22436151,22436152,22436153,22436154,22436155,22436156,22436157,22436158?tags=plastique,Carton_gris,autre_refus,metal,flou,environnement,kraft,Teint_Dans_La_Masse,mal_croppe,cartonnette,Carton_brun,papier After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22436117]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1353757307, 1353757263, 1353757234, 1353757204, 1353757179, 1353756779, 1353756749, 1353756717, 1353756672, 1353756663, 1353756656] map_info['map_portfolio_photo'] : {22436117: [1353757307, 1353757263, 1353757234, 1353757204, 1353757179, 1353756779, 1353756749, 1353756717, 1353756672, 1353756663, 1353756656, 1353756403, 1353756366, 1353756336, 1353756308, 1353755943, 1353755879, 1353755784, 1353755729, 1353755601]} final : False mtd_id 4302 list_pids : [1353757307, 1353757263, 1353757234, 1353757204, 1353757179, 1353756779, 1353756749, 1353756717, 1353756672, 1353756663, 1353756656] Looping around the photos to save general results len do output : 1 /22436117. 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, '2762808') ('4302', '22436117', '1353757307', None, None, None, None, None, '2762808') ('4302', None, None, None, None, None, None, None, '2762808') ('4302', '22436117', '1353757263', None, None, None, None, None, '2762808') ('4302', None, None, None, None, None, None, None, '2762808') ('4302', '22436117', '1353757234', None, None, None, None, None, '2762808') ('4302', None, None, None, None, None, None, None, '2762808') ('4302', '22436117', '1353757204', None, None, None, None, None, '2762808') ('4302', None, None, None, None, None, None, None, '2762808') ('4302', '22436117', '1353757179', None, None, None, None, None, '2762808') ('4302', None, None, None, None, None, None, None, '2762808') ('4302', '22436117', '1353756779', None, None, None, None, None, '2762808') ('4302', None, None, None, None, None, None, None, '2762808') ('4302', '22436117', '1353756749', None, None, None, None, None, '2762808') ('4302', None, None, None, None, None, None, None, '2762808') ('4302', '22436117', '1353756717', None, None, None, None, None, '2762808') ('4302', None, None, None, None, None, None, None, '2762808') ('4302', '22436117', '1353756672', None, None, None, None, None, '2762808') ('4302', None, None, None, None, None, None, None, '2762808') ('4302', '22436117', '1353756663', None, None, None, None, None, '2762808') ('4302', None, None, None, None, None, None, None, '2762808') ('4302', '22436117', '1353756656', None, None, None, None, None, '2762808') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 12 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '22436117', "{'plastique': 22436135, 'Carton_gris': 22436136, 'autre_refus': 22436137, 'metal': 22436138, 'flou': 22436139, 'environnement': 22436140, 'kraft': 22436141, 'Teint_Dans_La_Masse': 22436142, 'mal_croppe': 22436143, 'cartonnette': 22436144, 'Carton_brun': 22436145, 'papier': 22436146}", None, None, None, None, '2762808'), ('4302', '22436117', '1353757307', None, None, None, None, None, '2762808'), ('4302', '22436117', '1353757263', None, None, None, None, None, '2762808'), ('4302', '22436117', '1353757234', None, None, None, None, None, '2762808'), ('4302', '22436117', '1353757204', None, None, None, None, None, '2762808'), ('4302', '22436117', '1353757179', None, None, None, None, None, '2762808'), ('4302', '22436117', '1353756779', None, None, None, None, None, '2762808'), ('4302', '22436117', '1353756749', None, None, None, None, None, '2762808'), ('4302', '22436117', '1353756717', None, None, None, None, None, '2762808'), ('4302', '22436117', '1353756672', None, None, None, None, None, '2762808'), ('4302', '22436117', '1353756663', None, None, None, None, None, '2762808'), ('4302', '22436117', '1353756656', None, None, None, None, None, '2762808')] time used for this insertion : 0.022969484329223633 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.5109233856201172 time spend to save output : 0.023278474807739258 total time spend for step 1 : 1.5342018604278564 step2:final Fri Apr 25 14:50:59 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :0, first value : [] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22436117) 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 22436117 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1353755943,1353755879,1353755784,1353755729,1353755601,1353756403,1353756366,1353756336,1353756308,1353756779,1353756749,1353756717,1353756672,1353756663,1353756656,1353757307,1353757263,1353757234,1353757204,1353757179); 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([22436117]) Inside saveOutput : final : False verbose : True original output for save of step final : {1353757307: ('0.04252724984338508',), 1353757263: ('0.04252724984338508',), 1353757234: ('0.04252724984338508',), 1353757204: ('0.04252724984338508',), 1353757179: ('0.04252724984338508',), 1353756779: ('0.04252724984338508',), 1353756749: ('0.04252724984338508',), 1353756717: ('0.04252724984338508',), 1353756672: ('0.04252724984338508',), 1353756663: ('0.04252724984338508',), 1353756656: ('0.04252724984338508',)} new output for save of step final : {1353757307: ('0.04252724984338508',), 1353757263: ('0.04252724984338508',), 1353757234: ('0.04252724984338508',), 1353757204: ('0.04252724984338508',), 1353757179: ('0.04252724984338508',), 1353756779: ('0.04252724984338508',), 1353756749: ('0.04252724984338508',), 1353756717: ('0.04252724984338508',), 1353756672: ('0.04252724984338508',), 1353756663: ('0.04252724984338508',), 1353756656: ('0.04252724984338508',)} [1353757307, 1353757263, 1353757234, 1353757204, 1353757179, 1353756779, 1353756749, 1353756717, 1353756672, 1353756663, 1353756656] map_info['map_portfolio_photo'] : {22436117: [1353757307, 1353757263, 1353757234, 1353757204, 1353757179, 1353756779, 1353756749, 1353756717, 1353756672, 1353756663, 1353756656, 1353756403, 1353756366, 1353756336, 1353756308, 1353755943, 1353755879, 1353755784, 1353755729, 1353755601]} final : False mtd_id 4302 list_pids : [1353757307, 1353757263, 1353757234, 1353757204, 1353757179, 1353756779, 1353756749, 1353756717, 1353756672, 1353756663, 1353756656] Looping around the photos to save general results len do output : 11 /1353757307.Didn't retrieve data . /1353757263.Didn't retrieve data . /1353757234.Didn't retrieve data . /1353757204.Didn't retrieve data . /1353757179.Didn't retrieve data . /1353756779.Didn't retrieve data . /1353756749.Didn't retrieve data . /1353756717.Didn't retrieve data . /1353756672.Didn't retrieve data . /1353756663.Didn't retrieve data . /1353756656.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, '2762808') ('4302', '22436117', '1353757307', None, None, None, None, None, '2762808') ('4302', None, None, None, None, None, None, None, '2762808') ('4302', '22436117', '1353757263', None, None, None, None, None, '2762808') ('4302', None, None, None, None, None, None, None, '2762808') ('4302', '22436117', '1353757234', None, None, None, None, None, '2762808') ('4302', None, None, None, None, None, None, None, '2762808') ('4302', '22436117', '1353757204', None, None, None, None, None, '2762808') ('4302', None, None, None, None, None, None, None, '2762808') ('4302', '22436117', '1353757179', None, None, None, None, None, '2762808') ('4302', None, None, None, None, None, None, None, '2762808') ('4302', '22436117', '1353756779', None, None, None, None, None, '2762808') ('4302', None, None, None, None, None, None, None, '2762808') ('4302', '22436117', '1353756749', None, None, None, None, None, '2762808') ('4302', None, None, None, None, None, None, None, '2762808') ('4302', '22436117', '1353756717', None, None, None, None, None, '2762808') ('4302', None, None, None, None, None, None, None, '2762808') ('4302', '22436117', '1353756672', None, None, None, None, None, '2762808') ('4302', None, None, None, None, None, None, None, '2762808') ('4302', '22436117', '1353756663', None, None, None, None, None, '2762808') ('4302', None, None, None, None, None, None, None, '2762808') ('4302', '22436117', '1353756656', None, None, None, None, None, '2762808') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 33 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', '22436117', '1353757307', '0.04252724984338508', None, None, None, None, '2762808'), ('4302', '22436117', '1353757263', '0.04252724984338508', None, None, None, None, '2762808'), ('4302', '22436117', '1353757234', '0.04252724984338508', None, None, None, None, '2762808'), ('4302', '22436117', '1353757204', '0.04252724984338508', None, None, None, None, '2762808'), ('4302', '22436117', '1353757179', '0.04252724984338508', None, None, None, None, '2762808'), ('4302', '22436117', '1353756779', '0.04252724984338508', None, None, None, None, '2762808'), ('4302', '22436117', '1353756749', '0.04252724984338508', None, None, None, None, '2762808'), ('4302', '22436117', '1353756717', '0.04252724984338508', None, None, None, None, '2762808'), ('4302', '22436117', '1353756672', '0.04252724984338508', None, None, None, None, '2762808'), ('4302', '22436117', '1353756663', '0.04252724984338508', None, None, None, None, '2762808'), ('4302', '22436117', '1353756656', '0.04252724984338508', None, None, None, None, '2762808')] time used for this insertion : 0.023586750030517578 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.07452607154846191 time spend to save output : 0.02427077293395996 total time spend for step 2 : 0.09879684448242188 step3:velours_tree Fri Apr 25 14:50:59 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : {22436117: [{'plastique': 22436135, 'Carton_gris': 22436136, 'autre_refus': 22436137, 'metal': 22436138, 'flou': 22436139, 'environnement': 22436140, 'kraft': 22436141, 'Teint_Dans_La_Masse': 22436142, 'mal_croppe': 22436143, 'cartonnette': 22436144, 'Carton_brun': 22436145, 'papier': 22436146}]} input_args_next_step : {22436117: ()} output_args : {22436117: [{'plastique': 22436135, 'Carton_gris': 22436136, 'autre_refus': 22436137, 'metal': 22436138, 'flou': 22436139, 'environnement': 22436140, 'kraft': 22436141, 'Teint_Dans_La_Masse': 22436142, 'mal_croppe': 22436143, 'cartonnette': 22436144, 'Carton_brun': 22436145, 'papier': 22436146}]} args : 22436117 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': 22436135, 'Carton_gris': 22436136, 'autre_refus': 22436137, 'metal': 22436138, 'flou': 22436139, 'environnement': 22436140, 'kraft': 22436141, 'Teint_Dans_La_Masse': 22436142, 'mal_croppe': 22436143, 'cartonnette': 22436144, 'Carton_brun': 22436145, 'papier': 22436146},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22436117) 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([22436117]) 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.37601804733276367 time spend to save output : 6.818771362304688e-05 total time spend for step 3 : 0.3760862350463867 step4:send_mail_cod Fri Apr 25 14:51: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 : {1353757307: ('0.04252724984338508',), 1353757263: ('0.04252724984338508',), 1353757234: ('0.04252724984338508',), 1353757204: ('0.04252724984338508',), 1353757179: ('0.04252724984338508',), 1353756779: ('0.04252724984338508',), 1353756749: ('0.04252724984338508',), 1353756717: ('0.04252724984338508',), 1353756672: ('0.04252724984338508',), 1353756663: ('0.04252724984338508',), 1353756656: ('0.04252724984338508',)} input_args_next_step : {1353757307: ()} output_args : {1353757307: ('0.04252724984338508',), 1353757263: ('0.04252724984338508',), 1353757234: ('0.04252724984338508',), 1353757204: ('0.04252724984338508',), 1353757179: ('0.04252724984338508',), 1353756779: ('0.04252724984338508',), 1353756749: ('0.04252724984338508',), 1353756717: ('0.04252724984338508',), 1353756672: ('0.04252724984338508',), 1353756663: ('0.04252724984338508',), 1353756656: ('0.04252724984338508',)} args : 1353757307 depend.output_id : 0 input_args_next_step : {1353757307: ('0.04252724984338508',), 1353757263: ()} output_args : {1353757307: ('0.04252724984338508',), 1353757263: ('0.04252724984338508',), 1353757234: ('0.04252724984338508',), 1353757204: ('0.04252724984338508',), 1353757179: ('0.04252724984338508',), 1353756779: ('0.04252724984338508',), 1353756749: ('0.04252724984338508',), 1353756717: ('0.04252724984338508',), 1353756672: ('0.04252724984338508',), 1353756663: ('0.04252724984338508',), 1353756656: ('0.04252724984338508',)} args : 1353757263 depend.output_id : 0 input_args_next_step : {1353757307: ('0.04252724984338508',), 1353757263: ('0.04252724984338508',), 1353757234: ()} output_args : {1353757307: ('0.04252724984338508',), 1353757263: ('0.04252724984338508',), 1353757234: ('0.04252724984338508',), 1353757204: ('0.04252724984338508',), 1353757179: ('0.04252724984338508',), 1353756779: ('0.04252724984338508',), 1353756749: ('0.04252724984338508',), 1353756717: ('0.04252724984338508',), 1353756672: ('0.04252724984338508',), 1353756663: ('0.04252724984338508',), 1353756656: ('0.04252724984338508',)} args : 1353757234 depend.output_id : 0 input_args_next_step : {1353757307: ('0.04252724984338508',), 1353757263: ('0.04252724984338508',), 1353757234: ('0.04252724984338508',), 1353757204: ()} output_args : {1353757307: ('0.04252724984338508',), 1353757263: ('0.04252724984338508',), 1353757234: ('0.04252724984338508',), 1353757204: ('0.04252724984338508',), 1353757179: ('0.04252724984338508',), 1353756779: ('0.04252724984338508',), 1353756749: ('0.04252724984338508',), 1353756717: ('0.04252724984338508',), 1353756672: ('0.04252724984338508',), 1353756663: ('0.04252724984338508',), 1353756656: ('0.04252724984338508',)} args : 1353757204 depend.output_id : 0 input_args_next_step : {1353757307: ('0.04252724984338508',), 1353757263: ('0.04252724984338508',), 1353757234: ('0.04252724984338508',), 1353757204: ('0.04252724984338508',), 1353757179: ()} output_args : {1353757307: ('0.04252724984338508',), 1353757263: ('0.04252724984338508',), 1353757234: ('0.04252724984338508',), 1353757204: ('0.04252724984338508',), 1353757179: ('0.04252724984338508',), 1353756779: ('0.04252724984338508',), 1353756749: ('0.04252724984338508',), 1353756717: ('0.04252724984338508',), 1353756672: ('0.04252724984338508',), 1353756663: ('0.04252724984338508',), 1353756656: ('0.04252724984338508',)} args : 1353757179 depend.output_id : 0 input_args_next_step : {1353757307: ('0.04252724984338508',), 1353757263: ('0.04252724984338508',), 1353757234: ('0.04252724984338508',), 1353757204: ('0.04252724984338508',), 1353757179: ('0.04252724984338508',), 1353756779: ()} output_args : {1353757307: ('0.04252724984338508',), 1353757263: ('0.04252724984338508',), 1353757234: ('0.04252724984338508',), 1353757204: ('0.04252724984338508',), 1353757179: ('0.04252724984338508',), 1353756779: ('0.04252724984338508',), 1353756749: ('0.04252724984338508',), 1353756717: ('0.04252724984338508',), 1353756672: ('0.04252724984338508',), 1353756663: ('0.04252724984338508',), 1353756656: ('0.04252724984338508',)} args : 1353756779 depend.output_id : 0 input_args_next_step : {1353757307: ('0.04252724984338508',), 1353757263: ('0.04252724984338508',), 1353757234: ('0.04252724984338508',), 1353757204: ('0.04252724984338508',), 1353757179: ('0.04252724984338508',), 1353756779: ('0.04252724984338508',), 1353756749: ()} output_args : {1353757307: ('0.04252724984338508',), 1353757263: ('0.04252724984338508',), 1353757234: ('0.04252724984338508',), 1353757204: ('0.04252724984338508',), 1353757179: ('0.04252724984338508',), 1353756779: ('0.04252724984338508',), 1353756749: ('0.04252724984338508',), 1353756717: ('0.04252724984338508',), 1353756672: ('0.04252724984338508',), 1353756663: ('0.04252724984338508',), 1353756656: ('0.04252724984338508',)} args : 1353756749 depend.output_id : 0 input_args_next_step : {1353757307: ('0.04252724984338508',), 1353757263: ('0.04252724984338508',), 1353757234: ('0.04252724984338508',), 1353757204: ('0.04252724984338508',), 1353757179: ('0.04252724984338508',), 1353756779: ('0.04252724984338508',), 1353756749: ('0.04252724984338508',), 1353756717: ()} output_args : {1353757307: ('0.04252724984338508',), 1353757263: ('0.04252724984338508',), 1353757234: ('0.04252724984338508',), 1353757204: ('0.04252724984338508',), 1353757179: ('0.04252724984338508',), 1353756779: ('0.04252724984338508',), 1353756749: ('0.04252724984338508',), 1353756717: ('0.04252724984338508',), 1353756672: ('0.04252724984338508',), 1353756663: ('0.04252724984338508',), 1353756656: ('0.04252724984338508',)} args : 1353756717 depend.output_id : 0 input_args_next_step : {1353757307: ('0.04252724984338508',), 1353757263: ('0.04252724984338508',), 1353757234: ('0.04252724984338508',), 1353757204: ('0.04252724984338508',), 1353757179: ('0.04252724984338508',), 1353756779: ('0.04252724984338508',), 1353756749: ('0.04252724984338508',), 1353756717: ('0.04252724984338508',), 1353756672: ()} output_args : {1353757307: ('0.04252724984338508',), 1353757263: ('0.04252724984338508',), 1353757234: ('0.04252724984338508',), 1353757204: ('0.04252724984338508',), 1353757179: ('0.04252724984338508',), 1353756779: ('0.04252724984338508',), 1353756749: ('0.04252724984338508',), 1353756717: ('0.04252724984338508',), 1353756672: ('0.04252724984338508',), 1353756663: ('0.04252724984338508',), 1353756656: ('0.04252724984338508',)} args : 1353756672 depend.output_id : 0 input_args_next_step : {1353757307: ('0.04252724984338508',), 1353757263: ('0.04252724984338508',), 1353757234: ('0.04252724984338508',), 1353757204: ('0.04252724984338508',), 1353757179: ('0.04252724984338508',), 1353756779: ('0.04252724984338508',), 1353756749: ('0.04252724984338508',), 1353756717: ('0.04252724984338508',), 1353756672: ('0.04252724984338508',), 1353756663: ()} output_args : {1353757307: ('0.04252724984338508',), 1353757263: ('0.04252724984338508',), 1353757234: ('0.04252724984338508',), 1353757204: ('0.04252724984338508',), 1353757179: ('0.04252724984338508',), 1353756779: ('0.04252724984338508',), 1353756749: ('0.04252724984338508',), 1353756717: ('0.04252724984338508',), 1353756672: ('0.04252724984338508',), 1353756663: ('0.04252724984338508',), 1353756656: ('0.04252724984338508',)} args : 1353756663 depend.output_id : 0 input_args_next_step : {1353757307: ('0.04252724984338508',), 1353757263: ('0.04252724984338508',), 1353757234: ('0.04252724984338508',), 1353757204: ('0.04252724984338508',), 1353757179: ('0.04252724984338508',), 1353756779: ('0.04252724984338508',), 1353756749: ('0.04252724984338508',), 1353756717: ('0.04252724984338508',), 1353756672: ('0.04252724984338508',), 1353756663: ('0.04252724984338508',), 1353756656: ()} output_args : {1353757307: ('0.04252724984338508',), 1353757263: ('0.04252724984338508',), 1353757234: ('0.04252724984338508',), 1353757204: ('0.04252724984338508',), 1353757179: ('0.04252724984338508',), 1353756779: ('0.04252724984338508',), 1353756749: ('0.04252724984338508',), 1353756717: ('0.04252724984338508',), 1353756672: ('0.04252724984338508',), 1353756663: ('0.04252724984338508',), 1353756656: ('0.04252724984338508',)} args : 1353756656 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 : {22436117: [{'plastique': 22436135, 'Carton_gris': 22436136, 'autre_refus': 22436137, 'metal': 22436138, 'flou': 22436139, 'environnement': 22436140, 'kraft': 22436141, 'Teint_Dans_La_Masse': 22436142, 'mal_croppe': 22436143, 'cartonnette': 22436144, 'Carton_brun': 22436145, 'papier': 22436146}]} input_args_next_step : {1353757307: ('0.04252724984338508',), 1353757263: ('0.04252724984338508',), 1353757234: ('0.04252724984338508',), 1353757204: ('0.04252724984338508',), 1353757179: ('0.04252724984338508',), 1353756779: ('0.04252724984338508',), 1353756749: ('0.04252724984338508',), 1353756717: ('0.04252724984338508',), 1353756672: ('0.04252724984338508',), 1353756663: ('0.04252724984338508',), 1353756656: ('0.04252724984338508',), 22436117: ()} output_args : {22436117: [{'plastique': 22436135, 'Carton_gris': 22436136, 'autre_refus': 22436137, 'metal': 22436138, 'flou': 22436139, 'environnement': 22436140, 'kraft': 22436141, 'Teint_Dans_La_Masse': 22436142, 'mal_croppe': 22436143, 'cartonnette': 22436144, 'Carton_brun': 22436145, 'papier': 22436146}]} args : 22436117 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 :12, first value : ('0.04252724984338508',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22436117) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {} map_subphoto_mainphoto : {} dans la step send mail cod work_area: /home/admin/workarea/git/Velours/python in order to get the selector url, please entre the license of selector SELECT photo_id, url FROM MTRBack.photos ph WHERE photo_id IN (1353757307,1353757263,1353757234,1353757204,1353757179,1353756779,1353756749,1353756717,1353756672,1353756663,1353756656) Found this number of photos: 11 ##### Call download_photos : nb_thread : 5 begin to download photo : 1353756656 begin to download photo : 1353756717 begin to download photo : 1353757179 begin to download photo : 1353757263 download finish for photo 1353756717 begin to download photo : 1353756749 download finish for photo 1353756656 begin to download photo : 1353756663 download finish for photo 1353757179 begin to download photo : 1353757204 download finish for photo 1353757263 begin to download photo : 1353757307 download finish for photo 1353756749 begin to download photo : 1353756779 download finish for photo 1353756663 begin to download photo : 1353756672 download finish for photo 1353757204 begin to download photo : 1353757234 download finish for photo 1353757307 download finish for photo 1353756779 download finish for photo 1353757234 download finish for photo 1353756672 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette224361351745585460/ length of list_filenames : 11 ; length of list_pids : 11 ; length of list_args : 11 results_Auto_P22436117_25-04-2025_14_51_00.pdf 22436135 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=22436135 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette224361351745585460 22436137 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=22436137 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1353757864: '1745585353_2029286_1353755879_7dc293d99ec4924d54105c3e2472221b_rle_crop_3769998556_0.png'} change filename to text .imagette224361371745585460/ imagette224361371745585460/1745585353_2029286_1353755879_7dc293d99ec4924d54105c3e2472221b_rle_crop_3769998556_0.png.png imagette224361381745585460/ imagette224361391745585460/ wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/25/b2e0d6e4fa031113ef40a1536af920e7_14903882.png imagette224361371745585460 22436138 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=22436138 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette224361381745585460 22436139 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=22436139 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette224361391745585460 22436141 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=22436141 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1353757952: '1745585353_2029286_1353756403_c07ce257dd3b0c271d13c8390f55ab7f_rle_crop_3769998532_0.png', 1353757954: '1745585353_2029286_1353756403_c07ce257dd3b0c271d13c8390f55ab7f_rle_crop_3769998533_0.png', 1353757955: '1745585353_2029286_1353755601_9ba26addd2a08202b19f71489b8c659a_rle_crop_3769998644_0.png', 1353757957: '1745585353_2029286_1353755601_9ba26addd2a08202b19f71489b8c659a_rle_crop_3769998641_0.png', 1353757958: '1745585353_2029286_1353755601_9ba26addd2a08202b19f71489b8c659a_rle_crop_3769998638_0.png', 1353757959: '1745585353_2029286_1353755601_9ba26addd2a08202b19f71489b8c659a_rle_crop_3769998634_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/25/244174d0fef50849f02f8d35c38fb769_63698244.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/25/faecdeaa3a0d57abd1b43f0dd654b225_1038199.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/25/6ba13590cb4ae1e800480e8b206261dd_21652660.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/25/fa117a7ec8bf350565d3046886d1a377_13842745.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/25/704d506bc5d02749bd5486c126bfddbd_94116982.png change filename to text .imagette224361411745585460/ imagette224361411745585460/1745585353_2029286_1353756403_c07ce257dd3b0c271d13c8390f55ab7f_rle_crop_3769998533_0.png.png imagette224361411745585460/1745585353_2029286_1353756403_c07ce257dd3b0c271d13c8390f55ab7f_rle_crop_3769998532_0.png.png imagette224361411745585460/1745585353_2029286_1353755601_9ba26addd2a08202b19f71489b8c659a_rle_crop_3769998641_0.png.png imagette224361411745585460/1745585353_2029286_1353755601_9ba26addd2a08202b19f71489b8c659a_rle_crop_3769998638_0.png.png imagette224361411745585460/1745585353_2029286_1353755601_9ba26addd2a08202b19f71489b8c659a_rle_crop_3769998634_0.png.png imagette224361411745585460/1745585353_2029286_1353755601_9ba26addd2a08202b19f71489b8c659a_rle_crop_3769998644_0.png.png imagette224361431745585461/ wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/25/de3cbe68aa32459057e16bfe057d6e86_89589593.png imagette224361411745585460 22436143 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=22436143 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette224361431745585461 22436144 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=22436144 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1353757897: '1745585353_2029286_1353755784_951d96708d5d924884d071dd7c3ac125_rle_crop_3769998577_0.png'} change filename to text .imagette224361441745585461/ imagette224361441745585461/1745585353_2029286_1353755784_951d96708d5d924884d071dd7c3ac125_rle_crop_3769998577_0.png.png wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/25/c6eec292abd93edb5da94da0ece9eab1_91219164.png imagette224361441745585461 22436136 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=22436136 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1353757882: '1745585353_2029286_1353755784_951d96708d5d924884d071dd7c3ac125_rle_crop_3769998580_0.png', 1353757883: '1745585353_2029286_1353755784_951d96708d5d924884d071dd7c3ac125_rle_crop_3769998570_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/25/7b0bccf94689f4ee33dad06dd1abd15c_54104131.png change filename to text .imagette224361361745585461/ imagette224361361745585461/1745585353_2029286_1353755784_951d96708d5d924884d071dd7c3ac125_rle_crop_3769998570_0.png.png imagette224361361745585461/1745585353_2029286_1353755784_951d96708d5d924884d071dd7c3ac125_rle_crop_3769998580_0.png.png wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/25/4aad6bd9265e86f5853a87c4a7841562_6681490.png imagette224361361745585461 22436142 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=22436142 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1353757850: '1745585353_2029286_1353755943_bcbc3adfe3938716be0bfe1847d9bd75_rle_crop_3769998549_0.png', 1353757851: '1745585353_2029286_1353755879_7dc293d99ec4924d54105c3e2472221b_rle_crop_3769998558_0.png', 1353757853: '1745585353_2029286_1353755784_951d96708d5d924884d071dd7c3ac125_rle_crop_3769998576_0.png', 1353757854: '1745585353_2029286_1353755729_09570b1c575fe7620ef0bf11770fd00d_rle_crop_3769998631_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/25/d1a5e29973b184808b4c56254de5eb29_5300661.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/25/c9f156b9ec9160b297249f67023708d1_21668803.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/25/b5d816ddf71a2019fc9d1e4e474b6f1d_75841464.png change filename to text .imagette224361421745585461/ imagette224361421745585461/1745585353_2029286_1353755943_bcbc3adfe3938716be0bfe1847d9bd75_rle_crop_3769998549_0.png.png imagette224361421745585461/1745585353_2029286_1353755784_951d96708d5d924884d071dd7c3ac125_rle_crop_3769998576_0.png.png imagette224361421745585461/1745585353_2029286_1353755879_7dc293d99ec4924d54105c3e2472221b_rle_crop_3769998558_0.png.png imagette224361421745585461/1745585353_2029286_1353755729_09570b1c575fe7620ef0bf11770fd00d_rle_crop_3769998631_0.png.png wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/25/cadf381e79f2dff49baad443094742bc_7062547.png imagette224361421745585461 22436145 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=22436145 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1353757916: '1745585353_2029286_1353755943_bcbc3adfe3938716be0bfe1847d9bd75_rle_crop_3769998543_0.png', 1353757917: '1745585353_2029286_1353755784_951d96708d5d924884d071dd7c3ac125_rle_crop_3769998572_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/25/422c08fc89a072f886a1b7cc2529d76d_89486658.png change filename to text .imagette224361451745585461/ imagette224361451745585461/1745585353_2029286_1353755784_951d96708d5d924884d071dd7c3ac125_rle_crop_3769998572_0.png.png imagette224361451745585461/1745585353_2029286_1353755943_bcbc3adfe3938716be0bfe1847d9bd75_rle_crop_3769998543_0.png.png wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/25/58b67ca4fc39a42ba3907f9730be7e8f_47844294.png imagette224361451745585461 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=22436117 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/22436147,22436148,22436149,22436150,22436151,22436152,22436153,22436154,22436155,22436156,22436157,22436158?tags=plastique,Carton_gris,autre_refus,metal,flou,environnement,kraft,Teint_Dans_La_Masse,mal_croppe,cartonnette,Carton_brun,papier your option no_mail is active, we will not send the real mail to your client args[1353757307] : ('0.04252724984338508',) no score found for photo 1353757307 We are sending mail with results at report@fotonower.com args[1353757263] : ('0.04252724984338508',) no score found for photo 1353757263 We are sending mail with results at report@fotonower.com args[1353757234] : ('0.04252724984338508',) no score found for photo 1353757234 We are sending mail with results at report@fotonower.com args[1353757204] : ('0.04252724984338508',) no score found for photo 1353757204 We are sending mail with results at report@fotonower.com args[1353757179] : ('0.04252724984338508',) no score found for photo 1353757179 We are sending mail with results at report@fotonower.com args[1353756779] : ('0.04252724984338508',) no score found for photo 1353756779 We are sending mail with results at report@fotonower.com args[1353756749] : ('0.04252724984338508',) no score found for photo 1353756749 We are sending mail with results at report@fotonower.com args[1353756717] : ('0.04252724984338508',) no score found for photo 1353756717 We are sending mail with results at report@fotonower.com args[1353756672] : ('0.04252724984338508',) no score found for photo 1353756672 We are sending mail with results at report@fotonower.com args[1353756663] : ('0.04252724984338508',) no score found for photo 1353756663 We are sending mail with results at report@fotonower.com args[1353756656] : ('0.04252724984338508',) no score found for photo 1353756656 We are sending mail with results at report@fotonower.com refus_total : 0.04252724984338508 2022-04-13 10:29:59 0 SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=22436117 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_P22436117_25-04-2025_14_51_00.pdf results_Auto_P22436117_25-04-2025_14_51_00.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22436117_25-04-2025_14_51_00.pdf start insert file to database insert into MTRUser.mtr_files (mtd_id,mtr_portfolio_id,text,url,format,tags,file_size,value) values ('4302','22436117','results_Auto_P22436117_25-04-2025_14_51_00.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22436117_25-04-2025_14_51_00.pdf','pdf','','0.15','0.04252724984338508') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22436117]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1353757307, 1353757263, 1353757234, 1353757204, 1353757179, 1353756779, 1353756749, 1353756717, 1353756672, 1353756663, 1353756656] map_info['map_portfolio_photo'] : {22436117: [1353757307, 1353757263, 1353757234, 1353757204, 1353757179, 1353756779, 1353756749, 1353756717, 1353756672, 1353756663, 1353756656, 1353756403, 1353756366, 1353756336, 1353756308, 1353755943, 1353755879, 1353755784, 1353755729, 1353755601]} final : False mtd_id 4302 list_pids : [1353757307, 1353757263, 1353757234, 1353757204, 1353757179, 1353756779, 1353756749, 1353756717, 1353756672, 1353756663, 1353756656] 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, '2762808') ('4302', '22436117', '1353757307', None, None, None, None, None, '2762808') ('4302', None, None, None, None, None, None, None, '2762808') ('4302', '22436117', '1353757263', None, None, None, None, None, '2762808') ('4302', None, None, None, None, None, None, None, '2762808') ('4302', '22436117', '1353757234', None, None, None, None, None, '2762808') ('4302', None, None, None, None, None, None, None, '2762808') ('4302', '22436117', '1353757204', None, None, None, None, None, '2762808') ('4302', None, None, None, None, None, None, None, '2762808') ('4302', '22436117', '1353757179', None, None, None, None, None, '2762808') ('4302', None, None, None, None, None, None, None, '2762808') ('4302', '22436117', '1353756779', None, None, None, None, None, '2762808') ('4302', None, None, None, None, None, None, None, '2762808') ('4302', '22436117', '1353756749', None, None, None, None, None, '2762808') ('4302', None, None, None, None, None, None, None, '2762808') ('4302', '22436117', '1353756717', None, None, None, None, None, '2762808') ('4302', None, None, None, None, None, None, None, '2762808') ('4302', '22436117', '1353756672', None, None, None, None, None, '2762808') ('4302', None, None, None, None, None, None, None, '2762808') ('4302', '22436117', '1353756663', None, None, None, None, None, '2762808') ('4302', None, None, None, None, None, None, None, '2762808') ('4302', '22436117', '1353756656', None, None, None, None, None, '2762808') 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', '22436117', '1353757307', None, None, None, None, None, '2762808'), ('4302', '22436117', '1353757263', None, None, None, None, None, '2762808'), ('4302', '22436117', '1353757234', None, None, None, None, None, '2762808'), ('4302', '22436117', '1353757204', None, None, None, None, None, '2762808'), ('4302', '22436117', '1353757179', None, None, None, None, None, '2762808'), ('4302', '22436117', '1353756779', None, None, None, None, None, '2762808'), ('4302', '22436117', '1353756749', None, None, None, None, None, '2762808'), ('4302', '22436117', '1353756717', None, None, None, None, None, '2762808'), ('4302', '22436117', '1353756672', None, None, None, None, None, '2762808'), ('4302', '22436117', '1353756663', None, None, None, None, None, '2762808'), ('4302', '22436117', '1353756656', None, None, None, None, None, '2762808')] time used for this insertion : 0.014711141586303711 save_final save missing photos in datou_result : time spend for datou_step_exec : 2.557365655899048 time spend to save output : 0.015114784240722656 total time spend for step 4 : 2.5724804401397705 step5:split_time_score Fri Apr 25 14:51:02 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : ['22436117'] 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 : [('22436117',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22436117) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1353757263: {'path': 'temp/1745585460_1769567_1353757263_a812c834384689e7897084434663a7c7.jpg', 'extension': 'jpg'}, 1353757307: {'path': 'temp/1745585460_1769567_1353757307_f66933d173cdc5af16cc17ac9114d0c1.jpg', 'extension': 'jpg'}, 1353756717: {'path': 'temp/1745585460_1769567_1353756717_c50ad17ef5de31e723b3696cdbf9a265.jpg', 'extension': 'jpg'}, 1353756749: {'path': 'temp/1745585460_1769567_1353756749_579eb22d1b9c6fe9552459a77b8982fc.jpg', 'extension': 'jpg'}, 1353756779: {'path': 'temp/1745585460_1769567_1353756779_3f5c72eb7b238757df295695529b386d.jpg', 'extension': 'jpg'}, 1353757179: {'path': 'temp/1745585460_1769567_1353757179_be1797e3c631d2cb44dab2dc080abcd5.jpg', 'extension': 'jpg'}, 1353757204: {'path': 'temp/1745585460_1769567_1353757204_34ba9fca57ed5e7088116dfac18330fe.jpg', 'extension': 'jpg'}, 1353757234: {'path': 'temp/1745585460_1769567_1353757234_917ff5a87b18668f173460824d8ea21e.jpg', 'extension': 'jpg'}, 1353756656: {'path': 'temp/1745585460_1769567_1353756656_661f63d4f4c1506eaf2ab2b0415a2d6e.jpg', 'extension': 'jpg'}, 1353756663: {'path': 'temp/1745585460_1769567_1353756663_42e5b679fca035dbeffab4f91639a39e.jpg', 'extension': 'jpg'}, 1353756672: {'path': 'temp/1745585460_1769567_1353756672_e8150533ac38f268f06b1878407290ba.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 = 22436117; (('arc_en_ciel_jrm',),) TODO : Insert select and so on Begin split_port_in_batch_balle thcls : [{'id': 861, 'mtr_user_id': 31, 'name': 'Rungis_class_dechets_1212', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': 'Rungis_Aluminium,Rungis_Carton,Rungis_Papier,Rungis_Plastique_clair,Rungis_Plastique_dur,Rungis_Plastique_fonce,Rungis_Tapis_vide,Rungis_Tetrapak', 'svm_portfolios_learning': '1160730,571842,571844,571839,571933,571840,571841,572307', 'photo_hashtag_type': 999, 'photo_desc_type': 3963, 'type_classification': 'caffe', 'hashtag_id_list': '2107751280,2107750907,2107750908,2107750909,2107750910,2107750911,2107750912,2107750913'}] thcls : [{'id': 758, 'mtr_user_id': 31, 'name': 'Rungis_amount_dechets_fall_2018_v2', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': '05102018_Papier_non_papier_dense,05102018_Papier_non_papier_peu_dense,05102018_Papier_non_papier_presque_vide,05102018_Papier_non_papier_tres_dense,05102018_Papier_non_papier_tres_peu_dense', 'svm_portfolios_learning': '1108385,1108386,1108388,1108384,1108387', 'photo_hashtag_type': 856, 'photo_desc_type': 3853, 'type_classification': 'caffe', 'hashtag_id_list': '2107751013,2107751014,2107751015,2107751016,2107751017'}] select SUBSTRING(ph.text,16,2) as h, count(*) from MTRUser.mtr_portfolio_photos mpp inner join MTRBack.photos ph on mpp.mtr_photo_id = ph.photo_id where mpp.mtr_portfolio_id = 22436117 group by h (('14', 20),) SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=22436117 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 (22436117) 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 (22436117) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 25042025 22436117 Nombre de photos uploadées : 20 / 23040 (0%) 25042025 22436117 Nombre de photos taguées (types de déchets): 0 / 20 (0%) 25042025 22436117 Nombre de photos taguées (volume) : 0 / 20 (0%) [{'photo_id': 1353755943, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/25/bcbc3adfe3938716be0bfe1847d9bd75.jpg', 'username': None, 'uploaded_at': 1745585167, 'text': 'image_25042025_14_45_04_10143.jpg'}, {'photo_id': 1353755879, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/25/7dc293d99ec4924d54105c3e2472221b.jpg', 'username': None, 'uploaded_at': 1745585167, 'text': 'image_25042025_14_45_14_10139.jpg'}, {'photo_id': 1353755784, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/25/951d96708d5d924884d071dd7c3ac125.jpg', 'username': None, 'uploaded_at': 1745585167, 'text': 'image_25042025_14_45_24_10142.jpg'}, {'photo_id': 1353755729, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/25/09570b1c575fe7620ef0bf11770fd00d.jpg', 'username': None, 'uploaded_at': 1745585167, 'text': 'image_25042025_14_45_33_9129.jpg'}] 0 [] elapsed_time : load_data_split_time_score 3.5762786865234375e-06 elapsed_time : order_list_meta_photo_and_scores 1.0967254638671875e-05 ???????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.0009288787841796875 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 22436117, '2025-04-25' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (1747621,979,"{}"); elapsed_time : insert_dashboard_record_day_entry 0.033844709396362305 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= 1747621 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 1747621, 'dashboard_run_id': 1757251, 'mtr_portfolio_id': 22434112, 'dashboard_result_id': 10105504, '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_P22434112_25-04-2025_14_18_57.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22434151, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22434152, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22434153, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22434154, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22434155, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22434156, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22434157, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22434158, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22434159, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22434160, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22434161, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22434162, 'pht': 3726}}"}, {'dashboat_entry_day': 1747621, 'dashboard_run_id': 1757251, 'mtr_portfolio_id': 22434806, 'dashboard_result_id': 10105505, '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_P22434806_25-04-2025_14_35_02.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22434822, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22434823, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22434824, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22434825, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22434826, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22434827, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22434828, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22434829, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22434830, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22434831, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22434832, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22434833, 'pht': 3726}}"}, {'dashboat_entry_day': 1747621, 'dashboard_run_id': 1757251, 'mtr_portfolio_id': 22435288, 'dashboard_result_id': 10105506, '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_P22435288_25-04-2025_14_49_00.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22435315, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22435316, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22435317, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22435318, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22435319, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22435320, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22435321, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22435322, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22435323, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22435324, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22435325, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22435326, 'pht': 3726}}"}, {'dashboat_entry_day': 1747621, 'dashboard_run_id': 1757251, 'mtr_portfolio_id': 22436117, 'dashboard_result_id': 10105507, '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_P22436117_25-04-2025_14_49_01.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22436135, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22436136, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22436137, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22436138, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22436139, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22436140, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22436141, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22436142, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22436143, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22436144, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22436145, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22436146, '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 = 22434112 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': 2762647, 'mtr_portfolio_id': 22434112, 'created_at': datetime.datetime(2025, 4, 25, 14, 18, 56), 'result': '0.06644962213675805', 'result_long': None, 'result_double': None}] Qualite : 0.06644962213675805 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22434112 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22434112_25-04-2025_14_18_57.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22434112 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_P22434112_25-04-2025_14_18_57.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22434151, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22434152, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22434153, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22434154, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22434155, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22434156, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22434157, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22434158, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22434159, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22434160, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22434161, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22434162, 'pht': 3726}}" where mtr_portfolio_id = 22434112 and dashboard_run_id = 1757251 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`=22434112 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10105504, 0.06644962213675805, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22434112_25-04-2025_14_18_57.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22434151, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22434152, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22434153, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22434154, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22434155, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22434156, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22434157, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22434158, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22434159, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22434160, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22434161, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22434162, '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 = 22434806 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': 2762707, 'mtr_portfolio_id': 22434806, 'created_at': datetime.datetime(2025, 4, 25, 14, 35, 1), 'result': '0.06111119666581846', 'result_long': None, 'result_double': None}] Qualite : 0.06111119666581846 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22434806 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22434806_25-04-2025_14_35_02.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22434806 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_P22434806_25-04-2025_14_35_02.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22434822, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22434823, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22434824, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22434825, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22434826, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22434827, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22434828, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22434829, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22434830, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22434831, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22434832, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22434833, 'pht': 3726}}" where mtr_portfolio_id = 22434806 and dashboard_run_id = 1757251 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`=22434806 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10105505, 0.06111119666581846, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22434806_25-04-2025_14_35_02.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22434822, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22434823, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22434824, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22434825, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22434826, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22434827, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22434828, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22434829, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22434830, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22434831, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22434832, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22434833, '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 = 22435288 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': 2762763, 'mtr_portfolio_id': 22435288, 'created_at': datetime.datetime(2025, 4, 25, 14, 48, 59), 'result': '0.05598256966510362', 'result_long': None, 'result_double': None}] Qualite : 0.05598256966510362 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22435288 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22435288_25-04-2025_14_49_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22435288 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_P22435288_25-04-2025_14_49_00.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22435315, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22435316, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22435317, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22435318, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22435319, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22435320, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22435321, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22435322, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22435323, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22435324, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22435325, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22435326, 'pht': 3726}}" where mtr_portfolio_id = 22435288 and dashboard_run_id = 1757251 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`=22435288 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10105506, 0.05598256966510362, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22435288_25-04-2025_14_49_00.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22435315, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22435316, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22435317, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22435318, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22435319, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22435320, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22435321, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22435322, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22435323, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22435324, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22435325, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22435326, '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 = 22436117 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': 2762808, 'mtr_portfolio_id': 22436117, 'created_at': datetime.datetime(2025, 4, 25, 14, 50, 59), 'result': '0.04252724984338508', 'result_long': None, 'result_double': None}] Qualite : 0.04252724984338508 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22436117 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22436117_25-04-2025_14_51_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22436117 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_P22436117_25-04-2025_14_51_00.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22436135, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22436136, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22436137, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22436138, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22436139, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22436140, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22436141, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22436142, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22436143, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22436144, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22436145, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22436146, 'pht': 3726}}" where mtr_portfolio_id = 22436117 and dashboard_run_id = 1757251 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`=22436117 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10105507, 0.04252724984338508, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22436117_25-04-2025_14_51_00.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22436135, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22436136, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22436137, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22436138, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22436139, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22436140, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22436141, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22436142, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22436143, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22436144, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22436145, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22436146, '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 (22434112,22434806,22435288,22436117) result : ((1353714738,), (1353714784,), (1353714836,), (1353715961,), (1353716051,), (1353716180,), (1353716238,), (1353716296,), (1353716338,), (1353716944,), (1353717011,), (1353717073,), (1353717132,), (1353717793,), (1353717827,), (1353717984,), (1353718288,), (1353718317,), (1353718345,), (1353718357,), (1353718360,), (1353718362,), (1353718493,), (1353718501,), (1353718504,), (1353718506,), (1353718509,), (1353718511,), (1353718560,), (1353718586,), (1353718621,), (1353719519,), (1353719545,), (1353719571,), (1353719700,), (1353720380,), (1353720494,), (1353720569,), (1353720623,), (1353721351,), (1353721403,), (1353721448,), (1353721478,), (1353721506,), (1353721858,), (1353721991,), (1353722123,), (1353722217,), (1353722941,), (1353723021,), (1353723126,), (1353724048,), (1353724118,), (1353724197,), (1353724259,), (1353724350,), (1353725136,), (1353725197,), (1353725251,), (1353725294,), (1353725640,), (1353725442,), (1353725467,), (1353725513,), (1353725573,), (1353725940,), (1353725941,), (1353725944,), (1353726391,), (1353726419,), (1353726448,), (1353726478,), (1353726509,), (1353728142,), (1353729517,), (1353729714,), (1353735099,), (1353735140,), (1353735657,), (1353735739,), (1353735816,), (1353736910,), (1353737034,), (1353737167,), (1353737324,), (1353739654,), (1353738924,), (1353739072,), (1353739195,), (1353739334,), (1353739541,), (1353740474,), (1353740643,), (1353740741,), (1353740773,), (1353740825,), (1353740991,), (1353740993,), (1353740996,), (1353741647,), (1353741700,), (1353741755,), (1353741834,), (1353741889,), (1353741936,), (1353742485,), (1353742545,), (1353742596,), (1353742646,), (1353742697,), (1353743328,), (1353743393,), (1353743422,), (1353743429,), (1353744555,), (1353744561,), (1353744563,), (1353744595,), (1353744892,), (1353745167,), (1353746483,), (1353746604,), (1353746759,), (1353747039,), (1353747161,), (1353748219,), (1353748269,), (1353748343,), (1353748434,), (1353748506,), (1353748678,), (1353749636,), (1353749741,), (1353749836,), (1353749925,), (1353750101,), (1353750496,), (1353751503,), (1353751616,), (1353751731,), (1353751862,), (1353753030,), (1353753144,), (1353753247,), (1353753336,), (1353753421,), (1353753527,), (1353754169,), (1353754171,), (1353754174,), (1353754761,), (1353754803,), (1353754833,), (1353755185,), (1353755189,), (1353755192,), (1353755194,), (1353756002,), (1353755601,), (1353755729,), (1353755784,), (1353755879,), (1353755943,), (1353756308,), (1353756336,), (1353756366,), (1353756403,), (1353756656,), (1353756663,), (1353756672,), (1353756717,), (1353756749,), (1353756779,), (1353757179,), (1353757204,), (1353757234,), (1353757263,), (1353757307,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'25042025': {'nb_upload': 20, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22436117]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1353757307, 1353757263, 1353757234, 1353757204, 1353757179, 1353756779, 1353756749, 1353756717, 1353756672, 1353756663, 1353756656] map_info['map_portfolio_photo'] : {22436117: [1353757307, 1353757263, 1353757234, 1353757204, 1353757179, 1353756779, 1353756749, 1353756717, 1353756672, 1353756663, 1353756656, 1353756403, 1353756366, 1353756336, 1353756308, 1353755943, 1353755879, 1353755784, 1353755729, 1353755601]} final : True mtd_id 4302 list_pids : [1353757307, 1353757263, 1353757234, 1353757204, 1353757179, 1353756779, 1353756749, 1353756717, 1353756672, 1353756663, 1353756656] Looping around the photos to save general results len do output : 1 /22436117Didn'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, '2762808') ('4302', '22436117', '1353757307', None, None, None, None, None, '2762808') ('4302', None, None, None, None, None, None, None, '2762808') ('4302', '22436117', '1353757263', None, None, None, None, None, '2762808') ('4302', None, None, None, None, None, None, None, '2762808') ('4302', '22436117', '1353757234', None, None, None, None, None, '2762808') ('4302', None, None, None, None, None, None, None, '2762808') ('4302', '22436117', '1353757204', None, None, None, None, None, '2762808') ('4302', None, None, None, None, None, None, None, '2762808') ('4302', '22436117', '1353757179', None, None, None, None, None, '2762808') ('4302', None, None, None, None, None, None, None, '2762808') ('4302', '22436117', '1353756779', None, None, None, None, None, '2762808') ('4302', None, None, None, None, None, None, None, '2762808') ('4302', '22436117', '1353756749', None, None, None, None, None, '2762808') ('4302', None, None, None, None, None, None, None, '2762808') ('4302', '22436117', '1353756717', None, None, None, None, None, '2762808') ('4302', None, None, None, None, None, None, None, '2762808') ('4302', '22436117', '1353756672', None, None, None, None, None, '2762808') ('4302', None, None, None, None, None, None, None, '2762808') ('4302', '22436117', '1353756663', None, None, None, None, None, '2762808') ('4302', None, None, None, None, None, None, None, '2762808') ('4302', '22436117', '1353756656', None, None, None, None, None, '2762808') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 12 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '22436117', 'None', None, None, None, None, '2762808'), ('4302', '22436117', '1353757307', None, None, None, None, None, '2762808'), ('4302', '22436117', '1353757263', None, None, None, None, None, '2762808'), ('4302', '22436117', '1353757234', None, None, None, None, None, '2762808'), ('4302', '22436117', '1353757204', None, None, None, None, None, '2762808'), ('4302', '22436117', '1353757179', None, None, None, None, None, '2762808'), ('4302', '22436117', '1353756779', None, None, None, None, None, '2762808'), ('4302', '22436117', '1353756749', None, None, None, None, None, '2762808'), ('4302', '22436117', '1353756717', None, None, None, None, None, '2762808'), ('4302', '22436117', '1353756672', None, None, None, None, None, '2762808'), ('4302', '22436117', '1353756663', None, None, None, None, None, '2762808'), ('4302', '22436117', '1353756656', None, None, None, None, None, '2762808')] time used for this insertion : 0.022608518600463867 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.3691530227661133 time spend to save output : 0.022934913635253906 total time spend for step 5 : 0.3920879364013672 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 (2762808) 2.41user 2.24system 0:08.88elapsed 52%CPU (0avgtext+0avgdata 160504maxresident)k 30464inputs+9008outputs (167major+75837minor)pagefaults 0swaps