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 : 3692978 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 (2593386) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (2593386) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20608978 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['2593386'] with mtr_portfolio_ids : ['20608978'] and first list_photo_ids : [] new path : /proc/3692978/ Name: python3 Umask: 0002 State: R (running) Tgid: 3692978 Ngid: 0 Pid: 3692978 PPid: 3692977 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 3692978 NSpid: 3692978 NSpgid: 3691976 NSsid: 3691976 VmPeak: 1106824 kB VmSize: 1106824 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 97360 kB VmRSS: 97360 kB RssAnon: 59752 kB RssFile: 37608 kB RssShmem: 0 kB VmData: 865576 kB VmStk: 132 kB VmExe: 2640 kB VmLib: 130468 kB VmPTE: 544 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: 49 nonvoluntary_ctxt_switches: 212 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '3692978', 'Ngid': '0', 'Pid': '3692978', 'PPid': '3692977', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '3692978', 'NSpid': '3692978', 'NSpgid': '3691976', 'NSsid': '3691976', 'VmPeak': '1106824 kB', 'VmSize': '1106824 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '97360 kB', 'VmRSS': '97360 kB', 'RssAnon': '59752 kB', 'RssFile': '37608 kB', 'RssShmem': '0 kB', 'VmData': '865576 kB', 'VmStk': '132 kB', 'VmExe': '2640 kB', 'VmLib': '130468 kB', 'VmPTE': '544 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': '49', 'nonvoluntary_ctxt_switches': '212'} ('datou_batch_current', '3692978', '1106824', '0', '1106824', '865576', '97360', b'', 'marlene', '2593386') 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 (20608978) 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 (2593386 ) ) 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 (20608978) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1338166443, 'portfolio_id': 20608978}, {'photo_id': 1338166431, 'portfolio_id': 20608978}, {'photo_id': 1338166371, 'portfolio_id': 20608978}, {'photo_id': 1338166197, 'portfolio_id': 20608978}, {'photo_id': 1338166173, 'portfolio_id': 20608978}, {'photo_id': 1338166136, 'portfolio_id': 20608978}, {'photo_id': 1338165810, 'portfolio_id': 20608978}, {'photo_id': 1338165806, 'portfolio_id': 20608978}, {'photo_id': 1338165805, 'portfolio_id': 20608978}, {'photo_id': 1338165463, 'portfolio_id': 20608978}, {'photo_id': 1338165368, 'portfolio_id': 20608978}, {'photo_id': 1338165290, 'portfolio_id': 20608978}, {'photo_id': 1338165211, 'portfolio_id': 20608978}, {'photo_id': 1338165143, 'portfolio_id': 20608978}, {'photo_id': 1338164835, 'portfolio_id': 20608978}, {'photo_id': 1338164829, 'portfolio_id': 20608978}, {'photo_id': 1338164828, 'portfolio_id': 20608978}, {'photo_id': 1338164764, 'portfolio_id': 20608978}, {'photo_id': 1338164751, 'portfolio_id': 20608978}, {'photo_id': 1338164749, 'portfolio_id': 20608978}, {'photo_id': 1338164184, 'portfolio_id': 20608978}, {'photo_id': 1338164183, 'portfolio_id': 20608978}, {'photo_id': 1338164158, 'portfolio_id': 20608978}, {'photo_id': 1338164157, 'portfolio_id': 20608978}, {'photo_id': 1338164151, 'portfolio_id': 20608978}, {'photo_id': 1338164110, 'portfolio_id': 20608978}, {'photo_id': 1338164015, 'portfolio_id': 20608978}, {'photo_id': 1338164013, 'portfolio_id': 20608978}, {'photo_id': 1338164010, 'portfolio_id': 20608978}, {'photo_id': 1338164009, 'portfolio_id': 20608978}] map_portfolio_id_photo_id: {20608978: [1338166443, 1338166431, 1338166371, 1338166197, 1338166173, 1338166136, 1338165810, 1338165806, 1338165805, 1338165463, 1338165368, 1338165290, 1338165211, 1338165143, 1338164835, 1338164829, 1338164828, 1338164764, 1338164751, 1338164749, 1338164184, 1338164183, 1338164158, 1338164157, 1338164151, 1338164110, 1338164015, 1338164013, 1338164010, 1338164009]} ##### 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.014587640762329102 #### 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 Mon Feb 17 14:24:29 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 (20608978) 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 : 20608978 get user id for portfolio 20608978 get sub ptf for main ptf 20608978, type 3726 and hashtags ['environnement', 'Teint_Dans_La_Masse', 'autre_refus', 'metal', 'mal_croppe', 'plastique', 'kraft', 'cartonnette', 'Carton_gris', 'papier', 'Carton_brun', 'flou'] 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`=20608978 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('environnement','Teint_Dans_La_Masse','autre_refus','metal','mal_croppe','plastique','kraft','cartonnette','Carton_gris','papier','Carton_brun','flou')) 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`=20608978 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('environnement','Teint_Dans_La_Masse','autre_refus','metal','mal_croppe','plastique','kraft','cartonnette','Carton_gris','papier','Carton_brun','flou')) AND mptpi.`min_score`=0.5 To do returned map {'Carton_gris': {'main_port_id': 20608978, 'sub_port_id': 20608982, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13265991, 'last_updated_at': datetime.datetime(2025, 2, 17, 14, 22, 58), 'last_updated_at_desc': datetime.datetime(2025, 2, 17, 14, 22, 58), 'last_updated_at_asc': datetime.datetime(2025, 2, 17, 14, 19, 28)}, 'papier': {'main_port_id': 20608978, 'sub_port_id': 20608983, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13265992, 'last_updated_at': datetime.datetime(2025, 2, 17, 14, 22, 58), 'last_updated_at_desc': datetime.datetime(2025, 2, 17, 14, 22, 58), 'last_updated_at_asc': datetime.datetime(2025, 2, 17, 14, 19, 28)}, 'Teint_Dans_La_Masse': {'main_port_id': 20608978, 'sub_port_id': 20608984, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13265993, 'last_updated_at': datetime.datetime(2025, 2, 17, 14, 22, 58), 'last_updated_at_desc': datetime.datetime(2025, 2, 17, 14, 22, 58), 'last_updated_at_asc': datetime.datetime(2025, 2, 17, 14, 19, 28)}, 'kraft': {'main_port_id': 20608978, 'sub_port_id': 20608985, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13265994, 'last_updated_at': datetime.datetime(2025, 2, 17, 14, 22, 58), 'last_updated_at_desc': datetime.datetime(2025, 2, 17, 14, 22, 58), 'last_updated_at_asc': datetime.datetime(2025, 2, 17, 14, 19, 28)}, 'cartonnette': {'main_port_id': 20608978, 'sub_port_id': 20608986, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13265995, 'last_updated_at': datetime.datetime(2025, 2, 17, 14, 22, 58), 'last_updated_at_desc': datetime.datetime(2025, 2, 17, 14, 22, 58), 'last_updated_at_asc': datetime.datetime(2025, 2, 17, 14, 19, 28)}, 'Carton_brun': {'main_port_id': 20608978, 'sub_port_id': 20608987, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13265996, 'last_updated_at': datetime.datetime(2025, 2, 17, 14, 22, 58), 'last_updated_at_desc': datetime.datetime(2025, 2, 17, 14, 22, 58), 'last_updated_at_asc': datetime.datetime(2025, 2, 17, 14, 19, 28)}, 'environnement': {'main_port_id': 20608978, 'sub_port_id': 20608988, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13265997, 'last_updated_at': datetime.datetime(2025, 2, 17, 14, 22, 58), 'last_updated_at_desc': datetime.datetime(2025, 2, 17, 14, 22, 58), 'last_updated_at_asc': datetime.datetime(2025, 2, 17, 14, 19, 28)}, 'plastique': {'main_port_id': 20608978, 'sub_port_id': 20608989, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13265998, 'last_updated_at': datetime.datetime(2025, 2, 17, 14, 22, 58), 'last_updated_at_desc': datetime.datetime(2025, 2, 17, 14, 22, 58), 'last_updated_at_asc': datetime.datetime(2025, 2, 17, 14, 19, 28)}, 'flou': {'main_port_id': 20608978, 'sub_port_id': 20608990, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13265999, 'last_updated_at': datetime.datetime(2025, 2, 17, 14, 22, 58), 'last_updated_at_desc': datetime.datetime(2025, 2, 17, 14, 22, 58), 'last_updated_at_asc': datetime.datetime(2025, 2, 17, 14, 19, 28)}, 'autre_refus': {'main_port_id': 20608978, 'sub_port_id': 20608991, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13266000, 'last_updated_at': datetime.datetime(2025, 2, 17, 14, 22, 58), 'last_updated_at_desc': datetime.datetime(2025, 2, 17, 14, 22, 58), 'last_updated_at_asc': datetime.datetime(2025, 2, 17, 14, 19, 28)}, 'mal_croppe': {'main_port_id': 20608978, 'sub_port_id': 20608992, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13266001, 'last_updated_at': datetime.datetime(2025, 2, 17, 14, 22, 58), 'last_updated_at_desc': datetime.datetime(2025, 2, 17, 14, 22, 58), 'last_updated_at_asc': datetime.datetime(2025, 2, 17, 14, 19, 28)}, 'metal': {'main_port_id': 20608978, 'sub_port_id': 20608993, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13266002, 'last_updated_at': datetime.datetime(2025, 2, 17, 14, 22, 58), 'last_updated_at_desc': datetime.datetime(2025, 2, 17, 14, 22, 58), 'last_updated_at_asc': datetime.datetime(2025, 2, 17, 14, 19, 28)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 20608982 , 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=20608978 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 (20608982) result : ((1338164843,), (1338165779,), (1338165780,), (1338165781,), (1338166362,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20608978) result : ((1338164009,), (1338164010,), (1338164013,), (1338164015,), (1338164110,), (1338164151,), (1338164157,), (1338164158,), (1338164183,), (1338164184,), (1338164749,), (1338164751,), (1338164764,), (1338164828,), (1338164829,), (1338164835,), (1338165143,), (1338165211,), (1338165290,), (1338165368,), (1338165463,), (1338165805,), (1338165806,), (1338165810,), (1338166136,), (1338166173,), (1338166197,), (1338166371,), (1338166431,), (1338166443,)) 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 20608983 , 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=20608978 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 (20608983) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20608978) result : ((1338164009,), (1338164010,), (1338164013,), (1338164015,), (1338164110,), (1338164151,), (1338164157,), (1338164158,), (1338164183,), (1338164184,), (1338164749,), (1338164751,), (1338164764,), (1338164828,), (1338164829,), (1338164835,), (1338165143,), (1338165211,), (1338165290,), (1338165368,), (1338165463,), (1338165805,), (1338165806,), (1338165810,), (1338166136,), (1338166173,), (1338166197,), (1338166371,), (1338166431,), (1338166443,)) 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 20608984 , 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=20608978 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 (20608984) result : ((1338164782,), (1338164783,), (1338164784,), (1338164785,), (1338164786,), (1338164787,), (1338164837,), (1338164838,), (1338164839,), (1338164840,), (1338165776,), (1338166194,), (1338166337,), (1338166338,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20608978) result : ((1338164009,), (1338164010,), (1338164013,), (1338164015,), (1338164110,), (1338164151,), (1338164157,), (1338164158,), (1338164183,), (1338164184,), (1338164749,), (1338164751,), (1338164764,), (1338164828,), (1338164829,), (1338164835,), (1338165143,), (1338165211,), (1338165290,), (1338165368,), (1338165463,), (1338165805,), (1338165806,), (1338165810,), (1338166136,), (1338166173,), (1338166197,), (1338166371,), (1338166431,), (1338166443,)) 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 20608985 , 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=20608978 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 (20608985) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20608978) result : ((1338164009,), (1338164010,), (1338164013,), (1338164015,), (1338164110,), (1338164151,), (1338164157,), (1338164158,), (1338164183,), (1338164184,), (1338164749,), (1338164751,), (1338164764,), (1338164828,), (1338164829,), (1338164835,), (1338165143,), (1338165211,), (1338165290,), (1338165368,), (1338165463,), (1338165805,), (1338165806,), (1338165810,), (1338166136,), (1338166173,), (1338166197,), (1338166371,), (1338166431,), (1338166443,)) 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 20608986 , 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=20608978 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 (20608986) result : ((1338164792,), (1338164844,), (1338164845,), (1338165782,), (1338165783,), (1338166380,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20608978) result : ((1338164009,), (1338164010,), (1338164013,), (1338164015,), (1338164110,), (1338164151,), (1338164157,), (1338164158,), (1338164183,), (1338164184,), (1338164749,), (1338164751,), (1338164764,), (1338164828,), (1338164829,), (1338164835,), (1338165143,), (1338165211,), (1338165290,), (1338165368,), (1338165463,), (1338165805,), (1338165806,), (1338165810,), (1338166136,), (1338166173,), (1338166197,), (1338166371,), (1338166431,), (1338166443,)) 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 20608987 , 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=20608978 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 (20608987) result : ((1338166420,), (1338166422,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20608978) result : ((1338164009,), (1338164010,), (1338164013,), (1338164015,), (1338164110,), (1338164151,), (1338164157,), (1338164158,), (1338164183,), (1338164184,), (1338164749,), (1338164751,), (1338164764,), (1338164828,), (1338164829,), (1338164835,), (1338165143,), (1338165211,), (1338165290,), (1338165368,), (1338165463,), (1338165805,), (1338165806,), (1338165810,), (1338166136,), (1338166173,), (1338166197,), (1338166371,), (1338166431,), (1338166443,)) 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 20608988 , 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=20608978 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 (20608988) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20608978) result : ((1338164009,), (1338164010,), (1338164013,), (1338164015,), (1338164110,), (1338164151,), (1338164157,), (1338164158,), (1338164183,), (1338164184,), (1338164749,), (1338164751,), (1338164764,), (1338164828,), (1338164829,), (1338164835,), (1338165143,), (1338165211,), (1338165290,), (1338165368,), (1338165463,), (1338165805,), (1338165806,), (1338165810,), (1338166136,), (1338166173,), (1338166197,), (1338166371,), (1338166431,), (1338166443,)) 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 20608989 , 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=20608978 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 (20608989) result : ((1338164847,), (1338165777,), (1338166430,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20608978) result : ((1338164009,), (1338164010,), (1338164013,), (1338164015,), (1338164110,), (1338164151,), (1338164157,), (1338164158,), (1338164183,), (1338164184,), (1338164749,), (1338164751,), (1338164764,), (1338164828,), (1338164829,), (1338164835,), (1338165143,), (1338165211,), (1338165290,), (1338165368,), (1338165463,), (1338165805,), (1338165806,), (1338165810,), (1338166136,), (1338166173,), (1338166197,), (1338166371,), (1338166431,), (1338166443,)) 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 20608990 , 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=20608978 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 (20608990) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20608978) result : ((1338164009,), (1338164010,), (1338164013,), (1338164015,), (1338164110,), (1338164151,), (1338164157,), (1338164158,), (1338164183,), (1338164184,), (1338164749,), (1338164751,), (1338164764,), (1338164828,), (1338164829,), (1338164835,), (1338165143,), (1338165211,), (1338165290,), (1338165368,), (1338165463,), (1338165805,), (1338165806,), (1338165810,), (1338166136,), (1338166173,), (1338166197,), (1338166371,), (1338166431,), (1338166443,)) 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 20608991 , 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=20608978 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 (20608991) result : ((1338164790,), (1338164791,), (1338164841,), (1338166195,), (1338166348,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20608978) result : ((1338164009,), (1338164010,), (1338164013,), (1338164015,), (1338164110,), (1338164151,), (1338164157,), (1338164158,), (1338164183,), (1338164184,), (1338164749,), (1338164751,), (1338164764,), (1338164828,), (1338164829,), (1338164835,), (1338165143,), (1338165211,), (1338165290,), (1338165368,), (1338165463,), (1338165805,), (1338165806,), (1338165810,), (1338166136,), (1338166173,), (1338166197,), (1338166371,), (1338166431,), (1338166443,)) 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 20608992 , 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=20608978 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 (20608992) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20608978) result : ((1338164009,), (1338164010,), (1338164013,), (1338164015,), (1338164110,), (1338164151,), (1338164157,), (1338164158,), (1338164183,), (1338164184,), (1338164749,), (1338164751,), (1338164764,), (1338164828,), (1338164829,), (1338164835,), (1338165143,), (1338165211,), (1338165290,), (1338165368,), (1338165463,), (1338165805,), (1338165806,), (1338165810,), (1338166136,), (1338166173,), (1338166197,), (1338166371,), (1338166431,), (1338166443,)) 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 20608993 , 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=20608978 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 (20608993) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20608978) result : ((1338164009,), (1338164010,), (1338164013,), (1338164015,), (1338164110,), (1338164151,), (1338164157,), (1338164158,), (1338164183,), (1338164184,), (1338164749,), (1338164751,), (1338164764,), (1338164828,), (1338164829,), (1338164835,), (1338165143,), (1338165211,), (1338165290,), (1338165368,), (1338165463,), (1338165805,), (1338165806,), (1338165810,), (1338166136,), (1338166173,), (1338166197,), (1338166371,), (1338166431,), (1338166443,)) 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`=20608978 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('environnement','Teint_Dans_La_Masse','autre_refus','metal','mal_croppe','plastique','kraft','cartonnette','Carton_gris','papier','Carton_brun','flou')) 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`=20608978 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('environnement','Teint_Dans_La_Masse','autre_refus','metal','mal_croppe','plastique','kraft','cartonnette','Carton_gris','papier','Carton_brun','flou')) AND mptpi.`min_score`=0.5 To do returned map {'Carton_gris': {'main_port_id': 20608978, 'sub_port_id': 20608994, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13266003, 'last_updated_at': datetime.datetime(2025, 2, 17, 14, 19, 29), 'last_updated_at_desc': datetime.datetime(2025, 2, 17, 14, 19, 29), 'last_updated_at_asc': datetime.datetime(2025, 2, 17, 14, 19, 29)}, 'papier': {'main_port_id': 20608978, 'sub_port_id': 20608995, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13266004, 'last_updated_at': datetime.datetime(2025, 2, 17, 14, 19, 29), 'last_updated_at_desc': datetime.datetime(2025, 2, 17, 14, 19, 29), 'last_updated_at_asc': datetime.datetime(2025, 2, 17, 14, 19, 29)}, 'Teint_Dans_La_Masse': {'main_port_id': 20608978, 'sub_port_id': 20608996, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13266005, 'last_updated_at': datetime.datetime(2025, 2, 17, 14, 19, 29), 'last_updated_at_desc': datetime.datetime(2025, 2, 17, 14, 19, 29), 'last_updated_at_asc': datetime.datetime(2025, 2, 17, 14, 19, 29)}, 'kraft': {'main_port_id': 20608978, 'sub_port_id': 20608997, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13266006, 'last_updated_at': datetime.datetime(2025, 2, 17, 14, 19, 29), 'last_updated_at_desc': datetime.datetime(2025, 2, 17, 14, 19, 29), 'last_updated_at_asc': datetime.datetime(2025, 2, 17, 14, 19, 29)}, 'cartonnette': {'main_port_id': 20608978, 'sub_port_id': 20608998, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13266007, 'last_updated_at': datetime.datetime(2025, 2, 17, 14, 19, 29), 'last_updated_at_desc': datetime.datetime(2025, 2, 17, 14, 19, 29), 'last_updated_at_asc': datetime.datetime(2025, 2, 17, 14, 19, 29)}, 'Carton_brun': {'main_port_id': 20608978, 'sub_port_id': 20608999, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13266008, 'last_updated_at': datetime.datetime(2025, 2, 17, 14, 19, 29), 'last_updated_at_desc': datetime.datetime(2025, 2, 17, 14, 19, 29), 'last_updated_at_asc': datetime.datetime(2025, 2, 17, 14, 19, 29)}, 'environnement': {'main_port_id': 20608978, 'sub_port_id': 20609000, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13266009, 'last_updated_at': datetime.datetime(2025, 2, 17, 14, 19, 29), 'last_updated_at_desc': datetime.datetime(2025, 2, 17, 14, 19, 29), 'last_updated_at_asc': datetime.datetime(2025, 2, 17, 14, 19, 29)}, 'plastique': {'main_port_id': 20608978, 'sub_port_id': 20609001, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13266010, 'last_updated_at': datetime.datetime(2025, 2, 17, 14, 19, 29), 'last_updated_at_desc': datetime.datetime(2025, 2, 17, 14, 19, 29), 'last_updated_at_asc': datetime.datetime(2025, 2, 17, 14, 19, 29)}, 'flou': {'main_port_id': 20608978, 'sub_port_id': 20609002, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13266011, 'last_updated_at': datetime.datetime(2025, 2, 17, 14, 19, 29), 'last_updated_at_desc': datetime.datetime(2025, 2, 17, 14, 19, 29), 'last_updated_at_asc': datetime.datetime(2025, 2, 17, 14, 19, 29)}, 'autre_refus': {'main_port_id': 20608978, 'sub_port_id': 20609003, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13266012, 'last_updated_at': datetime.datetime(2025, 2, 17, 14, 19, 29), 'last_updated_at_desc': datetime.datetime(2025, 2, 17, 14, 19, 29), 'last_updated_at_asc': datetime.datetime(2025, 2, 17, 14, 19, 29)}, 'mal_croppe': {'main_port_id': 20608978, 'sub_port_id': 20609004, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13266013, 'last_updated_at': datetime.datetime(2025, 2, 17, 14, 19, 29), 'last_updated_at_desc': datetime.datetime(2025, 2, 17, 14, 19, 29), 'last_updated_at_asc': datetime.datetime(2025, 2, 17, 14, 19, 29)}, 'metal': {'main_port_id': 20608978, 'sub_port_id': 20609005, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13266014, 'last_updated_at': datetime.datetime(2025, 2, 17, 14, 22, 58), 'last_updated_at_desc': datetime.datetime(2025, 2, 17, 14, 22, 58), 'last_updated_at_asc': datetime.datetime(2025, 2, 17, 14, 19, 29)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20608994,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20608982 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20608995,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20608983 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20608996,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20608984 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20608997,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20608985 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20608998,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20608986 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20608999,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20608987 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20609000,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20608988 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20609001,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20608989 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20609002,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20608990 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20609003,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20608991 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20609004,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20608992 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20609005,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20608993 lien utilise dans velours : https://www.fotonower.com/velours/20608994,20608995,20608996,20608997,20608998,20608999,20609000,20609001,20609002,20609003,20609004,20609005?tags=Carton_gris,papier,Teint_Dans_La_Masse,kraft,cartonnette,Carton_brun,environnement,plastique,flou,autre_refus,mal_croppe,metal After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([20608978]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1338166443, 1338166431, 1338166371, 1338166197, 1338166173, 1338166136] map_info['map_portfolio_photo'] : {20608978: [1338166443, 1338166431, 1338166371, 1338166197, 1338166173, 1338166136, 1338165810, 1338165806, 1338165805, 1338165463, 1338165368, 1338165290, 1338165211, 1338165143, 1338164835, 1338164829, 1338164828, 1338164764, 1338164751, 1338164749, 1338164184, 1338164183, 1338164158, 1338164157, 1338164151, 1338164110, 1338164015, 1338164013, 1338164010, 1338164009]} final : False mtd_id 4302 list_pids : [1338166443, 1338166431, 1338166371, 1338166197, 1338166173, 1338166136] Looping around the photos to save general results len do output : 1 /20608978. 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, '2593386') ('4302', '20608978', '1338166443', None, None, None, None, None, '2593386') ('4302', None, None, None, None, None, None, None, '2593386') ('4302', '20608978', '1338166431', None, None, None, None, None, '2593386') ('4302', None, None, None, None, None, None, None, '2593386') ('4302', '20608978', '1338166371', None, None, None, None, None, '2593386') ('4302', None, None, None, None, None, None, None, '2593386') ('4302', '20608978', '1338166197', None, None, None, None, None, '2593386') ('4302', None, None, None, None, None, None, None, '2593386') ('4302', '20608978', '1338166173', None, None, None, None, None, '2593386') ('4302', None, None, None, None, None, None, None, '2593386') ('4302', '20608978', '1338166136', None, None, None, None, None, '2593386') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 7 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, '20608978', "{'Carton_gris': 20608982, 'papier': 20608983, 'Teint_Dans_La_Masse': 20608984, 'kraft': 20608985, 'cartonnette': 20608986, 'Carton_brun': 20608987, 'environnement': 20608988, 'plastique': 20608989, 'flou': 20608990, 'autre_refus': 20608991, 'mal_croppe': 20608992, 'metal': 20608993}", None, None, None, None, '2593386'), ('4302', '20608978', '1338166443', None, None, None, None, None, '2593386'), ('4302', '20608978', '1338166431', None, None, None, None, None, '2593386'), ('4302', '20608978', '1338166371', None, None, None, None, None, '2593386'), ('4302', '20608978', '1338166197', None, None, None, None, None, '2593386'), ('4302', '20608978', '1338166173', None, None, None, None, None, '2593386'), ('4302', '20608978', '1338166136', None, None, None, None, None, '2593386')] time used for this insertion : 0.14849424362182617 save_final save missing photos in datou_result : time spend for datou_step_exec : 2.0483016967773438 time spend to save output : 0.14883041381835938 total time spend for step 1 : 2.197132110595703 step2:final Mon Feb 17 14:24:31 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 (20608978) 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 20608978 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1338164015,1338164013,1338164010,1338164009,1338164158,1338164157,1338164151,1338164110,1338164184,1338164183,1338164764,1338164751,1338164749,1338164835,1338164829,1338164828,1338165463,1338165368,1338165290,1338165211,1338165143,1338165810,1338165806,1338165805,1338166197,1338166173,1338166136,1338166443,1338166431,1338166371); 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([20608978]) Inside saveOutput : final : False verbose : True original output for save of step final : {1338166443: ('0.03785267494921711',), 1338166431: ('0.03785267494921711',), 1338166371: ('0.03785267494921711',), 1338166197: ('0.03785267494921711',), 1338166173: ('0.03785267494921711',), 1338166136: ('0.03785267494921711',)} new output for save of step final : {1338166443: ('0.03785267494921711',), 1338166431: ('0.03785267494921711',), 1338166371: ('0.03785267494921711',), 1338166197: ('0.03785267494921711',), 1338166173: ('0.03785267494921711',), 1338166136: ('0.03785267494921711',)} [1338166443, 1338166431, 1338166371, 1338166197, 1338166173, 1338166136] map_info['map_portfolio_photo'] : {20608978: [1338166443, 1338166431, 1338166371, 1338166197, 1338166173, 1338166136, 1338165810, 1338165806, 1338165805, 1338165463, 1338165368, 1338165290, 1338165211, 1338165143, 1338164835, 1338164829, 1338164828, 1338164764, 1338164751, 1338164749, 1338164184, 1338164183, 1338164158, 1338164157, 1338164151, 1338164110, 1338164015, 1338164013, 1338164010, 1338164009]} final : False mtd_id 4302 list_pids : [1338166443, 1338166431, 1338166371, 1338166197, 1338166173, 1338166136] Looping around the photos to save general results len do output : 6 /1338166443.Didn't retrieve data . /1338166431.Didn't retrieve data . /1338166371.Didn't retrieve data . /1338166197.Didn't retrieve data . /1338166173.Didn't retrieve data . /1338166136.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, '2593386') ('4302', '20608978', '1338166443', None, None, None, None, None, '2593386') ('4302', None, None, None, None, None, None, None, '2593386') ('4302', '20608978', '1338166431', None, None, None, None, None, '2593386') ('4302', None, None, None, None, None, None, None, '2593386') ('4302', '20608978', '1338166371', None, None, None, None, None, '2593386') ('4302', None, None, None, None, None, None, None, '2593386') ('4302', '20608978', '1338166197', None, None, None, None, None, '2593386') ('4302', None, None, None, None, None, None, None, '2593386') ('4302', '20608978', '1338166173', None, None, None, None, None, '2593386') ('4302', None, None, None, None, None, None, None, '2593386') ('4302', '20608978', '1338166136', None, None, None, None, None, '2593386') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 18 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', '20608978', '1338166443', '0.03785267494921711', None, None, None, None, '2593386'), ('4302', '20608978', '1338166431', '0.03785267494921711', None, None, None, None, '2593386'), ('4302', '20608978', '1338166371', '0.03785267494921711', None, None, None, None, '2593386'), ('4302', '20608978', '1338166197', '0.03785267494921711', None, None, None, None, '2593386'), ('4302', '20608978', '1338166173', '0.03785267494921711', None, None, None, None, '2593386'), ('4302', '20608978', '1338166136', '0.03785267494921711', None, None, None, None, '2593386')] time used for this insertion : 0.01346898078918457 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.07337307929992676 time spend to save output : 0.013886451721191406 total time spend for step 2 : 0.08725953102111816 step3:velours_tree Mon Feb 17 14:24:31 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 : {20608978: [{'Carton_gris': 20608982, 'papier': 20608983, 'Teint_Dans_La_Masse': 20608984, 'kraft': 20608985, 'cartonnette': 20608986, 'Carton_brun': 20608987, 'environnement': 20608988, 'plastique': 20608989, 'flou': 20608990, 'autre_refus': 20608991, 'mal_croppe': 20608992, 'metal': 20608993}]} input_args_next_step : {20608978: ()} output_args : {20608978: [{'Carton_gris': 20608982, 'papier': 20608983, 'Teint_Dans_La_Masse': 20608984, 'kraft': 20608985, 'cartonnette': 20608986, 'Carton_brun': 20608987, 'environnement': 20608988, 'plastique': 20608989, 'flou': 20608990, 'autre_refus': 20608991, 'mal_croppe': 20608992, 'metal': 20608993}]} args : 20608978 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 : ({'Carton_gris': 20608982, 'papier': 20608983, 'Teint_Dans_La_Masse': 20608984, 'kraft': 20608985, 'cartonnette': 20608986, 'Carton_brun': 20608987, 'environnement': 20608988, 'plastique': 20608989, 'flou': 20608990, 'autre_refus': 20608991, 'mal_croppe': 20608992, 'metal': 20608993},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (20608978) 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([20608978]) 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.3371703624725342 time spend to save output : 6.413459777832031e-05 total time spend for step 3 : 0.3372344970703125 step4:send_mail_cod Mon Feb 17 14:24:31 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 : {1338166443: ('0.03785267494921711',), 1338166431: ('0.03785267494921711',), 1338166371: ('0.03785267494921711',), 1338166197: ('0.03785267494921711',), 1338166173: ('0.03785267494921711',), 1338166136: ('0.03785267494921711',)} input_args_next_step : {1338166443: ()} output_args : {1338166443: ('0.03785267494921711',), 1338166431: ('0.03785267494921711',), 1338166371: ('0.03785267494921711',), 1338166197: ('0.03785267494921711',), 1338166173: ('0.03785267494921711',), 1338166136: ('0.03785267494921711',)} args : 1338166443 depend.output_id : 0 input_args_next_step : {1338166443: ('0.03785267494921711',), 1338166431: ()} output_args : {1338166443: ('0.03785267494921711',), 1338166431: ('0.03785267494921711',), 1338166371: ('0.03785267494921711',), 1338166197: ('0.03785267494921711',), 1338166173: ('0.03785267494921711',), 1338166136: ('0.03785267494921711',)} args : 1338166431 depend.output_id : 0 input_args_next_step : {1338166443: ('0.03785267494921711',), 1338166431: ('0.03785267494921711',), 1338166371: ()} output_args : {1338166443: ('0.03785267494921711',), 1338166431: ('0.03785267494921711',), 1338166371: ('0.03785267494921711',), 1338166197: ('0.03785267494921711',), 1338166173: ('0.03785267494921711',), 1338166136: ('0.03785267494921711',)} args : 1338166371 depend.output_id : 0 input_args_next_step : {1338166443: ('0.03785267494921711',), 1338166431: ('0.03785267494921711',), 1338166371: ('0.03785267494921711',), 1338166197: ()} output_args : {1338166443: ('0.03785267494921711',), 1338166431: ('0.03785267494921711',), 1338166371: ('0.03785267494921711',), 1338166197: ('0.03785267494921711',), 1338166173: ('0.03785267494921711',), 1338166136: ('0.03785267494921711',)} args : 1338166197 depend.output_id : 0 input_args_next_step : {1338166443: ('0.03785267494921711',), 1338166431: ('0.03785267494921711',), 1338166371: ('0.03785267494921711',), 1338166197: ('0.03785267494921711',), 1338166173: ()} output_args : {1338166443: ('0.03785267494921711',), 1338166431: ('0.03785267494921711',), 1338166371: ('0.03785267494921711',), 1338166197: ('0.03785267494921711',), 1338166173: ('0.03785267494921711',), 1338166136: ('0.03785267494921711',)} args : 1338166173 depend.output_id : 0 input_args_next_step : {1338166443: ('0.03785267494921711',), 1338166431: ('0.03785267494921711',), 1338166371: ('0.03785267494921711',), 1338166197: ('0.03785267494921711',), 1338166173: ('0.03785267494921711',), 1338166136: ()} output_args : {1338166443: ('0.03785267494921711',), 1338166431: ('0.03785267494921711',), 1338166371: ('0.03785267494921711',), 1338166197: ('0.03785267494921711',), 1338166173: ('0.03785267494921711',), 1338166136: ('0.03785267494921711',)} args : 1338166136 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 : {20608978: [{'Carton_gris': 20608982, 'papier': 20608983, 'Teint_Dans_La_Masse': 20608984, 'kraft': 20608985, 'cartonnette': 20608986, 'Carton_brun': 20608987, 'environnement': 20608988, 'plastique': 20608989, 'flou': 20608990, 'autre_refus': 20608991, 'mal_croppe': 20608992, 'metal': 20608993}]} input_args_next_step : {1338166443: ('0.03785267494921711',), 1338166431: ('0.03785267494921711',), 1338166371: ('0.03785267494921711',), 1338166197: ('0.03785267494921711',), 1338166173: ('0.03785267494921711',), 1338166136: ('0.03785267494921711',), 20608978: ()} output_args : {20608978: [{'Carton_gris': 20608982, 'papier': 20608983, 'Teint_Dans_La_Masse': 20608984, 'kraft': 20608985, 'cartonnette': 20608986, 'Carton_brun': 20608987, 'environnement': 20608988, 'plastique': 20608989, 'flou': 20608990, 'autre_refus': 20608991, 'mal_croppe': 20608992, 'metal': 20608993}]} args : 20608978 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 :7, first value : ('0.03785267494921711',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (20608978) 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 (1338166443,1338166431,1338166371,1338166197,1338166173,1338166136) Found this number of photos: 6 ##### Call download_photos : nb_thread : 5 begin to download photo : 1338166136 begin to download photo : 1338166197 begin to download photo : 1338166431 download finish for photo 1338166197 begin to download photo : 1338166371 download finish for photo 1338166431 begin to download photo : 1338166443 download finish for photo 1338166136 begin to download photo : 1338166173 download finish for photo 1338166371 download finish for photo 1338166173 download finish for photo 1338166443 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette206089851739798672/ length of list_filenames : 6 ; length of list_pids : 6 ; length of list_args : 6 results_Auto_P20608978_17-02-2025_14_24_32.pdf 20608985 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=20608985 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette206089851739798672 20608986 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=20608986 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1338164792: '1739798293_2701480_1338164009_d14df308d629ffa04a575c92e217def3_rle_crop_3678035067_0.png', 1338164844: '1739798332_2702983_1338164110_83821eb9919120485f0ca4a9de51eb71_rle_crop_3678035340_0.png', 1338164845: '1739798332_2702983_1338164110_83821eb9919120485f0ca4a9de51eb71_rle_crop_3678035341_0.png', 1338165782: '1739798475_2708485_1338164835_253df3bb34500ada1edafe076d5bda0f_rle_crop_3678035644_0.png', 1338165783: '1739798475_2708485_1338164749_3fb357d80aa6518e923390e85b3dde05_rle_crop_3678035664_0.png', 1338166380: '1739798594_2711844_1338165805_3ef2fa468893b580b2694a8c480c1dc9_rle_crop_3678036122_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/17/b49d518a05d7b1cf622355945b44a027_18090447.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/17/95f35bcc44ad0e60700ad1a35fccc6a7_14931611.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/17/624bcf4c379b04df49402db5f1b67461_38702103.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/17/e739535d9bfe4dbf2e1da7a3e6edb0ec_7548486.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/17/e8f3b613b076f66f12ddd07d941ed7dc_75849711.png change filename to text .imagette206089861739798672/ imagette206089861739798672/1739798293_2701480_1338164009_d14df308d629ffa04a575c92e217def3_rle_crop_3678035067_0.png.png imagette206089861739798672/1739798332_2702983_1338164110_83821eb9919120485f0ca4a9de51eb71_rle_crop_3678035341_0.png.png imagette206089861739798672/1739798594_2711844_1338165805_3ef2fa468893b580b2694a8c480c1dc9_rle_crop_3678036122_0.png.png imagette206089861739798672/1739798332_2702983_1338164110_83821eb9919120485f0ca4a9de51eb71_rle_crop_3678035340_0.png.png imagette206089861739798672/1739798475_2708485_1338164749_3fb357d80aa6518e923390e85b3dde05_rle_crop_3678035664_0.png.png imagette206089861739798672/1739798475_2708485_1338164835_253df3bb34500ada1edafe076d5bda0f_rle_crop_3678035644_0.png.png wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/17/3025a23a5cdc5c40234af11c61d9046a_30124195.png imagette206089861739798672 20608989 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=20608989 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1338164847: '1739798332_2702983_1338164151_914704b65a7387fe2fa91ac45545a466_rle_crop_3678035333_0.png', 1338165777: '1739798453_2708021_1338164828_8342f278f8b89c821dff8bf57d591d88_rle_crop_3678035631_0.png', 1338166430: '1739798594_2711844_1338165806_3c048bf998d5b66a9c563f4c396335e7_rle_crop_3678036107_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/17/936bd7e359b67ac34038b1cf36bb5e2d_21877993.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/17/e7d0dd48ec5f0476aedde84be34cf62f_74673258.png change filename to text .imagette206089891739798672/ imagette206089891739798672/1739798332_2702983_1338164151_914704b65a7387fe2fa91ac45545a466_rle_crop_3678035333_0.png.png imagette206089891739798672/1739798453_2708021_1338164828_8342f278f8b89c821dff8bf57d591d88_rle_crop_3678035631_0.png.png imagette206089891739798672/1739798594_2711844_1338165806_3c048bf998d5b66a9c563f4c396335e7_rle_crop_3678036107_0.png.png imagette206089901739798672/ wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/17/4f95fe4bbbd5475196878fb74f8d2373_31198431.png imagette206089891739798672 20608990 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=20608990 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette206089901739798672 20608991 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=20608991 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1338164790: '1739798293_2701480_1338164015_818cca5a6d431f43884f8e6869192319_rle_crop_3678034875_0.png', 1338164791: '1739798293_2701480_1338164015_818cca5a6d431f43884f8e6869192319_rle_crop_3678034867_0.png', 1338164841: '1739798332_2702983_1338164157_6f48f8b29519ba4f6b81ac4082a67f72_rle_crop_3678035308_0.png', 1338166195: '1739798551_2711212_1338164158_89bfce27fa7885593198da466619c749_rle_crop_3678035967_0.png', 1338166348: '1739798594_2711844_1338165805_3ef2fa468893b580b2694a8c480c1dc9_rle_crop_3678036121_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/17/b1fb52a80e9987a393a3090c8e710361_90990036.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/17/00229c4113117ebb38ad2785a147410d_43088107.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/17/1669328414a9ce8af88da50083de640b_94799204.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/17/9bd93644cc9a542f907d25d4670ead3e_29704348.png change filename to text .imagette206089911739798672/ imagette206089911739798672/1739798594_2711844_1338165805_3ef2fa468893b580b2694a8c480c1dc9_rle_crop_3678036121_0.png.png imagette206089911739798672/1739798332_2702983_1338164157_6f48f8b29519ba4f6b81ac4082a67f72_rle_crop_3678035308_0.png.png imagette206089911739798672/1739798551_2711212_1338164158_89bfce27fa7885593198da466619c749_rle_crop_3678035967_0.png.png imagette206089911739798672/1739798293_2701480_1338164015_818cca5a6d431f43884f8e6869192319_rle_crop_3678034875_0.png.png imagette206089911739798672/1739798293_2701480_1338164015_818cca5a6d431f43884f8e6869192319_rle_crop_3678034867_0.png.png imagette206089921739798672/ imagette206089931739798672/ wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/17/3ee924c7319f54186e91b5292a4659ba_48629806.png imagette206089911739798672 20608992 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=20608992 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette206089921739798672 20608993 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=20608993 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette206089931739798672 20608982 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=20608982 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1338164843: '1739798332_2702983_1338164151_914704b65a7387fe2fa91ac45545a466_rle_crop_3678035323_0.png', 1338165779: '1739798475_2708485_1338164835_253df3bb34500ada1edafe076d5bda0f_rle_crop_3678035649_0.png', 1338165780: '1739798475_2708485_1338164751_51c0f84b94d994a9dfc2c20847783d92_rle_crop_3678035655_0.png', 1338165781: '1739798475_2708485_1338164749_3fb357d80aa6518e923390e85b3dde05_rle_crop_3678035665_0.png', 1338166362: '1739798594_2711844_1338165806_3c048bf998d5b66a9c563f4c396335e7_rle_crop_3678036106_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/17/c2816c863e6122904a1c2f258e3e24e4_88955396.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/17/152500e6604901e2962f6dc9ff4e9eb8_66315336.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/17/c787812ea1595f34eb13746af74f5914_55184794.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/17/d789382eb0c72dea8cfda84f9242e219_25634946.png change filename to text .imagette206089821739798672/ imagette206089821739798672/1739798594_2711844_1338165806_3c048bf998d5b66a9c563f4c396335e7_rle_crop_3678036106_0.png.png imagette206089821739798672/1739798332_2702983_1338164151_914704b65a7387fe2fa91ac45545a466_rle_crop_3678035323_0.png.png imagette206089821739798672/1739798475_2708485_1338164749_3fb357d80aa6518e923390e85b3dde05_rle_crop_3678035665_0.png.png imagette206089821739798672/1739798475_2708485_1338164751_51c0f84b94d994a9dfc2c20847783d92_rle_crop_3678035655_0.png.png imagette206089821739798672/1739798475_2708485_1338164835_253df3bb34500ada1edafe076d5bda0f_rle_crop_3678035649_0.png.png wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/17/9542a9bd9f26371c7c6070c7c76c9c04_15955788.png imagette206089821739798672 20608984 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=20608984 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1338164782: '1739798293_2701480_1338164015_818cca5a6d431f43884f8e6869192319_rle_crop_3678034877_0.png', 1338164783: '1739798293_2701480_1338164013_f0cda0e2ffbb48a0dfd614a4139d5522_rle_crop_3678034896_0.png', 1338164784: '1739798293_2701480_1338164013_f0cda0e2ffbb48a0dfd614a4139d5522_rle_crop_3678034887_0.png', 1338164785: '1739798293_2701480_1338164010_bfb9d2a3ffeafa3b437dfaf8fc18392d_rle_crop_3678035032_0.png', 1338164786: '1739798293_2701480_1338164010_bfb9d2a3ffeafa3b437dfaf8fc18392d_rle_crop_3678035033_0.png', 1338164787: '1739798293_2701480_1338164009_d14df308d629ffa04a575c92e217def3_rle_crop_3678035080_0.png', 1338164837: '1739798332_2702983_1338164157_6f48f8b29519ba4f6b81ac4082a67f72_rle_crop_3678035313_0.png', 1338164838: '1739798332_2702983_1338164151_914704b65a7387fe2fa91ac45545a466_rle_crop_3678035326_0.png', 1338164839: '1739798332_2702983_1338164151_914704b65a7387fe2fa91ac45545a466_rle_crop_3678035330_0.png', 1338164840: '1739798332_2702983_1338164110_83821eb9919120485f0ca4a9de51eb71_rle_crop_3678035346_0.png', 1338165776: '1739798453_2708021_1338164828_8342f278f8b89c821dff8bf57d591d88_rle_crop_3678035639_0.png', 1338166194: '1739798551_2711212_1338164158_89bfce27fa7885593198da466619c749_rle_crop_3678035971_0.png', 1338166337: '1739798594_2711844_1338165806_3c048bf998d5b66a9c563f4c396335e7_rle_crop_3678036105_0.png', 1338166338: '1739798594_2711844_1338165806_3c048bf998d5b66a9c563f4c396335e7_rle_crop_3678036111_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/17/569f74b5a7da41ca09dfe14c114bec8b_45036290.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/17/7fb031d459170eb01b0aeab9e7d1d830_56911896.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/17/a078dbf11b3ba2e5db488aa8a40afb5a_82401146.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/17/925f10077914524c8ab8d084225f5be7_39012591.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/17/6432e843d9415ae2e3816acca3fa7ae6_9863202.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/17/be683b92e53d8e7ec3d3e6037c568539_98096571.png change filename to text .wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/17/bad670dd5c0347371ed08ffea11b473e_51871668.png change filename to text .wget -O 8.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/17/4312d6e394d07b4a9fffe11e1657e571_75497607.png change filename to text .wget -O 9.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/17/46e8f49b71cf248fd56c260290b8371f_70731428.png change filename to text .wget -O 10.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/17/8c7abb6c7356563e1728c6d923677322_77625536.png change filename to text .wget -O 11.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/17/8f01948fa2c8576d478f94e6d3828438_22922038.png change filename to text .wget -O 12.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/17/a624b3c9f7000a74d69c85babc313ba2_39721809.png change filename to text .wget -O 13.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/17/adda572b236c8bd1c2d75190c6490d45_74827625.png change filename to text .imagette206089841739798673/ imagette206089841739798673/1739798594_2711844_1338165806_3c048bf998d5b66a9c563f4c396335e7_rle_crop_3678036111_0.png.png imagette206089841739798673/1739798293_2701480_1338164010_bfb9d2a3ffeafa3b437dfaf8fc18392d_rle_crop_3678035032_0.png.png imagette206089841739798673/1739798293_2701480_1338164009_d14df308d629ffa04a575c92e217def3_rle_crop_3678035080_0.png.png imagette206089841739798673/1739798293_2701480_1338164013_f0cda0e2ffbb48a0dfd614a4139d5522_rle_crop_3678034896_0.png.png imagette206089841739798673/1739798293_2701480_1338164015_818cca5a6d431f43884f8e6869192319_rle_crop_3678034877_0.png.png imagette206089841739798673/1739798332_2702983_1338164151_914704b65a7387fe2fa91ac45545a466_rle_crop_3678035330_0.png.png imagette206089841739798673/1739798551_2711212_1338164158_89bfce27fa7885593198da466619c749_rle_crop_3678035971_0.png.png imagette206089841739798673/1739798332_2702983_1338164110_83821eb9919120485f0ca4a9de51eb71_rle_crop_3678035346_0.png.png imagette206089841739798673/1739798332_2702983_1338164151_914704b65a7387fe2fa91ac45545a466_rle_crop_3678035326_0.png.png imagette206089841739798673/1739798453_2708021_1338164828_8342f278f8b89c821dff8bf57d591d88_rle_crop_3678035639_0.png.png imagette206089841739798673/1739798293_2701480_1338164013_f0cda0e2ffbb48a0dfd614a4139d5522_rle_crop_3678034887_0.png.png imagette206089841739798673/1739798332_2702983_1338164157_6f48f8b29519ba4f6b81ac4082a67f72_rle_crop_3678035313_0.png.png imagette206089841739798673/1739798293_2701480_1338164010_bfb9d2a3ffeafa3b437dfaf8fc18392d_rle_crop_3678035033_0.png.png imagette206089841739798673/1739798594_2711844_1338165806_3c048bf998d5b66a9c563f4c396335e7_rle_crop_3678036105_0.png.png wget -O 14.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/17/c71c34440ec64b315f96d06c67005508_62855615.png imagette206089841739798673 20608987 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=20608987 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1338166420: '1739798594_2711844_1338165806_3c048bf998d5b66a9c563f4c396335e7_rle_crop_3678036110_0.png', 1338166422: '1739798594_2711844_1338165805_3ef2fa468893b580b2694a8c480c1dc9_rle_crop_3678036125_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/17/62abf0343f0d6cfbc63229b01f4888c7_85381983.png change filename to text .imagette206089871739798673/ imagette206089871739798673/1739798594_2711844_1338165806_3c048bf998d5b66a9c563f4c396335e7_rle_crop_3678036110_0.png.png imagette206089871739798673/1739798594_2711844_1338165805_3ef2fa468893b580b2694a8c480c1dc9_rle_crop_3678036125_0.png.png wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/17/9d271c047f6431a19acd00f8c796a3ae_13140978.png imagette206089871739798673 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=20608978 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/20608994,20608995,20608996,20608997,20608998,20608999,20609000,20609001,20609002,20609003,20609004,20609005?tags=Carton_gris,papier,Teint_Dans_La_Masse,kraft,cartonnette,Carton_brun,environnement,plastique,flou,autre_refus,mal_croppe,metal your option no_mail is active, we will not send the real mail to your client args[1338166443] : ('0.03785267494921711',) no score found for photo 1338166443 apple ('0.03785267494921711',) We are sending mail with results at report@fotonower.com args[1338166431] : ('0.03785267494921711',) no score found for photo 1338166431 apple ('0.03785267494921711',) We are sending mail with results at report@fotonower.com args[1338166371] : ('0.03785267494921711',) no score found for photo 1338166371 apple ('0.03785267494921711',) We are sending mail with results at report@fotonower.com args[1338166197] : ('0.03785267494921711',) no score found for photo 1338166197 apple ('0.03785267494921711',) We are sending mail with results at report@fotonower.com args[1338166173] : ('0.03785267494921711',) no score found for photo 1338166173 apple ('0.03785267494921711',) We are sending mail with results at report@fotonower.com args[1338166136] : ('0.03785267494921711',) no score found for photo 1338166136 apple ('0.03785267494921711',) We are sending mail with results at report@fotonower.com refus_total : 0.03785267494921711 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=20608978 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_P20608978_17-02-2025_14_24_32.pdf results_Auto_P20608978_17-02-2025_14_24_32.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20608978_17-02-2025_14_24_32.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','20608978','results_Auto_P20608978_17-02-2025_14_24_32.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20608978_17-02-2025_14_24_32.pdf','pdf','','0.19','0.03785267494921711') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([20608978]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1338166443, 1338166431, 1338166371, 1338166197, 1338166173, 1338166136] map_info['map_portfolio_photo'] : {20608978: [1338166443, 1338166431, 1338166371, 1338166197, 1338166173, 1338166136, 1338165810, 1338165806, 1338165805, 1338165463, 1338165368, 1338165290, 1338165211, 1338165143, 1338164835, 1338164829, 1338164828, 1338164764, 1338164751, 1338164749, 1338164184, 1338164183, 1338164158, 1338164157, 1338164151, 1338164110, 1338164015, 1338164013, 1338164010, 1338164009]} final : False mtd_id 4302 list_pids : [1338166443, 1338166431, 1338166371, 1338166197, 1338166173, 1338166136] 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, '2593386') ('4302', '20608978', '1338166443', None, None, None, None, None, '2593386') ('4302', None, None, None, None, None, None, None, '2593386') ('4302', '20608978', '1338166431', None, None, None, None, None, '2593386') ('4302', None, None, None, None, None, None, None, '2593386') ('4302', '20608978', '1338166371', None, None, None, None, None, '2593386') ('4302', None, None, None, None, None, None, None, '2593386') ('4302', '20608978', '1338166197', None, None, None, None, None, '2593386') ('4302', None, None, None, None, None, None, None, '2593386') ('4302', '20608978', '1338166173', None, None, None, None, None, '2593386') ('4302', None, None, None, None, None, None, None, '2593386') ('4302', '20608978', '1338166136', None, None, None, None, None, '2593386') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 6 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', '20608978', '1338166443', None, None, None, None, None, '2593386'), ('4302', '20608978', '1338166431', None, None, None, None, None, '2593386'), ('4302', '20608978', '1338166371', None, None, None, None, None, '2593386'), ('4302', '20608978', '1338166197', None, None, None, None, None, '2593386'), ('4302', '20608978', '1338166173', None, None, None, None, None, '2593386'), ('4302', '20608978', '1338166136', None, None, None, None, None, '2593386')] time used for this insertion : 0.011933565139770508 save_final save missing photos in datou_result : time spend for datou_step_exec : 3.0287201404571533 time spend to save output : 0.012240886688232422 total time spend for step 4 : 3.0409610271453857 step5:split_time_score Mon Feb 17 14:24:34 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 : ['20608978'] 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 : [('20608978',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (20608978) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1338166197: {'path': 'temp/1739798671_3692978_1338166197_7fd675a00c4e7d7e84004bb8587d9b19.jpg', 'extension': 'jpg'}, 1338166371: {'path': 'temp/1739798671_3692978_1338166371_396e0bcfdab4041f2346afec7e6acab1.jpg', 'extension': 'jpg'}, 1338166136: {'path': 'temp/1739798671_3692978_1338166136_5a9500f99b9678d91b6b499ed417a50b.jpg', 'extension': 'jpg'}, 1338166173: {'path': 'temp/1739798671_3692978_1338166173_d6d80b1b9a9b1d1b53360f2709de5030.jpg', 'extension': 'jpg'}, 1338166431: {'path': 'temp/1739798671_3692978_1338166431_2088f9a7a3a677a7465040d930fa11c4.jpg', 'extension': 'jpg'}, 1338166443: {'path': 'temp/1739798671_3692978_1338166443_8e477982edd902ae207de6504a0d721e.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 = 20608978; (('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 = 20608978 group by h (('14', 30),) 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=20608978 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 (20608978) 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 (20608978) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 17022025 20608978 Nombre de photos uploadées : 30 / 23040 (0%) 17022025 20608978 Nombre de photos taguées (types de déchets): 0 / 30 (0%) 17022025 20608978 Nombre de photos taguées (volume) : 0 / 30 (0%) [{'photo_id': 1338164015, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/17/818cca5a6d431f43884f8e6869192319.jpg', 'username': None, 'uploaded_at': 1739798167, 'text': 'image_17022025_14_15_05_10237.jpg'}, {'photo_id': 1338164013, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/17/f0cda0e2ffbb48a0dfd614a4139d5522.jpg', 'username': None, 'uploaded_at': 1739798167, 'text': 'image_17022025_14_15_15_10140.jpg'}, {'photo_id': 1338164010, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/17/bfb9d2a3ffeafa3b437dfaf8fc18392d.jpg', 'username': None, 'uploaded_at': 1739798167, 'text': 'image_17022025_14_15_24_9125.jpg'}, {'photo_id': 1338164009, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/17/d14df308d629ffa04a575c92e217def3.jpg', 'username': None, 'uploaded_at': 1739798167, 'text': 'image_17022025_14_15_35_10135.jpg'}] 0 [] elapsed_time : load_data_split_time_score 3.814697265625e-06 elapsed_time : order_list_meta_photo_and_scores 8.344650268554688e-06 ?????????????????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.0036993026733398438 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 20608978, '2025-02-17' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (1607134,979,"{}"); elapsed_time : insert_dashboard_record_day_entry 0.022065162658691406 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= 1607134 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 1607134, 'dashboard_run_id': 1615664, 'mtr_portfolio_id': 20608349, 'dashboard_result_id': 8929650, '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_P20608349_17-02-2025_14_02_59.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 20608351, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20608352, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20608353, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20608354, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20608355, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20608356, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20608357, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20608358, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20608359, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20608360, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20608361, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20608362, 'pht': 3726}}"}, {'dashboat_entry_day': 1607134, 'dashboard_run_id': 1615664, 'mtr_portfolio_id': 20608630, 'dashboard_result_id': 8929651, '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_P20608630_17-02-2025_14_18_58.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20608634, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20608635, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20608636, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20608637, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20608638, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20608639, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20608640, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20608641, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20608642, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20608643, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20608644, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20608645, 'pht': 3726}}"}, {'dashboat_entry_day': 1607134, 'dashboard_run_id': 1615664, 'mtr_portfolio_id': 20608978, 'dashboard_result_id': 8929652, '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_P20608978_17-02-2025_14_22_59.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20608982, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20608983, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20608984, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20608985, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20608986, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20608987, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20608988, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20608989, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20608990, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20608991, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20608992, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20608993, '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 = 20608349 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': 2593320, 'mtr_portfolio_id': 20608349, 'created_at': datetime.datetime(2025, 2, 17, 14, 2, 58), 'result': '0.0348489755104114', 'result_long': None, 'result_double': None}] Qualite : 0.0348489755104114 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 20608349 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20608349_17-02-2025_14_02_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 20608349 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_P20608349_17-02-2025_14_02_59.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 20608351, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20608352, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20608353, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20608354, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20608355, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20608356, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20608357, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20608358, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20608359, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20608360, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20608361, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20608362, 'pht': 3726}}" where mtr_portfolio_id = 20608349 and dashboard_run_id = 1615664 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`=20608349 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (8929650, 0.0348489755104114, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20608349_17-02-2025_14_02_59.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 20608351, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20608352, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20608353, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20608354, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20608355, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20608356, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20608357, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20608358, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20608359, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20608360, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20608361, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20608362, '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 = 20608630 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': 2593357, 'mtr_portfolio_id': 20608630, 'created_at': datetime.datetime(2025, 2, 17, 14, 18, 58), 'result': '0.047647527627244037', 'result_long': None, 'result_double': None}] Qualite : 0.047647527627244037 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 20608630 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20608630_17-02-2025_14_18_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 20608630 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_P20608630_17-02-2025_14_18_58.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20608634, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20608635, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20608636, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20608637, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20608638, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20608639, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20608640, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20608641, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20608642, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20608643, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20608644, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20608645, 'pht': 3726}}" where mtr_portfolio_id = 20608630 and dashboard_run_id = 1615664 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`=20608630 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (8929651, 0.047647527627244037, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20608630_17-02-2025_14_18_58.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20608634, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20608635, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20608636, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20608637, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20608638, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20608639, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20608640, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20608641, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20608642, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20608643, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20608644, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20608645, '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 = 20608978 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': 2593386, 'mtr_portfolio_id': 20608978, 'created_at': datetime.datetime(2025, 2, 17, 14, 24, 31), 'result': '0.03785267494921711', 'result_long': None, 'result_double': None}] Qualite : 0.03785267494921711 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 20608978 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20608978_17-02-2025_14_24_32.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 20608978 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_P20608978_17-02-2025_14_24_32.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20608982, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20608983, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20608984, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20608985, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20608986, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20608987, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20608988, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20608989, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20608990, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20608991, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20608992, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20608993, 'pht': 3726}}" where mtr_portfolio_id = 20608978 and dashboard_run_id = 1615664 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`=20608978 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (8929652, 0.03785267494921711, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20608978_17-02-2025_14_24_32.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20608982, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20608983, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20608984, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20608985, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20608986, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20608987, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20608988, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20608989, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20608990, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20608991, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20608992, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20608993, '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 (20608349,20608630,20608978) result : ((1338159500,), (1338159527,), (1338159532,), (1338160715,), (1338160718,), (1338160748,), (1338160752,), (1338160756,), (1338160760,), (1338160785,), (1338160788,), (1338160792,), (1338160796,), (1338160800,), (1338160820,), (1338160822,), (1338160826,), (1338160935,), (1338160938,), (1338160941,), (1338161130,), (1338161155,), (1338161178,), (1338161181,), (1338161183,), (1338161451,), (1338161285,), (1338161289,), (1338161291,), (1338161381,), (1338161515,), (1338161518,), (1338161521,), (1338161524,), (1338161529,), (1338161757,), (1338161764,), (1338161771,), (1338161774,), (1338161798,), (1338161800,), (1338161803,), (1338163539,), (1338163552,), (1338163791,), (1338163792,), (1338163794,), (1338163796,), (1338163832,), (1338163834,), (1338163836,), (1338163837,), (1338163869,), (1338163872,), (1338163874,), (1338163876,), (1338163879,), (1338163906,), (1338163907,), (1338163909,), (1338163912,), (1338163949,), (1338163951,), (1338163953,), (1338163955,), (1338163958,), (1338164017,), (1338164009,), (1338164010,), (1338164013,), (1338164015,), (1338164110,), (1338164151,), (1338164157,), (1338164158,), (1338164183,), (1338164184,), (1338164749,), (1338164751,), (1338164764,), (1338164828,), (1338164829,), (1338164835,), (1338165143,), (1338165211,), (1338165290,), (1338165368,), (1338165463,), (1338165805,), (1338165806,), (1338165810,), (1338166136,), (1338166173,), (1338166197,), (1338166371,), (1338166431,), (1338166443,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'17022025': {'nb_upload': 30, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([20608978]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1338166443, 1338166431, 1338166371, 1338166197, 1338166173, 1338166136] map_info['map_portfolio_photo'] : {20608978: [1338166443, 1338166431, 1338166371, 1338166197, 1338166173, 1338166136, 1338165810, 1338165806, 1338165805, 1338165463, 1338165368, 1338165290, 1338165211, 1338165143, 1338164835, 1338164829, 1338164828, 1338164764, 1338164751, 1338164749, 1338164184, 1338164183, 1338164158, 1338164157, 1338164151, 1338164110, 1338164015, 1338164013, 1338164010, 1338164009]} final : True mtd_id 4302 list_pids : [1338166443, 1338166431, 1338166371, 1338166197, 1338166173, 1338166136] Looping around the photos to save general results len do output : 1 /20608978Didn'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, '2593386') ('4302', '20608978', '1338166443', None, None, None, None, None, '2593386') ('4302', None, None, None, None, None, None, None, '2593386') ('4302', '20608978', '1338166431', None, None, None, None, None, '2593386') ('4302', None, None, None, None, None, None, None, '2593386') ('4302', '20608978', '1338166371', None, None, None, None, None, '2593386') ('4302', None, None, None, None, None, None, None, '2593386') ('4302', '20608978', '1338166197', None, None, None, None, None, '2593386') ('4302', None, None, None, None, None, None, None, '2593386') ('4302', '20608978', '1338166173', None, None, None, None, None, '2593386') ('4302', None, None, None, None, None, None, None, '2593386') ('4302', '20608978', '1338166136', None, None, None, None, None, '2593386') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 7 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, '20608978', 'None', None, None, None, None, '2593386'), ('4302', '20608978', '1338166443', None, None, None, None, None, '2593386'), ('4302', '20608978', '1338166431', None, None, None, None, None, '2593386'), ('4302', '20608978', '1338166371', None, None, None, None, None, '2593386'), ('4302', '20608978', '1338166197', None, None, None, None, None, '2593386'), ('4302', '20608978', '1338166173', None, None, None, None, None, '2593386'), ('4302', '20608978', '1338166136', None, None, None, None, None, '2593386')] time used for this insertion : 0.6795296669006348 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.284470796585083 time spend to save output : 0.6798574924468994 total time spend for step 5 : 0.9643282890319824 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 (2593386) 2.34user 2.20system 0:11.07elapsed 41%CPU (0avgtext+0avgdata 157860maxresident)k 1096inputs+10000outputs (12major+75564minor)pagefaults 0swaps